text
stringlengths
2.85k
2.55M
label
class label
11 classes
Neural and Synaptic Array Transceiver: A Brain-Inspired Computing Framework for Embedded Learning 1, * 4 2 2 3 arXiv:1709.10205v2 [cs.NE] 6 Oct 2017 Georgios Detorakis , Sadique Sheik , Charles Augustine , Somnath Paul , Bruno U. Pedroni , Nikil 5,1 1,5 3 1,5,* Dutt , Jeffrey Krichmar Gert Cauwenberghs Emre Neftci 1 2 3 4 5 Department of Cognitive Sciences, UC Irvine Circuit Research Lab, Intel Corporation Department of Bioengineering and Institute for Neural Computation, UC San Diego Biocircuits Institute, UC San Diego Department of Computer Science, UC Irvine * [email protected], [email protected] Abstract Embedded, continual learning for autonomous and adaptive behavior is a key application of neuromorphic hardware designed to mimic the dynamics and architecture of biological neural networks. However, neuromorphic implementations of embedded learning at large scales that are both flexible and efficient have been hindered by a lack of a suitable algorithmic framework. As a result, most neuromorphic hardware are trained off-line on large clusters of dedicated processors or GPUs and transferred post hoc to the device. We address this by introducing the neural and synaptic array transceiver (NSAT), a neuromorphic computational framework facilitating flexible and efficient embedded learning. NSAT supports event-driven supervised, unsupervised and reinforcement learning algorithms including deep learning. We demonstrate the NSAT in a wide range of tasks, including the simulation of Mihalas–Niebur neuron, dynamic neural fields, event-driven random back-propagation for event-based deep learning, event-based contrastive divergence for unsupervised learning, and voltage-based learning rules for sequence learning. We anticipate that this contribution will establish the foundation for a new generation of devices enabling adaptive mobile systems, wearable devices, and robots with data-driven autonomy. Introduction Using biological brains as an inspiration for designing novel computing paradigms can lead to massively distributed computing technologies that operate on extremely tight power budgets [92], while being robust to ambiguities in real-world sensory information and resilient to component failures [39]. To devise such technology, neuromorphic electronic systems strive to closely mimic the building blocks of biological neural networks and dynamics [55] in custom digital [57, 37] or mixed signal [83, 11, 76] CMOS technologies. In neuromorphic systems, similarly to biological neural networks, only spike-events are communicated between neurons, and neural and synaptic state components are local [25]. This organization can overcome some of the fundamental inefficiencies of the Von Neumann architecture [8] when scaled to massively distributed systems. However, to deploy such an architecture on real-world workloads, neuromorphic systems necessitate a suitable computational and learning framework that can efficiently operate within the constraints dictated by the architecture and dynamics of the neural substrate, i.e. that states and parameters local to the neuron, and global communication is mediated by all-or-none events which are sparse in space and time. Although recent progress has significantly advanced the systematic synthesis of dynamical systems onto neural substrates and their neuromorphic VLSI counterparts, their applications continue to rely on off-line and off-device learning [29, 48], calibration techniques [34, 56, 65], or dedicated digital processors [1, 73] that cannot be directly and efficiently embedded in neuromorphic hardware. For many industrial applications involving controlled environments, where existing (labeled) data is readily available or where streaming data can be quickly transmitted to a mainframe computer, such off-line learning or calibration techniques are acceptable. Following this approach, many academic and industrial research groups have successfully demonstrated dedicated hardware for inference tasks [16, 40, 58]. For mobile applications beyond these constraints, learning must be performed in an on-going fashion, using data streaming to the device. Recent work on neuromorphic systems can potentially achieve this feat with a thousandfold less power than GPUs [69, 70], while matching or surpassing the accuracy of dedicated machine learning accelerators [16, 40], and operating on-line. This article presents one such system, called Neural and Synaptic Array Transceiver (NSAT), and demonstrates proof-of-concept learning applications. The NSAT is a general-purpose spiking neural network simulator designed on the assumptions that extreme efficiency in scalable neuromorphic learning frameworks for data-driven autonomy and algorithmic efficiency hinges on the establishment of neural algorithms in which the computational power of the Synaptic Operation (SynOp) are on the same order as that of a Multiply Accumulate (MAC) unit; and a neuromorphic design that emphasizes locally dense and globally sparse communication using hierarchical event-based communication [47, 71]. To achieve extreme efficiency, the NSAT framework takes advantage of tractable linear neural model dynamics, multiplier–less design, fixed–width representation and event-driven communication, while being able to simulate a wide range of neural and plasticity dynamics. An NSAT core is composed of a large number of state components that can be flexibly coupled to form multi-compartment generalized integrateand-fire neurons, allowing the implementation of several existing neural models [60, 38] (Fig. 1). While biological interpretation is not necessary, the state components forming the neuron can be interpreted as somatic potential, dendritic potential, synaptic currents, neuromodulator concentration or calcium currents, depending on its interactions with other state components or pre-synaptic neurons. The communication between cores and event-driven sensors is routed via inter-core spike events. While there already exist neuromorphic VLSI circuits for synaptic learning [77, 83, 5], our framework is novel in that it is equipped with a flexible and scalable event–based plasticity rule that is tightly guided by algorithmic considerations and matched to the neuron model. Scalability is achieved using only forward lookup access of the synaptic connectivity table [72], permitting scalable, memory-efficient implementation compared to other implementations requiring reverse table lookups or memory-intensive architectures such as crossbar arrays. Flexibility in the learning dynamics is achieved using a reconfigurable event–based threefactor rule [95, 19] consistent with other established plasticity dynamics such as STDP [12, 54], membranevoltage based rules [19] and calcium based dynamics [87, 41]. Its three factor dynamics enable unsupervised, supervised and reinforcement learning [27] using local information. We demonstrate that NSAT supports a form of gradient back–propagation in deep networks [80, 28, 102], unsupervised learning in spike-based Restricted Boltzmann Machines (RBMs) [68], and unsupervised learning of sequences using a competitive learning [42]. Furthermore, we show that learning in digital NSAT requires fewer SynOps compared to MACs in equivalent digital hardware, suggesting that a custom hardware implementation of NSAT can be more efficient than mainstream computing technologies by a factor equal to the J/MAC to J/Synop ratio. This article is organized as follows: In the Material & Methods section we describe the neuron model and its mathematical equations. We present the NSAT architecture and software simulator (publicly available under GPLv3 license). In the Results section we show that the neuron model can simulate the Mihalas– Niebur neuron [60] and thus demonstrate a rich repertoire of spike behaviors. In addition, we simulate three different neural fields models [3], and event-driven variants of commonly used machine learning algorithms. Materials and Methods In this section we introduce the mathematical description of the NSAT framework and the details regarding its architecture and its software implementation. 2 From Leaky Integrate-and-Fire Neurons to the NSAT Neuron and Synapse Model We start our description with the leaky integrate–and–fire neuron (LIF) model, which forms the basis of the NSAT neuron: d τm V (t) = −V (t) + RI(t). (1a) dt If V (t) ≥ θ then V (t) = Vr and s = 1, (1b) where V (t) is the neuron’s membrane potential, τm is the membrane time constant, R is the membrane resistance and I(t) is the driving current. When the membrane potential is greater or equal to a threshold value (θ), the neuron fires a spike and the membrane potential value at that time step is set to a reset value Vr (resting potential). The dynamical properties of LIF neurons can be extended with synaptic dynamics or other internal currents such as calcium channels, potassium channels and other biophysical variables. For instance, the concentration of some neurotransmitter or ion, U (t), can be captured by the linear dynamics: τU d U = −U + ∑ δ(t − tk ) dt (2a) k (2b) where U (t) is the concentration within the neuron cell reflecting for example calcium concentration, although the biological interpretation is not indispensable for the NSAT framework. The term ∑k δ(t − tk ) indicates 1 the pre-synaptic incoming spikes to the current post-synaptic neuron (δ is the Dirac function ). If we rewrite the summation term as S(t) = ∑k δ(t − tk ) then the dynamics become the linear system: 1 − V̇ (t) [ ] = [ τm 0 U̇ (t) 0 V (t) ]+[ ]⋅[ U (t) − τ1 U RI(t) τm S(t) ] . τU (3) A generalization of such linear dynamics to N dimensions can be written in the following vector notation: d x(t) = Ax(t) + Z(t), (4) dt where the temporal evolution of state x(t) = (x0 (t), x1 (t), x2 (t), ⋯, xN (t)) is characterized by the solution of Eq. (4). A is the state transition matrix and Z(t) the time-varying external inputs or commands to the system. Solutions to linear dynamical systems of Eq. (4) are given by: t x(t) = exp(At)x(t0 ) + ∫ exp(A(t − τ ))Z(τ )dτ. (5) t0 Equation (5) can be computed numerically by using the Putzer algorithm [75] for computing the matrix exponential. Numerical solutions of equation (4) can be obtained using several numerical integration methods, such as the Forward Euler which is computationally simple and fast. NSAT Neuron and Synapse Model The NSAT neuron consists in linear dynamics described by Eq. 4, extended with firing thresholds, resets mechanisms and inputs Z(t) written in open form: dx(t) Ξ(t) ⊗ W(t)) ⋅ s(t) + η (t) + b) . = Ax(t) + (Ξ dt ÍÒÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò ÒÑÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ï (6a) Z(t) If x(t) ≥ θ then x(t) = Xr , (6b) If x0 (t) ≥ θ0 then s0 (t) = δ(t). 1 (6c) δ(t) = ∞, if t = 0 otherwise δ(t) = 0. In the discrete version we have δ(t) = 1, if t = 0 otherwise δ(t) = 0. 3 The state components x = (x0 , ..., xi , ...) describe the dynamics of a neural compartment or variable such as membrane potential, internal currents, synaptic currents, adaptive thresholds and other biophysical variables, although a biological interpretation is not necessary. A is the state-transition square matrix that describes the dynamics of each state component and their couplings. Ξ is a random variable drawn from a Bernoulli distribution and introduces multiplicative stochasticity to the NSAT, which is an important feature for learning [101, 89, 10] inspired by synaptic failures [100, 69]. W is the synaptic strength matrix and defines the connectivity and the strength of each connectivity between neurons. s is a vector that takes values in {0, 1} and registers whether the neuron has spiked. The ⊗ symbol defines an element-wise multiplication (or Hadamard product). η is the additive normal noise with zero mean and programmable variance. And finally, b is a constant value that is added to each state component acting as a constant input (i.e. current injection from a neuroscience point of view or bias from a machine learning point of view). When a component xi crosses its threshold value (θi ) then it is subject to reset to some predefined value Xri . Additionally if the zero state of a neuron (x0 (t)) crosses its threshold value then that neuron fires a spike as shown in Eq. (6), with (s0 (t) = δ(t)) and a new setting of Xr0 . After the neuron has spiked, the membrane potential is clamped during a programmable refractory period, during which it is not permitted to fire. Figure 1: The Neural and Synaptic Array Transceiver (NSAT) (a) Sample run externally modulated STDP, showing raster plot of 25 neurons and detailed temporal dynamics of the four components of the first neuron’s (neuron number 0) state. The first component represents the membrane potential (Vm ), the second component represents the synaptic state (Isyn ), while the third is the plasticity modulation (xm ). The latter state is driven externally by a spike train that is active between time steps 400 and 600, and white noise of constant amplitude. (b) NSAT Neurons consist of compartments that can be coupled to trading off the number of neurons vs. neuron complexity (number of compartments), (c-d) NSAT information flow and envisioned layout of the NSAT cores using Hierarchical Address–Event Routing (HiAER) [47, 71] for scalable and expandable neural event communication with reconfigurable long-range synaptic connectivity. The NSAT features a modulated Spike-Timing-Dependent-Plasticity (STDP) learning rule. The classical STDP rule is a form of Hebbian [43] learning that affects the synaptic strengths of connected pre- and postsynaptic neurons based on their spikes firing history in the following way [12, 88]: if a post–synaptic neuron generates action potential within a time interval after the pre–synaptic neuron has fired multiple spikes then 4 the synaptic strength between these two neurons becomes stronger (long–term potentiation–LTP). On the other hand if the post-synaptic neuron fires multiple spikes before the pre–synaptic neuron generates action potentials within that time–interval then the synaptic strength becomes weak (long–term depression–LTD). The classical STDP rule requires the spiking firing history of all pre–synaptic and post–synaptic neurons that are connected in order to be implemented. This renders STDP difficult to implement in hardware due to computational and memory requirements. To overcome such limitations, NSAT uses a forward table– based, pre–synaptic event-triggered, nearest–neighbor STDP rule [72]. This method implements both causal and acausal weight updates using only forward lookup access of the synaptic connectivity table, permitting memory-efficient implementation. A single timer variable for each neuron is sufficient to implement this rule. Exact STDP is recovered in the case of refractory periods greater than the STDP time window, and otherwise it closely approximates exact STDP cumulative weight updates [72]. The mathematical formulation of the NSAT learning rule is given by: j ij (t) = xm (t)(K(t − ti ) + K(tj − t)), (7a) d w (t) = ij (t)δj (t), dt ij (7b) where ij (t) is the eligibility of the synapse between the i–th pre–synaptic neuron and the j–th post-synaptic neuron update, K(⋅) is the STDP learning window, ti is the last time that the i–th pre–synaptic neuron fired a spike, and tj is the last time that the post-synaptic neuron fired a spike. The kernel (or learning window) K(t − ti ) refers to the causal (positive) STDP update and the term K(tj − t) refers to the acausal j (negative) STDP update. xm (t) is the m–th state component of the post–synaptic neuron that dynamically modulates the amplitude of the STDP kernel. Difference Equations of NSAT (Quantized) Framework The NSAT software simulator consists in discrete-time versions of the above equations, based on fixed point arithmetics without any multiplications. The continuous–time dynamics of NSAT described by Eq. (6) and Eq. (7) are rewritten here in a discrete (quantized) form: Ξ[t] ⊗ W[t]) ⋅ s[t] + η [t] + b. x[t + 1] = x[t] + A Œ x[t] + (Ξ If x[t + 1] ≥ θ then x[t + 1] ← Xr . If x0 [t + 1] ≥ θ0 then s0 [t + 1] ← 1, (8a) (8b) (8c) where the entries of matrices A and b are integer constants. Some other parameters such as the variance of the additive noise η are defined a priori by the user. More details regarding the parameters are provided later (see Implementation Details paragraph). The operator Œ, which is described by Algorithm 1, plays the role of a multiplication implemented with bit shift operations. In particular, it ensures that all state components leak towards the resting state in the absence of external input (current). Algorithm 1 Zero-rounding bit shift operation (Œ) function a Œ x y =a⋄x if y ≠ 0 and a = 0 then return sign(−y) else return a end if end function The ⋄ symbol in Algorithm 1 defines an operator for a custom bit shift. It performs a multiplication by power of two using only bitwise operations as Algorithm 2 indicates. The reason for using ⋄ rather than left 5 Algorithm 2 Bit shift multiplication operation (⋄) function a ⋄ x if a ≥ 0 then return x ≪ a else if a < 0 then return sign(x)(∣x∣ ≫ −a) 6: end if 7: end function 1: 2: 3: 4: 5: and right bit shifting is because integers stored using a two’s complement representation have the property ′ a ′ that right shifting by a of values such that x > −2 , ∀a < a is −1, whereas 0 is expected in the case of a −a multiplication by 2 . The ⋄ operator corrects this problem by modifying the bit shift operation such that ′ a ′ −2 ⋄ a = 0, ∀a < a. Such multiplications by powers of 2 have the advantage that the parameters are stored on a logarithmic scale, such that fewer bits are required to store parameters. A logarithmic scale for the parameters is suitable since solutions to the equations consist of sums of exponentials of these parameters −3 (5). For example, −(−3 Œ x0 ) is the NSAT equivalent of −2 x0 [t]. The learning rule given by Eq. (7) is also discretized: m ij [t] = xj [t] ⋄ (K[t − ti ] + K[tj − t]), (9a) wij [t + 1] = Clip(wij [t] + ij [t]sj [t], wmin , wmax ). ÍÒÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò ÑÒÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ï (9b) ∆wij Where Clip(⋅, wmin , wmax ) clips its first argument to within the range [wmin , wmax ] dictated by the fixed point representation of the synaptic weights at every time step. Optionally, the weight updates can be randomized using a discretized version of randomized rounding [63], which interprets the r least significant bits of ∆w as a probability, as follows: r ∆wij = (∆w ≫ r) + { 1 if random(0,1) < p 0 otherwise. , (10) where p is the number formed by the r least significant bits of ∆wij . Figure 1(a) shows an example of NSAT operation with externally modulated STDP. In this example, each neuron consisted in 4 components. The first and second component correspond to classical leaky integrate and fire dynamics with current-based synapses. The third state component driven externally to modulate the STDP update. As a result most weights updates are concentrated around high modulation states. Implementation of the NSAT Framework The NSAT Architecture Figures 1(c), (d) and 2 illustrate the NSAT architecture consisting of multiple interconnected cores (or threads each simulating one NSAT core). Only addresses of a neuron’s spike are transmitted in inter– and intra–thread communication. A global clock keeps track of the simulation time and synchronizes all NSAT threads. At every simulation time step (or tick) each thread runs independently, executing NSAT dynamics in two stages. In the first stage each thread integrates the neural dynamics of its neurons based on Eq. (8) without accumulating the synaptic inputs on the neuron state. Then threads detect new spike-events and transmit them accordingly to their destinations. All the detected inter- and intra-core spike events at time t are made available to the next time step (t + 1). In the second stage, the detected spike events (including the external ones) are accumulated onto the Ξ[t] ⊗ W[t]) ⋅ s[t]. Synaptic weights are multiplied with a neural states components xi according to (Ξ 6 predefined constant (implemented as a bit shift operation) to trade off precision and range limitations imposed by fixed point integer arithmetic. When the learning is enabled, Eq. (9) is computed. First, threads compute the causal and then the acausal part of the STDP learning curve. After learning, the STDP counters of neurons that have spiked are set to their new values (either the last time that a neuron spiked, or a neuron clock starts ticking until expiration). The final steps in the second stage perform update m of modulator dynamics (xi ) and reset of the neuron state components that spiked. The modulator state component (xm ) adjusts the amplitude of the STDP function as in three-factor synaptic plasticity rules [96]. Figure 2: The NSAT Architecture Multiple NSAT threads receive external events and generate event responses in two stages. Each thread consists of two major instruction sets (cyan boxes), one for evaluating neuron dynamics and the other for implementing an event-based STDP learning rule. The instructions are shown in the two large gray boxes. Arrows indicate the flow of the information within an NSAT thread during simulation. Software Implementation Details In order to demonstrate the capabilities of the proposed NSAT framework, we implemented a software simulator in the C [79] programming language. The software has been designed to accommodate foreseeable specifications imposed by the hardware, and thus all operations use 16-bit integer (fixed-point) and binary arithmetics (no multiplications) as described in the Difference Equations of NSAT Framework section. Algorithm 3 illustrates and summarizes the flow and the basic logic of the NSAT software implementation. 7 Algorithm 3 Algorithmic (software) NSAT implementation (see text for more details). Require: Synaptic Weights, Parameters, Learning Parameters Ensure: Spike events, States, Synaptic Weights for t ← 1 . . . tfinal do for all p in {Threads} do for all i in {Neurons} do spike list ← external events i Compute x [t] using equations (8) i if X ref ≠ 0 then i i x [t] ← Xref end if if Spike is Enabled then i i if x [t] ≥ θ then spike list → id ← i spike list → ts ← t i s [t] = 1 end if else if Adaptive θ is Enabled then i i if x0 [t] ≥ x1 [t] then spike list → id ← i spike list → ts ← t i s [t] = 1 end if end if i i Ξ[t] ⊗ W[t]) ⋅ si [t] x [t] ← x [t](Ξ i W[t] ← W[t] ⊗ G if Learning is Enabled then Compute equations (9) and (10) end if i if s [t] == 1 and Reset is Enabled then for all k in {State components} do i i xk [t] ← Xk ; end for end if end for end for end for Data structures Each thread is implemented as a large data structure that contains all the necessary data structures for implementing NSAT. The most significant data structure is the one that implements the neuron. Each neuron unit structure carries all the parameters necessary for integrating the neuron’s dynamics and performing learning (Fig. 3). We distinguish the neurons into two main categories, external neurons and internal (NSAT) neurons. External neurons have plastic (adjustable) post–synaptic weights and STDP counters, but no dynamics. Internal neuron dynamics follow Eq. (6). Every neuron consists of a synaptic tree implemented as a linked list containing all the post–synaptic weights and the id number of the post–synaptic neurons. Only internal neurons have access to the NSAT params structure and to the Learning params structure. In addition, a state data structure is added to the internal neurons for keeping track of the dynamics (state of the neuron). Every thread data structure has as members the neuron’s data structure (internal and external), the spike event lists, some temporary variables that are used for storing results regarding NSAT dynamics, variables 8 Figure 3: Schematic representation of NSAT data structures and information flow. The neuron structure is the main component of the NSAT software simulator. The neuron’s dynamics, learning and state parameters data structures are shown. Red and black arrows represent pointers and information flow, respectively. See the text for more information regarding the parameters and information flow. that gather statistics, monitor flags, filenames strings for on–line storing of spike events or other variables (such as neuron states and synaptic weights), and finally shared to neuron parameters such as number of neurons (internal and external) within a thread, and other parameters (see Parameters paragraph below). Random Number Generator The random number generator (RNG) is implemented in two different 2 ways. First, we used the PCG RNG library to implement a uniform random number generator with long period. Based on the PCG library we implemented a Box–Muller [13] transformation in order to acquire normal distributions for the additive noise of the NSAT framework. The second implementation is used for simulating hardware implementations of the NSAT framework. In order to reliably generate uniformly distributed random numbers in a hardware implementation, we used a linear feedback shift register (LFSR) in combination with a cellular automata shift register (CASR) [94]. Such types of RNGs are suitable for hardware devices and provide a quite robust and reliable random number generator. This implementation is used for bit accurate simulations of future NSAT hardware implementations. 2 http://www.pcg-random.org/ 9 Parameters NSAT framework parameters can be split into three main classes. The first one contains global parameters related to the entire simulation and the configuration of the NSAT framework. The second class includes parameters for neurons dynamics and for the learning process. Figure 3 shows the neuron’s and learning parameters (NSAT params and Learning params structures, respectively). The third class contains parameters local to each thread. Parameters of the first class are the number of simulation time steps (or ticks), the total number of threads, the seeds and the initial sequences for the random number generators, a flag (Boolean variable) that indicates which of the two random number generators is used, a learning flag (Boolean variable) that enables learning, and the synaptic strengths boundary control flag (Boolean variable) that enables a synaptic weight range check to more closely match hardware implementations. The second class of parameters, the neuron parameters (refer to NSAT params struct), includes the state transition matrix A, the constant current or bias b, and sA matrix which contains the signs of matrix A. σ is the variance for the additive normal distributed noise and p is the blank-out probability (corresponding to Ξ in Eq. (8)). In addition, it contains the spike threshold (θθ ), the reset value (Xr ), the upper (Xup ) and the lower boundaries (Xlow ) for each neural state component. The latter two constants define the range of permitted values for each state component. The spike increment value increases or decreases the after-spike state component value instead of resetting it. A Boolean parameter enables or disables the reset of a neuron. An optional parameter permits variable firing threshold, whereby component x1 is used as firing threshold for the neuron. An integer parameter defines which state component is assigned as plasticity modulator. Finally, another parameter sets the synaptic weights gains. The third group consists of learning parameters. Each neural state component has its own synaptic plasticity parameters (see Fig. 3), enabled by a single flag. The rest of the learning parameters define the STDP kernel function (K(⋅) in Eq. (9)). The STDP kernel function is either a piecewise linear function or a piecewise exponential one that can approximate the classical STDP exponential curve or other kernel functions. The approximation uses either three linear segments for which we define the length, the height (level) and the sign or three exponential-like segments for which we define the length, the height, the sign and the slope, thus we have eight parameters that define the kernel function (four for the causal part and four for the acausal one). Fig. 4(c) illustrates a realization of NSAT approximated STDP kernel function. tca (tac) controls the length (time dimension), hica (hiac) controls the amplitude (height), sica (siac) defines the sign for the causal (acausal) part, and slca (slac) characterizes the slope of the exponential approximation. On a given thread, different types of neurons and synapses can be defined by assigning them to separate parameter groups. Finally, the third parameter group concerns the core configuration. Each parameter group specifies the number of internal and external units within a thread, states configurations per thread and in addition some extra parameters for the use of temporary variables necessary in simulations. Python Interface In order to facilitate the use of the software simulator (and the hardware later on) we developed a high-level interface in Python. The Python Interface (pyNSAT from now on) is based on Numpy, Matplotlib, Scipy, pyNCS and Scikit-learn Python packages. The pyNCS [91] is used for generating spike trains, read and write data from/to files and it provides proper tools for data analysis and visualization of simulations results. Figure 5 illustrates an example of pyNSAT script simulating a neuron with four state components (xi , i = 0 . . . 3). The script mainly consists of five parts. First we instantiate the configuration class. This class contains all the necessary methods to configure the simulation architecture and define the global parameters for the simulation, such as the total number of threads (or cores) to be used, number of neurons per thread, number of state components per neuron per thread, number of input neurons per thread and the simulation time (in ticks), Fig. 5(a). NSAT model parameters such as the matrix A of the NSAT dynamics, the biases b and many other parameters regarding the dynamics of the neuron and the model are defined as shown in Fig. 5(b). The next step is to define the synaptic connectivity (the architecture of the network), Fig. 5(c). Fig. 5(d) illustrates how the pyNSAT writer class is invoked for writing all the binary files containing the 10 Figure 4: NSAT STDP learning rule. (a) A pre–synaptic neuron (black node) projects to three postsynaptic neurons (blue, magenta and cyan nodes). Three spikes are emitted by the post-synaptic neurons (corresponding colored arrows) and then a spike is fired by the pre–synaptic neuron. Then an acausal update takes place as the red shaded box indicates. Most recent post-synaptic spikes cause a causal update (black shaded boxes). (b) Temporal evolution of the post-synaptic weights. The acausal and causal updates are aligned with panel’s (a) spikes. (c) The STDP kernel function (linear and exponential approximations) used in this simulation (only the linear part). Black and red colors indicate the causal (positive) and the acausal (negative) parts of the STDP kernel function, respectively. Darker–colored lines illustrate the linear approximated STDP curves, and lighter–colored ones the exponential approximation (both types are supported by the NSAT framework). parameters that the C library will use to execute the simulation. Finally, we call the C NSAT library and execute the simulation (see Fig. 5(e)). The current example is a single neuron with adaptive threshold (more details regarding this neural model are given in Mihalas–Niebur Neuron paragraph in Results section). After simulating the model, we can visualize the results (see the right bottom panel in Fig. 5. The first row shows the membrane potential (state component x0 [t], blue line) of the neuron, the second row indicates the adaptive threshold (x1 [t], black line), and the third and fourth rows are two internal currents (x2 [t] and x3 [t], magenta and cyan colors), respectively. Simulation Details The software simulator uses a bit-accurate simulator implemented in the C Programming Language. All the source code used in this work are distributed under the GPL v3.0 License and are available on-line (https://github.com/nmi-lab-ucsd/HiAER-NSAT). All simulation parameters are provided in the source code accompanying this work and in the Supplementary Information. The Python interface for the NSAT framework has been written for Python 2.7. Results In this section we demonstrate NSAT capabilities by performing five different tasks. First, we show that NSAT supports a wide variety neural responses, such as tonic, bursting and phasing spiking. The second task is a simulation of Amari’s neural fields [3] in three different applications: stationary “bump” solutions, target selection and target tracking. Then, we illustrate three learning tasks using supervised and unsupervised learning. 11 Figure 5: PyNSAT Example. Source code snippets for creating a simple simulation of a single neuron with four state components (xi , i = 0, . . . , 3). The Python script (a) instantiates the main configuration class, (b) sets neural dynamics, (c) defines the architecture of the network (synaptic connections), (d) writes all the parameters files and finally (e) calls the C library for running the simulation. The results of the simulation can be easily visualized using Python’s packages. NSAT Neuron Dynamics Support a Wide Variety of Neural Responses The Mihalas–Niebur neuron (MNN) model [60] is a linear leaky integrate-and-fire neuron that is able to capture a wide spectrum of neural responses, such as tonic spiking, bursts of spikes, type I and type II spike responses. Here, we show that the NSAT neuron model can implement the MNN model and thus simulate a similar spectrum of neural responses. The MNN model consists of N + 2 equations, where the first two equations describe the membrane potential and an adaptive threshold, respectively. The remaining N equations define internal currents of the 12 neuron. The subthreshold dynamics of MNN neuron are given by, N 1 dV (t) = (I − g(V (t) − EL ) + ∑ Ij (t)), Cm e dt j=1 (11a) dΘ(t) = a(V (t) − EL ) − b(Θ(t) − Θ∞ ), dt dIj (t) = −kj Ij (t), j = 1, . . . , N, dt (11b) (11c) where V (t) is the membrane potential of the neuron, Θ(t) is the instantaneous threshold, Ij (t) is the j-th internal current of the neuron. Cm is the membrane capacitance, Ie is the external current applied on the neuron, g is a conductance constant, EL is a reversal potential. a and b are some constants, Θ∞ is the reversal threshold and kj is the conductance constant of the j–th internal current. The MNN neuron generates spikes when V (t) ≥ Θ(t) and updates neural state as follows: Ij (t) ← Rj × Ij (t) + Pj , (12a) V (t) ← Vr , (12b) Θ(t) ← max{Θr , Θ(t)}, (12c) where Rj and Pj are freely chosen constants, Vr and Θr are the reset values for the membrane potential and the adaptive threshold, respectively. We implement the MNN model using the NSAT framework and following the configuration provided in the original paper of MNN [60]. Therefore, we assume N = 2 (the number of the internal currents), which has been demonstrated to be sufficient for a wide variety of dynamics. We simulated the MNN in six different cases, tonic spiking, phasic spiking, mixed mode, class I and II, and tonic bursting. These six neural responses are important because (i) they are the most frequently used neural responses in the field of computational neuroscience and (ii) in the MNN original paper [59] all the 20 different neural behaviors reduce to three different classes in terms of implementation. Our results produce very similar responses compared to the original MNN ones [60]. Fig. 6 illustrates the results of all these six simulations. The black lines show the membrane potential of the neuron (V (t)), the red dashed lines indicate the adaptive threshold (Θ(t)), and the vertical blue line segments show the spike trains for each simulation. Some of the simpler neural responses and behaviors provided by Mihalas and Niebur can be achieved by NSAT in a simpler way. For instance, a linear integrator can be implemented in the NSAT by just solving the equation n x0 [t + 1] = x0 [t] + (x0 [t] + ∑j=1 wij sj [t]), where the sum reflects the synaptic input to the neuron. Amari’s Neural Fields Neural fields are integro-differential equations usually modeling spatiotemporal dynamics of a cortical sheet, firstly introduced by Shun’ichi Amari in 1977 in his seminal paper [3]. Neural fields have a rich repertoire of dynamics (waves, breathers, stationary solutions [14, 21], winner-take-all) and are thus key components of neural computational models. The original Amari’s neural field equation is given by: τ ∂u(r, t) ′ ′ ′ = −u(r, t) + ∫ w(∣r − r ∣)f (u(r , t))dr + Iext + h, ∂t Ω (13) where u(r, t) is the average neural activity at position r and at time t of a neural population, τ is a time ′ constant, w(∣r − r ∣) is a connectivity function (usually it is a difference of Gaussian functions or a difference ′ of exponential functions) that defines the connectivity strength between neurons at positions r and r . Iext is an external input that is applied on the neural field (subcortical inputs for instance) and h is the resting potential of the neural population. The function f (r) is the activation or transfer function of the system and in Amari’s case is a Heaviside function: f (r) = { 1, 0, if x > 0 otherwise. (14) 13 Figure 6: NSAT Mihalas-Niebur Simulation. Results from an NSAT simulation of MNN model. (a) Tonic spiking, (b) mixed mode, (c) class I neuron, (d) class II neuron, (e) phasic spiking, and (f) tonic burst. Black and red lines indicate the membrane potential (state x0 (t)) and the adaptive threshold (state x1 (t)), respectively. Blue vertical line segments represent spike events. In order to numerically solve Eq. (13), we temporally discretize it using the Forward Euler method and thus we have, k dt ext ui [t + 1] = ui [t] + τ ( − ui [t] + Ii + hi + dx ∑ wij f (uj [t])), (15) j=1 where i is the spatial discrete node (unit or neuron), dt is the Euler’s method time step and dx is the spatial discretization step. The kernel function in this case is a Difference of Gaussians (DoG, see Fig. 7(a)), 2 w(r) = Ke exp ( − 2 r r ) − Ki exp ( − 2 ), 2 2σe 2σi (16) where Ke , Ki and σe , σi are the excitatory and inhibitory amplitudes and variances, respectively. As input to the neural field we use a Gaussian function with variance of 0.3 (black dashed line in Fig. 7(a)). At the end of the simulation the neural field has converged to its stable solution which is a “bump”, as expected with a DoG kernel function (Fig. 7(a), red line). Figure 7(b) depicts the temporal evolution of numerical integration of Eq. (13) using the following parameters: Ke = 1.5 Ki = 0.75, σe = 0.1 and σi = 1.0. The integral is defined in Ω = [0, 1] and we simulate for 50 seconds. After about 7 seconds (200 simulation steps) the numerical solution converges to a fixed point (see Amari’s seminal work [3] for more details and a more mathematical description regarding the existence of such “bump” solutions). Here, we show the implementation of neural fields in the NSAT framework. First, we observe that the dynamics of each i unit in Eq. (15) is a leaky integrate-and-fire neuron if we consider f (r) as a pre–synaptic spike–event indicator function. Taking into account that the transfer function f (r) is a Heaviside, we can then model every unit i as a leaky integrate–and–fire neuron. This implies that the first state component of neuron i reflects the i–th neural field unit, and the rest of the neuron’s state components remain idle. This methodology has been previously used to implement spiking neural fields [17, 97, 23]. r + 0.5⌋ (see Fig. 8(a)). Neural We quantize kernel function w(r) using a uniform quantizer Q(r) = ∆ ⋅ ⌊ ∆ resetting is disabled to match the neural fields behavior (described by Eq. (13) and Eq. (15)): Neurons fire when they reach the firing threshold, but their states are not reset after spiking. 14 Figure 7: Amari’s Neural Field of Infinite Precision. A numerical simulation of Eq. (15). In (a) Blue and ∗ ∗ red solid lines indicate the lateral connectivity kernel (w(r)) and a solution u(r, t ) for a fixed time step t , respectively. The black dashed line displays the input Iext to the neural field Eq. (15). In (b) is illustrated the temporal numerical evolution of Eq. (15) for every spatial unit i. It is apparent that after about 7 seconds the system has reached its equilibrium point. Figure 8: Neural Field Implementation. Three different neural field models were simulated in NSAT. Three different lateral connectivity kernels (w(r)) are illustrated in (a). Blue, green and red lines correspond to stationary solution, action–selection and tracking neural field models, respectively. The first neural field model generates a stationary (or “bump”) solution (b), a tracking neural field model follows a moving target on the vertical axis (y) as (d) illustrates. Finally the action–selection model selects one out of two input stimuli (c), red lines indicate the firing rate of the two stimuli. In panels (c) and (d), the purple colormap indicates the neural activity (white–no activity, purple–high activity). We test the NSAT neural fields implementation on three different tasks. The first model expresses a sustained activity or stationary “bump” solution [20, 14]. We simulate 100 internal neurons, all-to-all connected and 100 external neurons (no dynamics) connected with internal neurons in a one-to-one relation. The external neurons transmit spikes generated by a Poisson distribution with maximum firing rate 35 Hz for neurons indexed from i = 40 to i = 60 and 10 Hz for the rest of the neurons. The total duration of the input signal injection is 400 simulation ticks and the total simulation time is 2500 ticks. Thus we create an input similar to the Gaussian function used in the continuous case (see Fig. 7). Figure 8(a) shows the quantized 15 kernel wij (blue line) and Fig. 8(b) indicates the spatial solution of the neural field implementation at the equilibrium point. The solution obtained with the NSAT neural field implementation in Fig. 8(b) is similar to the one in Fig. 7(a) (red line, Amari’s neural field “bump” solution). The second task involves target tracking. Asymmetric neural fields have been used for solving target tracking[15]. We use the same number of neurons (internal and external) and the same simulation time as above, and modify the kernel to an asymmetric one as Fig 8(a) indicates (red line). The stimulus consists in Poisson-distributed spike trains that are displaced along the y–axis every 500 ticks. Figure 8(c) illustrates the NSAT neural field to track the moving target. In this case, a small fraction of neurons receive Poisson– distributed spike trains at a firing rate of 50 Hz, while the rest of the neurons do not receive any kind of input. Finally, we implemented an action–selection and attention model in neural fields [99]. In this case we use the same architecture as in the previous task. The difference is that now we have changed the kernel function and the input. The modified kernel function has weaker excitatory component as Fig. 8(a) shows (green line). The input consists in spike trains drawn from a Poisson distribution with two localized high firing rates regions (50 Hz, neurons indexed from i = 20 to i = 40 and from i = 70 to i = 90) for 500 simulation ticks (all the other internal units receive no input). Figure 8(d) shows activity when we apply the input stimulus for 500 simulation ticks. The neural field selects almost immediately one of the two stimuli and remains there during the entire simulation (even after the stimuli removal). We have shown how NSAT can simulate firing rate models [31] and particularly neural fields [3, 14]. NSAT can thus contribute a generic framework for neuromorphic implementations of neural fields [81] and potentially enhance them with learning features, as described in the following results. Supervised Event-based Deep Learning Deep neural networks, and especially their convolutional and recurrent counterparts constitute the state-ofthe-art of a wide variety of applications, and therefore a natural candidate for implementation in NSAT. The workhorse of deep learning, the gradient descent Back Propagation (BP) rule, commonly relies on highprecision computations and the availability of symmetric weights for the backward pass. As a result, its direct implementation on a neuromorphic substrate is challenging and thus not directly compatible with NSAT. Recent work demonstrated an event-driven Random Back Propagation (eRBP) rule that uses a random error-modulated synaptic plasticity for learning deep representations. eRBP builds on the recent advances in approximate forms of the gradient BP rule [49, 50, 51, 9] for event-based deep learning that is compatible with neuromorphic substrates, and achieves nearly identical classification accuracies compared to artificial neural network simulations on GPUs [70]. We use a two-layer network in NSAT for eRBP equipped with stochastic synapses, and applied to learning classification in the MNIST dataset. The network of two feed-forward layers (Fig. 9) with Nd “data” neurons, Nh hidden neurons and Np prediction (output) neurons. The class prediction neuron and label inputs which project to the error neurons with opposing sign weights. The feedback from the error population is fed back directly to the hidden layers’ neurons through random connections. The network is composed of three types of neurons: hidden, prediction and error neurons. The dynamics of a hidden neuron follow integrate-and-fire neuron dynamics: τsyn d h h V = −V + ∑ ξ(t)wk sk (t) dt k d h h E E+ E− τm m = −m + ∑ gk (sk (t) − sk (t)) dt (17) k h if V (t) > VT then h Vi ← 0 during refractory period τref r . where sk (t) are the spike trains produced by the previous layer neurons, and ξ is a stochastic Bernouilli process with probability (1−p) (indices i, j are omitted for clarity). Each neuron is equipped with a plasticity h modulation compartment m following similar subthreshold dynamics as the membrane potential and where 16 s (t) is the spike train of the error-coding neurons and gj is a fixed random vector drawn independently for each hidden neuron. The modulation compartment is not directly coupled to the membrane potential h E V , but indirectly through the learning dynamics. For every hidden neuron i, ∑j wij = 0, ensuring that the spontaneous firing rate of the error-coding neurons does not bias the learning. The synaptic weight dynamics follow an error-modulated and membrane-gated rule: E E d h h h w ∝ m Θ(V )sj (t). dt j (18) where Θ is a boxcar function with boundaries bmin and bmax and the proportionality factor is the learning rate. Weight values were clipped to the range [−128, 127] (8 bits). To mitigate the adverse effect of low– precision weights in gradient descent learning, we used randomized rounding where the first r = 6 bits of ∆w were interpreted as probability. Prediction neurons and associated synaptic weight updates follow the same dynamics as the hidden neurons except for the modulation, where one-to-one connections with the error neurons are formed (rather than random connections). Error is encoded using two neurons, one encoding positive error E+, the other encoding negative error E−. The positive error neuron dynamics are: d E+ L L+ P = w (si (t) − si (t)) V dt i E+ E E+ E+ E if V > VT then V ←V − VT , (19) where si (t) and si (t) are spike trains from the prediction neurons and labels. The membrane potential is lower bounded to 0 to prevent negative activity to accumulate across trials. Each error neuron has one L negative counterpart neuron. Negative error neurons follow the exact same dynamics with w of opposite sign. The firing rate of the error-coding neurons is proportional to a linear rectification of the inputs. For −1 simplicity, the label spike train is regular with firing rate equal to τref r . When the prediction neurons classify P L correctly, (si (t) − si (t)) ≅ 0, such that the error neurons remain silent. Input spike trains were generated as Poisson spike trains with rate proportional to the intesenity of the pixel. Label spikes were regular, i.e. spikes were spaced regularly with inter–spike interval equal to the refractory period. All states were stored in 16 bit fixed point precision (ranging from −32768 to 32767), except for synaptic weights which were stored with 8 bit precision (ranging from −128 to 127). To prevent the network from learning (spurious) transitions between digits, the synaptic weights did not update in the first 400 ticks of each digit presentation (1500 ticks). We trained fully connected feed-forward networks MNIST hand-written digits, separated in three groups, training, validation, and testing (50000, 10000, 10000 samples respectively). During a training epoch, each of the training digits were presented in sequence during 150ms (Fig. 9). Although experiments here focused on a single layer network, random back–propagation can be extended to networks with several layers, including convolutional and pooling layers [9]. Consistent with previous findings, simulations of eRBP on NSAT in a quantized 784-100-10 network show that eRBP still performs reasonably well under these conditions. To highlight the potential benefits of the NSAT, we compare the number of synaptic operations (SynOp) necessary to reach a given classification accuracy (Fig. 9(c)) to the number of multiply operations in standard artificial neural networks. Although larger networks trained with eRBP were reported to achieve error rates as low as 2.02% [67], this NSAT network with 100 hidden units converges to around 4% error. As two meaningful comparisons, we used one artificial neural network with the same number of hidden units (100) and one with 30 hidden units. The latter network was chosen to achieve similar peak accuracies as the simulated NSAT network. The artificial neural network was trained using mini–batches and exact gradient back–propagation using TensorFlow (GPU backend). As previously reported, up moderate classification accuracies (here 4%), the NSAT requires an equal or fewer number of SynOps compared to MACs to reach a given accuracy for both networks. We note here that only multiply operations in the matrix multiplications were taken into account in the artificial network. Other operations such as additions, non–linearities were ignored, which would further favor NSAT P L 17 Figure 9: Training an MNIST network with event-driven Random Back–propagation compared to GPU simulations (a-b) MNIST Classification error on the test set using a fully connected 784-100-10 network on NSAT (8 bit fixed–point weights, 16 bits state components) and on GPU (TensorFlow, floating–point 32 bits). (c) Energy efficiency of learning in the NSAT (lower left is best). The number of operations necessary to reach a given accuracy is lower or equal in the spiking neural network (NSAT–SynOps) compared to the artificial neural network (GPU–MACs) for classification errors at or above 4% (d) Histogram of synaptic weights of the NSAT network after training. One epoch equals a full presentation of the training set. in this comparison. The smaller or equal number of operations, compounded with the fact that a SynOp requires many fold less energy [58] makes a very strong argument for NSAT in terms of energy efficiency for low to moderate accuracies. In summary, a standard computer (e.g. GPU) is the architecture of choice if classification accuracy on a stationary dataset is the target, regardless of energy efficiency. However, if real–time learning is necessary, or if the streaming data is non-stationary, our results suggest that NSAT can outperform standard architectures in terms of energy efficiency at least by a factor equal to the achieved J/MAC to J/SynOp ratio. Unsupervised Representation Learning Synaptic Sampling Machines (S2M) are a class of neural network models that use synaptic stochasticity as a means to Monte Carlo sampling in Boltzmann machines [69]. Learning is achieved through event–driven Contrastive Divergence (eCD), a modulated STDP rule and event–based equivalent of the original Contrastive Divergence rule [44]. Unsupervised learning in RBMs and S2Ms are useful for learning representations of unlabeled data, and perform approximate probabilistic inference [44, 66, 69]. The NSAT synaptic plasticity dynamics are compatible with eCD under the condition that the refractory period is larger than the STDP learning window in order to maintain weight symmetry. Here, we demonstrate on-line unsupervised learning implementing S2Ms in NSAT using the network architecture depicted in Fig. 10(a). First we use two types of input neurons, excitatory and inhibitory (red and blue nodes in Fig. 10(a), respectively). These are the external units that provide the inputs to the event-based Restricted Boltzmann Machine (eRBM) visible units and their synaptic strengths are constant during learning. The visible units (see Fig. 10(a)) are all–to–all connected with the hidden ones. Two modulatory units, one excitatory and one inhibitory, are connected with the visible and hidden units (black and gray nodes in Fig. 10(a)). The two modulatory units are active in an alternating way, providing an implementation for the positive (only the excitatory unit is on) and the negative (only the inhibitory unit is active) phases of the Contrastive Divergence rule. In the S2M, weight updates are carried out even if a spike is dropped at the synapse. This speeds up learning without adversely affecting the entire learning process because spikes dropped at the synapses are valid samples in the sense of the sampling process. During the data phase, the visible units were driven with −5 constant currents equal to the logit of the pixel intensity (bounded to the range [10 , 0.98] in order to avoid infinitely large currents), plus a white noise process of low amplitude σ to simulate sensor noise. We run the eRBM with eCD using single precision arithmetic (eRBMhp–integers of 16 and eRBM–8 18 Figure 10: Event–based Restricted Boltzmann Machine (eRBM). (a) Event–based RBM neural network architecture. One excitatory and one inhibitory unit project on the visible units providing the input to the eRBM. Two modulatory units project to all the visible and hidden units. (b) Training error over 300 epochs for the eRBMhp (single precision, green triangles), eRBM (low precision, discs) and the classic RBM (blue crosses). The orange solid line indicates the minimum acceptable error for all three different algorithms. (c) Number of operations versus test error for the eRBMhp (single precision, green triangles, number of synaptic operations), eRBM (low precision, discs, number of synaptic operations) and the classic RBM (blue crosses, MACs). The orange dashed line indicates the minimum acceptable error for all three different implementations. (d) Receptive fields (synaptic weights from visible to hidden units) of the RBM (double precision, 64 bit), (e) eRBM (single precision, 32 bit), and (f) eRBM (low precision, 8 bit). bits), as well as a classical RBM with batch size 32 samples as a reference, on the bars and stripes data set [53]. Previous work has shown shown that, when pre–synaptic and post–synaptic neurons firing follow Poisson statistics, eCD is equivalent to CD [66]. We trained eRBM and eRBMhp using 32 samples per epoch and for 50 epochs. the RBM was trained using 1 batch of 32 samples and 3000 epochs (until it reaches a similar error as the eRBM and eRBMhp did). At every epoch of the eRBM and the eRBMhp learning we run a test on all 32 different samples and we measure the classification error (how many missed classifications). For the RBM we run a test every 50 epochs. Figure 10(b) shows the test set error against the training epochs. The eRBM (black discs) and eRBMhp (green triangles) approach the performance of the classical RBM (blue crosses) faster. Figure 10(c) shows the test set error against the number of operations required for each of the implementations to reach the minimum acceptable error (orange solid line). Similarly to the supervised learning case, eRBM (black discs) and eRBMhp (green triangles) perform less or the same number of operations (synaptic operations) with the classical RBM (MACs). The three panels Fig. 10(d), (e) and (f) illustrate the synaptic weights (receptive fields) of hidden units for the RBM, eRBM and eRBMhp, respectively. For all three implementations we used 100 hidden units and 18 visible ones. It is apparent that the receptive fields are qualitatively similar among the three different implementations (for illustration purposes we show only 64 out of 100 receptive fields). The similarity of this S2M implementation with previous ones and the RBM suggest that NSAT is capable of unsupervised learning for representation learning and approximate probabilistic inference at SynOp – MAC parity. 19 Unsupervised Learning in Spike Trains So far, the results have mostly focused on static data encoded in the firing rates of the neurons. The NSAT learning rule is capable of learning to recognize patterns of spikes. Here we demonstrate a recently proposed post-synaptic membrane potential dependent plasticity rule [86] for spike train learning. Unlike STDP, where synaptic weights updates are computed based on spike timing of both pre– and post–synaptic neurons, this rule triggers a weight update only on pre–synaptic spiking activity. The neuron and synapse dynamics are governed by the following equations. N τm τCa dV = −V + ∑ wj sj (t), dt j=1 (20a) dCai γ = −Ca + w s(t), dt (20b) where V is the membrane potential and Ca is the calcium concentration, wj is synaptic weight, γ the constant increment of the calcium concentration, and sj (t), s(t) are the pre–synaptic and post–synaptic spike trains. The synaptic weight update dynamics are given by the equations below: Θm = δ(V (t) > Vlth )η+ − δ(V (t) < Vlth )η− ¯ − Ca), mod = Θ − ηh (Ca (21b) ∆wj = mod sj (t), (21c) (21a) Vlth is the membrane threshold that determines LTP or LTD, η+ = 8 and η− = −2 the corresponding ¯ is a constant denoting the steady-state calcium concentration and ηh magnitudes of LTP and LTD, Ca magnitude of homeostasis. These equations can be efficiently translated to the NSAT using four (4) components per neuron state. Hence component x0 is the membrane potential Vmem , x1 the calcium concentration Cai , x2 the LTP/LTD state based on thresholded membrane component x0 , and x3 represents the weight modulation (value by which a weight will be updated). The first two state components follow exponential decay dynamics. State components x2 and x3 are used to compute the effective weight updates based on the current value of membrane potential and calcium concentration. This is done by exploiting the fact that, at any given point in time, the weight update magnitude (if any) is given purely by the post synaptic states and is the same for every incoming spike within one time step. We demonstrate these dynamics in learning to identify a hidden spike pattern embedded in noisy spike train. We use 100 input neurons projecting to 5 neurons. A randomly generated fixed spike pattern is repeatedly presented, interspersed with random spike patterns of the same firing rate as Fig. 11(a) top raster plot indicates. The initial weights were randomly initialized from a uniform distribution. Over time the synaptic weights converge such that the post–synaptic neurons (indexed 1–5, black line segments in the bottom raster plot of Fig. 11(a)) selectively spike only on presentation of the spike pattern as Fig. 11(a) bottom raster plot illustrates. The temporal evolution of four components dynamics of the second neuron’s state are given in Fig. 11(c)–(f). This particular learning rule is suitable for hardware implementation as it has been already shown [86] and it accounts for unsupervised temporal learning. Here, we have shown how the NSAT framework can implement such an algorithm and individual neurons learn in an unsupervised way to detect spatiotemporal spike patterns. Discussion We introduced a neuromorphic computing platform and framework, called Neural and Synaptic Array Transceiver (NSAT), that is able to provide flexible and dynamic learning (on-line) well suited for efficient digital implementation. The NSAT is based on a linear integrate-and-fire neuron model with multiple 20 Figure 11: Unsupervised Learning of Spike Patterns. (a) On top is a raster plot of 100 input spike trains (pre-synaptic neurons) projecting to 5 post-synaptic neurons. The main goal here is the post-synaptic neurons to learn a hidden spike pattern indicating by the blue vertical bars. The bottom raster plot shows 5 postsynaptic neurons firing when they have learned the hidden spatiotemporal spike pattern. (b) Indicates the + membrane potential (Vm [t]) of the second post-synaptic neuron, (c) its calcium concentration ([Ca ][t]), (d) LTP/LTD state based on thresholded membrane potential, and (e) its weight modulation over time. neural states components rendering it flexible in many aspects. As with existing neuromorphic systems, only (digital) spike events are communicated across cores and between cores using an event-based routing system. For reasons related to efficiency in projected digital hardware implementations, the proposed framework operates using fixed–point representation. In addition, all the multiplications are implemented as bit shift operations, i.e multiplications by powers of two. These operations are many-fold more power-efficient compared to floating-point multiply accumulates implemented in digital CMOS [45]. In this work, we demonstrated the capabilities of NSAT by showing first that neuron models with rich behavior such as the Mihalas-Niebur neuron [60] can be implemented, with comparable spiking dynamics [60]. Next, we demonstrated the simulation of neural field models [3, 14, 21]. We demonstrated three core neural field behaviors, (i) a stationary “bump” solution (winner-take-all, working memory), (ii) an actionselection process where the neural field chooses between two input signals, and (iii) a target tracking task, where the neural field tracks a moving target. These neural field behaviors form the backbone of many computational models using neural field, such as movement [30], pattern generation [84], soft state machines [65] and navigation [61]. NSAT is capable of on-line, event-based learning in supervised and unsupervised settings. The implementation of these learning algorithms is a significant achievement, as most machine learning algorithms rely on network-wide information and batch learning. In contrast to machine learning algorithms implemented in standard computers, the NSAT learning is based on information that is locally available at the neuron, i.e. 1) neurons only read weights on their own synapses, 2) they communicate through all-or-none events (spikes), and 3) their elementary operations are limited to highly efficient multi–compartment integrate–and–fire. Such implementations can be more scalable compared to their Von Neumann counterparts since the access 21 to system-wide information funnels through the von Neumann bottleneck, which dictates the fundamental limits of the computing substrate. Learning is achieved using three-factor, spike-driven learning rules, i.e. where the third factor modulates the plasticity, in addition to a programmable STDP-like learning rule [72]. In the NSAT, the third, modulating factor is one of the state components of the neuron. The use of a neural state component as a third factor is justified by the fact that gradient descent learning rules in spiking neurons often mirror the dynamics of the neurons and synapses [74, 103], while being addressable by other neurons in the network for error-driven or reward-driven learning. Three factor rules are thus highly flexible and can support multiple different learning rules on a single neuron, thereby enabling the same neuron model to be programmed for supervised, unsupervised and reinforcement learning. Building on previous work, we demonstrated three specific algorithms: 1) event-based deep learning using and event-based Random Back-propagation algorithm for supervised settings, a Contrastive-Divergence algorithm used to train a Restricted Boltzmann Machine implemented on NSAT for unsupervised settings and a Voltage-based learning rule for spike-based sequence learning. Embedded learning algorithms are necessary components for real-time (on-chip) learning, which can confer adaptability in uncontrolled environments and more fine-grained context awareness in behaving cognitive agents. This makes NSAT suitable for environments where data are not available a priori but are instead streamed in real–time to the device, i.e. using event-based sensors [52]. The NSAT computes with limited numerical precision of neural network states parameters. Often, artificial neural networks require higher precision parameters to average out noise and ambiguities in real-world data (e.g. stochastic gradient descent) [22, 93], and introduce challenges at all levels of implementation [7, 46]. The NSAT framework mitigates the effect of low precision using a discretized version of randomized rounding [63], where a programmable number of bits are interpreted as update probability. The randomized rounding has been demonstrated in the event-based random back propagation algorithm [70], a model that is sensitive to weight precision. We find that the networks perform quite well even when the synaptic weights are bounded to 256 levels (8 bits precision). Under the selected specification, large-scale hardware implementation of NSAT is well within reach of current memory technology and can guide (and benefit from) the development of emerging memory technologies [78, 32, 62, 64]. While we cannot provide direct energy comparisons at this stage, our results consistently highlight a SynOp to MAC parity in learning tasks, i.e. the number of operations required to reach a given proficiency. The significance of this parity is that the SynOp requires manyfold less energy in reported large-scale neuromorphic implementations [58] compared to equivalent algorithms implemented on standard computers and GPUs. Thus, learning in NSAT is potentially more power efficient compared to standard architectures by a factor at least equal to the ratio J/MAC to J/SynOp, while achieving comparable accuracies. Relation to State-of-the-Art and Other Research Several research groups investigated brain-inspired computing as an alternative to non-von Neumann computing and as a tool for understanding the mechanisms by which the brain computes. IBM’s TrueNorth delivered impressive machine learning implementations in terms of power [33]. TrueNorth’s domain of application is limited to off-line learning, partly to be able to meet targeted design specifications, and partly due to the lack of suitable learning algorithms. Possibly due to similar reasons, TrueNorth is also limited in the scope of its temporal dynamics, which constrains it in large part to feed–forward networks (but see [26]). On-chip spike-driven, bistable learning rules were successfully demonstrated in mixed signal neuromorphic hardware [18, 77]. Also, significant effort has gone into learning in digital systems [98]: Earlier prototypes of IBM’s TrueNorth [85] also demonstrated the feasibility of low-power embedded learning using STDP, and evolutionary algorithms were recently applied to FPGA-based spiking neural networks [24]. Stanford’s Neurogrid team was among the first to demonstrate STDP learning in mixed-signal neuromorphic hardware [6]. Other related neuromorphic projects on learning with neuromorphic hardware are the SpiNNaker [36] and BrainScales [82], as part of the Human Brain Project. SpiNNaker is a parallel multi-core computer 22 architecture composed of half million ARM968 processors (each core is capable of simulating 1, 000 neurons) providing a massive implementation of spiking neural networks. The BrainScales project and their subsequent developments are based on an analog neuromorphic chip, with its main functional blocks consisting of timeaccelerated leaky integrate–and–fire neurons [1]. There, the proposed learning rule is a hybrid implementation using an on-chip SIMD processor programmable with a range of modulated STDP rules [35]. Both projects are targeted to accelerating simulations of biological neural networks, using technologies that favor speed over compactness and/or power. In contrast, the NSAT design favors compactness and power over speed, and targets application-oriented, flexible, ultra low-power neural and synaptic dynamics for real-time learning tasks. From the design perspective, the NSAT framework is closest to the TrueNorth ecosystem, but adds on-line learning capabilities and inference dynamics that are compatible with some existing event-based learning dynamics. For instance, NSAT allows for programmable weights and stochastic synapses, a combination that has been shown to be extremely successful in both unsupervised and supervised learning settings. We believe that the algorithmic-driven design of the NSAT framework, combined with the provided opensource implementation will engage the research community to further investigate brain-inspired, event-based machine learning algorithms. NSAT Software Developments The software stack is a critical component to interface between the majority of potential end-users and the NSAT framework. Our software development efforts are targeted to providing a general purpose framework for Computational Neuroscience and Machine Learning applications that combines the power of machine 3 learning frameworks (such as TensorFlow [2], Neon ) and neuromorphic hardware network description (e.g. pyNCS [90], TrueNorth Corelet [4]). To this end, we are expanding the software for automatic network generation in deep neural network-like scenarios (e.g. automatic differentiation). Such a software stack will enable end users to simulate neural networks (artificial, spiking or compartmental and even firing rate models) without knowledge of NSAT’s technical details. In this article, we briefly introduced PyNSAT, an interface for our NSAT software implementation that can serve as an Application Programming Interface (API) for the NSAT framework. PyNSAT offers a rapid way to program and use the NSAT framework through the Python environment, thereby leveraging the wide capabilities of Python’s application ecosystem. Current developments of pyNSAT are targeting proofof-concept approaches for network synthesis in machine learning applications, in-line with existing machine learning libraries such as Keras (Tensorflow) or Neon. References [1] Syed Ahmed Aamir, Paul Müller, Andreas Hartel, Johannes Schemmel, and Karlheinz Meier. A highly tunable 65-nm cmos lif neuron for a large scale neuromorphic system. In European Solid-State Circuits Conference, ESSCIRC Conference 2016: 42nd, pages 71–74. IEEE, 2016. [2] Martı́n Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for large-scale machine learning. In Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI). Savannah, Georgia, USA, 2016. [3] Shun-ichi Amari. Dynamics of pattern formation in lateral-inhibition type neural fields. Biological cybernetics, 27(2):77–87, 1977. [4] Arnon Amir, Pallab Datta, William P Risk, Andrew S Cassidy, Jeffrey A Kusnitz, Steve K Esser, Alexander Andreopoulos, Theodore M Wong, Myron Flickner, Rodrigo Alvarez-Icaza, et al. Cognitive 3 https://neon.nervanasys.com/index.html/ 23 computing programming paradigm: a corelet language for composing networks of neurosynaptic cores. In Neural Networks (IJCNN), The 2013 International Joint Conference on, pages 1–10. IEEE, 2013. [5] L. A. Anderson, G. B. Christianson, and J. F. Linden. Stimulus-specific adaptation occurs in the auditory thalamus. Journal of Neuroscience, 29:7359–7363, 2009. [6] J. Arthur and K. Boahen. Learning in silicon: Timing is everything. In Y. Weiss, B. Schölkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18. MIT Press, Cambridge, MA, USA, 2006. [7] R.M. Azghadi, N. Iannella, S.F. Al-Sarawi, G. Indiveri, and D. Abbott. Spike-based synaptic plasticity in silicon: design, implementation, application, and challenges. Proceedings of the IEEE, 102(5):717– 737, 2014. [8] John Backus. Can programming be liberated from the von neumann style?: a functional style and its algebra of programs. Communications of the ACM, 21(8):613–641, 1978. [9] P. Baldi, P. Sadowski, and Zhiqin Lu. Learning in the machine: Random backpropagation and the learning channel. arXiv preprint arXiv:1612.02734, 2016. [10] P. Baldi and P. J Sadowski. Understanding dropout. In Advances in Neural Information Processing Systems, pages 2814–2822, 2013. [11] Ben Varkey Benjamin, Peiran Gao, Emmett McQuinn, Swadesh Choudhary, Anand R Chandrasekaran, Jean-Marie Bussat, Rodrigo Alvarez-Icaza, John V Arthur, Paul A Merolla, and Kwabena Boahen. Neurogrid: A mixed-analog-digital multichip system for large-scale neural simulations. Proceedings of the IEEE, 102(5):699–716, 2014. [12] Guo-qiang Bi and Mu-ming Poo. Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type. The Journal of neuroscience, 18(24):10464–10472, 1998. [13] George EP Box, Mervin E Muller, et al. A note on the generation of random normal deviates. The annals of mathematical statistics, 29(2):610–611, 1958. [14] Paul C Bressloff. Spatiotemporal dynamics of continuum neural fields. Journal of Physics A: Mathematical and Theoretical, 45(3):033001, 2011. [15] Mauricio Cerda and Bernard Girau. Asymmetry in neural fields: a spatiotemporal encoding mechanism. Biological cybernetics, 107(2):161–178, 2013. [16] Zetao Chen, Obadiah Lam, Adam Jacobson, and Michael Milford. Convolutional neural network-based place recognition. arXiv preprint arXiv:1411.1509, 2014. [17] Sylvain Chevallier and Philippe Tarroux. Visual focus with spiking neurons. In European Symposium on Artificial Neural Networks, pages 385–389. d-side, 2008. [18] E. Chicca, M. Nawrot, and M. Schmuker. Neuromorphic sensors, olfaction. Encyclopedia of Computational Neuroscience, 2014. [19] Claudia Clopath, Lars Büsing, Eleni Vasilaki, and Wulfram Gerstner. Connectivity reflects coding: a model of voltage-based stdp with homeostasis. Nature neuroscience, 13(3):344–352, 2010. [20] Stephen Coombes. Waves, bumps, and patterns in neural field theories. Biological cybernetics, 93(2):91– 108, 2005. [21] Stephen Coombes, Peter beim Graben, Roland Potthast, and James Wright. Neural Fields. Springer, 2014. 24 [22] Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Low precision arithmetic for deep learning. arXiv preprint arXiv:1412.7024, 2014. [23] Benoı̂t Chappet de Vangel, Cesar Torres-Huitzil, and Bernard Girau. Stochastic and asynchronous spiking dynamic neural fields. In Neural Networks (IJCNN), 2015 International Joint Conference on, pages 1–8. IEEE, 2015. [24] Mark E Dean, Catherine D Schuman, and J Douglas Birdwell. Dynamic adaptive neural network array. In International Conference on Unconventional Computation and Natural Computation, pages 129–141. Springer, 2014. [25] S.R. Deiss, R.J. Douglas, and A.M. Whatley. A pulse-coded communications infrastructure for neuromorphic systems. In W. Maass and C.M. Bishop, editors, Pulsed Neural Networks, chapter 6, pages 157–78. MIT Press, 1998. [26] Peter U Diehl, Guido Zarrella, Andrew Cassidy, Bruno Pedroni, and Emre Neftci. Conversion of artificial recurrent neural networks to spiking neural networks for low-power neuromorphic hardware. In International Conference on Rebooting Computation (ICRC), 2016, Oct 2016. (accepted at ICRC 2016). [27] Kenji Doya. What are the computations of the cerebellum, the basal ganglia and the cerebral cortex? Neural networks, 12(7):961–974, 1999. [28] S Dreyfus. The computational solution of optimal control problems with time lag. IEEE Transactions on Automatic Control, 18(4):383–385, 1973. [29] C. Eliasmith, T.C. Stewart, X. Choo, T. Bekolay, T. DeWolf, Y. Tang, and D. Rasmussen. A large-scale model of the functioning brain. Science, 338(6111):1202–1205, 2012. [30] W. Erlhagen and G. Schöner. Dynamic field theory of movement preparation. Psychological Review, 109:545–572, 2002. [31] G Bard Ermentrout and David H Terman. Firing rate models. In Mathematical Foundations of Neuroscience, pages 331–367. Springer, 2010. [32] Sukru Burc Eryilmaz, Siddharth Joshi, Emre Neftci, Weier Wan, Gert Cauwenberghs, and H-S Philip Wong. Neuromorphic architectures with electronic synapses. 2016. (Accepted). [33] S.K. Esser, R. Appuswamy, P. Merolla, J.V. Arthur, and D.S. Modha. Backpropagation for energyefficient neuromorphic computing. In Advances in Neural Information Processing Systems, pages 1117– 1125, 2015. [34] 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, et al. Convolutional networks for fast, energy-efficient neuromorphic computing. PNAS, 113:11441–11446, 2016. [35] Simon Friedmann, Johannes Schemmel, Andreas Grübl, Andreas Hartel, Matthias Hock, and Karlheinz Meier. Demonstrating hybrid learning in a flexible neuromorphic hardware system. IEEE transactions on biomedical circuits and systems, 11(1):128–142, 2017. [36] Steve B Furber, Francesco Galluppi, Sally Temple, Luis Plana, et al. The spinnaker project. Proceedings of the IEEE, 102(5):652–665, 2014. [37] Steve B Furber, Francesco Galluppi, Steve Temple, and Luis A Plana. The spinnaker project. Proceedings of the IEEE, 102(5):652–665, 2014. 25 [38] Wulfram Gerstner and Werner M Kistler. Spiking neuron models: Single neurons, populations, plasticity. Cambridge university press, 2002. [39] Robert B Glassman. An hypothesis about redundancy and reliability in the brains of higher species: Analogies with genes, internal organs, and engineering systems. Neuroscience & Biobehavioral Reviews, 11(3):275–285, 1987. [40] Vinayak Gokhale, Jonghoon Jin, Aysegul Dundar, Ben Martini, and Eugenio Culurciello. A 240 g-ops/s mobile coprocessor for deep neural networks. In Computer Vision and Pattern Recognition Workshops (CVPRW), 2014 IEEE Conference on, pages 696–701. IEEE, 2014. [41] Michael Graupner and Nicolas Brunel. Calcium-based plasticity model explains sensitivity of synaptic changes to spike pattern, rate, and dendritic location. Proceedings of the National Academy of Sciences, 109(10):3991–3996, 2012. [42] Simon S Haykin. Neural networks: a comprehensive foundation. Tsinghua University Press, 2001. [43] Donald Olding Hebb. The organization of behavior: A neuropsychological theory. Psychology Press, 2005. [44] Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002. [45] M. Horowitz. 1.1 computing’s energy problem (and what we can do about it). In 2014 IEEE International Solid-State Circuits Conference Digest of Technical Papers (ISSCC), pages 10–14. IEEE, 2014. [46] Giacomo Indiveri and Shih-Chii Liu. Memory and information processing in neuromorphic systems. Proceedings of the IEEE, 103(8):1379–1397, 2015. [47] S. Joshi, S. Deiss, M. Arnold, J. Park, T. Yu, and G. Cauwenberghs. Scalable event routing in hierarchical neural array architecture with global synaptic connectivity. In Cellular Nanoscale Networks and Their Applications (CNNA), 2010 12th International Workshop on, pages 1–6. IEEE, 2010. [48] Xavier Lagorce and Ryad Benosman. Stick: Spike time interval computational kernel, a framework for general purpose computation using neurons, precise timing, delays, and synchrony. Neural computation, 2015. [49] Dong-Hyun Lee, Saizheng Zhang, Antoine Biard, and Yoshua Bengio. Target propagation. arXiv preprint arXiv:1412.7525, 2014. [50] Qianli Liao, Joel Z Leibo, and Tomaso Poggio. How important is weight symmetry in backpropagation? arXiv preprint arXiv:1510.05067, 2015. [51] Timothy P Lillicrap, Daniel Cownden, Douglas B Tweed, and Colin J Akerman. Random synaptic feedback weights support error backpropagation for deep learning. Nature Communications, 7, 2016. [52] S.-C. Liu and T. Delbruck. 20(3):288–295, 2010. Neuromorphic sensory systems. Current Opinion in Neurobiology, [53] David JC MacKay. Information theory, inference, and learning algorithms, volume 7. Citeseer, 2003. [54] H Markram, W Gerstner, and PJ Sjöström. Spike-timing-dependent plasticity: a comprehensive overview. Front Synaptic Neurosci, 4:8, 2012. [55] Carver Mead and Mohammed Ismail. Analog VLSI implementation of neural systems, volume 80. Springer Science & Business Media, 2012. 26 [56] Samir Menon, Sam Fok, Alex Neckar, Oussama Khatib, and Kwabena Boahen. Controlling articulated robots in task-space with spiking silicon neurons. In 5th IEEE RAS/EMBS International Conference on Biomedical Robotics and Biomechatronics, pages 181–186. IEEE, 2014. [57] Paul A Merolla, John V Arthur, Rodrigo Alvarez-Icaza, Andrew S Cassidy, Jun Sawada, Filipp Akopyan, Bryan L Jackson, Nabil Imam, Chen Guo, Yutaka Nakamura, et al. A million spiking-neuron integrated circuit with a scalable communication network and interface. Science, 345(6197):668–673, 2014. [58] Paul A Merolla, John V Arthur, Rodrigo Alvarez-Icaza, Andrew S Cassidy, Jun Sawada, Filipp Akopyan, Bryan L Jackson, Nabil Imam, Chen Guo, Yutaka Nakamura, et al. A million spiking-neuron integrated circuit with a scalable communication network and interface. Science, 345(6197):668–673, 2014. [59] S. Mihalas and E. Niebur. A generalized linear integrate-and-fire neural model produces diverse spiking behavior. Neural Computation, 21:704–718, 2009. [60] Stefan Mihalas and Ernst Niebur. A generalized linear integrate-and-fire neural model produces diverse spiking behaviors. Neural computation, 21(3):704–718, 2009. [61] Moritz B Milde, Hermann Blum, Alexander Dietmüller, Dora Sumislawska, Jörg Conradt, Giacomo Indiveri, and Yulia Sandamirskaya. Obstacle avoidance and target acquisition for robot navigation using a mixed signal analog/digital neuromorphic processing system. Frontiers in neurorobotics, 11, 2017. [62] Hesham Mostafa, Ali Khiat, Alexander Serb, Christian G Mayr, Giacomo Indiveri, and Themis Prodromakis. Implementation of a spike-based perceptron learning rule using tio2- x memristors. Frontiers in neuroscience, 9, 2015. [63] Lorenz K Muller and Giacomo Indiveri. Rounding methods for neural networks with low resolution synaptic weights. arXiv preprint arXiv:1504.05767, 2015. [64] R. Naous, M. Al-Shedivat, and K. N. Salama. Stochasticity modeling in memristors. IEEE Transactions on Nanotechnology, 15(1):15–28, Jan 2016. [65] E. Neftci, S. Das, B. Pedroni, K. Kreutz-Delgado, and G Cauwenberghs. Restricted boltzmann machines and continuous-time contrastive divergence in spiking neuromorphic systems, May 2013. [66] E. Neftci, S. Das, B. Pedroni, K. Kreutz-Delgado, and G. Cauwenberghs. Event-driven contrastive divergence for spiking neuromorphic systems. Frontiers in Neuroscience, 7(272), Jan. 2014. [67] Emre Neftci, Charles Augustine, Somnath Paul, and Georgios Detorakis. Event-driven random backpropagation: Enabling neuromorphic deep learning machines. Frontiers in Neuroscience, May 2017. Accepted. [68] Emre O Neftci, Bruno U Pedroni, Siddharth Joshi, Maruan Al-Shedivat, and Gert Cauwenberghs. Unsupervised learning in synaptic sampling machines. arXiv preprint arXiv:1511.04484, 2015. [69] Emre O Neftci, Bruno Umbria Pedroni, Siddharth Joshi, Maruan Al-Shedivat, and Gert Cauwenberghs. Stochastic synapses enable efficient brain-inspired learning machines. Frontiers in Neuroscience, 10(241), 2016. [70] Emre O Neftci, Bruno Umbria Pedroni, Siddharth Joshi, Maruan Al-Shedivat, and Gert Cauwenberghs. Stochastic synapses enable efficient brain-inspired learning machines. Frontiers in Neuroscience, 10(241), 2016. 27 [71] J. Park, T. Yu, S. Joshi, C. Maier, and G. Cauwenberghs. Hierarchical address event routing for reconfigurable large-scale neuromorphic systems. IEEE Transactions on Neural Networks and Learning Systems, 28(10):2408–2422, 2017. [72] Bruno U Pedroni, Sadique Sheik, Siddharth Joshi, Georgios Detorakis, Somnath Paul, Charles Augustine, Emre Neftci, and Gert Cauwenberghs. Forward table-based presynaptic event-triggered spiketiming-dependent plasticity. arXiv preprint arXiv:1607.03070, 2016. [73] Thomas Pfeil, A. Grübl, Sebastian Jeltsch, Eric Müller, Paul Müller, Mihai A Petrovici, Michael Schmuker, D. Brüderle, Johannes Schemmel, and Karlheinz Meier. Six networks on a universal neuromorphic computing substrate. Frontiers in neuroscience, 7, 2013. [74] Jean-Pascal Pfister, Taro Toyoizumi, David Barber, and Wulfram Gerstner. Optimal spike-timingdependent plasticity for precise action potential firing in supervised learning. Neural computation, 18(6):1318–1348, 2006. [75] Eugene J Putzer. Avoiding the jordan canonical form in the discussion of linear systems with constant coefficients. The American Mathematical Monthly, 73(1):2–7, 1966. [76] 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. [77] 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, 2015. [78] Damien Querlioz, Olivier Bichler, Adrien Francis Vincent, and Christian Gamrat. Bioinspired programming of memory devices for implementing an inference engine. Proceedings of the IEEE, 103(8):1398– 1416, 2015. [79] Dennis M Ritchie, Brian W Kernighan, and Michael E Lesk. The C programming language. Prentice Hall Englewood Cliffs, 1988. [80] David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by backpropagating errors. Cognitive modeling, 5(3):1, 1988. [81] Yulia Sandamirskaya. Dynamic neural fields as a step toward cognitive neuromorphic architectures. Frontiers in Neuroscience, 7, 2013. [82] J. Schemmel, D. Brüderle, A. Grübl, M. Hock, K. Meier, and S. Millner. A wafer-scale neuromorphic hardware system for large-scale neural modeling. In International Symposium on Circuits and Systems, ISCAS 2010, pages 1947–1950. IEEE, 2010. [83] Johannes Schemmel, Daniel Briiderle, Andreas Griibl, Matthias Hock, Karlheinz Meier, and Sebastian Millner. A wafer-scale neuromorphic hardware system for large-scale neural modeling. In Proceedings of 2010 IEEE International Symposium on Circuits and Systems, pages 1947–1950. IEEE, 2010. [84] Gregor Schoner and JA Kelso. Dynamic pattern generation in behavioral and neural systems. Science, 239(4847):1513–1520, 1988. [85] Jae-sun Seo, Bernard Brezzo, Yong Liu, Benjamin D Parker, Steven K Esser, Robert K Montoye, Bipin Rajendran, José A Tierno, Leland Chang, Dharmendra S Modha, et al. A 45nm cmos neuromorphic chip with a scalable architecture for learning in networks of spiking neurons. In 2011 IEEE Custom Integrated Circuits Conference (CICC), pages 1–4. IEEE, 2011. 28 [86] S. Sheik, S. Paul, C. Augustine, C. Kothapalli, and G. Cauwenberghs. Membrane-dependent neuromorphic learning rule for unsupervised spike pattern detection. In BioMedical Circuits and Systems, (BioCAS), 2016. IEEE, Oct 2016. [87] Harel Z Shouval, Mark F Bear, and Leon N Cooper. A unified model of nmda receptor-dependent bidirectional synaptic plasticity. Proceedings of the National Academy of Sciences, 99(16):10831–10836, 2002. [88] P Jesper Sjöström, Ede A Rancz, Arnd Roth, and Michael Häusser. Dendritic excitability and synaptic plasticity. Physiological reviews, 88(2):769–840, 2008. [89] Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. [90] F. Stefanini, E. Neftci, S. Sheik, and G. Indiveri. Pyncs: a kernel for high-level configuration and definition of neuromorphic electronic systems. Frontiers in Neuroinformatics, 8, Jul 2014. (equal contrib. FS, EN, SS). [91] Fabio Stefanini, Emre O Neftci, Sadique Sheik, and Giacomo Indiveri. Pyncs: a microkernel for highlevel definition and configuration of neuromorphic electronic systems. Frontiers in neuroinformatics, 8:73, 2014. [92] Peter Sterling and Simon Laughlin. Principles of neural design. MIT Press, 2015. [93] Evangelos Stromatias, Daniel Neil, Michael Pfeiffer, Francesco Galluppi, Steve B Furber, and Shih-Chii Liu. Robustness of spiking deep belief networks to noise and reduced bit precision of neuro-inspired hardware platforms. Frontiers in neuroscience, 9, 2015. [94] Thomas E Tkacik. A hardware random number generator. In International Workshop on Cryptographic hardware and embedded systems, pages 450–453. Springer, 2002. [95] Robert Urbanczik and Walter Senn. Learning by the dendritic prediction of somatic spiking. Neuron, 81(3):521–528, 2014. [96] Robert Urbanczik and Walter Senn. Learning by the dendritic prediction of somatic spiking. Neuron, 81(3):521–528, 2014. [97] Roberto A Vazquez, Bernard Girau, and Jean-Charles Quinton. Visual attention using spiking neural maps. In Neural Networks (IJCNN), The 2011 International Joint Conference on, pages 2164–2171. IEEE, 2011. [98] Swagath Venkataramani, Ashish Ranjan, Kaushik Roy, and Anand Raghunathan. Axnn: energyefficient neuromorphic systems using approximate computing. In Proceedings of the 2014 international symposium on Low power electronics and design, pages 27–32. ACM, 2014. [99] Julien Vitay and Nicolas Rougier. Using neural dynamics to switch attention. In Neural Networks, 2005. IJCNN’05. Proceedings. 2005 IEEE International Joint Conference on, volume 5, pages 2891– 2896. IEEE, 2005. [100] R Jacob Vogelstein, Francesco Tenore, Ralf Philipp, Miriam S Adlerstein, David H Goldberg, and Gert Cauwenberghs. Spike timing-dependent plasticity in the address domain. In Advances in Neural Information Processing Systems, pages 1147–1154, 2002. [101] Li Wan, Matthew Zeiler, Sixin Zhang, Yann L Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In Proceedings of the 30th International Conference on Machine Learning (ICML13), pages 1058–1066, 2013. 29 [102] Paul Werbos. Beyond regression: New tools for prediction and analysis in the behavioral sciences. 1974. [103] Friedemann Zenke and Surya Ganguli. Superspike: Supervised learning in multi-layer spiking neural networks. arXiv preprint arXiv:1705.11146, 2017. Acknowledgements This material is based upon work supported by the National Science Foundation under Grant No. 1652159 “CAREER: Scalable Neuromorphic Learning Machines,” and by Intel Corporation through the “Architectures for Neuromorphic Computing” Strategic Research Alliance. Author contributions statement GD wrote the NSAT software; GD, SS and EN conceived the experiment; GD, SS and EN conducted the experiment; GD, SS and EN analyzed the results; all authors wrote and reviewed the manuscript. 30
9cs.NE
arXiv:1708.05520v1 [cs.DS] 18 Aug 2017 An Optimal Realization Algorithm for Bipartite Graphs with Degrees in Prescribed Intervals∗ Steffen Rechner Institute of Computer Science Martin Luther University Halle-Wittenberg, Germany [email protected] March 1, 2018 Abstract We consider the problem of constructing a bipartite graph whose degrees lie in prescribed intervals. Necessary and sufficient conditions for the existence of such graphs are well-known. However, existing realization algorithms suffer from large running times. In this paper, we present a realization algorithm that constructs an appropriate bipartite graph G = (U, V, E) in O(|U | + |V | + |E|) time, which is asymptotically optimal. In addition, we show that our algorithm produces edge-minimal bipartite graphs and that it can easily be modified to construct edgemaximal graphs. 1 Introduction The construction of bipartite graphs with prescribed degrees is a well-studied algorithmic problem with various applications in science. Whereas the classical problem asks for a bipartite graph whose degrees must exactly match prescribed integers, we study the problem of constructing a bipartite graph whose degrees have to lie in prescribed intervals. As one application, the construction of such graphs is part of several sampling algorithms that aim at producing random bipartite graphs whose degrees lie in the prescribed intervals. Such sampling algorithms typically work by randomly modifying an existing bipartite graph, while preserving the prescribed bounds on the degrees [5]. If no bipartite graph with prescribed degrees is given, the first step of such algorithms is to construct an initial bipartite graph. In such cases, the efficient realization is of high importance for the efficiency of the whole sampling algorithm. ∗ Submitted to the Journal of Discrete Algorithms. 1 Problem Definition Given a four-tuple of integer vectors (r̃, r̄, c̃, c̄) with r̃ = (r̃1 , r̃2 , . . . , r̃n1 ), r̄ = (r̄1 , r̄2 , . . . , r̄n1 ), c̃ = (c̃1 , c̃2 , . . . , c̃n2 ), c̄ = (c̄1 , c̄2 , . . . , c̄n2 ), we want to construct a bipartite graph whose vertex degrees are bounded from below by the vectors r̃ and c̃ and from above by r̄ and c̄. More precisely, let dG : U ∪V → N describe the vertex degrees of a bipartite graph G = (U, V, E) with disjoint vertex sets U = {u1 , u2 , . . . , un1 } and V = {v1 , v2 , . . . , vn2 }. We seek a bipartite graph such that r̃i ≤ dG (ui ) ≤ r̄i and c̃j ≤ dG (vj ) ≤ c̄j hold for all i in range 1 ≤ i ≤ n1 and j in range 1 ≤ j ≤ n2 . Related Work In the special case of r̃ = r̄ and c̃ = c̄, Ryser’s algorithm [6] is used for decades to construct a valid bipartite graph G = (U, V, E) in O(|U | + |V | + |E|) time. In the general case, the problem can be solved by finding a (g, f )-factor in the complete bipartite graph with g and f being integer vectors obtained by concatenating the vectors of lower and upper bounds. As (g, f )factors in arbitrary graphs G = (V, E) can be constructed in O(|V|3 ) time [1], this approach leads to a realization algorithm with a running time of O((|U |+|V |)3 ). Another way of finding a valid bipartite graph is to construct an appropriate flow network F = (V, A) and to calculate a maximal flow [2]. As calculating a maximal flow can be achieved in O(|V| · |A|) time [4] and, in our case, the flow network needs to have |V| = |U | + |V | + 2 vertices and |A| = |U | · |V | + |U | + |V | arcs, we gain a running time of O(|U | · |V | · (|U | + |V |)). Contribution In this article, we present a realization algorithm whose running time is bounded by O(|U |+|V |+|E|) with |E| being the number of edges of the bipartite graph that is been constructed. After summarizing the necessary theoretical background, we present the realization algorithm and show that its running time is O(|U | + |V | + |E|). Finally, we show that the bipartite graph constructed by our method is edge-minimal. 2 Preliminaries Definitions Let n1 and n2 be positive integers. Let r = (r1 , r2 , . . . , rn1 ), r̄ = (r̄1 , r̄2 , . . . , r̄n1 ), and c = (c1 , c2 , . . . , cn2 ) be integer vectors of length n1 respectively n2 . The integer vector r is called non-increasing if ri ≥ ri+1 for 1 ≤ i < n1 . We say that the pair of integer vectors (r, c) is bi-graphical if and only if there is a bipartite graph G = (U, V, E) such that dG (ui ) = ri and dG (vj ) = cj for 1 ≤ i ≤ n1 and 1 ≤ j ≤ n2 . We will write r ≤ r̄ if and only if ri ≤ r̄i for all i in range 1 ≤ i ≤ n1 . The integer vector c0 = (c01 , c02 , . . . , c0n1 ) of length n1 is called conjugate vector of c if and only if c0i = |{j : 1 ≤ j ≤ n2 ∧ cj ≥ i}| for Pk each i in range 1 ≤ i ≤ n1 . We abbreviate the sum i=1 ri by Σkr . We say that the conjugate vector c0 dominates r and write r E c0 if and only if Σkr ≤ Σkc0 holds for 1 ≤ k ≤ n1 . In addition, we define Σr to be the vector of partial sums of an integer vector r, thus Σr = (Σ1r , Σ2r , . . . , Σnr 1 ). Finally, we say that the four-tuple of integer vectors (r̃, r̄, c̃, c̄) is realizable if and only if there is a bipartite graph G = (U, V, E) such that r̃i ≤ dG (ui ) ≤ r̄i and c̃j ≤ dG (vj ) ≤ c̄j 2 hold for 1 ≤ i ≤ n1 and 1 ≤ j ≤ n2 . In such cases, we will call G a realization of the four-tuple (r̃, r̄, c̃, c̄). Our algorithm is based on the following well-known theorems. Theorem 1 (Gale [3], Ryser [6]). Let r = (r1 , r2 , . . . , rn1 ) be a non-increasing integer vector and let c = (c1 , c2 , . . . , cn2 ) be an integer vector. The pair (r, c) is bi-graphical if and only if Σnr 1 = Σnc 2 and r E c0 . Theorem 2 (Fulkerson [2], Schocker [7]). Let r̃ = (r̃1 , r̃2 , . . . , r̃n1 ) and c̃ = (c̃1 , c̃1 , . . . , c̃n2 ) be non-increasing integer vectors, and let r̄ = (r̄1 , r̄2 , . . . , r̄n1 ) and c̄ = (c̄1 , c̄2 , . . . , c̄n2 ) be integer vectors with r̃ ≤ r̄ and c̃ ≤ c̄. The fourtuple (r̃, r̄, c̃, c̄) is realizable if and only if r̃ E c̄0 and c̃ E r̄0 . 3 Realization Algorithm Our algorithm assumes that the integer vectors r̃ and c̃ are ordered non-increasingly, which can be easily arranged by descendingly sorting the pairs (r̃, r̄) and (c̃, c̄) by their associated lower bounds. In addition, the algorithm assumes that the four-tuple (r̃, r̄, c̃, c̄) is realizable, which can be verified by Theorem 2. The key idea is now to iteratively construct a bi-graphical pair of integer vectors (r, c) bounded by r̃ ≤ r ≤ r̄ and c̃ ≤ c ≤ c̄ that is afterwards realized via Ryser’s algorithm [3]. The algorithm is divided into two parts. 3.1 Phase One Since the four-tuple (r̃, r̄, c̃, c̄) is realizable by assumption, there is a bipartite graph G = (U, V, E) such that c̃j ≤ dG (vj ) ≤ c̄j holds for each vj ∈ V . As a consequence, there must be an integer vector c = (c1 , c2 , . . . , cn2 ) which describes the degrees of vertex set V . With other words, there is an integer vector c bounded by c̃ ≤ c ≤ c̄ such that (r̃, r̄, c, c) is realizable. In its first phase (see Alg. 1), the algorithm constructs such a vector c. For this purpose, c is initialized with c̃. In a series of iterations, the algorithm identifies the rightmost component ci with ci < c̄i and increments the left-most components cj with cj = ci . After a well-chosen number δ1 of iterations, the algorithm returns the realizable four-tuple (r̃, r̄, c, c). Example Consider the following integer vectors: r̃ = (4, 1, 0) c̃ = (2, 2, 0, 0, 0) r̄ = (4, 2, 3) c̄ = (2, 3, 1, 2, 2). By setting up at the corresponding conjugate vectors, we observe that the fourtuple (r̃, r̄, c̃, c̄) is realizable via Theorem 2. r̃ = (4, 1, 0) r̄0 = (3, 3, 2, 1, 0) c̃ = (2, 2, 0, 0, 0) Σr̃ = (4, 5, 5) Σr̄0 = (3, 6, 8, 9, 9) Σc̃ = (2, 4, 4, 4, 4) 3 c̄0 = (5, 4, 1) Σc̄0 = (5, 9, 10). Algorithm 1: Phase One Input: realizable four-tuple (r̃, r̄, c̃, c̄) Output: realizable four-tuple (r̃, r̄, c, c) with c̃ ≤ c ≤ c̄ 1 c ← c̃ // initialize c with lower bounds c̃ j j // calculate number of steps 2 δ1 ← max{Σr̃ − Σc̃0 : 1 ≤ j ≤ n1 } 3 i ← n2 // right-most position such that ci < c̄i 4 for k = 1, 2, . . . , δ1 do 5 while ci = c̄i do // proceed to next position with ci < c̄i 6 i←i−1 7 end 8 j ← min{` : c` = ci } // identify left-most cj with cj = ci 9 swap c̄i and c̄j 10 cj ← cj + 1 11 end 12 return (r̃, r̄, c, c) The vector c is initialized with c ← c̃ = (2, 2, 0, 0, 0). As c̃0 = (2, 2, 0) and Σc̃0 = (2, 4, 4), the number of steps of the outer loops is calculated by δ1 ← max{4 − 2, 5 − 4, 5 − 4} = 2. 1. The inner loop breaks with i = 5. The left-most component equal to c5 = 0 is at position j = 3. Thus, the algorithm swaps c̄5 and c̄3 and increments c3 . We gain c = (2, 2, 1, 0, 0) and c̄ = (2, 3, 2, 2, 1). 2. The inner loop breaks again with i = 5. The left-most component equal to c5 = 0 is now at position j = 4. Thus, the algorithm swaps c̄5 and c̄4 and increments c4 . We gain c = (2, 2, 1, 1, 0) and c̄ = (2, 3, 2, 1, 2). The situation at the end of the first phase: r̃ = (4, 1, 0) r̄ = (4, 2, 3) c = (2, 2, 1, 1, 0) c0 = (4, 2, 0) Σr̃ = (4, 5, 5) Σr̄ = (4, 6, 9) Σc = (2, 4, 5, 6, 6) Σc0 = (4, 6, 6). We observe that (r̃, r̄, c, c) is realizable via Theorem 2. Proof of Correctness The correctness of Alg. 1 follows from Lemma 3 and 4. For the following theorems, let r̃ = (r̃1 , r̃2 , . . . , r̃n1 ) and c = (c1 , c2 , . . . , cn2 ) be non-increasing integer vectors and let r̄ = (r̄1 , r̄2 , . . . , r̄n1 ) and c̄ = (c̄1 , c̄2 , . . . , c̄n2 ) be integer vectors such that r̃ ≤ r̄ and c ≤ c̄ hold, (r̃, r̄, c, c̄) is realizable, and (r̃, r̄, c, c) is not realizable. Lemma 3. There is a right-most position i with ci < c̄i . Let j be the left-most position with cj = ci . Let a = (a1 , a2 , . . . , an2 ) and ā = (ā1 , ā2 , . . . , ān2 ) be 4 integer vectors defined by ( ck + 1, ak = ck , if k = j, otherwise, and   c̄i , āk = c̄j ,   c̄k , if k = j, if k = i, otherwise. Then, a is non-increasing, a ≤ ā holds, and (r̃, r̄, a, ā) is realizable. Proof. As (r̃, r̄, c, c̄) is realizable by assumption and (r̃, r̄, c, c) is not, c cannot be equal to c̄. Thus, there must be a position i with ci < c̄i . As j is chosen left-most with cj = ci , either j = 1 or cj−1 > cj must hold. In both cases, the integer vector a is non-increasing as c is non-increasing by assumption. We show next that a ≤ ā holds. As ci < c̄i holds by assumption, it follows that aj = cj + 1 = ci + 1 ≤ c̄i = āj . To see that ai ≤ āi holds, consider two cases. If i = j, the inequality āi = c̄i ≥ ci + 1 = ai holds as ci < c̄i . Otherwise, if i 6= j, we derive āi = c̄j ≥ cj = ci = ai . Hence, ai ≤ āi holds in both cases. Since ak = ck and āk = c̄k for all k 6= i, j, we infer a ≤ ā. It remains to show that (r̃, r̄, a, ā) is realizable. By Theorem 2, (r̃, r̄, a, ā) is realizable if and only if r̃ E ā0 and a E r̄0 hold. Since ā is a permutation of c̄, the sets {` : āi ≥ k} and {` : c̄i ≥ k} are identical for all k, thus, ā0 equals c̄0 . As r̃ E c̄0 holds due to the realizability of (r̃, r̄, c, c̄), the dominance relation r̃ E ā0 holds, too. Now assume that a E r̄0 does not hold. Thus, there is a right-most position k such that Σka > Σkr̄0 . Since Σkc ≤ Σkr̄0 must hold as (r̃, r̄, c, c̄) is realizable and a differs from c only at position j, we conclude Σkc = Σkr̄0 and j ≤ k. Next, we show that i > k. Therefore, assume the contrary and let i ≤ k. Since i is chosen right-most, it follows that c` = c̄` for each ` in range i < ` ≤ n2 . Thus, increasing an arbitrary c` in range i < ` ≤ n2 by a positive amount would violate c ≤ c̄ whereas increasing an arbitrary c` in range 1 ≤ ` ≤ i violates the realizability of (r̃, r̄, c, c̄). Hence, (r̃, r̄, c, c̄) can only be realizable if (r̃, r̄, c, c) is, which contradicts our assumption. Thus, i > k. Since j was chosen left-most with cj = ci , we obtain from j ≤ k and k < i that cj = . . . = ck = ck+1 = . . . = ci . Since k is right-most and (r̃, r̄, c, c̄) is 0 < Σk+1 holds and thus, r̄k+1 > ck+1 . As r̄0 realizable, we conclude that Σk+1 c r̄0 0 0 is non-increasing by definition, we conclude further that r̄k ≥ r̄k+1 > ck+1 = k−1 k k k−1 ck . Consequently, Σc = Σr̄0 holds if and only if Σc > Σr̄0 holds, which contradicts the realizability of (r̃, r̄, c, c̄) if k > 1, or is plainly wrong if k = 1. As a consequence, a E r̄0 must hold and thus, (r̃, r̄, a, ā) is realizable. Lemma 4. Let c(k) and c̄(k) be the state of the integer vectors c and c̄ after exactly k iterations of the outer loop in Alg. 1. Then, (r̃, r̄, c(k) , c(k) ) is not realizable unless k ≥ δ1 = max{Σjr̃ − Σjc̃0 : 1 ≤ j ≤ n1 }. Proof. By Lemma 3, c(k) is non-increasing and c(k) ≤ c̄(k) holds. Hence, by Theorem 2, the four-tuple (r̃, r̄, c(k) , c(k) ) is realizable if and only if r̃ E (c(k) )0 and c(k) ≤ r̄0 hold. Whereas the latter domination relation is ensured by Lemma 3, the condition r̃ E (c(k) )0 will not hold if k < δ1 . To see why this is 5 (k) true, consider incrementing an arbitrary component cj Whereas the components (c(k+1) )0` (c(k+1) )0` (k+1) to cj will be equal to (c(k) )0` for value (c(k+1) )0` = (c(k) )0` + (k) = cj each ` 6= the component will be of 1 for ` = As a consequence, the partial sums Σc(k+1) are affected by ( (k) Σi(c(k) )0 + 1, if cj < i ≤ n1 , i Σ(c(k+1) )0 = Σi(c(k) )0 , otherwise. + 1. (k+1) cj , (k+1) cj . Now let p be an arbitrary position such that Σpr̃ > Σpc̃0 holds at the beginning of the first phase. Since Σpr̃ stays constant, the inequality Σpr̃ ≤ Σp(c(k) )0 will be established as soon as a number of k ≥ Σpr̃ −Σpc0 components of value cj < p have been incremented. As Alg. 1 chooses cj as small as possible, the domination relation r̃ E (c(k) )0 will hold after exactly δ1 = max{Σjr̃ − Σjc̃0 : 1 ≤ j ≤ n1 } iterations. Running Time Determining the quantity δ1 requires a running time of O(n1 ). The outer loop of Alg. 1 runs exactly δ1 steps. In each step, the algorithm has to determine the position j ← min{` : c` = ci } of the left-most occurrence of a component equal to ci . This can be achieved in constant time if we use a pre-computed lookup-table which is updated after each incrementation. Fortunately, each increment operations only requires a table-update at the positions ci and ci + 1 which can be executed in constant time. Thus, letting beside the inner loop, each step of the outer loop is executed in constant time. In contrast, the inner loop may need linear time. However, the variable i can be decreased at most n2 times during the whole process. Thus, the running time of the outer loop is O(n2 + δ1 ). In summary, since δ1 ≤ Σnr̃ 1 , the running time of the first phase can be bounded by O(n1 + n2 + Σnr̃ 1 ). 3.2 Phase Two After the first phase has stopped, r̃ and c are non-increasing integer vectors and (r̃, r̄, c, c) is realizable by Lemma 3 and 4. Hence, there is a bipartite graph G = (U, V, E) with dG (vj ) = cj for j in range 1 ≤ j ≤ n2 and r̃i ≤ dG (ui ) ≤ r̄i for i in range 1 ≤ i ≤ n1 . If we switch the roles of vertex sets U and V , we gain an instance of the realization problem in which the four-tuple (c, c, r̃, r̄) is realizable, c and r̃ are non-increasing, and r̃ ≤ r̄ holds. Thus, we can re-apply the first phase to the modified instance to construct a suitable integer vector r such that (c, c, r, r) is realizable. After switching back the roles of U and V , we gain a bi-graphical pair (r, c) of integer vectors. Afterwards, a realization is constructed by Ryser’s algorithm. Example We start where the first phase stopped. r̃ = (4, 1, 0) r̄ = (4, 2, 3) c = (2, 2, 1, 1, 0) c0 = (4, 2, 0) Σr̃ = (4, 5, 5) Σr̄ = (4, 6, 9) Σc = (2, 4, 5, 6, 6) Σc0 = (4, 6, 6). 6 Algorithm 2: Phase Two Input: realizable four-tuple (r̃, r̄, c, c) Output: bi-graphical pair (r, c) 1 r ← r̃ // initialize r with lower bounds r̃ n n // calculate number of steps 2 δ2 ← Σc 2 − Σr̃ 1 3 i ← n1 // right-most position such that r̃i < r̄i 4 for k = 1, 2, . . . , δ2 do 5 while ri = r̄i do // proceed to next position with ri < r̄i 6 i←i−1 7 end 8 j ← min{` : r` = ri } // identify left-most rj with rj = ri 9 swap r̄i and r̄j 10 rj ← rj + 1 11 end 12 return (r, c) v1 u1 u2 u3 v2 v3 v4 v5 Figure 1: Realization of the sequence pair r = (4, 1, 1), c = (2, 2, 1, 1, 0). The number of iterations is determined by δ2 ← 6 − 5 = 1. 1. The inner loop breaks with i = 3. The left-most component equal to r3 = 0 is at position j = 3. Thus, the algorithm switches r̄3 and r̄3 and increments r3 . We gain r = (4, 1, 1) and r̄ = (4, 2, 3). The situation at the end of the second phase: r = (4, 1, 1) c = (2, 2, 1, 1, 0) c0 = (4, 2, 0) Σr = (4, 5, 6) Σc = (2, 4, 5, 6, 6) Σc0 = (4, 6, 6) We verify by Theorem 1 that (r, c) is bi-graphical. Fig. 1 shows a realization. Proof of Correctness The correctness of the second phase can be shown very similarly to phase one and follows directly from the following theorem. Lemma 5. Let r(k) and r̄(k) be the state of the integer vectors r and r̄ after exactly k iterations of the outer loop in Alg. 2. Then, (r(k) , r(k) , c, c) is realizable if and only if k = δ2 = Σnc 2 − Σnr̃ 1 . Proof. By Theorem 2, the four-tuple (r(k) , r(k) , c, c) is realizable if and only 1 if r(k) ≤ c0 and c E (r(k) )0 hold. In particular, Σnr(k) = Σnc 2 must hold. 7 1 Since Σnr̃(k) 6= Σnc 2 for k 6= Σnc 2 − Σnr̃ 1 , the four-tuple (r̃(k) , r̃(k) , c, c) cannot be realizable if k 6= δ2 . On the other hand, as (r(k) , r̄(k) , c, c) is realizable and thus r(k) E c0 holds after each iteration by Lemma 3, the four1 tuple (r(k) , r(k) , c, c) will be realizable as soon as Σnr(k) = Σnc 2 holds, which is true after exactly δ2 iterations. Running Time By similar arguments as before, the running time of the second phase can be described by O(n1 + n2 + Σnc 2 ). As Ryser’s algorithm produces a realization G = (U, V, E) of the bi-graphical pair (r, c) in O(|U | + |V | + |E|) time and |E| = Σnc 2 ≥ Σnr̃ 1 , the total running time of the realization algorithm is O(|U | + |V | + |E|). Since we cannot hope to construct a bipartite graph in sub-linear time, our algorithm is asymptotically optimal. 3.3 Edge-Minimality Lemma 6. The bipartite graph produced by our algorithm is edge-minimal. Proof. Let (r, c) be a bi-graphical pair of integer vectors associated to an arbitrary realization G = (U, V, E) of the four-tuple (r̃, r̄, c̃, c̄). As c̃ ≤ c must hold, the number of edges |E| is bounded from below by |E| ≥ Σc̃n2 . In addition, if (r, c) is bi-graphical, the four-tuple (r̃, r̄, c, c) must be realizable. Hence, the inequalities Σjr̃ ≤ Σjc0 = Σjc̃0 + xj must hold for each j in range 1 ≤ j ≤ n1 . Thus, xj = Σjr̃ − Σjc̃0 is the minimal number of edges that G needs to possess in addition to the Σnc̃ 2 edges, so that the inequality Σjr̃ ≤ Σjc0 can hold. Hence, the total number of edges is bounded from below by |E| ≥ Σnc̃ 2 + max{xj : 1 ≤ j ≤ n2 } = Σnc̃ 2 + δ1 . Since our algorithm produces a bipartite graph G = (U, V, E) with exactly |E| = Σnc̃ 2 + δ1 edges, G is edge-minimal. Remark Our algorithm can easily be used to construct edge-maximal realizations. For this purpose, consider an arbitrary edge-minimal realization G = (U, V, E) of the four-tuple (r̃, r̄, c̃, c̄). The associated complement graph G∗ = (U, V, E ∗ ) is defined by E ∗ = (U × V ) \ E. By construction, the graph G is edge-minimal if and only if G∗ is edge-maximal. In addition, it follows from definition that the degrees of G∗ are bounded from below and above by the complementary four-tuple (r̃∗ , r̄∗ , c̃∗ , c̄∗ ) with r̃∗ = (n2 − r̄1 , n2 − r̄2 , . . . , n2 − r̄n1 ) r̄∗ = (n2 − r̃1 , n2 − r̃2 , . . . , n2 − r̃n1 ) c̃∗ = (n1 − c̄1 , n1 − c̄2 , . . . , n1 − c̄n2 ) c̄∗ = (n1 − c̃1 , n1 − c̃2 , . . . , n1 − c̃n2 ). Thus, we can find an edge-maximal realization by first determining an edgeminimal realization of the complementary four-tuple (r̃∗ , r̄∗ , c̃∗ , c̄∗ ) and creating the associated complement graph. 8 4 Conclusion We gave a description of an algorithm that constructs a bipartite graph G = (U, V, E) whose degrees lie in prescribed intervals and showed that this algorithm has a running time of O(|U | + |V | + |E|). Since this is asymptotically optimal, the algorithm can be used to efficiently solve the realization problem. Acknowledgements We thank Matthias Müller-Hannemann and Annabell Berger for their valuable suggestions and detailed remarks. This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. References [1] R. P. Anstee. An algorithmic proof of Tutte’s f-factor theorem. Journal of Algorithms, 6(1):112–131, 1985. [2] D. R. Fulkerson. A network flow feasibility theorem and combinatorial applications. Can. J. Math, 11:440–451, 1959. [3] D. Gale. A theorem on flows in networks. Pacific J. Math., 7(2):1073–1082, 1957. [4] James B Orlin. Max flows in O (nm) time, or better. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 765–774. ACM, 2013. [5] S. Rechner, L. Strowick, and M. Müller-Hannemann. Uniform Sampling of Bipartite Graphs with Degrees in Prescribed Intervals. submitted to Journal of Complex Networks. [6] Herbert J Ryser. Combinatorial properties of matrices of zeros and ones. Canadian Journal of Mathematics, 9:371–377, 1957. [7] M. Schocker. On graphs with degrees in prescribed intervals. In Algebraic Combinatorics and Applications, pages 307–315. Springer, 2001. 9
8cs.DS
Dendritic error backpropagation in deep cortical microcircuits João Sacramento1* , Rui Ponte Costa1 , Yoshua Bengio2 , Walter Senn1* 1 Department of Physiology University of Bern, Switzerland 2 arXiv:1801.00062v1 [q-bio.NC] 30 Dec 2017 Montreal Institute for Learning Algorithms Université de Montréal, Quebec, Canada Abstract Animal behaviour depends on learning to associate sensory stimuli with the desired motor command. Understanding how the brain orchestrates the necessary synaptic modifications across different brain areas has remained a longstanding puzzle. Here, we introduce a multi-area neuronal network model in which synaptic plasticity continuously adapts the network towards a global desired output. In this model synaptic learning is driven by a local dendritic prediction error that arises from a failure to predict the top-down input given the bottom-up activities. Such errors occur at apical dendrites of pyramidal neurons where both long-range excitatory feedback and local inhibitory predictions are integrated. When local inhibition fails to match excitatory feedback an error occurs which triggers plasticity at bottom-up synapses at basal dendrites of the same pyramidal neurons. We demonstrate the learning capabilities of the model in a number of tasks and show that it approximates the classical error backpropagation algorithm. Finally, complementing this cortical circuit with a disinhibitory mechanism enables attention-like stimulus denoising and generation. Our framework makes several experimental predictions on the function of dendritic integration and cortical microcircuits, is consistent with recent observations of cross-area learning, and suggests a biological implementation of deep learning. Introduction While walking on the street we are constantly bombarded with complex sensory stimuli. Learning to navigate such complex environments is of fundamental importance for survival. In the brain, these forms of learning are believed to rely on the orchestrated wiring of synaptic communication between different cortical areas, such as visual and motor cortices (Petreanu et al., 2012; Manita et al., 2015; Makino and Komiyama, 2015; Poort et al., 2015; Zmarz and Keller, 2016; Attinger et al., 2017). However, how to correctly modify synapses to achieve an appropriate interaction between brain areas has remained an open question. This fundamental issue in learning and development is often referred to as the credit assignment problem (Rumelhart et al., 1986; Sutton and Barto, 1998; Roelfsema and van Ooyen, 2005; Friedrich et al., 2011; Bengio, 2014). The brain, * Corresponding authors: {sacramento},{senn}@pyl.unibe.ch 1 and artificial neural networks alike, have to determine how to best modify a given synapse across multiple processing stages to ultimately improve global behavioural output. Machine learning has recently undergone remarkable progress through the use of deep neural networks, leading to human-level performance in a growing number of challenging problems (LeCun et al., 2015). Key to an overwhelming majority of these achievements has been the backpropagation of errors algorithm (backprop; Rumelhart et al., 1986), which has been long dismissed in neuroscience on the grounds of biologically implausibility (Grossberg, 1987; Crick, 1989). Nonetheless, accumulating evidence highlights the difficulties of simpler learning models and architectures in accurately reproducing cortical activity patterns when compared to deep neural networks, notably trained only on sensory data (Yamins et al., 2014; Khaligh-Razavi and Kriegeskorte, 2014; Yamins and DiCarlo, 2016). Although recent developments have started to bridge the gap between neuroscience and artificial intelligence (Marblestone et al., 2016; Lillicrap et al., 2016; Costa et al., 2017; Guerguiev et al., 2017), whether the brain implements a backprop-like algorithm remains unclear. Here we propose that the errors at the heart of backprop are encoded on the distal dendrites of cross-area projecting pyramidal neurons. In our model, these errors arise from a failure to exactly match via lateral (e.g. somatostatin-expressing, SST) interneurons the top-down feedback from downstream cortical areas. Synaptic learning is driven by these error-like signals that flow through the dendrites and trigger plasticity on bottom-up connections. Therefore, in contrast to previous approaches (Marblestone et al., 2016), in our framework a given neuron is used simultaneously for activity propagation (at the somatic level), error encoding (at distal dendrites) and error propagation to the soma. Importantly, under certain simplifying assumptions, we were able to formally show that learning in the model approximates backprop. We first illustrate the different components of the model and afterwards demonstrate its performance by training a multi-area network on associative nonlinear regression and recognition tasks (handwritten digit image recognition, a standard benchmark). Then, we further extend the framework to consider learning of the top-down synaptic pathway. When coupled with a disinhibitory mechanism this allows the network to generate prototypes of learnt images as well as perform input denoising. We interpret this disinhibitory mechanism as being implemented through another inhibitory cell-type (e.g. vasoactive intestinal peptide-expressing, VIP interneurons). Finally, we make several experimentally testable predictions in terms of the role of dendrites and different interneuron types being involved while an animal learns to associate signals originating from different brain areas. 2 Results The cortex exhibits remarkably intricate, but stereotypical circuits. Below we describe a plastic cortical circuit model that considers two features observed in neocortex: dendritic compartments and different cell types. Cross-area synapses onto the dendritic compartments learn to reduce the prediction error between the somatic potential and their own dendritic branch potential. Additionally, lateral synaptic input from local interneurons learns to cancel top-down feedback from downstream brain areas. When a new top-down input arrives at distal dendrites that cannot be matched by lateral inhibition it signals a neuron-specific error (encoded on the dendritic potential) that triggers synaptic learning at a given pyramidal cell. As learning progresses, the interneurons gradually learn to cancel once again the new input until eventually learning stops. We show that this cortical circuit implements error backpropagation, and demonstrate its performance in various tasks. The dendritic cortical circuit learns to predict self-generated top-down input We first study a generic network model with N cortical brain areas (a multi-layer network, in machine learning parlance), comprising an input area (representing, for instance, thalamic input to sensory areas, denoted as area 0), one or more ‘hidden’ areas (representing secondary sensory and consecutive higher brain areas, denoted as area k and area k+1, respectively) and an output brain area (e.g. motor cortex, denoted as area N), see schematic in Fig. 1A. Unlike conventional artificial neuPP ral networks, hidden neurons feature both bottom-up (WPP k +1,k ) and top-down (Wk ,k +1 ) connections, thus defining a recurrent network structure. Top-down synapses continuously feed back the next brain area predictions to a given bottom-up input. Our model uses of this feedback to determine corrective error signals and ultimately guide synaptic plasticity across multiple areas. Building upon previous work (Urbanczik and Senn, 2014), we adopt a simplified multicompartment neuron and describe pyramidal neurons as three-compartment units (schematically depicted in Fig. 1A; see also Methods). These compartments represent the somatic, basal and apical integration zones that characteristically define neocortical pyramidal cells (Spruston, 2008; Larkum, 2013). The dendritic structure of the model is exploited by having bottom-up and topdown synapses converging onto separate dendritic compartments (basal and distal dendrites, respectively), consistent with experimental observations (Spruston, 2008) and reflecting the preferred connectivity pattern of cortico-cortical projections (Larkum, 2013). Consistent with the neurophysiology of SST interneurons (Urban-Ciecko and Barth, 2016), we 3 P areak PI wk,k vA,k ukI Lateral cancelation 1 PP wk,k I vB,k ukP IP wk,k P P A,1 VA,k 0 100 200 Time [ms] 0 0 1 2 (ii) r 0P 0 P: pyramidal cell I: interneuron 1 + - Sensory input sensory input (i) Training trial (x104) P u: somatic potential B: basal v: dendritic potential A: apical C plasticity ~ 3h vB,k areak area0 - (ii) P uk+1 Topdown feedback + ukI sensory input (i) development (pre-learning) after || pyr. - int. ||2 uk+1 before 0 100 200 Time [ms] Apical potential B P Dendritic potential areak+1 ... areaN areak+1 A 1 0 0 1 2 Training trial (x104) } Figure 1: Dendritic cortical circuit learns to predict self-generated top-down input. (A) Illustration of multi-area network architecture. The network consists of an input area 0 (e.g., thalamic input), one or more intermediate (hidden) areas (represented by area k and area k +1, which can be mapped onto primary and higher sensory areas) and an output area N (e.g. motor cortex) (left). Each hidden area consists of a microcircuit with pyramidal cells and lateral inhibitory interneurons (e.g. somatostatin-positive, SST, cells) (right). Pyramidal cells consist of three compartments: a basal compartment (with voltage vPB,k ) that receives bottom-up input; an apical compartment (vPA,k ), where top-down input converges to; and a somatic compartment (uPk ), that integrates the basal and apical voltage. Interneurons receive input from lateral pyramidal cells onto their own basal dendrites (vIB,k ), integrate this input on their soma (uIk ) and project back to the apical compartments (vPA,k ) of same-area pyramidal cells. (B) In a pre-learning developmental stage, the network learns to predict and cancel top-down feedback given randomly generated inputs. Only pyramidal-to-interneuron PI synapses (WIP k ,k ) and interneuron-to-pyramidal synapses (Wk ,k ) are changed at that stage according to predictive synaptic plasticity rules (defined in Eqs 8 and 9 of the Methods). Example voltage traces for a randomly chosen downstream neuron (uPk +1 ) and a corresponding interneuron (uIk ), a pyramidal cell apical compartment (vPA,k ) and an input neuron (uP0 ), before (i) and after (ii) development, for three consecutively presented input patterns. Once learning of the lateral synapses from and onto interneurons has converged, self-generated top-down signals are predicted by the network — it is in a self-predicting state. Here we use a concrete network with one hidden area and 30-20-10 pyramidal neurons (input-hidden-output), but the particular network dimensions do not impact the ability of the network to produce these results. Note that no desired targets are presented to the output area (cf. Fig. 2); the network is solely driven by random inputs. (C) Lateral inhibition cancels top-down input. (i) Interneurons learn to match next-area pyramidal neuron activity as their input weights WIP k ,k adapt (see main text and Methods for details). (ii) Concurrently, learning of interneuron-to-pyramidal synapses (WPI k ,k ) silences the apical compartment of pyramidal neurons, but pyramidal neurons remain active (cf. B). This is a general effect, as the lateral microcircuit learns to predict and cancel the expected top-down input for every random pattern (see SI). also introduce a second population of cells within each hidden area with both lateral and cross-area connectivity, whose role is to cancel the top-down input. Modelled as two-compartment units (depicted in red, Fig. 1A; see also Methods), such interneurons are predominantly driven by pyramidal cells within the same area through weights WIP i,i , and they project back to the apical dendrites of the same-area pyramidal cells through weights WPI k ,k (see Fig. 1A). Additionally, cross-area feedback onto SST cells originating at the next higher brain area k + 1 provide a weak nudging signal for these interneurons, modelled after Urbanczik and Senn (2014) as a conductance-based so- 4 matic input current. For computational simplicity, we modelled this weak top-down nudging on a one-to-one basis (that can also be relaxed): each interneuron is nudged towards the potential of a corresponding upper-area pyramidal cell. Recent monosynaptic input mapping experiments show that somatostatin-positive cells (SST, of which Martinotti cells are the main type) in fact receive also top-down projections (Leinweber et al., 2017), that according to our proposal encode the weak ’teaching’ signals from higher to lower brain areas. As detailed below, this microcircuit is key to encode and backpropagate errors across the network. We first show how synaptic plasticity of lateral interneuron connections establishes a network regime, which we term self-predicting, whereby lateral input cancels the self-generated top-down feedback, effectively silencing apical dendrites. For this reason, SST cells are functionally inhibitory and are henceforth referred to as interneurons. Crucially, when the circuit is in this so-called selfpredicting state, presenting a novel external signal at the output area gives rise to top-down activity that cannot be explained away by the interneuron circuit. Below we show that these apical mismatches between top-down and lateral input constitute the backpropagated, neuron-specific errors that drive plasticity on the forward weights to the hidden pyramidal neurons. Learning to predict the feedback signals involves adapting both weights from and to the lateral interneuron circuit. Consider a network that is driven by a succession of sensory input patterns (Fig. 1B, bottom row). The exact distribution of inputs is unimportant as long as they span the whole input space (see SI). Learning to cancel the feedback input is divided between both the weights PI from pyramidal cells to interneurons, WIP k ,k , and from interneurons to pyramidal cells, Wk ,k . First, due to the somatic teaching feedback, learning of the WIP k ,k weights leads interneurons to better reproduce the activity of the respective higher brain area k +1 (Fig. 1B (i)). A failure to reproduce area k +1 activity generates an internal prediction error at the dendrites of the interneurons, which triggers synaptic plasticity (as defined by Eq. 8 in the Methods) that corrects for the wrong dendritic prediction and eventually leads to a faithful tracing of the upper area activity by the lower area interneurons (Fig. 1B (ii)). The mathematical analysis (see SI, Eq. S27) shows that the plasticity rule (8) makes the inhibitory population implement the same function of the area-k pyramidal cell activity as done by the area–(k + 1) pyramidal neurons. Thus, the interneurons will learn to mimic the area–(k +1) pyramidal neurons (Fig. 1Ci). Second, as the interneurons mirror upper area activity, inter-to-pyramidal neuron synapses within the same area (WPI k ,k , Eq. 9) successfully learn to cancel the top-down input to the apical dendrite (Fig. 1Cii), independently of the actual input stimulus that drives the network. By doing 5 so, the inter-to-pyramidal neuron weights WPI k ,k learn to mirror the top-down weights onto the lower area pyramidal neurons. The learning of the weights onto and from the interneurons works in parallel: as the interneurons begin to predict the activity of pyramidal cells in area k + 1, it becomes possible for the plasticity at interneuron-to-pyramidal synapses (Eq. 9) to find a synaptic weight configuration which precisely cancels the top-down feedback (see also SI, Eq. S29). At this stage, every pattern of activity generated by the hidden areas of the network is explained by the lateral circuitry, Fig. 1C (ii). Importantly, once learning of the lateral interneurons has converged, the apical input cancellation occurs irrespective of the actual bottom-up sensory input. Therefore, interneuron synaptic plasticity leads the network to a self-predicting state. We propose that the emergence of this state could occur during development, consistent with experimental findings (Dorrn et al., 2010; Froemke, 2015). Starting from a cross-area self-predicting configuration helps learning of specific tasks (but is not essential, see below and Methods). Deviations from self-predictions encode backpropagating errors Having established a self-predicting network, we next show how prediction errors get propagated backwards when a novel input is provided to the output area. This new signal, which we model via the activation of additional somatic conductances in output pyramidal neurons (see Methods), plays the role of a teaching or associative signal (see specific tasks below). Here we consider a concrete implementation of the network model introduced above, with an input, a hidden and an output brain area (areas 0, 1 and 2, respectively; Fig. 2A). We demonstrate learning in the model with a simple task: memorizing a single input-output pattern association. This setup naturally generalizes to multiple memories by iterating over a set of associations to be learned. When the pyramidal cell activity in the output area is nudged towards some desired target (Fig. 2B (i)), the bottom-up synapses WPP 2,1 from the lower area neurons to the basal dendrites are adapted, again according to the plasticity rule that implements the dendritic prediction of somatic spiking (see Eq. 7 in the Methods and Urbanczik and Senn (2014)). What these synapses cannot explain away shows up as a dendritic error in the pyramidal neurons of the lower area 1. In fact, the self-predicting microcircuit can only cancel the feedback that is produced by the lower area activity. Due to the unexplained teaching signal in the output area, the top-down input partially survives the lateral inhibition; this leads to the activation of distal dendrites (Fig. 2B (i)). The mathematical analysis reveals that the apical deviation from baseline encodes an error that is effectively backpropagated from the output area. 6 P vA,1 } error PP w1,1 u1P area 1 P vB,k PP w1,0 1 PP w1,0 P: pyramidal cell 1 0 0 Apical cancelation plasticity ~ 3s P VA,1 r 0P 100 Time [ms] I: interneuron 200 1500 3000 (ii) error 0 0 Time [ms] PP w1,0 sensory input (area 0) u: somatic potential B: basal v: dendritic potential A: apical (i) u Apical topdown Dendritic potential (hidden) area 1 vB,1 IP w1,1 area 0 - PI w1,1 (ii) uassc 2 C after u2P Sensory input + I sensory input new assoc. Output u2P u1I learning before (i) area 2 (output) area 2 output B || pyr. - int. ||2 new assoc. uassc 2 Apical potential A 0 100 200 10 0 0 1500 3000 Time [ms] Time [ms] } Figure 2: Deviations from self-predictions encode backpropagating errors that are used for learning in bottom-up synapses. (A) When a novel associative (or ‘teaching’) signal is presented to the output area (uassoc , blue at the top), a prediction error in the apical compartments of pyra2 midal neurons in the upstream area (area 1, ‘error’) is generated. This error appears as an apical voltage deflection that propagates down to the soma (purple arrow) where it modulates the somatic firing rate. Bottom-up synapses at the basal dendrites learn to predict the somatic firing rate (bottom, green). Only the elements directly involved in encoding the error and modifying the bottom-up synapses are highlighted in this microcircuit. (B) Activity traces in the microcircuit before and after a new associative signal is learned. (i) Before learning, when a new associative signal is presented at the output area (uassoc , blue dashed), the somatic voltage of output neurons changes accordingly 2 (uP2 , grey blue, top). As a result, a new signal is observed in the upstream apical dendrite (vPA,1 , grey bottom) which originates from a mismatch between the top-down feedback (grey blue) and the cancellation given by the lateral interneurons (red). (ii) After ∼3s of learning with this new assoP ciative signal, plasticity at the bottom-up synapses (WPP 1,0 ), which receive sensory input (r0 , green), leads to a near-exact prediction of the new, previously unexplained associative signal uassoc by uP2 . 2 Consequently, the distal dendrite no longer shows a voltage deflection (error), which results from the top-down and lateral cancellation inputs having the magnitude but opposite signs (blue and red traces, respectively). The network now fully reproduces the new associative signal (top). (C) Learning gradually explains away the backpropagated activity. (i) Interneurons learn to predict, and effectively cancel, the backpropagated activity as the lateral weights from the pyramidal-to-interneurons PI (WIP 1,1 ) adapt. (ii) While simultaneously adapting the interneuron-to-pyramidal synapses (W1,1 ), the apical compartment is eventually silenced, even though the pyramidal neurons remain active (not shown). Vertical blue dashed line represents the moment when the new associative signal is presented for the first time. The somatic integration of apical activity induces plasticity at the bottom-up synapses WPP 1,0 on the basal dendrites. As described above, plasticity at these synapses too is governed by the dendritic prediction of somatic activity, just as for the synapses to the interneurons (Eq. 7). As the apical error changes the somatic activity, plasticity of the WPP 1,0 weights tries to further reduce the error in the output area. Importantly, the plasticity rule depends only on information that is available at the synaptic level. More specifically, it is a function of both postsynaptic firing and dendritic branch voltage, as well as presynaptic activity, in par with detailed phenomenological models (Clopath et al., 2010; Bono and Clopath, 2017). In a spiking neuron model, the plasticity rule can reproduce a 7 number of experimental results on spike-timing dependent plasticity (Spicher et al., in preparation). In contrast to the establishing of the self-predicting network state, learning now involves the simultaneous modifications of both lateral circuit and bottom-up synaptic weights (Fig. 2). On the one hand, lateral weights track changes in output area activity, in this way approximately maintaining the network in a self-predicting state throughout learning. On the other hand, the inputs to area 1 pyramidal neurons adapt to reduce prediction errors. Altogether, plasticity eventually leads to a network configuration in which the novel top-down input is successfully predicted (Fig. 2B,C). Cross-area network learns to solve a nonlinear associative task So far we have described the key components of our model in a multi-area network using a toy problem. Now, we turn to more challenging problems. The first of which is a nonlinear associative task, where the network has to learn to associate the sensory input with the output of a separate multi-area network that transforms the same sensory input — this can be recast as a nonlinear regression problem (Fig. 3A; see Methods for details on the architecture and learning conditions). B 1 W PI 1,1 W IP 1,1 W PP 1,0 area 0 after (ii) assoc. r2 C Output 0 r2P Dendritic potential W PP 2,1 before learning ~ 30 h P vA,1 shallow learning 10 0 pyramidal neuron learning 0 0.5 1 Training trial (x104) Sensory input (hidden) area 1 sensory input P vA,1 assoc. r2 other areas (output) area 2 r2P W PP 1,2 (i) associative input Squared error A r 0P 0 100 200 Time [ms] 0 100 200 Time [ms] Figure 3: A multi-area network learns to solve a nonlinear associative task online in continuous time and without phases. (A) Starting from a self-predicting network state (cf. Fig. 1), a 30-20-10 fully-connected pyramidal neuron network learns to approximate a nonlinear function (represented by the ’other areas’ box, another 30-20-10 network) from a stream of input-output pattern pairs. The neuronal and synaptic weight dynamics evolve continuously and without interruption. (B) Example firing rates for a randomly chosen output neuron (r2P , blue noisy trace) and its desired target imposed by the associative input (r2assoc , blue dashed line), together with the voltage in the apical P compartment of a hidden neuron (vA,1 , grey noisy trace) and the input rate from the sensory neuron P (r0 , green). Before learning (i), the apical dendrite of the hidden neuron shows errors in response to three consecutive input patterns that disappear after 30 h of successful learning (ii). The presentation of the novel output target produces deviations from baseline in the apical compartment, visible P in the initial vA,1 trace. Such mismatch signals trigger plasticity in the forward weights WPP 1,0 , which eventually leads to a reduction of the error in the output area, and henceforth a return to baseline of the apical voltage in the hidden area below. (C) Error curves for the full model and a shallow learner for comparison, where no backpropagation of errors occurs and only the output weights WPP 2,1 are adapted. 8 We let learning occur in continuous time without pauses or alternations in plasticity as input patterns are sequentially presented. This is in contrast to previous learning models that rely on computing activity differences over distinct phases, requiring temporally nonlocal computation, or globally coordinated plasticity rule switches (Hinton and McClelland, 1988; O’Reilly, 1996; Xie and Seung, 2003; Scellier and Bengio, 2017; Guerguiev et al., 2017). Furthermore, we relaxed the bottom-up vs. top-down weight symmetry imposed by the backprop algorithm and kept the top-down PP o PP weights WPP 1,2 fixed. Feedback W1,2 weights quickly aligned to ∼ 45 of the forward weights W2,1 T , in line with the recently discovered feedback alignment phenomenon (Lillicrap et al., 2016). This simplifies the architecture, because top-down and interneuron-to-pyramidal synapses need not to be changed. Finally, to test the robustness of the network, we injected a weak noise current to every neuron, as a simple model for uncorrelated background activity (see Methods). Our network was still able to learn this harder task (Fig. 3B), performing considerably better than a shallow learner where only output weights were adjusted (Fig. 3C). Useful changes were thus made to hidden area 1 bottom-up weights; the network effectively solved the credit assignment problem. Multi-area network learns to discriminate handwritten digits Next, we turn to a standard machine learning problem, the classification of handwritten digits from the MNIST database. This data set is popularly used to study the performance of learning models, including various artificial neural networks trained with backprop. Notably, shallow models (e.g., logistic regression) or networks trained with plain Hebbian learning alone suffer from poor performance and do not offer a remedy for the problem. We wondered how our model would fare in this real-world benchmark, in particular whether the prediction errors computed by the interneuron microcircuit would allow learning the weights of a hierarchical nonlinear network with multiple hidden areas. To that end, we trained a deeper, larger 4-area network (with 784-500-500-10 pyramidal neurons, Fig. 4A) by pairing digit images with teaching inputs that nudged the 10 output neurons towards the correct class pattern. To speed up the experiments we studied a simplified network dynamics which determined compartmental potentials without requiring a full neuronal relaxation procedure (see Methods). As in the previous experiments, synaptic weights were randomly initialized and set to a self-predicting configuration where interneurons cancelled top-down inputs, rendering the apical compartments silent before training started. Top-down and interneuron-to-pyramidal weights were kept fixed. The network was able to achieve a test error of 1.96%, Fig. 4B, a figure not overly far from the 9 input hidden 1 hidden 2 B 8 9 10 Test error (%) output A 10 500 8.4% 5 0 0 200 1.96% 1.53% Epochs single-layer 500+500+10 microcircuit 500+300+10 backprop 500 28x28 MNIST handwritten digit images Figure 4: Learning to classify real-world, structured stimuli with a multi-area network. (A) A 784-500-500-10 (i.e. with two hidden areas) network of pyramidal neurons learns to recognize and classify handwritten digits from the MNIST data set. Only a subset of connections is shown to enhance clarity. (B) Competitive accuracy (< 2%, an empirical signature of backprop-like learning) is achieved on the standard MNIST testing dataset by our network (solid blue). For comparison the performance of a shallow learner (i.e. a network in which only output weights are adapted, dashed black) and of a standard artificial neural network trained with backprop (dashed red, see Methods) are also shown. reference mark of non-convolutional artificial neural networks optimized with backprop (1.53%) and comparable to recently published results that lie within the range 1.6-2.4% (Lee et al., 2015; Lillicrap et al., 2016). This was possible even though interneurons had to keep track of changes to forward weights as they evolved, simultaneously and without phases. Indeed, apical compartment voltages remained approximately silent when output nudging was turned off (data not shown), reflecting the maintenance of a self-predicting state throughout learning. Moreover, thanks to a feedback alignment dynamics (Lillicrap et al., 2016), the interneuron microcircuit was able to translate the feedback from downstream areas into single neuron prediction error signals, despite the asymmetry of forward and top-down weights and at odds with exact backprop. Disinhibition enables sensory input generation and sharpening So far we assumed that feedback from downstream neurons is relayed through fixed top-down synapses. However, this need not be so. As we demonstrate next, the interneuron microcircuit is capable of tracking changes to the top-down stream dynamically as learning progresses. This endows the model with important additional flexibility, as feedback connections — known to mediate attention and perceptual acuity enhancement in sensory cortices — are likely plastic (Huber et al., 10 2012; Petreanu et al., 2012; Manita et al., 2015; Makino and Komiyama, 2015; Attinger et al., 2017; Leinweber et al., 2017). B hidden output A input C 0 0 200 Epochs 100 100 ^ 2.48% (ii) ||r1P-r1P||2 Test error (%) 5 (i) ^ E 10 ||r0P-r0P||2 D 0 0 200 Epochs 0 0 200 Epochs Figure 5: Top-down synapses can be adapted to simultaneously drive bottom-up learning, input construction and denoising. (A) Classification performance of a 784-1000-10 network exposed to MNIST images, with plastic top-down synapses that learns to predict lower-area activities. Top-down and forward weights co-adapt without pauses or phases. (B) Driving the network topto-bottom (i.e., initializing the output area to a particular digit and turning off lateral and bottom-up inputs of both hidden and input areas) recreates class-specific image examples in the input area. The top-down connections can be tuned to encode a simple inverse visual model. (C) Such an inverse model yields image denoising, which can be achieved by reconstructing corrupted inputs from hidden area activities. (D) The network also successfully learns to classify images. (E) Inverse reconstruction losses of original images (i) and hidden (ii) neuron activities. Top-down synapses connecting hidden pyramidal neurons back to the input area learn to reconstruct pixel arrangements given hidden neuron activities; synapses originating at the output area learn to predict hidden area activities given the current class label estimate. As a case in point we considered a simple extension to a three-area network of 784-1000-10 pyramidal neurons again exposed to MNIST images, Fig. 5. The architecture is as before, except that we now let dendritic predictive plasticity shape the top-down weights from output to hidden PP neurons WPP 1,2 as well as an extra set of weights W0,1 connecting hidden neurons back to the input area (see Eq. 10 in the Methods). In this extended network, top-down synapses learn to predict the activities of the corresponding area below and thus implement an approximate inverse of the forward model. In effect, these connections play a dual role, beyond their sole purpose in backprop. They communicate back upper area activities to improve the hidden neuron representation on a recognition task, and they learn to invert the induced forward model. This paired encoder-decoder architecture is known as target propagation in machine learning (Bengio, 2014; Lee et al., 2015). Our compartmental pyramidal 11 neuron model affords a simple design for the inverse learning paradigm: once more, plasticity of top-down synapses is driven by a postsynaptic dendritic error factor, comparing somatic firing with a local branch potential carrying the current top-down estimate. Importantly, our results show that the network still learned to recognize handwritten digits, Fig. 5A, reaching a classification error of 2.48% on the test set. This again highlights that not only transposed forward weight matrices, as prescribed by backprop, deliver useful error signals to hidden areas. In this experiment, we initialized every weight matrix randomly and independently, and did not pre-learn lateral circuit weights. Although forward, top-down and lateral weights were all jointly adapted starting from random initial conditions, a self-predicting state quickly ensued, leading to a drop in classification error. Concomitantly, the reconstructions of hidden neuron activities and input images improved, Fig. 5B. The learned inverse model can be used to generate prototypical digit images in the input area. We examined qualitatively its performance by directly inspecting the produced images. Specifically, for each digit class we performed a top-to-bottom pass with lateral inhibition turned off, starting from the corresponding class pattern rP2 . For simplicity, we disabled basal feedforward inputs as well to avoid recurrent effects (see Methods). This procedure yielded prototype reconstructions PP P r̂P0 = φ(WPP 0,1 φ(W1,2 r2 )) which resemble natural handwritten digits, Fig. 5C, confirming the observed decrease in reconstruction loss. Crucially, for the network to be able to generate images, the apical dendrites of hidden neurons should be fully driven by their top-down inputs. In terms of our microcircuit implementation, this is achieved by momentarily disabling the contributions from lateral interneurons. A switch-like disinhibition (Pi et al., 2013) is thus capable of turning apical dendrites from error signalling devices into regular prediction units: the generative mode corresponds to a disinhibited mode of operation. Due to their preferential targetting of SST interneurons, VIP interneurons are likely candidates to implement this switch. Recent reports support the view that cortico-cortical feedback to distal dendrites plays an active role as mice engage in perceptual discrimination tasks (Manita et al., 2015; Makino and Komiyama, 2015; Takahashi et al., 2016). Inspired by these findings, we further tested the capabilities of the model in a visual denoising task, where the prior knowledge incorporated in the top-down network P weights is leveraged to improve perception. In Fig. 5D, we show the reconstructions r̂P0 = φ(WPP 0,1 r1 ) obtained after presenting randomly picked MNIST images from the test set that had been corrupted with additive Gaussian noise. We show only the apical predictions carried by top-down inputs back 12 to sensory area 0, without actually changing area 0 activity. Interestingly, we found that the hidden neuron representations shaped by classification errors served as reasonable visual features for the inverse model as well. Most of the noise was filtered out, although some of the finer details of the original images were lost in the process. Discussion How the brain successfully assigns credit and modifies specific synaptic connections given a global associative signal has puzzled neuroscientists for decades. Here we have introduced a novel framework in which a single neuron is capable of transmitting predictions as well as prediction errors. These neuron-specific errors are encoded at distal dendrites and are kept in check by lateral (e.g. somatostatin-expressing) interneurons. Next, local synaptic plasticity mechanisms use such dendritic-encoded prediction errors to correctly adjust synapses. We have shown that these simple principles allow networks of multiple areas to successfully adjust their weights in challenging tasks, and that this form of learning approximates the well known backpropagation of errors algorithm. Experimental predictions Because our model touches on a number of levels: from brain areas to microcircuits, dendritic compartments and synapses, it makes several predictions. Here we highlight some of these predictions and related experimental observations: (1) Dendritic error representation. Probably the most fundamental feature of the model is that dendrites, in particular distal dendrites, encode error signals that instruct learning of lateral and downstream connections. This means that during a task that required the association of two brain areas to develop, lateral interneurons would modify their synaptic weights such that the top-down signals are cancelled. Moreover, during learning, or if this association is broken, a dendritic error signal should be observed. While monitoring such dendritic signals during learning is challenging, there is recent experimental evidence that supports this model. Mice were trained in a simple visuomotor task where the visual flow in a virtual environment presented to the animal was coupled to its own movement (Zmarz and Keller, 2016; Attinger et al., 2017). When this coupling was broken (by stopping the visual flow) mismatch signals were observed in pyramidal cells, consistent with the prediction error signals predicted by our model. (2) Lateral inhibition of apical activity. Our apical error representation is based on lateral inhibitory feedback to distal dendritic compartments of pyramidal cells. There is evidence for top-down 13 feedback to target distal (layer-1) synapses of both layer-2/3 and layer-5 pyramidal cells (Petreanu et al., 2009), and both cell types have lateral somatostatin interneurons which target the distal dendrites of the respective pyramidal cells (Markram et al., 2004). The cancellation of the feedback provided by somatostatin interneurons should be near-exact both in its magnitude and delay. In the brain, there can be a substantial delay between the lateral excitatory input and the feedback from other brain areas (in the order of tens to hundreds of milliseconds (Cauller and Kulics, 1991; Larkum, 2013)), suggesting that the lateral inhibitory interaction mediated by SST cells should be also delayed and tuned to the feedback. Interestingly, there is strong experimental support for a delayed inhibition mediated by pyramidal-to-SST connections (Silberberg and Markram, 2007; Murayama et al., 2009; Berger et al., 2009; Berger et al., 2010), which could in principle be tuned to match both the delay and magnitude of the feedback signal. Moreover, the spontaneous activity of SST interneurons is relatively high (Urban-Ciecko and Barth, 2016), which again is consistent with our model as SST interneurons need to constantly match the top-down input received by neighbouring pyramidal cells. We would predict that these levels of spontaneous firing rates in SST should match the level of feedback received by the pyramidal cells targeted by a particular SST interneuron. In addition, our model predicts the need for a weak top-down input onto SST interneurons. Again, this is in line with recent top-down connectivity studies suggesting that SST can indeed provide such a precise cancellation of the top-down excitatory inputs (Zhang et al., 2014; Leinweber et al., 2017). (3) Hierarchy of prediction errors A further implication of our multi-area learning model is that a high-level prediction error occurring at some higher cortical area would imply also lower-level prediction errors to co-occur at earlier areas. For instance, a categorization error occurring when a visual object is misclassified, would be signalled backwards through our interneuron circuits to lower areas where the individual visual features of the objects are represented. Recent experimental observations in the macaque face-processing hierarchy support this view (Schwiedrzik and Freiwald, 2017). We predict that higher-area activity modulates lower-area activity with the purpose to shape synaptic plasticity at these lower areas. Here we have focused on the role of SST cells as a feedback-specific interneuron. There are many more interneuron types that we do not consider in our framework. One such type are the PV (parvalbumin-positive) cells, which have been postulated to mediate a somatic excitation-inhibition balance (Vogels et al., 2011; Froemke, 2015) and competition (Masquelier and Thorpe, 2007; Nessler et al., 2013). These functions could in principle be combined with the framework intro14 duced here, or as we suggest below, PV interneuron may be involved in representing yet another type of prediction errors different from the classification errors considered so far. VIP (vasoactive intestinal peptide) interneurons that are believed to be engaged in cortical disinhibition (Letzkus et al., 2015) are assumed in our framework to switch between the discriminative mode and the local attention mode in which lower area activity is generated out of higher area activity (see Fig. 5). We have focused on an interpretation of our predictive microcircuits as learning across brain areas, but they may also be interpreted as learning across different groups of pyramidal cells within the same brain area. Comparison to previous approaches It has been suggested that error backpropagation could be approximated by an algorithm that requires alternating between two learning phases, known as contrastive Hebbian learning (Ackley et al., 1985). This link between the two algorithms was first established for an unsupervised learning task (Hinton and McClelland, 1988) and later analyzed (Xie and Seung, 2003) and generalized to a broader class of models (O’Reilly, 1996; Scellier and Bengio, 2017). The two phases needed for contrastive Hebbian learning are: (i) for each input pattern, the network first has to settle down being solely driven by inputs; then, (ii) the process is repeated while additionally driving outputs towards a desired target state. Learning requires subtracting activity patterns recorded on each phase — and therefore requires storing activity in time — or changing plasticity rules across the network on a coordinated, phase-dependent manner, which appears to be biologically implausible. Two-phase learning recently reappeared in a study which, like ours, uses compartmental neurons (Guerguiev et al., 2017). In this more recent work, the difference between the activity of the apical dendrite in the presence and the absence of the teaching input represents the error that induces plasticity at the forward synapses. This error is used directly for learning the bottom-up synapses without influencing the somatic activity of the pyramidal cell. In contrast, we postulate that the apical dendrite has an explicit error representation at every moment in time by simultaneously integrating top-down excitation and lateral inhibition. As a consequence, we do not need to postulate separate temporal phases, and our network operates continuously in time while plasticity at all synapses is always turned on. The solution proposed here to avoid two-phase learning relies on a plastic microcircuit that provides functional lateral inhibition. All the involved plasticity rules are error-correcting in spirit and can be understood as learning to match a certain target voltage. For the synapses from the interneu- 15 rons to the apical dendrite of the pyramidal neurons, the postsynaptic target is the resting potential, and hence the (functionally) inhibitory plasticity rule can be seen as achieving a dendritic balance, similarly to the homeostatic balance of inhibitory synaptic plasticity as previously suggested (Vogels et al., 2011; Luz and Shamir, 2012). Yet, in our model, inhibitory plasticity plays a central role in multi-area, deep error coding, which goes beyond the standard view of inhibitory plasticity as a homeostatic stabilizing force (Keck et al., 2017). Error minimization is an integral part of brain function according to predictive coding theories (Rao and Ballard, 1999; Friston, 2005), and backprop can be mapped onto a predictive coding network architecture (Whittington and Bogacz, 2017). From a formal point of view this approach is encompassed by the framework introduced by LeCun (1988). A possible network implementation is suggested by Whittington and Bogacz (2017) that requires intricate circuitry with appropriately tuned error-representing neurons. According to that model, the only plastic synapses are those that connect prediction and error neurons. We built upon the previously made observation that top-down and bottom-up weights need not be in perfect agreement to enable multi-area error-driven learning (Lee et al., 2015; Lillicrap et al., 2016). Consistent with these findings, the strict weight symmetry arising in the classical error backpropagation algorithm is not required in our case either for a successful learning in hidden area neurons. We have also shown that top-down synapses can be learned using the same dendritic predictive learning rule used at the remaining connections. In our model, the top-down connections have a dual role: they are involved in the apical error representation and, they learn to match the somatic firing driven by the bottom-up input (Urbanczik and Senn, 2014). The simultaneous learning of the bottom-up and top-down pathways leads to the formation of a generative network that can denoise sensory input or generate dream-like inputs (Fig. 5). Finally, the framework introduced here could also be adapted to other types of error-based learning, such as in generative models that instead of learning to discriminate sensory inputs, learn to generate following sensory input statistics. Error propagation in these forms of generative models, which arise from an inaccurate prediction of sensory inputs, may rely on different dendritic compartments and interneurons, such as the previously mentioned PV inhibitory cells (Petreanu et al., 2009). 16 Acknowledgements The authors would like to thank Timothy P. Lillicrap, Blake Richards, Benjamin Scellier and Mihai A. Petrovici for helpful discussions. WS thanks Matthew Larkum for many discussions on dendritic processing and the option of dendritic error representation. In addition, JS thanks Elena Kreutzer, Pascal Leimer and Martin T. Wiechert for valuable feedback and critical reading of the manuscript. This work has been supported by the Swiss National Science Foundation (grant 310030L156863, WS) and the Human Brain Project. 17 Methods Neuron and network model. The somatic membrane potentials of pyramidal neurons and interneurons evolve in time according to   d P uk (t) = −glk uPk (t) + gB vPB,k (t) − uPk (t) + gA vPA,k (t) − uPk (t) + σ ξ (t) dt  d I uk (t) = −glk uIk (t) + gD vIk (t) − uIk (t) + iIk (t) + σ ξ (t), dt (1) (2) with one such pair of dynamical equations for every hidden area 0 < k < N; input area neurons are indexed by k = 0. Eqs. 1 and 2 describe standard conductance-based voltage integration dynamics, having set membrane capacitance to unity and resting potential to zero for clarity purposes. Background activity is modelled as a Gaussian white noise input, ξ in the equations above. To keep the exposition brief we use matrix notation, and denote by uPk and uIk the vectors of pyramidal and interneuron somatic voltages, respectively. Both matrices and vectors, assumed column vectors by default, are typed in boldface here and throughout. As described in the main text, pyramidal hidden neurons are taken as three-compartment neurons to explicitly incorporate basal and apical dendritic integration zones into the model, inspired by the design of L2/3 pyramidal cells. The two dendritic compartments are coupled to the soma with effective transfer conductances gB and gA , respectively. Compartmental potentials are given in instantaneous form by P vPB,k (t) = WPP k ,k −1 φ(uk −1 (t)) (3) P PI I vPA,k (t) = WPP k ,k +1 φ(uk +1 (t)) + Wk ,k φ(uk (t)), (4) where φ(u) is the neuronal transfer function, which acts componentwise on u. Although the design can be extended to more complex morphologies, in the framework of dendritic predictive plasticity two compartments suffice to compare desired target with actual prediction. Hence, aiming for simplicity, we reduce pyramidal output neurons to two-compartment cells, essentially following Urbanczik and Senn (2014); the apical compartment is absent (gA = 0 in Eq. 1) and basal voltages are as defined in Eq. 3. Synapses proximal to the somata of output neurons provide direct external teaching input, incorporated as an additional source of current iPN . For any given such neuron, excitatory and inhibitory conductance-based input generates a somatic current 18 P P iNP (t) = gexc,N (t) Eexc − uNP (t) + ginh,N (t) Einh − uNP (t) , where Eexc and Einh are excitatory and in-   hibitory synaptic reversal potentials, respectively. The point at which no current flows, iNP = 0, defines trgt the target teaching voltage uN towards which the neuron is nudged. Interneurons are similarly modelled as two-compartment cells, cf. Eq. 2. Lateral dendritic projections from neighboring pyramidal neurons provide the main source of input P vIk (t) = WIP k ,k φ(uk (t)), (5) whereas cross-area, top-down synapses define the teaching current iIk . Specifically, an interneuron at area k receives private somatic teaching excitatory and inhibitory input from a pyramidal neuron u P −E u P −E exc inh I I , ginh,k , where gsom is some = −gsom Ek+1 at area k+1 balanced according to gexc,k = gsom Ek+1 exc −Einh exc −Einh constant scale factor denoting overall nudging strength; with this setting, the interneuron is nudged to follow the corresponding next area pyramidal neuron. Synaptic plasticity. Our model synaptic weight update functions belong to the class of dendritic predictive plasticity rules (Urbanczik and Senn, 2014; Spicher et al., in preparation) that can be expressed in general form as d w = η h(v ) (φ(u) − φ(v )) r , dt (6) where w is an individual synaptic weight, η is a learning rate, u and v denote distinct compartmental potentials, φ is a rate function, third factor h is a function of potential v , and r is the presynaptic input. Eq. 6 was originally derived in the light of reducing the prediction error of somatic spiking, when u represents the somatic potential and v is a function of the postsynaptic dendritic potential. Concretely, the plasticity rules for the various connection types present in the network are:  P T d PP P P rk −1 , Wk ,k −1 = ηkPP ,k −1 φ(uk ) − φ(v̂B,k ) dt  T d IP Wk ,k = ηkIP,k φ(uIk ) − φ(v̂Ik ) rPk , dt  T d PI Wk ,k = ηkPI,k vrest − vPA,k rIk , dt (7) (8) (9) where (·)T denotes vector transpose and rk ≡ φ(uk ) the area k firing rates. So the strengths of plastic synapses evolve according to the correlation of dendritic prediction error and presynaptic rate and can undergo both potentiation or depression depending on the sign of the first factor. For basal synapses, such prediction error factor amounts to a difference between postsynaptic 19 rate and a local dendritic estimate which depends on the branch potential. In Eqs. 7 and 8, dendritic predictions v̂PB,k = gB glk +gB +gA vPB,k and v̂Ik = gD glk +gD vIk take into account dendritic attenuation factors. Meanwhile, plasticity rule (9) of lateral interneuron-to-pyramidal synapses aims to silence (i.e., set to resting potential vrest = 0, here and throughout null for simplicity) the apical compartment; this introduces an attractive state for learning where the contribution from interneurons balances topdown dendritic input. The learning rule of apical-targetting synapses can be thought of as a dendritic variant of the homeostatic inhibitory plasticity proposed by Vogels et al. (2011). In the experiments where the top-down connections are plastic (cf. Fig. 5), the weights evolve according to  P T d PP P P Wk ,k +1 = ηkPP rk +1 , ,k +1 φ(uk ) − φ(v̂TD,k ) dt (10) with v̂PTD,k = Wk ,k +1 rPk+1 . An implementation of this rule requires a subdivision of the apical compartment into a distal part receiving the top-down input (with voltage v̂PTD,k ) and a more proximal part receiving the lateral input from the interneurons (with voltage vPA,k ). Nonlinear function approximation task. In Fig. 3, a pyramidal neuron network learns to approximate a random nonlinear function implemented by a held-aside feedforward network with the same (30-20-10) dimensions; this ensures that the target function is realizable. One teaching trgt example consists of a randomly drawn input pattern rP0 assigned to corresponding target r2 = trgt P φ(Wtrgt 2,1 φ(W1,0 r0 )). Teacher network weights and input pattern entries are sampled from a uniform distribution U(−1, 1). We choose a soft rectifying nonlinearity as the neuronal transfer function, φ(u) = log(1 + exp(u)). PP The pyramidal neuron network is initialized to a self-predicting state where WIP 1,1 = W2,1 and PP PP WPI 1,1 = −W1,2 . Top down weight matrix W1,2 is fixed and set at random with entries drawn from a uniform distribution. Output area teaching currents iP2 are set so as to nudge uP2 towards the trgt teacher-generated u2 . Reported error curves are exponential moving averages of the sum of trgt squared errors loss kr2P − r2 k2 computed after every example on unseen input patterns. Plasticity induction terms given by the right-hand sides of Eqs. 7-9 are low-pass filtered with time constant τw before being definitely consolidated, to dampen fluctuations; synaptic plasticity is kept on throughout. Plasticity and neuron model parameters are given in the accompanying supplementary material. MNIST image classification and reconstruction tasks. When simulating the larger models 20 used on the MNIST data set we resort to a discrete-time network dynamics where the compartmental potentials are updated in two steps before applying synaptic changes. The simplified model dynamics is as follows. For each presented MNIST image, both pyramidal and interneurons are first initialized to their bottom-up prediction state (3), uk = vB,k , starting from trgt area 1 upto top area N. Output area neurons are then nudged towards their desired target uN , trgt yielding updated somatic potentials uPN = (1 − λN ) vB,N + λN uN . To obtain the remaining final compartmental potentials, the network is revisited in reverse order, proceeding from area k = N − 1 down to k = 1. For each k, interneurons are first updated to include top-down teaching signals, uIk = (1 − λI ) vIk + λI uPk +1 ; this yields apical compartment potentials according to (4), after which we update hidden area somatic potentials as a convex combination with mixing factor λk . The convex combination factors introduced above are directly related to neuron model parameters as conductance ratios. Synaptic weights are then updated according to Eqs. 7-10. Such simplified dynamics approximates the full recurrent network relaxation in the deterministic setting σ → 0, with the approximation improving as the top-down dendritic coupling is decreased, gA → 0. We train the models on the standard MNIST handwritten image database, further splitting the training set into 55000 training and 5000 validation examples. The reported test error curves are computed on the 10000 held-aside test images. The four-area network shown in Fig. 4 is initialized in a self-predicting state with appropriately scaled initial weight matrices. To speed-up training we use a mini-batch strategy on every learning rule, whereby weight changes are averaged across 10 images before being actually consolidated. We take the neuronal transfer function φ to be a logistic function, φ(u) = 1/(1 + exp(−u)) and include a learnable threshold on each neuron, modelled as an additional input fixed at unity with plastic weight. Desired target class vectors are 1-hot coded, with trgt rN ∈ {0.1, 0.8}. During testing, the output is determined by picking the class label corresponding to the neuron with highest firing rate. Model parameters are given in full in the supplementary material. To generate digit prototypes as shown in Fig. 5C, the network is ran feedforward in a top-tobottom fashion: a pass of pyramidal neuron activations is performed, while disabling the feedforward stream as well as the interneuron negative lateral contributions. For this reason, this mode of recall is referred to in the main text as the disinhibited mode. The output area is initialized to the 1-hotcoded pattern corresponding to the desired digit class. The denoised images shown in Fig. 5D are the top-down predictions r̂0 = φ(v̂PTD,0 ) obtained after 21 presenting randomly selected digit examples from the test set, corrupted with additive Gaussian noise of standard deviation σ = 0.3. The network states are determined by the two-step procedure described above. Recurrent effects are therefore ignored, as a single backward step is performed. Computer code. For the first series of experiments (Figs. 1-3) we wrote custom Mathematica (Wolfram Research, Inc.) code. The larger MNIST networks (Figs. 4 and 5) were simulated in Python using the TensorFlow framework. References Ackley DH, Hinton GE, Sejnowski TJ (1985) A learning algorithm for Boltzmann machines. Cognitive Science 9:147–169. Attinger A, Wang B, Keller GB (2017) Visuomotor coupling shapes the functional development of mouse visual cortex. Cell 169:1291–1302.e14. Bengio Y (2014) How auto-encoders could provide credit assignment in deep networks via target propagation. arXiv:1407.7906 . Berger TK, Perin R, Silberberg G, Markram H (2009) Frequency-dependent disynaptic inhibition in the pyramidal network: a ubiquitous pathway in the developing rat neocortex. The Journal of physiology 587:5411–5425. Berger TK, Silberberg G, Perin R, Markram H (2010) Brief bursts self-inhibit and correlate the pyramidal network. PLOS Biology 8:e1000473. Bono J, Clopath C (2017) Modeling somatic and dendritic spike mediated plasticity at the single neuron and network level. Nature Communications 8:706. Bottou L (1998) Online algorithms and stochastic approximations. In Saad D, editor, Online Learning and Neural Networks. Cambridge University Press, Cambridge, UK. Cauller LJ, Kulics AT (1991) The neural basis of the behaviorally relevant N1 component of the somatosensory-evoked potential in SI cortex of awake monkeys: evidence that backward cortical projections signal conscious touch sensation. Experimental Brain Research 84:607–619. Clopath C, Büsing L, Vasilaki E, Gerstner W (2010) Connectivity reflects coding: a model of voltage-based stdp with homeostasis. Nature Neuroscience 13:344–352. 22 Costa RP, Assael YM, Shillingford B, de Freitas N, Vogels TP (2017) as gated-recurrent neural networks Cortical microcircuits In Advances in Neural Information Processing Systems, pp. 271–282. Crick F (1989) The recent excitement about neural networks. Nature 337:129–132. Dorrn AL, Yuan K, Barker AJ, Schreiner CE, Froemke RC (2010) Developmental sensory experience balances cortical excitation and inhibition. Nature 465:932–936. Friedrich J, Urbanczik R, Senn W (2011) Spatio-temporal credit assignment in neuronal population learning. PLOS Computational Biology 7:e1002092. Friston K (2005) A theory of cortical responses. Philosophical Transactions of the Royal Society of London B: Biological Sciences 360:815–836. Froemke RC (2015) Plasticity of cortical excitatory-inhibitory balance. Annual Review of Neuroscience 38:195–219. Grossberg S (1987) Competitive learning: From interactive activation to adaptive resonance. Cognitive Science 11:23–63. Guerguiev J, Lillicrap TP, Richards BA (2017) Towards deep learning with segregated dendrites. eLife 6:e22901. Hinton GE, McClelland JL (1988) Learning representations by recirculation. In Anderson DZ, editor, Neural Information Processing Systems, pp. 358–366. American Institute of Physics. Huber D, Gutnisky DA, Peron S, O’Connor DH, Wiegert JS, Tian L, Oertner TG, Looger LL, Svoboda K (2012) Multiple dynamic representations in the motor cortex during sensorimotor learning. Nature 484:473–478. Keck T, Toyoizumi T, Chen L, Doiron B, Feldman DE, Fox K, Gerstner W, Haydon PG, Hübener M, Lee HK, Lisman JE, Rose T, Sengpiel F, Stellwagen D, Stryker MP, Turrigiano GG, van Rossum MC (2017) Integrating Hebbian and homeostatic plasticity: the current state of the field and future research directions. Philosophical Transactions of the Royal Society of London B: Biological Sciences 372. Khaligh-Razavi SM, Kriegeskorte N (2014) Deep supervised, but not unsupervised, models may explain it cortical representation. PLOS Computational Biology 10:1–29. 23 Larkum M (2013) A cellular mechanism for cortical associations: an organizing principle for the cerebral cortex. Trends in Neurosciences 36:141–151. LeCun Y (1988) A theoretical framework for back-propagation. In Touretzky D, Hinton G, Sejnowski T, editors, Proceedings of the 1988 Connectionist Models Summer School, pp. 21–28. Morgan Kaufmann, Pittsburg, PA. LeCun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521:436–444. Lee DH, Zhang S, Fischer A, Bengio Y (2015) Difference target propagation. In Machine Learning and Knowledge Discovery in Databases, pp. 498–515. Springer. Leinweber M, Ward DR, Sobczak JM, Attinger A, Keller GB (2017) A Sensorimotor Circuit in Mouse Cortex for Visual Flow Predictions. Neuron 95:1420–1432.e5. Letzkus JJ, Wolff SBE, Lüthi A (2015) Disinhibition, a Circuit Mechanism for Associative Learning and Memory. Neuron 88:264–276. Lillicrap TP, Cownden D, Tweed DB, Akerman CJ (2016) Random synaptic feedback weights support error backpropagation for deep learning. Nature Communications 7:13276. Luz Y, Shamir M (2012) Balancing feed-forward excitation and inhibition via Hebbian inhibitory synaptic plasticity. PLOS Computational Biology 8:e1002334. Makino H, Komiyama T (2015) Learning enhances the relative impact of top-down processing in the visual cortex. Nature Neuroscience 18:1116–1122. Manita S, Suzuki T, Homma C, Matsumoto T, Odagawa M, Yamada K, Ota K, Matsubara C, Inutsuka A, Sato M et al. (2015) A top-down cortical circuit for accurate sensory perception. Neuron 86:1304–1316. Marblestone AH, Wayne G, Kording KP (2016) Toward an integration of deep learning and neuroscience. Frontiers in Computational Neuroscience 10:94. Markram H, Toledo-Rodriguez M, Wang Y, Gupta A, Silberberg G, Wu C (2004) Interneurons of the neocortical inhibitory system. Nature Reviews Neuroscience 5:793–807. Masquelier T, Thorpe S (2007) Unsupervised learning of visual features through spike timing dependent plasticity. PLOS Computational Biology 3. 24 Murayama M, Pérez-Garci E, Nevian T, Bock T, Senn W, Larkum ME (2009) Dendritic encoding of sensory stimuli controlled by deep cortical interneurons. Nature 457:1137–1141. Nessler B, Pfeiffer M, Buesing L, Maass W (2013) Bayesian computation emerges in generic cortical microcircuits through spike-timing-dependent plasticity. PLOS Computational Biol- ogy 9:e1003037. O’Reilly RC (1996) Biologically plausible error-driven learning using local activation differences: The generalized recirculation algorithm. Neural Computation 8:895–938. Petreanu L, Gutnisky DA, Huber D, Xu Nl, O’Connor DH, Tian L, Looger L, Svoboda K (2012) Activity in motor-sensory projections reveals distributed coding in somatosensation. Nature 489:299–303. Petreanu L, Mao T, Sternson SM, Svoboda K (2009) The subcellular organization of neocortical excitatory connections. Nature 457:1142–1145. Pi HJ, Hangya B, Kvitsiani D, Sanders JI, Huang ZJ, Kepecs A (2013) Cortical interneurons that specialize in disinhibitory control. Nature 503:521–524. Poort J, Khan AG, Pachitariu M, Nemri A, Orsolic I, Krupic J, Bauza M, Sahani M, Keller GB, MrsicFlogel TD, Hofer SB (2015) Learning enhances sensory and multiple non-sensory representations in primary visual cortex. Neuron 86:1478–1490. Rao RP, Ballard DH (1999) Predictive coding in the visual cortex: a functional interpretation of some extra-classical receptive-field effects. Nature Neuroscience 2:79–87. Roelfsema PR, van Ooyen A (2005) Attention-gated reinforcement learning of internal representations for classification. Neural Computation 17:2176–2214. Rumelhart DE, Hinton GE, Williams RJ (1986) Learning representations by back-propagating errors. Nature 323:533–536. Scellier B, Bengio Y (2017) Equilibrium propagation: Bridging the gap between energy-based models and backpropagation. Frontiers in Computational Neuroscience 11:24. Schwiedrzik CM, Freiwald WA (2017) High-level prediction signals in a low-level area of the macaque face-processing hierarchy. Neuron 96:89–97.e4. 25 Silberberg G, Markram H (2007) Disynaptic inhibition between neocortical pyramidal cells mediated by Martinotti cells. Neuron 53:735–746. Spicher D, Clopath C, Senn W (in preparation) Predictive plasticity in dendrites: from a computational principle to experimental data. Spruston N (2008) Pyramidal neurons: dendritic structure and synaptic integration. Nature Reviews Neuroscience 9:206–221. Sutton RS, Barto AG (1998) Reinforcement learning: An introduction, Vol. 1 MIT Press, Cambridge, Mass. Takahashi N, Oertner TG, Hegemann P, Larkum ME (2016) Active cortical dendrites modulate perception. Science 354:1587–1590. Urban-Ciecko J, Barth AL (2016) Somatostatin-expressing neurons in cortical networks. Nature Reviews Neuroscience 17:401–409. Urbanczik R, Senn W (2014) Learning by the dendritic prediction of somatic spiking. Neuron 81:521–528. Vogels TP, Sprekeler H, Zenke F, Clopath C, Gerstner W (2011) Inhibitory plasticity balances excitation and inhibition in sensory pathways and memory networks. Science 334:1569–1573. Whittington JCR, Bogacz R (2017) An approximation of the error backpropagation algo- rithm in a predictive coding network with local Hebbian synaptic plasticity. Neural Computation 29:1229–1262. Xie X, Seung HS (2003) Equivalence of backpropagation and contrastive Hebbian learning in a layered network. Neural Computation 15:441–454. Yamins DL, DiCarlo JJ (2016) Using goal-driven deep learning models to understand sensory cortex. Nature Neuroscience 19:356–365. Yamins DL, Hong H, Cadieu CF, Solomon EA, Seibert D, DiCarlo JJ (2014) Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences 111:8619–8624. 26 Zhang S, Xu M, Kamigaki T, Do JPH, Chang WC, Jenvay S, Miyamichi K, Luo L, Dan Y (2014) Long-range and local circuits for top-down modulation of visual cortex processing. Science 345:660–665. Zmarz P, Keller GB (2016) Mismatch receptive fields in mouse visual cortex. Neuron 92:766–772. 27 Supplementary information Supplementary data Below we detail the model parameters used to generate the figures presented in the main text. Fig. 1 details. The parameters for the compartmental model neuron were: gA = 0.8, gB = gD = 1.0, glk = 0.1. Interneuron somatic teaching conductances were balanced to yield overall nudging strength gsom = 0.8. Initial weight matrix entries were independently drawn from a uniform distribution U(−1, 1). We chose background activity levels of σ = 0.1. The learning rates were set IP PI as η1,1 = 0.0002375 and η1,1 = 0.0005. Input patterns were smoothly transitioned by low-pass filtering uP0 with time constant τ0 = 3. A transition between patterns was triggered every 100 ms. Weight changes were low pass filtered with time constant τw = 30. The dynamical equations were solved using Euler’s method with a time step of 0.1, which resulted in 1000 integration time steps per pattern. PP IP PP Fig. 2 details. We used learning rates η1,0 = η1,1 = 0.0011875 and η2,1 = 0.0005. Remaining parameters as used for Fig. 1. PP Fig. 3 details. Initial forward weights WPP 1,0 and W2,1 were scaled down by a factor of 0.1. IP PP Background noise level was raised to σ = 0.3. The learning rates were η1,1 = 0.00002375, η1,0 = PP PI 0.00011875, η2,1 = 0.00001. Weight matrices WPP 1,2 and W1,1 were kept fixed, so the model relied on a feedback alignment mechanism to learn. Remaining parameters as used for Fig. 1. Fig. 4 details. We chose mixing factors λ3 = λI = 0.1 and λ1 = λ2 = 0.3. Forward learning rates PP PP PP PP PP IP PP were η3,2 = 0.001/λ3 , η2,1 = η3,2 /λ2 , η1,0 = η2,1 /λ1 . Lateral learning rates were η2,2 = 2η3,2 and IP PP η1,1 = 2η2,1 . Initial forward weights were drawn at random from a uniform distribution U(−0.1, 0.1), and the remaining weights from U(−1, 1). Fig. 5 details. We took all mixing factors equal λ2 = λ1 = λI = 0.1. Forward learning rates: PP PP PP IP PI PP η2,1 = 0.02/λ2 , η1,0 = η2,1 /λ1 . Lateral connections learned with rate η1,1 = η1,1 = η2,1 . Top-down connections were initialized from a uniform distribution U(−0.1, 0.1) and adapted with learning rates PP PP η1,2 = 0.0002 and η0,1 = 0.0001. 28 Supplementary analysis In this supplementary note we present a set of mathematical results concerning the network and plasticity model described in the main text. To proceed analytically we make a number of simplifying assumptions. Unless noted otherwise, we study the network in a deterministic setting and consider the limiting case where lateral microcircuit synaptic weights match the corresponding forward weights: PP PI∗ WPI k ,k = −Wk ,k +1 ≡ Wk ,k WIP k ,k = (S1) gB + glk ∗ WPP ≡ WIP k ,k , gB + gA + glk k +1,k (S2) The particular choice of proportionality factors, which depend on the neuron model parameters, is motivated below. Under the above configuration, the network becomes self-predicting. To formally relate the encoding and propagation of errors implemented by the inhibitory microcircuit to the backpropagation of errors algorithm from machine learning, we consider the limit where top-down input is weak compared to the bottom-up drive. This limiting case results in error signals that decrease exponentially with area depth, but allows us to proceed analytically. We further assume that the top-down weights converging to the apical compartments are equal PP to the corresponding forward weights, WPP k ,k +1 = Wk +1,k T . Such weight symmetry is not essential for successful learning in a broad range of problems, as demonstrated in the main simulations and as observed before (Lee et al., 2015; Lillicrap et al., 2016). It is, however, required to frame learning as a gradient descent procedure. Furthermore, in the analyses of the learning rules, we assume that synaptic changes take place at a fixed point of the neuronal dynamics; we therefore consider discrete-time versions of the plasticity rules. This approximates the continuous-time plasticity model as long as changes in the inputs are slow compared to the neuronal dynamics. For convenience, we will occasionally drop neuron type indices and refer to bottom-up weights Wk +1,k and to top-down weights Wk ,k +1 . Additionally, we assume without loss of generality that the dendritic coupling conductance for interneurons is equal to the basal dendritic coupling of pyramidal neurons, gD = gB . Finally, whenever it is useful to distinguish whether output area nudging is turned off, we use superscript ‘−’. Interneuron activity in the self-predicting state. Following Urbanczik and Senn (2014), we note that steady state interneuron somatic potentials can be expressed as a convex combination of 29 basal dendritic and pyramidal neuron potentials that are provided via somatic teaching input: uIk = gsom gB vIk + uP = (1 − λ) v̂Ik + λ uPk +1 , glk + gB + gsom glk + gB + gsom k+1 (S3) with gB and glk the effective dendritic transfer and leak conductances, respectively, and gsom the total excitatory and inhibitory teaching conductance. In the equation above, v̂Ik = interneuron dendritic prediction (cf. Eq. 8), and λ ≡ gsom glk +gB +gsom gB I glk +gB vk is the ∈ [0, 1[ is a mixing factor which controls the nudging strength for the interneurons. In other words, the current prediction v̂Ik and the teaching signal are averaged with coefficients determined by normalized conductances. We will later consider the weak nudging limit of λ → 0. The relation v̂Ik = v̂PB,k+1 holds when pyramidal-to-interneuron synaptic weights are equal to pyramidal-pyramidal forward weights, up to a scale factor: WIP k ,k = glk +gB PP glk +gB +gA Wk +1,k , which simplifies PP to WIP N −1,N −1 = WN,N −1 for the last area where gA = 0 (to reduce clutter, we use the slightly abusive notation whereby gA should be understood to be zero when referring to output area neurons). This is the reason for the particular choice of ideal pyramidal-to-interneuron weights presented in the preamble. The network is then internally consistent, in the sense that the interneurons predict the model’s own predictions, held by pyramidal neurons. Bottom-up predictions in the absence of external nudging. We first study the situation where the input pattern r0 is stationary and the output area teaching input is disabled, iPN = 0. We show that the fixed point of the network dynamics is a state where somatic voltages are equal to basal voltages, up to a dendritic attenuation factor. In other words, the network effectively behaves as if it were feedforward, in the sense that it computes the same function as the corresponding network with equal bottom-up but no top-down or lateral connections. Specifically, in the absence of external nudging (indicated by the − in the superscript), the somatic voltages of pyramidal and interneuron are given by the bottom-up dendritic predictions, gB − WPP φ(v̂P, B,k −1 ) glk + gB + gA k ,k −1 gB − ≡ WIP φ(v̂P, B,k ). glk + gB k ,k − − uP, = v̂P, k B,k ≡ uI,k − = v̂I,k − (S4) (S5) To show that Eq. S4 describes the state of the network, we start at the output area and set − Eq. 1 to zero. Because nudging is turned off, we observe that uPN is equal to v̂P, B,N if area N − 1 − also satisfies uPN −1 = v̂P, B,N −1 . The same recursively applies to the hidden area below when its 30 apical voltage vanishes, vPA,N −1 = 0. Now we note that at the fixed point the interneuron cancels the corresponding pyramidal neuron, due to the assumption that the network is in a self-predicting PP state, which yields uIN −1 = uPN . Together with the fact that WPI N −1,N −1 = −WN −1,N , we conclude that the interneuron contribution to the apical compartment cancels the top-down pyramidal neuron input, yielding the required condition vPA,N −1 = 0. The above argument can be iterated down to the input area, which is constant, and we arrive at Eq. S4. Zero plasticity induction in the absence of nudging. In view of Eq. S4, which states that in the absence of external nudging the somatic voltages correspond to the basal predictions, no synaptic changes are induced in basal synapses on the pyramidal and interneurons as defined by the plasticity rules (7) and (8), respectively. Similarly, the apical voltages are equal to rest, − vP, A,k = vrest , when the top-down input is fully predicted, and no synaptic plasticity is induced in the inter-to-pyramidal neuron synapses, see (9). When noisy background currents are present, the average prediction error is zero, while momentary fluctuations will still trigger plasticity. Note that the above holds when the dynamics is away from equilibrium, under the additional constraint that the integration time constant of interneurons matches that of pyramidal neurons. Recursive prediction error propagation. Prediction errors arise in the model whenever lateral interneurons cannot fully explain top-down input, leading to a deviation from baseline in apical dendrite activity. Here, we look at the network steady state equations for a stationary input pattern r0 and derive an iterative relationship which establishes the propagation across the network of prediction mismatches originating downstream. The following compartmental potentials are thus evaluated at a fixed point of the neuronal dynamics. Under the assumption (S1) of matching interneuron-to-pyramidal top-down weights, apical compartment potentials simplify to vPA,k = Wk ,k +1 φ(uPk +1 ) − φ(uIk ) = Wk ,k +1 ek +1 ,   (S6) where we introduced error vector ek+1 defined as the difference between pyramidal and interneuron firing rates. Such deviation can be intuitively understood as an area-wise interneuron prediction mismatch, being zero when interneurons perfectly explain pyramidal neuron activity. We now evaluate this difference vector at a fixed point to obtain a recurrence relation that links consecutive areas. 31 The steady-state somatic potentials of hidden pyramidal neurons are given by uPk = gA gB vPB,k + vP = v̂PB,k + λ vPA,k glk + gB + gA glk + gB + gA A,k = v̂PB,k + λ Wk ,k +1 ek +1 . (S7) To shorten the following, we assumed that the apical attenuation factor is equal to the interneuron nudging strength λ. As previously mentioned, we proceed under the assumption of weak feedback, λ small. As for the corresponding interneurons, we insert Eq. S7 into Eq. S3 and note that when the network is in a self-predicting state we have v̂Ik −1 = v̂PB,k , yielding uIk −1 = (1 − λ) v̂PB,k + λ v̂PB,k + λ vPA,k = v̂PB,k + λ2 vPA,k .  (S8) Using the identities (S7) and (S8), we now expand to first order the difference vector ek around v̂PB,k as follows ek = φ(uPk ) − φ(uIk −1 ) = λ Dk vPA,k + O λ2 kvPA,k k .  (S9) Matrix Dk is a diagonal matrix with diagonal equal to φ0 (v̂PB,k ), i.e., whose i-th element reads dφ P dv (v̂B,k ,i ). It contains the derivative of the neuronal transfer function φ evaluated component-wise at the bottom-up predictions v̂PB,k +1 . Recalling Eq. S6, we obtain a recurrence relation ek = λ Dk Wk ,k +1 ek +1 + O λ2 kWk ,k +1 ek +1 k .  (S10) Finally, last area pyramidal neurons provide the initial condition by being directly nudged towards trgt the desired target uN . Their membrane potentials can be written as trgt uPN = (1 − λ) v̂PB,N + λ uN , (S11) and this gives an estimate for the error in the output area of the form  trgt   trgt  eN = λ DN uN − v̂PB,N + O λ2 kuN − v̂PB,N k , (S12) where for simplicity we took the same mixing factor λ for pyramidal output and interneurons. Then, for an arbitrary area, assuming that the synaptic weights and the remaining fixed parameters do not 32 scale with λ, we arrive at ek = λN −k +1 N −1 Y ! Dl Wl,l+1  trgt  DN uN − v̂PB,N + O(λN −k +2 ). (S13) l=k Thus, steady state potentials of apical dendrites (cf. Eq. S6) recursively encode neuron-specific prediction errors that can be traced back to a mismatch at the output area. Learning as approximate error backpropagation. In the previous section we found that neurons implicitly carry and transmit error information across the network. We now show how the proposed synaptic plasticity model, when applied at a steady state of the neuronal dynamics, can be recast as an approximate gradient descent learning procedure. More specifically, we compare our model against learning through backprop (Rumelhart et al., 1986) or approximations thereof (Lee et al., 2015; Lillicrap et al., 2016) the weights of the feedfoward multi-area network obtained by removing interneurons and top-down connections from the intact network. For this reference model, the activations u− k are by construction equal to the bottom-up P,− predictions obtained in the full model when output nudging is turned off, u− k ≡ v̂B,k , cf. Eq. S4. Thus, optimizing the weights in the feedforward model is equivalent to optimizing the predictions of the full model. Define the loss function NN Z   X − trgt L uN , uN = − i=1 0 − uN,i   trgt − φ(ν ) d ν , φ (1 − λ) ν + λ uN,i (S14) where NN denotes the number of output neurons. L can be thought of as the multi-area, multioutput unit analogue of the loss function optimized by the single neuron model (Urbanczik and Senn, 2014), where it stems directly from the particular chosen form of the learning rule (7). The nudging strength parameter λ ∈ [0, 1[ allows controlling the mixing with the target and can be understood as an additional learning rate parameter. Albeit unusual in form, function L imposes a trgt cost similar to an ordinary squared error loss. Importantly, it has a minimum when u− N = uN and it is lower bounded. Furthermore, it is differentiable with respect to compartmental voltages (and synaptic weights). It is therefore suitable for gradient descent optimization. As a side remark, L integrates to a quadratic function when φ is linear. 33 Gradient descent proceeds by changing synaptic weights according to ∆Wk ,k −1 = −η ∂L ∂ Wk ,k −1 . (S15) The required partial derivatives can be efficiently computed by the backpropagation of errors algorithm. For the network architecture we study, this yields a learning rule of the form − − T ∆Wbp k ,k −1 = η ek φ(uk −1 ) . (S16) The error factor e− k can be expressed recursively as follows: e− k =      trgt  φ (1 − λ) u− − φ u− N + λ uN N if k = N,   D− WTk+1,k e− otherwise, k k +1 (S17) ignoring constant factors that depend on conductance ratios, which can be dealt with by redefining learning rates or backward pass weights. As in the previous section, matrix D− k is a diagonal matrix, with diagonal equal to φ0 (u− k ). We first compare the fixed point equations of the original network to the feedforward activations of the reference model. Starting from the bottommost hidden area, using Eqs. S6, S7 and S13, − P N we notice that uP1 = u− 1 + λ vA,1 = u1 + O (λ ), as the bottom-up input is the same in both cases. Inserting this into second hidden area steady state potentials and linearizing the neuronal transfer − P N N −1 function gives uP2 = u− ). This can be repeated and for an arbitrary 2 + λ vA,2 + O (λ ) = u2 + O (λ area and neuron type we find P N −k +2 N −k +1 uPk = u− ) = u− ) k + λ vA,k + O (λ k + O (λ N −k +2 uIk −1 = u− ). k + O (λ (S18) (S19) Writing Eq. S18 in the first form emphasizes that the apical contributions dominate O(λ vPA,k ) = O(λN −k +1 ) the bottom-up corrections, which are of order O(λN −k +2 ). Next, we prove that up to a factor and to first order the apical term in Eq. S18 represents the backpropagated error in the feedforward network, e− k . Starting from the topmost hidden area apical potentials, we reevaluate difference vector (S12) using (S18). Linearization of the neuronal transfer 34 function gives  trgt  − 2 vPA,N −1 = λ WN −1,N D− N uN − uN + O (λ ). (S20) Inserting the expression above into Eq. S18 and using Eq. S19 the apical compartment potentials at area N − 1 can then be recomputed. This procedure can be iterated until the input area is reached. In general form, somatic membrane potentials at hidden area k can be expressed as P N −k +2 uPk = u− ) k + λ vA,k + O (λ N −k +1 = u− Wk ,k +1 k +λ N −1 Y (S21) ! D− l Wl,l+1  trgt  − N −k +2 D− ). N uN − uN + O (λ (S22) l=k +1 This equation shows that, to leading order of λ, hidden neurons mix and propagate forward purely bottom-up predictions with top-down errors that are computed at the output area and spread backwards. We are now in position to compare model synaptic weight updates to the ones prescribed by bp backprop. Output area updates are exactly equal by construction, ∆WN,N −1 = ∆WN,N −1 . For pyramidal-to-pyramidal neuron synapses from hidden area k − 1 to area k, we obtain   T ∆Wk ,k −1 = ηk ,k −1 φ(uPk ) − φ(v̂PB,k ) rPk −1 T  −   P N −k +2 rk −1 + O(λN −k +2 ) ) − φ(u− = ηk ,k −1 φ u− k ) k + λ vA,k + O (λ ! N −1   Y T trgt − − = ηk ,k −1 λN −k +1 D− W D u − u r− + O(λN −k +2 ), l,l+1 l N N N k −1 (S23) l=k while backprop learning rule (S16) can be written as ∆Wbp k ,k −1 = ηλ N −1 Y ! D− l Wl,l+1  trgt − D− N uN − uN  r− k −1 T + O(λ2 ), (S24) l=k  trgt  − − 2 where we used that, to first order, the output area error factor is e− N = λ DN uN − uN + O (λ ). Hence, up to a factor of λN −k which can be absorbed in the learning rate ηk ,k −1 , changes induced by synaptic plasticity are equal to the backprop learning rule (S16) in the limit λ → 0, provided that the top-down weights are set to the transpose of the corresponding feedforward weights, Wk ,k +1 = WTk+1,k . The ‘quasi-feedforward’ condition λ → 0 has also been invoked to relate backprop to twophase contrastive Hebbian learning in Hopfield networks (Xie and Seung, 2003). In our simulations, top-down weights are either set at random and kept fixed, in which case 35 Eq. S23 shows that the plasticity model optimizes the predictions according to an approximation of backprop known as feedback alignment (Lillicrap et al., 2016); or learned so as to minimize an inverse reconstruction loss, in which case the network implements a form of difference target propagation (Lee et al., 2015). Interneuron plasticity. The analyses of the previous sections relied on the assumption that the synaptic weights to and from interneurons were set to their ideal values, cf. Eqs. S1 and S2. We now study the plasticity of the lateral microcircuit synapses and show that, under mild conditions, learning rules (8) and (9) yield the desired synaptic weight matrices. We first study the learning of pyramidal-to-interneuron synapses WIP k ,k . To quantify the degree to which the weights deviate from their optimal setting, we introduce the convex loss function LIP k = 1  IP∗ T IP∗ IP Tr (Wk ,k − WIP k ,k ) (Wk ,k − Wk ,k ) , 2 ∗ where Tr(M) denotes the trace of matrix M and WIP k,k = gB +glk PP gB +gA +glk Wk +1,k , (S25) as defined in Eq. S2. Starting from the pyramidal-to-interneuron synaptic plasticity rule (8), we express the interneuron somatic potential in convex combination form (S3) and then expand to first order around v̂Ik ,  PT IP I I ∆WIP k ,k = ηk ,k φ(uk ) − φ(v̂k ) (rk )  PT I 2 P = ηkIP,k λ DIP k uk +1 − v̂k (rk ) + O (λ )  gB IP∗ IP 2 = ηkIP,k λ DIP k Wk ,k − Wk ,k Qk + O (λ ) + O (λ α). glk + gB (S26) Matrix Qk = rPk (rPk )T denotes the outer product, and DIP k is a diagonal matrix with i-th diagonal entry equal to φ0 (v̂Ik ,i ). For simplicity, we ignore fluctuations arising from the stochastic sequential presentation of patterns (Bottou, 1998) and look only at the expected synaptic dynamics1 . We absorb irrelevant scale factors and to avoid a vanishing update we rescale the learning rate η̂kIP,k by λ−1 . Then, taking the limit λ → 0, α → 0 as in the previous sections yields IP IP∗ IP IP E ∆WIP k ,k = η̂k ,k Wk ,k − Wk ,k E Dk Qk     = −η̂kIP,k   ∂LIP k E DIP k Qk . IP ∂ Wk ,k 1  (S27) This can be understood as a batch learning protocol, where weight changes are accumulated in the limit of many patterns before being effectively consolidated as a synaptic update. 36 The expectation is taken over the pattern ensemble. In the last equality above, we used the fact that IP IP∗ IP the gradient of LIP k with respect to the lateral weights Wk ,k is given by the difference Wk ,k − Wk ,k . As long as the expectation on the right-hand side of (S27) is positive definite, the synaptic dynamics is within 90o of the gradient and thus leads to the unique minimum of LIP k . This condition is easily met in practice. For linear neurons, it amounts to requiring that the correlation matrix E[Q] is positive definite. In other words, the patterns have to span RNk , with Nk being the number of pyramidal neurons at area k. This is fulfilled when uncorrelated background noise currents are present, and it is likely the case for deterministic networks solving nontrivial tasks. For nonlinear neurons with a monotonically increasing transfer function φ, saturation can lead to a matrix numerically close to singular and slow down learning. A weight matrix initialization that sets the neurons operating far from saturation is therefore an appropriate choice. A mathematical analysis of the coupled system defined by the various plasticity rules acting in concert is rather involved and beyond the scope of this note. However, the learning of apicaltargetting interneuron-to-pyramidal synapses can be studied in isolation by invoking a separation of timescales argument. To proceed, we assume that pyramidal-to-interneuron synapses are ideally IP∗ set, WIP k ,k = Wk ,k . In practice, this translates to a choice of a small effective learning rate for apical- targetting weights ηkPI,k . Note that, indirectly, this requirement also imposes a constraint on how fast top-down pyramidal-to-pyramidal weights WPP k ,k +1 can evolve. This is the parameter regime explored in the main text simulations with plastic top-down weights, Fig. 5. We can then proceed in a similar manner to the previous analysis, as we briefly outline below. ∗ PP Recalling from Eq. S1 that WPI k ,k = −Wk ,k +1 , we define the loss function LPI k = 1  PI∗ PI T PI∗ Tr (Wk ,k − WPI k ,k ) (Wk ,k − Wk ,k ) . 2 (S28) After some manipulation, as λ → 0 the expected synaptic change can be written as PI E ∆WPI k ,k = −ηk ,k   P  ∂LPI P T k E r (r ) , k +1 k +1 ∂ WPI k ,k (S29) which leads us to conclude that the weights converge to the appropriate values, provided that the correlation matrix of area k +1 activity patterns is positive definite. 37
9cs.NE
DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS DANIELE AGOSTINI AND CARLOS AMÉNDOLA arXiv:1801.02373v1 [math.AG] 8 Jan 2018 Abstract. We introduce a discrete analogue of the classical multivariate Gaussian distribution. It is parametrized by the Riemann theta function on the integer lattice. Our real-valued discrete Gaussian is characterized by the property of maximizing entropy, just as its continuous counterpart. We capitalize on the theta function representation to derive fundamental properties such as its characteristic function. Throughout, we exhibit strong connections to the study of abelian varieties in algebraic geometry. 1. Introduction Based on the principle of maximum entropy, it is of great interest to find, for a given class of probability distributions, the ones that maximize entropy. For a random variable X, with density f (x), its differential entropy as defined by Claude Shannon is (1.1) H[X] = E[− log(f (X))] and it is a measure of the information contained in the distribution. It is well known (see e.g. [6]) that the maximum entropy distribution for densities supported over a finite set or a bounded interval in R is given by the corresponding uniform distribution. Since there is no such distribution supported over the whole real line R, some constraints are needed to make sure there exists a maximum entropy distribution. If one fixes the mean and the variance, the distribution with maximum entropy is the Gaussian. This fact motivates the definition of a discrete Gaussian distribution as the maximum entropy probability distribution supported over Z with fixed mean and variance. In their compilation of maximum entropy distributions, Lisman and Van Zuylen in [12] say that it “cannot be presented in plain terms, because there is no summation procedure for the series involved”. Kemp in [11] proposes a somewhat explicit form for the discrete Gaussian, and later Szablowski in [19] observed that the normalization constant can be parametrized in terms of the Jacobi theta functions. In this paper, we simplify and extend part of their work to higher dimensions, working over Zg . Central to our approach is the Riemann theta function [4, Section 8.5],[15, Section II.1]. This is the holomorphic function  X 1 g t t n τn + n z (1.2) θ : C × Hg → C, θ(z, τ ) = e 2 g n∈Z where e(x) = e2πix and Hg is the Siegel upper half-space, consisting of symmetric g × g complex matrices whose imaginary part is positive definite. Using this function, we can define a family of complex probability distributions on Zg , that we call complex discrete Gaussian distributions. Definition 1.1 (Complex discrete Gaussian distribution). Fix (z, τ ) ∈ Cg ×Hg such that θ(z, τ ) 6= 0. We define the discrete Gaussian distribution with parameters (z, τ ) as the complex-valued probability distribution on Zg given by   1 1 t t (1.3) pθ (n; z, τ ) = e n τn + n z for all n ∈ Zg . θ(z, τ ) 2 Observe that when z and  τ are purely imaginary (that is, when their real part is zero) the quantities e 12 nt τ n + nt z are positive real numbers, so that pθ (n; z, τ ) is a standard real-valued probability density function on the integer lattice Zg . One of our main results, proven in Section 2, is that this probability distribution is the unique one that maximizes entropy among all those with same mean and covariance matrix, so that it justifies the name discrete Gaussian. 1 DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 2 As a consequence, discretizing the kernel of the continuous Gaussian gives indeed a discrete Gaussian in our sense (maximizing entropy for its own mean and variance). This discretization is sometimes taken as a definition of discrete Gaussian in the Computer Science literature [1, 16]. Our observation creates a bridge to papers on the topic and in particular to applications of discrete Gaussians. In fact, they play a fundamental role in lattice-based cryptography, with one key problem being how to sample from these distributions efficiently [1, 9, 13]. We believe our approach can be used to shed light on this problem (e.g. through numerical evaluations of the Riemann theta function). The Riemann theta function is a core object in the study of complex abelian varieties: these are projective varieties that have at the same time the structure of an algebraic group, and they are ubiquitous in algebraic geometry. We introduce them, their parameter spaces and related concepts in Section 3. We exhibit several connections between the statistical properties of discrete Gaussians and the geometry of abelian varieties. For instance, we show in Proposition 3.9 that independent discrete Gaussians correspond to products of abelian varieties. In Section 4, we continue exploiting the representation via the Riemann theta function to study the properties of discrete Gaussians. For example, in Proposition 4.1 we give explicit formulas for the characteristic function and for the higher moments, answering a question of Szablowski [19]. In this section we also provide numerical examples where we illustrate simple modeling with discrete Gaussians and maximum likelihood estimation for them. Most interestingly, we show in Proposition 3.1 that discrete Gaussians can be interpreted, up to translation, as points on abelian varieties, and this is our guiding principle. Moreover, this principle extends in Proposition 3.3 to families of both abelian varieties and discrete Gaussians, thus obtaining a natural relation between the set of all discrete Gaussian distributions on Zg and the universal family of abelian varieties over the moduli space Ag [4, Section 8.2]. As a consequence of this principle, every statistical function of the discrete Gaussian that is invariant under translation, gives a well defined function on abelian varieties. In Section 5, we use this to define statistical maps of abelian varieties into projective space. These realize abelian varieties as the moment varieties of the discrete Gaussian distribution. We go on to study the geometry of these maps and we draw statistical consequences, particularly about moment identifiability. We show in Theorems 5.9 and 5.14 that complex discrete Gaussians on Z or Z2 with the same parameter τ are completely determined by the moments up to order three. Moreover, for discrete Gaussians on Z, we show in Proposition 5.10 how to use the cubic equation of the corresponding elliptic curve to obtain explicit formulas for the higher moments in terms of the first three. In summary, in this paper we establish a connection between algebra and statistics that echoes and complements similar results in Algebraic Statistics. On the one hand, finite discrete exponential families have been shown to correspond to toric varieties [8]. On the other hand, some continuous exponential families have been linked to what are called exponential varieties [14]. The present paper now relates some infinite discrete exponential families to abelian varieties. 2. The discrete Gaussian distribution and the Riemann theta function We start by extending the definition of the univariate discrete Gaussian in Z to a multivariate discrete Gaussian in Zg . The multivariate Gaussian distribution given by 1 1 t −1 (2.1) f (x) = p e− 2 (x−µ) Σ (x−µ) , det(2πΣ) is a maximum entropy distribution supported over Rg where the mean vector µ ∈ Rg and the symmetric positive definite g × g covariance matrix Σ are fixed. It is thus natural to attempt the following definition. Definition 2.1 (Discrete Gaussian distribution). The g-dimensional discrete Gaussian distribution is the maximum entropy probability distribution supported over Zg with fixed mean vector µ ∈ Rg and covariance matrix Σ  0. A priori, such a distribution may not exist nor be unique. Our main result in this section is that existence and uniqueness do hold. To obtain this distribution we will use the classical Riemann theta function; we recall now its definition. For any positive integer g we denote by Hg the Siegel upper half-space, which consists of DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 3 symmetric g × g complex matrices whose imaginary part is positive definite: Hg = {τ ∈ Cg×g | τ t = τ, Im τ  0}. Then the Riemann theta function is defined as (2.2) g θ : C × Hg → C, X θ(z, τ ) = n∈Zg  e 1 t n τ n + nt z 2  where e(x) = e2πix . Observe that the series is convergent, thanks to the condition Im τ  0: in particular this shows that the function is holomorphic. We denote the zero locus of this function by Θg = {(z, τ ) ∈ Cg × Hg | θ(z, τ ) = 0}; this is sometimes called the universal theta divisor. Now, we define the probability distributions we are going to work with. Definition 2.2 (Complex Discrete Gaussian distribution). For (z, τ ) ∈ Cg × Hg \ Θg , we define the discrete Gaussian distribution with parameters (z, τ ) as the complex-valued probability distribution on Zg given by   1 1 t t (2.3) pθ (n; z, τ ) = e n τn + n z for all n ∈ Zg . θ(z, τ ) 2 We will denote by X(z,τ ) a random variable with values on Zg and distribution given by pθ (n; z, τ ). We also give a name to the set of all complex discrete Gaussian distributions. We will see in Remark 3.4 that this set has a natural structure of complex manifold. Definition 2.3 (The set Gg ). For a fixed g, we denote by Gg the set of all complex discrete Gaussian distributions on Zg . Observe that when z and  τ are purely imaginary (that is, when their real part is zero) the quantities e 12 nt τ n + nt z are positive real numbers, so that pθ (n; z, τ ) is a standard real-valued probability density function on Zg . We will show that this probability distribution is the unique one that maximizes entropy among all those with same mean and covariance matrix. In particular, the two definitions of discrete Gaussian agree in this case. Theorem 2.4. Fix a vector µ ∈ Rg and a positive definite symmetric matrix Σ ∈ Sym2 Rg . Then there exists a unique distribution supported on Zg with mean vector µ and covariance matrix Σ that maximizes entropy. This distribution is given by (2.4) 1 pθ (n; z, τ ) = e θ(z, τ )  1 t n τ n + nt z 2  for some unique z ∈ Cg and τ ∈ Hg purely imaginary. It is natural to ask how one can compute effectively such z, τ from given µ, Σ. See Remark 2.9 and Subsection 4.1. For a explicit expression of the maximized entropy see Proposition 4.4. Remark 2.5. When τ has real part zero, it is a positive definite matrix multiplied by the imaginary unit i. Then the function n 7→ 2πi 12 nt τ n is a negative definite quadratic form. Thus pθ is a log-concave density (looking at its piecewise linear extension in Rg ), just as its continuous counterpart. Remark 2.6. Set g = 1 and  take two parameters z ∈ C and τ ∈ H1 purely imaginary. Then if we set q = e (τ ) , λ = e 12 τ + z we can rewrite   n(n−1) 1 2 n τ + nz = λn q 2 . (2.5) e 2 This shows that our discrete Gaussian distribution coincides with the one defined by Kemp in [11]. We see now that the density we are proposing is very special in the statistical sense. Indeed, it belongs to an exponential family. DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 4 Exponential families are of fundamental importance in Statistics [5] and we briefly recall their definition here. Many common examples of distributions belong to an exponential family. An exponential family on a space X has density p(η, x) = h(x)ehη,T (x)i−A(η) (2.6) for x ∈ X where η ∈ Rn is a parameter, T : X → Rn is a measurable function, and h·, ·i is the standard scalar product on Rn . In this case, h is known as the base measure, T as the sufficient statistics and A as the log-partition function. Proposition 2.7. Fix z, τ purely imaginary. The density function pθ (n, z, τ ) over Zg in Theorem 2.4 belongs to an exponential family of distributions. Proof. Indeed, we can rewrite pθ (n, z, τ ) in the exponential family form: t (2.7) 1 tτ n e2πi(n z+ 2 n pθ (n, z, τ ) = θ(z, τ ) ) 1 t = ehi(z,τ ),2π(n, 2 nn )i−log(θ(z,τ )) , so that we have identity base measure h(n) = 1, sufficient statistics T (n) = 2π(n, 12 nnt ) and log-partition function A(z, τ ) = log(θ(z, τ ))  Corollary 2.8. There is a bijection between the set of purely imaginary canonical parameters (z, τ ) ∈ Cg × Hg and the moments (µ, Σ) ∈ Rg × Sym2 Rg with Σ  0. It is given up to scaling by 1 the gradient of the log-partition function ∇A(z, τ ) = ∇θ(z, τ ). θ(z, τ ) Proof. From classical theory of exponential families [5, 14], there is a bijection between the space of canonical parameters {η|A(η) < ∞} and the space of sufficient statistics conv(T (x)|x ∈ X ), and it is given by the gradient of the log-partition function ∇A(η).  Remark 2.9. Furthermore, the inverse map (µ, Σ) → (z, τ ) is known to give the maximum likelihood estimate (MLE). That is, if we want to estimate (z, τ ) from a sample of an unknown 1 discrete Gaussian, solving the equation ∇A(z, τ ) = ∇θ(z, τ ) is equivalent to solving the θ(z, τ ) likelihood equations for the sample mean µ and covariance Σ. See Subsection 4.1 for an example. Finally, exponential families are precisely the right candidates to be maximum entropy distributions [6]. We present the argument for this in our case. Corollary 2.10. Fix z, τ purely imaginary and let µ, Σ be the moment vector and the covariance matrix of the corresponding discrete Gaussian. Among all densities q(n) of support Zg with fixed mean vector µ and covariance matrix Σ, the distributon pθ (n) = p(n, z, τ ) maximizes entropy. Proof. We observe that q having the first two matching moments to pθ means that when we sum q(n) against the linear nt z and against the quadratic form nt τ n, it is equivalent to doing it with pθ (n). That is, X X X X q(n)nt z = p(n)nt z , q(n)nt τ n = p(n)nt τ n. n∈Zg n∈Zg n∈Zg n∈Zg Thus, X q(n) log(pθ (n)) = n∈Zg X p(n) log(pθ (n)). n∈Zg With this in mind, we proceed: H(q) = − X q(n) log(q(n)) n∈Zg X q(n) − q(n) log(pθ (n)) pθ (n) n∈Zg n∈Zg X = −KL(q|pθ ) − q(n) log(pθ (n)) =− X ≤− X q(n) log n∈Zg n∈Zg = H(pθ ) p(n) log(pθ (n)) DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 5 where KL(q|pθ ) is the Kullback-Leibler divergence (always non-negative by the classical Jensen’s inequality). Further, equality holds if and only if q = pθ almost everywhere. Since we are working with the counting measure over the integer lattice, we have uniqueness.  Combining Corollary 2.8 and Corollary 2.10 we obtain the main result stated in Theorem 2.4. 3. Abelian varieties and discrete Gaussians The Riemann theta function is a central object in the study of complex abelian varieties. These are projective varieties that have at the same time the structure of an algebraic group, and they are fundamental objects in algebraic geometry. Especially important are principally polarized abelian varieties: these are pairs (A, Θ), where A is an abelian variety and Θ is an ample divisor on A such that h0 (A, Θ) = 1. The theta function can be used to build a universal family of these varieties. This is a very classical construction that we recall briefly here. For more details one can look into [4, Chapter 8]. We should however point out a slight difference between our construction and the classical one: for some sources, for example [4], an isomorphism of principally polarized abelian varieties (A, Θ) and (A0 , Θ0 ) is considered to be an isomorphism of groups F : A → A0 such that F −1 (Θ0 ) and Θ differ by a translation. However, for our purposes we will need to fix the theta divisors, so that, we will define an isomorphism between (A, Θ) and (A0 , Θ0 ) to be an isomorphism of varieties F : A → A0 such that F −1 (Θ0 ) = Θ. 3.1. Parameter spaces of abelian varieties. Fix an integer g ≥ 1, and for any τ ∈ Hg consider the subgroup Λτ = {m + τ n | m, n ∈ Zg } ⊆ Cg . Since τ ∈ Hg one can see that Λτ is a lattice, so that Aτ = Cg /Λτ is a complex torus. Moreover, the theta function is quasiperiodic with respect to this lattice, meaning that for all n, m ∈ Zg and z ∈ Cg , τ ∈ Hg we have:   1 t (3.1) θ(z + m + τ n, τ ) = e − n τ n − nz θ(z, τ ). 2 In particular, the theta divisor Θτ := {z ∈ Cg | θ(z, τ ) = 0} is invariant under Λτ , so that it descends to a divisor on Aτ that we denote by Θτ again. Riemann proved that (Aτ , Θτ ) is a principally polarized abelian variety, and moreover he also showed that every principally polarized abelian variety of dimension g is isomorphic to one of these. More precisely, for any principally polarized abelian variety (A, Θ), there is a certain τ ∈ Hg and an isomorphism F : A → Aτ such that F −1 (Θτ ) = Θ. Hence, with this interpretation, the space Hg becomes a parameter space for all principally polarized abelian varieties. One can go further and construct a moduli space of these varieties. The space Hg has a natural action of the symplectic group      0 Ig 0 Ig t (3.2) Sp(2g, Z) = M ∈ M (2g, Z) M M= −Ig 0 −Ig 0 defined as follows:  (3.3) M= α β γ δ  ∈ Sp(2g, Z), τ ∈ Hg M τ := (ατ + β)(γτ + δ)−1 . For M and τ as above, we can define an invertible C-linear map (3.4) feM,τ : Cg → Cg , z 7→ (γτ + δ)−t z which in turn induces an isomorphism of abelian varieties fM,τ : Aτ → AM τ . However, this is in −1 general not an isomorphism of polarized abelian varieties, since the pullback fM,τ (ΘM τ ) could differ from Θτ by a translation. To fix this, one defines (see [4, Lemma 8.4.1]) 1 1 (3.5) c1 = diag(γδ t ), c2 = diag(αβ t ), cM,τ = (M τ )c1 + c2 2 2 and then considers the affine transformation (3.6) FeM,τ : Cg → Cg , FeM,τ (z) = feM,τ (z) + cM,τ which in turn induces a map FM,τ : Aτ → AM τ . One can see that this is again an isomorphism and −1 moreover FM,τ (ΘM τ ) = Θτ . Hence, this shows that the two polarized abelian varieties (Aτ , Θτ ) and (AM τ , ΘM τ ) are isomorphic. Moreover, it turns out that two polarized abelian varieties (Aτ , Θτ ) and DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 6 (Aτ 0 , Θτ 0 ) are isomorphic if and only if τ 0 = M τ for a certain M ∈ Sp(2g, Z), and the isomorphism is then given by FM,τ as before. Hence, the quotient Ag = Hg /Sp(2g, Z) is a natural parameter space for isomorphism classes of principally polarized abelian varieties: it is usually called the moduli space of abelian varieties of dimension g, and it is an algebraic variety itself [4, Remark 8.10.4]. 3.2. Universal families of abelian varieties. Out of the previous discussion we can actually construct also universal families of abelian varieties. The group Zg ⊕ Zg acts on Cg × Hg by (3.7) (m, n) · (z, τ ) = (z + m + τ n, τ ). The quotient Xg = (Cg × Hg )/(Zg ⊕ Zg ) is a complex manifold equipped with a map Xg → Hg such that the fiber over τ is precisely the abelian variety Aτ . Moreover, by quasiperiodicity (3.1), the universal theta divisor Θg = {(z, τ ) ∈ Cg × Hg | θ(z, τ ) = 0} passes to the quotient Xg and defines another divisor in Xg whose restriction to Aτ is precisely the theta divisor Θτ . Hence, the map Xg → Hg , together with Θg , can be considered as the universal family of abelian varieties over Hg . We can do something similar also with the moduli space. Indeed, the action of Sp(2g, Z) on Hg , extends (see [4, Lemma 8.8.1]) to an action of the group Gg = (Zg ⊕ Zg ) o Sp(2g, Z) on Cg × Hg , given by (3.8) ((m, n), M ) · (z, τ ) = (FeM,τ (z) + m + (M τ )n, M τ ). The quotient Ug = (Cg × Hg )/Gg by this action can be also seen as a quotient Xg /Sp(2g, Z). In particular, it has a natural map Ug → Ag . Moreover, the Theta Transformation Formula  [4, Theorem 8.6.1] tells us explicitly how the theta function changes under Gg : for each M = αγ βδ ∈ Sp(2g, Z) and z ∈ Cg , τ ∈ Hg we have   1 t −1 t −1 (3.9) θ(FM (z, τ ), M τ ) = C(M, τ )e z (γτ + δ) γz − c1 (γτ + δ) z θ(z, τ ) 2 for a certain explicit C(M, τ ) 6= 0. In particular, this tells us that the universal theta divisor Θg is invariant under the action of Gg , so that it passes to the quotient Ug . In this setting, the map Ug → Ag , together with Θg is sometimes called the universal family over the moduli space Ag . 3.3. Discrete Gaussian distributions and abelian varieties. In the following, we study further statistical properties of discrete Gaussians, in light of the connection to abelian varieties. The key observation is that the quasiperiodicity property has a transparent interpretation in terms of the discrete Gaussian. Recall that if (z, τ ) ∈ Cg × Hg \ Θg , we denote by X(z,τ ) a random variable with discrete Gaussian distribution of parameters (z, τ ). We will use the standard notation X ∼ Y to denote that two random variables have the same distribution. Proposition 3.1 (Quasiperiodicity). Let (z, τ ) ∈ Cg × Hg \ Θg . Then for every m, n ∈ Zg we have that (3.10) X(z+m+τ n,τ ) ∼ X(z,τ ) − n. Proof. First we observe that by the quasiperiodicity of the theta function (3.1) we have that (z + m + τ n, τ ) ∈ / Θg , so that it makes sense to speak of the variable X(z+m+τ n,τ ) . Now, we fix more generally (z, τ ) ∈ Cg × Hg and m, n ∈ Zg and for all h ∈ Zg we can compute       1 t 1 t 1 t t t t t t t e h τ h + h (z + m + τ n) = e h τh + h z + h m + h τn = e h τh + h z + h τn 2 2 2   1 1 t 1 t 1 t t t t t (h + n) τ (h + n) + (h + n) z − n τ h − h τ n − n τ n − n z + h τ n =e 2 2 2 2       1 t 1 1 t 1 t t t t t = e − n τn − n z e (h + n) τ (h + n) + (h + n) z e − h τ n − n τ h + h τ n . 2 2 2 2 DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 7 However, since τ is symmetric we see that the last factor in this expression is 1. Notice that this shows in particular that the theta function is quasiperiodic as in (3.1). Now we can compute  e 21 ht τ h + ht (z + m + τ n) P(X(z+m+τ n,τ ) = h) = θ(z + m + τ n, τ )   1 t e − 2 n τ n − nt z e 12 (h + n)t τ (h + n) + (h + n)t z  = e − 12 nt τ n − nt z θ(z, τ )  e 12 (h + n)t τ (h + n) + (h + n)t z = P(X(z,τ ) = h + n) = θ(z, τ ) which is precisely what we want.  Remark 3.2. This result tells us that if we fix a parameter τ ∈ Hg , then discrete Gaussian distributions X(z,τ ) correspond, up to translation, to points in the open subset Aτ \ Θτ ⊆ Aτ . Hence, we see a direct connection between discrete Gaussians and abelian varieties. More precisely, the next Proposition 3.3 shows that we can relate the set Gg of all discrete Gaussian distributions to the universal family Ug . Proposition 3.3 (Equivalence of discrete Gaussians). Let (z, τ ), (z 0 , τ 0 ) ∈ Cg × Hg \ Θg . Then X(z,τ ) ∼ X(z 0 ,τ 0 ) if and only if (3.11) z = z0 + 1 diag(B) + a, 2 τ = τ0 + B where B ∈ Sym2 Zg is a symmetric matrix with integer coefficients, diag(B) is the diagonal of B and a ∈ Zg . Proof. The two discrete Gaussians X(z,τ ) and X(z 0 ,τ 0 ) have the same distribution if and only if   e 12 nt τ 0 n + nt z 0 e 21 nt τ n + nt z (3.12) = for all n ∈ Zg . θ(z, τ ) θ(z 0 , τ 0 ) We can rewrite this as   1 t θ(z, τ ) 0 t 0 (3.13) e n (τ − τ )n + n (z − z ) = 2 θ(z 0 , τ 0 ) for all n ∈ Zg . In particular, this shows that the left hand side is independent of n, so that plugging n = 0 gives that   1 t 0 t 0 (3.14) e n (τ − τ )n + n (z − z ) = 1 for all n ∈ Zg . 2 Conversely, if this last condition holds, then it is clear that θ(z, τ ) = θ(z 0 , τ 0 ), so that (3.13) holds as well. This proves that X(z,τ ) ∼ X(z 0 ,τ 0 ) is equivalent to (3.14). We can rewrite (3.14) as (3.15) 1 t n (τ − τ 0 )n + nt (z − z 0 ) ∈ Z 2 Now, let’s set τ − τ 0 = B and z − z 0 = 1 2 for all n ∈ Zg . diag(B) + a: the condition becomes 1 t 1 n Bn + nt diag(B) + nt a ∈ Z for all n ∈ Zg . 2 2 We need to prove that this holds if and only if a, B have integer coefficients. Suppose first that a, B have integer coefficients: then (3.16) holds if and only if (3.16) 1 2 1 n(n + 1) n Bii + nBii = Bii ∈ Z for all n ∈ Z, i ∈ {1, . . . , g} 2 2 2 but this is true because Bii ∈ Z and n(n + 1) is even. Conversely, suppose that (3.16) holds and let’s prove that a, B have integer coefficients. Let Ei denote the i-th vector of the canonical basis. Taking n = Ei and n = −Ei in (3.16) we get that Bii ∈ Z and ai ∈ Z for all i. To conclude, we just need to check that Bij ∈ Z for all i 6= j and this follows again from (3.16) taking n = Ei + Ej .  (3.17) DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 8 Remark 3.4. We can interpret this via universal families of abelian varieties as follows: the group Ng = Zg × Sym2 Zg embeds in the group Gg = (Zg ⊕ Zg ) o Sp(2g, Z) via the map    Ig B (3.18) Ng ,→ Gg (a, B) 7→ (a, 0), . 0 Ig In particular, the action (3.8) of Gg on Cg × Hg restricts to an action of Ng as follows:   1 (3.19) (a, B) · (z, τ ) = z + a + diag(B), τ + B . 2 Then, Proposition 3.3 says precisely that the set Gg of all discrete Gaussian distributions is naturally identified with the quotient ((Cg × Hg ) \ Θg )/Ng . In particular, since the action of Ng is free and properly discontinuous, we see that Gg has a natural structure of a complex manifold. Moreover, since Ng is a subgroup of Gg , we have a natural map Gg −→ Ug , so that the set Gg of discrete Gaussians is an intermediate space between Cg × Hg and the universal family Ug . 3.4. Discrete Gaussians and affine transformations. As in the case of continuous Gaussians, the class of discrete Gaussians is invariant under affine automorphisms. The case of translations is covered by Proposition 3.1, so we just need to consider linear automorphisms. Proposition 3.5. Let X(z,τ ) be a discrete Gaussian on Zg . Then, for any A ∈ GL(g, Z) we have that AX(z,τ ) ∼ X(A−1 z,A−t τ A−1 ) . (3.20) Proof. We just write down everything explicitly: if n ∈ Zg , then we see that     1 −1 t 1 t −1 −1 −1 −t t −t e (3.21) (A n) τ (A n) + (A n)z = e n (A τ A )n + n (A z) 2 2 In particular, summing over Zg we get that θ(z, τ ) = θ(A−1 z, A−t τ A−1 ). Putting these two together, it is straightforward get what we want.  Remark 3.6. We can also interpret this result as in Remark 3.4. Indeed, the group GL(g, Z) embeds in the group Gg = (Zg ⊕ Zg ) o Sp(2g, Z) via the map   −t  A 0 (3.22) GL(g, Z) ,→ Gg , A 7→ (0, 0), . 0 A In particular, the action (3.8) of Gg on Cg × Hg restricts to an action of Ng as follows:  (3.23) A · (z, τ ) = A−1 z, A−t τ A , which is exactly what appears in Proposition 3.5. Remark 3.7 (Parity). In particular, it follows immediately from Proposition 3.5 that X(−z,τ ) ∼ −X(z,τ ) . This gives a parity property for discrete Gaussians that reflects the analogous property for the Riemann Theta function. However, in general it is not true that an arbitrary linear transformation of a discrete Gaussian is again a discrete Gaussian. Still, we can control the difference, and thanks to Proposition 3.5, it is enough to do it for projections. Proposition 3.8. Let X = (X1, X2 ) be a discrete Gaussian random variable on Zg1 × Zg2 with τ11 τ12 t τ parameters z = (z1 , z2 ) and τ = τ12 . 22 Then X1 has distribution (3.24) P(X1 = n1 ) = t n ,τ ) θ(z1 , τ11 )θ(z2 + τ12 1 22 P(X(z1 ,τ11 ) = n1 ). θ(z, τ ) DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 9 Proof. This is a straightforward computation: X P(X1 = n1 ) = P((X1 , X2 ) = (n1 , n2 )) n2 ∈Zg2      X 1 1 τ11 τ12 n1 z t t t t (n1 , n2 ) t + (n1 , n2 ) 1 = e τ τ n z2 θ(z, τ ) 2 22 2 12 n2 ∈Zg2   X 1 1 t 1 t t t t t = n τ11 n1 + n2 τ12 n1 + n2 τ22 n2 + n1 z1 + n2 z2 e θ(z, τ ) 2 1 2 g 2 n2 ∈Z  X    1 1 t 1 t t t t = e n τ11 n1 + n1 z1 e n τ22 n2 + n2 (z2 + τ12 n1 ) θ(z, τ ) 2 1 2 2 n2 ∈Zg2   t n ,τ ) t n ,τ ) θ(z1 , τ11 )θ(z2 + τ12 1 t θ(z2 + τ12 1 22 1 22 t e n1 τ11 n1 + n1 z1 = P(X(z1 ,τ11 ) = n1 ) = θ(z, τ ) 2 θ(z, τ )  In particular, the components of a discrete Gaussian are not discrete Gaussian themselves, but we are going to see now that things work well when they are independent. 3.5. Independence for discrete Gaussians. We can characterize independence of joint discrete Gaussians in a way analogous to continuous Gaussians. Proposition 3.9. Let X = (X1 , X2 ) be a discrete random variable on Zg1 × Zg2 . Then the following are equivalent: (1) X is a discrete Gaussian with X1 , X2 independent.  (2) X is a discrete Gaussian with parameter τ = τ011 τ022 . (3) X1 , X2 are independent discrete Gaussians with parameters τ11 and τ22 respectively. Moreover, if X is a discrete Gaussian with parameters τ and z purely imaginary, these conditions are equivalent to (4) X1 , X2 are uncorrelated. Proof. We first show that  τ (1) implies (2). Suppose first that X is a discrete Gaussian with parameters 11 τ12 t z = (z1 , z2 ) and τ = τ12 τ22 . With the same computations as in Lemma 3.8 we see that   1 1 t 1 t t t t P((X1 , X2 ) = (n1 , n2 )) = e n τ11 n1 + n1 τ12 n2 + n2 τ22 n2 + n1 z1 + n2 z2 , θ(z, τ ) 2 1 2   t θ(z2 + τ12 n1 , τ22 ) 1 t t e n τ11 n1 + n1 z1 , P(X1 = n1 ) = θ(z, τ ) 2 1   θ(z1 + τ12 n2 , τ11 ) 1 t P(X2 = n2 ) = e n2 τ22 n2 + nt2 z2 . θ(z, τ ) 2 Hence P((X1 , X2 ) = (n1 , n2 )) = P(X1 = n1 )P(X2 = n2 ) if and only if  t (3.25) θ(z, τ ) · e nt1 τ12 n2 = θ(z1 + τ12 n2 , τ11 )θ(z2 + τ12 n1 , τ22 ) Suppose now that X1 , X2 are independent: this means precisely that the relation (3.25) holds for every n1 , n2 . Choosing n1 = 0 shows that θ(z1 + τ12 n2 , τ11 ) is a constant function of n2 , and choosing t n , τ ) is a constant function of n . Hence, it must be that e nt τ n n2 = 0 shows that θ(z2 + τ12 1 22 1 1 12 2 is independent of n1 , n2 , and by choosing one of the two to be zero, we see that e nt1 τ12 n2 = 1. This is the same as asking that nt1 τ12 n2 ∈ Z for all n1 , n2 , which in turn means that τ12 has integer coefficients. Then, thanks to Proposition 3.3, we can assume τ12 = 0, which proves (2). To show that (2) implies (3) observe that if we set τ12 = 0 in (3.25), then the relation reduces to θ(z, τ ) = θ(z1 , τ11 )θ(z2 , τ22 ), which is true by an explicit computation. Hence, we get that X1 , X2 are independent. To show that they are discrete Gaussians, it is enough to plug τ12 = 0 in Lemma 3.8 and use again that θ(z, τ ) = θ(z1 , τ11 )θ(z2 , τ22 ). To show that (3) implies (1) it is enough to use again (3.25) and the fact that θ(z, τ ) = θ(z1 , τ11 )θ(z2 , τ22 ). DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 10 To conclude, suppose that X is a discrete Gaussian with parameters z, τ purely imaginary. It is clear that (1) implies (4). We will show here that (4) implies (1). To do this, let Y1 , Y2 be two independent discrete Gaussians with purely imaginary parameters which have the same mean vector and covariance matrix as X1 , X2 respectively. Then we see from (3) that Y = (Y1 , Y2 ) is a discrete Gaussian distribution with purely imaginary parameters. Moreover, since X1 , X2 are uncorrelated, Y and X have the same mean and covariance matrix. Then, Theorem 2.4 shows that X, Y have the same distribution, and we are done.  This result tells us that two joint discrete Gaussians are independent if and only if the matrix parameter τ is diagonal. This evokes the special property of continuous Gaussians that for the two components X1 , X2 of a Gaussian vector (X1 , X2 ) one has that X1 , X2 are independent if and only if their joint covariance Σ12 is zero. Moreover, this is actually true for discrete Gaussians with the parameters z, τ are purely imaginary. Remark  3.10. Moreover, the abelian variety Aτ corresponding to a parameter of the form τ = τ11 0 0 τ22 is a product of abelian varieties of smaller dimension. More precisely: Aτ = Aτ11 × Aτ22 . This is suggestive of the relation in Algebraic Statistics between statistical independence of finite random variables and the Segre embedding of Pn1 × Pn2 . 4. Characteristic function and moments In this section we use the Riemann theta function to compute various statistical properties of the discrete Gaussian, such as its characteristic function, its moments, its cumulants and its entropy. We will use the following notation: if a = (a1 , . . . , ag ) is a multi-index, with ai ∈ N, ai ≥ 0, then we set |a| = a1 + · · · + ag and a! = a1 ! . . . ag !. Also, if a, b ∈ Ng , we say that a ≤ b if ai ≤ bi for all i = 1, . . . , g. a If v = (v1 , . . . , vg ) ∈ Cg is a vector of complex numbers we set v a = v1a1 . . . vg g . If f (z1 , . . . , zg ) is a holomorphic function, or a formal power series, we set (4.1)       ∂ a1 f ∂f ∂f a1 ∂f ag ∂ ag f ∂f a a . Dz f = ,..., , (Dz f ) = ·...· · . . . · ag , Dz f = ∂z1a1 ∂z1 ∂zg ∂z1 ∂zg ∂zg Moreover, we denote by Dza (log f ) the higher logarithmic derivatives of f . Recall that they are computed by taking formal derivatives of log f : for example, if f = f (z) is a function of one variable we have f0 f · f 00 − f 02 (4.2) Dz1 (log f ) = , Dz2 (log f ) = . f f2 If X = (X1 , . . . , Xg ) is a random variable (possibly with a complex-valued distribution) we denote the corresponding means as µi = E[Xi ] and the mean vector as µ = (µ1 , . . . , µg )t . Moreover for each multi-index a ∈ Ng we define the higher moments as (4.3) a µa [X] = µa1 ,...,ag [X] = E[X1a1 · . . . · Xg g ] ai ∈ N and the higher central moments as (4.4) ma [X] = µa [X − µ] = E[(X1 − µ1 )a1 · . . . · (Xg − µg )ag ]. The moments are encoded by the characteristic function of X: this is the formal power series X i|a| t (4.5) φX (v) = E[eiv X ] = µa [X]v a . a! g a∈N We also define the cumulants κa [X] through a generating function: more precisely, we formally define X κa [X] t (4.6) v a = log E[ev X ]. a! g a∈N We rephrase this by saying that the cumulants correspond to the logarithmic derivatives of the t formal power series v 7→ E[ev X ] evaluated at 0: (4.7) κa [X] = Dva (log E[ev tX ])|v=0 . DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 11 In the case of the discrete Gaussian distribution we can compute everything explicitly using the Riemann theta function. Proposition 4.1. Fix (z, τ ) ∈ Cg × Hg \ Θg . Then the characteristic function of X(z,τ ) is given by  v θ z + 2π ,τ 1 1 X 1 iv t X(z,τ ) (4.8) φX(z,τ ) (v) = E[e ]= = (Dza θ) · v a . |a| θ(z, τ ) θ a! (2π) g a∈N In particular, the moments, central moments and cumulants are given by 1 a 1 D θ, |a| (2πi) θ z   1 1 X a (−1)|b| ma [X(z,τ ) ] = (Dz θ)b Dza−b θ, (2πi)|a| θ 0≤b≤a b θ|b| (4.9) µa [X(z,τ ) ] = (4.10) (4.11) κa [X(z,τ ) ] = 1 Da (log θ). (2πi)|a| z Proof. By definition, (4.12) (4.13) (4.14)        1 t 1 X 1 t 1 t t φX(z,τ ) (v) = E[e ]=E e v X(z,τ ) = e n τn + n z e vn 2π θ 2 2π n∈Zg    v  ,τ θ z + 2π 1 X v  1 t t = n τn + n z + = e θ 2 2π θ(z, τ ) n∈Zg 1 X 1 1 = (Dza θ) · v a |a| θ a! (2π) a∈Ng iv t X(z,τ ) v where the last equality follows from the Taylor expansion of θ(z + 2π , τ ) around z. The formula for µa follows immediately. To get the central moments, we observe that if µ = µ[X(z,τ ) ] then ma [X(z,τ ) ] = µa [X(z,τ ) − µ] and it is straightforward to compute the characteristic function of X(z,τ ) − µ: ! X i|c| t (4.15) µc [X(z,τ ) ]v c φX(z,τ ) −µ (v) = φµ (−v)φX(z,τ ) (v) = e−iv µ c! g c∈N ! ! |b| X i X i|c| |b| b b c = (−1) µ v µc [X(z,τ ) ]v (4.16) b! c! g g c∈N b∈N ! X X i|a| (4.17) = (−1)|b| µb · µc [X(z,τ ) ] v a b!c! a∈Ng b+c=a   X i|a| X a  (4.18) = (−1)|b| µb · µc [X(z,τ ) ] v a . a! b g a∈N 1 c and µc [X(z,τ ) ] = 1θ (2πi) |c| Dz θ, we get     |b| X i|a| 1 X 1 a (−1)  φX(z,τ ) −µ (v) = (Dz θ)b · Dza−b θ v a |a| |b| a! θ b (2πi) θ a∈Ng 0≤b≤a Substituting µ = (4.19) 0≤b≤a 1 1 θ 2πi Dz θ which is what we want. To conclude, we compute the cumulants. By definition we have     1 t 1 t 1 X v t X(z,τ ) t log E[e ] = log e vn e n τn + z n θ 2πi 2 n∈Ng  t !   1 X 1 t 1 v = log e n τn + z + v n = log θ z + , τ − log θ(z, τ ) θ 2 2πi 2πi g n∈N DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 12 And taking derivatives with respect to v we get (4.20) 1 Da (log θ) (2πi)|a| z κa [X(z,τ ) ] =  Remark 4.2 (Mean and covariance). In particular, we can write down explicitly the mean vector and the covariance matrix of X(z,τ ) . Indeed, the first moments always coincide with the first cumulants, so that 1 ∂ log θ 1 1 ∂θ = = κi [X(z,τ ) ]. (4.21) µi [X(z,τ ) ] = 2πi θ ∂zi 2πi ∂zi For the covariances we also have that the second central moments coincide with the second cumulants, so that   1 ∂2θ ∂θ ∂θ 1 ∂ 2 log θ 1 (4.22) mij [X(z,τ ) ] = θ − = = κij [X(z,τ ) ]. 2 2 (2πi) θ ∂zi ∂zj ∂zi ∂zj (2πi)2 ∂zi ∂zj We can compare these formulas with those obtained from the theory of exponential families in Corollary 2.8. In particular, from the expression for the covariances, we get that 1 ∂2θ ∂θ = ∂τii 4πi ∂zi2 (4.23) 1 ∂2θ 1 ∂θ = 2 ∂τij 4πi ∂zi ∂zj and if i < j which is precisely the heat equation for the theta function [4, Proposition 8.5.5]. Remark 4.3. As a consequence of Lemma 3.7, we see immediately that the moments µa [X(z,τ ) ], the central moments ma [X(z,τ ) ] and the cumulants κa [X(z,τ ) ] are even or odd functions of z, depending on whether |a| is even or odd. In particular, we get immediately that µ[X(0,τ ) ] = 0. We can also compute the entropy of discrete Gaussian random variables. Proposition 4.4. Fix (z, τ ) ∈ Cg × Hg \ Θg , and set µ = µ[X(z,τ ) ] and Σ = Cov[X(z,τ ) ]. Then the entropy of X(z,τ ) is given by   1 1 (4.24) H[X(z,τ ) ] = log θ − hz, Dz θi + hτ, Dτ θ + diag(Dτ θ)i θ 2 = log θ − 2πihz, µi − πihτ, Σ + µµt i (4.25) where h·, ·i denotes the standard scalar product. Proof. We compute: H[X(z,τ ) ] = − X n∈Zg log e 1 t 2n τn + nt z θ(z, τ ) ! e 1 t 2n τn + nt z θ(z, τ ) ! = 1 t 2n τn  tz + n = log θ(z, τ ) − πint τ n − 2πint z θ(z, τ ) g n∈Z    ! X X 1 1 t 1 t t t t t log θ(z, τ ) − πi (n τ n)e n τ n + n z + 2πi (n z)e n τn + n z . θ 2 2 g g e X n∈Z n∈Z Now, differentiating the theta function term by term, we see that   X ∂θ 1 t t (4.26) = 2πi ni e n τn + n z ∂zi 2 g n∈Z whereas (4.27)   X 1 t ∂θ 2 t = πi ni e n τn + n z ∂τii 2 g n∈Z and   X 1 t ∂θ t = πi 2ni nj e n τn + n z ∂τij 2 g if i < j. n∈Z With this, the first equality in (4.24) follows. For the second, we know from Proposition 4.1 that 1 1 Dτ θ+diag(Dτ θ) = Σ + µµt . To do this, it is enough to θ Dz θ = µ, so we just need to check that θ 2 apply Proposition 4.1 together with the heat equation for the theta function (4.23)  DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 13 Remark 4.5. We should point out that, since θ is a complex function, the logarithm log θ is defined just up to a constant. However, when z, τ are purely imaginary, we can take the standard determination of the logarithm on C, which is the one that coincides with the usual logarithm on the positive real axis. In that case the above formula gives the entropy of the real discrete Gaussian. 4.1. Numerical examples. A nice consequence of the bijection in Corollary 2.8 and the expressions in Proposition 4.1 is that we can compute numerically the purely imaginary parameters z, τ from given moments µ, Σ by solving the gradient system 1 1 (4.28) µ= Dz θ 2πi θ 1 1 (4.29) Σ + µµt = Dτ θ. πi θ It provides an advantage with respect to parametrizations like in [11] where the constant is not easy to compute. In fact, geometers have been interested in computing the Riemann Theta function and there are several numerical implementations [7]. Thus, in principle, the discrete Gaussian distribution we propose can be computed effectively for applications. In fact, in SAGE using the package abelfunctions and with the help of Lynn Chua (who has maintained and implemented similar functions), we were able to compute with numerical precision the corresponding z, τ for given choices of µ, Σ. A desirable step following this work would be to have a fully efficient implementation for all g ≥ 1, for instance as an R package. For example, let g = 1 and consider the sample with 10 data points (1, 0, 1, −2, 1, 2, 3, −2, 1, −1) that measure some discrete error. Then the sample mean is µ̂ = 0.4 and the sample standard deviation is σ̂ = 1.6465. Assuming a univariate discrete Gaussian model and solving numerically the system (4.28), (4.29) we get ẑ = −0.023i and τ̂ = 0.0587i as the maximum likelihood estimates. Now suppose we want to know the corresponding purely imaginary parameters z, τ for a “standard” discrete Gaussian on Z with mean µ = 0 and variance σ 2 = 1. By the parity property of Remark 3.7, we must have z = 0 (see also Remark 4.3). Solving numerically for τ in (4.29), we get τ ≈ 0.1591549i. We can generalize this to a standard discrete Gaussian on Zg with mean vector µ = (0, 0, . . . , 0) and identity covariance matrix Σ = Id. Indeed, the parity property gives again z = (0, 0, . . . , 0). Moreover, Proposition 3.9 implies that   0.1591549 0 0   .. (4.30) τ ≈  i. . 0 0 0 0 0.1591549 We can also go in the other direction and compute the mean vector and covariance matrix starting from the parameters z and τ . As an explicit example we take the Fermat quartic C = {X04 + X14 + X24 = 0} in P2 . This is a smooth curve of genus 3, so that its Jacobian is a principally polarized abelian variety of dimension g = 3. We can compute the corresponding matrix parameter τ in MAPLE by using the function periodmatrix. We get that   1+i −0.5 − 0.5i −0.5 + 0.5i (4.31) τ = −0.5 − 0.5i 0.25 + 1.25i −0.25 − 0.75i . −0.5 + 0.5i −0.25 − 0.75i −0.25 + 0.75i Then, we can compute the mean vector and the covariance matrix of the discrete Gaussian on Z3 with parameters z = 0 and τ . Since z = 0, the mean vector is also zero by Remark 4.3. We can compute the covariance matrix numerically and we get −3.2885 + 8.1041 · 10−9 i Σ ≈ 0.1335 · 10−6 + 0.8432 · 10−7 i 5.989 + 0.635 · 10−7 i  0.1335 · 10−6 + 0.8432 · 10−7 i −6.283 + 5.696i −6.283 + 5.696i  5.989 + 0.635 · 10−7 i −6.283 + 5.696i  . −18.262 + 5.696i 5. Statistical theta functions Now, let’s fix a parameter τ ∈ Hg and let (Aτ , Θτ ) be the corresponding principally polarized abelian variety. We have seen before that discrete Gaussians X(z,τ ) correspond, up to translations, to points in the open abelian variety Aτ \ Θτ . Hence, every function that is invariant under translations of random variables gives a well-defined function on Aτ \ Θτ . Natural choices of such functions DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 14 are the higher central moments and the higher cumulants. We show here that they actually define meromorphic functions on Aτ . Proposition 5.1. Fix τ ∈ Hg and a ∈ Ng with |a| > 1. Then the higher central moment ma and the cumulant κa define meromorphic functions on Aτ with poles only along the theta divisor Θτ of order at most |a|. Hence they can be seen as global sections in H 0 (Aτ , |a|Θτ ). Moreover, they have poles precisely of order |a| if and only if (Dz θ)a is not identically zero along Θτ . In particular, this happens if Θτ is irreducible. Proof. First, we consider the higher central moments. The explicit expression for ma given in Proposition 4.1, shows that ma is a meromorphic function on Aτ with poles at most along the theta divisor Θτ . Moreover, looking again at the explicit form, we see that the summand corresponding to b has a pole of order at most |b| + 1. The maximum value possible for |b| is |a| and it corresponds to the unique case b = a. The corresponding summand is (5.1) 1 (−1)|a| 1 (−1)|a| (−1)|a| (Dz θ)a a 0 a (D θ) D θ = (D θ) θ = , z z z (2πi)|a| θ|a|+1 (2πi)|a| θ|a|+1 (2πi)|a| θ|a| which has poles only along Θτ of order at most |a|. This shows immediately that ma has poles only along Θτ of order at most |a|. For the cumulants κa one can follow a similar reasoning by writing an explicit expression for Dza log θ, or one can use the fact that the cumulants are determined by the central moments through some explicit expressions [2, eqn (7)]. Now we ask ourselves when do ma and κa attain poles of order |a|. Consider again the central moments first. Looking at the expression of Proposition 4.1, we consider the summands with |b| = |a| − 1: these are of the form a − Ei , where i is an index such that ai > 0. Taking the sum over these we get (−1)|a|−1 1 X (−1)|a|−1 1 X a−Ei Ei θ = D (5.2) a (D θ) ai (Dz θ)a i z z (2πi)|a| θ|a| (2πi)|a| θ|a| i {i|ai >0} (5.3) = (−1)|a|−1 (Dz θ)a X (−1)|a| (Dz θ)a a = (−|a|). i |a| θ |a| (2πi)|a| θ|a| (2πi) i So we can write (5.4) µa = (−1)|a| (Dz θ)a (1 − |a|) + fa (2πi)|a| θ|a| where fa is a meromorphic function with poles only along Θτ of order strictly less than |a|. Since we are assuming |a| > 1, we see that 1 − |a| 6= 0, hence ma has a pole of order |a| along Θτ if and only if (Dz θ)a is not identically zero along Θτ . For the cumulants, the term with the highest pole along Θ is exactly the same as (5.4): one can prove this by using an explicit expression for Dza log θ or by the formula relating cumulants with central moments [20]. To conclude we need to show that if the theta divisor Θτ is irreducible, then Dza θ does not vanish ∂θ identically along it. Since Θ is irreducible and Dza θ is a product of terms of the form ∂z it is enough i to check that each one of these terms does not vanish identically along Θτ . But this follows from [4, Proposition 4.4.1].  Remark 5.2. We see that the cumulants correspond to the logarithmic derivatives of the theta function, which are classical meromorphic functions on abelian varieties [15, Section I.6, Method III]. However, the central moments give, to the best of our knowledge, new meromorphic functions. 5.1. Statistical maps of abelian varieties. By definition, abelian varieties can be embedded into projective space. In algebraic geometry it is of great interest to produce rational maps from an abelian variety Aτ to different PN . We are showing that this is possible using statistical data, namely central moments and cumulants. Let us fix τ ∈ Hg and consider all the higher central moments [ma ]|a|≤d,|a|6=1 of order d ≥ 2.  Then, according to Proposition 5.1, we get rational maps Aτ 99K PNg,d where Ng,d = g+d − g − 1. d Observe that we do not consider the linear central moments, because they are always zero by definition. These maps can be seen as similar to the moment varieties for Gaussians and their mixtures studied in [2],[3]. We proceed to study here the geometry of these maps and derive some statistical consequences. DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 15 First, as in [2], we can replace the central moments ma [X(z,τ ) ] with the cumulants κa [X(z,τ ) ], which they are often easier to work with. Moreover, we want to work with holomorphic functions instead than with meromorphic functions, so that we multiply the coordinates everywhere by θd . So, the maps that we want to consider are the following: Definition 5.3 (Statistical maps of abelian varieties). With the above notation, we define the statistical maps   g+d Ng,d d (5.5) φd,τ : Aτ 99K P , φd,τ = [θ κa ]|a|≤d,|a|6=1 , Ng,d = − g − 1. d To study the geometry of these maps it will be useful to consider their restriction to the theta divisor. It turns out that this can be described in terms of the classical Gauss map of the theta divisor. We recall briefly the definition of the Gauss map here, and for more details one can look at [4, Section 4.4]. First, if we differentiate the quasiperiodicity relation (3.1) we get:     ∂θ 1 t 1 t ∂θ t t (5.6) (z + m + τ n, τ ) = −2πini e − n τ n − n z θ(z, τ ) + e (z, τ ). n τn + n z ∂zi 2 2 ∂zi In particular, when θ(z, τ ) = 0 this gives   1 t ∂θ ∂θ t (z + m + τ n, τ ) = e (z, τ ). n τn + n z (5.7) ∂zi 2 ∂zi Hence, on the theta divisor Θτ ⊆ Aτ we have a well defined rational map   ∂θ ∂θ g−1 (5.8) γ : Θτ 99K P γ= ,..., ∂z1 ∂zg called the Gauss map. By definition, the Gauss map is not defined at the points of Θτ where all the partial derivatives vanish. This means that the Gauss map is not defined precisely at the singular points of Θτ . One can show that this is the same map induced by the complete linear system H 0 (Θτ , OΘτ (Θτ )). In the next lemma we show how to describe the restriction of φd,τ to Θτ in terms of the Gauss map. Lemma 5.4. The restriction φd,τ |Θτ : Θτ 99K PNg,d corresponds to the composition (5.9) γ vd Θτ 99K Pg−1 ,→ P( g−1+d d )−1 ,→ PNg,d where vd isthe d-th Veronese embeddding of Pg−1 , and the last map is the linear embedding in the last g−1+d coordinates that sets all the others to zero. d Proof. By definition, the coordinates of φd,τ are given by θd κa , for |a| ≤ d, |a| 6= 1. The proof of Proposition 5.1 shows that we can write them in the form (−1)|a| θd (1 − |a|) · (Dz θ)a + θd ga (2πi)|a| θ|a| where the ga are meromorphic functions with poles only along Θτ and of order strictly smaller than |a|. In particular, since |a| ≤ d, it follows that the functions θd ga vanish identically along the theta d divisor. The same is true for the functions θθ|a| (Dz θ)a , when |a| < d. Hence, when we restrict the θd κa to the theta divisor Θτ , the only nonzero terms are those corresponding to |a| = d. In this case, we get (5.10) (5.11) θ d κa = (θd κa )|Θτ = (−1)d (1 − d) · (Dz θ)a|Θτ , (2πi)d d (−1) The common nonzero constant (2πi) d (1−d) does not matter since we are taking a map into projective space. Hence, we just need to consider the functions {(Dz θ)a|Θτ }|a|=d . However, since the (Dz θ)a correspond to taking monomials of degree d in the partial derivatives Dzi θ, this is the same as the d-th Veronese embedding composed with the Gauss map, and we are done.  Using this lemma we can draw consequences on the maps φd,τ . For example, it is immediate to see where the φd,τ are defined. DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 16 Corollary 5.5. The rational map φd,τ : Aτ 99K PNg,d is not defined precisely at the singular points of Θτ . In particular, it is defined everywhere if and only if Θτ is smooth. Proof. Since the first coordinate of the map is θd , the map is defined everywhere outside of Θτ . Moreover, Lemma 5.4 shows that the restriction of the map to Θτ is essentially given by the Gauss map composed with an embedding. Hence, it is not defined if and only if the Gauss map is not defined, which happens precisely at the singular points of Θτ .  We usually want maps that are nondegenerate, in the sense that its image cannot be contained in a hyperplane. We now give a sufficient condition for this not to happen to the maps φd,τ . Lemma 5.6. Suppose that the theta divisor Θτ is irreducible. Then the image of the rational map φd,τ : Aτ 99K PNg,d is not contained in a hyperplane. Proof. To show that the image is not contained in any hyperplane is the same as proving that the functions θd κa for |a| ≤ d, |a| = 6 1 are linearly independent. we are going to prove linear independence by induction on d. The base cases d = 0 and d = 1 are immediate. So, assume we have a linear relation X X (5.12) λ0 θ d + λa θd κa + · · · + λa θd κa = 0, for certain λa ∈ C. |a|=2 |a|=d By induction hypothesis, it is enough to prove that λa = 0 for all |a| = d. Since Θτ is irreducible, Lemma 5.1 shows that each κa has poles of order exactly |a| along Θτ . Hence, if we restrict the above relation to Θτ , we get that (θd κa )|Θτ = 0 for all |a| < d, and we are left with X (5.13) λa (θd κa )|Θτ = 0. |a|=d It is then enough to show that the functions (θd κa )|Θτ , for |a| = d, are linearly independent. g−1+d Equivalently, we need to show that the image of the map Θ 99K P( d )−1 that these functions τ induce is not contained in any hyperplane. We know from Lemma 5.4 that this map is a composition (5.14) γ vd g−1+d d Θτ 99K Pg−1 ,→ P( )−1 where γ is the Gauss map and vd is a Veronese embedding. Since Θτ is irreducible, the Gauss map is dominant [4, Proposition 4.4.2] and the image of the Veronese map is also not contained in any hyperplane. Hence, the image of the composite map is not contained in any hyperplane, and we are done.  Remark 5.7. We can give a geometric interpretation of this result, which will help us study the maps φd,τ . By construction, φd,τ is defined by a subset of functions in H 0 (Aτ , dΘτ ). It is known [4, Proposition 4.1.5] that if d ≥ 2, the complete linear system H 0 (Aτ , dΘτ ) induces everywhere defined maps (5.15) g −1 ψd,τ : Aτ −→ Pd . If Θτ is irreducible, Lemma 5.6 says that our maps φd,τ can be realized as a composition (5.16) ψd,τ Aτ −→ Pd g −1 π 99K PNg,d where the second map is a projection from a linear space. Hence, we can study φd,τ through the maps ψd,τ , which are well-known for algebraic geometers. For example, the fibers of the map ψ2,τ correspond exactly to the points z, −z exchanged by the involution. In contrast, the maps ψd,τ are all closed embeddings for d ≥ 3. We close this subsection with the following proposition. Proposition 5.8. Let F : Aτ → Aτ 0 be an isomorphism of polarized abelian varieties of dimension g. Then for every d there exists a linear isomorphism Q : PNg,d → PNg,d such that (5.17) φd,τ 0 ◦ F = Q ◦ φd,τ DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 17 Proof. If two polarized abelian varieties (Aτ , Θτ ) and (Aτ 0 , Θτ 0 ) are isomorphic, we know from the discussion in Section 3.2 that it must be that τ 0 = M τ for a certain M ∈ Sp(2g, Z), and then the isomorphism is given by FM,τ as in (3.6). Then, we can compute the relation between the logarithmic derivatives of θ(z, τ ) and θ(FM,τ (z), M τ ), using the Theta Transformation Formula (3.9), and the conclusion follows.  What this result is saying is that when we take two isomorphic abelian varieties (Aτ , Θτ ) ∼ = (Aτ 0 , Θτ 0 ), the two maps φd,τ , φd,τ 0 differ only by a linear change of coordinates. Hence, we can say that φd,τ depends only on the isomorphism class of the polarized abelian variety (Aτ , Θτ ). In particular, the statistical map φd can be defined for every abstract principally polarized abelian variety (A, Θ). In the next two subsections we study in more detail the univariate case g = 1 and the bivariate case g = 2. 5.2. The case g = 1. We first consider univariate discrete Gaussians, which correspond to elliptic curves on the abelian varieties side. In this case, we are going to see that actually, the maps φd,τ coincide with the well-studied maps ψd,τ . This means that elliptic normal curves are parametrized by cumulants of univariate discrete Gaussians. More precisely, fix a τ ∈ H1 , and for every d ≥ 2, consider the map (5.18) φd,τ : Aτ −→ Pd−1 , φd,τ = [θd , θd κ2 , . . . , θd κd ]. For elliptic curves, the theta divisor consists of a single point, so that it is immediately smooth and irreducible. By Corollary 5.5, the statistical map φd,τ is defined everywhere, and according to Remark 5.7, the map is a composition (5.19) ψd,τ π Aτ −→ Pd−1 99K PN1,d where the second map is a linear projection. But N1,d = d − 1, so that the projection π must be the identity. Hence, we can identify φd,τ with ψd,τ . This means the following: • d = 2: the map φ2,τ : Aτ → P1 is surjective of degree 2. The fibers correspond to opposite points z, −z of Aτ . In particular, it is ramified exactly at the four points of order two in Aτ . • d ≥ 3: the map φd,τ : Aτ ,→ Pd−1 is a closed embedding. The image is usually called an elliptic normal curve of degree d. In particular, the map φ3,τ embeds Aτ as a smooth cubic curve in P2 . This sheds light on the relation between univariate discrete Gaussians and their moments. Theorem 2.4 tells us that when the parameters z, τ are purely imaginary, the discrete Gaussians are uniquely determined by the moments up to order two. In contrast, we are going to show now that arbitrary (that is, complex) univariate discrete Gaussians of a fixed parameter τ are determined by the moments up to order three. Theorem 5.9. Fix τ ∈ H1 and let X(z,τ ) , X(z 0 ,τ ) be two discrete Gaussians with the same parameter τ . If the first three moments coincide, then they have the same distribution. Furthermore, if we consider discrete Gaussians with different parameters τ , the first two moments are not enough in general. Proof. We prove now the first part. If the first three central moments coincide, then the cumulants κ2 , κ3 coincide as well. This means that the two points z, z 0 ∈ Aτ have the same image under the map φ3,τ : Aτ → P2 . But we know from the previous discussion that this map is injective, hence, it must be that z, z 0 are the same point in Aτ , which is to say that z 0 = z + m + τ n for certain n, m ∈ Z. Then, Proposition 3.1 shows that X(z 0 ,τ ) ∼ X(z,τ ) − n, but since X(z,τ ) , X(z 0 ,τ ) have the same mean, it must be that n = 0, and we conclude.  A statistical consequence is that all higher moments of a Gaussian distribution are uniquely determined by the first three. We can make this explicit using the equation of the cubic curve φ3,τ (Aτ ) ⊆ P2 . To compute this equation we set some notations. For every fixed τ ∈ H1 , we consider the three points 0, 12 , τ2 ∈ C. If we take their images in Aτ , these give three of the 2-torsion points of Aτ . The DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS other torsion point is given by the image of [15, Lemma 4.1]. Now, we define (5.20) e1 (τ ) := Dz2 (log θ(z, τ )) (0, τ ) , e2 (τ ) := and the quantities 1 (5.21) A(τ ) = 2 (e1 + e2 + e3 ), π Then the following holds: 1 2 + τ2 , which coincides with the theta divisor Θτ ⊆ Aτ Dz2 (log θ(z, τ )) B(τ ) = 18  1 ,τ 2  , e3 (τ ) := 1 (e1 e2 + e1 e3 + e2 e3 ), 4π 4 Dz2 (log θ(z, τ )) C(τ ) = τ 2 ,τ , 1 e1 e2 e3 . 16π 6 Proposition 5.10. Fix τ ∈ H1 . Then the image of the map φ3,τ : Aτ → P2[X0 ,X1 ,X2 ] is the cubic (5.22) X0 X22 = −4X13 − A(τ )X0 X12 − B(τ )X02 X1 − C(τ )X03 . Equivalently, for each (z, τ ) ∈ C × H1 \ Θ1 we have the relation (5.23) κ23 = −4κ32 − A(τ )κ22 − B(τ )κ2 − C(τ ). Proof. For notational clarity we set νa = (2πi)a κa = Dza log θ. Now, we fix τ and we consider the meromorphic function on Aτ given by ν32 + 4ν23 : we can check, for example by a computer, that this has a pole of order at most four along Θτ . Let H 0 (Aτ , 4Θτ ) be the space of meromorphic functions on Aτ with poles at most of order 4 along Θτ . This space has dimension 4 by the classical theorem of Riemann-Roch, and the functions 1, ν2 , ν3 , ν22 are linearly independent elements in H 0 (Aτ , 4Θτ ), since they have poles of different order along Θτ . Hence, they form a basis of the space, so that (5.24) ν32 = −4ν23 + a(τ ) · ν22 + b(τ ) · ν2 + c(τ ) + d(τ ) · ν3 for certain a(τ ), b(τ ), c(τ ), d(τ ) independent of z. Now we observe that the functions ν32 and −4ν23 + a(τ )ν22 + b(τ )ν2 + c(τ ) are even, whereas the function d(τ ) · ν3 is odd. Hence, it must be that d(τ ) = 0. The equation reduces to: (5.25) ν32 = −4ν23 + a(τ )ν22 + b(τ )ν2 + c(τ ). Now, consider the map φ2,τ = [1, ν2 ] : Aτ → P1 : we know from a previous discussion that this is ramified precisely at the two torsion points of Aτ . Since Dz (ν2 ) = ν3 , this means precisely that ν3 (0) = ν3 ( 12 ) = ν3 ( τ2 ) = 0. Plugging this into (5.25), we get that e1 = ν2 (0), e2 = ν2 ( 12 ), e3 = ν2 ( τ2 ) are roots of the polynomial −4x3 + a(τ )x2 + b(τ )x + c(τ ). Then, we can write (5.26) a(τ ) = −4(e1 + e2 + e3 ), b(τ ) = 4(e1 e2 + e1 e3 + e2 e3 ), To conclude, it is enough to replace νa = (2πi)a κa . c(τ ) = −4e1 e2 e3 .  Remark 5.11. This relation tells us that the second cumulant determines the third cumulant up to a sign. We can also get the higher cumulants as follows: using the same notation as in the previous proof, consider the equation (5.27) ν32 = −4ν23 + a(τ )ν22 + b(τ )ν2 + c(τ ). Then, taking derivatives with respect to z we get b(τ ) . 2 Passing to the cumulants, this gives a formula to compute the fourth cumulant from the second. Differentiating again, we get a formula for the fifth cumulant and so on. All together, this gives explicit formulas to compute the higher moments, starting from the first three. It is worth mentioning that the equation we obtain in Proposition 5.10 is the same as the one obtained through the Weierstrass ℘-function [15, Section 1.6]. In addition, the relations we obtain by differentiating can be interpreted through the Korteweg-de Vries equation, as in [15, Section 1.6]. (5.28) ν4 = −6ν22 + a(τ )ν2 + As an application of the cubic equation of Proposition 5.10, we are going to show that univariate discrete Gaussians of arbitrary parameters z, τ are not uniquely determined by their moments up to order two. To do this, we consider the map  (5.29) Φ : (C × H1 ) \ Θ1 → C2 (z, τ ) 7→ (µ, Σ) = µ[X(z,τ ) ], Var[X(z,τ ) ] .  DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 19 This assigns to each couple of parameters (z, τ ) the mean and the covariance of the corresponding discrete Gaussian distribution. By construction, this map factors through the space G1 of all univariate discrete Gaussian distributions. Hence, we get a map e : G1 → C2 Φ (5.30) and we are asking whether this map is injective. We show here that this is not the case. e is not injective. Hence, mean and covariance do not determine an Theorem 5.9 says the map Φ univariate discrete Gaussian in general. We conclude the proof now. Proof. (Theorem 5.9) We know from Remark 3.4 that G1 is a complex manifold of dimension two. e is injective, its differential should be everywhere an isomorphism between tangent spaces. Hence, if Φ To check this, we may as well work with Φ, for which we can compute the differential explicitly. We have    1 1 (5.31) Φ(z, τ ) = µ[X(z,τ ) ], Var[X(z,τ ) ] = ν1 , ν2 (2πi) (2πi)2 where ν1 , ν2 are the same as in the proof of Proposition 5.10. Up to multiplication by a nonzero constant, the differential of Φ is given by  1    Dz ν1 Dτ1 ν1 ν2 Dτ1 ν1 (5.32) DΦ = = . Dz1 ν2 Dτ1 ν2 ν3 Dτ1 ν2 However, we see that Dτ1 ν1 = Dτ1 Dz1 (log θ) = Dz1 Dτ1 (log θ) and the same holds for ν2 . Then, we can use the heat equation (4.23), and we get that  1 Dz2 θ 1 1 Dτ1 θ = = Dz2 (log θ) + Dz1 (log θ)2 = (ν2 + ν12 ) θ 4πi θ 4πi 4πi Thus, up to multiplying by a nonzero constant, we can write   ν2 ν3 + 2ν1 ν2 (5.34) det DΦ = det ν3 ν4 + 2ν22 + 2ν1 ν3   ν2 ν3 = det (5.35) ν3 ν4 + 2ν22   ν ν3 = det 2 (5.36) = ν2 ν4 + 2ν23 − ν32 . ν3 ν4 + 2ν22 (5.33) Dτ1 (log θ) = Using the equations (5.25) and (5.28), we get that: b(τ ) ν2 + c(τ ) 2 where b(τ ), c(τ ) are as in the proof of Proposition 5.10. We want to show that this vanishes on some points of C × H1 \ Θ1 . It is enough to show that b(τ ) is not identically zero. Indeed, if we fix a τ such that b(τ ) 6= 0, the function − b(τ2 ) ν2 + c(τ ) is a meromorphic function on Aτ with poles of order two along the theta divisor Θτ , so that it must have zeroes on Aτ \ Θτ . A SAGE computation reveals that b(τ ) is indeed not identically zero (by evaluating its explicit expression (5.26)), and we are done.  (5.37) ν2 ν4 + 2ν23 − ν32 = − 5.3. The case g = 2. In the case of dimension two the situation becomes more complicated. First, let’s fix a parameter τ ∈ H2 such that the theta divisor Θτ is irreducible. In this case [4, Corollary 11.8.2] Θτ is also smooth: more precisely, Θτ is a smooth curve of genus 2 and Aτ is its Jacobian variety. Remark 5.12. It will be useful to single out some results about the Gauss map (5.38) γ : Θτ −→ P1 in this situation. We have seen before that this map corresponds to the one induced by the line bundle OΘτ (Θτ ). Since Θτ is a smooth curve, the adjunction formula [10, Formula II.8.20] shows that OΘτ (Θτ ) is the canonical bundle of Θτ . Since Θτ has genus two, it follows that γ is a double cover of P1 . We can identify the fibers explicitly: indeed we see from the explicit form (5.8) that the Gauss map is invariant under the involution z 7→ −z of Θτ . Since this map has degree precisely DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 20 two by the previous discussion, it follows that the fibers of γ consist precisely of opposite points z, −z, with z ∈ Θτ . Now set d ≥ 2. Since Θτ is smooth, Corollary 5.5 shows that the map (d + 2)(d + 1) −3 2 is everywhere defined. Moreover, since Θτ is irreducible, Remark 5.7 shows that this map can be realized as a composition (5.39) φτ,d : Aτ → PN2,d , ψd,τ N2,d = 2 −1 Aτ −→ Pd (5.40) π 99K PN2,d where π is a linear projection. We study this situation when d = 2 and d = 3. • d = 2. In this case, we see that d2 − 1 = N2,d = 3, so that the projection π must be the identity. Hence we can identify the map φ2,τ with ψ2,τ . This map is well studied: it induces a degree 2 cover of Aτ onto a quartic surface Xτ ⊆ P3 with 16 nodes. This surface is called the Kummer surface of Aτ , and the map φ2,τ : Aτ → Xτ realizes it as the quotient of Aτ under the involution z 7→ −z. In particular, the 16 nodes correspond to the points of order two in Aτ . • d = 3. In this case, we see that N2,d = 7, whereas d2 − 1 = 8. Hence, the map φ3,τ is the composition of the closed embedding ψ3,τ : Aτ ,→ P8 , with a projection π : P8 99K P7 from a point P . We want to identify geometrically this point. To do this, take any z ∈ Θτ which is not a point of order two: then we claim that φ3,τ (z) = φ3,τ (−z). Taking this claim for granted, we can rephrase it by saying that the two points ψ3,τ (z), ψ3,τ (−z) must lie on a common line with the point P . Hence, the point P can be characterized as the common intersection point of all the lines in P8 spanned by the couples ψ3,τ (z), ψ3,τ (−z), for z ∈ Θτ . To conclude we need to prove the claim. We know that the restriction of φ3,τ to the theta divisor Θτ is the composition of the Gauss map γ : Θτ → P1 with a closed embedding. Hence, it is enough to show that γ(z) = γ(−z) for all z ∈ Θτ . However, this follows from the discussion in Remark 5.12. What if Θτ is reducible? Then [4, Corollary 11.8.2] shows that the polarized abelian surface (Aτ , Θτ ) must be a product of elliptic curves. If we want  to study the geometry of the maps φd,τ , τ1 0 we can use Proposition 5.8, and assume that τ = 0 τ2 , so that (Aτ , Θτ ) = (Aτ1 , Θτ1 ) × (Aτ2 , Θτ2 ). By Proposition 3.9, this corresponds to the case of two independent discrete Gaussians, and in particular it is straightforward to compute the cumulants κ(a1 ,a2 ) . We have that κ(a1 ,0) ((z1 , z2 ), τ ) = κa1 (z1 , τ1 ), κ(0,a2 ) ((z1 , z2 ), τ ) = κa2 (z1 , τ1 ), and the mixed cumulants κ(a1 ,a2 ) ((z1 , z2 ), τ ) vanish whenever one of a1 , a2 is nonzero. Hence, we can write the rational maps φd,τ as the composition of the two maps (5.41) A τ1 × A τ2 φd,τ1 ×φd,τ2 −→ fd Pd−1 × Pd−1 99K P2d−2 , where the second map fd is given by (5.42) ([X0 , . . . , Xd−1 ], [Y0 , . . . , Yd−1 ]) 7→ [X0 Y0 , Y0 X1 , . . . , Y0 Xd−1 , X0 Y1 , . . . , X0 Yd−1 ] Remark 5.13. In particular, we observe that the map φd,τ1 × φd,τ2 sends the open subset Aτ \ Θτ into the open subset {X0 6= 0}×{Y0 6= 0}, and the map fd restricted to this subset is an isomorphism onto the image. As in Theorem 5.9, we can use the statistical map φ3,τ to see that discrete Gaussians of dimension 2 with the same parameter τ are determined by the moments up to order three. Theorem 5.14. Fix τ ∈ H2 and let X(z,τ ) , X(z 0 ,τ ) be two discrete Gaussians with the same parameter τ . If all the moments up to order three coincide, then they have the same distribution. Proof. Proceeding in the same way as in dimension 1, it is enough to show that the map φ3,τ : Aτ → P3 is injective on the open set Aτ \ Θτ . Suppose first that Θτ is irreducible. If we look at Aτ as embedded in P8 by ψ3,τ , the injectivity of φ3,τ is equivalent to saying that no two points x, y in Aτ \ Θτ lie on a line passing through the point P . Suppose that this happens and take two distinct points z, −z ∈ Θτ exchanged by the involution. Then the line that they span is also passing through P , so that the four distinct points DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 21 x, y, z, −z span a two-dimensional plane in P8 . However, Lemma 5.15 below shows that in this case x, y belong to Θτ as well, which is absurd.  Suppose instead that Θτ is reducible: then as before we can assume τ = τ01 τ02 , so that the map φ3,τ is a composition of the map φ3,τ1 × φ3,τ2 and of the map f3 , as in (5.41). Since φ3,τ1 × φ3,τ2 is a product of closed embeddings, it is injective. Moreover, Remark 5.13 shows that the map f3 is injective when restricted to the image of Aτ \ Θτ , and we are done.  To conclude the previous proof, we need a more technical lemma from Algebraic Geometry. In particular, we will make use some intersection theory on surfaces, for which we refer to [10, Section V.1]. Lemma 5.15. Fix τ ∈ H2 such that Θτ is irreducible and consider the embedding ψ3,τ : Aτ ,→ P8 . Take two opposite points z, −z ∈ Θτ and other two points x, y ∈ Aτ . Suppose that the points ψ3,τ (z), ψ3,τ (−z), ψ3,τ (x), ψ3,τ (y) span a plane of dimension two in P8 . Then x, y belong to Θτ as well. Proof. With these assumptions, the proof of [17, Theorem 5.7] shows that the points z, −z, x, y lie on a smooth curve C ⊆ Aτ of genus two, such that (C · Θτ ) = 2. Since (C 2 ) = 2, an application of the Hodge Index Theorem [10, Theorem V.1.9] shows that C and Θτ are actually numerically equivalent curves on Aτ . Since Aτ is an abelian variety, it follows [4, Theorem 4.11.1] that C is actually the translate of Θτ by a point c ∈ Aτ , so that C = Θτ + c. If c = 0, we are done. Suppose that c 6= 0: this means [4, Lemma 11.3.1] that the restriction OΘτ (C) is a line bundle of degree two which is not the canonical line bundle on the curve Θτ . However, the line bundle OΘτ (C) corresponds by definition to the divisor Θτ ∩ C = {z, −z}, and we have seen in Remark 5.12 that this is a canonical divisor on Θτ . This gives a contradiction and we are done.  5.4. Open questions. From these results in dimension one and two, there are natural questions that arise: Question 5.16. We have seen in Theorem 5.9 and Theorem 5.14 that two Gaussian distributions in dimension 1 or 2 with the same parameter τ can be distinguished by the moments up to order three. Is this true for every dimension g? Following the proofs of Theorems 5.9 and 5.14, a geometric way to prove this would be to show that the maps (5.43) φ3,τ : Aτ \ Θτ −→ PN3,g are injective for every τ ∈ Hg . Moreover, it could be that for a fixed parameter τ , two Gaussian distributions can be distinguished just by the moments up to order two. We would like to identify when this happens too. We can generalize this question to all Gaussian distributions at the same time: Question 5.17. We have seen in Theorem 5.9 that in general mean and covariance are not enough to determine a discrete Gaussian. Could this be true if we take all moments up to order three? Or up to an higher order d? Geometrically, this would mean to study the fibers of the map (5.44) Φd,g : Cg × Hg \ Θg −→ PNd,g , (z, τ ) 7→ φd,τ (z). Remark 5.18. Taking our correspondence further, mixtures of discrete Gaussians correspond to secants of abelian varieties. More precisely, if τ is fixed then mixtures of two discrete Gaussians with parameters (z1 , τ ), (z2 , τ ) form a secant line in the corresponding abelian variety, while mixtures with (z1 , τ1 ), (z2 , τ2 ) lie in a secant line to the universal family Ug . This should be a very interesting connection to explore, with natural recurring questions such as identifiability from moments (the case of continuous Gaussian mixtures is treated in [3]). Acknowledgements We would like to give special thanks to Bernd Sturmfels for dreaming and suggesting the connection between multivariate discrete Gaussians and theta functions. We thank Lynn Chua for her help with SAGE computations. Thanks to Samuel Grushevsky for his interest and his valuable comments. Thanks also to Daniel Dadush, Oded Regev and Noah Stephens for offering the CS perspective of discrete Gaussians, and to Robert Gray for his interest in this work. Daniele Agostini DISCRETE GAUSSIAN DISTRIBUTIONS VIA THETA FUNCTIONS 22 was supported by the DAAD, the DFG Graduiertenkolleg 1800, the DFG Schwerpunkt 1489 and the Berlin Mathematical School. He also thanks the Stony Brook Mathematics Department for its hospitality while writing this work. Carlos Améndola was supported by the Einstein Foundation Berlin. References [1] Aggarwal, D., Dadush, D. and Stephens-Davidowitz N. (2015) Solving the closest vector problem in 2n time - the discrete Gaussian strikes again!. FOCS, IEEE 56th Annual Symposium, 563-582. [2] Améndola, C., Faugère, J.C. and Sturmfels, B. (2016) Moment varieties of Gaussian mixtures. Journal of Algebraic Statistics 7, 14-28. [3] Améndola, C., Ranestad, K. and Sturmfels, B. (2018) Algebraic identifiability of Gaussian mixtures. International Mathematics Research Notices. [4] Birkenhake, C. and Lange, H. (2013). Complex Abelian Varieties, Vol 302. Springer Science & Business Media. [5] Brown, L.D. (1986) Fundamentals of Statistical Exponential Families with Applications in Statistical Decision Theory. Lecture Notes-monograph series 9, i-279. [6] Cover, T.M. and Thomas, J.A. (2006). Elements of Information Theory. Wiley, 409-413. [7] Deconinck, B., Heil, M., Bobenko, A., Van Hoeij, M. and Schmies M. (2003). Computing Riemann Theta functions. Mathematics of Computation, 73, 247, 1417-1442. [8] Drton, M., Sturmfels B. and Sullivant, S. (2009) Lectures on Algebraic Statistics, Oberwolfach Seminars, Vol 39, Birkhäuser, Basel. [9] Dwarakanath, N.C. and Galbraith, S.D. (2014). Sampling from discrete Gaussians for lattice-based cryptography on a constrained device. Applicable Algebra in Engineering, Communication and Computing, 25(3), 159-180. [10] Hartshorne, R. (1977). Algebraic Geometry. Springer. [11] Kemp, A. W. (1997). Characterizations of a discrete normal distribution. Journal of Statistical Planning and Inference, 63(2), 223-229. [12] Lisman, J.H. and Zuylen, M.C. (1972). Note on the generation of most probable frequency distributions. Statistica Neerlandica, 26, 19-23. [13] Micciacio, D. and Walter, M. (2017). Gaussian sampling over the integers. IACR Cryptology ePrint Archive, p. 259. [14] Michalek, M., Sturmfels, B., Uhler C. and Zwiernik, P. (2016). Exponential varieties. Proceedings of the London Mathematical Society 112, 27-56. [15] Mumford, D. (1983). Tata Lectures on Theta I. Birkhäuser. [16] Regev, O. and Stephens-Davidowitz, N. (2017). An inequality for Gaussians on lattices. SIAM Journal on Discrete Mathematics, 31(2), 749-757. [17] Terakawa, H. (1998). The k-very ampleness and k-spannedness on polarized abelian surfaces. Mathematische Nachrichten, 195, 237-250. [18] Swierczewski, C. and Deconinck, B. (2013). Computing Riemann Theta Functions in Sage with applications. Mathematics and Computers in Simulation, 127, 263-272. [19] Szablowski, P. J. (2001). Discrete normal distribution and its relationship with Jacobi Theta functions. Statistics & probability letters, 52(3), 289-299. [20] Willink, R. (2003). Relationships between central moments and cumulants, with formulae for the central moments of Gamma distributions. Communications in Statistics-Theory and Methods, Vol. 32(4), 701-704. Humboldt-Universität zu Berlin, Institut für Mathematik, Unter den Linden 6, 10099, Berlin Germany E-mail address: [email protected] Technische Universität Berlin, Institut für Mathematik, Straße des 17. Juni 136, 10623, Berlin Germany E-mail address: [email protected]
10math.ST
Shrinkage Estimation of Covariance Matrix for Portfolio Choice with arXiv:1611.06753v1 [math.ST] 21 Nov 2016 High Frequency Data Cheng Liu, Ningning Xia and Jun Yu ∗ November 22, 2016 Abstract This paper examines the usefulness of high frequency data in estimating the covariance matrix for portfolio choice when the portfolio size is large. A computationally convenient nonlinear shrinkage estimator for the integrated covariance (ICV) matrix of financial assets is developed in two steps. The eigenvectors of the ICV are first constructed from a designed time variation adjusted realized covariance matrix of noise-free log-returns of relatively low frequency data. Then the regularized eigenvalues of the ICV are estimated by quasi-maximum likelihood based on high frequency data. The estimator is always positive definite and its inverse is the estimator of the inverse of ICV. It minimizes the limit of the out-of-sample variance of portfolio returns within the class of rotation-equivalent estimators. It works when the number of underlying assets is larger than the number of time series observations in each asset and when the asset price follows a general stochastic process. Our theoretical results are derived under the assumption that the number of assets (p) and the sample size (n) satisfy p/n → y > 0 as n → ∞. The advantages of our proposed estimator are demonstrated using real data. Some key words: Portfolio Choice, High Frequency Data; Integrated Covariance Matrix; Shrinkage Function. JEL classification: C13; C22; C51; G12; G14 ∗ Liu is an assistant professor in Economics and Management School of Wuhan University, Hubei, China. Email: chengliu [email protected]. Xia is an assistant professor in School of Statistics and Management, Shanghai University of Finance and Economics. Email: [email protected]. Yu is a professor in School of Economics and Lee Kong Chian School of Business, Singapore Management University. Email: [email protected]. 1 1 Introduction The portfolio choice problem has been an important topic in modern financial economics ever since the pioneer contribution by Markowitz (1952). It is well-known in the literature that constructing an optimal portfolio requires a good estimate for the second moment of the future return distribution, i.e., the covariance matrix of the future returns. The simplest situation for estimating the covariance matrix is when the returns are independent and identically normally distributed (IID) over time. In this case, the maximum likelihood estimator (MLE) is the sample covariance matrix and the efficiency of MLE is justified asymptotically. However, there are at least two problems for using the sample covariance matrix to select the optimal portfolio in practice. First, when the portfolio size is large, the sample covariance matrix is found to lead to poor performances in the selected portfolio; see Jobson and Korkie (1980) and Michaud (1989). Not surprisingly, the sample covariance matrix is rarely used by practitioners when the portfolio size is large. The reason for the poor performances is due to the degree-of-freedom argument. That is, too many parameters have to be estimated in the covariance matrix when the portfolio size is large. In fact, if the portfolio size is larger than the number of time series observations in each asset, the sample covariance is always singular. Second, the returns are not IID over time. This is because typically the covariance is time varying. In this case, the asymptotic justification for using the sample covariance matrix is lost. Many alternative estimators of the large dimensional covariance matrix for portfolio choice have been proposed in the literature. A rather incomplete list includes Ledoit and Wolf (2003, 2004, 2014), Frahm and Memmel (2010), DeMiguel, Garlappi, and Uppal (2009), DeMiguel, Garlappi, Nogales, and Uppal (2009), Kan and Zhou (2007), Fan, Fan and Lv (2008), Pesaran and Zaffaroni (2009), Tu and Zhou (2011). Most studies use dimension reduction techniques. One of the techniques uses factor (either observed factors or latent factors) models. Another approach uses a statistical technique known as shrinkage, a method first introduced by Stein (1956). Murihead (1987) reviewed the literature on shrinkage estimators of the covariance matrix. All these estimators are constructed from low frequency data (daily, weekly or monthly data) over a long period (one year or more). However, if the investment period of a portfolio is much shorter (say one day or one week or one month) which is empirically more relevant, given the time varying nature of the covariance, we expect the covariance in the near future to be similar to the average covariance over an immediate recent time period but not to that over a long time period. Hence, even if data over a long time period is available, one may only prefer using data over a short period. If low frequency data over a short time period are used, however, the degree-of-freedom argument will be applicable. The recent availability of quality high-frequency data on financial assets has motivated a growing literature devoted to the model-free measurement of covariances. In a recent study, Fan, Li and Yu (2012) proposed to use high-frequency data to estimate the ICV over a short time period for the purpose of portfolio choice. Their setup allows one to impose gross exposure constraints. The use of gross exposure constraints plays a similar role to the no-short-sale 2 constraint in Jagannathan and Ma (2003). Fan, Li and Yu (2012) demonstrated the substantial advantages of using high-frequency date in both simulation and empirical studies. There are several reasons why it is better to use high frequency data to estimate the covariance matrix. First, the use of high frequency data drastically increases the sample size. This is especially true for liquid assets. Second, one does not need to assume returns are IID any more for establishing the large sample theory for the estimator. This generalization is important due to the time-varying nature of spot covariance. Not surprisingly, the literature on estimating the ICV based on high frequency data is growing rapidly. In this paper, we also use high frequency data to estimate the ICV for the purpose of portfolio choice. Unlike Fan, Li and Yu (2012) where portfolio choice is done under pre-specified exposure constraints, we focus our attention on how to get a good shrinkage estimator of the ICV without any pre-specified constraint.1 This shift of focus is due to the lack of guidance on how to specify the gross exposure constraints. Our estimator designs the shrinkage function as in Ledoit and Wolf (2014). However, we differ from Ledoit and Wolf (2014) in the following important ways. First, instead of applying the shrinkage function to the eigenvalues of sample covariance matrix by assuming the returns are IID, we regularize the eigenvalues of a designed time variation adjusted (TVA) realized covariance matrix under the assumption that the covariance matrix is time varying. Second, instead of using low frequency data, we use high frequency data for constructing the designed TVA realized covariance matrix and estimating its regularized eigenvalues. We show that our proposed estimator, which will be given in Section 3, not only has some desirable properties in terms of estimating the ICV, but also asymptotically achieves the minimum out-of-sample portfolio risk. The paper is organized as follows. In Section 2 we set up the portfolio choice problem. Section 3 introduces our estimator and discusses its properties and implementations. In Section 4, we compare the out-of-sample performance of our proposed method with several methods proposed in the literature using actual data, including the equal weight, the linear shrinkage estimator of Ledoit and Wolf (2004), and the high frequency method of Fan, Li and Yu (2012). Section 5 concludes. The appendix collects the proof of our theoretical results. 2 Portfolio Selection: The Setup Suppose that a portfolio is constructed based on a pool of p assets whose log-price is denoted by Xt = (X1t , · · · , Xpt )′ , where M′ denotes the transpose of the vector or matrix M. Instead of assuming Xt follows a Brownian motion which means that the log-returns are IID, we assume Xt follows a more general diffusion process as dXt = µt dt + Θ t dBt , 1 (1) DeMiguel, Garlappi, Nogales, and Uppal (2009) showed that adding a constraint for 1-norm of weights is equivalent to shrinkage the estimator of covariance matrix. 3 where µt = (µ1t , · · · , µpt )′ is a p-dimensional drift process at time t, Θ t is a p × p (spot) covolatility matrix at time t, and Bt is a p-dimensional standard Brownian motion. A portfolio is constructed based on Xt with weight wT which satisfies w′T 1 = 1 at time T and a holding period τ , where 1 is a p-dimensional vector with all elements being 1. Over the R T +τ period [T, T + τ ], it has a return w′T T dXt , and has a risk (variance) RT,T +τ (wT ) = e T,T +τ wT , w′T Σ e T,T +τ = where Σ Z T +τ ET Σt dt, T with Σt = Θ tΘ ′t being the (spot) covariance matrix at time t and ET denotes the expectation conditional on information up to time T (see Fan, Li and Yu, 2012). Typically, the holding period τ is short (say one day or one week or one month). e To focus on finding a good approximation for Σ , we consider the following global minT,T +τ imum variance (GMV) problem: e T,T +τ wT min w′T Σ wT w′T 1 = 1. with (2) By taking the derivative of wT , we have the following theoretical optimal weight, wT = e −1 1 Σ T,T +τ −1 e T,T +τ 1 1′ Σ , (3) e T,T +τ . which is a function of the expected ICV conditional on the current time T , i.e., Σ Denote the ICV over the period [T − h, T ] by ΣT −h,T := Z T Σt dt. T −h If h is small, following Fan, Li and Yu (2012), we use the following approximation e T,T +τ ≈ τ ΣT −h,T . Σ h (4) Consequently, the theoretical optimal weight becomes wT = Σ−1 T −h,T 1 1′ Σ−1 T −h,T 1 . (5) The reason for choosing a small h from the historical sample (i.e. a small time span for [T − h, T ]) to approximate the expected ICV is due to the time varying and persistent nature of the covariance matrix. If a big h (say 10 years) is used and an average covariance matrix is used to approximate the expected ICV, the approximation errors would be inevitably large. In fact, as rightly argued in Fan, Li and Yu (2012), even when the true covariance matrices are available, an average of them will still lead to large approximation errors. 4 ∗ b Let Σ T −h,T denote a generic (invertible) estimator of the ICV ΣT −h,T . The plug-in estimator of the optimal portfolio weight for wT in (5) is −1  ∗ b 1 Σ T −h,T . ŵ∗T :=   −1 ∗ ′ b 1 1 ΣT −h,T b∗ We need to find the optimal Σ T −h,T for portfolio choice. Given that the optimal portfolio is typically meant to perform the best out-of-sample, following Ledoit and Wolf (2014), we define a loss function for portfolio selection to be the out-of-sample variance of portfolio returns b∗ conditional on Σ T −h,T , −1 −1  ∗  ∗ ′ Σ b b T −h,T 1 Σ Σ 1 T −h,T T −h,T ∗ ∗ ′ b∗ = ) Σ ŵ L(Σ , Σ ) = ( ŵ ,   T −h,T T −h,T T T T −h,T 2 −1  ∗ ′ b 1 1 ΣT −h,T (6) e T,T +τ by τ ΣT −h,T and ignore the scale τ without any loss. The best where we approximate Σ h h b∗ estimator of the ICV is therefore the one that minimizes the loss function L(Σ T −h,T , ΣT −h,T ). Although this paper mainly focuses on the GMV problem, our estimation technique has a much wider implications for other problems that also require the estimation of ICV, including the Markowitz portfolios with and without estimating the conditional mean. In the empirical studies, we will show the usefulness of our proposed method in the context of the Markowitz portfolio. 3 The New Estimator of ICV Denote the trading time points for the ith asset by 0 ≤ ti1 < ti2 < ... < ti,Ni ≤ T with i = 1, ..., p. It is difficult to estimate the ICV based on tick-by-tick high frequency data when the number of stocks (p) is large for the following reasons. First, data are always non-synchronous. Second, data are contaminated by microstructure noises. Denote Yi,tij the log-price of the ith asset at time tij and Xi,tij the latent log efficient price of the ith asset. Then Yi,tij = Xi,tij + ǫi,tij , where ǫi,tij is the market microstructure noise at time tij . Third, the spot covariance matrix Σt of returns of latent log-price Xt is time varying. Fourth, the returns of the efficient price are not independent over time. To find a good estimator for the ICV, we first introduce an initial estimator, denoted the time variation adjust (TVA) realized covariance matrix, and discuss its disadvantages for estimating the ICV in subsection 3.1. To improve the initial estimator, we propose to regularize its eigenvalues. In subsection 3.2, we provide the theoretical background for regularizing the eigenvalues of TVA realized covariance matrix. We then demonstrate how to regularize its eigenvalues in subsection 3.3. 5 3.1 The initial estimator of ICV: TVA To simplify the problem, we propose the following structural assumption for Xt . The same assumption was also used in Zheng and Li (2011). Definition 3.1. (Class C). Suppose that Xt is a p-dimensional process satisfying Equation (1). We say that Xt belongs to class C if, almost surely, there exist γt ∈ D([T − h, T ]; R) and Λ a ΛΛ ′ ) = p such that p × p matrix satisfying tr(Λ Θ t = γt Λ , where D([T − h, T ]; R) stands for the space of càdlàg functions from [T − h, T ] to R. Remark 3.1. Class C allows the covariance matrix to be time varying because γt is time varying. The assumption of Θ t = γtΛ may be too strong than necessary but facilitates the mathematical proof of the results in the present paper. If Xt belongs to class C, we can decompose Z Z T 2 ′ γt dt · ΛΛ = P ΣT −h,T = T −h T T −h γt2 dt  · Γ P′ , where Γ is a diagonal matrix, P an orthogonal matrix, and PΓP′ the eigen-decomposition of ΛΛ ′ such that the eigenvalues and eigenvectors of Σt = Θ tΘ ′t are time varying and invariant respectively. To estimate ΣT −h,T , Zheng and Li (2011) proposed to use the so-called TVA realized covariance matrix over the period [T − h, T ], which is defined as STVA T −h,T = tr ( Pn ′ k=1 ∆Xk ∆Xk ) p n · S̆T −h,T , where S̆T −h,T = p X ∆Xk ∆X′k , n |∆Xk |2 (7) k=1 ∆Xk = Xτk − Xτk−1 , and Xτk denotes the log efficient price Xt at time τk for T − h := τ0 < τ1 < · · · < τn := T. P Zheng and Li (2011) demonstrated that tr ( nk=1 ∆Xk ∆X′k )/p is a good estimator for RT 2 T −h γt dt and S̆T −h,T is similar to the sample covariance matrix with IID samples. Here similarity means that S̆T −h,T is a consistent estimator of population covariance matrix ΛΛ ′ when p is fixed, while the limiting spectral distribution of S̆T −h,T , which will be introduced later in the paper, is equivalent to that of the sample covariance matrix of IID samples generated from a distribution with zeros mean and population covariance ΛΛ ′ , when p goes to ∞ together with the sample size n. Clearly, the construction of TVA requires a synchronous record of p assets at (τ0 , τ1 , · · · , τn ). Since data is always non-synchronous, we need to synchronize them. In this paper, we use the previous tick method (see Zhang, 2011) to interpolate the prices. However, the efficient price is latent due to the presence of microstructure noise. To deal with this problem, we suggest using 6 sparse sampling so that the impact of microstructure noise can be ignored. Based on a Hausman type test, Aı̈t-Sahalia and Xiu (2016) showed that when data are sampled every 15 minutes, the observed prices are free of the microstructure noise problem. In this paper, we will follow this suggestion by sampling the interpolated data every 15 minutes. Denote (τ0 , τ1 , · · · , τn ) the time stamps at every 15 minutes. So Yτk ≈ Xτk . Denote the sparsely-sampled log-prices by Yτ0 , Yτ1 , ..., Yτn . The feasible TVA realized covariance matrix is constructed as P n TVA tr ( nk=1 ∆Yk ∆Y′k ) X ∆Yk ∆Y′k e , (8) ST −h,T = n |∆Yk |2 k=1 e TVA e TVA has the same properties as STVA , we treat S with ∆Yk = Yτk − Yτk−1 . Since S T −h,T T −h,T T −h,T TVA the same as STVA and only use S in the rest of this paper. T −h,T T −h,T It is well-known that the eigenvalues of the sample covariance matrix are more spread out than those of the population covariance matrix. This property is applicable not only to the TVA sample covariance matrix but also to STVA T −h,T . In other words, the smallest eigenvalues of ST −h,T tend to be biased downwards, while the largest ones upwards. As a result, there is a need to regularize the eigenvalues of STVA T −h,T . 3.2 Theoretical background for regularizing the eigenvalues of STVA T −h,T Let us first introduce some concepts in the random matrix theory. Let p denote the number of variables and n = n(p) the sample size. For any p × p symmetric matrix M, suppose that its eigenvalues are λ1 , · · · , λp , sorted in the non-increasing order. Then the empirical spectral distribution (ESD) of M is defined as p 1X F M (x) := I(λi ≤ x), p i=1 for x ∈ R, where I denotes the indicator function of a set. The limit of ESD as p → ∞, if exists, is referred to the limiting spectral distribution (LSD hereafter). Let Supp(G) denotes the support interval of distribution function G. For any distribution G, sG (·) denotes its Stieltjes transform defined as Z 1 sG (z) = dG(λ), for z ∈ C+ := {z ∈ C : ℑ(z) > 0}, λ−z where ℑ(·) denotes the imaginary part of a complex number. 3.2.1 The limit of loss function Suppose the eigen-decomposition of STVA T −h,T is ′ ′ STVA T −h,T = UVU = Udiag(v1 , ..., vp )U , (9) where v1 , ..., vp are eigenvalues of STVA T −h,T sorted in the non-increasing order, U = (u1 , ..., u p ) are corresponding eigenvectors. Let diag(M) denote a diagonal matrix with the diagonal elements being the diagonal elements of M if M is a matrix or being M if M is a vector. 7 To regularize the eigenvalues of STVA T −h,T , following Ledoit and Wolf (2014), we restrict our attention to a class of rotation-equivalent estimators which is defined below. This strategy allows us to use a nonlinear shrinkage method to regularize the eigenvalues. However, different from Ledoit and Wolf (2014), we do not assume returns are IID. Instead we assume that Xt ∈ C. Definition 3.2. (Class of Estimators S). We consider a generic positive definite estimator ′ b∗ for ΣT −h,T of the type Σ T −h,T := Udiag(gn (v1 ), · · · , gn (vp ))U , with v1 ≥ · · · ≥ vp being the eigenvalues of STVA T −h,T , U = (u1 , ..., u p ) being corresponding eigenvectors. Here gn is a real univariate function and can depend on STVA T −h,T . We assume that there exists a nonrandom real univariate function g(x), defined on Supp(F) and continuously differentiable, such that a.s. gn (x) −→ g(x), for all x ∈ Supp(F), where F denotes the LSD of STVA T −h,T . Here, gn (x) is called the shrinkage function because what it does is to shrink the eigenvalues of by reducing the dispersion around the mean, pushing up the small ones and pulling down the large ones. The high dimensional asymptotic properties of STVA T −h,T are fully characterized by its limiting shrinkage function g(x). As noted in Stein (1975) and Ledoit and Wolf (2014), the estimators in this class are rotation equivalent, a property that is desired when the user does not have any prior preference about the orientation of the eigenvectors. Since we consider the case that p goes to ∞ together with the sample size, finding the optimal estimator of ΣT −h,T within class S for portfolio selection is equivalent to the optimal  finding  ∗ b shrinkage function g(x) that minimizes the limit of the loss function L ΣT −h,T , ΣT −h,T for  ∗  b ∗T −h,T ∈ S. We have the following theorem to show the limit of L Σ b T −h,T , ΣT −h,T . Σ STVA T −h,T Theorem 3.1. Suppose that Xt is a p -dimensional diffusion process in class C for some drift process µt , covolatility process Θ t = γtΛ and p-dimensional Brownian motion Bt , which satisfies the following assumptions: (A.i) µt = 0 for t ∈ [T − h, T ], and γt is independent of Bt . (A.ii) There exists C0 < ∞ such that for all p, |γt | ∈ (1/C0 , C0 ) for all t ∈ [T − h, T ] almost surely; (A.iii) All eigenvalues of Σ̆ = ΛΛ ′ are bounded uniformly from 0 and infinity; RT (A.iv) limp→∞ tr (ΣT −h,T ) /p = limp→∞ T −h γt2 dt := θ > 0 almost surely; (A.v) Almost surely, as p → ∞, the ESD of ΣT −h,T converges to a probability distribution H on a finite support; (A.vi) The observation time points τk ’s are independent of the Brownian motion Bt and there exists a constant C1 > 0 such that max1≤k≤n n(τk − τk−1 ) ≤ C1 . If p/n → y ∈ (0, ∞), then the ESD of STVA T −h,T converges almost surely to a nonrandom probability distribution F . If Equation (9) is satisfied, then Z  Z  ∗  x dF (x) 2 a.s. b p × L ΣT −h,T , ΣT −h,T → dF (x)/ , |1 − y − yx × s̆F (x)|2 g(x) g(x) 8 ∗ ′ TVA b where Σ T −h,T := Udiag(gn (v1 ), · · · , gn (vp ))U is in class S by regularizing ST −h,T , g(x) is the ∗ b T −h,T . In addition, for all x ∈ (0, ∞), s̆F (x) is defined as limiting shrinkage function of Σ limz∈C+ →x sF (z), and sF (z) is the Stieltjes transform of the limiting spectral distribution of STVA T −h,T . Remark 3.2. Theorem 3.1 extends the result in Proposition 3.1 of Ledoit and Wolf (2014) from the IID case to Class C and from the sample covariance to the TVA realized covariance. b ∗T −h,T and Remark 3.3. Without loss of generality, if we assume that all the eigenvalues of Σ −1  ∗ −1 −1  ∗  ∗ b b b 1 = 1 = Op (p) and 1′ Σ ΣT −h,T Σ ΣT −h,T are bounded, 1′ Σ T −h,T T −h,T T −h,T  ∗  1 b Op (p), so that L Σ T −h,T , ΣT −h,T = Op ( p ). This is why we investigate the limiting behavior  ∗  b of p × L Σ in Theorem 3.1. T −h,T , ΣT −h,T Lemma 3.1. Under the assumptions of Theorem 3.1, a generic positive-definite estimator  ∗  ∗ b b ΣT −h,T within class S minimizes the almost sure limit of the loss function L ΣT −h,T , ΣT −h,T if and only if its limiting shrinkage function g satisfies x g(x) = , ∀ x ∈ Supp(F). (10) |1 − y − yx × m̆F (x)|2 Lemma 3.1 is a direct conclusion from Theorem 3.1 and Proposition 4.1 of Ledoit and Wolf (2014). Unfortunately, the above minimization problem does not yield a closed-form solution for g(x) because of m̆F (x) is unknown. In addition, finding m̆F (x) and then g(x) is numerically difficult in practice. Finding a good algorithm for estimating m̆F (x) is of great interest as it was done in Ledoit and Wolf (2014) that used a commercial package. However, in this paper we propose to find an alternative interpretation of g(x), which offers an easier way to approximate g(x). 3.2.2 Alternative interpretation of g(x) Motivated from Ledoit and Pèchè (2011), we can show that g(x) in (10) is equivalent to the asymptotic quantity corresponding to the oracle nonlinear shrinkage estimator derived from the e ′ and ΣT −h,T , i.e., following Frobenius norm of the difference between UVU min f diagonal V e ′ − ΣT −h,T kF , kUVU p where the Frobenius norm is defined as kMkF = tr(MM′ ) for any real matrix M. Elementary matrix algebra shows that the solution is e = diag(ṽ1 , · · · , ṽp ), V where ṽi = u′i ΣT −h,T ui , i = 1, · · · , p. (11) To characterize the asymptotic behavior of ṽi , i = 1, · · · , p, following the idea of Ledoit and Pèchè (2011), we define the following non-decreasing function p p i=1 i=1 1X ′ 1X ṽi I(vi ≤ x) = ui ΣT −h,T ui · I(vi ≤ x). Ψp (x) = p p 9 (12) Theorem 3.2. Assume that assumptions (A.i)-(A.vi) in Theorem 3.1 hold true and let Ψp be defined as in (12). If p/n → y ∈ (0, ∞), then there exists a nonrandom function Ψ defined over R such that Ψp (x) converges almost surely to Ψ(x) for all x ∈ R\{0}. If in addition y 6= 1, then Ψ can be expressed as Z x ∀ x ∈ R, δ(v)dF (v), Ψ(x) = (13) −∞ where F is the LSD of STVA T −h,T , and if v > 0, δ(v) = v . |1 − y − yv × m̆F (v)|2 Remark 3.4. Theorem 3.2 extends the result in Theorem 4 of Ledoit and Pèchè (2011) from the IID case to Class C. Theorem 3.2 implies that the asymptotic quantity that corresponds to ṽi = u′i ΣT −h,T ui is δ(v) provided that v corresponds to vi . An interesting finding is that the results of Lemma 3.1 and Theorem 3.2 are consistent with each other, even though they are motivated from two different perspectives. Given that it is much easier to work on the minimization problem in (11), we recommend to regularize the eigenvalues of STVA T −h,T by using (11), which is to find a good ′ estimator for each ṽi = ui ΣT −h,T ui with i = 1, ..., p . 3.3 Regularized estimators of eigenvalues of STVA T −h,T Note that ṽi = u′i ΣT −h,T ui is actually the integrated volatility of process u′i Xt over [T − h, T ] Pn ′ 2 for i = 1, 2, · · · , p. A natural estimator of each ṽi is the realized volatility k=1 (ui ∆Xk ) . Unfortunately, this is not a good idea. To see the problem, note that ! n n X X ∗∗ ′ 2 ′ 2 b T −h,T = Udiag (up ∆Xk ) U′ . (u1 ∆Xk ) , ..., Σ k=1 k=1 Let us consider the simplest case where γt = 1, Λ = Ip with Ip be a p-dimensional identity 1/2 Zk with Zk ’s are IID matrix, and τk − τk−1 = nh for k = 1, ..., n. We can write ∆Xk = nh ′ ′ ∆Xk ∆Xk k Zk p-dimensional standard normals such that = Z . Since |Zk |2 ∼ p as p → ∞, we | Zk | 2 |∆Xk |2 have P n tr ( nk=1 ∆Xk ∆X′k ) p X ∆Xk ∆X′k TVA ST −h,T = p n |∆Xk |2 k=1 P n tr ( nk=1 ∆Xk ∆X′k ) 1 X ∼ Zk Z′k , p n k=1 n X k=1 ∆Xk ∆X′k = n hX n Zk Z′k . k=1 10 By denoting ∆X = (∆X1 , ..., ∆Xn )′ , we have b ∗∗ Σ T −h,T n n X X ′ 2 = Udiag (u1 ∆Xk ) , ..., (u′p ∆Xk )2 k=1 = Udiag k=1 u′1 ∆X∆X′ u1 , ..., u′p ∆X∆X′ up  = Udiag U′ ∆X∆X′ U U′  ! U′ U′ ∼ ∆X∆X′ , which is actually the sample covariance matrix of IID samples generated from N (0, hIp ). Hence, its eigenvalues are also more spread out than that of hIp , a well-known result in the literature. To solve this problem, we use the idea from Abadir et al. (2014) and Lam (2016) by splitting the sample into two parts. We use the estimated eigenvectors from a fraction of the data to transform the data into approximately orthogonal series.2 We then use the independence of two sample covariance matrices to regularize the eigenvalues of one of them. Therefore, instead of based U on ∆Xk = Xτk − Xτk−1 (k = 1, ..., n) for T − h := τ0 < ... < τn := T , we base U∗ on ∗ ∆X∗r = Xτr∗ − Xτr−1 (r = 1, ..., m) for ∗ 0 := τ0∗ < τ1∗ < ... < τm < T − h, where U∗ = (u∗1 , ..., u∗p ) are the eigenvectors of STVA 0,T −h corresponding to the eigenvalues with the non-increasing order, and the TVA realized covariance matrix  Pm m ∗ ∗ ′ tr p X ∆X∗r (∆X∗r )′ r=1 ∆Xr (∆Xr ) TVA S0,T −h = · S̆0,T −h , with S̆0,T −h = . p m |∆X∗r |2 r=1 In addition, since the eigenvectors of Σt is assumed to be time invariant, we also consider the following optimization problem V∗ min diagonal kU∗ V∗ (U∗ )′ − ΣT −h,T kF , and estimate each diagonal element of the oracle minimizer V∗ = diag(v1∗ , ..., vp∗ ) with vi∗ = (u∗i )′ ΣT −h,T u∗i based on the data over the time period [T − h, T ]. To get an accurate estimator for each vi∗ with i ∈ {1, ..., p}, we propose to use all the tick-by-tick high frequency data and take into account with the microstructure noises. Let us first consider the case that the data are synchronous and equally recorded at time points {T − h := t∗0 < t∗1 < · · · < t∗N := T }, where the time interval ∆ = t∗j − t∗j−1 → 0 for all j = 1, ..., N as N → ∞ and h fixed. Notice that here {t∗j : j = 0, ..., N } may be quite different from {τk : k = 0, ..., n} and ∆ can be one second or a few seconds, and should be much smaller than τk − τk−1 which is 15 minutes. 2 Strictly speaking, the asymptotic justification of the method requires the IID assumption as shown in Lam (2016). While the IID assumption does not hold for Class C, we examine the effectiveness of this method using real data later. 11 We assume each observation is contaminated by microstructure noise such that Yt = (Y1t , ..., Ypt )′ (observed) contains the true log-price Xt (latent) and the microstructure noise ǫt = (ǫ1t , . . . , ǫpt )′ in an additive form Yt = Xt + ǫt , for t ∈ [T − h, T ], (14) where the p-dimensional noise ǫt is assumed to satisfy Assumption 1. The p-dimensional noise ǫt = (ǫ1t , . . . , ǫpt )′ at different time points t = t∗0 , t∗1 , · · · , t∗N are IID random vectors with mean 0 (a p-dimensional vector with all elements being 0), positive definite covariance matrix A0 and finite fourth moment. In addition, ǫt and Xt are mutually independent. This assumption has commonly been used in the literature; see, for example, Aı̈t-Sahalia et al. (2010), Zhang (2011), Liu and Tang (2014). To estimate (u∗i )′ ΣT −h,T u∗i , we apply the quasi-maximum likelihood (QML) approach developed in Xiu (2010). Based on (1) and (14), we have Ỹit = (u∗i )′ Yt = (u∗i )′ Xt + (u∗i )′ ǫt = X̃it + ǫ̃it dX̃it = (u∗i )′ dXt = (u∗i )′ µt dt + (u∗i )′Θ t dBt = µ̃it dt + σ̃it dB̃it (15) by letting X̃it = (u∗i )′ Xt , ǫ̃it = (u∗i )′ ǫt , µ̃it = (u∗i )′ µt , 2 σ̃it dB̃it = (u∗i )′Θ t dBt , σ̃it = (u∗i )′Θ t ((u∗i )′Θ t )′ = (u∗i )′Θ tΘ ′t u∗i = (u∗i )′ Σt u∗i , RT 2 dt. such that vi∗ = T −h σ̃it Ignoring the impact of µ̃it dt by considering µ̃it = 0, we follow the idea in Xiu (2010) to give two misspecified assumptions for each i ∈ {1, ..., p}. First, the spot volatility is assumed 2 = (u∗ )′ Σ u∗ = σ̃ 2 . Second, the noise ǫ̃ is assumed to be normally to be time invariant: σ̃it t i it i i 2 distributed with mean 0 and variance ãi . Then the quasi-log likelihood function for Ỹi,t∗j − Ỹi,t∗j−1 is Np 1  e ∗ ′ ∗ −1  e ∗  1 (16) Yi Yi (Ω ) log(2π) − l(σ̃i2 , ã2i ) = − log det(Ω∗ ) − 2 2 2 where Ω∗ is a tridiagonal matrix with the diagonal elements being σ̃i2 ∆ + 2ã2i and the tridi′  ∗ agonal elements being −ã2i , Ỹi = Ỹi,t∗1 − Ỹi,t∗0 , ..., Ỹi,t∗N − Ỹi,t∗N−1 . The QML estimator of R  T 2 dt, (u∗ )′ A u∗ is the value of (σ̃ 2 , ã2 ) which maximizes l(σ̃ 2 , ã2 ). We denote the estiσ̃ 0 i i i i i i T −h it RT ∗ 2 ∗ mator of vi = T −h σ̃it dt by v̂i , which is positive. Xiu (2010) proved that v̂i∗ is consistent and RT 2 dt. asymptotically efficient for T −h σ̃it Remark 3.5. As discussed in Xiu (2010), if (t∗j −t∗j−1 )s for j = 1, ..., N are random and IID, we can add another misspecified assumption that they are equal. We then apply the above approach to get v̂i∗ which is also a consistent estimator of (u∗i )′ ΣT −h,T u∗i . Since the tick-by-tick data over the time period [T − h, T ] is typically non-synchronous, we propose to first synchronize data by 12 the refresh time scheme of Barndorff-Nielsen et al. (2011) and then apply the QML procedure to obtain v̂i∗ (i = 1, · · · , p). The first refresh time t∗0 during a trading day is the first time when all assets have been traded at least once since T − h. The second refresh time t∗1 is the first time when all assets have been traded at least once since the first refresh point in time t∗0 . Repeating this sequence yields in total N + 1 refresh times, t∗0 , t∗1 , ..., t∗N , and corresponding N + 1 sets of synchronized refresh prices Yt∗0 , Yt∗1 , ..., Yt∗N with each Yi,t∗j (i = 1, ..., p; j = 0, 1, ..., N ) being the log-price of the ith asset nearest to and previous to t∗j . Barndorff-Nielsen et al. (2011) showed that if the trading time of p assets arrive as independent standard Poisson processes with common intensity λ such that the mean of trading frequency of each asset over [T − h, T ] is λh, then the synchronized data obtained by the refresh time scheme is λh/ log p. Based on this observation, if each of 100 (or1,000) assets have around 20,000 observations within a trading day, then the number of synchronized observations is around 4,342 (or 2,895). While this sampling strategy loses around 78.3% or 85.5% of observations, it keeps much more data than the sparsely sampling technique at every 15 minutes, where the size is only 26 within a trading day. Therefore, our shrinkage QML estimators for ΣT −h,T and Σ−1 T −h,T are, respectively, b T −h,T = U∗ diag(v̂1∗ , ..., v̂p∗ ) (U∗ )′ , Σ  ∗ −1 ∗ ∗ −1 −1 (U∗ )′ , Σ\ T −h,T = U diag (v̂1 ) , ..., (v̂p ) (17) \ −1 and our estimated optimal weight ŵT is obtained by replacing Σ−1 T −h,T in (5) with ΣT −h,T , ŵT = −1 Σ\ T −h,T 1 −1 1′ Σ\ T −h,T 1 . (18) Notice that like U, U∗ cannot be obtained directly from observations. We therefore approximate U∗ by the eigenvectors of  Pm m ∗ ∗ ′ X tr TVA ∆Y∗r (∆Y∗r )′ r=1 ∆Yr (∆Yr ) e S0,T −h = , m |∆Y∗r |2 r=1 ∗ where ∆Y∗r = Yτr∗ − Yτr−1 (r = 1, ..., m), and Yτr∗ ’s are the log-prices obtained by synchronizing all the trading prices of p assets during [0, T − h) via the previous tick method. 4 Empirical Studies In this section, we demonstrate the performance of our proposed method using real data. Three portfolio sizes are considered (p = 30, 40 and 50) based on stocks traded in the U.S. markets. These portfolios are 30 Dow Jones Industrial Average (30 DJIA) constituent stocks, 30 DJIA stocks and 10 stocks with the largest market caps (ranked on March 30, 2012) from S&P 500 other than 30 DJIA stocks, 30 DJIA stocks and 20 stocks with the largest market caps from S&P 500 other than 30 DJIA stocks. We download daily data starting from March 19, 2012 and ending on December 31, 2013 (450 trading days) from the Center for Research in Security 13 Prices (CRSP) and 200 days intra-day data staring on March 19, 2013 and ending on December 31, 2013 from the TAQ database. The daily data are used to implement some existing methods in the literature for the purpose of comparison. For the high frequency data, the same data cleaning procedure as in Barndorff-Nielsen et al. (2011) is applied to pre-process the data by 1) deleting entries that have 0 or negative prices, 2) deleting entries with negative values in the column of “Correlation Indicator”, 3) deleting entries with a letter code in the column of “COND”, except for “E” or “F”, 4) deleting entries outside the period 9:30 a.m. to 4 p.m., and 5) using the median price if there are multiple entries at the same time. 4.1 Summary of the proposed method Given that, in the empirical applications, the basic unit is daily, we can summarize the proposed method as follows. Suppose we want to construct a portfolio strategy at the end of the Jth day (which is denoted T in previous sections) based on a pool of p assets with a holding period of J˘ days. We use the ICV in the most recent J − J1 days (which is denoted [T − h, T ] in previous J˘ to approximate the expected ICV during the holding period. sections) multiplied by J−J 1 Step 1: Split data of J days into two parts. The first part contains data of first J1 days, recorded as the 1st, ..., J1 th days. The rest of data of J − J1 days belong to the second part. Step 2: Synchronize data in the lth day for each l ∈ {1, ..., J1 } using the previous tick method at the 15-minute interval. Denote the log-price at the 15-minute frequency by Y0 , Y1 , ..., Ym . Step 3: Synchronize the data in lth day for each l ∈ {J1 + 1, ..., J} using the refresh time l∗ l∗ scheme to obtain synchronous data and denote the log-price by Yl∗ ·0 , Y·1 , ..., Y·nl for each l ∈ {J1 + 1, ..., J}. P ′ ′ tr ( m k=1 ∆Yk ∆Yk ) Pm ∆Yk ∆Yk Step 4: Obtain the eigenvectors of (the corresponding k=1 m |∆Yk |2 eigenvalues are sorted in the non-increasing order), and put them together as a p × p matrix which is denoted by U∗ . Here ∆Yk = Yk − Yk−1 . ∗ ′ l∗ e l∗ Step 5: Obtain Y ·j = (U ) Y·j for l = J1 + 1, ..., J, j = 1, ..., nl . Estimate the integrated ∗ ′ volatility of the ith element of the lth day by QML that maximizes (16) with   (U ) Xt during ∗ l∗ l∗ l∗ l∗ e l∗ e i being replaced by Y e i· = Ỹ , ..., Ỹ Y i1 i,nl and with Ỹij being the ith element of Y·j . Denote the estimator by v̂il∗ . Step 6: The SQML estimator of the ICV in the lth day is defined as U∗ diag(v̂1l∗ , ..., v̂pl∗ ) (U∗ )′ . ∗ ′ ∗ J˘ PJ l∗ l∗ We then use J−J l=J1 +1 U diag(v̂1 , ..., v̂p ) (U ) to approximate the expected ICV during 1 −1 the holding period, and its inverse to approximate Σ\ in (18) to get the estimated optimal T −h,T weight. For the purpose of comparison, we consider two different U∗ s. We denote the two different SQML estimators by SQrM if U∗ in Step 4 is obtained from 15-minute intra-day data and SQrD if Y0 , ..., Ym are the daily closing log-prices. 14 4.2 The GMV portfolio We first consider the GMV portfolio problem (2) whose theoretical optimal weight is chosen by (3). Following the choice of many practitioners, we apply the plug-in method to estimate the −1 h \ e −1 optimal weight and replace Σ with different hs. We refer T,T +τ by its approximation, Σ τ T −h,T to Brandt (2010) for a review of the impacts of a plug-in method in portfolio choice. We compare the out-of-sample performance of our proposed method with some other methods in the literature, including the equal weight (denoted by EW), the weight estimated by plugging in the optimal linear shrinkage of the sample covariance matrix (denoted by LS), the weight derived by the procedure suggested in Fan, Li and Yu (2012) (denoted by TS). After the weights are determined, the portfolios are constructed accordingly. e −1 LS is obtained by replacing Σ T,T +τ in (3) with the inverse of the linear shrinkage estimator b LS = (1 − κ)S + κλ̄Ip , S −1 PJLS ′ ′ where S = JLS i=1 (Yi − Yi−1 )(Yi − Yi−1 ) = Q diag(λ1 , ..., λp )Q is the sample covariance matrix of previous JLS daily log-returns, λ1 , ..., λp are the eigenvalues of S, Q contains corP responding eigenvectors, λ̄ = pi=1 λi /p, and κ is determined by the asymptotic optimization results derived in Ledoit and Wolf (2004). Fan, Li and Yu (2012) considered the following risk optimization problem under grossexposure constraints min w′ ΣT −h,T w s.t. kwk1 ≤ c and w′ 1 = 1, (19) e T,T +τ . The pair-wise two scales covariance where ΣT −h,T was also used to approximate Σ (TSCV) estimator of ΣT −h,T was constructed based on the high frequency data synchronized by the pair-wise refresh time scheme over previous JT S trading days. Since this pair-wise estimator may not be positive semi-definite, they projected the estimator (denoted by M here) by − M1 = (M + λ− min Ip )/(1 + λmin ), (20) where λ− min is the negative part of the minimum eigenvalue of the estimator M. They then b for a given c. In this paper, following the minimize w′ M1 w to obtain the optimal weight w simulation and the empirical studies in Fan, Li and Yu (2012), we set c = 1.2. In practice, one choice that we have to make is the number of days over which we do the estimation. For our new developed approach, we let J1 = 50, 60, ..., 250 when we use daily log-returns, and let J1 = 5 (one week), 6, ..., 21 (one month) days when we use 15-minute intra-day log-returns in Step 4. Moreover, we choose J − J1 = 1, 2, ...., 5. The optimal result among all possible combinations is reported. Similarly, we report the optimal results for LS when JLS ∈ {50, 60, ..., 250} and TS when JT S ∈ {1, 2, ...., 10}, and denote them by TSo, LSo respectively. The following three measures are calculated to compare the out-of-sample performance of all the methods during 174 investment days (we have 200 days intra-day data in total and we use 15 26 days intra-day data to get SQrM), from April 25, 2013 to December 31, 2013: (1) the average of log-returns of the portfolio multiplied by 252 (denoted by AV); (2) the standard deviation of √ log-returns of the portfolio multiplied by 252 (denoted by SD); (3) information ratio calculated by AV/SD (denoted by IR). In general, a high AV and a high IR with a low SD are expected for a good portfolio. Since the GMV portfolio is designed to minimize the variance of a portfolio, the most important performance measure for GMV is SD. Therefore, we first compare the standard deviations of different methods and then compare the information ratios and the average returns. Reported in Table 1 are the AV, SD and IR for all the methods. The number in the bold face represents the lowest SD. Several conclusions can be made from Table 1. First and foremost, SQrM outperforms all the other strategies in terms of SD. SQrM also achieves the highest information ratio when p = 50. Second, as expected, the standard deviation of the GMV portfolio decreases, as p increases from 30 to 50, for most methods. The only exception is the EW. Third, SQrM performs better than SQrD, indicating that high frequency data are useful in portfolio choice. 4.3 Markowitz portfolio with momentum signals (MwM) We now consider a ‘full’ Markowitz portfolio without any short-sale constraint. The Markowitz portfolio minimizes the variance of a portfolio under two conditions: e T,T +τ w min w′ Σ subject to w′ 1 = 1 and w′ e = b, where b is a target expected return chosen by an investor and e is a signal to denote the vector of expected returns of p assets. The above problem has the following analytical solution −1 where c1 = −1 e T,T +τ 1 + c2 Σ e T,T +τ e, w = c1 Σ C − bB bA − B e −1 1, B = 1′ Σ e −1 e, C = e′ Σ e −1 e. , c2 = , A = 1′ Σ T,T +τ T,T +τ T,T +τ 2 2 AC − B AC − B (21) To choose e and b, we follow Ledoit and Wolf (2014). In particular, the ith element of e is the momentum factor which is chosen as the arithmetic average of the previous 250 days returns on the ith stock. b is the arithmetic average of the momentums of the top-quintile stocks according to e. In Table 2, we report the annualized AV, SD, and IR of the daily log-returns for all methods, namely, SQrM, SQrD, LS, the equal weight constructed on top-quintile stocks according to their e −1 momentums (denoted by EW-TQ), and the method with Σ T,T +τ in (21) being replaced by the inverse of the sample covariance matrix of previous JSP days daily log-returns (denoted by SP when JSP = 250). Similar to the GMV portfolio, we choose optimal J and J1 for SQrM and SQrD. For the Markowitz portfolio, a more relevant criterion for the comparison is IR. In this paper, we first compare the IRs and then the SDs. In Table 2, the number in bold face represents the highest IR while the number with a ‘*’ represents the lowest SD. It can be seen that SQrM and SQrD perform better than other 16 methods in terms of IR except the EW when p = 30, 40. However, the SDs of SQrM and SQrD are much lower than that of EW and also lower than that of the other methods. 4.4 Robustness of sample period To check the robustness of our strategy, we split the entire 174 investment days into two subperiods, one from April 25, 2013 to August 27, 2013 and the other from August 28, 2013 to December 31, 2013. The results of the GMV portfolio are reported in Tables 3 and 4. It can be seen that SQrM and SQrD continue to outperform other methods in terms of SD in all cases. Empirical results of the Markowitz portfolio with the momentum signal are reported in Tables 5 and 6. Again SQrM and SQrD continue to outperform other methods in almost all cases in terms of IR and SD. We also perform a moving-window analysis to check the robustness of our empirical results. Staring from April 25, 2013, we calculate the standard deviation of daily log-returns of each method over 42 trading days and repeat this exercise by moving one trading day at each pass. To compare our method with other methods, we use figures to show the results of TSo, LSo, SQrD and SQrM for the GMV portfolio and SPo, LSo, SQrD and SQrM for the MwM portfolio, where the optimal numbers of days chosen for each method is to minimize or maximize the mean of SDs or IRs of 133 different investment periods (each investment period is 42 days) for the GMV and MwM portfolio, respectively. Figures 1, 2, 3 plot the results when p = 30, 40 and 50. We find that SQrM performs better and better as the portfolio size increases. In general, it has the lowest SD and the highest IR for both the GMV portfolio and the MwM portfolios. This result indicates that high frequency data are useful in portfolio choice, especially for controlling the risk. 4.5 Robustness of time span From a statistical perspective, a longer span of historical data contains more information about the dynamic of an asset price so that it may be reasonable to believe that methods based on a longer span of data should perform better than those based on less data. However, the model specification is more likely to be wrong over a longer span. Hence there is a trade off between the estimation error and the specification error. In this subsection we examine this trade off empirically in the context of the LS portfolio and the SQrD portfolio. In particular, the LS portfolio and the SQrD portfolio are constructed based on different historical data sets for the GMV portfolio. For LS, we set JLS = 50, 60, ..., 250. For SQrD, we fix J − J1 = 1 and set J1 = 50, 60, ..., 250. Figure 4 plots the risk of daily log-returns for the two GMV portfolios as a function of JLS or J1 when p = 30 and p = 50. Some interesting findings emerge. First, the risk of log-returns of a portfolio does not necessarily decrease when a longer span of historical data is used. Second, SQrD performs better than LS in almost all cases and is more stable across different time spans. This is especially true when p = 50. Once again, there is an advantage for using our estimator 17 for portfolio selection. Third, when p = 30, the risk of the SQrD portfolio decreases when J1 increases initially. This is because more data are used in estimation, reducing the estimation error. However, the risk increases when J1 > 110. This is because the construction of SQrD relies on the assumption that Xt ∈ C. As J1 increases, the time span becomes longer, and hence the assumption that Xt ∈ C is more likely to be invalid. This can also explain why SQrM performs better than SQrD. 5 Conclusions This paper has developed a new estimator for the ICV and its inverse from high frequency data when the portfolio size p and the sample size of data n satisfies p/n → y > 0 as n goes to ∞. The use of high frequency data drastically increases the sample size and hence reduces the estimation error. To further prevent the estimation error from accumulating with p, a new regularization method is applied to the eigenvalues of an initial estimator of the ICV. Our proposed estimator of the ICV is always positive definite and its inverse is the estimator of the inverse of the ICV. It minimizes the limit of the out-of-sample variance of portfolio returns within the class of rotationequivalent estimators. It works when the number of underlying assets is larger than the number of time series observations in each asset and when the asset price follows a general stochastic process. The asymptotic optimality for our proposed method is justified under the assumption that p/n → y > 0 as n goes to ∞. The usefulness of our estimator is examined in real data. The method is used to construct the optimal weight in the global minimum variance and the Markowitz portfolio with momentum signal based on the DJIA 30 and another 20 stocks chosen from S&P500. The performance of our proposed method is compared with that of some existing methods in the literature. The empirical results show that our method performs favorably out-of-sample. 6 Appendix In the appendix we first prove Theorem 3.2 as the proof of Theorem 3.1 relies on Theorem 3.2. Proof of Theorem 3.2. By assumption (A.i), we can write ∆Xk = Z τk d γtΛ dWt = τk−1 Z τk τk−1 d γt2 dt !1/2 Σ̆ 1/2 zk , where ‘ = ’ stands for ‘equal in distribution’, Σ̆ = ΛΛ′ and zk = (Z1k , · · · , Zpk )′ consists of independent standard normals. Then  RCV  ! b n ′ tr Σ X T −h,T z z p 1/2 1/2 k k STVA · Σ̆ , Σ̆ T −h,T = ′ p n zk Σ̆zk k=1 18 Pn ′ b RCV where Σ T −h,T = k=1 ∆Xk ∆Xk , ∆Xk = Xτk − Xτk−1 . Denote ! n 1 X 1/2 1/2 ′ Σ̆ zk zk Σ̆ . n k=1 k=1 n o −1 From Theorem 2 of Ledoit and Pèchè (2011), we know that p−1 tr SIID − zI Σ T −h,T T −h,T converges to Z r dH(r), sΨ (z) = r{1 − y − yz × sF (z)} − z SIID T −h,T Z T n X 1 1/2 1/2 γt2 dt · ΣT −h,T zk z′k ΣT −h,T = := n T −h almost surely, where H is the LSD of matrices ΣT −h,T and F is the LSD of matrices SIID T −h,T or TVA ST −h,T , since they share the same LSD by Theorem 2 of Zheng and Li (2011). On the other hand, we have that sΨ (z) is the Stieltjes transform of the bounded function Ψ(x) defined in (13) by Theorem 4 of Ledoit and Pèchè (2011) and the Stieltjes transform of function Ψp (x) is o −1 1 n sΨp (z) = tr STVA Σ − zI T −h,T . T −h,T p Therefore we only need to show that o 1 n o −1 −1 1 n IID a.s. tr ST −h,T − zI ΣT −h,T − tr STVA Σ − zI → 0. T −h,T T −h,T p p To prove this, it suffices to show the following two facts: max 1≤k≤n 1 ′ a.s. z Σ̆zk − 1 → 0, p k and 1  b RCV  tr ΣT −h,T − p Z T (22) a.s. T −h γt2 dt → 0. (23) r To prove (22), by assumption (A.iii), all the eigenvalues of Σ̆ are bounded, so that tr(Σ̆ ) = O(p) for all 1 ≤ r < ∞. From Lemma 2.7 of Bai and Silverstein (1998), we have     2 o3  6  6 Cn n 4 12 E max p−1 z′k Σ̆zk − 1 ≤ E|Z | tr Σ̆ + E|Z | tr Σ̆ jk jk 1≤k≤n p6 = O(n−2 ), where the last step comes from the fact that the higher order moments of Zjk ’s are finite since they are normally distributed. Thus, (22) follows by the Borel-Cantelli lemma. We now prove (23). Z T n Z τk  RCV  Z T X 2 −1 −1 2 ′ b γt dt = p p tr ΣT −h,T − γt2 dt γt dt · zk Σ̆zk − T −h k=1 = n Z X k=1 ≤ a.s. → max 1≤k≤n 0. 19 τk τk−1 T −h τk−1   γt2 dt · p−1 z′k Σ̆zk − 1 p−1 z′k Σ̆zk −1 · Z T T −h γt2 dt by assumption (A.iv) and the result in Equation (22). Then, o 1 n o −1 −1 1 n IID tr ST −h,T − zI ΣT −h,T − tr STVA Σ − zI T −h,T T −h,T p p n o −1 TVA −1  TVA 1 IID − S tr SIID − zI S Σ − zI S = T −h,T T −h,T T −h,T T −h,T T −h,T p =    1 SIID tr T −h,T p    RCV  b n −1 tr Σ X T −h,T − zI · p(n) 1 p−1 z′k Σ̆zk k=1 ! − 1 Σ̆ 1/2   Z T −1 −1  RCV  1 2 b + γ dt − − zI p tr tr SIID Σ t T −h,T T −h,T p(n) T −h ! n X −1 1/2 1/2 Σ̆ zk z′k Σ̆ ΣT −h,T STVA × T −h,T − zI  zk z′ℓ Σ̆  1/2 STVA T −h,T    −1 − zI ΣT −h,T   k=1 := I1 + I2 . TVA −1 From assumptions (A.ii)-(A.v), and the facts that k(SIID T −h,T − zI) k ≤ 1/ℑ(z), k(ST −h,T − zI)−1 k ≤ 1/ℑ(z) with k·k denoting the L2 norm of a matrix, (22) and (23), we have that both |I1 | and |I2 | converge to 0, almost surely. Therefore, the proof of Theorem 3.2 is completed.  Proof of Theorem 3.1. The convergence of ESD of STVA T −h,T is shown in Theorem 2 of Zheng and −1  ∗ b ≤ C for some fixed number C when p large enough by Σ Li (2011). Note that T −h,T −1  ∗ b assumption (A.v) and the fact that Σ belongs to class S. Thus, from Lemma 2.7 of T −h,T Bai and Silverstein (1998) and Borel-Cantelli lemma, we have  −1  −1 ∗ 1 ′ b∗ 1 a.s. b → 0. 1 − tr ΣT −h,T 1 ΣT −h,T p p Moreover, we have  −1  ∗ 1 b Σ tr T −h,T p p = a.s. → 1X 1 = p gn (vi ) Z i=1 1 dF (x). g(x) Z TVA 1 dF ST −h,T (x) gn (x) Therefore, −1 1 ′ b∗ a.s. 1 ΣT −h,T 1→ p Z 1 dF (x). g(x) (24) Similarly, we can show that  −1 −1   ∗ −1 −1  ∗ ∗ 1 1 ′ b∗ a.s. b b b ΣT −h,T ΣT −h,T ΣT −h,T → 0. 1 ΣT −h,T ΣT −h,T ΣT −h,T 1 − tr p p 20 Using Theorem 3.2, we have  −1 −1   ∗ ∗ 1 b b ΣT −h,T Σ Σ tr T −h,T T −h,T p = a.s. → p 1 X u′i ΣT −h,T ui 1 tr(U′ ΣT −h,T UV−2 ) = p p gn (vi )2 i=1 Z x dF (x). |1 − y − yx × m̆F (x)|2 g(x)2 Thus, Z −1 −1  ∗ x 1 ′ b∗ a.s. b 1 ΣT −h,T ΣT −h,T ΣT −h,T dF (x). 1→ p |1 − y − yx × m̆F (x)|2 g(x)2 (25) Combining (24) and (25), we obtain that −1  ∗ −1  ∗ R x dF (x) b b Σ 1′ Σ 1 Σ 0,T −h T −h,T T −h,T |1 − y − yx × m̆F (x)|2 g(x)2 a.s. p· → .     −1 2 R dF (x) 2 ∗ ′ b 1 1 ΣT −h,T g(x)  References [1] Abadir, K. M., Distaso, W., Žikěs, F., 2014. Design-free estimation of variance matrices. Journal of Econometrics 181(2), 165-180. [2] Aı̈t-Sahalia, Y., Fan, J., Xiu, D., 2010. High frequency covariance estimates with noisy and asynchronous financial data. Journal of the American Statistical Association 105, 1504-1517. [3] Aı̈t-Sahalia, Y., Xiu, D., 2016. A Hausman test for the presence of market microstructure noise in high frequency data. Working Paper. [4] Bai, Z., Silverstein, J., 1998. No eigenvalues outside the support of the limiting spectral distribution of large-dimensional sample covariance matrices. The Annals of Probability 26(1), 316-345. [5] Barndorff-Nielsen, O. E., Hansen, P. R., Lunde, A., Shepard, N., 2011. Multivariate realised kernels: consistent positive semi-definite estimators of the covariation of equity prices with noise and non-synchronous trading. Journal of Econometrics 162, 149-169. [6] Brandt, M. W., 2010. Portfolio choice problems in Y. Aı̈t-Sahalia and L.P. Hansen (eds.), Handbook of Financial Econometrics, Volume 1: Tools and Techniques, North Holland, 269-336. [7] DeMiguel, V., Garlappi, L., Nogales, F. J., Uppal, R., 2009. A generalized approach to portfolio optimization: improving performance by constraining portfolio norms. Management Science 55(5), 798-812. 21 [8] DeMiguel, V., Garlappi, L., Uppal, R., 2009. Optimal versus naive diversification: how inefficient is the 1/N portfolio strategy? Review of Financial Studies 22, 1915-1953. [9] Fan, J., Fan, Y., Lv, J., 2008. High dimensional covariance matrix estimation using a factor model. Journal of Econometrics 147, 186-197. [10] Fan, J., Li, Y., Yu, K., 2012. Vast volatility matrix estimation using high-frequency data for portfolio selection. Journal of the American Statistical Association 107, 412-428. [11] Frahm, G., Memmel, C., 2010. Dominating estimators for minimum-variance portfolios. Journal of Econometrics 159(2), 289-302. [12] Jagannathan, R., Ma, T., 2003. Risk reduction in large portfolios: why imposing the wrong constraints helps. Journal of Finance 58(4), 1651-1684. [13] Jobson, J., Korkie, B., 1980. Estimation for Markowitz efficient portfolios. Journal of the American Statistical Association 75, 544-554. [14] Kan, J., Zhou, G., 2007. Optimal portfolio choice with parameter uncertainty. Journal of Financial and Quantitative Analysis 42, 621-656. [15] Lam, C., 2016. Nonparametric eigenvalue-regularized precision or covariance matrix estimator. The Annals of Statistics 44(3), 928-953. [16] Ledoit, O., Pèchè, S., 2011. Eigenvectors of some large sample covariance matrix ensembles. Probability Theory and Related Fields 151(1-2), 233-264. [17] Ledoit, O., Wolf, M., 2003. Improved estimation of the covariance matrix of stock returns with an application to portfolio selection. Journal of Empirical Finance 10(5), 603-621. [18] Ledoit, O., Wolf, M., 2004. A well-conditioned estimator for large-dimensional covariance matrices. Journal of Multivariate Analysis 88(2), 365-411. [19] Ledoit, O., Wolf, M., 2014. Nonlinear shrinkage of the covariance matrix for portfolio selection: Markowitz meets Goldilocks. Working Paper. [20] Liu, C., Tang, C. Y., 2014. A quasi-maximum likelihood approach for integrated covariance matrix estimation with high frequency data. Journal of Econometrics 180, 217-232. [21] Markowitz, H., 1952. Portfolio selection. Journal of Finance 7, 77-91. [22] Michaud, R., 1989. The Markowitz optimization enigma: is optimization optimal? Financial Analysts Journal 45(1), 31. [23] Muirhead, R. J., 1987. Developments in eigenvalue estimation. In Advances in Multivariate Statistical Analysis (A. K. Gupta, ed.) 277-288. Reidel, Dordrecht. 22 [24] Pesaran, M. H., Zaffaroni, P., 2009. Optimality and diversifiability of mean variance and arbitrage pricing portfolios. Working Paper. [25] Stein, C., 1956. Inadmissibility of the usual estimator for the mean of a multivariate normal distribution. In Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, pages 197-206. University of California Press. [26] Stein, C., 1975. Estimation of a covariance matrix. Rietz lecture, 39th Annual Meeting IMS. Atlanta, Georgia. [27] Tu, J., Zhou, G., 2011. Markowitz meets Talmud: a combination of sophisticated and naive diversification strategies. Journal of Financial Economics 99, 204-215. [28] Xiu, D., 2010. Quasi-maximum likelihood estimation of volatility with high frequency data. Journal of Econometrics 159, 235-250. [29] Zhang, L., 2011. Estimating covariation: epps effect, microstructure noise. Journal of Econometrics 160, 33-47. [30] Zheng, X., Li, Y., 2011. On the estimation of integrated covariance matrices of high dimensional diffusion process. The Annals of Statistics 39, 3121-3151. 23 Table 1: The out-of-sample performance of different daily rebalanced strategies for the GMV portfolio between April 25, 2013 and December 31, 2013. Period: 04/25/2013—12/31/2013 p = 30 EW TS TSo LS LSo SQrD SQrM AV 20.13 13.22 13.22 15.31 12.96 10.59 15.62 SD 10.17 9.65 9.65 9.80 9.52 9.34 9.17 IR 1.98 1.37 1.37 1.56 1.36 1.80 1.70 p = 40 EW TS TSo LS LSo SQrD SQrM AV 21.00 16.51 17.80 16.00 11.84 19.06 18.09 SD 10.43 9.66 9.62 9.85 9.29 9.29 9.10 IR 2.01 1.71 1.85 1.62 1.27 2.05 1.99 p = 50 EW TS TSo LS LSo SQrD SQrM AV 21.00 20.15 20.15 13.28 10.25 17.74 20.52 SD 10.36 9.40 9.40 9.47 9.18 9.26 8.68 IR 2.03 2.14 2.14 1.40 1.12 1.91 2.36 Note: AV, SD, IR denote the average, standard deviation, and information ratio of 174 daily log-returns, respectively. AV and SD are annualized and in percent. The smallest number in the row labeled by SD is reported in bold face. TSo corresponds to the case where ΣT −h,T is estimated by the two-scale covariance matrix obtained based on historical intra-day data (10 days when p = 30, 50; 8 days when p = 40). LSo corresponds to the case where ΣT −h,T is estimated by the linear shrinkage of the sample covariance matrix of daily log-returns (110, 90 and 90 days when p = 30, 40 and 50 respectively). The optimal number of days is chosen by minimizing SD of 174 log-returns of each portfolio. 24 Table 2: The out-of-sample performance of different daily rebalanced strategies for Markowitz portfolio with momentum signal between April 25, 2013 and December 31, 2013. Period: 04/25/2013—12/31/2013 p = 30 EW-TQ SP SPo LS LSo SQrD SQrM AV 31.74 0.02 4.18 13.02 13.02 20.02 15.91 SD 13.27 12.10 12.06 11.59 11 56 11.37 11.11∗ IR 2.39 0.00 0.35 1.12 1.12 1.76 1.43 p = 40 EW SP SPo LS LSo SQrD SQrM AV 36.49 6.86 8.94 18.98 18.98 24.67 20.21 SD 13.55 10.90 10.99 11.29 10.66 11.25 10.07∗ IR 2.69 0.63 0.81 1.68 1.68 2.19 2.01 p = 50 EW-TQ SP SPo LS LSo SQrD SQrM AV 28.64 7.53 11.33 15.81 15.81 22.65 23.35 SD 13.16 10.42 10.80 10.60 10.60 10.51 9.83∗ IR 2.18 0.72 1.05 1.49 2.03 2.15 2.38 Note: AV, SD, IR denote the average, standard deviation, and information ratio of 174 daily log-returns respectively. AV, SD are annualized and in percent. The smallest number in the row labeled by SD is reported in bold face. SPo corresponds to the case where ΣT −h,T is estimated by the sample covariance matrix of daily log-returns (190, 230 and 130 days when p = 30, 40 and 50, respectively). LSo corresponds to the case where ΣT −h,T is estimated by the linear shrinkage of the sample covariance matrix of daily log-returns (250 days when p = 30, 40 and 50). The optimal number of days is chosen by maximizing IR of 174 log-returns of each portfolio. 25 Table 3: The out-of-sample performance of different daily rebalanced strategies for the GMV portfolio between April 25, 2013 and August 27, 2013. Period: 04/25/2013—08/27/2013 p = 30 EW TS TSo LS LSo SQrD SQrM AV 5.23 2.23 2.23 2.63 9.90 2.93 1.87 SD 10.93 10.05 10.05 10.64 9.85 9.97 9.81 IR 0.48 0.22 0.22 0.25 1.00 0.29 0.19 p = 40 EW TS TSo LS LSo SQrD SQrM AV 5.04 3.64 4.35 0.48 4.49 0.43 0.42 SD 11.09 10.26 10.00 10.51 9.45 9.78 9.73 IR 0.45 0.36 0.43 0.05 0.48 0.04 0.04 p = 50 EW TS TSo LS LSo SQrD SQrM AV 6.53 9.35 9.35 -1.78 8.29 1.70 5.70 SD 11.06 10.12 10.12 10.18 9.18 9.89 9.30 IR 0.59 0.92 0.92 -0.17 0.89 0.17 0.61 Note: AV, SD, IR denote the average, standard deviation, and information ratio of 87 daily log-returns, respectively. AV, SD are annualized and in percent. The smallest number in the row labeled by SD is reported in bold face. TSo corresponds to the case where ΣT −h,T is estimated by the two-scale covariance matrix obtained based on historical intra-day data (10 days when p = 30, 50; 8 days when p = 40). LSo corresponds to the case where ΣT −h,T is estimated by the linear shrinkage of the sample covariance matrix of daily log-returns (110, 90 and 90 days when p = 30, 40 and 50 respectively). 26 Table 4: The out-of-sample performance of different daily rebalanced strategies for the GMV portfolio between August 28, 2013 to December 31, 2013. Period: 08/28/2013—12/31/2013 p = 30 EW TS TSo LS LSo SQrD SQrM AV 35.04 24.22 24.22 27.99 16.02 30.70 29.36 SD 9.31 9.24 9.24 8.87 9.17 8.64 8.45 IR 3.76 2.62 2.62 3.15 1.75 3.55 3.48 p = 40 EW TS TSo LS LSo SQrD SQrM AV 36.97 29.37 31.25 31.52 19.19 20.15 25.94 SD 9.69 9.01 9.19 9.09 9.16 8.54 8.32 IR 3.82 3.26 3.40 3.47 2.09 4.411 4.30 p = 50 EW TS TSo LS LSo SQrD SQrM AV 35.47 30.95 30.95 28.33 12.20 33.78 35.34 SD 9.60 8.64 8.64 8.67 9.05 8.52 7.95 IR 3.70 3.58 3.58 3.27 1.35 3.96 4.44 Note: AV, SD, IR denote the average, standard deviation, and information ratio of 87 daily log-returns, respectively. AV, SD are annualized and in percent. The smallest number in the row labeled by SD is reported in bold face. TSo corresponds to the case where ΣT −h,T is estimated by the two-scale covariance matrix obtained based on historical intra-day data (10 days when p = 30, 50 and 8 days when p = 40). LSo corresponds to the case where ΣT −h,T is estimated by the linear shrinkage of the sample covariance matrix of daily log-returns (110, 90 and 90 days when p = 30, 40 and 50 respectively). 27 Table 5: The out-of-sample performance of different daily rebalanced strategies for the Markowitz portfolio with momentum signal between April 25, 2013 to August 27, 2013. Period: 04/25/2013—08/27/2013 p = 30 EW-TQ SP SPo LS LSo SQrD SQrM AV 8.70 -10.05 -1.43 -2.99 -2.99 1.73 0.13 12.06 SD 14.51 13.02 13.03 12.54 12.54 11.94∗ IR 0.60 -0.81 -0.11 -0.24 -0.24 0.01 0.04 p = 40 EW-TQ SP SPo LS LSo SQrD SQrM AV 9.21 -11.39 -9.39 -4.04 -4.04 4.14 -2.69 SD 14.19 10.91 10.94 11.45 10.99 11.49 10.42∗ IR 0.65 -1.04 -0.86 -0.35 -0.35 0.36 -0.26 p = 50 EW-TQ SP SPo LS LSo SQrD SQrM AV 3.50 -8.15 1.71 -6.25 -6.25 6.98 4.16 SD 14.28 11.01 10.48 10.92 10.92 10.84 10.47∗ IR 0.25 -0.74 0.16 -0.57 -0.57 0.64 0.40 Note: AV, SD, IR denote the average, standard deviation, and information ratio of 87 daily log-returns respectively. AV, SD are annualized and in percent. The smallest number in the row labeled by SD is reported in bold face. SPo corresponds to the case where ΣT −h,T is estimated by the sample covariance matrix of daily log-returns (190, 230 and 130 days when p = 30, 40 and 50 respectively). LSo corresponds to the case where ΣT −h,T is estimated by the linear shrinkage of the sample covariance matrix of daily log-returns (250 days when p = 30, 40 and 50). 28 Table 6: The out-of-sample performance of different daily rebalanced strategies for the Markowitz portfolio with momentum signal between August 28, 2013 to December 31, 2013. Period: 08/28/2013—12/31/2013 p = 30 EW-TQ SP SPo LS LSo SQrD SQrM AV 54.79 10.59 9.79 29.02 29.02 39.95 31.35 SD 11.82 11.14 11.06 10.53 10.53 10.69 10.02∗ IR 4.64 0.95 0.89 2.76 2.76 3.74 3.11 p = 40 EW-TQ SP SPo LS LSo SQrD SQrM AV 63.78 25.11 27.28 41.99 41.99 45.21 43.11 SD 12.73 10.84 10.97 11.00 11.00 10.92 9.55∗ IR 5.01 2.32 2.49 3.82 3.82 4.14 4.51 p = 50 EW-TQ SP SPo LS LSo SQrD SQrM AV 53.77 23.20 20.94 37.87 37.87 38.31 42.54 SD 11.80 9.76 11.13 10.16 10.16 10.14 9.05∗ IR 4.56 2.38 1.88 3.73 3.73 3.78 4.70 Note: AV, SD, IR denote the average, standard deviation, and information ratio of 87 daily log-returns respectively. AV, SD are annualized and in percent. The smallest numbers in the row labeled by SD is reported in bold face. SPo corresponds to the case where ΣT −h,T is estimated by the sample covariance matrix of daily log-returns (190, 230 and 130 days when p = 30, 40 and 50, respectively). LSo corresponds to the case where ΣT −h,T is estimated by the linear shrinkage of the sample covariance matrix of daily log-returns (250 days when p = 30, 40 and 50). 29 Figure 1: Information ratios and standard deviations of log-returns of four strategies based on rolling windows of historical data for the GMV and MwM portfolios when p = 30. p=30 p=30 8 6 0.13 SQrM SQrD LSo TSo SQrM SQrD LSo TSo 0.12 0.11 Risk−GMV IR−GMV 4 2 0.1 0.09 0 0.08 −2 −4 60 0.07 80 100 120 140 160 180 0.06 60 200 80 100 120 Days 3 160 180 200 p=30 p=30 0.16 5 4 140 Days SQrM SQrD LSo SPo SQrM SQrD LSo SPo 0.15 0.14 Risk−MwM IR−MwM 2 1 0 0.13 0.12 0.11 −1 0.1 −2 0.09 −3 −4 60 80 100 120 140 160 180 0.08 60 200 Days 80 100 120 140 160 180 200 Days Note: Rolling windows of annualized standard deviations and information ratios of log-returns for the GMV and MwM portfolios. Each point is the standard deviation or information ratio of 42 log-returns of each portfolio strategy. Move one trading day forward at one time such that there are 133 different investment periods and each period contains 42 days (two months). The upper plots correspond to: SQrM uses 1 day of all intra-day data and 9 days of 15-minute data; SQrD uses 5 days of all intra-day data and 110 days of daily data; LSo uses 250 daily data; TSo uses 10 days of intra-day data. The bottom plots correspond to: SQrM use 5 days of all intra-day data and 14 days of 15-minute data; SQrD uses 2 days of all intra-day data and 90 days of daily data; LSo and SPo use 110 days of daily data. 30 Figure 2: Information ratios and standard deviations of log-returns of four strategies based on rolling windows of historical data for the GMV and MwM portfolios when p = 40. p=40 p=40 7 6 5 0.13 SQrM SQrD LSo TSo 0.11 Risk−GMV 4 IR−GMV SQrM SQrD LSo TSo 0.12 3 2 1 0 0.1 0.09 0.08 −1 0.07 −2 −3 60 80 100 120 140 160 180 0.06 60 200 80 100 120 Days p=40 160 180 200 p=40 8 6 140 Days 0.14 SQrM SQrD LSo TSo SQrM SQrD LSo TSo 0.13 0.12 Risk−MwM IR−MwM 4 2 0.11 0.1 0 0.09 −2 −4 60 0.08 80 100 120 140 160 180 200 60 Days 80 100 120 140 160 180 200 Days Note: Rolling windows of annualized standard deviations and information ratios of log-returns for the GMV and MwM portfolios. Each point is the standard deviation or information ratio of 42 log-returns of each portfolio strategy. Move one trading day forward at one time such that there are 133 different investment periods and each period contains 42 days (two months). The upper plots correspond to: SQrM uses 1 day of all intra-day data and 17 days of 15-minute data; SQrD uses 1 days of all intra-day data and 110 days of daily data; LSo uses 250 daily data; TSo uses 10 days of intra-day data. The bottom plots correspond to: SQrM use 4 days of all intra-day data and 15 days of 15-minute data; SQrD uses 5 days of all intra-day data and 200 days of daily data; LSo and SPo use 250 and 190 days of daily data, respectively. 31 Figure 3: Information ratios and standard deviations of log-returns of four strategies based on rolling window of historical data for the GMV and MwM portfolios when p = 50. p=50 p=50 7 6 5 0.13 SQrM SQrD LSo TSo 0.11 Risk−GMV 4 IR−GMV SQrM SQrD LSo TSo 0.12 3 2 1 0 0.1 0.09 0.08 −1 0.07 −2 −3 60 80 100 120 140 160 180 0.06 60 200 80 100 120 Days p=50 160 180 200 p=50 8 6 140 Days 0.14 SQrM SQrD LSo TSo SQrM SQrD LSo TSo 0.13 0.12 Risk−MwM IR−MwM 4 2 0.11 0.1 0 0.09 −2 −4 60 0.08 80 100 120 140 160 180 200 60 Days 80 100 120 140 160 180 200 Days Note: Rolling windows of annualized standard deviations and information ratios of log-returns for the GMV and MwM portfolios. Each point is the standard deviation or the information ratio of 42 log-returns of each portfolio strategy. Move one trading day forward at one time such that there are 133 different investment periods and each period contains 42 days (two months). The upper plots correspond to: SQrM uses 1 day of all intra-day data and 15 days of 15-minute data; SQrD uses 1 days of all intra-day data and 130 days of daily data; LSo uses 250 daily data; TSo uses 9 days of intra-day data. The bottom plots correspond to: SQrM use 4 days of all intra-day data and 13 days of 15-minute data; SQrD uses 5 days of all intra-day data and 90 days of daily data; LSo and SPo use 250 and 130 days of daily data, respectively. 32 Figure 4: Standard deviation of log-returns of SQrD and LS in 174 investment days for the GMV when p = 30 and p = 50. p=30 p=50 0.102 0.101 SQrD LS 0.101 0.099 0.1 0.098 Risk−GMV Risk−GMV 0.099 0.098 0.097 0.096 0.097 0.096 0.095 0.094 0.095 0.093 0.094 0.093 50 SQrD LS 0.1 0.092 100 150 200 0.091 50 250 Days of Daily Data Used 100 150 Days of Daily Data Used Note: Each point is the standard deviation of 174 log-returns of each portfolio strategy. 33 200 250
10math.ST
EXPLICIT DEEP HOLES OF REED-SOLOMON CODES arXiv:1711.02292v1 [cs.IT] 7 Nov 2017 JUN ZHANG AND DAQING WAN Abstract. In this paper, deep holes of Reed-Solomon (RS) codes are studied. A new class of deep holes for generalized affine RS codes is given if the evaluation set satisfies certain combinatorial structure. Three classes of deep holes for projective Reed-Solomon (PRS) codes are constructed explicitly. In particular, deep holes of PRS codes with redundancy three are completely obtained when the characteristic of the finite field is odd. Most (asymptotically of ratio 1) of the deep holes of PRS codes with redundancy four are also obtained. 1. Introduction Let Fnq be the n-dimensional vector space over the finite field Fq of q elements with characteristic p. For any vector (also, called word ) x = (x1 , x2 , · · · , xn ) ∈ Fnq , the Hamming weight Wt(x) of x is defined to be the number of non-zero coordinates, i.e., Wt(x) = | {i | 1 6 i 6 n, xi 6= 0} |. For integers 0 ≤ k ≤ n, a linear [n, k] code C is a k-dimensional linear subspace of Fnq . The minimum distance d(C) of C is the minimum Hamming weight among all non-zero vectors in C, i.e., d(C) = min{Wt(c) | c ∈ C \ {0}}. A linear [n, k] code C ⊆ Fnq is called an [n, k, d] linear code if C has minimum distance d. A well-known trade-off between the parameters of a linear [n, k, d] code is the Singleton bound which states that d 6 n − k + 1. Key words and phrases. Reed-Solomon codes, covering radius, deep holes. The research of Jun Zhang was supported by the National Natural Science Foundation of China under Grant No. 11601350, by Scientific Research Project of Beijing Municipal Education Commission under Grant No. KM201710028001, and by Beijing outstanding talent training program under Grant No. 2014000020124G140. Jun Zhang is supported by Chinese Scholarship Council for his visit at the University of Oklahoma, USA. The research of Daqing Wan was supported by National Science Foundation. 1 2 JUN ZHANG AND DAQING WAN An [n, k, d] code is called a maximum distance separable (MDS) code if d = n − k + 1. An important class of MDS codes are affine ReedSolomon codes and projective Reed-Solomon codes, which will be our main object of study in this paper. Let C be an [n, k, d] linear code over Fq . The error distance of any word u ∈ Fnq to C is defined to be where d(u, C) = min{d(u, v) | v ∈ C}, d(u, v) = |{i | ui 6= vi , 1 ≤ i ≤ n}| is the Hamming distance between words u and v. The error distance plays an important role in the decoding of the code. The maximum error distance ρ(C) = max{d(u, C) | u ∈ Fnq } is called the covering radius of C. Covering radius of codes was studied extensively [4, 5, 11, 13, 20, 21]. For MDS codes, the covering radius is known to be either d − 1 or d − 2 [10]. For a general MDS code, determining the exact covering radius is difficult. We shall see below that affine Reed-Solomon codes have covering radius d−1. In contrast, the covering radius of projective Reed-Solomon codes is unknown in general but is conjectured to be d−2 (except when q is even and k = 2, q − 2 in which case the covering radius is d − 1). We now recall the definition of affine and projective Reed-Solomon codes. Definition 1.1. Fix a subset D = {x1 , . . . , xn } ⊆ Fq , which is called the evaluation set. Let v1 , v2 , · · · , vn ∈ F∗q . For any integer 0 < k < n, the generalized (affine) RS code C = RS(D, k) of length n, dimension k and scale vector v = (v1 , v2 , · · · , vn ) over Fq is defined to be RSv (D, k) = {(v1 f (x1 ), . . . , vn f (xn )) ∈ Fnq | f (x) ∈ Fq [x], deg f (x) ≤ k − 1}. It is easy to check that the minimal distance of this code is n − k + 1, and thus RSv (D, k) is an MDS code. For the case v = (1, 1, · · · , 1), we write RS(D, k) for short. For any v ∈ (F∗q )n , the RS code RSv (D, k) is equivalent to RS(D, k). Thus, we only consider RS(D, k) throughout this paper. When D = Fq , we write RS(q, k) for short. For any word u ∈ Fnq , by the Lagrange interpolation, there is a unique polynomial f of degree ≤ n − 1 such that u = uf = (f (x1 ), f (x2 ), · · · , f (xn )). Clearly, uf ∈ RS(D, k) if and only if deg(f ) ≤ k − 1. We also say that uf is defined by the polynomial f (x). One can easily show (see [16]): EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 3 for any k 6 deg(f ) 6 n − 1, we have the inequality n − deg(f ) 6 d(uf , RS(D, k)) 6 n − k. It follows that if deg(f ) = k, then d(uf , RS(D, k)) = n − k. One deduces the covering radius of all affine RS codes. Proposition 1.2. The covering radius of all affine RS codes with parameters [n, k, d = n − k + 1] is n − k = d − 1. If the distance from a word to the code achieves the covering radius of the code, then the word is called a deep hole of the code. Deciding deep holes of a given code is much harder than the covering radius problem, even for affine RS codes. The deep hole problem for affine RS codes was studied in [1, 2, 15, 16, 18, 19, 17, 24, 25]. As noted above, words uf with deg(f ) = k are deep holes of affine RS(D, k). Based on numerical computations, Cheng and Murray [2] conjectured that the converse is also true if D = Fq . Conjecture 1.3 ([2]). For 2 ≤ k ≤ q − 2 (and k 6= q − 3 if q is even), a word uf is a deep hole of RS(q, k) if and only if deg(f ) = k. This conjecture remains open, but has been proved if either k +1 ≤ p by [28] or k ≥ (q − 1)/2 by [14]. In particular, the conjecture is true for prime fields. In an opposite direction, Wu and Hong [24] found a new class of deep holes for RS(F∗q , k) working on cyclic codes via Fourier transformation. Note that here the evaluation set F∗q is a proper subset of Fq . Then Zhang, Fu and Liao [25] realized the essence of the new deep holes and generalized it to all affine RS codes RS(D, k) for any proper subset D ⊂ Fq . Proposition 1.4 ([25]). For any proper subset D ⊂ Fq , the polynomials {a(x − δ)q−2 + f≤k−1 (x) | a 6= 0, δ ∈ Fq \ D} define deep holes of RS code RS(D, k), where f≤k−1(x) runs all polynomials of degree ≤ k − 1. The essence of this class of deep holes is the equality 1 on D. x−δ It makes the exponent set of the defining Laurent monomials of the new code C = RS(D, k) ⊕ Fq · u(x−δ)q−2 (x − δ)q−2 = 4 JUN ZHANG AND DAQING WAN to form consecutive integers {−1, 0, 1, · · · , k − 1}. So the new code C is indeed a generalized RS code with the scale vector 1 1 1 v=( , ,··· , ), x1 − δ x2 − δ xn − δ which is MDS. And hence, the vectors defined by (x − δ)q−2 is a deep hole of RS(D, k). Note that the deep holes defined by polynomials of degree k have the same essence, i.e., the exponent set {0, 1, · · · , k} is consecutive. For exponents consisting of consecutive integers, the full rank submatrices are Vandermonde matrices whose determinant are easy to compute. However, there is no uniform formula of determinant for general exponent sets. This is one reason why it is difficult to find other new deep holes. For a general evaluation set D, Zhuang, Cheng and Li in [28] proved that for prime q > 2 and k ≥ ⌊ q−1 ⌋, the polynomials in the above 2 proposition together with polynomials of degree k define all the deep holes of RS code RS(D, k). And it is very recently proved by Kaipa [14] that the same statement is true for all odd prime power q under ⌋. Note that these results are true for all the same assumption k ≥ ⌊ q−1 2 ⌋ and q subsets D of Fq under the assumption that |D| = n > k ≥ ⌊ q−1 2 odd. One might conjecture it holds for all odd prime power q and for D with |D| > k > 2. In Section 2, we will show that this conjecture is ⌋. false for k < ⌊ q−1 2 The aim of this paper is to construct new deep holes of projective Reed-Solomon codes. This turns out to be significantly more difficult. Definition 1.5. The projective Reed-Solomon (PRS) code is defined to be P RS(q + 1, k) = {(f (α1), · · · , f (αq ), ck−1(f )) | f (x) ∈ Fq , deg(f (x)) < k} where Fq = {α1 , α2 , · · · , αq = 0} and ck−1 (f ) is the coefficient of the term of degree k − 1 of f (x). In the literature, it is also called doubly extended RS code. As above, we introduce more notations. As the first q coordinates of P RS(q+1, k) corresponds to an affine part of the projective line, we represent a vector in Fq+1 by (uf , v) where uf ∈ Fqq is defined by a polynomial f of degree q ≤ q − 1: uf = (f (α1 ), · · · , f (αq )) and v ∈ Fq is arbitrary. It is easy to see that (uf , v) ∈ Fq+1 represents q a codeword of P RS(q + 1, k) if and only if deg(f ) ≤ k − 1 and v = ck−1 (f ). EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 5 It turns out affine RS codes are affine parts of the PRS code. Although they look very similar, the PRS code is much more difficult. For instance, the covering radius of the PRS code is already unknown. A consequence [8] of the MDS conjecture implies the following covering radius conjecture for projective Reed-Solomon codes. Conjecture 1.6. For 2 ≤ k ≤ q − 2, the covering radius of P RS(q + 1, k) is q − k except when q is even, k = 2, q − 2 in which case the covering radius is q − k + 1. It is shown in [26][14] that the deep hole Conjecture 1.3 also implies the above covering radius conjecture. Since the deep hole conjecture is known to be true if k + 1 ≤ p by [28] or q is an odd prime power and k ≥ (q − 1)/2 by [14], we deduce that the covering radius conjecture is true if k + 1 ≤ p or if q is an odd prime power and k ≥ (q − 1)/2. There are many other cases that the covering radius conjecture is known to be true, see [14], including the two simplest non-trivial cases k = q − 2 and k = q − 3 which will be used later in this paper. The next major problem is the deep hole problem for P RS(q + 1, k). Problem 1.7. Let 2 ≤ k ≤ q − 2. Assume that the covering radius conjecture is true. Construct all deep holes of P RS(q + 1, k). This problem is very difficult and wide open. As shown in [14], classifying deep holes of P RS(q + 1, 2) for q even is equivalent to the difficult problem of classifying hyperovals of P G(2, q). In [26], we obtained a class of deep holes of P RS(q + 1, k) which are defined by polynomials of degree k, if ρ(P RS(q + 1, k)) = q − k. Theorem 1.8 (Deep holes of degree k [26]). Let q be a prime power and let k be an integer such that 2 ≤ k ≤ q−2 if 2 ∤ q or 3 ≤ k ≤ q−3 if 2 | q. Suppose ρ(P RS(q + 1, k)) = q − k. The words {(uf , v) | deg(f ) = k, v ∈ Fq } are deep holes of P RS(q + 1, k). The reason why it is difficult to find deep holes of a given linear code is that it is generally NP-hard to compute the error distance of a given word. In this paper, we give a simple but very effective method, embedding the code P RS(q + 1, k) to MDS supercodes, to control the error distance so that two new classes of deep holes of P RS(q + 1, k) are constructed explicitly. Theorem 1.9 (Construction from irreducible quadratic polynomials). Let q be a prime power and let k be an integer such that 2 ≤ k ≤ q −2 if 2 ∤ q or 3 ≤ k ≤ q − 3 if 2 | q. Let C = P RS(q + 1, k). Suppose ρ(C) = q − k. Let p(x) = x2 + αx + β ∈ Fq [x] be a monic irreducible quadratic polynomial. For any a, b ∈ Fq which are not zero simultaneously, the 6 JUN ZHANG AND DAQING WAN rational function a+bx defines the following coset of deep holes of the p(x) PRS code P RS(q + 1, k):   a + bα1 a + bα2 a + bαq , ,··· , , 0 + C. p(α1 ) p(α2 ) p(αq ) Theorem 1.10 (Construction from irreducible cubic polynomials). Let q be a prime power. Let C = P RS(q + 1, q − 3). Let p(x) ∈ Fq [x] be a monic irreducible cubic polynomial. Besides the deep holes in the above theorems, there are new cosets of deep holes of C of the form   a + bαq + cαq2 a + bα1 + cα12 a + bα2 + cα22 , ,··· , ,0 + C p(α1 ) p(α2 ) p(αq ) for some non-zero polynomial a + bx + cx2 ∈ Fq [x]. In particular, for the case q is odd and k = q − 2 the covering radius of the code P RS(q+1, q−2) is known to be q−k = 2. Kaipa [14] gave a classification of the deep holes of P RS(q + 1, q −2) using the P GL(2, q) group action on the projective space P G(2, q) of the syndromes. Under the group action, the syndrome space P G(2, q) is divided into 3 orbits: one is the orbit of syndromes of non-deep-holes, the other two are orbits of syndromes of deep holes. But he did not give the explicit deep holes. In this paper, we will show that if p(x) runs over all the monic irreducible quadratic polynomials, the explicit deep holes in Theorem 1.9 form all the deep holes of P RS(q + 1, q − 2). The difficulty here is to distinguish the deep holes for different irreducible quadratic polynomials. To overcome the difficulty, we construct a hypergraph related to the distribution of irreducible quadratic polynomials and investigate the properties of the hypergraph in detail. Theorem 1.11. Let q be an odd prime power. When p(x) runs over all the monic irreducible polynomials of degree 2 over Fq , the deep holes in Theorem 1.9 are all the deep holes of P RS(q + 1, q − 2). The rest of this paper is organized as follows. In Section 2, we give a new class of deep holes of affine RS code RS(D, k) besides the deep holes defined by polynomials of degree k and the deep holes in Proposition 1.4. In Section 3, we prove Theorem 1.9. We also investigate the relationship between the deep holes in Theorem 1.8 and the deep holes in Theorem 1.9. In Section 4, we prove Theorem 1.11. In Section 5, we prove Theorem 1.10 and show that the deep holes in Theorems 1.8 and 1.9 (k = q − 3) are contained in the deep holes in Theorem 1.10 where the L-function theory of exponential sums is applied. EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 7 2. New Deep Holes of Generalized RS Codes In this section, we show that if the evaluation set of the generalized RS Code is zero-sum-free (a combinatorial structure, see Definition 2.7), then new deep holes of the RS code are obtained. We first review some results about deep holes of RS codes RS(D, k). Recall that all deep holes of RS(q, k) were conjectured to be defined by polynomials of degree k (Conjecture 1.3). The same conjecture is false for general evaluation set D, see [24, 25]. To support Conjecture 1.3, the easiest case is to determine whether a polynomial of degree k + 1 defines a deep hole of RS(q, k). Li and Wan [16] interpreted it as a subset sum problem (SSP). Definition 2.1. Let G be a finite abelian group and D a subset of G. The k-SSP over D consists in determining P for any g ∈ G, if there is a subset S ⊂ D such that |S| = k and s∈S s = g. And denote the number of solutions by ) ( X s=g . N(k, g, D) = S ⊂ D |S| = k, s∈S Lemma 2.2 ([16]). For any polynomial f≤k−1(x) of degree ≤ k − 1, the polynomial xk+1 − axk + f≤k−1(x) does not define a deep hole of the RS code RS(D, k) if and only if N(k + 1, a, D) > 0. For general D, solving k-SSP is an NP-hard problem. But for the case D = G = Fq , the k-SSP is easy. Proposition 2.3 ([16]). If D = G = Fq , then for any g ∈ Fq and for any 1 ≤ k ≤ q − 1 if 2 ∤ q or for any 3 ≤ k ≤ q − 3 if 2 | q, the k-SSP over D always has solutions. The above proposition is applied to decide deep holes of RS(q, k). Proposition 2.4 ([16]). For any 2 ≤ k ≤ q − 4, the vectors defined by polynomials of degree k + 1 are not deep holes of RS(q, k). For degree k + 2 and odd q, a complete classification of deep holes for RS(q, k) is obtained by Zhang, Fu and Liao [25], and detailed error distances are computed by Li and Zhu [18]. Proposition 2.5 ([25, 18]). For any 2 ≤ k ≤ q − 3, the vectors defined by polynomials of degree k + 2 are not deep holes of RS(q, k). For general degrees, the authors in [2] got the first result by reducing the conjecture to the existence of rational points on a hypersurface over Fq . Following a similar approach of Cheng-Wan [3], Li and Wan [17] 8 JUN ZHANG AND DAQING WAN improved the result in [2] with Weil’s character sum estimate. Later, Cafure et.al. [1] improved the result in [17] a little bit by using tools of algebraic geometry. Liao [19] gave a tighter estimation of error distance, which was improved by Zhu and Wan [27]. A major progress in proving Conjecture 1.3 is the recent result: Proposition 2.6 ([28][14]). If k + 1 ≤ p or k ≥ (q − 1)/2, Conjecture 1.3 is true. In particular, the conjecture is true if q is a prime. With the preparation above, we now give our new deep holes for some generalized RS codes, which can be viewed as a generalization of the new deep holes found for even characteristic case in [25]. We define Definition 2.7. We call a subset D ⊂ Fq an r-zero-sum-free set in the finite field Fq if for any r-subset S of D, X s 6= 0. s∈S Zero-sum-free sets are extensively studied in combinatorics and number theory (see [9, 22]). Example 2.8. Let p be a prime number and r be an integer such that 1 < r < p. Then the set n o p 0, 1, 2, · · · , ⌊ ⌋ + r − 1 r is an r-zero-sum-free set in the prime field Fp . Example 2.9. Let q be an odd prime power and let the evaluation set D ⊂ Fq be such that s ∈ D, s 6= 0 ⇒ −s ∈ / D. That is, D ∩ {−D} ⊆ {0}. Then D is a 2-zero-sum-free set. Example 2.10. Let q be a power of 2 and let the evaluation set D ⊂ Fq be arbitrary. Then D is a 2-zero-sum-free set. Using the relationship between subset sum problem and deep holes defined by polynomials of degree k + 1, we obtain the following new deep holes for generalized RS codes. Theorem 2.11. Suppose the evaluation set D ⊂ Fq is r-zero-sum-free (r ≥ 2). Let k = |D| − r − 1.P For any polynomial f≤k−1 (x) of degree k+1 ≤ k−1, the polynomial x −( s∈D s)xk +f≤k−1 (x) defines a new class of deep holes of RS(D, k) besides deep holes defined by polynomials of degree k and polynomials in Proposition 1.4. EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 9 P Proof. First, we show that the word xk+1 − ( s∈D s)xk + f≤k−1 (x) really a deep hole of RS(D, k). By lemma 2.2, the word xk+1 − P defines k ( s∈D s)x + f≤k−1 (x) does not define a deep holeP of RS(D, k) if and only if there is a k + 1-subset of D whose sum is s∈D s. The latter is equivalent to that the r leftover elements in DPhave sum 0 which is impossible by the assumption on D. So xk+1 − ( s∈D s)xk + f≤k−1 (x) defines a deep hole of RS(D, k). Second, we show the deep holes are new. • (Differ from polynomials of degree k.) If there exist some a ∈ F∗q and some polynomial g≤k−1 (x) of degree ≤ k − 1 such that X s)xk + f≤k−1(x) = axk + g≤k−1 (x) xk+1 − ( s∈D on D, then the polynomial of degree k + 1 X s)xk + f≤k−1 (x) − axk − g≤k−1 (x) xk+1 − ( s∈D has at least |D| = k + r + 1 distinct zeros, which implies it must be 0. This contradicts to non-zero coefficients of the term xk+1 . • (Differ from polynomials in Proposition 1.4.) If there exist some a ∈ F∗q , δ ∈ / D and some polynomial g≤k−1 (x) of degree ≤ k − 1 such that X a xk+1 − ( s)xk + f≤k−1 (x) = + g≤k−1(x) x − δ s∈D on D. As x − δ is non-zero everywhere on D, we multiply x − δ on the equality to get X (xk+1 − ( s)xk + f≤k−1(x))(x − δ) = a + (x − δ)g≤k−1 (x) s∈D on D. So the polynomial of degree k + 2 X (xk+1 − ( s)xk + f≤k−1 (x))(x − δ) − a − (x − δ)g≤k−1 (x) s∈D has at least k + r + 1 distinct zeros, which implies that it must be 0. By the same reason above, we obtain a contradiction. So the deep holes are new.  10 JUN ZHANG AND DAQING WAN 3. Covering Radii and Deep Holes for PRS codes In this section, we study the covering radii and deep holes for PRS codes. Recall that the PRS code P RS(q + 1, k) has one generator matrix of the form   1 1 ··· 1 0  α1 α2 · · · αq 0    .. .. ..   .. .. .  . . . . .   k−2 k−2 k−2  α1 α2 · · · αq 0  α1k−1 α2k−1 · · · αqk−1 1 It is easy to check that the PRS code has minimum distance q + 2 − k and thus it is also an MDS code. For the case k = 1, the PRS code P RS(q + 1, 1) is nothing but the repeating code generated by (1, 1, · · · , 1). In this case, one can easily show that the covering radius is d − 2 = q − 1 and the deep holes are permutations of the (q + 1)-element multi-set Fq ∪ {α}, where α ∈ Fq is arbitrary. For the case k = q − 1, the proof of Theorem 3.2 in [26] shows that the covering radius of P RS(q + 1, k) is d − 2 = 1 and the deep holes are (a, · · · , a, 0, v) + P RS(q + 1, k), where a ∈ F∗q , and v ∈ Fq are arbitrary. For the case k = q, one can show that the covering radius of P RS(q+ 1, k) is d − 1 = 1 and the deep holes are w + P RS(q + 1, k) for all w ∈ Fq+1 of weight 1. q With the boundary cases removed, we can then assume that 2 ≤ k ≤ q − 2. 3.1. Covering radii of PRS codes. Although the covering radius of RS codes is always d − 1, it seems a little surprising that the covering radius of PRS codes is unknown in general. The above boundary cases suggest that the covering radius of P RS(q + 1, k) can have two possibilities q − k, q − k + 1, which is indeed the case. Another example in [4] is the PRS code C over F5 with generator matrix   1 1 1 1 1 0  1 2 3 4 0 0     1 22 32 42 0 0  . 1 23 33 43 0 1 The code C has minimum distance 3 and covering radius 1. This example suggests P RS(q + 1, k) may have covering radius q − k, two smaller than the minimum distance q + 2 − k. This leads to Conjecture 1.6. In [8], Dür proved EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 11 √ q 39 Proposition 3.1 ([8]). If q is an odd prime power and 2 ≤ k < √4 + 16 √ q or 6 q ln q − 2 ≤ k ≤ q − 2; or if q is a power of 2 and 5 ≤ k < 2 − 11 4 √ or 6 q ln q − 2 ≤ k ≤ q − 3, then the covering radius of P RS(q + 1, k) is ρ(P RS(q + 1, k)) = q − k. In [26] we studied the relationship between the covering radius Conjecture 1.6 for PRS codes and the deep hole Conjecture 1.3. Theorem 3.2 ([26]). Let q be an odd prime power. Assume that Conjecture 1.3 is true. Then the covering radius of P RS(q + 1, k) is q − k. Note that the above theorem holds for even q: if Conjecture 1.3 is true, then the covering radius of P RS(q + 1, k) is q − k for all 3 ≤ k ≤ q − 3. The proof is the same as the proof in [26]. Using recent results on Conjecture 1.3 [14], we can deduce Corollary 3.3 ([26]). Let q be a power of the prime p. Assume either 3 ≤ k + 1 ≤ p or k ≥ (q − 1)/2 (and k 6= q − 2 if p = 2). Then the covering radius of P RS(q + 1, k) is q − k. It is natural to ask if the converse holds. We only have partial result. Theorem 3.4. Let q be a prime power and let k be an integer such that 2 ≤ k ≤ q − 2 if 2 ∤ q or 3 ≤ k ≤ q − 3 if 2 | q. If Conjecture 1.6 holds, deep holes of RS(q, k) are not deep hole of RS(q, k − 1). Proof. Consider the word (uf , v), where uf is a deep hole of RS(q, k) and v ∈ Fq is arbitrary. By the assumption ρ(P RS(q + 1, k)) = q − k, we get d((uf , v), P RS(q + 1, k)) ≤ q − k. That is, there is a codeword (uh , ck−1 (h)) ∈ P RS(q + 1, k) such that d((uf , v), (uh, ck−1 (h))) ≤ q − k. On the other hand, we have d((uf , v), (uh, ck−1 (h))) = d(uf , uh ) + d(v, ck−1(h)) ≥ q − k + d(v, ck−1(h)), since d(uf , RS(q, k)) = q − k and uh ∈ RS(q, k). It forces d(uf , uh ) = q − k, So k−1 As h − vx and ck−1 (h) = v. d(uf −vxk−1 , uh−vxk−1 ) = d(uf , uh ) = q − k. is a polynomial of degree ≤ k − 2, it follows d(uf −vxk−1 , RS(q, k − 1)) ≤ q − k. 12 JUN ZHANG AND DAQING WAN Because ρ(RS(q, k − 1)) = q − k + 1, uf −vxk−1 is not a deep hole of RS(q, k − 1). In particular, taking v = 0 we prove the lemma.  3.2. Deep holes of PRS codes. A further question is to find all the deep holes of the PRS codes. On the opposite side, the following result shows that a large class of vectors are not deep holes. Theorem 3.5 ([26]). If deg(f ) ≥ k + 1, denote s = deg(f ) − k + 1. There are positive constants c1 and c2 such that if  √ s s < c1 q, + 2 log2 (q) < k < c2 q, 2 then for any v ∈ Fq , (uf , v) is not a deep hole of P RS(q + 1, k). On the positive side, we have the following construction of deep holes of PRS codes. Theorem 3.6 (Construction from irreducible quadratic polynomials). Let q be a prime power and let k be an integer such that 2 ≤ k ≤ q − 2 if 2 ∤ q or 3 ≤ k ≤ q − 3 if 2 | q. Suppose ρ(P RS(q + 1, k)) = q − k. Let p(x) = x2 + αx + β ∈ Fq [x] be a monic irreducible polynomial over Fq . For any a, b ∈ Fq which are not zero simultaneously, the rational defines the following coset of deep holes of the PRS code function a+bx p(x) P RS(q + 1, k):   a + bα1 a + bα2 a + bαq , ,··· , , 0 + C. p(α1 ) p(α2 ) p(αq ) Proof. We will define a new MDS code C ′ with parameters [q + 1, k + 2] which contains C = P RS(q + 1, k) as a subcode. So all the words in C ′ \ C are deep holes of C. The code C ′ is generated by the generator matrix  1  1 · · · p(α1 q ) 0 p(α1 ) p(α2 ) αq  α1  α  p(α1 ) p(α22 ) · · · p(αq ) 0   . .. .. ..  ..  .. . . . .   .  αk1  αkq αk2  p(α ) p(α ) · · · p(α ) 0  q 1 2  k+1  αk+1 α1 αk+1 q 2 · · · 1 p(α1 ) p(α2 ) p(αq ) From the definition, it is easy to see that C ′ is equivalent to the PRS code [q + 1, k + 2] code with the scale vector   1 1 1 , ,··· , ,1 . p(α1 ) p(α2 ) p(αq ) EXPLICIT DEEP HOLES OF REED-SOLOMON CODES So C ′ is an MDS code with parameters [q + 1, k + 2]. The PRS code C = P RS(q + 1, k) is a subcode of the as   1 1 ··· 1 0  β α 1 0 ···  α1  α · · · α 0 2 q    0 β α 1 ···  .. .. .. ..   .. .  . . . .  =  .. .. .. .. . .  k−2  . . . . . k−2 k−2  α1 α2 · · · αq 0  0 0 0 0 · · · α1k−1 α2k−1 · · · αqk−1 1  1 1 ··· p(α1 ) p(α2 )  α1 α2  p(α1 ) p(α2 ) · · ·  . .. ..  . . ×  .. k  αk1 α2  p(α ) p(α ··· 1 2)  k+1 k+1 α2 α1 ··· p(α1 ) p(α2 ) For any non-zero vector c′ ∈ C ′ \ C, we have 13 new code C ′ ,  0 0 0 0 0 0  .. .. ..  . . .  β α 1 1 p(αq ) αq p(αq ) .. . αkq p(αq ) αk+1 q p(αq ) 0 0 .. .      .  0   1 q − k = d(C ′ ) ≤ d(c′ , C) ≤ ρ(C) = q − k, so d(c′ , C) = ρ(C) = q − k. Note that any non-zero vector c′ ∈ C ′ \ C has the form   a + bα1 a + bα2 a + bαq ′ c = , ,··· , ,0 + c p(α1 ) p(α2 ) p(αq ) for some a, b ∈ Fq which are not zero simultaneously and some c ∈ C. So for any a, b ∈ Fq which are not zero simultaneously, the vectors   a + bα1 a + bα2 a + bαq , ,··· , ,0 + C p(α1 ) p(α2 ) p(αq ) are deep holes of the PRS code P RS(q + 1, k).  We study the relationship between deep holes constructed from monic irreducible polynomials of degree 2 in the above theorem and the deep holes defined by polynomials of degree k in Theorem 1.8. Theorem 3.7. Let q be a prime power and let k be an integer such that 2 ≤ k ≤ q − 2 if 2 ∤ q or 3 ≤ k ≤ q − 3 if 2 | q. Suppose ρ(P RS(q+1, k)) = q−k. If k ≤ q−3, the deep holes {(uf , v) | deg(f ) = k, v ∈ Fq } are different from the deep holes in Theorem 3.6. If q is odd and k = q − 2, the deep holes {(uf , v) | deg(f ) = k, v ∈ Fq } are contained in the deep holes in Theorem 3.6. 14 JUN ZHANG AND DAQING WAN Proof. Wlog, we may assume f (x) = xk −wxk−1 , as (uxi , 0) ∈ P RS(q + 1, k) for all 0 ≤ i ≤ k − 2 and any non-zero scale multiple of a deep hole is still a deep hole. Let Then we have g(x) = f (x) − vxk−1 = xk − (w + v)xk−1 . d((ug , 0), P RS(q + 1, k)) = d((uf , v), P RS(q + 1, k)). For the case k ≤ q − 3, suppose there are some monic irreducible polynomial p(x) ∈ Fq [x] of degree 2, some non-zero polynomial a+bx ∈ Fq [x] and some polynomial h(x) ∈ Fq [x] of degree ≤ k − 2 such that g(x) = a + bx + h(x) p(x) ∀x ∈ Fq . Then the polynomial of degree k + 2 ≤ q − 1 (g(x) − h(x))p(x) − (a + bx) has q different zeros (as it is zero on Fq ), which is impossible. So in this case, the deep holes {(uf , v) | deg(f ) = k, v ∈ Fq } are different from the deep holes in Theorem 3.6. For the case k = q − 2, let p(x) = x2 + αx + β ∈ Fq [x] be any monic irreducible polynomial over Fq . Let a + bx ≡ −(xq − x) mod p(x). Since xq − x is coprime to p(x), the polynomial a + bx is non-zero. There exists some polynomial h(x) ∈ Fq [x] of degree ≤ k − 2 such that (xk − αxk−1 − h(x))p(x) = a + bx + xq − x. Hence by choosing a monic irreducible polynomial1 p(x) = x2 + (w + v)x + β ∈ Fq [x], there is some polynomial h(x) ∈ Fq [x] of degree ≤ k − 2 such that (g(x) − h(x))p(x) = a + bx + xq − x, 1If q is odd (or q is even and w + v = 0), one can always use the discriminant to determine if p(x) is irreducible. That is, if (w + v)2 − 4β is a non-square in Fq , then p(x) is irreducible over Fq . So in this case, there are q−1 2 many of β ∈ Fq making (w + v)2 − 4β a non-square for given w + v. However the discriminant method is invalid for even q and w + v 6= 0. We show the existence of β by contradiction. Suppose for all β ∈ Fq , the quadratic polynomial p(x) = x2 + (w + v)x + β is reducible over Fq . So p(x) has two roots in Fq , saying γ1 , γ2 . Then γ1 6= γ2 , as γ1 + γ2 = w + v 6= 0. On the other hand, for any γ ∈ Fq there is at most one β ∈ Fq such that p(γ) = 0. So when β runs over Fq there are totally 2q pairwise distinct roots in Fq which is impossible. EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 15 which is also equivalent to g(x) = a + bx + h(x) p(x) ∀x ∈ Fq . So in this case, the deep holes {(uf , v) | deg(f ) = k, v ∈ Fq } are contained in the deep holes in Theorem 3.6.  The following lemma shows that deep holes in Theorem 3.6 are disjoint for different monic irreducible polynomials of degree 2 in the case ≤ q − 3. And the case k = q − 2 will be studied in detail in Section 4. Lemma 3.8. Suppose 2 ≤ k ≤ q − 3. For any non-zero polynomials a1 + b1 x, a2 + b2 x ∈ Fq [x] and any two different monic irreducible polynomials p1 (x), p2 (x) ∈ Fq [x] of degree 2, there is no polynomial f (x) ∈ Fq [x] of degree ≤ k − 2 such that a1 + b1 x a2 + b2 x = + f (x) p1 (x) p2 (x) ∀x ∈ Fq . Proof. Suppose there is a polynomial f (x) ∈ Fq [x] of degree ≤ k − 2 such that a2 + b2 x a1 + b1 x = + f (x) ∀x ∈ Fq . p1 (x) p2 (x) Denote the polynomial g(x) = (a1 + b1 x)p2 (x) − (a2 + b2 x)p1 (x) + f (x)p1 (x)p2 (x). Then we have deg(g(x)) = deg(f (x)) + 4 ≤ k + 2 ≤ q − 1 and xq − x | g(x). So g(x) must be the zero polynomial. It enforces f (x) = 0 and (a1 + b1 x)p2 (x) = (a2 + b2 x)p1 (x) which is impossible under our assumption.  3.3. The number of deep holes of PRS codes. A classification result of Kaipa [14] about deep holes of P RS(q + 1, k), if ρ(P RS(q + 1, k)) = q − k, could allow us to count the number of cosets of deep 16 JUN ZHANG AND DAQING WAN holes. Consider the syndrome of the received word follows:  1 1 ··· 1  α1 α · · · α 2 q  .. .. ..  .. T . Hu =  . . .  q−k−1 q−k−1 q−k−1  α1 α2 · · · αq q−k q−k α1 α2 · · · αqq−k u ∈ Fq+1 defined as q 0 0 .. .     T u .  0  1 If ρ(P RS(q + 1, k)) = q − k, the coset u + P RS(q + 1, k) is a coset of deep holes of P RS(q + 1, k) if and only if the syndrome HuT is not in the span of any q − k − 1 vectors in the normal rational curve NRC = {(1, x, · · · , xq−k ) | x ∈ Fq } ∪ {(0, · · · , 0, 1)}. Theorem 3.9 ([14]). Let q be an odd prime power and k = q − 2. There are (q − 1)q 2 cosets of deep holes of P RS(q + 1, k). Theorem  3 3.10. Let  q be a prime power and k = q − 3. There are q q (q − 1) 2 + q 2 + 2 cosets of deep holes of P RS(q + 1, k). Proof. Since any 4 vectors in  1  α1  2  α1 α13 the NRC 1 α2 α22 α23 ··· 1 · · · αq · · · αq2 · · · αq3  0 0   0  1 are linearly independent over Fq , the union of all the span of 2 vectors in NRC has cardinality   q+1 (q − 1)2 + (q + 1)(q − 1) + 1. 2 So the number of cosets of deep holes is     3  q q q+1 2 2 4 . +q + (q − 1) + (q + 1)(q − 1) + 1 = (q−1) q − 2 2 2  4. Complete deep holes of P RS(q + 1, q − 2) In this section, we focus on the case q is odd and k = q − 2. In this case, the covering radius of P RS(q + 1, q − 2) is deterministic, saying ρ(P RS(q + 1, q − 2)) = 2. In [14], Kaipa gave a classification of the syndromes of deep holes of P RS(q + 1, q − 2) using the P GL(2, q) group action on the projective space P G(2, q), but without explicit construction of the deep holes. In this section, we will show that deep EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 17 holes in Theorem 3.6 are all the deep holes of P RS(q + 1, q − 2). So all the deep holes of P RS(q + 1, q − 2) are constructed explicitly. We first give some facts about the deep holes found in Theorem 3.6. For any monic irreducible quadratic polynomial p(x) ∈ Fq [x] we denote   a + bx | a, b ∈ Fq are not zero simultaneously . DH(p(x)) = p(x) As there is one-to-one correspondence between rational functions in DH(p(x)) and the cosets of deep holes of the form   a + bα1 a + bα2 a + bαq , ,··· , , 0 + C, p(α1 ) p(α2 ) p(αq ) we also denote by DH(p(x)) the cosets of deep holes of the above form defined by p(x). Fact 1. We have |DH(p(x))| = q 2 − 1, and |DH(p1(x)) ∩ DH(p2 (x))| = q − 1 for any two distinct p1 (x), p2 (x). Proof. It is obvious that |DH(p(x))| = q 2 − 1. The same argument in the proof of Lemma 3.8 shows that the only possibility for a2 + b2 x a1 + b1 x = + f (x) ∀x ∈ Fq . p1 (x) p2 (x) is that deg(f (x)) = k − 2 = q − 4 and for some a ∈ F∗q . So g(x) = a(xq − x) p1 (x)p2 (x) | a(xq − x) − (a1 + b1 x)p2 (x) + (a2 + b2 x)p1 (x). Since p1 (x), and p2 (x) are two distinct monic irreducible polynomial over Fq , the condition above is equivalent to ( p1 (x) | a(xq − x) − (a1 + b1 x)p2 (x), p2 (x) | a(xq − x) + (a2 + b2 x)p1 (x), which has solution as follows ( q −x) a1 + b1 x ≡ a(x mod p1 (x), p2 (x) a(xq −x) mod p2 (x). a2 + b2 x ≡ − p1 (x) 18 JUN ZHANG AND DAQING WAN So when a runs over F∗q , it gives the q − 1 elements of DH(p1(x)) ∩ DH(p2(x)). And hence, |DH(p1 (x)) ∩ DH(p2(x))| = q − 1.  Fact 2. For any three monic irreducible polynomials p1 (x), p2 (x), p3 (x) of degree 2, the condition DH(p1 (x)) ∩ DH(p2(x)) ∩ DH(p3 (x)) 6= ∅ if and only if p1 (x), p2 (x), p3 (x) are linearly dependent, i.e., there is unique c ∈ Fq \ {0, 1} such that p1 (x) = cp2 (x) + (1 − c)p3 (x). Proof. Suppose a1 + b1 x ∈ DH(p1 (x)) ∩ DH(p2 (x)) ∩ DH(p3 (x)). p1 (x) Then there are c1 , c2 ∈ F∗q such that c1 (xq − x) p2 (x) mod p1 (x), c2 (xq − x) a1 + b1 x ≡ p3 (x) mod p1 (x). a1 + b1 x ≡ and So c2 (xq − x) c1 (xq − x) ≡ p3 (x) p2 (x) or mod p1 (x) p1 (x) | (c2 p2 (x) − c1 p3 (x))(xq − x). Since xq − x is coprime to p1 (x), we have So c1 6= c2 and Let c = c2 . c2 −c1 p1 (x) | c2p2 (x) − c1 p3 (x). (c2 − c1 )p1 (x) = c2 p2 (x) − c1 p3 (x). Then c ∈ Fq \ {0, 1}, and p1 (x) = cp2 (x) + (1 − c)p3 (x). If there is another c ∈ Fq \ {0, 1} such that ′ p1 (x) = c′ p2 (x) + (1 − c′ )p3 (x). EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 19 Then cp2 (x) + (1 − c)p3 (x) = c′ p2 (x) + (1 − c′ )p3 (x) which is impossible unless c′ = c. So c is unique. Conversely, if there is c ∈ Fq \ {0, 1} such that then Let p1 (x) = cp2 (x) + (1 − c)p3 (x), DH(p1(x)) ∩ DH(p2 (x)) ∩ DH(p3(x)) 6= ∅. a1 + b1 x ≡ xq − x p2 (x) mod p1 (x). Then a1 + b1 x ∈ DH(p1 (x)) ∩ DH(p2(x)) p1 (x) By the assumption, we have xq − x c xq − x ≡ mod p1 (x). p2 (x) c − 1 p3 (x) So c xq − x mod p1 (x), a1 + b1 x ≡ c − 1 p3 (x) which implies a1 + b1 x ∈ DH(p1 (x)) ∩ DH(p3(x)) p1 (x) Hence, a1 + b1 x ∈ DH(p1 (x)) ∩ DH(p2 (x)) ∩ DH(p3 (x)). p1 (x)  Fact 3. For any pairwise distinct monic irreducible quadratic polynomials p1 (x), p2 (x), · · · , pj (x) if then |DH(p1(x)) ∩ DH(p2 (x)) ∩ · · · ∩ DH(pj (x))| = 6 ∅, |DH(p1(x)) ∩ DH(p2 (x)) ∩ · · · ∩ DH(pj (x))| = q − 1. Based on the above facts, we construct a hypergraph concerning of the distribution of irreducible quadratic polynomials, which makes the picture of deep holes more clear. Since DH(p(x)) is closed under any non-zero scaling, we consider two polynomials a + bx a + bx and c , c ∈ F∗q p(x) p(x) 20 JUN ZHANG AND DAQING WAN as the same vertex in the hypergraph G = (V, E). So the vertices V of the hypergraph are defined to be [ DH(p(x))/F∗q p(x) where p(x) runs through all monic irreducible polynomials of degree 2. Any edge e ∈ E is defined to be e = DH(p(x))/F∗q for some monic irreducible polynomial p(x) of degree 2. By Fact 1, any edge has q + 1 vertices and any two edges intersects with 1 vertex. Facts 2 tells that any vertex has degree about q−1 , as there are about 2 half c ∈ Fq making p1 (x) irreducible if given p2 (x) and p3 (x). Lemma 4.1. Any vertex v in the hypergraph G has degree q−1 2 or q+1 . 2 1x Proof. For any fixed vertex v = ap11+b ∈ DH(p1 (x)) (p1 (x) = x2 +α1 x+ (x) β1 ), we need to count the number of monic irreducible polynomials p2 (x) = x2 + α2 x + β2 (p2 (x) 6= p1 (x)) such that (*) a1 + b1 x ≡ c(xq − x) p2 (x) mod p1 (x) for some c ∈ F∗q . Because a1 +b1 x is coprime to p1 (x), let f (x) be the inverse of a1 +b1 x modulo p1 (x), i.e., (a1 + b1 x)f (x) ≡ 1 mod p1 (x). Since f (x) and p2 (x) are coprime to p1 (x), we multiply f (x)p2 (x) on both sides of the equation (*) and obtain Denote p2 (x) ≡ c(xq − x)f (x) mod p1 (x). e1 x + e2 ≡ c(xq − x)f (x) mod p1 (x). Then e1 , e2 are non-zero simultaneously. The condition (*) is equivalent to p2 (x) ≡ c(e1 x + e2 ) mod p1 (x). So the existence of p2 (x) and c ∈ F∗q is equivalent to that the discriminant ∆ = (α1 + e1 c)2 − 4(β1 + e2 c) = e21 c2 + (2α1 e1 − 4e2 )c + (α12 − 4β1 ) EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 21 is a non-square for some c ∈ F∗q . Hence the degree of the vertex v is deg(v) = |{c ∈ F∗q | ∆ is a non-square}| + 1. Since c = 0 makes ∆ a non-square, we have deg(v) = |{c ∈ Fq | ∆ is a non-square}|. • If e1 = 0, then e2 6= 0 and there are q−1 many of c ∈ Fq such 2 that ∆ is a non-square. So in this case, q−1 2 • If e1 = 6 0, then the discriminant deg(v) = ∆ = e21 c + (2α1 e1 − 4e2 )c + (α12 − 4β1 )  2 2  α1 e1 − 2e2 α1 e1 − 2e2 2 = e1 c + + (α1 − 4β1 ) − e1 e1 Denote δ= (α12 − 4β1 ) −  α1 e1 − 2e2 e1 2 . Then after a linear transformation of Fq , deg(v) = |{c ∈ Fq | c2 − δ is a non-square in Fq }|. Since α12 − 4β1 is a non-square, the constant term is non-zero, i.e., δ 6= 0. Next, we count the number of c ∈ Fq that makes c2 −δ a square. Suppose c2 − δ = y 2 for some y ∈ Fq . Then δ = (c − y)(c + y). It is easy to see that the above equation has solutions c= δ/l − l δ/l + l ,y = , ∀l ∈ F∗q . 2 2 So 2 |{c ∈ Fq | c − δ is a square in Fq }| =  δ/l + l | l ∈ F∗q 2  . 22 JUN ZHANG AND DAQING WAN Hence, deg(v) = |{c ∈ Fq | c2 − δ is a non-square in Fq }|   δ/l + l ∗ | l ∈ Fq =q− 2 ( q−1 if δ is a square; 2 = q+1 if δ is a non-square. 2  Lemma 4.2. In any edge of the hypergraph G, half of the vertices have degree q+1 , and the other half of the vertices have degree q−1 . 2 2 Proof. Let e = DH(p(x))/F∗q be an edge of G. Suppose there are m vertices in e of degree q−1 and n vertices in e of degree q+1 . There are 2 2 q 2 −q totally 2 edges in G. By Fact 1 besides the edge e, any of the other q 2 −q − 1 edges intersects with e. So 2     q+1 q2 − q q−1 −1 +n −1 = − 1. m 2 2 2 By Lemma 4.1, we have m + n = q + 1. So m=n= q+1 . 2  Theorem 4.3. The hypergraph G has |V | = q 2 vertices. Proof. As a multi-set, the union of all the edges has cardinality q2 − q (q + 1). 2 By Lemma 4.2, half of the elements in the multi-set have multiplicity q+1 , and the other half elements in the multi-set have multiplicity q−1 . 2 2 So the hypergraph has |{monic irreducible polynomials of degree 2}|(q + 1) = q 2 −q (q+1) 2 q 2 −q (q+1) 2 |V | = vertices. 2 q+1 2 + 2 q−1 2 = q2  With the preparation above, we now turn to our main result of this section. EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 23 Theorem 4.4. Let q be an odd prime power. When p(x) runs over all the monic irreducible polynomials of degree 2 over Fq , the deep holes in Theorem 3.6 are all the deep holes of P RS(q + 1, q − 2). Proof. By Theorem 4.3, there are |V |(q − 1) = q 2 (q − 1) cosets of deep holes found in Theorem 3.6. On the other hand, by Theorem 3.9 there are totally q 2 (q − 1) cosets of deep holes. So the deep holes in Theorem 3.6 are all the deep holes of P RS(q +1, q −2) if p(x) runs over all the monic irreducible polynomials of degree 2.  5. Deep holes of P RS(q + 1, q − 3) In this section, we extend the construction using irreducible quadratic polynomials to irreducible cubic polynomials for the code P RS(q+ 1, q − 3). More deep holes of P RS(q + 1, q − 3) are obtained. In Section 4 it is proved that for odd q and k = q −2 there are totally q 2 (q − 1) cosets of deep holes constructed in Theorem 3.6 which form all the deep holes of the PRS code P RS(q + 1, q − 2). But for the code P RS(q + 1, q − 3), by Lemma 3.8 the total number of cosets of deep holes in Theorems 3.6 and 1.8 is   3 q2 − q 2 q q . (q − 1) + q(q − 1) = (q − 1) + 2 2 2 By Theorem 3.10 the exact number of cosets of deep holes of P RS(q + 1, q − 3) is  3  q q 2 (q − 1) . +q + 2 2 Hence there are other deep holes! Theorem 5.1 (Construction from irreducible cubic polynomials). Let q be a prime power and let k = q − 3. Let C = P RS(q + 1, k). Let p(x) ∈ Fq [x] be a monic irreducible polynomial of degree 3. (1) There are totally q2 + q + 2 2 cosets of deep holes of the form (q − 1) (uf , 0) + C 24 JUN ZHANG AND DAQING WAN 2 where f (x) = a+bx+cx for some non-zero polynomial a + bx + p(x) 2 cx ∈ Fq [x]. (2) There are new cosets of deep holes of C of the form above besides the deep holes in Theorem 3.6 and Theorem 1.8. Proof. We have seen that in this case the covering radius ρ(P RS(q + 1, k)) = q − k. Similarly to Theorem 3.6, we construct a supercode C ′ using the irreducible polynomial p(x). Then C ′ is an MDS code with parameters 2 [q + 1, k + 3]. So for any rational function f (x) = a+bx+cx where a, b, c p(x) are not zero simultaneously, we have q − k − 1 = d(C ′ ) ≤ d((uf , 0), C) ≤ ρ(P RS(q + 1, k)) = q − k. The error distance d((uf , 0), C) = q − k − 1 if and only if there is h(x) ∈ Fq [x] of degree k − 2 such that a + bx + cx2 − h(x)p(x) splits as k + 1 = q − 2 linear factors, or a + bx + cx2 − (dxk−1 + h(x))p(x) splits as k + 2 = q − 1 linear factors for some d ∈ F∗q . Moreover, for fixed a + bx + cx2 if there is h(x) ∈ Fq [x] of degree k − 2 such that a + bx + cx2 − h(x)p(x) splits as k + 1 = q − 2 linear factors, then such h(x) is unique. If not, suppose there is another h1 (x) ∈ Fq [x] of degree k − 2 such that a + bx + cx2 − h(x)p(x) splits as k + 1 = q − 2 linear factors. Let S and T be (q − 2)-subsets of Fq such that Y a + bx + cx2 − h(x)p(x) = d (x − s) s∈S and a + bx + cx2 − h1 (x)p(x) = d1 for some d, d1 ∈ F∗q . Then (h(x) − h1 (x))p(x) = d1 Note that Y t∈T (x − t) Y Y (x − t) − d (x − s). t∈T |S ∩ T | ≥ q − 4. s∈S EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 25 So the polynomial (h(x) − h1 (x))p(x) has at least q − 4 linear factors. Since the polynomial h(x) − h1 (x) has degree deg(h(x) − h1 (x)) ≤ q − 5, the polynomial p(x) has at least 1 linear factor, which contradicts to the irreducibility of p(x). So for a + bx + cx2 if there is h(x) ∈ Fq [x] of degree k − 2 such that a + bx + cx2 − h(x)p(x) splits as k + 1 = q − 2 linear factors, then the factorization is unique. On the other hand, any (q − 2)-subset S of Fq contributes q − 1 polynomials a + bx + cx2 in the following way Y a + bx + cx2 ≡ d (x − s) mod p(x) s∈S where d ∈ F∗q is arbitrary. Hence, the number of such a + bx + cx2 is   q . (q − 1) q−2 Similarly, the number of polynomials a + bx + cx2 such that a + bx + cx2 − h(x)p(x) splits as k + 2 = q − 1 linear factors for some h(x) of degree k − 1 is   q . (q − 1) q−1 By the same argument again, there is no a + bx + cx2 satisfying the two splitting conditions at the same time. So the total number of f satisfying d((uf , 0), C) = q − k − 1 is     q q . + (q − 1) q−1 q−2   Hence the number of cosets of deep holes of C of the form u a+bx+cx2 , 0 + p(x) C is 3 q − 1 − (q − 1)     q2 + q + 2 q q = (q − 1) + . q−1 q−2 2 This proves the first statement. Next we show that there are NEW deep holes besides the deep holes in Theorems 3.6 and 1.8. FIX p(x) = x3 + αx2 + βx + γ a monic irreducible polynomial. Suppose there are a monic irreducible polynomial q(x) of degree 2 and a polynomial f (x) ∈ Fq [x] of degree ≤ k − 2 such that a + bx + cx2 d + ex = + f (x) p(x) q(x) ∀x ∈ Fq . 26 JUN ZHANG AND DAQING WAN Then one can solve to get a + bx + cx2 ≡ l(xq − x) q(x) mod p(x) and −l(xq − x) mod q(x) p(x) for some l ∈ F∗q . So running over all monic irreducible polynomial of degree 2 and l ∈ F∗q , they contribute at most d + ex ≡ q2 − q (q − 1) 2 cosets of deep holes of the form in the lemma. So besides the deep holes in Theorem 3.6, there are at least q2 + q + 2 q2 − q − (q − 1) = (q − 1)(q + 1) 2 2   cosets of deep holes of the form u a+bx+cx2 , 0 + C. (q − 1) p(x) We have already seen that the number2 of cosets of deep holes in Theorem 1.8 |{(uf , v) + C | deg(f ) = k, v ∈ Fq }| = q(q − 1). So there are at least (q − 1)(q + 1) − (q − 1)q = q − 1   cosets of deep holes of the form u a+bx+cx2 , 0 + C besides the deep p(x) holes in Theorem 3.6 and Theorem 1.8.  Next we study the relationship between deep holes in Theorem 5.1 and the deep holes in Theorems 3.6 for k = q − 3. This problem is related to the distribution problem of irreducible polynomials which has been studied extensively in number theory (see [23] and [6]). However, the lower bound in the references is vacuous in our situation. To overcome the difficulty, we use the method in [23] to give an explicit formula for the distribution of irreducible cubic polynomials. 2Indeed, for fixed p(x) = x3 +αx2 + βx + γ one can show only (uexk −eαxk−1 , 0) + C, e ∈ F∗q can be represented by mod p(x). u a+bx+cx2 , 0 +C where a+bx+cx2 ≡ −e(xq −x) p(x) EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 27 Lemma 5.2 (Distribution of irreducible cubic polynomials). For any non-zero polynomial a + bx ∈ Fq [x] and any monic irreducible polynomial q(x) ∈ Fq [x] of degree 2, there exists a monic irreducible polynomial p(x) ∈ Fq [x] of degree 3 such that for some l ∈ F∗q . p(x) ≡ l(a + bx) mod q(x) Proof. Let G = (Fq [x]/(q(x)))∗ . This is just the multiplicative group of the quadratic extension of the field Fq . For α ∈ G, let N3 (α) denote the number of pairs (p(x), l) such that p(x) ∈ Fq [x] is monic irreducible of degree 3, l ∈ F∗q and p(x) ≡ lα mod q(x). We want to show that N3 (α) > 0. In fact, we will give a simple explicit formula for N3 (α) which immediately imply that N3 (α) > 0. Let Ĝ be the complex character group of G, which is the cyclic group of order q 2 − 1. Let Ĝ1 denote the subgroup of Ĝ consisting of those characters whose restriction to F∗q is trivial. It is clear that Ĝ1 is a cyclic group of order q + 1. Let πk denote the set of monic irreducible polynomials of degree k in Fq [x]. A standard character sum argument shows that 1 X X X p(x) N3 (α) = 2 χ( ). q −1 lα ∗ l∈F p(x)∈π 3 q χ∈Ĝ P −1 If χ 6∈ Ĝ1 , then l∈F∗q χ(l ) = 0. It follows that p(x) q−1 X X χ( ) 2 q −1 ˆ α p(x)∈π 3 χ∈G1   3 X X 1 q − q χ(p(x)) . + χ−1 (α) = q+1 3 ˆ N3 (α) = χ∈G1 \{1} p(x)∈π3 Now χ is a nontrivial character of G which is trivial on F∗q . For positive integers k, consider the character sums and their L-function ∞ X X X Sk (χ) k k/d dχ(p(x) ), L(χ, T ) = exp( Sk (χ) = T ). k k=1 d|k p(x)∈πd By [23], the L-function L(χ, T ) of χ is a polynomial of degree 1 with the trivial factor 1 − T . This can also be proved directly. It follows that L(χ, T ) = 1 − T and Sk (χ) = −1 for all k. Taking k = 3, we obtain X χ(p(x)) + S1 (χ3 ). −1 = S3 (χ) = 3 p(x)∈π3 28 JUN ZHANG AND DAQING WAN If χ3 6= 1, then S1 (χ3 ) = −1 and we deduce X χ(p(x)) = 0 p(x)∈π3 If χ3 = 1, then χ = χ3 is a primitive character of order 3 trivial on Fq (necessarily q ≡ 2 mod 3), then S1 (χ3 ) = q and X q+1 . χ(p(x)) = − 3 p(x)∈π3 Putting the above together, we deduce the following result. If q 6≡ 2 mod 3, then N3 (α) = q(q − 1)/3. If q ≡ 2 mod 3, then 1 N3 (α) = (q(q − 1) − (χ3 (α) + χ−1 3 (α))). 3 In summary, we have 1 N3 (α) = (q(q − 1) − r3 (α)), 3 where r3 (α) = 0 if q 6≡ 2 mod 3, r3 (α) = −1 if q ≡ 2 mod 3 and χ3 (α) 6= 1, and r3 (α) = 2 if q ≡ 2 mod 3 and χ3 (α) = 1.  Theorem 5.3. Let q be a prime power and let k = q − 3. The deep holes in Theorem 3.6 are contained in deep holes in Theorem 5.1. Proof. Let C = P RS(q + 1, k). For any coset of deep holes in Theorem 3.6   u d+ex , 0 + C q(x) where q(x) is a monic irreducible quadratic polynomial and d + ex is non-zero, by Lemma 5.2 there is a monic irreducible polynomial p(x) of degree 3 such that l(xq − x) mod q(x) p(x) ≡ d + ex for some l ∈ F∗q . Let −l(xq − x) mod p(x). q(x) Then one can show that there is a polynomial f (x) ∈ Fq [x] of degree ≤ k − 2 such that d + ex a + bx + cx2 = + f (x) ∀x ∈ Fq . p(x) q(x) So     a + bx + cx2 ≡ u d+ex , 0 + C = q(x) u a+bx+cx2 , 0 + C. p(x) EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 29  The theorem below shows that the deep holes constructed from monic irreducible cubic polynomials contain the deep holes of degree k. Theorem 5.4. Let q be a prime power and let k = q − 3. The deep holes in Theorem 1.8 are contained in deep holes in Theorem 5.1. Proof. Let C = P RS(q + 1, k). For any coset of deep holes (uf , v) + C in Theorem 1.8, wlog, we may assume f (x) = xk − wxk−1 , as (uxi , 0) ∈ P RS(q + 1, k) for all 0 ≤ i ≤ k − 2 and any non-zero scale multiple of a deep hole is still a deep hole. Let Then we have g(x) = f (x) − vxk−1 = xk − (w + v)xk−1 . d((ug , 0), P RS(q + 1, k)) = d((uf , v), P RS(q + 1, k)). By theorems in [23] and [12] (also see [6, Theorem 2.7]), there exists a monic irreducible polynomial p(x) ∈ Fq [x] with x2 -coefficient w + v. Since xq − x is coprime to p(x), we have a + bx + cx2 ≡ −(xq − x) mod p(x) is non-zero. So there exists some polynomial h(x) ∈ Fq [x] of degree ≤ k − 2 such that (g(x) − h(x))p(x) = a + bx + cx2 + xq − x, which is also equivalent to a + bx + cx2 + h(x) g(x) = p(x) ∀x ∈ Fq . So any coset in {(uf , v) + C | deg(f ) = k, v ∈ Fq } can be written as   u a+bx+cx2 , 0 + C p(x) for some monic irreducible polynomial p(x) ∈ Fq [x] of degree 3 and some non-zero polynomial a + bx + cx2 ∈ Fq [x].  Remark 5.5. (1) It is natural to ask that in the case k = q − 3 if deep holes constructed from all irreducible polynomials of degree 3 are all the deep holes of P RS(q + 1, q − 3). For small q, using mathematical software, e.g., SageMath [7], one could count the number of cosets of deep holes constructed from irreducible poly 3  q 2 nomials of degree 3 and verify if it equals (q − 1) 2 + q + 2q . 30 JUN ZHANG AND DAQING WAN The experiment result would suggest that the deep holes constructed from irreducible polynomials of degree 3 are not complete for prime power q ≥ 8. (2) An open problem is to count the number of cosets of deep holes constructed in Theorem 5.1 when the construction runs over all the irreducible polynomials of degree 3 and find all the deep holes of P RS(q + 1, q − 3). Acknowledgement Part of this paper was written when the two authors were visiting Beijing International Center for Mathematical Research (BICMR). The authors would like to thank Prof. Ruochuan Liu for his hospitality. Part of this paper was written when the first author was visiting University of Oklahoma. He would like to thank Prof. Qi Cheng for his hospitality. References [1] A. Cafure, G. Matera, and M. Privitelli, “Singularities of symmetric hypersurfaces and an application to Reed-Solomon codes,” Advances in Mathematics of Communications, vol. 6, no. 1, 2011. [2] Q. Cheng and E. Murray, “On deciding deep holes of Reed-Solomon codes,” Lecture Notes in Computer Science, vol. 4484, pp. 296–305, 2007. [3] Q. Cheng and D. Wan, “On the list and bounded distance decodability of Reed-Solomon codes,” SIAM Journal on Computing, vol. 37, no. 1, pp. 195– 209, 2007. [4] G. Cohen, M. Karpovsky, H. Mattson, and J. Schatz, “Covering radius—survey and recent results,” IEEE Transactions on Information Theory, vol. 31, no. 3, pp. 328–343, 1985. [5] G. Cohen, A. C. Lobstein, and N. Sloane, “Further results on the covering radius of codes,” IEEE Transactions on Information Theory, vol. 32, no. 5, pp. 680–694, 1986. [6] S. D. Cohen, “Explicit theorems on generator polynomials,” Finite Fields and Their Applications, vol. 11, no. 3, pp. 337– 357, 2005, ten Year Anniversary Edition! [Online]. Available: http://www.sciencedirect.com/science/article/pii/S107157970500033X [7] T. S. Developers, SageMath, the Sage Mathematics Software System (Version v8.0), 2017, http://www.sagemath.org. [8] A. Dür, “On the covering radius of Reed-Solomon codes,” Discrete Mathematics, vol. 126, no. 1-3, pp. 99–105, 1994. [9] P. Erdös, “Extremal problems in number theory,” Proceedings of the Symp. Pure Math. VIII AMS, pp. 181–189, 1965. [10] E. M. Gabidulin and T. Klove, “The Newton radius of MDS codes,” in Information Theory Workshop, 1998, 1998, pp. 50–51. [11] R. Graham and N. Sloane, “On the covering radius of codes,” IEEE Transactions on Information Theory, vol. 31, no. 3, pp. 385–401, 1985. EXPLICIT DEEP HOLES OF REED-SOLOMON CODES 31 [12] K. H. Ham and G. L. Mullen, “Distribution of irreducible polynomials of small degrees overn finite fields,” Mathematics of Computation, vol. 67, no. 221, pp. 337–341, 1998. [13] T. Helleseth, T. Klove, and J. Mykkeltveit, “On the covering radius of binary codes (corresp.),” IEEE Transactions on Information Theory, vol. 24, no. 5, pp. 627–628, 1978. [14] K. Kaipa, “Deep holes and MDS extensions of Reed-Solomon codes.” IEEE Transactions on Information Theory, vol. PP, no. 99, pp. 1–1, 2017. [15] M. Keti and D. Wan, “Deep holes in Reed-Solomon codes based on Dickson polynomials,” Finite Fields and Their Applications, vol. 40, no. C, pp. 110–125, Jul. 2016. [16] J. Li and D. Wan, “On the subset sum problem over finite fields,” Finite Fields and Their Applications, vol. 14, no. 4, pp. 911–929, 2008. [17] Y. Li and D. Wan, “On error distance of Reed-Solomon codes,” Science in China, vol. 51, no. 11, pp. 1982–1988, 2008. [18] Y. Li and G. Zhu, “On the error distance of extended Reed-Solomon codes.” Advances in Mathematics of Communications, vol. 10, no. 2, 2016. [19] Q. Liao, “On Reed-Solomon codes,” Chinese Annals of Mathematics, no. 1, pp. 89–98, 2011. [20] A. McLoughlin, “The complexity of computing the covering radius of a code,” IEEE Transactions on Information Theory, vol. 30, no. 6, pp. 800–804, 1984. [21] P. R. J. Östergård, “New constructions for q-ary covering codes,” Ars Combinatoria -Waterloo then Winnipeg-, vol. 52, pp. 51–63, 1999. [22] T. Tao and V. Vu, “Sum-avoiding sets in groups,” arXiv preprint arXiv:1603.03068, 2016. [23] D. Wan, “Generators and irreducible polynomials over finite fields,” Mathematics of Computation, vol. 66, no. 219, pp. 1195–1212, 1997. [24] R. Wu and S. Hong, “On deep holes of standard Reed-Solomon codes,” Science China Mathematics, vol. 55, no. 12, pp. 2447–2455, 2012. [25] J. Zhang, F.-W. Fu, and Q. Liao, “New deep holes of generalized Reed-Solomon codes,” Scientia Sinica, vol. 43, no. 7, pp. 727–740, 2013. [Online]. Available: http://arxiv.org/abs/1205.6593 [26] J. Zhang and D. Wan, “On deep holes of projective reed-solomon codes,” 2016 IEEE International Symposium on Information Theory (ISIT), pp. 925–929, 2016. [27] G. Zhu and D. Wan, “Computing error distance of Reed-Solomon codes,” Lecture Notes in Computer Science, vol. 7287, pp. 214–224, 2012. [28] J. Zhuang, Q. Cheng, and J. Li, “On determining deep holes of generalized Reed-Solomon codes,” IEEE Transactions on Information Theory, vol. 62, no. 1, pp. 199–207, Jan 2016. Jun Zhang, School of Mathematical Sciences, Capital Normal University, Beijing 100048, P.R. China. E-mail address: [email protected] Daqing Wan is with Department of Mathematics, University of California, Irvine, CA 92697, USA. E-mail address: [email protected]
7cs.IT
The information bottleneck and geometric clustering DJ Strouse∗ & David J. Schwab† arXiv:1712.09657v1 [stat.ML] 27 Dec 2017 December 29, 2017 Abstract The information bottleneck (IB) approach to clustering takes a joint distribution P (X, Y ) and maps the data X to cluster labels T which retain maximal information about Y (Tishby et al., 1999). This objective results in an algorithm that clusters data points based upon the similarity of their conditional distributions P (Y | X). This is in contrast to classic “geometric clustering” algorithms such as k-means and gaussian mixture models (GMMs) which take a set of observed data points {xi }i=1:N and cluster them based upon their geometric (typically Euclidean) distance from one another. Here, we show how to use the deterministic information bottleneck (DIB) (Strouse and Schwab, 2017), a variant of IB, to perform geometric clustering, by choosing cluster labels that preserve information about data point location on a smoothed dataset. We also introduce a novel intuitive method to choose the number of clusters, via kinks in the information curve. We apply this approach to a variety of simple clustering problems, showing that DIB with our model selection procedure recovers the generative cluster labels. We also show that, for one simple case, DIB interpolates between the cluster boundaries of GMMs and k-means in the large data limit. Thus, our IB approach to clustering also provides an information-theoretic perspective on these classic algorithms. 1 Introduction Unsupervised learning is a crucial component of building intelligent systems (LeCun, 2016), since such systems need to be able to leverage experience to improve performance even in the absence of feedback. One aspect of doing so is discovering discrete structure in data, a problem known as clustering (MacKay, 2002). In the typical setup, one is handed a set of data points {xi }N i=1 , and asked to return a mapping from data point label i to a finite set of cluster labels c. The most basic approaches include k-means and gaussian mixture models (GMMs). GMMs cluster data based on maximum likelihood fitting of a probabilistic generative model. k-means can either be thought of as directly clustering data based on geometric (often Euclidean) distances between data points, or as a special case of GMMs with the assumptions of evenly sampled, symmetric, equal variance components. ∗ † Department of Physics, Princeton University Initiative for the Theoretical Sciences, CUNY Graduate Center 1 The information bottleneck (IB) is an information-theoretic approach to clustering data X that optimizes cluster labels T to preserve information about a third “target variable” of interest Y . The resulting (soft) clustering groups data points based on the similarity in their conditional distributions over the target variable through the KL divergence, KL[p(y | xi ) | p(y | xj )]. An IB clustering problem is fully specified by the joint distribution P (X, Y ) and the tradeoff parameter β quantifying the relative preference for fewer clusters and more informative ones. At first glance, it is not obvious how to use this approach to cluster geometric data, where the input is a set of data point locations {xi }N i=1 . For example, what is the target variable Y that our clusters should retain information about? What should P (X, Y ) be? And how should one choose the tradeoff parameter β? Still et al. (2003) were the first to attempt to do geometric clustering with IB, and claimed an equivalence (in the large data limit) between IB and k-means. Unfortunately, while much of their approach is correct, it contained some fundamental errors that nullify the main results. In the next section, we describe those errors and how to correct them. Essentially, their approach did not properly translate geometric information into a form that could be used correctly by an information-theoretic algorithm. In addition to fixing this issue, we also choose to use a recently introduced variant of the information bottleneck called the deterministic information bottleneck (DIB) (Strouse and Schwab, 2017). We make this choice due to the different way in which IB and DIB use the number of clusters provided to them. IB is known to use all of the clusters it has access to, and thus clustering with IB requires a search both over the number of clusters Nc as well as the the parsimony-informativeness tradeoff parameter β (Slonim et al., 2005). DIB on the other hand has a built-in preference for using as few clusters as it can, and thus only requires a parameter search over β. Moreover, DIB’s ability to select the number of clusters to use for a given β leads to a intuitive model selection heuristic based on the robustness of a clustering result across β that we show can recover the generative number of clusters in many cases. In the next section, we more formally define the geometric clustering problem, the IB approach of Still et al. (2003), and our own DIB approach. In section 3, we show that our DIB approach to geometric clustering behaves intuitively and is able to recover the generative number of clusters with only a single free parameter (the data smoothing scale s). In section 4, we discuss the relationship between our approach and GMMs and k-means, proving that at least in one simple case, DIB interpolates between GMM and k-means cluster boundaries by varying the data smoothing scale s. Our approach thus provides a novel information-theoretic approach to geometric clustering, as well as an information-theoretic perspective on these classic clustering methods. 2 Geometric clustering with the (deterministic) information bottleneck In a geometric clustering problem, we are given a set of N observed data points {xi }i=1:N and asked to provide a weighting q(c | i) that categorizes data points into (possibly multiple) clusters such that data points “near” one another are in the same cluster. The definition of 2 “near” varies by algorithm: for k-means, for example, points in a cluster are closer to their own cluster mean than to any other cluster mean. In an information bottleneck (IB) problem, we are given a joint distribution P (X, Y ) and asked to provide a mapping q(t | x) such that T contains the “relevant” information in X for predicting Y . This goal is embodied by the information-theoretic optimization problem: ∗ (t | x) = argmin I(X, T ) − βI(T, Y ) , qIB (1) q(t|x) subject to the Markov constraint T ↔ X ↔ Y . β is a free parameter that allows for setting the desired balance between the compression encouraged by the first term and the relevance encouraged by the second; at small values, we throw away most of X in favor of a succint representation for T , while for large values of β, we retain nearly all the information that X has about Y . This approach of squeezing information through a latent variable bottleneck might remind some readers of a variational autoencoder (VAE) (Kingma and Welling, 2013), and indeed IB has a close relationship with VAEs. As pointed out by Alemi et al. (2016), a variational version of IB can essentially be seen as the supervised generalization of a VAE, which is typically an unsupervised algorithm. We are interested in performing geometric clustering with the information bottleneck. For the purposes of this paper, we will focus on a recent alternative formulation of the IB, called the deterministic information bottleneck (DIB) (Strouse and Schwab, 2017). We do this because the DIB’s cost function more directly encourages the use of as few clusters as clusters, it will typically converge to a solution with far possible, so initialized with nmax c fewer. Thus, it has a form of model selection built in that will prove useful for geometric clustering (Strouse and Schwab, 2017). IB, on the other hand, will tend to use all nmax c clusters, and thus requires an additional search over this parameter (Slonim et al., 2005). DIB also differs from IB in that it leads to a hard clustering instead of a soft clustering. Formally, the DIB setup is identical to that of IB except that the mutual information term I(X; T ) in the cost functional is replaced with the entropy H(T ): ∗ qDIB (t | x) = argmin H(T ) − βI(T, Y ) . (2) q(t|x) This change to the cost functional leads to a hard clustering with the form (Strouse and Schwab, 2017): ∗ qDIB (t | x) = δ(t − t∗ (x)) t∗ = argmax log q(t) − βd(x, t) (3) (4) t d(x, t) ≡ KL[p(y | x) | q(y | t)] X q(t) = q(t | x) p(x) (5) (6) x q(y | t) = 1 X q(t | x) p(x) p(y | x) , q(t) x 3 (7) where the above equations are to be iterated to convergence from some initialization. The IB solution (Tishby et al., 1999) simply replaces the first two equations with: ∗ qIB (t | x) = q(t) −βd(x,t) e , Z(x, β) (8) which can be seen as replacing the argmax in DIB with an exponential and a soft max. The (D)IB is referred to as a “distributional clustering” algorithm (Slonim and Tishby, 2001) due to the KL divergence term d (x, t) = KL[p(y | x) | q(y | t)], which can be seen as measuring how similar the data point conditional distribution P p(y | x) is to the cluster conditional, or mixture of data point conditionals, q(y | t) = x q(x | t) p(y | x). That is, 0 a candidate point x will be assigned to a cluster based upon how similar its conditional  0 p y | x is to the conditionals p(y | x) for the data points x that make up that cluster. Thus, both DIB and IB cluster data points based upon the conditionals p(y | x). To apply (D)IB to a geometric clustering problem, we must choose how to map the geometric clustering dataset {xi }i=1:N to an appropriate IB dataset P (X, Y ). First, what should X and Y be? Since X is the data being clustered by IB, we’ll choose that to be the data point index i. As for the target variable Y that we wish to maintain information about, it seems reasonable to choose the data point location x (though we will discuss alternative choices later). Thus, we want to cluster data indices i into cluster indices c in a way that maintains as much possible info about the location x as possible (Still et al., 2003). Now, how should we choose the joint distribution p(i, x) = p(x | i) p(i)? At first glance, one might choose p(x | i) = δxxi , since data point i was observed at location xi . The reason not to do this lies with the fact that (D)IB is a distributional clustering algorithm, as discussed two paragraphs above. Data points are compared to one another through their conditionals p(x | i), and with the choice of a delta function, there will be no overlap unless two data points are on top of one another. That is, choosing p(x | i) = δxxi leads to a KL divergence that is either infinite for data points at different locations, or zero for data points that lie exactly on top of one another, i.e. KL[p(x | i) | p(x | j)] = δxi xj . Trivially, the resulting clustering would assign each data point to its own cluster, grouping only data points that are identical. Put another way, all relational information in an IB problem lies in the joint distribution P (X, Y ). If one wants to perform geometric clustering with an IB approach, then geometric information must somehow be injected into that joint distribution, and a series of delta functions does not do that. A previous attempt at linking IB and kmeans made this mistake (Still et al., 2003). Subsequent algebraic errors were tantamount to incorrectly introducting geometric information into IB, precisely in the way that such geometric information appears in k-means, and resulting in an algorithm that is not IB. We describe these errors in more detail in an appendix (section 6). Based on the problems identified with using delta functions, a better choice for the conditionals is something spatially extended, such as:   1 (9) p(x | i) ∝ exp − 2 d(x, xi ) , 2s where s sets the geometric scale or units of distance, and d is a distance metric, such as the Euclidean distance d(x, xi ) = kx − xi k2 . If we indeed use the Euclidean distance, then 4 data point index, i data point location, x Figure 1: Illustration of data smoothing procedure. Example dataset with one symmetric and one skew cluster. Top row : scatterplot of data points with smoothed probability distribution overlaid. Bottom row : heat map of the joint distribution P (i, x) that is fed into DIB. The two spatial dimensions in the top row are binned and concatenated into a single dimension (on the horizontal axis) in the bottom row, which is the source of the “striations.” p(x | i) will be (symmetric) gaussian (with variance s2 ), and this corresponds to gaussian smoothing our data. In any case, the obvious choice for the marginal is p(i) = N1 , where N is the number of data points, unless one has a reason a priori to favor certain data points over others. These choices for p(i) and p(x | i) determine completely our dataset p(i, x) = p(x | i) p(i). Figure 1 contains an illustration of this data smoothing procedure. We will explore the effect of the choice of smoothing scale s throughout this paper. With the above choices, we have a fully specified DIB formulation of a geometric clustering problem. Using our above notational choices, the equations for the nth step in the iterative DIB solution is (Strouse and Schwab, 2017): c∗(n) (i) = argmax log q (n−1) (c) − βdn (i, c) c   dn (i, c) ≡ KL p(x | i) | q (n) (x | c)  q (n) (c | i) = δ c − c∗(n) (i) q (n) (c) = q (n) (x | c) = (10) (11) (12) (n) nc N X (13) q (n) (i | c) p(x | i) (14) i = 1 (n) nc (n) where nc X p(x | i) , (15) i:c∗(n) (i)=c (n) the number of data points assigned to cluster c at step n, nc 5 ≡ N q (n) (c) = q (n) (c | i) = i : c∗(n) (i) = c . Note that this solution contains β as a free parameter. As discussed above, it allows us to set our preference between solutions with fewer clusters and those that retain more spatial information. It is common in the IB literature to run the algorithm for multiple values of β and to plot the collection of solutions in the “information plane” with the relevance term I(Y ; T ) on the y-axis and the compression term I(X; T ) on the x-axis (Palmer et al., 2015; Creutzig et al., 2009; Chechik et al., 2005; Slonim et al., 2005; Still and Bialek, 2004; Tishby and Zaslavsky, 2015; Rubin et al., 2016; Strouse and Schwab, 2017; Ravid and Tishby, 2017). The natural such plane for the DIB is with the relevance term I(Y ; T ) on the y-axis and its compression term H(T ) on the x-axis (Strouse and Schwab, 2017). The curve drawn out by (D)IB solutions in the information plane can be viewed as a Pareto-optimal boundary of how much relevant information can be extracted about Y given a fixed amount of information about X (IB) or representational capacity by T (DIB) (Strouse and Schwab, 2017). Solutions lying below this curve are of course suboptimal, but a priori, the (D)IB formalism doesn’t tell us how to select a single solution from the family of solutions lying on the (D)IB boundary. Intuively however, when faced with a boundary of Pareto-optimality, if we must pick one solution, its best to choose one at the “knee” of the curve. Quantitatively, the “knee” of the curve is the point where the curve has its maximum magnitude second derivative. In the most extreme case, the second derivative is infinite when there is a “kink” in the curve, and thus the largest kinks might correspond to solutions of particular interest. In our case, since the slope of the (D)IB curve at any given solution is β −1 (which can be read off from the cost functionals), kinks indicate solutions that are valid over a wide range of β. So large kinks also correspond to robust solutions, in the sense that they optimize a wide range of (D)IB tradeoffs. Quantitatively, we can measure the size of a kink by the angle θ of the discontinuity it causes in the slope of the curve; see figure 2 for details. We will show in the next section that searches for solutions with large θ result in recovering the generative cluster labels for geometric data, including the correct number of clusters. Note that this model selection procedure would not be possible if we had chosen to use IB instead of DIB. IB uses all the clusters available to it, regardless of the choice of β. Thus, all solutions on the curve would have the same number of clusters anyway, so any knees or kinks cannot be used to select the number of clusters. P i 6 m 1 in DIB informativeness term, I(c, x) ✓ 1 max DIB compression term, H(c) Figure 2: “Kinks” in DIB information curve as model selection. βmin and βmax are −1 −1 the smallest and largest β at which the solution at the kink is valid. Thus, βmin and βmax are π the slopes of upper and lower dotted lines. The “kink angle” is then θ = 2 − arctan(βmin ) − −1 ). It is a measure of how robust a solution is to the choice of β; thus high values arctan(βmax of θ indicate solutions of particular interest. 3 Results: geometric clustering with DIB We ran the DIB as described above on four geometric clustering datasets, varying the smoothing width s (see eqn 9) and tradeoff parameter β, and measured for each solution the ˜ x) = I(c;x) 1 and the number of clusters used nc fraction of spatial information extracted I(c; I(i;x) , as well as the kink angle θ. We iterated the DIB equations above just as in Strouse and Schwab (2017) with one difference. Iterating greedily from some initialization can lead to local minima (the DIB optimization problem is non-convex). To help overcome suboptimal solutions, upon convergence, we checked whether merging any two clusters would improve the value L of the cost functional in eqn 2. If so, we chose the merging with the highest such reduction, and began the iterative equations again. We repeated this procedure until the algorithm converged and no merging reduced the value of L. We found that these “non-local” steps worked well in combination with the greedy “local” improvements of the DIB iterative equations. While not essential to the function of DIB, this improvement in performance produced cleaner information curves with less “noise” caused by convergence to local minima. Results are shown in figure 3. Each large row represents a different dataset. The left ˜ x) versus number of clusters used nc , stacked column shows fractional spatial information I(c; 2 by smoothing width s. The center column shows the kink angle θ for each cluster number nc , again stacked by smoothing width s. Finally, the right column shows example solutions. In general, note that as we increase β, we move right along the plots in the left column, ˜ x). Not that is towards higher number of clusters nc and more spatial information I(c; all values of nc are present because while varying the implicit parameter β, DIB will not 1 Note that I(i; x) is an upper bound on I(c; x) due to the data processing inequality,(Cover and Thomas, ˜ x) is indeed the fraction of potential geometric information extracted from the smoothed P (i, x). 2006) so I(c; 2 Note that this is not the same as the information plane curve from figure 2. While the y-axes are the same (up to the normalization), the x-axes are different. 7 smoothing s ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 ● 4 ● 8 4 8 12 16 5 5 ● ● ● ● ●● ● ● ● ●● ● ●● ● ●●● ● ● ● ●●● ● ● ● ● −5 −5 0 2 4 6 8 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 1 ● ● ● ● ● ● ● 4 8 12 16 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 4 8 12 16 2 4 6 8 ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●●● ● 20 10 0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 4 8 # of clusters, nc ● 10 ● ●● ● ● ● ●● ● ● ●●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● 10 nc = 4 5 5 0 0 0 nc = 5 ● ●● ● ● ● ●● ● ● ●●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● 10 5 ● ● ●● ●● ●● ● ● ● ●●● ● ●● ● −10 ● ● ●●●● ● ● ● ● ●● ●● ● ● ● ● ● ● −5 2 4 6 10 ● ●● ● ● ● ●● ● ● ●●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● 5 0 ● ●● ● ●● ●● ● ●●● ● ● ● ●● ●● −5 ● ● ●● ●● ●● ● ● ● ●●● ● ●● ● −10 ● 5 ● ●●●● ● ● ● ● ●● ●● ● ● ● ● ● ● −5 0 ● ●● ● ●● ●● ● ●●● ● ● ● ●● ●● −5 0 ● ● ●● ●● ●● ● ● ● ●●● ● ●● ● −10 ● 5 ● ●● ● ●● ●● ● ●●● ● ● ● ●● ●● ● ●●●● ● ● ● ● ●● ●● ● ● ● ● ● ● −5 0 ● ●● ● ●● ●● ● ●●● ● ● ● ●● ●● −5 ● ● ●● ●● ●● ● ● ● ●●● ● ●● ● −10 ● 5 ● ●●●● ● ● ● ● ●● ●● ● ● ● ● ● ● −5 0 5 8 12 16 40 30 20 10 0 40 30 20 10 0 40 30 20 10 0 40 30 20 10 0 nc = 6 10 nc = 12 10 ● ● 0 −5 ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 5 ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● 5 ● 0 −5 ● 8 8 0 10 4 0 1 ● ● ● kink angle, θ (deg) ● ● 4 ● 0 nc = 3 ● ●● ● ● ● ●● ● ● ●●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● 2 ● ● 2 ● ● ● ● ● ● −10 −5 1 1 ~ spatial information, I (c, x) ● 0 1 ● ●● nc = 2 20 10 0 ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ●● ● # of clusters, nc 1 ● ● ● ● ● ● # of clusters, nc 0 1 ●● 0 8 8 0 10 nc = 3 ● ●●● ● ● ● ● ● ●●● ● ● ● ●●● ● ● ● ● 20 10 0 20 10 0 0 4 ● 4 0 1 4 ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ●● ● ● −10 2 0 1 ● 2 ● kink angle, θ (deg) ● ● ● ● ● ●● ● 1 0 1 10 ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●●● ● −4 # of clusters, nc 1 ~ spatial information, I (c, x) ● ● 5 ● ● −4 ● 0 0 # of clusters, nc 1 −5 nc = 2 ● ●●● ● ● ● ● ● ●●● ● ● ● ●●● ● ● 8 8 0 10 4 4 0 1 20 15 10 5 0 20 15 10 5 0 20 15 10 5 0 20 15 10 5 0 2 ● kink angle, θ (deg) ● 2 ~ spatial information, I (c, x) ● 5 ● ● 1 0 1 ● ● ●● ● ●●●●● ●● ● ●● ● ● ●● ●● ●● ● ●●●● ● ● ● −10 −5 # of clusters, nc 1 ● 0 ● ●● ● ●●●●● ●● ● ●● ● ● ●● ●● ●● ● ●●●● ● ● ● −10 4 ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●●● ● ● ● ●●● ● ● ● ● ● 0 # of clusters, nc 1 nc = 4 ● ● ●● ● ●● ● ●● ●● ●●●● ●● ● ● ●● ● ● ●● ●● ●● 10 8 0 1 ● nc = 3 ● ● ●● ● ●● ● ●● ●● ●●●● ●● ● ● ●● ● ● ●● ●● ●● 10 4 ● smoothing s 30 20 10 0 30 20 10 0 30 20 10 0 30 20 10 0 2 2 0 1 kink angle, θ (deg) ● 1 0 1 ● 1 ~ spatial information, I (c, x) 1 ● −10 −10 2 4 6 −5 ● ● ● ● −10 0 5 10 −10 −5 ● ● 0 5 8 # of clusters, nc Figure 3: Results: model selection and clustering with DIB. Results for four datasets. Each row represents a different dataset. Left column: fraction of spatial information ex˜ x) = I(c;x) , versus number of clusters used, nc , across a variety of smoothing tracted, I(c; I(i;x) scales, s. Center column: kink angle θ (of the I(c; x) vs H(c) curve) versus number of clusters used, nc , across a variety of smoothing scales, s. Right column: example resulting clusters. 8 10 necessarily “choose” to use all possible cluster numbers. For example, for small smoothing width s, most points won’t have enough overlap in p(x | i) with their neighbors to support solutions with few clusters, and for large smoothing width s, local spatial information is thrown out and only solutions with few clusters are possible. More interestingly, DIB may retain or drop solutions based on how well they match the structure of the data, as we will discuss for each dataset below. Additionally, solutions that match well the structure in the data (for example, ones with nc matched to the generative parameters) tend to be especially robust to β, that is they have a large kink angle θ. Thus, θ can be used to perform model selection. For datasets with structure at multiple scales, the kink angle θ will select different solutions for different values of the smoothing width s. This allows us to investigate structure in a dataset at a particular scale of our choosing. We now turn to the individual datasets. The first dataset (top large row) consists of 3 equally spaced, equally sampled symmetric gaussian clusters (see solutions in right column). We see that the 3-cluster solution stands out in several ways. First, it is robust to spatial scale s. Second, the 3-cluster solution extract nearly all of the available spatial information; solutions with nc ≥ 4 extract little ˜ x). Third and perhaps most salient, the 3-cluster solution has by far the largest extra I(c; value of kink angle θ across a wide range of smoothing scales. In the right column, we show examples of 3 and 4-cluster solutions. Note that while all 3-cluster solutions look exactly like this one, the 4-cluster solutions vary in how they chop one true cluster into two. The second dataset (second row) consists of 3 more equally sampled symmetric gaussian clusters, but this time not equally spaced; two are much closer to one another than the third. This is a dataset with multiple scales present, thus we should expect that the number of clusters picked out by any model selection procedure, e.g. kink angle, should depend on the spatial scale of interest. Indeed, we see that to be true. The 3-cluster solution is present for all smoothing widths shown, but is only selected out as the best solution by kink angle for intermediate smoothing widths (s = 2). For large smoothing widths (s = 8), we see that the 2-cluster solution is chosen as best. For smoothing widths in between (s = 4), the 2 and 3-cluster solutions are roughly equally valid. In terms of spatial information, the 2 and 3-cluster solutions are also prominent, with both transitions from nc = 1 → 2 and ˜ x) (but little improvement for more nc = 2 → 3 providing significant improvement in I(c; fine-grained clusterings). The third dataset (third row) features even more multi-scale structure, with 5 symmetric, equally sampled gaussians, again with unequal spacing. Sensible solutions exist for nc = 2−5, ˜ x) and this can be seen by the more gradual rise of the fractional spatial information I(c; with nc in that regime. We also again see a transition in the model selection by θ from the 5-cluster solution at small smoothing widths (s = 1, 2) and the 2-cluster solution at larger smoothing widths (s = 8), with intermediate nc favoring those and intermediate solutions. Example clusters for nc = 2 − 5 are shown at right. Finally, we wanted to ensure that DIB and our model selection procedure would not halluscinate structure where there is none, so we applied it to a single gaussian blob, with the hope that no solution with nc > 1 would stand out and prove robust to β. As can be seen in the fourth row of figure 3, that is indeed true. No solution at any smoothing width had ˜ x) versus particuarly high kink angle θ, and no solution remained at the “knee” of the I(c; nc curve across a wide range of smoothing widths. Overall, these results suggest that DIB on smoothed data is able to recover generative 9 geometric structure at multiple scales, using built-in model selection procedures based on identifying robust, spatially informative solutions. 4 Results: DIB vs GMMs & k-means Here we show that in the limit of infinite data and small smoothing scale s, the behavior of (D)IB is intimately related to the hard cluster boundaries implied by GMMs. We assume we have one gaussian cluster centered at µ1 = (0, 0) with covariance Σ1 = diag(σ1 , σ2 ), and a second gaussian cluster centered at µ2 = (L, 0) with covariance Σ2 = diag(σ, σ). If we have a mixture model with weights w1 and w2 , then the hard maximum likelihood boundary between these two clusters in the (x1 , x2 ) plane is given by: x22 x21 + + log σ1 σ2 2σ12 2σ22  1 T2 ≡ x21 + x22 + L2 − 2Lx1 2σ2 log w1 − T1 = log w2 − T2 . T1 ≡ On the other hand, the (D)IB algorithm would classify a new test point at location (x1 , x2 ) gaussian smoothed by s based on the KL divergence between its smoothed distribution and the two cluster gaussians:   2 x22 k σ1 σ2 x21 σ1 + σ22 2 + − + log 2 (16) + KL1 = s 2 2 2 2 2σ1 σ2 2σ1 2σ2 2 s  k s2 1 σ2 KL2 = 2 + 2 (x1 − L)2 + x22 − + log 2 , (17) σ 2σ 2 s where k = 2 is the number of dimensions. The boundary implied by DIB is found by setting: log w1 − βKL1 = log w2 − βKL2 . (18) Notice that for small smoothing width s → 0 and either β = 1 or evenly sampled clusters w1 = w2 , this is identical to the hard boundary implied by the GMM. For β > 1, w1 6= w2 , and small smoothing width, we see that, compared with a GMM, DIB encourages capturing more information about spatial location at the expense of using clusters more equally. 1 Put another way, the effect of the cluster prior term log w is reduced by pulling it closer w2  1/β 1 to zero, i.e. replacing it with log w . This provides an interesting information theow2 retic interpretation of GMMs and also shows the manner in which clustering with DIB is a generalization. To see the effect of larger smoothing widths, we compared the numerically calculated DIB, GMM, and k-means cluster boundaries for the “true” assignments with nc = 2 over a range of smoothing widths (see figure 4). The data consisted of 1000 points sampled equally (w1 = w2 ) from one isotropic and one skew gaussian as shown. We can see that for small smoothing widths, the DIB boundary indeed approaches that of the GMM. For larger 10 smoothing widths, the effect of the “shape” of the clusters is muted and the DIB boundary approaches k-means. Note that this is just one particular example however and DIB need not approach k-means in the large s limit in general. 10 ● ● ● ● ●● ●● ● ● ●● ● ●●● ● ●●● ●●● ● ●●● ●● ● ● ●● ● ● ● ●●● ● ● ● ● ●●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●●● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●● ● ●● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ●● ●● ● ● ●● ● ●● ● ●● ● ●●●●● ● ●●● ●●● ● ●● ● ● ● ● ● ● ● ●● boundary ● ● ● ● ● ● 0 ● GMM DIB (s=2) DIB (s=4) DIB (s=8) k−means ●● ● ●● ●● ● ●● ● ●● ● ● ● ●● ● ● ●●● ●● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ●●●● ●●● ● ● ●● ●● ● ●●● ● ● ● ● ●●●●● ●● ● ● ● ●● ● ●● ●● ● ●● ●● ● ● ●● ●● ●●● ● ● ●● ●● ● ●●● ●● ● ●● ●● ●● ● ● ● ● ●● ● ●● ● ● ● ● ●● ●●● ● ●●● ● ● ●● ● ●● ●● ●●●● ●●● ● ● ●●● ● ● ●● ● ● ● ●● ●● ● ●●● ● ● ●●● ● ●● ● ● ● ●● ● ● ●● ● ● ●● ●●● ●●●● ● ●● ●●●● ● ● ● ●● ● ● ● ● ●●● ● ● ● ●●● ●●● ● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ●●●● ●● ●●● ●● ● ● ● ● ●● ● ●●●●● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ●● ●●●● ●● ●● ● ●●● ●●● ● ●● ●●● ● ●●● ● ●● ● ● ●● ●● ●●● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ●●● ● ● ● ●●●●● ● ●● ●●●●● ● ●● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ●●● ● ● ● ●● ● ● ●●●●●● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● −20 −10 0 10 20 Figure 4: Cluster boundaries for different algorithms. Colored lines show boundaries separating two clusters for 3 different algorithms: k-means, GMMs, and DIB with 3 different levels of smoothing. Dataset was 1000 points drawn equally from a single symmetric gaussian and a single skew gaussian. Black points show data. 5 Discussion Here, we have shown how to use the formalism of the information bottleneck to perform geometric clustering. A previous paper (Still et al., 2003) claimed to contribute similarly, however for the reasons discussed in sections 2 and 6, their approach contained fundamental flaws. We amend and improve upon that paper in four ways. First, we show to fix the errors they made in their problem setup (with the data preparation). Second, we argue for using DIB over IB in this setting for its preference for using as few clusters as it can. Third, we introduce a novel form of model selection for the number of clusters based on discontinuities (or “kinks”) in the slope of the DIB curve, which indicate solutions that are robust across the DIB tradeoff parameter β. We show that this information-based model selection criterion allows us to correctly recover generative structure in the data at multiple spatial scales. Finally, we compare the resulting clustering algorithm to k-means and gaussian mixture models (GMMs). We found that for large smoothing width, s, the performance of the method seems to behave similarly to k-means. More interestingly, we found that for small smoothing width, the method behaves as a generalization of a GMM, with a tunable tradeoff between compression and fidelity of the representation. We have introduced one way of doing geometric clustering with the information bottleneck, but we think it opens avenues for other ways as well. First, the uniform smoothing we perform above could be generalized in a number of ways to better exploit local geometry and better estimate the “true” generative distribution of the data. For example, one could do gaussian smoothing with mean centered on each data point but the covariance estimated by the sample covariance of neighboring data points around that mean. Indeed, our early experiments with this alternative suggest it may be useful for certain datasets. Second, while choosing spatial location as the relevant variable for DIB to preserve information about seems to be the obvious first choice to investigate, other options might prove interesting. For ex11 ample, preserving information about the identity of neighbors, if carefully formulated, might make fewer implicit assumptions about the shape of the generative distribution, and enable the extension of our approach to a wider range of datasets. Scaling the approach introduced here to higher-dimensional datasets is non-trivial because the tabular representation used in the original IB (Tishby et al., 1999)and DIB (Strouse and Schwab, 2017) algorithms leads to an exponential scaling with the number of dimensions. Recently, however, Alemi et al. (2016) introduced a variational version of IB, in which one parameterizes the encoder q(t | x) (and “decoder” q(y | t)) with a function approximator, e.g. a deep neural network. This has the advantage of allowing scaling to much larger datasets. Moreover, the choice of parameterization often implies a smoothness constraint on the data, relieving the problem encountered above of needing to smooth the data. It would be interesting to develop a variational version of DIB, which could then be used to perform information-theoretic clustering as we have done here, but on larger problems and perhaps with no need for data smoothing. 6 Appendix: errors in Still et al. (2003) A previous attempt was made to draw a connection between IB and k-means (Still et al., 2003). Even before reviewing the algebraic errors that lead their result to break down, there are two intuitive reasons why such a claim is unlikely to be true. First, IB is a soft clustering algorithm, and k-means is a hard clustering algorithm. Second, the authors made the choice not to smooth the data and to set p(x | i) = δxxi . As discussed in section 2, (D)IB clusters data points based on these conditionals, and delta functions trivially only overlap when they are identical. The primary algebraic mistake appears just after eqn 14, in the claim that pn (x | c) ∝ pn−1 (x | c)1/λ . Combining the previous two claims in that proof, we obtain: pn (x | c) = 1 X δxxi pn−1 (xi | c)1/λ . N i Zn (i, λ) (19) Certainly, this does not imply that pn (x | c) ∝ pn−1 (x | c)1/λ everywhere, because of the δxxi factor which picks out only a finite number of points. One might wonder why with these mistakes, the authors still obtain an algorithm that looks and performs like k-means. The reason is because their sequence of mistakes leads to the result in eqn 15 that effectively assumes that IB has access to geometric information it should not, namely the cluster centers at step n. Since these are exactly what k-means uses to assign points to clusters, it is not surprising that the behavior then resembles k-means. 7 Acknowledgements We would like to thank Léon Bottou for helpful discussions.. We would also like to acknowledge financial support from NIH K25 GM098875 (Schwab) and the Hertz Foundation (Strouse). 12 References Alemi, A. A., Fischer, I., Dillon, J. V., and Murphy, K. (2016). Deep Variational Information Bottleneck. arXiv e-prints. https://arxiv.org/abs/1612.00410. Chechik, G., Globerson, A., Tishby, N., and Weiss, Y. (2005). Information Bottleneck for Gaussian Variables. Journal of Machine Learning Research, 6:165–188. Cover, T. M. and Thomas, J. A. (2006). Elements of Information Theory. Wiley-Interscience. Creutzig, F., Globerson, A., and Tishby, N. (2009). Past-future information bottleneck in dynamical systems. Physical Review E, 79(4):041925–5. Kingma, D. P. and Welling, M. (2013). Auto-Encoding Variational Bayes. arXiv e-prints. https://arxiv.org/abs/1312.6114. LeCun, Y. (2016). Predictive learning. NIPS. MacKay, D. J. C. (2002). Information Theory, Inference, and Learning Algorithms. Cambridge University Press. Palmer, S. E., Marre, O., Berry II, M. J., and Bialek, W. (2015). Predictive information in a sensory population. Proceedings of the National Academy of Sciences, 112(22):6908–6913. Ravid, S. and Tishby, N. (2017). Opening the black box of deep neural networks via information. arXiv e-prints, cs.LG. https://arxiv.org/abs/1703.00810. Rubin, J., Ulanovsky, N., Nelken, I., and Tishby, N. (2016). The representation of prediction error in auditory cortex. PLoS computational biology, 12(8):e1005058–28. Slonim, N., Atwal, G., Tkacik, G., and Bialek, W. (2005). Information-based clustering. Proceedings of the National Academy of Sciences, 102(51):18297–18302. Slonim, N. and Tishby, N. (2001). The Power of Word Clusters for Text Classification. In European Colloquium on Information Retrieval Research. Still, S. and Bialek, W. (2004). How many clusters an information-theoretic perspective. Neural Computation, 16(12):2483–2506. Still, S., Bialek, W., and Bottou, L. (2003). Geometric clustering using the information bottleneck method. NIPS. Strouse, D. and Schwab, D. J. (2017). The Deterministic Information Bottleneck. Neural Computation. Tishby, N., Pereira, F. C., and Bialek, W. (1999). The information bottleneck method. Proceedings of The 37th Allerton Conference on Communication, Control, and Computing, pages 368–377. Tishby, N. and Zaslavsky, N. (2015). Deep Learning and the Information Bottleneck Principle. arXiv e-prints. https://arxiv.org/abs/1703.00810. 13
7cs.IT
1 Bounds on the Capacity of Memoryless Simplified Fiber-Optical Channel Models Kamran Keykhosravi, Student Member, IEEE, arXiv:1708.03102v1 [cs.IT] 10 Aug 2017 Giuseppe Durisi, Senior Member, IEEE, and Erik Agrell, Senior Member, IEEE. Abstract A number of simplified models have been proposed for the fiber-optical channel and have been extensively used in the literature. Although these models are mainly developed for the low-power regime, they are used at moderate or high powers as well. It remains unclear to what extend the capacity of these models is affected by the simplifying assumptions under which they are derived. In this paper, the capacity of three memoryless channel models, which are obtained applying different simplifying assumptions to the same physical fiber-optical channel, is investigated. First, the capacity of a memoryless model that is obtained through a perturbation method is bounded tightly and its capacity pre-log is proven to be 3. Second, a channel model based on the logarithmic perturbation method is considered. The capacity is proven to be log(1 + SNR), where SNR is the signal-to-noise ratio. This implies that the capacity pre-log is one. Third, a memoryless nonlinear Schrödinger channel is studied. The capacity pre-log of this model is known to be 1/2. We establish This work was supported by the Swedish Research Council (VR) under Grant 2013-5271. Part of this work has been accepted for presentation at the 43th European Conference on Optical Communication (ECOC 2017). The authors are with the Department of Electrical Engineering, Chalmers University of Technology, Gothenburg 41296, Sweden (e-mail: [email protected]; [email protected]; [email protected]). March 19, 2018 DRAFT 2 a novel upper bound that confines the capacity of this channel to a much narrower range than the previously known upper bound. Since all three models represent the same physical channel, the fact that each model yields a different capacity pre-log highlights that care must be exercised in using simplified channel models in the high-power regime. Index Terms Achievable rate, information theory, optical fiber, channel capacity, nonlinear channel. I. Introduction The vast majority of the global Internet traffic is conveyed through fiber-optical networks, which form the backbone of our information society. To cope with the growing data demand, the fiber-optical networks have evolved from regenerated direct-detection systems to coherent wavelength division multiplexing (WDM) systems [1]. Newly emerging bandwidth-hungry services, like internet-of-thing applications and cloud processing, require even higher data rates. Motivated by this ever-growing demand, an increasing attention has been devoted in recent years to the analysis of the capacity of the fiber-optical channel. Finding the capacity of the fiber-optical channel that is governed by the generalized nonlinear Schrödinger (NLS) equation [2, Eq. (1)], which captures the effects of Kerr nonlinearity, chromatic dispersion, and amplification noise, remains an open problem. The informationtheoretic analysis of the NLS channel is cumbersome because of a complicated signal–noise interaction caused by the interplay between the nonlinearity and the dispersion. Using the mismatch-decoding framework [3], a number of lower bounds on the capacity of this channel have been developed (see, for example, [4] and [5]). To establish an upper bound, Kramer et al. [6] used the split-step Fourier (SSF) method, which is a standard approach to solve the NLS equation numerically [7, Sec. 2.4.1], to derive a discrete-time channel model. They proved that the capacity of this discrete-time model is upper-bounded by that of an DRAFT March 19, 2018 3 equivalent AWGN channel. In contrast to the available lower bounds, which fall to zero or saturate at high powers, this upper bound, which is the only one available for a realistic fiber channel model, grows unboundedly. Since the information-theoretic analysis of the NLS channel is difficult, to approximate capacity one can resort to simplified models, a number of which have been studied in the literature (see [8] and references therein for a recent review). Two approaches to obtain such models are to use the regular perturbation or the logarithmic perturbation methods. In the former, the effects of nonlinearity are captured by an additive perturbative term [9], [10]. This approach yields a discrete-time channel with input–output relation yl = xl + ∆xl + nl [8, Eq. (5)], where xl and yl are the transmitted and the received symbols, respectively; nl is the amplification noise; and ∆xl is the perturbative nonlinear distortion. This model holds under the simplifying assumption that both the nonlinearity and the signal–noise interaction are weak, which is reasonable at low power. Regular perturbative fiber-optical channel models, with or without memory, have been extensively investigated in the literature. In [11], a first-order perturbative model for WDM systems with arbitrary filtering and sampling demodulation and coherent detection is proposed. Using this model, the authors of [11] show that the impairments in a single WDM channel are highly affected by the modulation used on the neighboring channels. In [12], the influence of four-wave-mixing interference on the capacity of a memoryless simplified perturbative WDM channel is studied for three different statistical models of the nonlinear crosstalk. The authors show that for different behavioral models the capacity may go to infinity or zero. The capacity of a perturbative multiple-access channel is studied in [13]. It is shown that the nonlinear crosstalk between channels does not affect the capacity region when the information from all the channels is optimally used at each detector. However, if joint processing is not possible, the channel capacity is limited by the inter channel distortion. Another class of simplified models, which are equivalent to the regular perturbative March 19, 2018 DRAFT 4 ones up to a first-order linearization, is that of logarithmic perturbative models, where the nonlinear distortion term ∆xl is modeled as a phase shift. This yields a discretetime channel with input–output relation yl = xl ej∆xl + nl [8, Eq. (7)]. In [14] and [15], a memoryless logarithmic perturbative optical channel for a two-user WDM transmission system is developed and its capacity region is studied in the high-power regime. It is shown that the capacity pre-log pair (1,1) is achievable, where the capacity pre-log is defined as the asymptotic limit of C/ log P for P → ∞, where P is the input power and C is the capacity. Despite the fact that the aforementioned simplified channels are valid in the low-power regime, these models are often used also in the moderate- and high-power regimes. Currently, it is unclear to what extend the simplifications used to obtain these models influence the capacity at high powers. To find out, we study the capacity of two memoryless perturbative models, namely, a regular perturbative channel (RPC), and a logarithmic perturbative channel (LPC). To assess accuracy of these two perturbative models, we investigate also the capacity of the memoryless NLS channel (MNC), which is obtained from the zero-dispersion NLS equation without further approximations, and whose capacity serves as benchmark. A number of results are available on the capacity of this channel model. In [16], a lower bound on the per-sample capacity of the memoryless NLS channel is derived, which proves that the capacity goes to infinity with power. In [17], the capacity of the same channel is evaluated numerically. Furthermore, it is shown that the capacity pre-log is 1/2. The only known nonasymptotic upper bound on the capacity of this channel is log(1 + SNR) (bits per channel use) [6], where SNR is the signal-to-noise ratio. This upper bound holds also for the general case of nonzero dispersion. The novel contributions of this paper are as follows: First, we tightly bound the capacity of the RPC model and prove that its capacity pre-log is 3. Second, the capacity of the LPC is readily shown to be the same as that of an AWGN channel with the same input and noise power. Hence, the capacity pre-log of the LPC is 1. Third, we establish a novel upper bound DRAFT March 19, 2018 5 [18] on the capacity of the MNC. Our upper bound improves the previously known upper bound [6] on the capacity of this channel significantly and together with the available lower bounds allows one to characterize the capacity of the MNC accurately. Although all three models represent the same physical optical channel, their capacities behave very differently in the high-power regime. This result highlights the profound impact of the simplifying assumptions on the capacity at high powers, and indicates that care should be taken in translating the results obtained based on these models into guidelines for system design. The rest of this paper is organized as follows. In Section II, we introduce the three channel models. In Section III, we present upper and lower bounds on the capacity of these channels and establish the capacity pre-log of the perturbative models. Numerical results are provided in Section IV. We conclude the paper in Section V. The proofs of all theorems are given in the appendices. Notation: Random quantities are denoted by boldface letters. We use CN (0, σ 2 ) to denote the complex zero-mean circularly symmetric Gaussian distribution with variance σ 2 . We write R(x), |x|, and x to denote the real part, the absolute value, and the phase of a complex number x. All logarithms are in base two. The mutual information between two random variables x and y is denoted by I(x; y). The entropy and differential entropy are denoted by H(·) and h(·), respectively. Finally, we use 1(·) for the indicator function. II. Channel Model The fiber-optical channel is well-modeled by the NLS equation, which describes the propagation of a complex baseband electromagnetic field through a lossy single-mode fiber as ∂a α − g β2 ∂ 2 a + a+j − jγ|a|2 a = n. ∂z 2 2 ∂t2 (1) Here, a = a(t, z) is the complex baseband signal at time t and location z. The parameter γ is the nonlinear coefficient, β2 is the group-velocity dispersion parameter, α is the attenuation March 19, 2018 DRAFT 6 constant, g = g(z) is the gain profile of the amplifier, and n = n(t, z) is the white Gaussian amplification noise. The third term on the left-hand side of (1) is responsible for the channel memory and the fourth term for the channel nonlinearity. To compensate for the fiber losses, two types of signal amplification can be deployed, namely, distributed and lumped amplification. The former method compensates the fiber loss continuously along the fiber, whereas the latter method boosts the signal power by dividing the fiber into several spans and using an optical amplifier at the end of each span. With distributed amplification, which we focus on in this paper, the noise can be described by the autocorrelation function E[n(z, t)n∗ (z 0 , t0 )] = αnsp hνδWN (t − t0 )δ(z − z 0 ). (2) Here, nsp is the spontaneous emission factor, h is Planck’s constant, and ν is the optical carrier frequency. Also, δ(·) is the Dirac delta function and δWN (x) = WN sinc(WN x), where WN is the noise bandwidth. In this paper, we shall focus on the ideal distributedamplification case g(z) = α. Next, two perturbative channel models are introduced to approximate the solution of the NLS equation (1). Both of these models have been used extensively in the literature to describe the fiber-optical link under some simplifying assumptions. We shall focus on the nondispersive case β2 = 0. Regular perturbative channel (RPC) : In the regular perturbation method, the output of the NLS channel (1) is approximated as [8, Eq. (5)] a(z, t) = aL (z, t) + ∆a(z, t) + n(z, t) (3) where aL (z, t) is the solution of the NLS equation for γ = 0, ∆a(z, t) is the nonlinear perturbation term, and n(z, t) is the amplification noise. One approach to compute ∆a(z, t) DRAFT March 19, 2018 7 is to write the solution of the NLS equation as a power series expansion of γ, i.e., a(z, t) = ∞ X ai (z, t)γ i (4) i=0 where the signals ai (z, t) can be determined by substituting (4) into (1) [19], [20]. Proceeding as in [20, Sec. 3] and setting β2 = 0 (zero-dispersion assumption), one obtains a0 (z, t) = a(0, t) and a1 (z, t) = jL|a(0, t)|2 a(0, t), where L is the fiber length. By keeping only the first two terms in the infinite sum in (4) and sampling the signal at the receiver at the symbol rate, we derive the discrete-time memoryless channel y = x + jη|x|2 x + n. (5) PN = 2αnsp hνLWN (6) η = γL. (7) Here, n ∼ CN (0, PN ), is the total noise power, and We refer to (5) as the RPC. Logarithmic perturbative channel (LPC): Another method for approximating the solution of the NLS equation (1) is to use logarithmic perturbation, where the output signal is written as a(z, t) = a(0, t) exp j ∞ X ! γ i ailp (z, t) + n(z, t). (8) i=1 Here, the signals ailp (z, t) can be determined by substituting (8) in the NLS equation (1). By setting β2 = 0 and by using [21, Eq. 10b], one obtains a1lp (z, t) = jL|a(0, t)|2 . Keeping only the first term in the infinite sum in (8) and sampling the output signal at the receiver, we obtain the discrete-time memoryless channel 2 y = xejη|x| + n (9) where n ∼ CN (0, PN ), PN is defined in (6), and η is defined in (7). We note that channels (5) and (9) are equal up to a first-order linearization. March 19, 2018 DRAFT 8 Memoryless NLS Channel (MNC): To assess the accuracy of the simplified channels (5) and (9), we shall also study the underlying NLS channel in (1) for the case β2 = 0. Let r0 and θ0 be the amplitude and the phase of a transmitted symbol x and r and θ be those of the received samples y. When dispersion is ignored, the discrete-time channel input–output relation can be described by the conditional probability density function (pdf) [22, Ch. 5] fr,θ|r0 ,θ0 (r, θ|r0 , θ0 ) = ∞   fr|r0 (r | r0 ) 1 X + R Cm (r)ejm(θ−θ0 ) . 2π π m=1 (10) The conditional pdf fr|r0 (r | r0 ) and the Fourier coefficients Cm (r) in (10) are given by r2 + r02 2rr0 2r exp − I0 fr|r0 (r | r0 ) = PN PN PN !   (11) 2 r02 xm tan(xm ) r2 + αm r sec(xm ) αm r exp − . Im Cm (r) = sm PN 2sm sm !   (12) Here, Im (·) denotes the mth order modified Bessel function of the first kind. Also, we have xm = 2jmγr02 PN L 2r02 + PN αm = r0 sec(xm ) sm = PN tan(xm ) . 2xm !1/2 (13) (14) (15) In the next section, we study the capacity of the channel models given in (5), (9), and (10). Since all of these models are memoryless, their capacities under a power constraint P is given by C = sup I(y, x) (16) where the supremum is over all probability distributions of x that satisfy the average-power constraint E |x|2 ≤ P. h DRAFT i (17) March 19, 2018 9 III. Analytical Results In this section, we study the capacity of the RPC, the LPC, and the MNC models. All these models represent the same fiber-optical channel and share the same set of parameters. Bounds on the capacity of the RPC in (5) are provided in Theorems 1–3. Specifically, in Theorem 1 we establish a closed-form lower bound, which, together with the upper bound provided in Theorem 2, tightly bounds capacity (see Section IV). A different upper bound is provided in Theorem 3. Numerical evidence suggests that this alternative bound is less tight than the one provided in Theorem 2 (see Section IV). However, this alternative bound has a simple analytical form, which makes it easier to characterize it asymptotically. By using the bounds derived in Theorem 1 and Theorem 3, we prove that the capacity pre-log of the RPC is 3. In Theorem 4, we present for completeness the (rather trivial) observation that the capacity of the LPC in (9) coincides with that of an equivalent AWGN channel. Hence, the capacity pre-log is 1. Finally, in Theorem 5, we provide an upper bound on the capacity of the MNC in (10), which improves the previous known upper bound [6] significantly, and, together with the available capacity lower bounds, yields a tight characterization of capacity (see Section IV). A. Capacity Analysis of the RPC Theorem 1. The capacity CRPC of the RPC in (5) is lower-bounded by 2 λ2 + 6η 2 λ212η +6η 2 + 1 ≥ LRPC (P ) = max log e λ λ 3 PN ( CRPC !) (18) where λ is positive and satisfies the constraint 18η 2 + λ2 ≤ P. λ (6η 2 + λ2 ) (19) Furthermore, the maximum in (18) is achieved by the unique real solution of the equation P λ3 − λ2 + 6P η 2 λ − 18η 2 = 0. March 19, 2018 (20) DRAFT 10 Proof: See Appendix I. Theorem 2. The capacity of the RPC in (5) is upper-bounded by CRPC ≤ URPC (P ) h   i µ2 + 6η 2 s + PN log 3 + λ + max µE q |y|2 | |x|2 = s log e − λ s>0 µ ePN P + PN ( = min µ>0, λ>0  ) . (21) Here, q(x) = g −1 (x), where g(x) = x + η 2 x3 . Proof: See Appendix II. Note that, given |x|2 = s, the random variable |y|2 /PN is conditionally distributed as a noncentral chi-squared random variable with 2 degrees of freedom and noncentrality parameter (s + η 2 s3 )/PN . This enables numerical computation of URPC (P ). Theorem 3. The capacity of the RPC in (5) is upper-bounded by µ2 + 6η 2 ≤ ŨRPC (P ) = min log µ>0 µ3 ePN ( CRPC ! ) + µ(P + B) log e (22) where √ πPN q √ B = PN + . 123/8 ( 3 − 1)η (23) (P + B) µ3 − µ2 + 6η 2 (P + B) µ − 18η 2 = 0. (24) Furthermore, the minimum in (22) is achieved by the unique real solution of the equation Proof: See Appendix III. Pre-log analysis: By substituting µ = 1/P into (22), we see that 6η 2 lim [CRPC − 3 log(P )] ≤ log . P →∞ PN ! (25) Furthermore, since 18η 2 + λ2 18η 2 + 3λ2 ≤ λ (6η 2 + λ2 ) λ (6η 2 + λ2 ) 3 = λ DRAFT (26) (27) March 19, 2018 11 we can obtain a valid lower bound on CRPC by substituting λ = 3/P into (18). Doing so, we obtain 2η 2 e2 lim [CRPC − 3 log(P )] ≥ log . P →∞ 9PN ! (28) It follows from (25) and (28) that the capacity pre-log of the RPC is 3. B. Capacity Analysis of the LPC Theorem 4. The capacity of the LPC in (9) is CLPC P = log 1 + . PN   (29) Proof: We use the maximum differential entropy lemma [23, Sec. 2.2] to upper-bound CLPC by log(1 + P/PN ). Then, we note that we can achieve this upper bound by choosing x ∼ CN (0, P ). C. Capacity Analysis of the MNC A novel upper bound on the capacity of the MNC in (10) is presented in the following theorem [18]. Theorem 5. The capacity of the MNC in (10) is upper-bounded by CMNC ≤ UMNC (P ) (30) ( = min λ>0, α>0 P + PN α log α   ) + log(πΓ(α)) + λ + max{gλ,α (r0 , P )} r0 >0 (31) where Γ(·) denotes the Gamma function and gλ,α (r0 , P ) = (α log e − λ) h i r02 + PN + (1 − 2α)E log(r) | r0 = r0 P + PN − h(r | r0 = r0 ) − h(θ | r, r0 = r0 , θ0 = 0). March 19, 2018 (32) DRAFT 12 TABLE I: Channel parameters. Parameter Symbol Value Attenuation α 0.2 dB/km Nonlinearity γ 1.27 (W · km)−1 Fiber length L 5000 km Noise bandwidth WN 32 GHz Emission factor nsp 1 Photon energy hν 1.28 · 10−19 J Noise variance PN −27.2 dBm The upper bound UMNC (P ) can be calculated numerically using the expression for the conditional pdf fr,θ|r0 ,θ0 (r, θ|r0 , θ0 ) given in (10). Proof: See Appendix IV. IV. Numerical Examples We evaluate the bounds derived in Section III for a fiber-optical channel whose parameters are listed in Table I. Using (7), we obtain η = 6350 W−1 . Fig. 1 depicts the upper and lower bounds on the capacity of the RPC in (5) and the MNC in (10). The capacity (29) of the LPC in (9), which is equal to that of an equivalent AWGN channel, is plotted as well. As can be seen from Fig. 1, the capacity of the RPC is tightly bounded between the upper bound URPC (P ) in (21) and the lower bound LRPC (P ) in (18). The maximum relative gap between these two bounds is 0.8% (it occurs at −16 dBm). Furthermore, one can observe that although the alternative upper bound ŨRPC (P ) in (22) is loose at low powers, it becomes DRAFT March 19, 2018 13 14 12 Bit/Channel use 8 P C Bounds on CRPC CL 10 LRPC (P ) URPC (P ) C MNC ŨRPC (P ) Bounds on CMNC 6 UMNC (P ) Half-Gaussian lower bound Gaussian lower bound 4 2 0 −40 −30 −20 −10 0 10 20 30 40 P (dBm) Fig. 1: Capacity bounds for the RPC in (5) and the MNC in (10), together with the capacity of the LPC in (9). tight in the moderate- and high-power regimes. The relative gap between this upper bound and LRPC (P ) is less than 0.5% at P = 0 dBm and this gap becomes smaller at higher powers. We also plot the upper bound UMNC (P ) on the capacity of the MNC together with two capacity lower bounds. It can be seen that UMNC (P ) improves substantially on the upper bound given in [6], i.e., the capacity of the corresponding AWGN channel (29) (which coincides with CLPC ). The two lower bounds are evaluated by calculating numerically the mutual information in (16) for a fixed input distribution. The first lower bound is obtained by considering a circularly-symmetric input distribution with half-Gaussian amplitude r0 √ ! 2 r02 . (33) fr0 (r0 ) = exp − πP 2P It has been shown in [17] that (33) is capacity-achieving in the high-power regime. The second lower bound is based on a circularly-symmetric Gaussian input distribution, which achieves capacity whenever the nonlinearity is negligible, i.e., in the low-power regime. As March 19, 2018 DRAFT 14 is evident from Fig. 1, in the high-power regime, the half-Gaussian lower bound is tighter than the Gaussian lower bound, while in the low-power regime the latter provides a tighter bound. Fig. 1 suggests that CMNC experiences changes in slope at about 0 and 30 dBm. This can be explained as follows. Because of the nonlinearity, the signal experiences a phase shift that is a nonlinear function of the signal and the noise. In the moderate-power regime, the noise variance increases rapidly with the signal power, which reduces the information rate that can be transmitted through the signal phase. In the high-power regime, the phase of the received samples converges to a uniform distribution over the interval [0, 2π) and essentially becomes independent of the transmitted signal. Hence, the information rate that can be transmitted through the signal phase is a unimodal function of the power that vanishes in the high-power regime, which explains the changes in the slope of CMNC . As a final observation, we note that CRPC diverges from CMNC at about −15 dBm, whereas CLPC diverges from CMNC at about −5 dBm. Since the MNC describes the nondispersive NLS channel without any simplifying assumptions, this result shows that the perturbative models are grossly inaccurate in the high-power regime. V. Discussion and Conclusion The capacity of three memoryless optical channel models, namely, the RPC, the LPC, and the MNC were investigated. Two of these models, i.e., the RPC and the LPC, are based on perturbation theory and ignore signal–noise interaction, which makes them accurate only in the low-power regime. The third model, i.e., the MNC, describes accurately a memoryless fiber-optical channel governed by the NLS equation. By tightly bounding the capacity of the RPC, by characterizing the capacity of the LPC, and by developing a tight upper bound on the capacity of the MNC, we characterized the impact of the simplifying assumptions used to derive the RPC and the LPC on capacity. Our results indicate that the capacity of the DRAFT March 19, 2018 15 perturbative channels (i.e., the RPC and the LPC) is significantly different from that of the MNC at moderate and high powers. Specifically, the capacity pre-log is proved to be 3 for the RPC and 1 for the LPC, whereas the capacity pre-log of the MNC is 1/2. This result shows that the two perturbative models are grossly inaccurate at high powers. Appendix I Proof of Theorem 1 The capacity of the regular perturbative channel can be written as CRPC = sup I(x; y) (34) where the supremum is over all the probability distributions on x that satisfy the power constraint (17). Let w = x + jη|x|2 x. (35) We have that I(x; y) = h(y) − h(y | x) (36) = h(w + n) − h(w + n | x) (37) = h(w + n) − h(n) . (38) Using the entropy power inequality [23, Sec. 2.2] and the Gaussian entropy formula [24, Th. 8.4.1], we conclude that  h(w + n) ≥ log 2h(w) + 2h(n)    = log 2h(w) + πePN . (39) (40) Substituting (40) into (38), and using again the Gaussian entropy formula [24, Th. 8.4.1], we obtain   I(x; y) ≥ log 2h(w) + πePN − log(πePN ) . March 19, 2018 (41) DRAFT 16 We take x circularly symmetric. It follows from (35) that w is also circularly symmetric. Using [25, Eq. (320)] to compute h(w), we obtain h(w) = h |w|2 + log π.   (42) Substituting (42) into (41), we get  I(x; y) ≥ log h(|w|2 ) 2 ePN  + 1 . (43) Next to evaluate the right-hand side (RHS) of (43), we choose the following distribution for the amplitude square s = |x|2 of x: fs (s) = ζ 3η 2 s2 + 1 e−λs ,   s ≥ 0. (44) The parameters λ > 0 and ζ > 0 are chosen so that (44) is a pdf and so that the power constraint (17) is satisfied. We prove in Appendix I-A that by choosing these two parameters so that ζ= λ3 λ2 + 6η 2 (45) and so that (20) holds, both constraints are met. In Appendix I-B, we then prove that h |w|2 = − log ζ + ζ   1 18η 2 + 3 log e. λ λ ! (46) Substituting (46) and (45) into (43), we obtain (18). Although not necessary for the proof, in Appendix I-C, we justify the choice of the pdf in (44) by showing that it maximizes h(w). A. Choosing ζ and λ We choose the coefficients ζ and λ so that (44) is a valid pdf and E[s] ≤ P . Note that Z∞ 0 fs (s) ds = Z∞  ζ 3η 2 s2 + 1 e−λs ds (47) 0 =ζ DRAFT  λ2 + 6η 2 . λ3 (48) March 19, 2018 17 Therefore, choosing ζ according to (45) guarantees that fs (s) integrates to 1. We next compute E[s] : E[s] = Z∞ sfs (s) ds (49) 0 = Z∞ sζ 3η 2 s2 + 1 e−λs ds   (50) 0 18η 2 1 + 2 . 4 λ λ ! =ζ (51) Substituting (45) into (51), we obtain 18η 2 + λ2 . E[s] = λ (λ2 + 6η 2 ) (52) We see now that imposing E[s] ≤ P is equivalent to (19). Observe that the RHS of (52) and the objective function on the RHS of (18) are decreasing functions of λ. Therefore, setting the RHS of (52) equal to P , which yields (20), maximizes the objective function in (18). Finally, we prove that (20) has a single positive root. We have f (λ) = P λ3 − λ2 + 6P η 2 λ − 18η 2 = λ2 + 6η 2 (P λ − 1) − 12η 2 .   (53) (54) Note that f (λ) → ∞ as λ → ∞ and that the RHS of (54) is negative when λ < 1/P . Furthermore, f (λ) is monotonically increasing in the interval [1/P, ∞). Indeed, when λ ≥ 1/P , d f (λ) = 3P λ2 − 2λ + 6P η 2 dλ (55) ≥ 3λ − 2λ + 6P η 2 (56) > 0. (57) This yields the desired result. March 19, 2018 DRAFT 18 B. Proof of (46) To compute the differential entropy of t = |w|2 , we first determine the pdf of t. By definition, t = s + η 2 s3 . (58) d g(x) = 1 + 3η 2 x2 dx (59) Let now g(x) = x + η 2 x3 . Since we conclude that g(x) is monotonically increasing for x ≥ 0. Hence, g(x) is one-to-one when x ≥ 0 and its inverse q(x) = g −1 (x) (60) is well defined. Thus, the pdf of t is given by [26, Ch. 5] ft (t) = = fs (q(t)) g 0 (q(t)) (61) ζ(3η 2 q 2 (t) + 1) e−λq(t) 3η 2 q 2 (t) + 1 (62) = ζe−λq(t) , t ≥ 0. (63) Here, (62) holds because of (44). Using (63), we can now compute h(t) as h(t) = − Z∞ ft (t) log(ft (t)) dt (64) 0 = − log ζ + λζ (log e) = − log ζ + λζ (log e) Z∞ 0 Z∞ q(t) e−λq(t) dt (65) re−λr 1 + 3η 2 r2 dr   (66) 0 1 18η 2 + log e λ2 λ4 ! = − log ζ + λζ (67) where in (66) we used the change of variables r = q(t). This proves (46). DRAFT March 19, 2018 19 C. fs (s) maximizes h(w) We shall prove that the pdf fs (s) = ζ (3η 2 s2 + 1) e−λs , s ≥ 0, maximizes h(w). It follows from (42) that to maximize h(w), we need to maximize h(t). We assume that the power constraint is fulfilled with equality, i.e., that E[s] = Z ∞ 0 sfs (s) ds = P. (68) Using the change of variables s = q(t), where q(t) was defined in (60), we obtain Z ∞ 0 q(t)fs (q(t))q 0 (t) dt = P. (69) Substituting (61) into (69) and using that q 0 (t) = 1/g 0 (q(t)), we obtain Z ∞ 0 q(t)ft (t) dt = P. (70) It follows now from [24, Th. 12.1.1] that the pdf that maximizes h(t) is of the form ft (t) = eλ0 +λ1 q(t) , t ≥ 0, where λ0 and λ1 need to be chosen so that (70) is satisfied and ft (t) integrates to one. Using (61), we get fs (s) = ft (g(s))g 0 (s) = 1 + 3η 2 s2 eλ0 +λ1 s ,   (71) s ≥ 0. (72) By setting ζ = eλ0 and λ = λ1 , we obtain (44). Appendix II Proof of Theorem 2 Fix λ ≥ 0. It follows from (16) and (17) that E[|x|2 ] + PN CMNC (P ) ≤ sup I(x; y) + λ 1 − P + PN ( March 19, 2018 !) (73) DRAFT 20 where the supremum is over the set of probability distributions that satisfy the power constraint (17). Next, we upper-bound the mutual information I(x; y) as I(x; y) = h(y) − h(y | x) (74) = h(y) − h(n) (75) = h(|y|) + h( y | |y|) + E(log |y|) − h(n) (76) = h |y|2 + h( y | |y|) − log 2 − h(n) (77) ≤ h |y|2 + log (π) − h(n) (78) = h |y|2 − log(ePN ) (79)       where in (76) we used [25, Lemma 6.16] and in (77) we used [25, Lemma 6.15]. We fix now an arbitrary input pdf fx (·) that satisfies the power constraint and define the random variables v = |y|2 and w = x + jη|x|2 x. Next, we shall obtain an upper bound on h(v) that is valid for all fx (·). Let f˜v (v) = κe−µq(v) , v≥0 (80) for some parameters κ > 0 and µ > 0. The function q(·) is defined in (60). We next choose κ so that f˜v (v) is a valid pdf. To do so, we set z = q(v), which implies that g(z) = v, and that  1 + 3η 2 z 2 dz = dv.  (81) Therefore, integrating f˜(v) in (80), we obtain Z∞ −µq(v) κe dv = κ 0 Z∞ e−µz 1 + 3η 2 z 2 dz   (82) 0 µ2 + 6η 2 =κ . µ3 (83) µ3 µ2 + 6η 2 (84) ! We see from (83) that the choice κ= DRAFT March 19, 2018 21 makes f˜v (v) a valid pdf. Using the definition of the relative entropy, we have  Z +∞  D fv (v) || f˜v (v) = −∞ ! fv (v) dv fv (v) log ˜ fv (v) h  i = −h(v) − E log f˜v (v) (85) (86) . Since the relative entropy is nonnegative [24, Thm. 8.6.1], we obtain   h(v) ≤ −Ev log f˜v (v)  (87) = − log κ + µE[q(v)] log e. (88) Substituting (79) and (88) into (73), we obtain E[|x|2 ] + PN CMNC (P ) ≤ − log(ePN ) − log κ + λ + sup µE[q(v)] log e − λ P + PN ( ) s + PN ≤ − log(ePN ) − log κ + λ + max µE q(v) | |x| = s log e − λ s>0 P + PN  h 2 i (89)  (90) . The final upper bound (21) is obtained by minimizing (90) over all λ ≥ 0 and µ ≥ 0. Appendix III Proof of Theorem 3 It follows from (88) and (79) that I(x; y) ≤ − log(κ) + µE[q(v)] log e − log(ePN ) (91) where v = |y|2 . Moreover, E[q(v)] = E q |w + n|2 h  i (92) = E q |w|2 + |n|2 + 2R(wn∗ ) h  i . (93) Next, we analyze the function q(x). We have q 0 (x) = = March 19, 2018 1 g 0 (q(x)) 1 . 1 + 3η 2 q 2 (x) (94) (95) DRAFT 22 Furthermore, q 00 (x) = − 6η 2 q(x) ≤ 0. (1 + 3η 2 q 2 (x))3 (96) Therefore, q(x) is a nonnegative concave function on [0, ∞). Thus, for every real numbers x ≥ 0 and y ≥ −x, q(x + y) ≤ q(x) + q 0 (x)y. (97) Using (97) in (93), with x = |w|2 + |n|2 and y = 2R(wn∗ ), we get E[q(v)] ≤ E q |w|2 + |n|2 + 2q 0 |w|2 + |n|2 R(wn∗ ) . h     i (98) Using (97) once more with x = |w|2 and y = |n|2 , we obtain E[q(v)] ≤ E q |w|2 + q 0 |w|2 |n|2 + 2q 0 |w|2 + |n|2 R(wn∗ ) h   = E q |w|2 i h     + PN E q 0 |w|2 h  i  i (99) + 2E q 0 |w|2 + |n|2 R(wn∗ ) . h   i (100) We shall now bound each expectation in (100) separately. Since |w|2 = g(|x|2 ), we have that E q |w|2 h  i = E |x|2 h i (101) ≤P (102) where the last inequality follows from (17). It also follows from (95) that q 0 (|w|2 ) ≤ 1. (103) Furthermore, (95) and (96) imply that the function q 0 (x) is positive and decreasing in the interval x ≥ 0. Therefore, E q 0 |w|2 + |n|2 R(wn∗ ) ≤ E q 0 |w|2 + |n|2 |R(wn∗ )| h   i h  i (104) ≤ E q 0 |w|2 |R(wn∗ )| (105) ≤ E q 0 |w|2 |w| · |n| (106) h  h  DRAFT  i   i March 19, 2018 23 √ i πPN h 0  2  E q |w| |w| 2 √ n  o πPN ≤ max tq 0 t2 t≥0 2 ( ) √ t πPN = max t≥0 2 1 + 3η 2 q 2 (t2 ) = where (107) holds because E[|n|] = q (107) (108) (109) πPN /4 and the last equality follows from (95). To calculate the maximum in (109), we use the change of variables t2 = x + η 2 x3 to obtain ( ) (√ ) t x + η 2 x3 max = max (110) t≥0 x≥0 1 + 3η 2 q 2 (t2 ) 1 + 3η 2 x2 1 r (111) =  √ 3/8 12 3−1 η where the last step follows by some standard algebraic manipulations that involve finding the roots of the derivative of the objective function on the RHS of (110). Substituting (111) into (109), we obtain 2 h  0 2 E q |w| + |n|  √ πPN r R(wn ) ≤  . √ 3/8 2 × 12 3−1 η ∗ i (112) Substituting (102), (103), and (112) into (100), and the result into (91), we obtain       √   πPN r I(x; y) ≤ − log κ + µ (log e) P + PN + − log(ePN ).   √      123/8 3 − 1 η (113) Finally, we obtain (21) by substituting (84) into (113). Since the upper bound (113) on mutual information holds for every input distribution that satisfies the power constraint, it is also an upper bound on capacity for every µ > 0. To find the optimal µ, we need to minimize µ2 + 6η 2 log µ3 ! exp(µ(P + B)) (µ2 + 6η 2 ) + µ (P + B) log e = log µ3 ! (114) where B was defined in (24). Observe now that the function inside logarithm on the RHS of (114) goes to infinity when µ → 0 and when µ → ∞. Therefore, since this function is positive, it must have a minimum in the interval [0, ∞). To find this minimum, we set its March 19, 2018 DRAFT 24 derivative equal to zero and get (24). Note finally that since (20) has exactly one real root, which was proved in Appendix I-A, (24) also has exactly one real root. Appendix IV Proof of Theorem 5 The proof uses similar steps as in [27, Sec. III-C]. We upper-bound the mutual information between the x and y expressed in polar coordinates as I(x; y) = I(r0 , θ0 ; r, θ) (115) = I(r0 , θ0 ; r) + I(r0 , θ0 ; θ | r) (116) = h(r) − h(r | r0 , θ0 ) + h(θ | r) − h(θ | r, r0 , θ0 ) (117) ≤ h(r2 ) − E[log(r)] − log 2 − h(r | r0 , θ0 ) + log(2π) − h(θ | r, r0 , θ0 ). (118) In (118) we used [25, Eq. (317)] and that h(θ | r) ≤ log(2π). Let now f˜r2 (·) denote an arbitrary pdf for r2 . Following the same calculations as in (85)–(87), we obtain h(r2 ) ≤ −Er2 log(f˜r2 (r2 )) . h i (119) We shall take f˜r2 (·) to be a Gamma distribution with parameters α > 0 and β = (P +PN )/α, i.e., z α−1 e−z/β f˜r2 (z) = α , β Γ(α) z ≥ 0. (120) Here, Γ(·) denotes the Gamma function. Substituting (120) into (119), we obtain E[log(f˜r2 (r2 ))] (121) E[r20 ] + PN P + PN = 2(α − 1)E[log(r)] − α log e − α log P + PN α   − log(Γ(α)). (122) It follows from (10) that the random variables r and θ0 are conditionally independent given r0 . Therefore, h(r | r0 , θ0 ) = h(r | r0 ). DRAFT (123) March 19, 2018 25 Next, we study the term h(θ | r, r0 , θ0 ) in (118). From Bayes’ theorem and (10) it follows that for every θ0 ∈ [0, 2π) fθ|r,r0 ,θ0 (θ|r, r0 , θ0 ) = fθ|r,r0 ,θ0 (θ − θ0 |r, r0 , θ0 − θ0 ). (124) Therefore, h(θ | r, r0 , θ0 ) = = = Z 2π 0 Z 2π 0 Z 2π 0 fθ0 (θ0 )h(θ | r, r0 , θ0 = θ0 ) dθ0 (125) fθ0 (θ0 )h(θ − θ0 | r, r0 , θ0 = 0) dθ0 (126) fθ0 (θ0 )h(θ | r0 , θ0 = 0) dθ0 (127) = h(θ | r, r0 , θ0 = 0). (128) Here, (127) follows because differential entropy is invariant to translations [24, Th. 8.6.3]. Substituting (122), (119), (123), and (128) into (118), we obtain P + PN I(r0 , θ0 ; r, θ) ≤ α log α   + log(Γ(α)) + log(π) + α E[r20 ] + PN log e P + PN + (1 − 2α)E[log(r)] − h(r | r0 ) − h(θ | r, r0 , θ0 = 0). (129) Fix λ ≥ 0. We next upper bound CMNC using (129) as E[r20 ] + PN CMNC (P ) ≤ sup I(r0 , θ0 ; r, θ) + λ 1 − P + PN ( P + PN ≤ α log α  !) (130)  + log(Γ(α)) + log(π) + λ ( + sup (α log e − λ) E[r20 ] + PN + (1 − 2α)E[log(r)] − h(r | r0 ) P + PN ) − h(θ | r, r0 , θ0 = 0) (131) where the supremum is over the set of input probability distributions that satisfy (17). We complete the proof by noting that the supremum in (131) is less or equal to maxr0 >0 {gλ,α (r0 , P )}, where gλ,α (r0 , P ) is defined in (32). March 19, 2018 DRAFT 26 References [1] E. Agrell et al., “Roadmap of optical communications,” J. Opt., vol. 18, no. 6, May 2016, Art. no. 063002. [2] A. Mecozzi, “Limits to long-haul coherent transmission set by the Kerr nonlinearity and noise of the in-line amplifiers,” J. Lightw. Technol., vol. 12, no. 11, pp. 1993–2000, Nov. 1994. [3] N. Merhav, G. Kaplan, A. Lapidoth, and S. Shamai (Shitz), “On information rates for mismatched decoders,” IEEE Trans. Inform. Theory, vol. 40, no. 6, pp. 1953–1967, Nov. 1994. [4] M. Secondini, E. Forestieri, and G. Prati, “Achievable information rate in nonlinear WDM fiber-optic systems with arbitrary modulation formats and dispersion maps,” J. Lightw. Technol., vol. 31, no. 23, pp. 3839–3852, Dec. 2013. [5] T. Fehenberger, A. Alvarado, P. Bayvel, and N. Hanik, “On achievable rates for long-haul fiber-optic communications,” Opt. Express, vol. 23, no. 7, pp. 9183–9191, Apr. 2015. [6] G. Kramer, M. I. Yousefi, and F. R. Kschischang, “Upper bound on the capacity of a cascade of nonlinear and noisy channels,” in IEEE Info. Theory Workshop (ITW), Jerusalem, Apr. 2015. [7] G. P. Agrawal, Nonlinear Fiber Optics, 4th ed. San Diego, CA: Elsevier, 2006. [8] E. Agrell, G. Durisi, and P. Johannisson, “Information-theory-friendly models for fiber-optic channels: A primer,” in IEEE Info. Theory Workshop (ITW), Jerusalem, Apr. 2015. [9] K. V. Peddanarappagari and M. Brandt-Pearce, “Volterra series transfer function of single-mode fibers,” J. Lightw. Technol., vol. 15, no. 12, pp. 2232–2241, Dec. 1997. [10] A. Mecozzi, C. B. Clausen, and M. Shtaif, “Analysis of intrachannel nonlinear effects in highly dispersed optical pulse transmission,” IEEE Photon. Technol. Lett., vol. 12, no. 4, pp. 392–394, Apr. 2000. [11] A. Meccozzi and R.-J. Essiambre, “Nonlinear Shannon limit in pseudolinear coherent systems,” J. Lightw. Technol., vol. 30, no. 12, pp. 2011–2024, Jun. 2012. [12] E. Agrell and M. Karlsson, “Influence of behavioral models on multiuser channel capacity,” J. Lightw. Technol., vol. 33, no. 17, pp. 3507–3515, Sep. 2015. [13] M. H. Taghavi, G. C. Papen, and P. H. Siegel, “On the multiuser capacity of WDM in a nonlinear optical fiber: Coherent communication,” IEEE Trans. Inform. Theory, vol. 52, no. 11, pp. 5008–5022, Nov. 2006. [14] H. Ghozlan and G. Kramer, “Interference focusing for mitigating cross-phase modulation in a simplified optical fiber model,” in Proc. IEEE Int. Symp. Inform. Theory, Texas, Jun. 2010, pp. 2033–2037. [15] ——, “Interference focusing for simplified optical fiber models with dispersion,” in Proc. IEEE Int. Symp. Inform. Theory, Saint-Petersburg, Jul-Aug 2011, pp. 376–379. [16] K. S. Turitsyn, S. A. Derevyanko, I. Yurkevich, and S. K. Turitsyn, “Information capacity of optical fiber channels with zero average dispersion,” Phys. Rev. Lett., vol. 91, no. 20, p. 203901, Nov. 2003. DRAFT March 19, 2018 27 [17] M. I. Yousefi and F. R. Kschischang, “On the per-sample capacity of nondispersive optical fibers,” IEEE Trans. Inform. Theory, vol. 57, no. 11, pp. 7522–7541, Nov. 2011. [18] K. Kamran, G. Durisi, and E. Agrell, “A tighter upper bound on the capacity of the nondispersive optical fiber channel,” in Proc. European Conference on Optical Communication (ECOC)(accepted), Gothenburg, Sep. 2017. [19] A. Vannucci, P. Serena, and A. Bononi, “The RP method: A new tool for the iterative solution of the nonlinear Schrödinger equation,” J. Lightw. Technol., vol. 20, no. 7, pp. 1102–1112, Jul. 2002. [20] E. Forestieri and M. Secondini, “Solving the nonlinear Schrödinger equation,” in Optical Communication Theory and Techniques. New York, NY: Springer, 2005, pp. 3–11. [21] E. Ciaramella and E. Forestieri, “Analytical approximation of nonlinear distortions,” IEEE Photon. Technol. Lett., vol. 17, no. 1, pp. 91–93, Jan. 2005. [22] K.-P. Ho, Phase-Modulated Optical Communication Systems. [23] A. E. Gamal and Y.-H. Kim, Network Information Theory. New York, NY: Springer, 2005. UK: Cambridge University Press, 2011. [24] T. M. Cover and J. A. Thomas, Elements of Information Theory, 2nd ed. Hoboken, NJ: Wiley, 2006. [25] A. Lapidoth and S. M. Moser, “Capacity bounds via duality with applications to multiple-antenna systems on flat-fading channels,” IEEE Trans. Inform. Theory, vol. 49, no. 10, pp. 2426–2467, Oct. 2003. [26] A. Papoulis and S. U. Pillai, Probability, Random Variables, and Stochastic Processes, 4th ed. New York, NY: McGraw-Hill Education, 2002. [27] G. Durisi, “On the capacity of the block-memoryless phase-noise channel,” IEEE Commun. Lett., vol. 16, no. 8, pp. 1157–1160, Aug. 2012. March 19, 2018 DRAFT
7cs.IT
arXiv:1211.6693v3 [math.PR] 4 May 2016 The Annals of Applied Probability 2016, Vol. 26, No. 2, 722–759 DOI: 10.1214/15-AAP1101 c Institute of Mathematical Statistics, 2016 THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY OF GAUSSIAN RANDOM FIELDS WITH STATIONARY INCREMENTS1 By Dan Cheng and Yimin Xiao North Carolina State University and Michigan State University Let X = {X(t), t ∈ RN } be a centered Gaussian random field with stationary increments and X(0) = 0. For any compact rectangle T ⊂ RN and u ∈ R, denote by Au = {t ∈ T : X(t) ≥ u} the excursion set. Under X(·) ∈ C 2 (RN ) and certain regularity conditions, the mean Euler characteristic of Au , denoted by E{ϕ(Au )}, is derived. By applying the Rice method, it is shown that, as u → ∞, the excursion probability P{supt∈T X(t) ≥ u} can be approximated by E{ϕ(Au )} such that the error is exponentially smaller than E{ϕ(Au )}. This verifies the expected Euler characteristic heuristic for a large class of Gaussian random fields with stationary increments. 1. Introduction. Let X = {X(t), t ∈ T } be a real-valued Gaussian random field on probability space (Ω, F, P), where T is the parameter set. The study of the excursion probability P{supt∈T X(t) ≥ u} is a classical but very important problem in probability theory and has many applications in statistics and related areas. Many authors have developed various methods for precise approximations of P{supt∈T X(t) ≥ u}. These include the double sum method [Piterbarg (1996a)], the tube method [Sun (1993)], the Euler characteristic method [Adler (2000), Taylor and Adler (2003), Taylor, Takemura and Adler (2005), Adler and Taylor (2007)] and the Rice method [Azaı̈s, Bardet and Wschebor (2002), Azaı̈s and Delmas (2002), Azaı̈s and Wschebor (2005, 2008, 2009)]. For a centered, unit-variance smooth Gaussian random field X = {X(t), t ∈ T } parameterized on a manifold T , Adler and Taylor [(2007), Theorem 14.3.3] proved, under certain conditions on the regularity of X and topology of T , Received November 2012; revised December 2014. Supported in part by NSF Grants DMS-10-06903, DMS-13-07470 and DMS-13-09856. AMS 2000 subject classifications. 60G15, 60G60, 60G70. Key words and phrases. Gaussian random fields with stationary increments, excursion probability, excursion set, Euler characteristic, super-exponentially small. 1 This is an electronic reprint of the original article published by the Institute of Mathematical Statistics in The Annals of Applied Probability, 2016, Vol. 26, No. 2, 722–759. This reprint differs from the original in pagination and typographic detail. 1 2 D. CHENG AND Y. XIAO the following approximation: n o 2 (1.1) P sup X(t) ≥ u = E{ϕ(Au )}(1 + o(e−αu )) t∈T as u → ∞, where ϕ(Au ) is the Euler characteristic of excursion set Au = {t ∈ T : X(t) ≥ u} and α > 0 is a constant which relates to the curvature of the boundary of T and the second-order partial derivatives of X. This verifies the “Expected Euler Characteristic Heuristic” for unit-variance smooth Gaussian random fields. We refer to Takemura and Kuriki (2002), Taylor and Adler (2003) and Taylor, Takemura and Adler (2005) for similar results in special cases. It should be mentioned that Taylor, Takemura and Adler (2005) were able to provide an explicit form of α in (1.1). The approximation (1.1) is remarkable and very accurate, since E{ϕ(Au )} is computable and the error is exponentially smaller than this principal term. It has been applied for P -value approximation in many statistical applications to brain imaging, cosmology and environmental sciences. We refer to Adler and Taylor (2007) and its forthcoming companion Adler, Taylor and Worsley (2012) for further information. However, the above requirement of “constant variance” on the Gaussian random fields is too restrictive for many applications and excludes some important Gaussian random fields such as those with stationary increments (see Section 2 below), or more generally, Gaussian random intrinsic functions [Matheron (1973), Stein (1999, 2013)]. If the constant variance condition on X is not satisfied, then several important properties [e.g., X(t) and its gradient ∇X(t) are independent for every t] are not available and the formulas for computing E{ϕ(Au )} [cf. Theorems 12.4.1 and 12.4.2 in Adler and Taylor (2007)] cannot be applied. Little had been known on whether the approximation (1.1) still holds. The only exception is Azaı̈s and Wschebor [(2008), Theorem 5], where they proved (1.1) for a centered smooth Gaussian random field X whose maximum variance is attained in the interior of T . In this paper, let X = {X(t), t ∈ RN } be a centered real-valued Gaussian random field with stationary increments and X(0) = 0, and let T ⊂ RN be a rectangle. Our objectives are to compute the expected Euler characteristic E{ϕ(Au )} and to show that it can be applied to give an accurate approximation for the excursion probability P{supt∈T X(t) ≥ u}. In particular, we prove that (1.1) holds for a large class of smooth Gaussian random fields with stationary increments and X(0) = 0. In this generality, our main results in Sections 3 and 4 are new even for the case of N = 1. The paper is organized as follows. In Section 2, we provide some preliminaries on Gaussian random fields with stationary increments and prove some basic lemmas. These are derived from the spectral representation of the random fields and will be useful for proving the main results in Sections 3 and 4. THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 3 In Section 3, we compute the mean Euler characteristic E{ϕ(Au )} by applying the Kac–Rice metatheorem in Adler and Taylor [(2007), Theorem 11.2.1] [see also Adler and Taylor (2011), Theorem 4.1.1]. The computation of E{ϕ(Au )} involves the conditional expectation of the determinant of the Hessian ∇2 X(t) given X(t) and ∇X(t), which is more complicated for random fields with nonconstant variance function. For Gaussian random fields with stationary increments, we are able to make use of the properties of ∇X and ∇2 X (e.g., their stationarity) to provide an explicit formula in Theorem 3.2 for E{ϕ(Au )}, using only derivatives of up to second order of the covariance function. Section 4 is the core part of this paper. Theorems 4.6 and 4.8 provide approximations to the excursion probability which are analogous to (1.1) for Gaussian random fields with stationary increments and X(0) = 0. Since these random fields do not have constant variance, it is not clear if the original method for proving Theorem 14.3.3 in Adler and Taylor (2007) is still applicable. Instead, our argument is based on the Rice method in Azaı̈s and Delmas (2002) [see also Adler and Taylor (2007), pages 96–99]. More specifically, we decompose the rectangle T into several faces of lower dimensions and then apply the idea of Piterbarg (1996b) and the Bonferroni inequality to derive upper and lower bounds for P{supt∈T X(t) ≥ u} in terms of the number of extended outward maxima [see (4.1), (4.2)] and local maxima [see (4.3)], respectively. The main idea is to show that, in both cases, the upper bound makes the major contribution for estimating P{supt∈T X(t) ≥ u} and the last two terms in the lower bounds in (4.2) and (4.3) are superexponentially small. Under a mild technical condition on the variogram of X, we apply (4.3) to obtain in Theorem 4.6 an expansion of the excursion probability which is, in spirit, similar to the case of stationary Gaussian fields [cf. (14.0.3) in Adler and Taylor (2007)]. Theorem 4.8 establishes a general approximation to P{supt∈T X(t) ≥ u} in terms of E{ϕ(Au )}, which verifies the “Expected Euler Characteristic Heuristic” for smooth Gaussian random fields with stationary increments and X(0) = 0. For the purpose of comparison, we mention that, if Z = {Z(t), t ∈ RN } is a real-valued, centered stationary Gaussian random field, then the random field X defined by X(t) = Z(t) − Z(0) has stationary increments with X(0) = 0. Consequently, Theorems 4.6 and 4.8 provide approximations to the excursion probability P{supt∈T Z(t) − Z(0) ≥ u}. Section 5 provides further remarks on the main results and some examples where significant simplifications can be made. In Remarks 5.3 and 5.5, we show that if the variance function of the random field attains its maximum at a unique point, then one can apply the Laplace method to derive a first-order approximation for the excursion probability explicitly. Finally, the Appendix contains proofs of some auxiliary lemmas. 4 D. CHENG AND Y. XIAO 2. Gaussian fields with stationary increments. 2.1. Spectral representation. Let X = {X(t), t ∈ RN } be a real-valued centered Gaussian random field with stationary increments. That is, for d d any h ∈ RN , {X(t + h) − X(h), t ∈ RN } = {X(t) − X(0), t ∈ RN }, where = means equality in finite dimensional distributions. We assume that X has continuous covariance function C(t, s) = E{X(t)X(s)}. Then it is known [cf. Yaglom (1957)] that (2.1) C(t, s) − C(t, 0) − C(0, s) + C(0, 0) Z (eiht,λi − 1)(e−ihs,λi − 1)F (dλ) + ht, Θsi, = RN where hx, yi is the ordinary inner product in RN , Θ is an N × N nonnegative definite matrix and F is a nonnegative symmetric measure on RN \{0} which satisfies Z kλk2 (2.2) F (dλ) < ∞. 2 RN 1 + kλk Similar to stationary random fields, the measure F and its density (if it exists) f (λ) are called the spectral measure and spectral density of X, respectively. It is known that many probabilistic, analytic and geometric properties of {X(t), t ∈ RN } can be described in terms of its spectral measure F and, on the other hand, various interesting Gaussian random fields can be constructed by choosing their spectral measures appropriately. See Xiao (2009), Xue and Xiao (2011) and the references therein for more information. By (2.1), we see that X has the following stochastic integral representation: Z d (2.3) (eiht,λi − 1)W (dλ) + hY, ti, X(t) − X(0) = RN where Y is an N -dimensional Gaussian random vector and W is a complexvalued Gaussian random measure (independent of Y) with F as its control measure. Note that in (2.3) there is no restriction on X(0) other than that all joint distributions of {X(t), t ∈ RN } are Gaussian. For simplicity, we assume throughout this paper that Y = 0. It follows from (2.1) or (2.3) that the variogram ν of X is given by Z 2 (2.4) (1 − coshh, λi)F (dλ). ν(h) := E(X(t + h) − X(t)) = 2 RN Mean-square directional derivatives and sample path differentiability of Gaussian random fields have been well studied. See, for example, Adler (1981), Adler and Taylor (2007), Potthoff (2010), Xue and Xiao (2011). THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 5 In particular, general sufficient conditions for a Gaussian random field to have a modification whose sample functions are in C k (RN ) are given by Adler and Taylor (2007). For a Gaussian random field X = {X(t), t ∈ RN } with stationary increments, Xue and Xiao (2011) provided conditions for its sample path differentiability in terms of the spectral density function f (λ). A similar argument can be applied to give the following spectral condition for the sample functions of X to be in C k (RN ), whose proof is given in Cheng (2013) and is omitted here. Proposition 2.1. Let X = {X(t), t ∈ RN } be a real-valued centered Gaussian random field with stationary increments and let ki (1 ≤ i ≤ N ) be nonnegative integers. If there is a constant ε > 0 such that Z N Y (2.5) |λi |2ki +ε F (dλ) < ∞, {kλk≥1} i=1 e e such that the partial derivative k∂ X(t) then X has a modification X is k 1 ∂t1 ···∂tNN P continuous on RN almost surely, where k = N i=1 ki . Moreover, for any comN ′ pact rectangle T ⊂ R and any ε ∈ (0, ε ∧ 1), there exists a constant c1 such that  2 e e ∂ k X(t) ∂ k X(s) ′ (2.6) E ∀t, s ∈ T. ≤ c1 kt − skε − k kN kN k1 1 ∂t1 · · · ∂tN ∂s1 · · · ∂sN k For notational simplicity, we will not distinguish X from its modification e X. As a consequence of Proposition 2.1, we see that, if X = {X(t), t ∈ RN } has a spectral density f (λ) which satisfies   1 f (λ) = O (2.7) as kλk → ∞, kλkN +2k+H for some integer k ≥ 1 and H ∈ (0, 1), then the sample functions of X are in C k (RN ) a.s. Further examples of anisotropic Gaussian random fields which may have different smoothness along different directions can be found in Xue and Xiao (2011). ∂ 2 X(t) When X(·) ∈ C 2 (RN ) almost surely, we write ∂X(t) ∂ti = Xi (t) and ∂ti ∂tj = Xij (t). We will use the same notation for the partial derivatives of deterministic functions such as ν(·) in Theorem 4.6. Denote by ∇X(t) and ∇2 X(t) the column vector (X1 (t), . . . , XN (t))T and the N × N matrix (Xij (t))i,j=1,...,N , respectively. It follows from (2.1) that for every t ∈ RN , Z ∂ 2 C(t, s) (2.8) = E{Xi (t)Xj (t)}. λi λj F (dλ) = λij := ∂ti ∂sj s=t RN 6 D. CHENG AND Y. XIAO Let Λ = (λij )i,j=1,...,N , then (2.8) shows that Λ = Cov(∇X(t)) for all t. In particular, the distribution of ∇X(t) is independent of t. Let Z λi λj cosht, λiF (dλ), Λ(t) := (λij (t))i,j=1,...,N . λij (t) := RN Then we have (2.9) λij (t) − λij = = Z RN λi λj (cosht, λi − 1)F (dλ) ∂ 2 C(t, s) ∂si ∂sj s=t = E{(X(t) − X(0))Xij (t)}, or equivalently, Λ(t) − Λ = E{(X(t) − X(0))∇2 X(t)}. In studies of a Gaussian random field X with stationary increments in the literature, it is often assumed that X(0) = 0. In this case, Λ(t) − Λ = E{X(t)∇2 X(t)}. With little loss of generality, we will follow this convention by assuming X(0) = 0 in the rest of this paper. The general case can be dealt with by first applying the result of this paper to the random field {X(t) − X(0), t ∈ RN } and then taking into consideration of the available information on X(0) [an interesting special case is when X(0) is independent of {X(t) − X(0), t ∈ RN }]. Q 2.2. Hypotheses and some important properties. Let T = N i=1 [ai , bi ] be a compact rectangle in RN , where ai < bi for all 1 ≤ i ≤ N and 0 ∈ / T (the case of 0 ∈ T will be discussed in Remark 5.1). In addition to assuming that the Gaussian random field X = {X(t), t ∈ RN } has stationary increments and X(0) = 0, we will make use of the following conditions: (H1) X(·) ∈ C 2 (T ) almost surely and its second derivatives satisfy the uniform mean-square Hölder condition: there exist constants L > 0 and η ∈ (0, 1] such that (2.10) E(Xij (t) − Xij (s))2 ≤ Lkt − sk2η ∀t, s ∈ T, i, j = 1, . . . , N. (H2) For every t ∈ T , the matrix Λ − Λ(t) is nondegenerate. (H3) For every pair (t, s) ∈ T 2 with t 6= s, the Gaussian random vector (X(t), ∇X(t), Xij (t), X(s), ∇X(s), Xij (s), 1 ≤ i ≤ j ≤ N ) is nondegenerate. (H3′ ) For every t ∈ T , (X(t), ∇X(t), Xij (t), 1 ≤ i ≤ j ≤ N ) is nondegenerate. Clearly, by Proposition 2.1, condition (H1) is satisfied if (2.7) holds for k = 2. Also note that (H3) implies (H3′ ). We shall use conditions (H1), THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 7 (H2) and (H3) to prove Theorems 4.6 and 4.8 on the excursion probability. Condition (H3′ ) will be used for computing E{ϕ(Au )} in Theorem 3.2. We point out that the nondegeneracy conditions (H3) and (H3′ ) are standard for studying crossing problems when N = 1, excursion sets and excursion probabilities of smooth Gaussian random fields. In the case where N = 1 and X is a stationary Gaussian process, Cramér and Leadbetter [(1967), pages 203–204] showed that (H3′ ) is automatically satisfied if X has second-order mean square derivatives and the spectral measure of X is not purely discrete. See Exercises 3.4 and 3.5 in Azaı̈s and Wschebor [(2009), page 87] for similar results. Notice that (H3) and (H3′ ) are equivalent to saying that the corresponding covariance matrices are nondegenerate which, in turn, can be verified by establishing positive lower bounds for the conditional variances. Thus, (H3) and (H3′ ) are related to the properties of local nondeterminism [cf. Cuzick (1977), Xiao (2009)]. Hence, for a general Gaussian random field X with stationary increments, it is possible to provide sufficient conditions in terms of the spectral measure F for (H3) and (H3′ ) to hold. In order not to make this paper too lengthy, we do not give details here. The following lemma shows that for Gaussian fields with stationary increments and X(0) = 0, (H2) is equivalent to Λ − Λ(t) being positive definite. Lemma 2.2. For every t ∈ RN , Λ − Λ(t) is nonnegative definite. Hence, under (H2), Λ − Λ(t) is positive definite for every t ∈ T . Proof. Let t ∈ RN be fixed. It follows from (2.9) that for any (a1 , . . . , aN ) ∈ \ {0}, !2 Z N N X X ai λi (1 − cosht, λi)F (dλ). (2.11) ai aj (λij − λij (t)) = RN i,j=1 RN i=1 P 2 N Since ( N i=1 ai λi ) (1 − cosht, λi) ≥ 0 for all λ ∈ R , (2.11) is always nonnegative, which implies that Λ − Λ(t) is nonnegative definite. If (H2) is satisfied, then, for every t ∈ T , all the eigenvalues of Λ − Λ(t) are positive. This completes the proof.  It follows from (2.11) that, if the spectral measure F is full [i.e., not supported on any (N − 1)-dimensional hyperplane], then (H2) holds. Hence, (H2) is in fact a mild condition for smooth Gaussian fields with stationary increments. Lemma 2.2 and the following two lemmas indicate some significant properties of Gaussian fields with stationary increments. They will play important roles in later sections. 8 D. CHENG AND Y. XIAO Lemma 2.3. Let t ∈ RN be fixed. Then for all i, j, k, the random variables Xi (t) and Xjk (t) are independent. Moreover, E{Xij (t)Xkl (t)} is symmetric in i, j, k, l. Proof. By (2.1), one can verify that for t, s ∈ RN , Z ∂ 3 C(t, s) E{Xi (t)Xjk (s)} = λi λj λk sinht − s, λiF (dλ). = ∂ti ∂sj ∂sk RN Letting s = t we see that Xi (t) and Xjk (t) are independent. Similarly, we have Z ∂ 4 C(t, s) E{Xij (t)Xkl (s)} = λi λj λk λl cosht − s, λiF (dλ). = ∂ti ∂tj ∂sk ∂sl RN This implies the second conclusion.  The following lemma is a consequence of Lemma 2.3. Lemma 2.4. fixed t ∈ RN , Let A = (aij )1≤i,j≤N be a symmetric matrix. Then for any St (i, j, k, l) = E{(A∇2 X(t)A)ij (A∇2 X(t)A)kl } is a symmetric function of i, j, k, l. 3. The mean Euler characteristic. Q 3.1. Related existing results and notation. The rectangle T = N i=1 [ai , bi ] can be decomposed into several faces of lower dimensions. We use the same notation as in Adler and Taylor [(2007), page 134]. A face J of dimension k, is defined by fixing a subset σ(J) ⊂ {1, . . . , N } of size k [if k = 0, we have σ(J) = ∅ by convention] and a subset ε(J) = {εj , j ∈ / σ(J)} ⊂ {0, 1}N −k of size N − k, so that J = {t = (t1 , . . . , tN ) ∈ T : aj < tj < bj ifj ∈ σ(J), tj = (1 − εj )aj + εj bj ifj ∈ / σ(J)}. Denote by ∂k T the collection of all k-dimensional faces in T , then the in◦ terior S of T is given by T = ∂N T and the boundary of T is given by ∂T = S N −1 2 k=0 J∈∂k T J . For J ∈ ∂k T , denote by ∇X|J (t) and ∇ X|J (t) the column vector (Xi1 (t), . . . , Xik (t))Ti1 ,...,ik ∈σ(J) and the k × k matrix (Xmn (t))m,n∈σ(J) , respectively. THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 9 If X(·) ∈ C 2 (RN ) and it is a Morse function a.s. [cf. Definition 9.3.1 in Adler and Taylor (2007)], then according to Corollary 9.3.5 or pages 211– 212 in Adler and Taylor (2007), the Euler characteristic of the excursion set Au = {t ∈ T : X(t) ≥ u} is given by (3.1) ϕ(Au ) = N X X k=0 J∈∂k T k X (−1)i µi (J) (−1) k i=0 with (3.2) µi (J) := #{t ∈ J : X(t) ≥ u, ∇X|J (t) = 0, index(∇2 X|J (t)) = i, ε∗j Xj (t) ≥ 0 for all j ∈ / σ(J)}, where ε∗j = 2εj − 1 and the index of a matrix is defined as the number of its negative eigenvalues. We also define (3.3) µ ei (J) := #{t ∈ J : X(t) ≥ u, ∇X|J (t) = 0, index(∇2 X|J (t)) = i}. It follows from (2.4) that ν(t) = Var(X(t)). Let σT2 = supt∈T ν(t) be the maximum variance. For any t ∈ T and J ∈ ∂k T , where k ≥ 1, let ΛJ = (λij )i,j∈σ(J) = Cov(∇X|J (t)), ΛJ (t) = (λij (t))i,j∈σ(J) , (3.4) 2 θJ,t = Var(X(t)|∇X|J (t)), γt2 = Var(X(t)|∇X(t)), {J1 , . . . , JN −k } = {1, . . . , N } \ σ(J), E(J) = {(tJ1 , . . . , tJN−k ) ∈ RN −k : tj ε∗j ≥ 0, j = J1 , . . . , JN −k }. 2 ≥ γ 2 for all t ∈ T and θ 2 = γ 2 if J = ∂ T . If J = {τ } ∈ ∂ T is Note that θJ,t N 0 t t J,t 2 as ν(t) by convention. a vertex, then ∇X|J (t) is not defined and we set θJ,t Moreover, if J = {τ } ∈ ∂0 T , then E({τ }) is a quadrant of RN decided by 2 as θ 2 for the corresponding ε({τ }) ∈ {0, 1}N . In the sequel, we will write θJ,t t simplicity of notation. This will not cause any confusion because θt2 always appears together with t ∈ J . For t ∈ T , let Cj (t) be the (1, j + 1) entry of (Cov(X(t), ∇X(t)))−1 , that is, Cj (t) = M1,j+1 (t)/ detCov(X(t), ∇X(t)), where M1,j+1 (t) is the cofactor of the (1, j + 1) entry, E{X(t)Xj (t)}, in the covariance matrix Cov(X(t), ∇X(t)). If {X(t), t ∈ RN } is replaced by a Gaussian field {Z(t), t ∈ RN } with constant variance, the independence of Z(t) and ∇Z(t) for each t implies that M1,j+1 (t) and hence Cj (t) is zero for all j ≥ 1. 10 D. CHENG AND Y. XIAO Denote by Hk (x) the Hermite polynomial of order k, that is, Hk (x) = 2 dk −x2 /2 ). Then it can be verified directly [cf. Adler and Taylor (−1)k ex /2 dx k (e (2007), page 289] that Z ∞ 2 2 (3.5) Hk (x)e−x /2 dx = Hk−1 (u)e−u /2 , u where u > 0 and k ≥ 1. For a matrix A, let |A| denote its determinant. Let R∞ 2 R+ = [0, ∞), R− = (−∞, 0] and let Ψ(u) = (2π)−1/2 u e−x /2 dx. 3.2. Computing the mean Euler characteristic. The following lemma is an extension of Lemma 11.7.1 in Adler and Taylor (2007). It provides a key step for computing the mean Euler characteristic in Theorem 3.2 below, and has a close connection with Theorem 4.6. It follows from (3.6) P that (−1)k E{ ki=0 (−1)i µ ei (J)} is always positive. This fact will be used to approximate the expected number of local maxima above level u; see Lemma 4.1. Lemma 3.1. Let X = {X(t), t ∈ RN } be a centered Gaussian random field with stationary increments and X(0) = 0. Suppose conditions (H1), (H2) and (H3′ ) hold. Then for each J ∈ ∂k T with k ≥ 1, ) ( k X (−1)i µ ei (J) E i=0 (3.6) (−1)k = (2π)(k+1)/2 |ΛJ |1/2 Z J   |ΛJ − ΛJ (t)| u −u2 /(2θt2 ) dt. Hk−1 e k θt θt Proof. Let Di be the collection of all k × k matrices with index i. Recall the definition of µ ei (J) in (3.3), and thanks to (H1) and (H3′ ), we can apply the Kac–Rice metatheorem [cf. Theorem 11.2.1 or Corollary 11.2.2 in Adler and Taylor (2007)] to get that the left-hand side of (3.6) becomes Z p∇X|J (t) (0) dt (3.7) J k X (−1)i E{|det ∇2 X|J (t)|1{∇2 X|J (t)∈Di } 1{X(t)≥u} |∇X|J (t) = 0}. × i=0 Note that on the set Di , the matrix ∇2 X|J (t) has i negative eigenvalues, S which implies (−1)i | det ∇2 X|J (t)| = det ∇2 X|J (t). Also, ki=0 {∇2 X|J (t) ∈ Di } = Ω a.s., hence (3.7) equals Z p∇X|J (t) (0) dt E{det ∇2 X|J (t)1{X(t)≥u} |∇X|J (t) = 0} J THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 11 (3.8) = Z dt Z ∞ u J dx e−x 2 /(2θ 2 ) t (2π)(k+1)/2 |ΛJ |1/2 θt × E{det ∇2 X|J (t)|X(t) = x, ∇X|J (t) = 0}. Now we turn to computing E{det ∇2 X|J (t)|X(t) = x, ∇X|J (t) = 0} in (3.8). By Lemma 2.2, under (H2), Λ − Λ(t), and hence ΛJ − ΛJ (t) are positive definite for every t ∈ J . Thus, there exists a k × k positive definite matrix Qt such that (3.9) Qt (ΛJ − ΛJ (t))Qt = Ik , where Ik is the k × k identity matrix. It follows from (2.9) that ΛJ (t) − ΛJ = E{X(t)∇2 X|J (t)}. Hence, E{X(t)(Qt ∇2 X|J (t)Qt )ij } = −(Qt (ΛJ − ΛJ (t))Qt )ij = −δij , where δij is the Kronecker delta function. We write (3.10) E{det(Qt ∇2 X|J (t)Qt )|X(t) = x, ∇X|J (t) = 0} = E{det ∆(t, x)}, where ∆(t, x) = (∆ij (t, x))i,j∈σ(J) with all elements ∆ij (t, x) being Gaussian variables. To study ∆(t, x), we only need to find the mean and covariance of ∆ij (t, x). Note that ∇X(t) and ∇2 X(t) are independent by Lemma 2.3, thus E{∆ij (t, x)} = E{(Qt ∇2 X|J (t)Qt )ij |X(t) = x, ∇X|J (t) = 0} = (E{X(t)(Qt ∇2 X|J (t)Qt )ij }, 0, . . . , 0) (3.11) × (Cov(X(t), ∇X|J (t)))−1 (x, 0, . . . , 0)T = (−δij , 0, . . . , 0)(Cov(X(t), ∇X|J (t)))−1 (x, 0, . . . , 0)T x = − 2 δij , θt where the last equality comes from the fact that the (1, 1) entry of (Cov(X(t), ∇X|J (t)))−1 is detCov(∇X|J (t))/ detCov(X(t), ∇X|J (t)) = 1/θt2 . For the covariance, we have E{(∆ij (t, x) − E{∆ij (t, x)})(∆kl (t, x) − E{∆kl (t, x)})} = E{(Qt ∇2 X|J (t)Qt )ij (Qt ∇2 X|J (t)Qt )kl } − (E{X(t)(Qt ∇2 X|J (t)Qt )ij }, 0, . . . , 0) × (Cov(X(t), ∇X|J (t)))−1 (E{X(t)(Qt ∇2 X|J (t)Qt )kl }, 0, . . . , 0)T = St (i, j, k, l) − (−δij , 0, . . . , 0)(Cov(X(t), ∇X|J (t)))−1 (−δkl , 0, . . . , 0)T = St (i, j, k, l) − δij δkl , θt2 12 D. CHENG AND Y. XIAO where St is a symmetric function of i, j, k, l by Lemma 2.4 with A replaced by Qt . Therefore, (3.10) becomes   1 2 det(θ Q (∇ X (t))Q ) X(t) = x, ∇X (t) = 0 E k t t t |J |J θt    1 x e = k E det ∆(t) − Ik , θt θt e e ij (t))i,j∈σ(J) and all entries ∆ e ij (t) are Gaussian variables where ∆(t) = (∆ satisfying e ij (t)} = 0, e ij (t)∆ e kl (t)} = θt2 St (i, j, k, l) − δij δkl . E{∆ E{∆ By Corollary 11.6.3 in Adler and Taylor (2007), (3.10) is equal to (−1)k θt−k × Hk (x/θt ), hence E{det ∇2 X|J (t)|X(t) = x, ∇X|J (t) = 0} 2 −1 = E{det(Q−1 t Qt ∇ X|J (t)Qt Qt )|X(t) = x, ∇X|J (t) = 0} = |ΛJ − ΛJ (t)|E{det(Qt ∇2 X|J (t)Qt )|X(t) = x, ∇X|J (t) = 0}   (−1)k x = . |ΛJ − ΛJ (t)|Hk k θt θt Plugging this into (3.8) and applying (3.5), we obtain the desired result.  The following is the main theorem of this section, which is an extension of Theorem 11.7.2 of Adler and Taylor (2007) to Gaussian random fields with stationary increments. Notice that in (3.12), for every {t} ∈ ∂0 T , ∇X(t) ∈ E({t}) specifies the signs of the partial derivatives Xj (t) (j = 1, . . . , N ) and, for J ∈ ∂k T , the set {J1 , . . . , JN −k } is defined in (3.4). Theorem 3.2. Let X = {X(t), t ∈ RN } be a centered Gaussian random field with stationary increments and X(0) = 0. Suppose conditions (H1), (H2) and (H3′ ) hold. Then E{ϕ(Au )} = X {t}∈∂0 T Z ∞ Z Z 1 (2π)k/2 |ΛJ |1/2 k=1 J∈∂k T |ΛJ − ΛJ (t)| γtk E(J) u J   x × Hk + γt CJ1 (t)yJ1 + · · · + γt CJN−k (t)yJN−k γt × (3.12) Z P(X(t) ≥ u, ∇X(t) ∈ E({t})) + N X X dt dx × pX(t),XJ1 (t),...,XJ ··· N−k dyJ1 · · · dyJN−k (t) (x, yJ1 , . . . , yJN−k |∇X|J (t) = 0). THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 13 Remark 3.3. If Z = {Z(t), t ∈ RN } is a smooth centered stationary Gaussian random field, then the mean Euler characteristic of the excursion set {t ∈ T : Z(t) ≥ u} is given by Theorem 11.7.2 in Adler and Taylor (2007). Applying Theorem 3.2 to X(t) = Z(t) − Z(0), (3.12) computes the mean Euler characteristic of Au = {t ∈ T : Z(t) − Z(0) ≥ u}. Proof of Theorem 3.2. According to Corollary 11.3.2 in Adler and Taylor (2007), (H1) and (H3′ ) imply that X is a Morse function a.s. It follows from (3.1) that ( k ) N X X X k i (3.13) (−1) E (−1) µi (J) . E{ϕ(Au )} = i=0 k=0 J∈∂k T If J ∈ ∂0 T , say J = {t}, it turns out that E{µ0 (J)} = P(X(t) ≥ u, ∇X(t) ∈ E({t})). If J ∈ ∂k T with k ≥ 1, we apply the Kac–Rice metatheorem in Adler and Taylor (2007) to obtain that the expectation on the right-hand side of (3.13) becomes Z p∇X|J (t) (0) dt J × k X i=0 (3.14) = (−1)i E{|det ∇2 X|J (t)|1{∇2 X|J (t)∈Di } 1{(XJ1 (t),...,XJ 1 k/2 (2π) |ΛJ |1/2 Z dt J Z ∞ u dx Z ··· Z N−k (t))∈E(J)} × 1{X(t)≥u} |∇X|J (t) = 0} E(J) dyJ1 · · · dyJN−k × E{det ∇2 X|J (t)|X(t) = x, XJ1 (t) = yJ1 , . . . , XJN−k (t) = yJN−k , ∇X|J (t) = 0} × pX(t),XJ1 (t),...,XJ N−k (t) (x, yJ1 , . . . , yJN−k |∇X|J (t) = 0). For fixed t, let Qt be the positive definite matrix in (3.9). Then, similar to the proof in Lemma 3.1, we can write E{det(Qt ∇2 X|J (t)Qt )|X(t) = x, XJ1 (t) = yJ1 , . . . , XJN−k = yJN−k , ∇X|J (t) = 0} as E{det ∆(t, x)}, where ∆(t, x) is a matrix consisting of Gaussian entries ∆ij (t, x) with mean E{(Qt ∇2 X|J (t)Qt )ij |X(t) = x, XJ1 (t) = yJ1 , . . . , XJN−k = yJN−k , ∇X|J (t) = 0} 14 D. CHENG AND Y. XIAO (3.15) = (−δij , 0, . . . , 0)(Cov(X(t), XJ1 (t), . . . , XJN−k (t), ∇X|J (t)))−1 × (x, yJ1 , . . . , yJN−k , 0, . . . , 0)T =− δij (x + γt2 CJ1 (t)yJ1 + · · · + γt2 CJN−k (t)yJN−k ), γt2 and covariance E{(∆ij (t, x) − E{∆ij (t, x)})(∆kl (t, x) − E{∆kl (t, x)})} = St (i, j, k, l) − δij δkl . γt2 Following the same procedure in the proof of Lemma 3.1, we obtain that the last conditional expectation in (3.14) is equal to (3.16) (−1)k |ΛJ − ΛJ (t)| γtk   x + γt CJ1 (t)yJ1 + · · · + γt CJN−k (t)yJN−k . × Hk γt Plugging this into (3.14) and (3.13) yields the desired result.  Remark 3.4. Usually, for a nonstationary (including constant-variance) Gaussian field X on RN , its mean Euler characteristic involves at least the third-order derivatives of the covariance function. For Gaussian random fields with stationary increments, as shown in Lemma 2.3, E{Xij (t)Xk (t)} = 0 and E{Xij (t)Xkl (t)} is symmetric in i, j, k, l. Hence, the mean Euler characteristic becomes simpler, containing only up to second-order derivatives of the covariance function. This can also be seen from the spectral representation (2.3) which implies that ∇X and ∇2 X are stationary. In various practical applications, (3.12) can be simplified with only an exponentially smaller difference. See the discussions in Section 5. 4. Excursion probability. 4.1. As in Section 3.1, we decompose T into its faces as S Preliminaries. S T= N J . For k ≥ 1 and any J ∈ ∂k T , define the number of exk=0 J∈∂k T tended outward maxima above level u as MuE (J) := #{t ∈ J : X(t) ≥ u, ∇X|J (t) = 0, index(∇2 X|J (t)) = k, ε∗j Xj (t) ≥ 0 for allj ∈ / σ(J)}. In fact, MuE (J) is the same as µk (J) defined in (3.2) with i = k. For k = 0 and any {t} ∈ ∂0 T , let MuE ({t}) := 1{X(t)≥u,∇X(t)∈E({t})} = 1{X(t)≥u,ε∗j Xj (t)≥0,∀j=1,...,N } . THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 15 One can show easily that, under conditions (H1) and (H3′ ), N n o [ [ {MuE (J) ≥ 1} sup X(t) ≥ u = t∈T a.s. k=0 J∈∂k T It follows that N X N X n o X X P{MuE (J) ≥ 1} ≤ (4.1) P sup X(t) ≥ u ≤ E{MuE (J)}. t∈T k=0 J∈∂k T k=0 J∈∂k T On the other hand, by the Bonferroni inequality, N X n o X X P{MuE (J) ≥ 1}− P{MuE (J) ≥ 1, MuE (J ′ ) ≥ 1}. P sup X(t) ≥ u ≥ t∈T J6=J ′ k=0 J∈∂k T Note that [cf. Piterbarg (1996b)] E{MuE (J)} − P{MuE (J) ≥ 1} ≤ 21 E{MuE (J)(MuE (J) − 1)}, together with the obvious bound P{MuE (J) ≥ 1, MuE (J ′ ) ≥ 1} ≤ E{MuE (J) × MuE (J ′ )}, we obtain the following lower bound for the excursion probability  N X  n o X 1 E E E P sup X(t) ≥ u ≥ E{Mu (J)} − E{Mu (J)(Mu (J) − 1)} 2 t∈T k=0 J∈∂k T (4.2) X − E{MuE (J)MuE (J ′ )}. J6=J ′ Define the number of local maxima above level u as Mu (J) := #{t ∈ J : X(t) ≥ u, ∇X|J (t) = 0, index(∇2 X|J (t)) = k}. ek (J) defined Then obviously Mu (J) ≥ MuE (J) and Mu (J) is the same as µ in (3.3) with i = k. It follows similarly that N X X k=0 J∈∂k T (4.3) n o E{Mu (J)} ≥ P sup X(t) ≥ u t∈T ≥ N X  X k=0 J∈∂k T − X 1 E{Mu (J)} − E{Mu (J)(Mu (J) − 1)} 2  E{Mu (J)Mu (J ′ )}. J6=J ′ We will use (4.1) and (4.2) to estimate the excursion probability for the general case in Theorem 4.8. Inequalities in (4.3) provide another method 16 D. CHENG AND Y. XIAO to approximate the excursion probability in some special cases; see Theorem 4.6. The advantage of (4.3) is that the principal term induced by PN P k=0 J∈∂k T E{Mu (J)} is much easier to compute compared with the one P P E induced by N k=0 J∈∂k T E{Mu (J)}. 4.2. Estimating the moments: Major terms and error terms. The following two lemmas provide the estimations for the principal terms in approximating the excursion probability. Lemma 4.1. Let X be a Gaussian field as in Theorem 3.2. Then for each J ∈ ∂k T with k ≥ 1, there exists some constant α > 0 such that E{Mu (J)} = (4.4) 1 (2π)(k+1)/2 |ΛJ |1/2 × Z J   |ΛJ − ΛJ (t)| u −u2 /(2θt2 ) 2 dt(1 + o(e−αu )). Hk−1 e k θt θt Proof. Following the notation in the proof of Lemma 3.1, we obtain similarly that E{Mu (J)} Z = p∇X|J (t) (0) dtE{|det ∇2 X|J (t)|1{∇2 X|J (t)∈Dk } 1{X(t)≥u} |∇X|J (t) = 0} J (4.5) = Z J dt Z ∞ u 2 2 (−1)k e−x /(2θt ) dx (2π)(k+1)/2 |ΛJ |1/2 θt × E{det ∇2 X|J (t)1{∇2 X|J (t)∈Dk } |X(t) = x, ∇X|J (t) = 0}. Recall that Qt is the k × k positive definite matrix in (3.9). We write (3.11) as x E{Qt ∇2 X|J (t)Qt |X(t) = x, ∇X|J (t) = 0} = − 2 Ik . θt Make change of variables V (t) = Qt ∇2 X|J (t)Qt + x Ik . θt2 Then (V (t)|X(t) = x, ∇X|J (t) = 0) is a Gaussian matrix whose mean is 0 and covariance is the same as that of (Qt ∇2 X|J (t)Qt |X(t) = x, ∇X|J (t) = 0). Write V (t) = (Vij (t))1≤i,j≤k and denote the density of Gaussian vectors THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 17 ((Vij (t))1≤i≤j≤k |X(t) = x, ∇X|J (t) = 0) by ht (v), where v = (vij )1≤i≤j≤k ∈ Rk(k+1)/2 . Then E{det(Qt ∇2 X|J (t)Qt )1{∇2 X|J (t)∈Dk } |X(t) = x, ∇X|J (t) = 0} (4.6) = E{det(Qt ∇2 X|J (t)Qt )1{Qt ∇2 X|J (t)Qt ∈Dk } |X(t) = x, ∇X|J (t) = 0}   Z x det (vij ) − 2 Ik ht (v) dv, = θt {v : (vij )−(x/θt2 )Ik ∈Dk } where (vij ) is the abbreviation for the matrix (vij )1≤i,j≤k . Since {θt2 : t ∈ T } is bounded, there exists a constant c > 0 such that !1/2 k X x x 2 (vij ) − 2 Ik ∈ Dk < . vij ∀k(vij )k := c θt i,j=1 Thus, we can write (4.6) as   Z x det (vij ) − 2 Ik ht (v) dv θt Rk(k+1)/2   Z x det (vij ) − 2 Ik ht (v) dv − (4.7) θt / k} {v : (vij )−(x/θt2 )Ik ∈D = E{det(Qt ∇2 X|J (t)Qt )|X(t) = x, ∇X|J (t) = 0} + Z(t, x), where Z(t, x) is the second integral in the first line of (4.7) and it satisfies   Z x det (vij ) − 2 Ik ht (v) dv. |Z(t, x)| ≤ θt k(vij )k≥x/c Denote by G(t) the covariance matrix of ((Vij (t))1≤i≤j≤k |X(t) = x, ∇X|J (t) = 0). Then by Lemma A.1 in the Appendix, the eigenvalues of G(t) and those of (G(t))−1 are bounded for all t ∈ T . It follows that there exists some con2 ′ 2 stant α′ > 0 such that ht (v) = o(e−α k(vij )k ) and hence |Z(t, x)| = o(e−αx ) for some constant α > 0 uniformly for all t ∈ T . Combining this with (4.5), (4.6), (4.7) and the proof of Lemma 3.1 yields (4.4).  Lemma 4.2. Let X be a Gaussian field as in Theorem 3.2. Then for each J ∈ ∂k T with k ≥ 1, there exists some constant α > 0 such that E{MuE (J)} Z Z Z ∞ Z 1 dyJ1 · · · dyJN−k dx · · · dt = (2π)k/2 |ΛJ |1/2 J E(J) u (4.8)   |ΛJ − ΛJ (t)| x × + γt CJ1 (t)yJ1 + · · · + γt CJN−k (t)yJN−k Hk γt γtk × pX(t),XJ1 (t),...,XJ 2 (x, yJ1 , . . . , yJN−k |∇X|J (t) = 0)(1 + o(e−αu )). (t) N−k 18 D. CHENG AND Y. XIAO Proof. Similar to the proof in Theorem 3.2, we see that E{MuE (J)} is equal to Z Z Z ∞ Z (−1)k |ΛJ − ΛJ (t)| dyJ1 · · · dyJN−k dx · · · dt (2π)k/2 |ΛJ |1/2 E(J) u J × E{det(Qt ∇2 X|J (t)Qt )1{Qt ∇2 X|J (t)Qt ∈Dk } | X(t) = x, XJ1 (t) = yJ1 , . . . , XJN−k (t) = yJN−k , ∇X|J (t) = 0} × pX(t),XJ1 (t),...,XJ (t) (x, yJ1 , . . . , yJN−k |∇X|J (t) = 0) N−k Z Z ∞ (−1)k |ΛJ − ΛJ (t)| := dxK(t, x), dt (2π)k/2 |ΛJ |1/2 J u where Qt is the positive definite matrix in (3.9). Then, by using a similar argument as in the proof of Lemma 4.1 to estimate K(t, x), we obtain the desired result.  We call a function h(u) super-exponentially small [when compared with P(supt∈T X(t) ≥ u)], if there exists a constant α > 0 such that h(u) = 2 2 2 o(e−αu −u /(2σT ) ) as u → ∞. The following lemma is Lemma 4 in Piterbarg (1996b). It will be used to show that the factorial moments of Mu (J) and MuE (J) are usually superexponentially small. Lemma 4.3. Let {X(t) : t ∈ RN } be a centered Gaussian field satisfying (H1) and (H3). Then for any ε > 0, there exists ε1 > 0 such that for any J ∈ ∂k T and u large enough, E{Mu (J)(Mu (J) − 1)} ≤ e−u 2 /(2β 2 +ε) J + e−u 2 /(2σ 2 −ε ) 1 J , where σJ2 = supt∈J Var(X(t)) and βJ2 = supt∈J supe∈Sk−1 Var(X(t)|∇X|J (t), ∇2 X|J (t)e). Here and in the sequel, Sk−1 is the unit sphere in Rk . Corollary 4.4. Let X = {X(t), t ∈ RN } be a centered Gaussian random field with stationary increments satisfying (H1), (H2) and (H3). Then for all J ∈ ∂k T , E{Mu (J)(Mu (J) − 1)} and E{MuE (J)(MuE (J) − 1)} are super-exponentially small. Proof. Since MuE (J) ≤ Mu (J), we only need to show that E{Mu (J) × (Mu (J) − 1)} is super-exponentially small. If k = 0, then Mu (J) is either 0 or 1 and hence E{Mu (J)(Mu (J) − 1)} = 0. If k ≥ 1, then, thanks to Lemma 4.3, it suffices to show that βJ2 is strictly less than σT2 . THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 19 Clearly, Var(X(t)|∇X|J (t), ∇2 X|J (t)e) ≤ σT2 for every e ∈ Sk−1 and t ∈ T . On the other hand, (4.9) Var(X(t)|∇X|J (t), ∇2 X|J (t)e) = σT2 =⇒ E{X(t)(∇2 X|J (t)e)} = 0. Note that, by (2.9), the right-hand side of (4.9) is equivalent to (ΛJ (t) − ΛJ )e = 0. However, by (H2), ΛJ (t) − ΛJ is negative definite, which implies (ΛJ (t) − ΛJ )e 6= 0 for all e ∈ Sk−1 . Thus Var(X(t)|∇X|J (t), ∇2 X|J (t)e) < σT2 for all e ∈ Sk−1 and t ∈ T . This and the continuity of Var(X(t)|∇X|J (t), ∇2 X|J (t)e) in (e, t) imply βJ2 < σT2 .  The following lemma shows that the cross terms in (4.2) and (4.3) are super-exponentially small if the two faces are not adjacent. For the case when the faces are adjacent, the proof is more technical. See the proofs in Theorems 4.6 and 4.8. Lemma 4.5. Let X = {X(t), t ∈ RN } be a centered Gaussian random field with stationary increments satisfying (H1) and (H3). Let J and J ′ be two faces of T such that their distance is positive, that is, inf t∈J,s∈J ′ ks − tk > δ0 for some δ0 > 0. Then E{Mu (J)Mu (J ′ )} is super-exponentially small. Proof. We first consider the case when dim(J) = k ≥ 1 and dim(J ′ ) = ≥ 1. By the Kac–Rice metatheorem for higher moments [the proof is the same as that of Theorem 11.5.1 in Adler and Taylor (2007)], k′ E{Mu (J)Mu (J ′ )} Z Z dsE{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)| dt = J′ J × 1{X(t)≥u,X(s)≥u} × 1{∇2 X|J (t)∈Dk ,∇2 X|J ′ (s)∈Dk′ } | X(t) = x, X(s) = y, ∇X|J (t) = 0, ∇X|J ′ (s) = 0} (4.10) ≤ Z J dt Z J′ × pX(t),X(s),∇X|J (t),∇X|J ′ (s) (x, y, 0, 0) Z ∞ Z ∞ dy dx ds u u 2 E{|det ∇ X|J (t)||det ∇2 X|J ′ (s)|| × X(t) = x, X(s) = y, ∇X|J (t) = 0, ∇X|J ′ (s) = 0}pX(t),X(s) (x, y) ×p∇X|J (t),∇X|J ′ (s) (0, 0|X(t) = x, X(s) = y). 20 D. CHENG AND Y. XIAO Note that the following two inequalities hold: For constants ai and bj , ! k′ k k′ k X X Y Y 1 k+k ′ k+k ′ ; |bj | + |ai | |bj | ≤ |ai | k + k′ i=1 i=1 j=1 j=1 and for any Gaussian variable ξ and positive integer l, E|ξ|l ≤ E(|Eξ| + |ξ − Eξ|)l ≤ 2l (|Eξ|l + E|ξ − Eξ|l ) = 2l (|Eξ|l + Kl (Var(ξ))l/2 ), where the constant Kl depends only on l. It follows from these two inequalities that there exist some positive constants C1 and N1 such that for large x and y, sup E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)||X(t) = x, X(s) = y, ∇X|J (t) = 0, t∈J,s∈J ′ (4.11) ∇X|J ′ (s) = 0} ≤ C 1 x N1 y N1 . Also, there exists a positive constant C2 such that sup p∇X|J (t),∇X|J ′ (s) (0, 0|X(t) = x, X(s) = y) t∈J,s∈J ′ ′ ≤ sup (2π)−(k+k )/2 (4.12) t∈J,s∈J ′ × [detCov(∇X|J (t), ∇X|J ′ (s)|X(t) = x, X(s) = y)]−1/2 ≤ C2 . Let ρ(δ0 ) = supks−tk>δ0 |E{X(t)X(s)}| √ ν(t)ν(s) which is strictly less than 1 due to (H3), then ∀ε > 0, there exists a positive constant C3 such that for all t ∈ J , s ∈ J ′ and u large enough, Z ∞Z ∞ xN1 y N1 pX(t),X(s) (x, y) dx dy u (4.13) u = E{[X(t)X(s)]N1 1{X(t)≥u,X(s)≥u} } ≤ E{[X(t) + X(s)]2N1 1{X(t)+X(s)≥2u} }   u2 2 . ≤ C3 exp εu − (1 + ρ(δ0 ))σT2 Combining (4.10) with (4.11), (4.12) and (4.13) yields that E{Mu (J)Mu (J ′ )} is super-exponentially small. THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 21 When only one of the faces, say J , is a singleton, then let J = {t0 } and we have E{Mu (J)Mu (J ′ )} Z Z ∞ Z (4.14) dx ds ≤ J′ ∞ u u dypX(t0 ),X(s),∇X|J ′ (s) (x, y, 0) × E{|det ∇2 X|J ′ (s)||X(t0 ) = x, X(s) = y, ∇X|J ′ (s) = 0}. Following the previous discussion yields that E{Mu (J)Mu (J ′ )} is superexponentially small. Finally, if both J and J ′ are singletons, then E{Mu (J)Mu (J ′ )} becomes the joint probability of two Gaussian variables exceeding level u, and hence is trivial.  4.3. Main results and their proofs. Now we are ready to prove our main results on approximating the excursion probability P{supt∈T X(t) ≥ u}. Theorem 4.6 contains a mild technical condition (4.15) which specifies the way that the variogram ν(t) attains its maximum on the boundary of T . In particular, it implies that, at each point on ∂T where ν(t) achieves σT2 := supt∈T ν(t), ∇ν(t) is not zero. In the case of N = 1 and T = [a, b], if ν(t) attains its maximum σT2 at the end point a or b, then (4.15) requires that ν(t) is strictly monotone in a neighborhood of that end point. Notice that, if ν(t) only attains its maximum in ∂N T , the interior of T , then (4.15) is satisfied automatically. In this sense, (4.15) is more general than the corresponding condition in Theorem 5 of Azaı̈s and Wschebor (2008). Theorem 4.6. Let X = {X(t) : t ∈ RN } be a centered Gaussian random field with stationary increments such that (H1), (H2) and (H3) are fulfilled. Suppose that for any face J , {t ∈ J : ν(t) = σT2 , νj (t) = 0 for some j ∈ / σ(J)} = ∅. (4.15) Then there exists some constant α > 0 such that n o P sup X(t) ≥ u t∈T = N X X E{Mu (J)} + o(e−αu 2 −u2 /(2σ 2 ) T ) k=0 J∈∂k T (4.16) = X {t}∈∂0 × Z J  u Ψ p ν(t) T  + N X X 1 (2π)(k+1)/2 |ΛJ |1/2 k=1 J∈∂k T   |ΛJ − ΛJ (t)| u −u2 /(2θt2 ) 2 2 2 Hk−1 e dt + o(e−αu −u /(2σT ) ). k θt θt 22 D. CHENG AND Y. XIAO Remark 4.7. It should be mentioned that, for Gaussian random fields with constant variance, Taylor, Takemura and Adler (2005) provided an explicit form for the constant α in (1.1). However, in Theorems 4.6 and 4.8, we are not able to give explicit information on the value(s) of α. Proof of Theorem 4.6. Since the second equality in (4.16) follows from Lemma 4.1 directly, we only need to prove the first one. By (4.3) and Corollary 4.4, it suffices to show that the last term in (4.3) is superexponentially small. Thanks to Lemma 4.5, we only need to consider the case when the distance of J and J ′ is 0, that is, I := J¯ ∩ J¯′ 6= ∅. Without loss of generality, we assume σ(J) = {1, . . . , m, m + 1, . . . , k}, (4.17) σ(J ′ ) = {1, . . . , m, k + 1, . . . , k + k′ − m}, where 0 ≤ m ≤ k ≤ k′ ≤ N and k′ ≥ 1. Recall that, if k = 0, then σ(J) = ∅. Under assumption (4.17), we have J ∈ ∂k T , J ′ ∈ ∂k′ T and dim(I) = m. Case 1: k = 0, that is, J is a singleton, say J = {t0 }. If ν(t0 ) < σT2 , then by (4.14), it is trivial to show that E{Mu (J)Mu (J ′ )} is super-exponentially 6 small. Now we consider the case ν(t0 ) = σT2 . Due to (4.15), E{X(t0 )X1 (t0 )} = 0, and hence by continuity, there exists δ > 0 such that E{X(s)X1 (s)} = 6 0 for all ks − t0 k ≤ δ. It follows from (4.14) that E{Mu (J)Mu (J ′ )} is bounded from above by Z ∞ Z ∞ Z dy dx ds s∈J ′ : ks−t0 k>δ u u × E{|det ∇2 X|J ′ (s)||X(t0 ) = x, X(s) = y, ∇X|J ′ (s) = 0} × pX(t0 ),X(s),∇X|J ′ (s) (x, y, 0) Z ∞ Z dy ds + s∈J ′ : ks−t0 k≤δ u × E{|det ∇2 X|J ′ (s)||X(s) = y, ∇X|J ′ (s) = 0}pX(s),∇X|J ′ (s) (y, 0) := I1 + I2 . Following the proof of Lemma 4.5, we can show that I1 is super-exponentially small. Note that there exists a constant ε0 > 0 such that sup s∈J ′ : ks−t0 k≤δ Var(X(s)|∇X|J ′ (s)) ≤ sup s∈J ′ : ks−t0 k≤δ Var(X(s)|X1 (s)) ≤ σT2 −ε0 . This implies that I2 , and hence E{Mu (J)Mu (J ′ )} are super-exponentially small. THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 23 Case 2: k ≥ 1. For all t ∈ I with ν(t) = σT2 , by assumption (4.15), E{X(t)Xi (t)} = 6 0, ∀i = m + 1, . . . , k + k′ − m. Since I is a compact set, we see that there exist constants ε1 , δ1 > 0 such that sup (4.18) t∈B,s∈B ′ Var(X(t)|Xm+1 (t), . . . , Xk (t), Xk+1 (s), . . . , Xk+k′ −m (s)) ≤ σT2 − ε1 , where B = {t ∈ J : dist(t, I) ≤ δ1 } and B ′ = {s ∈ J ′ : dist(s, I) ≤ δ1 }. It follows from (4.10) that E{Mu (J)Mu (J ′ )} is bounded by Z ∞ Z ∞ ZZ dypX(t),X(s),∇X|J (t),∇X|J ′ (s) (x, y, 0, 0) dx dt ds (J×J ′ )\(B×B ′ ) u u × E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)||X(t) = x, X(s) = y, ∇X|J (t) = 0, + ZZ dt ds B×B ′ Z ∞ u ∇X|J ′ (s) = 0} dxpX(t) (x|∇X|J (t) = 0, ∇X|J ′ (s) = 0) × p∇X|J (t),∇X|J ′ (s) (0, 0) × E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)||X(t) = x, ∇X|J (t) = 0, ∇X|J ′ (s) = 0} := I3 + I4 . Note that (4.19) (J × J ′ ) \ (B × B ′ ) = ((J \ B) × B ′ ) ∪ (B × (J ′ \ B ′ )) ∪ ((J \ B) × (J ′ \ B ′ )). Since each product set on the right-hand side of (4.19) consists of two sets with positive distance, following the proof of Lemma 4.5 we can verify that I3 is super-exponentially small. For I4 , taking into account (4.18), one has (4.20) sup t∈B,s∈B ′ Var(X(t)|∇X|J (t), ∇X|J ′ (s)) ≤ σT2 − ε1 . For any t ∈ B, s ∈ B ′ with s 6= t, in order to estimate (4.21) p∇X|J (t),∇X|J ′ (s) (0, 0) ′ = (2π)−(k+k )/2 (detCov(∇X|J (t), ∇X|J ′ (s)))−1/2 , we write the determinant on the right-hand side of (4.21) as detCov(Xm+1 (t), . . . , Xk (t), Xk+1 (s), . . . , Xk+k′ −1 (s)| (4.22) X1 (t), . . . , Xm (t), X1 (s), . . . , Xm (s)) × detCov(X1 (t), . . . , Xm (t), X1 (s), . . . , Xm (s)), 24 D. CHENG AND Y. XIAO where the first determinant in (4.22) is bounded away from zero due to (H3). By (H1), as shown in Piterbarg (1996b), applying Taylor’s formula, we can write (4.23) ∇X(s) = ∇X(t) + ∇2 X(t)(s − t)T + ks − tk1+η Yt,s , 1 , . . . , Y N )T is a Gaussian vector field with bounded variance where Yt,s = (Yt,s t,s uniformly for all t ∈ J , s ∈ J ′ . Hence as ks − tk → 0, the second determinant in (4.22) becomes 1 detCov(X1 (t), . . . , Xm (t), X1 (t) + h∇X1 (t), s − ti + ks − tk1+η Yt,s ,..., m Xm (t) + h∇Xm (t), s − ti + ks − tk1+η Yt,s ) 1 = detCov(X1 (t), . . . , Xm (t), h∇X1 (t), s − ti + ks − tk1+η Yt,s ,..., (4.24) m h∇Xm (t), s − ti + ks − tk1+η Yt,s ) = ks − tk2m detCov(X1 (t), . . . , Xm (t), h∇X1 (t), et,s i, . . . , h∇Xm (t), et,s i) × (1 + o(1)), where et,s = (s − t)T /ks − tk and due to (H3), the last determinant in (4.24) is bounded away from zero uniformly for all t ∈ J and s ∈ J ′ . It then follows from (4.22) and (4.24) that detCov(∇X|J (t), ∇X|J ′ (s)) ≥ C1 ks − tk2m (4.25) for some constant C1 > 0. Similar to (4.11), there exist constants C2 , N1 > 0 such that sup E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)|| t∈J,s∈J ′ X(t) = x, ∇X|J (t) = 0, ∇X|J ′ (s) = 0} (4.26) ≤ C2 (1 + xN1 ). Combining (4.20) with (4.21), (4.25) and (4.26), and noting that m < k′ implies 1/ks − tkm is integrable on J × J ′ , we conclude that I4 , and hence E{Mu (J)Mu (J ′ )} are finite and super-exponentially small.  Theorem 4.8. Let X = {X(t) : t ∈ RN } be a centered Gaussian random field with stationary increments and X(0) = 0. Assume that (H1), (H2) and (H3) are fulfilled. Then there exists a constant α > 0 such that N X n o X 2 2 2 P sup X(t) ≥ u = E{MuE (J)} + o(e−αu −u /(2σT ) ) t∈T (4.27) k=0 J∈∂k T = E{ϕ(Au )} + o(e−αu 2 −u2 /(2σ 2 ) T ), THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 25 where E{ϕ(Au )} is the mean Euler characteristic of Au formulated in Theorem 3.2. The main idea for the proof of Theorem 4.8 comes from Azaı̈s and Delmas (2002) (especially their Theorem 4). Before showing the proof, we list the following two lemmas whose proofs are given in the Appendix. Under (H2), there exists a constant α0 > 0 such that Lemma 4.9. he, (Λ − Λ(t))ei ≥ α0 ∀t ∈ T, e ∈ SN −1 . Lemma 4.10. Let {ξ1 (t) : t ∈ T1 } and {ξ2 (t) : t ∈ T2 } be two centered Gaussian random fields. Let σi2 (t) = Var(ξi (t)), ρ(t, s) = σ i = inf σi (t), σ i = sup σi (t), t∈Ti t∈Ti E{ξ1 (t)ξ2 (s)} , σ1 (t)σ2 (s) ρ= ρ(t, s), sup t∈T1 ,s∈T2 ρ= inf t∈T1 ,s∈T2 ρ(t, s), and assume 0 < σ i ≤ σ i < ∞ for i = 1, 2. If 0 < ρ ≤ ρ < 1, then for any N1 , N2 > 0, there exists a constant α > 0 such that as u → ∞, sup t∈T1 ,s∈T2 E{(1 + |ξ1 (t)|N1 + |ξ2 (s)|N2 )1{ξ1 (t)≥u,ξ2 (s)<0} } = o(e−αu 2 −u2 /(2σ 2 ) 1 ). 2 −u2 /(2σ 2 ) 1 ). Similarly, if −1 < ρ ≤ ρ < 0, then sup t∈T1 ,s∈T2 E{(1 + |ξ1 (t)|N1 + |ξ2 (s)|N2 )1{ξ1 (t)≥u,ξ2 (s)>0} } = o(e−αu Proof of Theorem 4.8. Note that the second equality in (4.27) follows from Theorem 3.2 and Lemma 4.2, and similar to the proof in Theorem 4.6, we only need to show that E{MuE (J)MuE (J ′ )} is super-exponentially small when J and J ′ are neighboring. Let I := J¯ ∩ J¯′ 6= ∅. We follow the assumptions in (4.17) and assume also that all elements in ε(J) and ε(J ′ ) −k ′ N −k . and E(J ′ ) = RN are 1, which implies E(J) = R+ + We first consider the case k ≥ 1. By the Kac–Rice metatheorem, E{MuE (J)× E Mu (J ′ )} is bounded from above by Z ∞ Z ∞ Z ∞ Z Z dzk+1 · · · dy dx ds dt J × Z J′ ∞ 0 u dzk+k′ −m Z u ∞ 0 0 dwm+1 · · · Z ∞ dwk 0 × E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)|| X(t) = x, X(s) = y, ∇X|J (t) = 0, Xk+1 (t) = zk+1 , . . . , 26 D. CHENG AND Y. XIAO (4.28) Xk+k′ −m (t) = zk+k′ −m , ∇X|J ′ (s) = 0, Xm+1 (s) = wm+1 , . . . , Xk (s) = wk } × pt,s (x, y, 0, zk+1 , . . . , zk+k′ −m , 0, wm+1 , . . . , wk ) ZZ A(t, s) dt ds, := J×J ′ where pt,s (x, y, 0, zk+1 , . . . , zk+k′ −m , 0, wm+1 , . . . , wk ) is the density of (X(t), X(s), ∇X|J (t), Xk+1 (t), . . . , Xk+k′ −m (t), ∇X|J ′ (s), Xm+1 (s), . . . , Xk (s)) evaluated at (x, y, 0, zk+1 , . . . , zk+k′ −m , 0, wm+1 , . . . , wk ). Let {e1 , e2 , . . . , eN } be the standard orthonormal basis of RN . For t ∈ J and s ∈ J ′ , let et,s = (s − t)T /ks − tk and let αi (t, s) = hei , (Λ − Λ(t))et,s i, then (4.29) (Λ − Λ(t))et,s = N X i=1 hei , (Λ − Λ(t))et,s iei = N X αi (t, s)ei . i=1 By Lemma 4.9, there exists some α0 > 0 such that (4.30) het,s , (Λ − Λ(t))et,s i ≥ α0 for all t and s. Under the assumptions (4.17) and that all elements in ε(J) and ε(J ′ ) are 1, we have the following representation: t = (t1 , . . . , tm , tm+1 , . . . , tk , bk+1 , . . . , bk+k′ −m , 0, . . . , 0), s = (s1 , . . . , sm , bm+1 , . . . , bk , sk+1 , . . . , sk+k′−m , 0, . . . , 0), where ti ∈ (ai , bi ) for all i ∈ σ(J) and sj ∈ (aj , bj ) for all j ∈ σ(J ′ ). Therefore, hei , et,s i ≥ 0 (4.31) ∀m + 1 ≤ i ≤ k, ∀k + 1 ≤ i ≤ k + k′ − m, hei , et,s i ≤ 0 ∀k + k′ − m < i ≤ N. hei , et,s i = 0 Let Di = {(t, s) ∈ J × J ′ : αi (t, s) ≥ βi } if m + 1 ≤ i ≤ k, (4.32) Di = {(t, s) ∈ J × J ′ : αi (t, s) ≤ −βi } if k + 1 ≤ i ≤ k + k′ − m, ) ( m X ′ αi (t, s)hei , et,s i ≥ β0 , D0 = (t, s) ∈ J × J : i=1 THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 27 P ′ −m where β0 , β1 , . . . , βk+k′ −m are positive constants such that β0 + k+k i=m+1 βi < α0 . It follows from (4.31) and (4.32) that, if (t, s) does not belong to any of D0 , Dm , . . . , Dk+k′ −m , then by (4.29), h(Λ − Λ(t))et,s , et,s i = N X i=1 αi (t, s)hei , et,s i ≤ β0 + ′ −m k+k X βi < α0 , i=m+1 Sk+k′ −m which contradicts (4.30). Thus, D0 ∪ i=m+1 Di is a covering of J × J ′ , by (4.28), ′ −m Z Z ZZ k+k X ′ E E A(t, s) dt ds. A(t, s) dt ds + E{Mu (J)Mu (J )} ≤ D0 i=m+1 RR Di We first show that D0 A(t, s) dt ds is super-exponentially small. Similar to the proof of Theorem 4.6, applying (4.21), (4.25) and (4.26), we obtain ZZ A(t, s) dt ds D0 ≤ ZZ dt ds D0 Z ∞ dxp∇X|J (t),∇X|J ′ (s) (0, 0) u × pX(t) (x|∇X|J (t) = 0, ∇X|J ′ (s) = 0) (4.33) × E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)|| X(t) = x, ∇X|J (t) = 0, ∇X|J ′ (s) = 0} Z ∞ ZZ ′ ≤ C1 dx(1 + xN1 )ks − tk−m dt ds D0 u × pX(t) (x|∇X|J (t) = 0, ∇X|J ′ (s) = 0), for some positive constants C1′ and N1 . Due to Lemma 4.5, we only need to consider the case when ks − tk is small. It follows from Taylor’s formula (4.23) that as ks − tk → 0, Var(X(t)|∇X|J (t), ∇X|J ′ (s)) ≤ Var(X(t)|X1 (t), . . . , Xm (t), X1 (s), . . . , Xm (s)) = Var(X(t)|X1 (t), . . . , Xm (t), X1 (t) + h∇X1 (t), s − ti 1 + ks − tk1+η Yt,s ,..., (4.34) m Xm (t) + h∇Xm (t), s − ti + ks − tk1+η Yt,s ) 1 = Var(X(t)|X1 (t), . . . , Xm (t), h∇X1 (t), et,s i + ks − tkη Yt,s ,..., m h∇Xm (t), et,s i + ks − tkη Yt,s ) 28 D. CHENG AND Y. XIAO 1 ≤ Var(X(t)|h∇X1 (t), et,s i + ks − tkη Yt,s , . . . , h∇Xm (t), et,s i m + ks − tkη Yt,s ) = Var(X(t)|h∇X1 (t), et,s i, . . . , h∇Xm (t), et,s i) + o(1). By Lemma A.1, the eigenvalues of [Cov(h∇X1 (t), et,s i, . . . , h∇Xm (t), et,s i)]−1 are bounded uniformly in t and s. Note that E{X(t)h∇Xi (t), et,s i} = −αi (t, s). Applying these facts to the last line of (4.34), we see that there exist constants C4 > 0 and ε0 > 0 such that for ks − tk sufficiently small, Var(X(t)|∇X|J (t), ∇X|J ′ (s)) ≤ σT2 − C4 (4.35) < σT2 − ε0 , m X α2i (t, s) + o(1) i=1 where the last inequality is due to the fact that (t, s) ∈ D0 implies !2 m m m X X X 1 β2 αi (t, s)het,s , ei i ≥ 0 . α2i (t, s)|hei , et,s i|2 ≥ α2i (t, s) ≥ m m i=1 i=1 i=1 m ′ Plugging (4.35) into RR (4.33) and noting that 1/ks − tk is integrable on J × J , we conclude that D0 A(t, s) dt ds is finite and super-exponentially small. RR Next we show that Di A(t, s) dt ds is super-exponentially small for i = RR m + 1, . . . , k. It follows from (4.28) that Di A(t, s) dt ds is bounded by Z ∞ Z ∞ ZZ dwi pX(t),∇X|J (t),Xi (s),∇X|J ′ (s) (x, 0, wi , 0) dx dt ds Di u 0 ×E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)|| (4.36) X(t) = x, ∇X|J (t) = 0, Xi (s) = wi , ∇X|J ′ (s) = 0}. We can write pX(t),Xi (s) (x, wi |Xi (t) = 0) = where 1 2πσ1 (t)σ2 (t, s)(1 − ρ2 (t, s))1/2   2  wi2 2ρ(t, s)xwi x 1 + − × exp − , 2(1 − ρ2 (t, s)) σ12 (t) σ22 (t, s) σ1 (t)σ2 (t, s) σ12 (t) = Var(X(t)|Xi (t) = 0), σ22 (t, s) = Var(Xi (s)|Xi (t) = 0) = ρ(t, s) = E{X(t)Xi (s)|Xi (t) = 0} , σ1 (t)σ2 (t, s) detCov(Xi (s), Xi (t)) , λii THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 29 and ρ2 (t, s) < 1 due to (H3). Therefore, pX(t),∇X|J (t),Xi (s),∇X|J ′ (s) (x, 0, wi , 0) = p∇X|J ′ (s),X1 (t),...,Xi−1 (t),Xi+1 (t),...,Xk (t) × (0|X(t) = x, Xi (s) = wi , Xi (t) = 0) (4.37) × pX(t),Xi (s) (x, wi |Xi (t) = 0)pXi (t) (0)  2   x wi2 2ρ(t, s)xwi 1 + − ≤ C5 exp − 2(1 − ρ2 (t, s)) σ12 (t) σ22 (t, s) σ1 (t)σ2 (t, s) × (detCov(X(t), ∇X|J (t), Xi (s), ∇X|J ′ (s)))−1/2 for some positive constant C5 . Also, by an argument that is similar to the proof of Theorem 4.6, we can show that there exist positive constants C6 , N2 and N3 such that (4.38) detCov(∇X|J (t), Xi (s), ∇X|J ′ (s)) ≥ C6−1 ks − tk2(m+1) , C6−1 ks − tk2 ≤ σ22 (t, s) ≤ C6 ks − tk2 (4.39) and E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)|| X(t) = x, ∇X|J (t) = 0, Xi (s) = wi , ∇X|J ′ (s) = 0} = E{|det ∇2 X|J (t)||det ∇2 X|J ′ (s)||X(t) = x, ∇X|J (t) = 0, (4.40) h∇Xi (t), et,s i = wi /ks − tk + o(1), ∇X|J ′ (s) = 0} ≤ C7 (xN2 + (wi /ks − tk)N3 + 1). Combining (4.36) with (4.37), (4.38) and (4.40), and making change of variable w = wi /ks − tk, we obtain that for some positive constant C8 , ZZ A(t, s) dt ds Di ≤ C8 (4.41) ZZ Di dt dsks − tk−m−1 Z ∞ dx u Z ∞ dwi 0 × (xN2 + (wi /ks − tk)N3 + 1)   2  1 wi2 2ρ(t, s)xwi x × exp − + − 2(1 − ρ2 (t, s)) σ12 (t) σ22 (t, s) σ1 (t)σ2 (t, s) ZZ Z ∞ Z ∞ −m dt dsks − tk dw(xN2 + wN3 + 1) = C8 dx Di u 0 30 D. CHENG AND Y. XIAO  × exp −  2  x w2 2ρ(t, s)xw 1 , + 2 − 2(1 − ρ2 (t, s)) σ12 (t) σ σ2 (t, s) e2 (t, s) σ1 (t)e where σ e2 (t, s) = σ2 (t, s)/ks − tk is bounded by (4.39). Applying Taylor’s formula (4.23) to Xi (s) and noting that E{X(t)h∇Xi (t), et,s i} = −αi (t, s), we obtain   1 1 ρ(t, s) = E{X(t)Xi (t)}E{Xi (s)Xi (t)} E{X(t)Xi (s)} − σ1 (t)σ2 (t, s) λii  ks − tk i −αi (t, s) + ks − tkη E{X(t)Yt,s } = σ1 (t)σ2 (t, s)  ks − tkη i − E{X(t)Xi (t)}E{Xi (t)Yt,s } . λii By (4.39) and the fact that (t, s) ∈ Di implies αi (t, s) ≥ βi > 0 for i = m + 1, . . . , k, we conclude that ρ(t, s) ≤ −δ0 for some δ0 > 0 uniformly for t ∈ J , s ∈ J ′ with RR ks − tk sufficiently small. Then applying Lemma 4.10 to (4.41) yields that Di A(t, s) dt ds is super-exponentially small. RR It is similar to prove that Di A(t, s) dt ds is super-exponentially small for RR i = k + 1, . . . , k + k′ − m. In fact, in such case, Di A(t, s) dt ds is bounded by Z ∞ ZZ Z ∞ dt ds dx dzi pX(t),∇X|J (t),Xi (t),∇X|J ′ (s) (x, 0, zi , 0) Di 0 u 2 × E{|det ∇ X|J (t)||det ∇2 X|J ′ (s)|| X(t) = x, ∇X|J (t) = 0, Xi (t) = zi , ∇X|J ′ (s) = 0}. We can follow the proof in the previous stage by exchanging the positions of Xi (s) and Xi (t) and replacing wi with zi . The details are omitted since the procedure is very similar. If k = 0, then m = 0 and σ(J ′ ) = {1, . . . , k′ }. Since J becomes a singleton, we may let J = {t0 }. By the Kac–Rice metatheorem, E{Mu (J)Mu (J ′ )} is bounded by Z ∞ Z ∞ Z ∞ Z ∞ Z dzk′ pt0 ,s (x, y, z1 , . . . , zk′ , 0) dz1 · · · dy dx ds J′ u u 0 0 2 × E{|det ∇ X|J ′ (s)|| X(t0 ) = x, X(s) = y, X1 (t0 ) = z1 , . . . , Xk′ (t0 ) = zk′ , ∇X|J ′ (s) = 0} Z e 0 , s) ds, A(t := J′ where pt0 ,s (x, y, z1 , . . . , zk′ , 0) is the density of (X(t0 ), X(s), X1 (t0 ), . . . , Xk′ (t0 ), ∇X|J ′ (s)) evaluated at (x, y, z1 , . . . , zk′ , 0). Similarly, J ′ could be covered by THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 31 Sk ′ e with D e i = {s ∈ J ′ : αi (t0 , s) ≤ −βei } for some positive constants βei , 1 ≤ i ≤ k′ . On the other hand, Z Z Z ∞ Z ∞ e dzi pX(t0 ),Xi (t0 ),∇X|J ′ (s) (x, zi , 0) A(t0 , s) ds ≤ dx ds i=1 Di ei D ei D u 0 × E{|det ∇2 X|J ′ (s)||X(t0 ) = x, Xi (t0 ) = zi , ∇X|J ′ (s) = 0}. By similar discussions, we obtain that E{MuE (J)MuE (J ′ )} is super-exponentially small, and hence complete the proof.  5. Further remarks and examples. Remark 5.1 (The case when T contains the origin). We now show that the conclusions of Theorems 4.6 and 4.8 still hold when T contains the origin. In such case, condition (H3) is actually not satisfied since X(0) = 0 is degenerate [this is in contrast with the case when X = {X(t), t ∈ RN } is assumed to have constant variance]. We will in fact prove a more general result. Let T0 ⊂ T be a finite union of compact rectangles such that supt∈T0 ν(t) < σT2 , then according to the Borell–TIS inequality, P{supt∈T0 X(t) ≥ u} is superexponentially small. Let Tb = T \ T0 , then n o n o P sup X(t) ≥ u ≤ P sup X(t) ≥ u t∈Tb (5.1) t∈T n o n o ≤ P sup X(t) ≥ u + P sup X(t) ≥ u . t∈Tb t∈T0 To estimate P{supt∈Tb X(t) ≥ u}, similar to the rectangle T , we decomS b pose Tb into several faces by lower dimensions such that Tb = N k=0 ∂k T = SN S k=0 L∈∂k Tb L. Then we can get the bounds similar to (4.3) with T replaced with Tb and J replaced with L. Following the proof of Theorem 4.6 yields N X n o X 2 2 2 E{Mu (L)} + o(e−αu −u /(2σT ) ). P sup X(t) ≥ u = t∈Tb k=0 L∈∂k Tb Because supt∈T0 ν(t) < σT2 , we can show that terms E{Mu (L)} are superexponentially small for all faces L such that L ⊂ ∂k T̄0 with 0 ≤ k ≤ N − 1. The same reasoning yields that for 1 ≤ k ≤ N , L ∈ ∂k Tb, J ∈ ∂k T such that L ⊂ J , the difference between E{Mu (L)} and E{Mu (J)} is superexponentially small. Hence, we obtain n o P sup X(t) ≥ u t∈Tb 32 (5.2) D. CHENG AND Y. XIAO = X {t}∈∂0 × Z J  u Ψ p ν(t) T  + N X X 1 (2π)(k+1)/2 |ΛJ |1/2 k=1 J∈∂k T   |ΛJ − ΛJ (t)| u −u2 /(2θt2 ) 2 2 2 Hk−1 e dt + o(e−αu −u /(2σT ) ). k θ θt t 2 2 Here, by convention, if θt = 0, we regard e−u /(2θt ) as 0. Combining (5.1) with (5.2), we conclude that Theorem 4.6 still holds when T contains the origin. The argument for Theorem 4.8 is similar. Remark 5.2. Based on the proofs of Theorems 4.6 and 4.8, one may expect that the approximation (1.1) holds for a much wider class of smooth Gaussian fields (not necessarily with stationary increments). Meanwhile, the argument for the parameter set could go far beyond the rectangle case. These further developments are in Cheng (2013). Remark 5.3 (Refinements of Theorem 4.6). Let X be a Gaussian field as in Theorem 4.6. Suppose that ν(t0 ) = σT2 for some t0 ∈ J ∈ ∂k T (k ≥ 0) and ν(t) < σT2 for all t ∈ T \ {t0 }. (i) If k = 0, then, due to (4.15), supt∈T \{t0 } θt2 ≤ σT2 − ε0 for some ε0 > 0. This implies that E{Mu (J ′ )} are super-exponentially small for all faces J ′ other than {t0 }. Therefore, there is a constant α > 0 such that   n o u 2 2 2 (5.3) P sup X(t) ≥ u = Ψ + o(e−αu −u /(2σT ) ) as u → ∞. σT t∈T For example, let Y be a stationary isotropic Gaussian field with covariance 2 ρ(t) = e−ktk and define X(t) = Y (t) − Y (0). Then X is a smooth Gaussian field with stationary increments satisfying conditions (H1)–(H3). Let T = [0, 1]N , then we can apply (5.3) to approximate the excursion probability of X with t0 = (1, . . . , 1). (ii) If k ≥ 1, then similarly, E{Mu (J ′ )} are super-exponentially small for all faces J ′ 6= J . It follows from Theorem 4.6 that Z n o uk−1 |ΛJ − ΛJ (t)| −u2 /(2θt2 ) e dt(1 + o(1)). P sup X(t) ≥ u = (k+1)/2 |Λ |1/2 (2π) θt2k−1 t∈T J J Let τ (t) = θt2 , then ∀i ∈ σ(J), τi (t0 ) = 0, since t0 is a local maximum point of τ restricted on J . Assume additionally that the Hessian matrix (5.4) ΘJ (t0 ) := (τij (t0 ))i,j∈σ(J) (here τij = ∂ 2 τ /∂ti ∂tj ) is negative definite, then the Hessian matrix of 1/(2θt2 ) at t0 restricted on J , 1 e J (t0 ) = − 1 (τij (t0 )) Θ ΘJ (t0 ), i,j∈σ(J) = − 2 2τ (t0 ) 2σT4 THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 33 is positive definite. Let g(t) = |ΛJ − ΛJ (t)|/θt2k−1 and h(t) = 1/(2θt2 ), applying Lemma A.2 in the Appendix with T replaced by J yields that as u → ∞, n o P sup X(t) ≥ u t∈T (5.5) 2 2 (2π)k/2 uk−1 |ΛJ − ΛJ (t0 )| e−u /(2θt0 ) (1 + o(1)) 2k−1 k e (k+1)/2 1/2 (2π) |ΛJ | θt0 u |ΘJ (t0 )|1/2   u 2k/2 |ΛJ − ΛJ (t0 )| Ψ (1 + o(1)). = σT |ΛJ |1/2 | − ΘJ (t0 )|1/2 = Example 5.4 (The cosine field). We consider the cosine random field Z on R2 [cf. Adler and Taylor (2007), page 382]: 2 1 X (ξi cos ti + ξi′ sin ti ), Z(t) = √ 2 i=1 t = (t1 , t2 ) ∈ R2 , where ξ1 , ξ1′ , ξ2 , ξ2′ are independent, standard Gaussian variables. Clearly Z is a centered, unit-variance and smooth stationary Gaussian field. Moreover, Z is periodic and Z(t) = −Z11 (t) − Z22 (t). Let X(t) = Z(t) − Z(0) for all t ∈ T ⊂ [0, 2π)2 . Then X is a centered and smooth Gaussian field with stationary increments with X(0) = 0. The variogram and covariance of X are given respectively by (5.6) ν(t) = 2 − cos t1 − cos t2 , 2 C(t, s) = 1 + 1X [cos(ti − si ) − cos ti − cos si ]. 2 i=1 Taking the partial derivatives of C gives (5.7) E{X(t)∇X(t)} = 12 (sin t1 , sin t2 )T , Λ = Cov(∇X(t)) = 21 I2 , Λ − Λ(t) = −E{X(t)∇2 X(t)} = 12 [I2 − diag(cos t1 , cos t2 )], where I2 is the 2 × 2 identity matrix and diag denotes the diagonal matrix. Therefore, X satisfies conditions (H1) and (H2) on T ⊂ (0, 2π)2 . Even though condition (H3) is not fully satisfied [because X12 (t) ≡ 0 and X(t) = −2X11 (t) − 2X22 (t) when t = (π, π)], it can be shown that this does not affect the validity of Theorems 3.2, 4.6 and 4.8 for the random field {Z(t) − Z(0), t ∈ R2 } with T ⊂ (0, 2π)2 . (i) Let T = [0, π/2]2 . Then by (5.6), ν(t) attains its maximum 2 only at the upper-right vertex (π/2, π/2), where both partial derivatives of ν are positive. By Remark 5.1 (with T0 = [0, ε] × [0, π/2] ∪ [0, π/2] × [0, ε], 34 D. CHENG AND Y. XIAO where ε > 0 is sufficiently small) and the result (i) in Remark 5.3, we obtain √ 2 P{supt∈T X(t) ≥ u} = Ψ(u/ 2)(1 + o(e−αu )). (ii) Let T = [0, 3π/2] × [0, π/2]. Then ν(t) attains its maximum 3 only at the boundary point t∗ = (π, π/2), where ν2 (t∗ ) > 0 so that condition (4.15) is satisfied. In this case, t∗ ∈ J = (0, 3π/2) × {π/2}. By (5.7), we obtain ΛJ = 12 and ΛJ − ΛJ (t∗ ) = 21 (1 − cos t∗1 ) = 1. On the other hand, for t ∈ J , by (5.7), (5.8) τ (t) = θt2 = Var(X(t)|X1 (t)) = 2 − cos t1 − cos t2 − 21 sin2 t1 . Therefore, ΘJ (t∗ ) = τ11 (t∗ ) = −2. these into (5.5) with k = 1, √ By plugging √ we have P{supt∈T X(t) ≥ u} = 2Ψ(u/ 3)(1 + o(1)). (iii) Let T = [0, 3π/2]2 . Then ν(t) attains its maximum 4 only at the interior point t∗ = (π, π). In this case, t∗ ∈ J = (0, 3π/2)2 . By (5.7), we obtain ΛJ = 12 I2 and ΛJ − ΛJ (t∗ ) = I2 . On the other hand, for t ∈ J , by (5.7), τ (t) = θt2 = Var(X(t)|X1 (t), X2 (t)) (5.9) = 2 − cos t1 − cos t2 − 21 sin2 t1 − 12 sin2 t2 . Therefore, ΘJ (t∗ ) = (τij (t∗ ))i,j=1,2 = −2I2 . By plugging these into (5.5) with k = 2, we obtain P{supt∈T X(t) ≥ u} = 2Ψ(u/2)(1 + o(1)). Remark 5.5 (Refinements of Theorem 4.8). Let X be a Gaussian field as in Theorem 4.8. Suppose t0 ∈ J ∈ ∂k T is the only point in T such that ν(t0 ) = σT2 . Assume σ(J) = {1, . . . , k}, all elements in ε(J) are 1, νk′ (t0 ) = 0 for all k + 1 ≤ k′ ≤ N . Then by Theorem 4.8, n o P sup X(t) ≥ u (5.10) t∈T N X = E{MuE (J)} + X E{MuE (J ′ )} + o(e−αu 2 −u2 /(2σ 2 ) T k ′ =k+1 J ′ ∈∂k′ T,J¯′ ∩J6¯=∅ P 2 Lemma 4.2 indicates E{MuE (J)} = (−1)k E{ ki=0 (−1)i µi (J)}(1 + o(e−αx )). Therefore, Z E k E{Mu (J)} = (−1) p∇X|J (t) (0) dt J × E{det ∇2 X|J (t)1{(Xk+1 (t),...,XN (t))∈RN−k } + 2 (5.11) = Z ∞ u dx Z × 1{X(t)≥u} |∇X|J (t) = 0}(1 + o(e−αx )) 2 dt J 2 (−1)k e−x /(2θt ) (2π)(k+1)/2 |ΛJ |1/2 θt × E{det ∇2 X|J (t)1{(Xk+1 (t),...,XN (t))∈RN−k } | + ). THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 35 2 := Z X(t) = x, ∇X|J (t) = 0}(1 + o(e−αu )) ∞ 2 AJ (x) dx(1 + o(e−αu )). u Similarly, we have E{MuE (J ′ )} Z Z ∞ dx = 2 ′ 2 (−1)k e−x /(2θt ) (2π)(k′ +1)/2 |ΛJ ′ |1/2 θt J′ u 2 × E{det ∇ X|J ′ (t)1{(X (t),...,X dt ′ J1 ′ (t))∈RN−k } + J′ N−k′ | 2 X(t) = x, ∇X|J ′ (t) = 0}(1 + o(e−αu )). (i) First, we consider the case k ≥ 1. We use the same notation τ (t), ΘJ (t) e J (t) in Remark 5.3. Let h(t) = 1/(2θt2 ) and and Θ gx (t) = (−1)k E{det ∇2 X|J (t)1{(Xk+1 (t),...,XN (t))∈RN−k } | (k+1)/2 1/2 + (2π) |ΛJ | θt X(t) = x, ∇X|J (t) = 0}. Note that supt∈T |gx (t)| = o(xN1 ) for some N1 > 0 as x → ∞, which implies 2 that the growth of gx (t) can be dominated by the exponential decay e−x h(t) , hence both Lemmas A.2 and A.3 in the Appendix are still applicable. Applying Lemma A.2 with T replaced by J and u replaced by x2 , we obtain that as x → ∞, (5.12) AJ (x) = (2π)k/2 2 2 gx (t0 )e−x /(2σT ) (1 + o(1)). k 1/2 e x (det ΘJ (t0 )) On the other hand, it follows from (3.16) that Z Z 1 dyk+1 · · · dyN ··· gx (t) = (2π)(k+1)/2 |ΛJ |1/2 θt RN−k +   |ΛJ − ΛJ (t)| x × + γt Ck+1 (t)yk+1 + · · · + γt CN (t)yN Hk γt γtk × pXk+1(t),...,XN (t) (yk+1 , . . . , yN |X(t) = x, ∇X|J (t) = 0). Note that, under the assumptions on X at the beginning of Remark 5.5, X(t0 ) and ∇X(t0 ) are independent, and Cj (t0 ) = 0 for all 1 ≤ j ≤ N . Therefore,   x |ΛJ − ΛJ (t0 )| Hk gx (t0 ) = k+1 σT (2π)(k+1)/2 |ΛJ |1/2 σT N −k |∇X|J (t0 ) = 0}. × P{(Xk+1 (t0 ), . . . , XN (t0 )) ∈ R+ 36 D. CHENG AND Y. XIAO Plugging this and (5.12) into (5.11), we obtain E{MuE (J)} (5.13)   u 2k/2 |ΛJ − ΛJ (t0 )| Ψ = 1/2 1/2 σT |ΛJ | | − ΘJ (t0 )| N −k |∇X|J (t0 ) = 0}(1 + o(1)). × P{(Xk+1 (t0 ), . . . , XN (t0 )) ∈ R+ For J ′ ∈ ∂k′ T with J¯′ ∩ J¯ 6= ∅, we apply Lemma A.3 with T replaced by J ′ to obtain E{MuE (J ′ )} (5.14) =   ′ ′ 2k /2 |ΛJ ′ − ΛJ ′ (t0 )| u Ψ P{ZJ ′ (t0 ) ∈ Rk− −k } σT |ΛJ ′ |1/2 | − ΘJ ′ (t0 )|1/2 ′ × P{(XJ1′ (t0 ), . . . , XJ ′ N−k′ −k |∇X|J ′ (t0 ) = 0}(1 + o(1)), (t0 )) ∈ RN + where ZJ ′ (t0 ) is a centered (k′ − k)-dimensional Gaussian vector with covariance matrix −(τij )i,j∈σ(J ′ )\σ(J) . Plugging (5.13) and (5.14) into (5.10), we obtain the asymptotic result. (ii) k = 0, say J = {t0 }. Note that X(t0 ) and ∇X(t0 ) are independent, therefore,   u E (5.15) P{∇X(t0 ) ∈ RN E{Mu (J)} = Ψ + }. σT For J ′ ∈ ∂k′ T with J¯′ ∩ J¯ 6= ∅, then E{MuE (J ′ )} is given by (5.14) with k = 0. Plugging (5.15) and (5.14) into (5.10), we obtain the asymptotic formula for the excursion probability. Example 5.6 (Continued: The cosine field). We consider the Gaussian field X = {X(t), t ∈ R2 } defined in Example 5.4. (i) Let T = [0, π]2 . Then ν(t) attains its maximum 4 only at the corner ∗ t = (π, π), where ∇ν(t∗ ) = 0 so that the condition (4.15) is not satisfied. Instead, we will use the result (ii) in Remark 5.5 with J = {t∗ } and k = 0. Let J ′ = (0, π) × {π}, J ′′ = {π} × (0, π). Combining the results in Example 5.4 with (5.15) and (5.14), and noting that Λ = 12 I2 implies X1 (t) and X2 (t) are independent for all t, we obtain E{MuE (J)} = 41 Ψ(u/2), E{MuE (∂2 T )} = 12 Ψ(u/2)(1 + o(1)), E{MuE (J ′ )} = E{MuE (J ′′ )} = √ 2 4 Ψ(u/2)(1 + o(1)). √ Summing these up, we have P{supt∈T X(t) ≥ u} = [(3 + 2 2)/4]Ψ(u/2)(1 + o(1)). THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 37 (ii) Let T = [0, 3π/2] × [0, π]. Then ν(t) attains its maximum 4 only at the boundary point t∗ = (π, π), where ν2 (t∗ ) = 0. Applying the result (i) in Remark 5.5 with J = (0, 3π/2) × {π} and k = 1, we obtain √ E{MuE (∂2 T )} = Ψ(u/2)(1 + o(1)), √ which implies that P{supt∈T X(t) ≥ u} = [(2 + 2)/2]Ψ(u/2)(1 + o(1)). E{MuE (J)} = 2 2 Ψ(u/2), Remark 5.7. Note that we only provide the first-order approximation for the examples in this section. However, as shown in the theory of the approximations of integrals [see, e.g., Wong (2001)], the integrals in (4.16) and (4.27) can be expanded with more terms once the covariance function of the Gaussian field is smooth enough. Hence, for the examples above, higher-order approximation is available. Since the procedure is similar and the computation is tedious, we omit such argument here. APPENDIX This appendix contains proofs of Lemmas 4.9, 4.10 and some other auxiliary facts. Proof of Lemma 4.9. Let MN ×N be the set of all N × N matrices. Define a mapping φ : RN × MN ×N → R by (ξ, A) 7→ hξ, Aξi. Then φ is continuous. Since Λ − Λ(t) is positive definite, we have φ(e, Λ − Λ(t)) > 0 for all t ∈ T and e ∈ SN −1 . The conclusion of the lemma follows from this and the fact that {(e, Λ − Λ(t)) : t ∈ T, e ∈ SN −1 } is a compact subset of RN × MN ×N and φ is continuous.  Proof Lemma 4.10. We only prove the first case, since the second case follows from the first one. By elementary computation on the joint density of ξ1 (t) and ξ2 (s), we obtain sup t∈T1 ,s∈T2 E{(1 + |ξ1 (t)|N1 + |ξ2 (s)|N2 )1{ξ1 (t)≥u,ξ2 (s)<0} }   Z ∞ 1 x21 exp − dx1 2σ 21 2πσ 1 σ 2 (1 − ρ2 )1/2 u     Z 0 σ 2 ρx1 2 1 N1 N2 x2 − (1 + |x1 | + |x2 | ) exp − 2 × dx2 σ1 2σ 2 (1 − ρ2 ) −∞    σ 22 ρ2 u2 u2 2 + εu , = o exp − 2 − 2 2σ 1 2σ 2 (1 − ρ2 )σ 21 ≤ as u → ∞, for any ε > 0.  A similar argument for proving Lemma 4.9 yields the following result. 38 D. CHENG AND Y. XIAO Lemma A.1. Let {A(t) = (aij (t))1≤i,j≤N : t ∈ T } be a family of positive definite matrices such that all elements aij (·) are continuous. Denote by x and x the infimum and supremum of the eigenvalues of A(t) over t ∈ T , respectively, then 0 < x ≤ x < ∞. The following two formulas state the results on the Laplace approximation method. Lemma A.2 can be found in many books on the approximations of integrals; here we refer to Wong (2001). Lemma A.3 can be derived by following similar arguments in the proof of the Laplace method for the case of boundary point in Wong (2001). Lemma A.2 (Laplace method for interior point). Let t0 be an interior point of T . Suppose the following conditions hold: (i) g(t) ∈ C(T ) and g(t0 ) 6= 0; (ii) h(t) ∈ C 2 (T ) and attains its unique minimum at t0 ; and (iii) ∇2 h(t0 ) is positive definite. Then as u → ∞, Z (2π)N/2 g(t)e−uh(t) dt = N/2 g(t0 )e−uh(t0 ) (1 + o(1)). u (det ∇2 h(t0 ))1/2 T Lemma A.3 (Laplace method for boundary point). Let t0 ∈ J ∈ ∂k T with 0 ≤ k ≤ N − 1. Suppose that conditions (i), (ii) and (iii) in Lemma A.2 hold, and additionally ∇h(t0 ) = 0. Then as u → ∞, Z (2π)N/2 P{ZJ (t0 ) ∈ (−E(J))} g(t)e−uh(t) dt = g(t0 )e−uh(t0 ) (1 + o(1)), uN/2 (det ∇2 h(t0 ))1/2 T where ZJ (t0 ) is a centered (N − k)-dimensional Gaussian vector with covariance matrix (hij (t0 ))J1 ≤i,j≤JN−k , −E(J) = {x ∈ RN : −x ∈ E(J)}, and the definitions of J1 , . . . , JN −k and E(J) are in (3.4). Acknowledgements. We thank the anonymous referees and the Editor for their insightful comments which have led to several improvements of this manuscript. REFERENCES Adler, R. J. (1981). The Geometry of Random Fields. Wiley, Chichester. MR0611857 Adler, R. J. (2000). On excursion sets, tube formulas and maxima of random fields. Ann. Appl. Probab. 10 1–74. MR1765203 Adler, R. J. and Taylor, J. E. (2007). Random Fields and Geometry. Springer, New York. MR2319516 Adler, R. J. and Taylor, J. E. (2011). Topological Complexity of Smooth Random Functions. Lecture Notes in Math. 2019. Springer, Heidelberg. MR2768175 Adler, R. J., Taylor, J. E. and Worsley, K. J. (2012). Applications of Random Fields and Geometry: Foundations and Case Studies. In preparation. THE MEAN EULER CHARACTERISTIC AND EXCURSION PROBABILITY 39 Azaı̈s, J.-M., Bardet, J.-M. and Wschebor, M. (2002). On the tails of the distribution of the maximum of a smooth stationary Gaussian process. ESAIM Probab. Stat. 6 177– 184 (electronic). MR1943146 Azaı̈s, J.-M. and Delmas, C. (2002). Asymptotic expansions for the distribution of the maximum of Gaussian random fields. Extremes 5 181–212. MR1965978 Azaı̈s, J.-M. and Wschebor, M. (2005). On the distribution of the maximum of a Gaussian field with d parameters. Ann. Appl. Probab. 15 254–278. MR2115043 Azaı̈s, J.-M. and Wschebor, M. (2008). A general expression for the distribution of the maximum of a Gaussian field and the approximation of the tail. Stochastic Process. Appl. 118 1190–1218. MR2428714 Azaı̈s, J.-M. and Wschebor, M. (2009). Level Sets and Extrema of Random Processes and Fields. Wiley, Hoboken, NJ. MR2478201 Cheng, D. (2013). The excursion probability of Gaussian and asymptotically Gaussian random fields. Ph.D. thesis, Michigan State Univ., ProQuest LLC, Ann Arbor, MI. MR3187373 Cramér, H. and Leadbetter, M. R. (1967). Stationary and Related Stochastic Processes. Sample Function Properties and Their Applications. Wiley, New York. MR0217860 Cuzick, J. (1977). A lower bound for the prediction error of stationary Gaussian processes. Indiana Univ. Math. J. 26 577–584. MR0438452 Matheron, G. (1973). The intrinsic random functions and their applications. Adv. in Appl. Probab. 5 439–468. MR0356209 Piterbarg, V. I. (1996a). Asymptotic Methods in the Theory of Gaussian Processes and Fields. Translations of Mathematical Monographs 148. Amer. Math. Soc., Providence, RI. MR1361884 Piterbarg, V. I. (1996b). Rice’s method for large excursions of Gaussian random fields. Technical Report No. 478, Center for Stochastic Processes, Univ. North Carolina, Chapel Hill, NC. Potthoff, J. (2010). Sample properties of random fields III: Differentiability. Commun. Stoch. Anal. 4 335–353. MR2668626 Stein, M. L. (1999). Interpolation of Spatial Data: Some Theory for Kriging. Springer, New York. MR1697409 Stein, M. L. (2013). On a class of space–time intrinsic random functions. Bernoulli 19 387–408. MR3037158 Sun, J. (1993). Tail probabilities of the maxima of Gaussian random fields. Ann. Probab. 21 34–71. MR1207215 Takemura, A. and Kuriki, S. (2002). On the equivalence of the tube and Euler characteristic methods for the distribution of the maximum of Gaussian fields over piecewise smooth domains. Ann. Appl. Probab. 12 768–796. MR1910648 Taylor, J. E. and Adler, R. J. (2003). Euler characteristics for Gaussian fields on manifolds. Ann. Probab. 31 533–563. MR1964940 Taylor, J., Takemura, A. and Adler, R. J. (2005). Validity of the expected Euler characteristic heuristic. Ann. Probab. 33 1362–1396. MR2150192 Wong, R. (2001). Asymptotic Approximations of Integrals. Classics in Applied Mathematics 34. SIAM, Philadelphia, PA. MR1851050 Xiao, Y. (2009). Sample path properties of anisotropic Gaussian random fields. In A Minicourse on Stochastic Partial Differential Equations (D. Khoshnevisan and F. Rassoul-Agha, eds.). Lecture Notes in Math. 1962 145–212. Springer, Berlin. MR2508776 40 D. CHENG AND Y. XIAO Xue, Y. and Xiao, Y. (2011). Fractal and smoothness properties of space–time Gaussian models. Front. Math. China 6 1217–1248. MR2862654 Yaglom, A. M. (1957). Some classes of random fields in n-dimensional space, related to stationary random processes. Theory Probab. Appl. 2 273–320. Department of Statistics North Carolina State University 2311 Stinson Drive Campus Box 8203 Raleigh, North Carolina 27695 USA E-mail: [email protected] Department of Statistics and Probability Michigan State University 619 Red Cedar Road C-413 Wells Hall East Lansing, Michigan 48824 USA E-mail: [email protected]
10math.ST
KOSZUL HYPERSURFACES OVER THE EXTERIOR ALGEBRAS arXiv:1406.0489v1 [math.AC] 2 Jun 2014 HOP D. NGUYEN Abstract. We prove that if E is an exterior algebra over a field, h is a quadratic form, then E/(h) is Koszul if and only if h is a product of two linear forms. 1. The main result Let k be a field. In this note, we consider graded k-algebras which are quotients of the polynomial or the exterior algebras with the standard grading. Let R be such a standard graded over k. We say that R is a Koszul algebra if the residue field k has a linear free resolution over R. For recent surveys on Koszul algebras, the reader may consult [5], [7]. While the Koszul property was studied intensively for commutative algebras, it is less wellknown for quotients of exterior algebras. Any exterior algebra is Koszul because the Cartan complex is the linear free resolution for the residue field; see [2, Section 2]. The main result of this note says, quite unexpectedly, that exterior Koszul hypersurfaces are reducible. It answers in the positive an intriguing question of Phong Thieu in his thesis [10, Question 5.2.8]. Notation. If V is a k-vector space of dimension V n with a fixed k-basis e1 , . . . , en , then the notation k he1 , . . . , en i denotes the exterior algebra V . It is a graded-commutative k-algebra with the grading induced by deg ei = 1 for 1 ≤ i ≤ n, so that for all homogeneous elements a, b ∈ E = k he1 , . . . , en i, we have a ∧ b = (−1)(deg a)(deg b) b ∧ a and a ∧ a = 0, if deg a is odd. For simplicity, we will denote a ∧ b simply by ab. The main result of this note is Theorem 1.1. Let E = k he1 , . . . , en i be an exterior algebra (where n ≥ 1) and h a homogeneous form. Then E/(h) is Koszul if and only if h is a reducible quadratic form, namely h is a product of two linear forms. This is in stark contrast with the fact that any commutative quadratic hypersurface is Koszul. 2. Proof of the main result The main work in our result is done by the following Theorem 2.1. Let h = e1 f1 + e2 f2 + · · · + en fn be a quadratic form in the exterior algebra in 2n variables E = k he1 , . . . , en , f1 , . . . , fn i, where n ≥ 2. Then E/(h) is not Koszul. Date: June 3, 2014. This research was supported by the CARIGE foundation. 1 2 HOP D. NGUYEN Let M be a finitely generated graded R-module. If R is a quotient of an exterior algebra, this means that M is finitely generated, graded, and on M there are left and right R-actions such that am = (−1)(deg a)(deg m) ma for every homogeneous elements a ∈ R, m ∈ M. R Denote βi,j (M) = dimk TorR i (M, k)j the (i, j)-graded Betti number of M, where i, j ∈ Z. The R R ith total Betti number of M is βiR (M) = dimk TorR i (M, k). We let ti (M) = sup{j : βi,j (M) 6= 0} for each i ∈ Z. The last theorem will be deduced from the following analog of [3, Main Theorem, (1)], which is about syzygies of Koszul algebras in the commutative setting. Proposition 2.2. Let Q → R be a surjection of Koszul algebras. Let K. be the minimal free resolution of k over Q. Denote by Zi the i-th cycle of the complex K. ⊗Q R. Then regR Zi ≤ regR Zi−1 + 2 for all i ≥ 0. In particular, tQ i (R) ≤ 2i for all i ≥ 0. Proof. The proof is similar to that of [4, Lemma 2.10]. Denote by B. , H. the boundary and homology of the complex C. = K. ⊗Q R. For each i > 0, we have short exact sequences 0 → Zi → Ci → Bi−1 → 0, 0 → Bi−1 → Zi−1 → Hi−1 → 0. Therefore combining with the fact that K is a linear resolution, we get regR Zi ≤ max{regR Ci , regR Bi−1 + 1} ≤ max{i, regR Zi−1 + 1, regR Hi−1 + 2}. Q Let m be the graded maximal ideal of R. Since Hi ∼ = Tori (k, R), we have mHi = 0 for all i ≥ 0. R Now regR k = 0 since R is a Koszul algebra, hence regR Hi−1 = tR 0 (Hi−1 ) ≤ t0 (Zi−1 ) ≤ reg R Zi−1 . Hence regR Zi ≤ max{i, regR Zi−1 + 2}. R As Zi ⊆ Ci and tR 0 (Ci ) = i, we get regR Zi ≥ t0 (Zi ) ≥ i. Therefore reg R Zi ≤ regR Zi−1 + 2. Q By induction, regR Zi ≤ 2i for all i ≥ 0. For the second statement, we have tQ i (R) = t0 (Hi ) = R tR  0 (Hi ) ≤ t0 (Zi ) ≤ reg R Zi ≤ 2i. Lemma 2.3. Let R = E/(h) where E = k he1 , . . . , en , f1 , . . . , fn i and h = e1 f1 +e2 f2 +· · ·+en fn . E Then β2,n+2 (R) 6= 0. Proof. This follows since the identity e1 · · · en h = 0 gives a minimal second syzygy of degree n + 2 of R as an E-module; see the proof of [9, Theorem 1.2].  Proof of Theorem 2.1. For n ≥ 3, from Lemma 2.3 and Proposition 2.2, we get the result. For n = 2 then E = k he1 , e2 , f1 , f2 i, h = e1 f1 + e2 f2 . Denote A = E/(h), and PkA (t) = ∞ X βiR (k)ti ∈ Z[[t]] i=0 the Poincaré series of k. If A were Koszul, we obtain an equality PkA (t)HA (−t) = 1, KOSZUL HYPERSURFACES OVER THE EXTERIOR ALGEBRAS 3 where HA (t) is the Hilbert series of A. Note that HA (t) = 1 + 4t + 5t2 , hence 1/HA (−t) = 1 + 4t + 11t2 + 24t3 + 41t4 + 44t5 − 29t6 − · · · which cannot be the non-negative series PkA (t). Hence A is not Koszul.  Example 2.4. Consider E = Q[e1 , e2 , e3 , f1 , f2 , f3 ] and h = e1 f1 + e2 f2 + e3 f3 . The Betti table of the minimal free resolution of Q over E/(h) is given by Macaulay2 [8] as follow 0 1 2 3 4 5 6 7 total: 1 6 22 76 302 1272 5189 20614 0: 1 6 22 62 148 314 610 1106 1: . . . . . . . . 2: . . . 14 154 958 4383 16372 3: . . . . . . . . 4: . . . . . . 196 3136 Proof of Theorem 1.1. We can assume that h is a quadratic form. The “if” part is easy and was pointed out in [10, Theorem 5.1.5]; we include an argument here. There is nothing to do if n = 1 or h = 0, so we can assume that n ≥ 2 and h 6= 0. If h is reducible, by a suitable change of coordinates, we can assume that h = e1 e2 . Then E/(h) has a Koszul filtration in the sense of [6] hence it is Koszul. The “only if” part: if h is not reducible, by a suitable change of coordinates, we can assume that h = e1 e2 + e3 e4 + · · · + e2i−1 e2i for some 2 ≤ i ≤ n/2. Then k he1 , . . . , e2i i /(h) is not Koszul by Theorem 2.1, and it is an algebra retract of E/(h). Therefore E/(h) is also not Koszul.  3. Final remarks Remark 3.1. The theory of Gröbner basis was extended to the exterior algebras by Aramova, Herzog and Hibi in [2]. It is also true as in the commutative case that, if J is a homogeneous ideal in the exterior algebra E and J has quadratic Gröbner basis with respect to some term order on E, then E/J is Koszul (see [10, Theorem 5.1.5]). Note however that the ideal I = (e1 f1 +e2 f2 +· · ·+en fn ) of E = k he1 , . . . , en , f1 , . . . , fn i (where n ≥ 2) does not have a quadratic Gröbner basis in the natural coordinates e1 , . . . , en , f1 , . . . , fn . Indeed, we can assume that e1 f1 is the initial form of e1 f1 + e2 f2 + · · · + en fn . Now clearly e1 (e2 f2 + · · · + en fn ) ∈ I, and its initial form is not divisible by e1 f1 , so any Gröbner basis of I must contain a cubic form. Remark 3.2. (i) Note that the ideal J = (e1 e2 − f1 f2 , e1 f1 − e2 f2 ) of E = k he1 , e2 , f1 , f2 i is generated by two irreducible quadratic forms, but E/J is Koszul. In fact, it has a Koszul filtration; see [10, Example 5.2.2(ii)]. On the other hand, it is shown in loc. cit. that J has no quadratic Gröbner basis in the natural coordinates. (ii) Note that if E = k he1 , . . . , en i be an exterior algebra and I be an ideal generated by reducible quadratic forms then E/I is not Koszul in general. For example, E = Q he1 , . . . , e5 i and I = (e1 e2 , e3 e4 , (e1 + e3 )e5 ) then E/I is not Koszul, since the Betti table of Q over E/I is 0 1 2 3 4 total: 1 5 18 57 171 0: 1 5 18 56 160 1: . . . 1 11 4 HOP D. NGUYEN (iii) Many results on the exterior algebras have analogues over commutative complete intersections; see, e.g., [1], [2]. However, if S = k[x1 , . . . , xn ]/(x21 , . . . , x2n ) and h a reducible quadratic form, S/(h) is not Koszul in general. For example, take S = Q[x, y, z, t]/(x2 , y 2, z 2 , t2 ) and h = x(y + z + t) then S/(h) is not Koszul since the resolution of Q over S/(h) is 0 1 2 3 4 total: 1 4 11 27 66 0: 1 4 11 25 51 1: . . . 2 15 References [1] A. Aramova, L.L. Avramov and J. Herzog, Resolutions of monomial ideals and cohomology over exterior algebras. Tran. Amer. Math. Soc. 352 (1999), 579–594. [2] A. Aramova, J. Herzog and T. Hibi, Gotzmann theorems for exterior algebras and combinatorics. J. Algebra 191 (1997), 174–211. [3] L.L. Avramov, A. Conca and S.B. Iyengar, Free resolutions over commutative Koszul algebras, Math. Res. Lett. 17 (2010), 197–210. [4] A. Conca, Koszul algebras and their syzygies. in A. Conca et al., Combinatorial Algebraic Geometry, Lecture Notes in Mathematics 2108, Springer (2014), 1–31. [5] A. Conca, E. De Negri and M.E. Rossi, Koszul algebra and regularity. in Commutative Algebra: expository papers dedicated to David Eisenbud on the occasion of his 65th birthday, I. Peeva (ed.), Springer (2013), 285–315. [6] A. Conca, N.V. Trung and G. Valla, Koszul property for points in projective space. Math. Scand. 89 (2001), 201–216. [7] R. Fröberg, Koszul algebras. In: Advances in commutative ring theory (Fez, 1997), 337–350, Lecture Notes Pure Appl. Math. 205, Dekker, New York (1999). [8] D. Grayson and M. Stillman, Macaulay2. A software system for research in algebraic geometry. http://www.math.uiuc.edu/Macaulay2/ [9] J. McCullough, Stillman’s question for exterior algebras. Preprint (2013), http://arxiv.org/abs/1307.8162. [10] P.D. Thieu, On graded ideals over the exterior algebra with applications to hyperplane arrangements. Ph.D. dissertation, Universität Osnabrück (2013). available online from the address https://repositorium.uni-osnabrueck.de/handle/urn:nbn:de:gbv:700-2013092311626 Ernst-Abbe-Platz 5, Appartment 605, 07743 Jena, Germany E-mail address: [email protected]
0math.AC
arXiv:1702.01692v1 [cs.NE] 6 Feb 2017 Distributed Evolutionary k-way Node Separators∗ Peter Sanders Christian Schulz Karlsruhe Institute of Technology Karlsruhe, Germany [email protected] Karlsruhe Institute of Technology Karlsruhe, Germany and University of Vienna Vienna, Austria [email protected] Darren Strash Robert Williger Colgate University Hamilton, USA [email protected] Karlsruhe Institute of Technology Karlsruhe, Germany [email protected] ABSTRACT Computing high quality node separators in large graphs is necessary for a variety of applications, ranging from divideand-conquer algorithms to VLSI design. In this work, we present a novel distributed evolutionary algorithm tackling the k-way node separator problem. A key component of our contribution includes new k-way local search algorithms based on maximum flows. We combine our local search with a multilevel approach to compute an initial population for our evolutionary algorithm, and further show how to modify the coarsening stage of our multilevel algorithm to create effective combine and mutation operations. Lastly, we combine these techniques with a scalable communication protocol, producing a system that is able to compute high quality solutions in a short amount of time. Our experiments against competing algorithms show that our advanced evolutionary algorithm computes the best result on 94% of the chosen benchmark instances. KEYWORDS graph partitioning, node separators, max-flow min-cut 1 INTRODUCTION Given a graph G = (V, E), the k-way node separator problem is to find a small separator S ⊂ V , and k disjoint subsets of V , V1 , . . . , Vk called blocks, such that no edgesSexist between two different blocks Vi and Vj (i = 6 j) and V = i Vi ∪S. The objective is to minimize the size of the separator S or, depending on the application, the cumulative weight of its nodes, while the blocks Vi are balanced. Note that removing the set S from the graph results in at least k connected components. Many algorithms rely on small node separators. For example, small balanced separators are a popular tool in divideand-conquer strategies [2, 18, 20], are useful to speed up the computations of shortest paths [7, 8, 28], are necessary in scientific computing to compute fill reducing orderings with nested dissection algorithms [13] or in VLSI design [2, 18]. ∗ This work was partially supported by DFG grants SA 933/11-1. Finding a balanced node separator is NP-hard for general graphs even if the maximum node degree is three [4, 12]. Therefore, heuristic and approximation algorithms are used in practice to find small node separators. The most commonly used method to solve the node separator problem on large graphs in practice is the multilevel approach. During a coarsening phase, a multilevel algorithm reduces the graph size by iteratively contracting the nodes and edges of G until the graph is small enough to compute a node separator by some other (presumably time consuming) algorithm. A node separator of the input graph is then constructed by iteratively uncontracting the graph, transferring the solution to this finer graph, and then applying local search algorithms to improve the solution. Although current solvers are typically fast enough for most applications, they unfortunately produce separators of low solution quality. This may be acceptable in applications that use a separator just once, however, many applications first compute a separator as a preprocessing step, and then rely on a high-quality separator for speed in later stages. This is true in VLSI design [2, 18], where even small improvements in separator size can have a large impact on computation time and production costs. High-quality node separators can also speed up shortest path queries in road networks, for example, in customizable contraction hierarchies [8], where smaller node separators yield better node orderings that are repeatedly used to answer shortest path queries. The cost for computing one high quality node separator is then amortized over a many shortest path queries. Hence, our focus is on solution quality in this work. 1.1 Our Results The main contribution of this paper is a technique that integrates an evolutionary search algorithm with a novel multilevel k-node separator algorithm and its scalable parallelization. We present novel mutation and combine operators for the problem which are based on the multilevel scheme. Due to the coarse-grained parallelization, our system is able to compute separators that have high quality within a few minutes for graphs of moderate size. Peter Sanders, Christian Schulz, Darren Strash, and Robert Williger 2 PRELIMINARIES 2.1 Basic Concepts Throughout this paper, we consider an undirected graph G = (V = {0, . . . , n − 1}, E) with n = |V |, and m = |E|. Γ(v) := {u : {v, u} ∈ E} denotes the neighborhood of a node v. A graph S = (V 0 , E 0 ) is said to be a subgraph of G = (V, E) if V 0 ⊆ V and E 0 ⊆ E ∩ (V 0 × V 0 ). We call S an induced subgraph when E 0 = E ∩(V 0 ×V 0 ). For a set of nodes U ⊆ V , G[U ] denotes the subgraph induced by U . The graph partitioning problem, which is closely related to the node separator problem, asks for blocks of nodes V1 ,. . . ,Vk that partition V (i.e., V1 ∪· · ·∪Vk = V and Vi ∩Vj = ∅ for i = 6 j). A balancing constraint demands that ∀i ∈ {1..k} : |Vi | ≤ Lmax := (1+)d|V |/ke for some parameter .PIn this case, the objective is often to minimize the total cut i<j |Eij | where Eij := {{u, v} ∈ E : u ∈ Vi , v ∈ Vj }. The set of cut edges is also called edge separator. An abstract view of the partitioned graph is the so called quotient graph, where nodes represent blocks and edges are induced by connectivity between blocks. The node separator problem asks to find blocks, V1 , . . . , Vk and a separator S that partition V such that there are no edges between the blocks. Again, a balancing constraint demands |Vi | ≤ (1+)d|V |/ke. However, there is no balancing constraint on the separator S. The objective is to minimize the size of the separator |S|. Note that removing the set S from the graph results in at least k connected components and that the blocks Vi itself do not need to be connected components. Two blocks of Vi and Vj are adjoint if there exists a separator node s ∈ S that connects both blocks. Note that s can separate more than two blocks. For the separator case, edges in the quotient graph are induced by adjoint blocks. By default, our initial inputs will have unit edge and node weights. However, the results in this paper are easily transferable to node and edge weighted problems. A matching M ⊆ E is a set of edges that do not share any common nodes, i.e. the graph (V, M ) has maximum degree one. Contracting an edge {u, v} replaces the nodes u and v by a new node x connected to the former neighbors of u and v. We set c(x) = c(u) + c(v). If replacing edges of the form {u, w} , {v, w} would generate two parallel edges {x, w}, we insert a single edge with ω({x, w}) = ω({u, w}) + ω({v, w}). Uncontracting an edge e “undoes” its contraction. In order to avoid tedious notation, G will denote the current state of the graph before and after a (un)contraction unless we explicitly want to refer to different states of the graph. The multilevel approach consists of three main phases. In the contraction (coarsening) phase, we iteratively identify matchings M ⊆ E and contract the edges in M . Contraction should quickly reduce the size of the input and each computed level should reflect the global structure of the input graph. Contraction is stopped when the graph is small enough so that the problem can be solved by some other potentially more expensive algorithm. In the local search (or uncoarsening) phase, matchings are iteratively uncontracted. After uncontracting a matching, a local search algorithm moves nodes to decrease the size of the separator or to to improve balance of the block while keeping the size of the separator. The intuition behind the approach is that a good solution at one level of the hierarchy will also be a good solution on the next finer level so that local search will quickly find a good solution. 2.2 Related Work Here, we focus on results closely related to our main contributions, as well as previous work on the node separator problem. However, we briefly mention that there has been a huge amount of research on graph partitioning, which is closely related to the node separator problem. We refer the reader to [3, 5] for thorough reviews of the results in this area. 2-way Node Separators. In contrast to the NP-hardness of the problem in general, Lipton and Tarjan [19] showed that small 2-way balanced separators can always be found in linear time for planar graphs. Their planar separator theorem states that, for planar graphs, one can always p find a 2-way separator S in linear time such that |S| = O( |V |) and |Vi | ≤ 2|V |/3. Note that, to achieve better balance, the problem remains NP-hard [11] even for planar graphs. For general graphs there are several heuristics to compute small node separators. A common and simple method is to first compute an edge separator using a multilevel graph partitioning algorithm, and then compute a node separator by selecting nodes incident to the edge separator [24, 27]. A major drawback to this method is that the graph partitioning objective—to minimize the number of cut edges—differs from the objective of the node separator problem. This difference in combinatorial structure, unfortunately, means that graph partitioning approaches are unlikely to find high quality solutions. The Metis [16] and Scotch [23] graph partitioners use a multilevel approach to obtain a 2-way node separator. After contraction, both tools compute a node separator on the coarsest graph using a greedy algorithm. This separator is then transferred level-by-level, dropping non-needed nodes on each level and applying Fiduccia-Mattheyses (FM) style local search. LaSalle and Karypis [17] further gave a sharedmemory parallel algorithm and showed that a multilevel approach combining greedy local search with a segmented FM algorithm can outperform serial FM algorithms. Other recent approaches look at variations of the node separator problem, such as Pareto solutions for edge cut versus balance [15], and enforcing both upper and lower bounds on block sizes [14]. k-way Node Separators. In the theoretical algorithms literature, a multiway separator is the generalization of separator to a higher number of blocks. Frederickson [10] first gave this generalization, and showed that planar graphs can be partitioned into O(|V |/k)√subsets of size at most k, where each subgraph shares O( k) boundary vertices with other subgraphs. Frederickson’s generalization of a separator is different than what we consider here: we do not attempt to Distributed Evolutionary k-way Node Separators minimize the number of nodes that separate pairs of blocks, instead we minimize the total number of nodes that collectively separate all blocks. In practice, the balance constraint on the block size may also implicitly minimize the number of separator nodes between blocks, but this is not strictly enforced. We are currently unaware of any existing algorithm to compute a k-way node separator. However, we note that, similar to 2-way node separators, a k-way node separator may be computed by first computing a k-way edge separator, and then keeping some or all of the nodes incident to the edge separator as a node separator. 2.3 Detailed Related Work Recently, we presented a new multilevel algorithm for the 2-way node separator problem [26]. We outline the details of the multilevel algorithm here since we modify this algorithm to compute k-way node separators and then use the modified algorithm to compute the initial population of the evolutionary algorithm. During coarsening, they use a two-phase approach, which makes contraction more systematic by separating two issues: A rating function and a matching algorithm. Hence, the coarsening algorithm captures both local information and the global structure of the graph. While the rating function allows a flexible characterization of what a “good” contracted graph is, the simple, standard definition of the matching problem allows to reuse previously developed algorithms for weighted matching. Their method further uses the Global Path Algorithm (GPA) [21] to compute matchings, which runs in near-linear time. GPA scans the edges in order of decreasing weight (rating) but rather than immediately building a matching, it first constructs a collection of paths and evenlength cycles. Afterwards, optimal solutions are computed for each of these paths and cycles using dynamic programming. Coarsening is stopped as soon as the graph has less than ten thousand nodes. To compute an initial separator, Sanders and Schulz compute an edge separator, from which they derive a node separator. Conversion is done by using all boundary nodes as initial separator S and using the flow-based technique described below to select the smallest separator contained in the induced bipartite subgraph. Two-way local search is based on localized local search and flow-based techniques. Localized local search algorithms for the node separator problem are initialized only with a subset of given separator instead of the whole separator set. In each iteration a separator node with the highest priority not violating the balance constraint is moved. The priority is based on the gain concept, i.e. the decrease in the objective when the separator node is moved into a block. More precisely, the gain of the node is the weight of v minus the weight of the nodes that have to be added to the separator once it is moved. Each node is moved at most once out of the separator within a single local search. After a node is moved, newly added separator nodes become eligible for movement. The other local search algorithm contributed is based on maximum flows. More precisely, the authors solve a nodecapacitated flow problem F = (VF , EF ) to improve a given node separator. We shortly outline the details. Given a set of nodes A ⊂ V , its border is defined as ∂A := {u ∈ A | ∃(u, v) ∈ E : v 6∈ A}. The set ∂1 A := ∂A ∩ V1 is called left border of A and the set ∂2 A := ∂A ∩ V2 is called right border of A. An A induced flow problem F is the node induced subgraph G[A] using ∞ as edge-capacities and the node weights of the graph as node-capacities. Additionally there are two nodes s, t that are connected to the border of A. More precisely, s is connected to all left border nodes ∂1 A and all right border nodes ∂2 A are connected to t. These new edges get capacity ∞. Note that the additional edges are directed. F has the balance property if each (s,t)-flow induces a balanced node separator in G, i.e. the blocks Vi fulfill the balancing constraint. The basic idea is to construct a flow problem F having the balance property. Such a subgraph is found by performing breadth first searches (BFS) initialized with the separator nodes. The algorithms starts by setting A to S and extending it by performing two BFS. The first BFS is initialized with the current separator nodes S and only looks at nodes in block V1 . The same is done during the second BFS with the difference that now looks at nodes of block V2 . Each node touched by any of the BFS is added to A. The BFSs are stopped in such a way that the final solution of the flow problem (which can be transformed into a separator of the original problem) yields a balanced separator in the original graph. To obtain even better solutions, larger flow-problems can be defined by dropping the requirement that each cut in the flow problem corresponds to a balanced node separator in the original graph. If the resulting node separator is not balanced, then the algorithms starts again with a smaller flow problems, i.e. stopping the BFS to define the flow problem earlier. To improve solution quality, the notion of iterated multilevel schemes has been introduced to the node separator problem. Here, one transfers a solution of a previous multilevel cycle down the hierarchy and uses it as initial solution. More precisely, this can be done by not contracting any cut edge, i.e. an edge running between a block and the separator. This is achieved by modifying the matching algorithm to not match any edge that runs between Vi and S (i = 1, 2, . . . , k). Hence, when contraction is done, every edge leaving the separator will remain and one can transfer the node separator down in the hierarchy. Thus a given node separator can be used as initial node separator of the coarsest graph (having the same balance and size as the node separator of the finest graph). This ensures non-decreasing quality, if the local search algorithm guarantees no worsening. 3 LOCAL SEARCH AND BALANCING Local search is used to improve a given solution to the node separator problem on each level of the multilevel hierarchy. As the term implies we locally search for a better separator Peter Sanders, Christian Schulz, Darren Strash, and Robert Williger around the current separator in order to find a new locally optimal solution. In this section, we show how we can use the flow-based local improvement method described above to locally improve a k-way separator for k > 2 and describe algorithms that are able to balance solutions, e.g. solutions that contain blocks with too many vertices. These algorithms are used to create the initial population of our evolutionary algorithm as well as to provide the combine and mutation operations. Our algorithm is called Adv and the evolutionary algorithm that is introduced later AdvEvo. 3.1 k-way Local Search Our k-way local search builds on top of the flow-based search which is intended for improving a separator with k = 2. The main idea is to find pairs of adjoint blocks and then perform local search on the subgraph induced by adjoint block pairs. Preprocessing. In order to find pairs of adjoint blocks, we look at separator nodes which directly separate two different blocks, meaning these separator nodes are adjacent to nodes from at least two different blocks not including the separator. In general directly separating nodes do not have to exist (see Figure 1). In other words, it may be that a separator disconnects two blocks, but the shortest path distance between the blocks is greater or equal to two. Using a preprocessing step, we first make sure that each separator node is adjacent to at least two blocks, i.e. each separator node is directly separating. The preprocessing step works as follows: we iterate over all separator nodes and try to remove them from the separator if they do not directly separate two blocks. The order in which we look at the separator nodes is given by the number of adjacent blocks (highest first). Let s be the current separator node under consideration. If it has two or more non-separator neighbors in different blocks, it already directly separates at least two blocks and we continue. If s only has neighbors in a single block in addition to the separator, we move it into that block. Lastly, if s only has other separator nodes as neighbors, we put it into a block having smallest overall weight. In each step, we update the priorities of adjacent neighboring separator nodes. Note that nodes are only removed from the separator and never added. Moreover, removing a node from the separator can increase the priority Figure 1: Illustration of the preprocessing for a graph with blocks V1 (green), V2 (blue) and separator S (red). of an adjacent separator node only by one. As soon as the priority of a node is larger than one, it is directly separating and we do not have to look at the vertex again. After the algorithm is done, each separator node is directly separating at least two blocks and we can build the quotient graph in order to find adjoint blocks. Our preprocessing can introduce imbalance to the solution. Hence, we run the balance routine defined below after preprocessing. Pair-wise Local Search. Subsequent to the preprocessing step, we identify the set of all adjoint block pairs P by iterating through all separator nodes and their adjacent nodes. We iterate through all pairs p = (A, B) ∈ P and build the subgraph Gp . Gp is induced by the set of nodes consisting of all nodes in A and B as well as all separator nodes that directly separate the blocks. After building Gp , we run local search designed for 2-way separators on this subgraph. Note that an improvement in the separator size between A and B directly corresponds to an improvement to the overall separator size. To gain even smaller separators and because the solution is potentially modified by local search, we repeat local search multiple times in the following way. The algorithm is organized in rounds. In each round, we iterate over the elements in P and perform local search on each induced subgraph. If local search has not been successful, we remove p from P . Otherwise, we keep p for the next round. 3.2 Balancing To guarantee the balance constraint, we use a balance operation. Given an imbalanced separator of a graph, the algorithm returns a balanced node separator. Roughly speaking, we move nodes from imbalanced blocks towards the blocks that can take nodes without becoming overloaded (see Figure 2 for an illustrating example). As long as there are imbalanced blocks, we iteratively repeat the following steps: First, we find a path p from the heaviest block H to the lightest block L in the quotient graph. If there is no such path, we directly move a node to the lightest block and make its neighbors separator nodes. Next, we iterate through the edges (A, B) ∈ p and move nodes from A into B. In general, we move min(Lmax − |L|, |H| − Lmax ) nodes along the path, i.e. as many nodes as the lightest block can take without getting overloaded and as little nodes necessary so that the heaviest block is balanced. Moving nodes is based on gain of the movement as defined in Section 2.3. Basically, we use a priority queue of separator nodes that directly separate A and B with the key being set to the gain. Note that these movements create new separator nodes and can potentially worsen solution quality. We use the gain definition because our primary target is to minimize the increase of the separator size. Then we dequeue nodes from the our priority queue until A is balanced. We move each dequeued node s to B and move its neighbors being in A into the separator and the priority queue. Also the priorities of the nodes in the queue are updated. After moving the nodes A will be balanced. If B is imbalanced, we continue with the next pair in the path, Distributed Evolutionary k-way Node Separators Figure 2: Illustration of the quotient graph and the balancing path (blue) from an imbalanced block (red) to the lightest block (green). i.e. sending the same amount of nodes. If B is also balanced, we are done with this path and do not move any more nodes. Our algorithm continues with the next imbalanced block. 4 EVOLUTIONARY K-WAY NODE SEPARATORS Our EA starts with a population of individuals (in our case the node separator of the graph) and evolves the population into different populations over several rounds. In each round, the EA uses a selection rule based on the fitness of the individuals (in our case the size of the separator) of the population to select good individuals and combine them to obtain improved offspring. Note that we can use the size/weight of the separator as a fitness function since our algorithm always generates separators fulfilling the given balance constraint, i.e. there is no need to use a penalty function to ensure that the final separator is feasible. When an offspring is generated an eviction rule is used to select a member of the population and replace it with the new offspring. In general one has to take both into consideration, the fitness of an individual and the distance between individuals in the population [1]. Our algorithm generates only one offspring per generation. 4.1 Combine Operation We now describe the combine operator. Our combine operator assures that the offspring has an objective at least as good as the best of both parents. Roughly speaking, the combine operator combines an individual/separator P = V1P , ..., VkP , S P (which has to fulfill a balance constraint) with a second individual/separator C = V1C , ..., VkC , S C . Let P be the individual with better fitness. The algorithm begins with selecting two individuals from the population. The selection process is based on the tournament selection rule [22], i.e. P is the fittest out of two random individuals R1 , R2 from the population and the same is done to select C. Both node separators are used as input for our multi-level algorithm in the following sense. Let E be the set of edges that are cut edges, i.e. edges that run between blocks and the separator, in either P or C. All edges in E are blocked during the coarsening phase, i.e. they are not contracted during the coarsening phase. In other words these edges are not eligible for the matching algorithm used during the coarsening phase and therefore are not part of any matching. The stopping criterion of the multi-level algorithm is modified such that it stops when no contractable edge is left. As soon as the coarsening phase is stopped, we apply the separator P to the coarsest graph and use this as initial separator. This is possible since we did not contract any edge running between the blocks and the separator in P. Note that due to the specialized coarsening phase and this specialized initial phase we obtain a high quality initial solution on a very coarse graph which is usually not discovered by conventional algorithms that compute an initial solution. Since our local search algorithms guarantee no worsening of the input solution and we use random tie breaking we can assure non-decreasing quality. Note that the local search algorithms can effectively exchange good parts of the solution on the coarse levels by moving only a few vertices. Also note that this combine operator can be extended to be a multi-point combine operator, i.e. the operator would use ` instead of two parents. However, during the course of the algorithm a sequence of two point combine steps is executed which somehow "emulates" a multi-point combine step. Therefore, we restrict ourselves to the case ` = 2. When the offspring is generated we have to decide which solution should be evicted from the current population. We evict the solution that is most similar to the offspring among those individuals in the population that have an objective worse or equal than the offspring itself. Here, we define the similarity σ of two node separators S1 and S2 as the cardinality of the symmetric difference of both separators: σ = |(S1 \ S2 ) ∪ (S2 \ S1 )|. Therefore σ denotes the number of nodes contained in one separator but not in the other. This ensures some diversity in the population and hence makes the evolutionary algorithm more effective. 4.2 Mutation Operation The mutation operation works similar to the combine operation. The main difference is that there is only one input individual to the multi-level algorithm and that the offspring can be less fit compared to the input individual. Hence, only edges that run between the blocks and the separator of that individual are not eligible for the matching algorithm. This way the input individual can be transferred downwards in the hierarchy. Additionally, the solution is not used as initial separator but the initial algorithm is performed to find an initial separator. Note however due to the way the coarsening process is defined the input separator is still contained in the coarsest graph. 5 PUTTING THINGS TOGETHER AND PARALLELIZATION We now explain parallelization and describe how everything is put together to be our full evolutionary algorithm AdvEvo. We use a parallelization scheme that has been successfully used in graph partitioning [25]. Each processing element Peter Sanders, Christian Schulz, Darren Strash, and Robert Williger (PE) basically performs the same operations using different random seeds (see Algorithm 1). First we estimate the population size S: each PE creates an individuum and measures the time t spend. We then choose S such that the time for creating S node separators is approximately ttotal /f where the fraction f is a tuning parameter and ttotal is the total running time that the algorithm is given to produce a node separator of the graph. Each PE then builds its own population, i.e. our multi-level algorithm is called several times to create S individuals/separators. Afterwards the algorithm proceeds in rounds as long as time is left. With corresponding probabilities, mutation or combine operations are performed and the new offspring is inserted into the population. We choose a parallelization/communication protocol that is quite similar to randomized rumor spreading [9] which has shown to be scalable in an evolutionary algorithm for graph partitioning [25]. We follow their description closely. Let p denote the number of PEs used. A communication step is organized in rounds. In each round, a PE chooses a communication partner and sends her the currently best node separator P of the local population. The selection of the communication partner is done uniformly at random among those PEs to which P not already has been send to. Afterwards, a PE checks if there are incoming individuals and if so inserts them into the local population using the eviction strategy described above. If P is improved, all PEs are again eligible. This is repeated log p times. The algorithm is implemented completely asynchronously, i.e. there is no need for a global synchronization. approach, but keep the rest of the algorithm. More precisely, this means that the population of the algorithm are still graph partitions instead of separators, but for example selection is based on the size of the derivable separator. Additionally, the combine operations in KaFFPaE still optimize for cuts instead of separators. This algorithm is called SimpleEvo. 6 EXPERIMENTS Methodology. We have implemented the algorithm described above within the KaHIP framework using C++ and compiled all algorithms using gcc 4.8.3 with full optimization’s turned on (-O3 flag). We integrated our algorithms in KaHIP v1.00. Our new codes will also be included into the KaHIP graph partitioning framework. Each run was made on a machine that has four Octa-Core Intel Xeon E5-2670 processors running at 2.6 GHz with 64 GB local memory. Our main objective is the cardinality of node separators on the input graph. In our experiments, we use the imbalance parameter  = 3% since this is one of the default values in the Metis graph partitioning framework. Our full algorithm is not too sensitive about the precise choice with most of the parameters. However, we performed a number of experiments to evaluate the influence and choose the parameters of our algorithms. We omit details here and refer the reader to [30]. We mark the instances that have been used for the parameter tuning in Table 1 with a * and exclude these graphs from our experiments. We present multiple views on the data: average values (geometric mean) as well as convergence plots that show quality achieved by the algorithms over time and performance plots. Algorithm 1 locallyEvolve estimate population size S while time left if elapsed time < ttotal /f then create individual, insert into local population else flip coin c with corresponding probabilities if c shows head then perform mutation else perform combine insert offspring into population if possible communicate according to comm. protocol 5.1 Miscellaneous Besides Adv and AdvEvo, we also use two more algorithms to compare solution quality. The first one is a sequential algorithm that starts by computing a k-way partition using KaFFPa-Strong and derives a k-way separator by pair-wise decoupling by using the method of Pothen and Fan [24] on each adjacent pair of blocks. The main idea of Pothen and Fan is to compute a minimum vertex cover in the bipartite subgraph induced by the set of cut edges between two pairs of blocks. The union of the computed separators nodes is a k-way separator. In our experiments, the algorithm is called Simple. The second algorithm, is a modification of KaFFPaE [25] which is an evolutionary algorithm to compute graph partitions. We modify the fitness function to be the size of the separator that can be derived using the Simple Graph n Walshaw Graphs add20 2 395 data 2 851 3elt 4 720 uk 4 824 add32 4 960 bcsstk33* 8 738 whitaker3 9 800 crack 10 240 wing_nodal 10 937 fe_4elt2 11 143 vibrobox* 12 328 bcsstk29 13 992 4elt 15 606 fe_sphere 16 386 cti 16 840 memplus 17 758 cs4 22 499 bcsstk30 28 924 bcsstk31 35 588 fe_pwt 36 519 Graph n Walshaw Graphs bcsstk32 44 609 fe_body* 45 087 t60k 60 005 wing 62 032 brack2 62 631 finan512 74 752 fe_tooth* 78 136 fe_rotor 99 617 UF Graphs cop20k_A 99 843 2cubes_sphere* 101 492 thermomech_TC 102 158 cfd2 123 440 boneS01 127 224 Dubcova3 146 689 bmwcra_1 148 770 G2_circuit* 150 102 c-73 169 422 shipsec5 179 860 cont-300 180 895 Table 1: Walshaw graphs and florida sparse matrix graphs from [26]. Basic properties of the instances. Graphs with a * have been used for parameter tuning and are excluded from the evaluation. 2100 k=32 SimReps SimEvo 1900 AdvReps AdvEvo 2 10 50 500 normalized time tn 440 410 380 k=16 SimReps SimEvo 1200 1300 AdvReps AdvEvo 1100 660 5 50 500 10000 normalized time tn SimReps SimEvo 5 50 500 10000 normalized time tn 2 10 50 500 5000 normalized time tn k=64 3200 SimReps SimEvo 720 780 AdvReps AdvEvo AdvReps AdvEvo AdvReps AdvEvo SimReps SimEvo 2900 k=8 k=4 2600 5 50 500 10000 normalized time tn mean min separator size SimReps SimEvo mean min separator size AdvReps AdvEvo mean min separator size 160 165 170 175 k=2 1700 mean min separator size mean min separator size mean min separator size Distributed Evolutionary k-way Node Separators 2 10 50 500 normalized time tn Figure 3: Convergence plots for different values of k for different algorithms. Peter Sanders, Christian Schulz, Darren Strash, and Robert Williger We now explain how we compute the convergence plots. We start explaining how we compute them for a single instance I: whenever a PE creates a separator it reports a pair (t, separator size), where the timestamp t is the currently elapsed time on the particular PE and separator size refers to the size of the separator that has been created. When performing multiple repetitions, we report average values (t, avg. separator size) instead. After the completion of algorithm we are left with P sequences of pairs (t, separator size) which we now merge into one sequence. The merged sequence is sorted by the timestamp t. The resulting sequence is called T I . Since we are interested in the evolution of the solution quality, we I compute another sequence Tmin . For each entry (in sorted order) in T I , we insert the entry (t, mint0 ≤t separator size(t0 )) I into Tmin . Here, mint0 ≤t separator size(t0 ) is the minimum I separator size that occurred until time t. Nmin refers to the normalized sequence, i.e. each entry (t, separator size) in I Tmin is replaced by (tn , separator size) where tn = t/tI and tI is the average time that the sequential algorithm needs to compute a separator for the instance I. To obtain average values over multiple instances we do the following: for each I instance we label all entries in Nmin , i.e. (tn , separator size) is replaced by (tn , separator size, I). We then merge all I sequences Nmin and sort by tn . The resulting sequence is called S. The final sequence Sg presents event based geometric averages values. We start by computing the geometric I mean value G using the first value of all Nmin (over I). To obtain Sg , we basically sweep through S: for each entry (in sorted order) (tn , c, I) in S, we update G, i.e. the separator size of I that took part in the computation of G is replaced by the new value c, and insert (tn , G) into Sg . Note, c can be only smaller than or equal to the old value of I. Instances. We use the small and Florida Sparse Matrix graphs from [26] which are from various sources to test our algorithm. Small graphs have been obtained from Chris Walshaw’s benchmark archive [29]. Graphs derived from sparse matrices have been taken from the Florida Sparse Matrix Collection [6]. Basic properties of the instances can be found in Table 1. 6.1 Separator Quality In this section we compare our algorithms in a setting where each one gets the same (fairly large) amount of time to compute a separator. We do this on the graphs from our benchmark set. We use all 16 cores per run of our machine (basically one node of the cluster) and two hours of time per instance when we use the evolutionary algorithm to create separators. We parallelized repeated executions of the sequential algorithms (embarrassingly parallel, different seeds) and also gave them 16 PEs and two hours of time to compute a separator. We look at k ∈ {2, 4, 8, 16, 32, 64} and performed three repetitions per instance. To see how the solution quality of the different algorithms evolves over time, we use convergence plots. Figure 3 shows convergence plots for k ∈ {2, 4, 8, 16, 32, 64}. Additionally, Tables 2 and k 2 4 8 16 32 64 overall AdvEvo 159.4 373.9 664.4 1097.9 1694.2 2601.8 +0% AdvReps 0.0 +1.7% +2.7% +5.1% +6.8% +8.1% 4.1% SimEvo +3.8% +5.6% +8.4% +10.4% +11.8% +15.3% 9.2% SimReps +5.0% +7.7% +11.1% +13.4% +14.4% +17.8% 11.6% Table 2: Average of AdvEvo and average increase in separator size for different algorithms. Algorithm AdvEvo AdvReps SimEvo SimReps #≤ 181 65 33 29 #< 122 7 3 0 Table 3: Number of instances where algorithm X is best w.r.t to ≤ and <. The total number of instances is 192. 3 summarize final results. Tables in the Appendix present detailed per instance results. First of all, the improvements of the evolutionary algorithms relative to repeated executions increase with growing k. This is due to the fact that the problems become more difficult when increasing the number of blocks k. For larger values of k, the quality gap between the evolutionary algorithm AdvEvo and SimEvo as well as the other algorithms increases with more time invested. On the other hand, for k = 2 there is almost no difference between the results produced by the evolutionary algorithm AdvEvo and the non-evolutionary version AdvReps. Overall, the experimental data indicates the AdvEvo is the best algorithm. Separators produced by AdvEvo are 4.1%, 9.2% and 11.6% smaller compared to AdvReps, SimEvo, and SimReps on average. Additionally, our advanced evolutionary algorithm computes the best result on 181 out of 192 instances. Note that single executions of the simple algorithms are much faster. However, the results of our experiments performed in this section emphasize that one cannot simply use the best result out of multiple repetitions of a faster algorithm to obtain the same solution quality. Yet it is interesting to see that SimpleEvo, where only the fitness function of the evolutionary algorithm is modified and the combine operation still optimizes for edge cuts of partitions, computes better solutions than its non-evolutionary counter part SimReps. 7 CONCLUSION In this work, we derived a new approach to find small node separators in large graphs which combines an evolutionary search algorithm with a multilevel method. We combined these techniques with a scalable communication protocol and obtain a system that is able to compute high quality solutions in a short amount of time. Experiments show that our advanced evolutionary algorithm computes the best result on 94% of the benchmark instances. In future work, we aim to look at different types of applications, in particular those applications in which the running time may not be considered Distributed Evolutionary k-way Node Separators a drawback when the node separator has the highest quality. Acknowledgements. The authors acknowledge support by the state of Baden-Württemberg through bwHPC. REFERENCES [1] T. Bäck. 1996. Evolutionary Algorithms in Theory and Practice: Evolution Strategies, Evolutionary Programming, Genetic Algorithms. Ph.D. Dissertation. [2] S. N. Bhatt and F. T. Leighton. 1984. A framework for solving VLSI graph layout problems. J. Comput. System Sci. 28, 2 (1984), 300 – 343. DOI:http://dx.doi.org/10.1016/0022-0000(84)90071-0 [3] C. Bichot and P. Siarry (Eds.). 2011. Graph Partitioning. Wiley. [4] T. N. Bui and C. Jones. 1992. Finding Good Approximate Vertex and Edge Partitions is NP-hard. Inform. Process. Lett. 42, 3 (1992), 153–159. [5] A. Buluç, H. Meyerhenke, I. Safro, P. Sanders, and C. Schulz. 2016. Recent Advances in Graph Partitioning. In Algorithm Engineering – Selected Results (LNCS), Vol. 9920. Springer, 117–158. [6] T. Davis. 2017. The University of Florida Sparse Matrix Collection. (2017). [7] D. Delling, M. Holzer, K. Müller, F. Schulz, and D. Wagner. 2009. High-performance multi-level routing. The Shortest Path Problem: Ninth DIMACS Implementation Challenge 74 (2009), 73–92. [8] J. Dibbelt, B. Strasser, and D. Wagner. 2014. Customizable contraction hierarchies. In 13th Int. Symp. on Exp. Algorithms (SEA’14). Springer, 271–282. [9] B. Doerr and M. Fouz. 2011. Asymptotically Optimal Randomized Rumor Spreading. In Proceedings of the 38th International Colloquium on Automata, Languages and Programming, Proceedings, Part II (LNCS), Vol. 6756. Springer, 502–513. [10] G. N. Federickson. 1987. Fast Algorithms for Shortest Paths in Planar Graphs, with Applications. SIAM J. Comput. 16, 6 (1987), 1004–1022. DOI:http://dx.doi.org/10.1137/0216064 arXiv:http://dx.doi.org/10.1137/0216064 [11] J. Fukuyama. 2006. NP-Completeness of the Planar Separator Problems. Journal of Graph Algorithms and Applications 10, 2 (2006), 317–328. [12] M. R. Garey and D. S. Johnson. 2002. Computers and Intractability. Vol. 29. WH Freeman & Co., San Francisco. [13] A. George. 1973. Nested Dissection of a Regular Finite Element Mesh. SIAM J. Numer. Anal. 10, 2 (1973), 345–363. [14] W. W. Hager, J. T. Hungerford, and I. Safro. 2014. A Multilevel Bilinear Programming Algorithm For the Vertex Separator Problem. Technical Report. [15] M. Hamann and B. Strasser. 2016. Graph Bisection with ParetoOptimization. In Proc. of the Eighteenth Workshop on Algorithm Engineering and Experiments, ALENEX’16. SIAM, 90–102. DOI: http://dx.doi.org/10.1137/1.9781611974317.8 [16] G. Karypis and V. Kumar. 1998. A Fast and High Quality Multilevel Scheme for Partitioning Irregular Graphs. SIAM Journal on Scientific Computing 20, 1 (1998), 359–392. [17] D. LaSalle and G. Karypis. 2015. Efficient Nested Dissection for Multicore Architectures. In Euro-Par 2015: Parallel Processing. Springer, 467–478. [18] C. E. Leiserson. 1980. Area-Efficient Graph Layouts. In 21st Symposium on Foundations of Computer Science. IEEE, 270– 281. [19] R. J. Lipton and R. E. Tarjan. 1979. A Separator Theorem for Planar Graphs. SIAM J. Appl. Math. 36, 2 (1979), 177–189. [20] R. J. Lipton and R. E. Tarjan. 1980. Applications of a Planar Separator Theorem. SIAM Journal On Computing 9, 3 (1980), 615–627. [21] J. Maue and P. Sanders. 2007. Engineering Algorithms for Approximate Weighted Matching. In Proceedings of the 6th Workshop on Experimental Algorithms (WEA’07) (LNCS), Vol. 4525. Springer, 242–255. http://dx.doi.org/10.1007/ 978-3-540-72845-0_19 [22] B. L Miller and D. E Goldberg. 1996. Genetic Algorithms, Tournament Selection, and the Effects of Noise. Evolutionary Computation 4, 2 (1996), 113–131. [23] F. Pellegrini. 2017. Scotch Home Page. (2017). http://www.labri. fr/pelegrin/scotch. [24] A. Pothen, H. D. Simon, and K. P. Liou. 1990. Partitioning Sparse Matrices with Eigenvectors of Graphs. SIAM J. Matrix Anal. Appl. 11, 3 (1990), 430–452. [25] P. Sanders and C. Schulz. 2012. Distributed Evolutionary Graph Partitioning. In Proc. of the 12th Workshop on Algorithm Engineering and Experimentation (ALENEX’12). 16–29. [26] P. Sanders and C. Schulz. 2016. Advanced Multilevel Node Separator Algorithms. In 15th International Symposium on Experimental Algorithms, SEA 2016, Vol. 9685. Springer, 294–309. [27] C. Schulz. 2013. High Quality Graph Partititioning. Ph.D. Dissertation. Karlsruhe Institute of Technology. [28] F. Schulz, D. Wagner, and C. Zaroliagis. 2002. Using multi-level graphs for timetable information in railway systems. In Proceedings of Algorithm Engineering and Experiments (ALENEX). Springer, 43–59. [29] A. J. Soper, C. Walshaw, and M. Cross. 2004. A Combined Evolutionary Search and Multilevel Optimisation Approach to Graph-Partitioning. Journal of Global Optimization 29, 2 (2004), 225–241. [30] R. Williger. 2016. Evolutionary k-way Node Separators. Bachelor’s Thesis. Karlsruhe Institute of Technologie. Peter Sanders, Christian Schulz, Darren Strash, and Robert Williger graph 3elt 3elt 3elt 3elt 3elt 3elt 4elt 4elt 4elt 4elt 4elt 4elt add20 add20 add20 add20 add20 add20 add32 add32 add32 add32 add32 add32 bcsstk29 bcsstk29 bcsstk29 bcsstk29 bcsstk29 bcsstk29 bcsstk30 bcsstk30 bcsstk30 bcsstk30 bcsstk30 bcsstk30 bcsstk31 bcsstk31 bcsstk31 bcsstk31 bcsstk31 bcsstk31 bcsstk32 bcsstk32 bcsstk32 bcsstk32 bcsstk32 bcsstk32 bmwcra_1 bmwcra_1 bmwcra_1 bmwcra_1 bmwcra_1 bmwcra_1 k 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 AdvEvo AdvReps SimpleEvo min avg min avg min avg 43 43 43 43 43 43 97 97 97 97 97 97 158 158 159 159 159 159 269 269 270 270 271 271 452 452 455 456 458 459 706 710 720 721 733 734 68 68 68 68 68 68 157 157 157 157 157 157 253 253 254 254 256 256 438 439 443 445 443 445 737 743 755 757 744 746 1 221 1 227 1 257 1 259 1 234 1 238 26 26 25 25 28 28 37 37 37 37 45 47 67 67 69 70 82 86 95 96 106 108 116 119 110 111 140 140 166 169 138 138 161 164 219 225 2 2 2 2 2 2 6 6 6 6 6 6 11 11 11 11 12 12 20 20 20 20 20 20 33 33 33 33 33 33 114 115 118 119 127 128 180 180 180 180 180 180 528 528 528 528 534 536 948 954 966 968 1 173 1 202 1 512 1 530 1 578 1 578 2 120 2 127 2 231 2 250 2 316 2 326 2 891 2 898 3 130 3 157 3 361 3 371 4 073 4 089 206 206 206 206 206 206 549 549 549 549 573 573 1 121 1 121 1 123 1 123 1 138 1 145 2 128 2 146 2 183 2 201 2 446 2 455 3 195 3 249 3 321 3 338 3 985 3 987 4 709 4 836 5 045 5 111 5 846 5 940 308 308 308 308 317 321 767 767 767 767 802 803 1 433 1 434 1 441 1 442 1 529 1 538 2 353 2 399 2 437 2 446 2 592 2 630 3 635 3 695 3 837 3 874 4 338 4 361 5 102 5 167 5 323 5 394 6 090 6 136 297 297 297 297 322 328 569 569 569 569 633 637 1 145 1 152 1 177 1 183 1 312 1 336 2 080 2 102 2 122 2 131 2 391 2 434 3 422 3 449 3 498 3 524 4 102 4 118 5 386 5 469 5 621 5 677 6 293 6 321 657 657 657 657 684 684 1 668 1 673 1 656 1 659 1 683 1 685 3 918 3 970 4 002 4 013 4 080 4 126 10 011 10 037 9 846 9 921 10 099 10 199 16 089 16 300 16 798 16 979 16 863 16 947 23 586 24 279 25 707 25 809 24 979 25 087 Table 4: Detailed per instance results. SimpleReps min avg 43 43 97 97 160 160 272 272 466 466 746 747 68 68 157 157 254 255 442 444 749 750 1 253 1 253 28 28 49 49 94 94 133 133 170 174 218 221 2 2 6 6 12 12 20 20 33 33 131 131 180 180 534 534 1 086 1 094 2 019 2 062 2 892 2 899 4 065 4 096 206 206 573 573 1 138 1 140 2 430 2 452 3 956 4 008 5 994 6 013 317 319 798 800 1 534 1 545 2 624 2 633 4 361 4 376 6 169 6 205 321 321 627 627 1 315 1 326 2 443 2 468 4 114 4 142 6 348 6 412 683 683 1 659 1 666 4 112 4 133 10 190 10 250 16 725 16 775 24 885 25 042 Distributed Evolutionary k-way Node Separators graph boneS01 boneS01 boneS01 boneS01 boneS01 boneS01 brack2 brack2 brack2 brack2 brack2 brack2 cfd2 cfd2 cfd2 cfd2 cfd2 cfd2 cont-300 cont-300 cont-300 cont-300 cont-300 cont-300 cop20k_A cop20k_A cop20k_A cop20k_A cop20k_A cop20k_A crack crack crack crack crack crack cs4 cs4 cs4 cs4 cs4 cs4 cti cti cti cti cti cti data data data data data data k 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 AdvEvo AdvReps SimpleEvo min avg min avg min avg 1 524 1 524 1 524 1 524 1 563 1 563 3 357 3 357 3 357 3 357 3 465 3 469 5 112 5 128 5 139 5 148 5 316 5 351 7 728 7 781 7 776 7 826 8 139 8 179 11 082 11 127 11 400 11 440 11 619 11 670 15 264 15 271 16 495 16 683 16 173 16 219 183 183 183 183 206 208 796 796 796 796 829 831 1 740 1 741 1 759 1 761 1 896 1 899 2 794 2 806 2 868 2 874 3 108 3 119 4 160 4 184 4 282 4 289 4 632 4 647 6 053 6 084 6 361 6 381 6 808 6 841 1 030 1 030 1 030 1 030 1 036 1 036 2 543 2 546 2 548 2 551 2 684 2 688 4 304 4 313 4 304 4 312 4 569 4 581 7 068 7 095 7 018 7 036 7 416 7 440 10 723 10 873 11 165 11 272 12 066 12 088 16 521 17 138 17 829 18 021 18 093 18 179 598 598 598 598 598 598 1 041 1 042 1 063 1 065 1 184 1 184 1 786 1 814 1 807 1 825 2 188 2 192 2 863 2 874 2 893 2 916 3 526 3 528 4 299 4 340 4 413 4 450 5 466 5 483 6 452 6 474 6 667 6 679 8 094 8 105 620 620 620 620 620 620 1 673 1 675 1 676 1 676 1 733 1 741 2 919 2 934 2 939 2 942 2 997 2 999 4 721 4 744 4 765 4 780 4 842 4 864 7 241 7 333 7 525 7 645 7 481 7 502 10 757 10 837 11 721 12 107 11 135 11 147 73 73 73 73 75 75 145 145 145 145 152 152 257 257 258 258 280 282 420 420 421 422 461 465 636 639 648 648 722 724 939 943 958 959 1 098 1 100 287 287 287 287 319 319 727 729 738 740 824 825 1 108 1 109 1 133 1 134 1 244 1 245 1 548 1 558 1 623 1 630 1 812 1 818 2 132 2 148 2 273 2 286 2 512 2 516 2 864 2 909 3 179 3 202 3 433 3 435 266 266 266 266 266 266 756 758 761 761 808 808 1 243 1 270 1 311 1 315 1 537 1 539 1 821 1 845 1 897 1 925 2 287 2 298 2 426 2 457 2 646 2 647 3 257 3 267 3 234 3 242 3 581 3 596 4 489 4 491 51 51 51 51 51 51 96 96 96 96 96 96 165 165 165 165 172 172 275 275 276 276 298 301 448 450 454 454 489 492 688 690 695 697 757 760 Table 5: Detailed per instance results. SimpleReps min avg 1 563 1 565 3 471 3 477 5 358 5 371 8 142 8 189 11 758 11 770 16 296 16 314 205 205 829 829 1 906 1 910 3 117 3 120 4 646 4 651 6 809 6 820 1 036 1 036 2 645 2 667 4 551 4 591 7 374 7 392 11 924 11 956 18 014 18 067 598 598 1 184 1 184 2 188 2 194 3 534 3 537 5 504 5 506 8 168 8 170 620 620 1 716 1 724 2 993 2 996 4 849 4 858 7 423 7 465 11 102 11 155 74 74 152 152 285 286 474 474 735 738 1 123 1 124 322 322 832 836 1 267 1 267 1 827 1 830 2 537 2 541 3 461 3 463 266 266 807 807 1 539 1 539 2 319 2 324 3 258 3 267 4 481 4 491 51 51 97 97 173 173 300 300 499 502 764 764 Peter Sanders, Christian Schulz, Darren Strash, and Robert Williger graph Dubcova3 Dubcova3 Dubcova3 Dubcova3 Dubcova3 Dubcova3 fe_4elt2 fe_4elt2 fe_4elt2 fe_4elt2 fe_4elt2 fe_4elt2 fe_pwt fe_pwt fe_pwt fe_pwt fe_pwt fe_pwt fe_rotor fe_rotor fe_rotor fe_rotor fe_rotor fe_rotor fe_sphere fe_sphere fe_sphere fe_sphere fe_sphere fe_sphere finan512 finan512 finan512 finan512 finan512 finan512 memplus memplus memplus memplus memplus memplus shipsec5 shipsec5 shipsec5 shipsec5 shipsec5 shipsec5 t60k t60k t60k t60k t60k t60k k 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 2 4 8 16 32 64 AdvEvo AdvReps SimpleEvo min avg min avg min avg 383 383 383 383 383 383 765 765 765 765 765 765 1 433 1 437 1 436 1 437 1 463 1 475 2 295 2 309 2 319 2 322 2 373 2 398 3 581 3 621 3 707 3 711 3 887 3 893 5 448 5 492 5 706 5 732 5 754 5 772 66 66 66 66 66 66 163 163 162 162 168 169 283 285 288 288 290 291 478 479 482 483 482 484 759 762 780 781 773 774 1 149 1 153 1 185 1 190 1 189 1 191 116 116 116 116 116 116 236 236 236 236 236 236 473 473 473 473 474 474 925 925 929 929 930 930 1 834 1 839 1 909 1 910 1 862 1 864 2 846 2 919 3 025 3 043 3 458 3 472 460 460 460 460 464 464 1 540 1 545 1 543 1 554 1 575 1 593 2 833 2 838 2 844 2 848 2 891 2 891 4 404 4 448 4 483 4 489 4 605 4 632 6 809 6 898 6 943 7 013 7 024 7 065 10 196 10 289 10 534 10 615 10 249 10 293 192 192 192 192 192 192 379 379 380 380 380 380 570 570 575 577 570 570 804 804 852 854 835 835 1 177 1 184 1 262 1 264 1 208 1 213 1 657 1 667 1 803 1 805 1 722 1 723 50 50 50 50 50 50 100 100 100 100 100 100 200 200 200 200 200 200 400 400 400 400 400 400 800 800 800 800 800 800 3 210 3 216 3 259 3 263 3 200 3 200 70 70 70 70 90 103 90 90 91 91 127 131 106 106 106 106 154 158 132 132 151 153 234 240 178 179 194 195 265 268 181 182 205 206 392 412 1 203 1 203 1 203 1 203 1 227 1 231 3 681 3 681 3 681 3 681 3 783 3 793 6 078 6 112 6 198 6 216 6 486 6 509 8 826 8 881 8 850 8 903 9 612 9 650 12 861 12 983 13 521 13 601 14 208 14 236 17 304 17 398 18 114 18 301 21 482 21 594 70 70 70 70 71 71 202 202 202 202 203 203 447 447 449 449 448 448 800 803 807 810 792 793 1 330 1 331 1 339 1 343 1 307 1 308 2 040 2 042 2 104 2 114 2 031 2 043 Table 6: Detailed per instance results. SimpleReps min avg 383 383 765 765 1 463 1 464 2 346 2 355 3 821 3 856 5 763 5 766 66 66 167 167 293 293 486 487 783 785 1 206 1 208 116 116 236 236 476 476 929 929 1 872 1 873 3 447 3 462 464 464 1 573 1 580 2 898 2 899 4 550 4 589 7 037 7 062 10 242 10 261 192 192 380 380 570 570 839 839 1 216 1 218 1 745 1 750 50 50 100 100 200 200 400 400 800 800 3 200 3 200 107 107 123 126 142 144 239 242 264 268 428 436 1 227 1 233 3 801 3 803 6 531 6 549 9 570 9 651 14 316 14 340 21 549 21 611 71 71 203 203 448 448 802 804 1 335 1 336 2 098 2 103 Distributed Evolutionary k-way Node Separators graph thermomech_TC thermomech_TC thermomech_TC thermomech_TC thermomech_TC thermomech_TC uk uk uk uk uk uk whitaker3 whitaker3 whitaker3 whitaker3 whitaker3 whitaker3 wing wing wing wing wing wing wing_nodal wing_nodal wing_nodal wing_nodal wing_nodal wing_nodal k AdvEvo AdvReps min avg min avg 2 128 128 128 128 4 390 390 389 389 8 837 839 838 838 16 1 439 1 440 1 447 1 450 32 2 316 2 323 2 345 2 349 64 3 620 3 627 3 672 3 680 2 18 18 18 18 4 37 37 37 37 8 73 73 73 73 16 133 133 134 134 32 223 224 225 226 64 360 362 364 366 2 63 63 63 63 4 186 186 187 187 8 320 320 321 321 16 526 528 531 531 32 803 803 811 811 64 1 183 1 185 1 198 1 199 2 626 626 628 628 4 1 288 1 290 1 296 1 297 8 1 943 1 949 1 977 1 980 16 2 963 2 995 3 085 3 095 32 4 300 4 315 4 492 4 513 64 5 736 5 778 6 267 6 287 2 410 410 410 410 4 811 814 836 837 8 1 177 1 184 1 211 1 216 16 1 793 1 800 1 841 1 850 32 2 494 2 500 2 602 2 625 64 3 243 3 252 3 460 3 467 Table 7: Detailed per instance SimpleEvo min avg 129 129 394 394 843 844 1 445 1 447 2 340 2 347 3 636 3 645 18 18 38 38 77 77 136 136 233 236 387 388 63 63 189 189 321 321 531 532 812 813 1 213 1 216 700 702 1 432 1 433 2 157 2 170 3 378 3 388 4 906 4 917 6 622 6 644 415 415 858 859 1 286 1 287 1 965 1 974 2 791 2 800 3 683 3 685 results. SimpleReps min avg 129 129 394 394 848 848 1 453 1 456 2 345 2 353 3 659 3 663 18 18 38 38 76 76 137 138 240 241 402 403 63 63 189 189 322 322 535 536 821 822 1 233 1 233 704 704 1 453 1 456 2 191 2 191 3 398 3 405 4 911 4 921 6 673 6 677 415 415 863 864 1 294 1 294 1 985 1 987 2 806 2 807 3 696 3 702
9cs.NE
arXiv:1602.09100v2 [stat.ME] 3 Jul 2017 Bayesian Variable Selection for Skewed Heteroscedastic Response Libo Wang1 , Yuanyuan Tang1 , Debajyoti Sinha1 , Debdeep Pati1 , and Stuart Lipsitz2 1 Department of Statistics, Florida State University, Tallahassee, FL 32306 2 Brigham and Women’s Hospital Abstract In this article, we propose new Bayesian methods with proper theoretical justification for selecting and estimating a sparse regression coefficient vector for skewed heteroscedastic response. Our novel Bayesian procedures effectively estimate the median and other quantile functions, accommodate non-local prior for regression effects without compromising ease of implementation via sampling based tools. First time for skewed and heteroscedastic response, this Bayesian method asymptotically selects the true set of predictors even when the number of covariates increases in the same order of the sample size. We also extend our method to deal with some observations with very large errors. Via simulation studies and a re-analysis of a medical cost study with large number of potential predictors, we illustrate the ease of implementation and other practical advantages of our approach compared to existing methods for such studies. Keywords: Bayesian consistency; median regression; sparsity 1 1 Introduction Large number of possible predictors and highly skewed heteroscedastic response are often major challenges for many biomedical and econometric applications. Selection of an optimal set of covariates and subsequent estimation of the regression function are important steps for scientific conclusions and policy decisions based on such studies. For example, previous analyses of Medical Expenditure Panel Study (Natarajan et al., 2008; Cohen, 2003) testify to the highly skewed and heteroscedastic nature of the main response of interest, total health care expenditure in a year. Also, it is common in such studies to have a small proportion of patients with either very high or very low medical costs. Popular classical sparse-regression methods such as Lasso (Least absolute shrinkage operator) by Tibshirani (1996) and Efron et al. (2004), and later related methods of Fan and Li (2001), Zou and Hastie (2005), Zou (2006) and MCP (Zhang, 2010) assume Gaussian (or, at least symmetric) response density with common variance. Limited recent literature on consistent variable selection for nonGaussian response includes Zhao and Yu (2006) under common variance assumption, Bach (2008) under weak conditions on covariate structures, and Chen et al. (2014) under skew-t errors. However, none of these methods deal with estimation of quantile function for heteroscedastic response frequently encountered in complex biomedical studies. Many authors including Koenker (2005) argue effectively against focusing on mean regression for skewed heteroscedastic response. Our simulation studies demonstrate that directly modeling skewness and heteroscedasticity, particularly in presence of analogous empirical evidence, leads to better estimators of quantile functions for finite samples compared to existing methods which ignore skewness and heteroscedasticity. Bayesian methods for variable selection have some important practical advantages including incorporation of prior information about sparsity, evaluation of uncertainty about the final model, interval estimate for any coefficient of interest, and evaluation of the relative importance of different coefficients. Asymptotic properties of Bayesian variable selection methods when the number of potential predictors, p, increases as a function of sample size n have received lot of attention recently in the literature. Traditionally, to select the important variables out of (X1 , . . . , Xp ), a two component mixture prior, also referred to as “spike and slab” prior, (Mitchell and Beauchamp, 1988; George and McCulloch, 1993, 1997) is placed on the coefficients β = (β1 , . . . , βp ). These mixture priors include a discrete mass, called a “spike”, at zero to characterize the prior probability of a coefficient being exactly zero (that is, not including the corresponding predictor in the model) and a continuous density called a “slab”, usually centered at null-value zero, representing the prior opinion when the coefficient is non-zero. Following Johnson and Rossell (2010a,b), when the continuous density of the slab part of a spike and slab prior has value 0 at null-value 0, we will call it a non-local mixture prior. Continuous analogues of local mixture priors are being proposed recently by Park and Casella (2008); Carvalho et al. (2010); Bhattacharya et al. (2014) among others. Bondell and Reich (2012) presented the selection consistency of joint Bayesian credible sets. However, current Bayesian variable selection methods usually focus on mean regression function for models with symmetric error density and common variance. Johnson and Rossell (2010b) recently showed a startling selection inconsistency phenomenon for using several commonly used mixture priors, including local mixture (spike and slab prior with non-zero value at null-value 0 of the slab density) priors, when p is larger than 2 √ the order of n. To address this for mean regression with sparse β, they advocated the use of non-local mixture density presenting continuous “slab” density with value 0 at null-value 0 because these priors, called non-local mixture priors here, obtain selection consistency when the dimension p is O(n). Castillo et al. (2014) provided several conditions to ensure selection consistency even when p  n. However, none of these Bayesian methods specifically deal with skewed and heteroscedastic response, contamination of few observations with large errors and variable selection for median and other quantile functionals. In this article, we accommodate skewed and heteroscedastic response distribution using transform-both-sides model (Lin et al., 2012) with sparsity inducing prior for the vector of regression coefficients. Our key observation is that, under such models with generalized Box-Cox transformation (Bickel and Doksum, 1981), even a local mixture prior on aftertransform regression coefficients induces non-local priors on the original regression function for certain choices of the transformation parameter. Similar to moment and inverse moment non-local priors in Johnson and Rossell (2010b), this method enables clear demarcation between the signal and the noise coefficients in the posterior leading to consistent posterior selection even when p = O(n). Addition to that, our use of standard local priors on the transformed regression coefficients facilitates straightforward posterior computation which can be implemented in publicly available softwares. We later extend this model to accommodate cases when the observations are contaminated with a small number of observations with very large (or small) errors. Our approaches are shown to out-perform well-known competitors in simulation studies as well as for analyzing and interpreting a real-life medical cost study. 2 2.1 Bayesian variable selection model Transform-both-Sides Model For the skewed and heteroscedastic response Yi for i = 1, . . . , n, we assume the transformboth-sides model (Lin et al., 2012) gη (Yi ) = gη (xTi β) + ei , (1) where β = (β1 , . . . , βp )0 , xi is the observed p-dimensional covariate vector, gη (y) is the monotone power transformation (Bickel and Doksum, 1981), y|y|η−1 − 1 , gη (y) = η (2) with unknown parameter η ∈ (0, 2). This transformation in (2) is an extension of Box-Cox power family that has a long history and success in dealing with skewed and heteroscedastic response. We assume that under an optimal η, the transformed response gη (y) has a symmetric and unimodal distribution with mean and median gη (xTi β). Thus ei ’s are independent mean 0 errors with common symmetric density function fe and variance σ 2 . The transformation gη (y) in (2) is monotone with derivative gη0 (y) = |y|η−1 ≥ 0. Model (1) can be expressed as a linear model Yi = xTi β + i , (3) 3 where i has a skewed heteroscedastic density with median 0 because P [i > 0] = 1/2, and approximate variance is σ 2 |xTi β|2−2η . Hence, the median of the skewed and heteroscedastic response Yi in (1) is xTi β. For the time being, we consider a Gaussian N(0, σ 2 ) density for fe in (1). Later in §4, we consider other densities to accommodate a heavy tail for fe . For the model of (1), any sparsity inducing prior for β should depend on the transformation parameter η since η has a significant effect on the range and scale of Yi (approximate variance σ 2 |xTi β|2−2η ). Based on this argument, we specify an conditional mixture prior gη (βj ) given η using a “local” φ(·; 0, σβ2 ) density for the “slab” when gη (βj ) is non-zero with discrete prior probability (1 − π0 ), where φ(·; µ, v 2 ) is the Gaussian density with mean µ and variance v 2 . This conditional mixture prior gη (βj ) given η (a local mixture prior according to definition of Johnson and Rossell (2010b)) results in a conditional mixture prior fβ (βj | η) = π0 δ0 (βj ) + (1 − π0 )φ(gη (βj ); 0, σβ2 )|gη0 (βj )| (4) for βj given η independently for j = 1, · · · , p, where π0 ∈ [0, 1] is the probability of βj being zero, δ0 (·) is the discrete measure at 0. When η > 1, gη0 (0) = 0 and hence the resulting unconditional marginal prior for the nonzero βj in (4) turns out to be a non-local mixture prior of Johnson and Rossell (2010b). However, the prior of transformed gη (βj ), a mixture of discrete measure at 0 and φ(·; 0, σβ2 ) density, is a local mixture prior. This is demonstrated via the plots of two resulting unconditional priors of βj when η = 0.5 and η = 1.5 in Figure 1. Our simulation study in §5 shows that the model selection and estimation procedures for our Bayesian method perform substantially better than competing methods when η > 1 (case with non-local unconditional prior for βj ) compared to, say, when η = 0.5 ∈ (0, 1) (case with a local prior for β given η). Thus, heteroscedasticity and the possibly non-local property of π(β | η) come as a bi-product of the transform-both-sides model of (1). This implicit non-local mixture prior modeling of unconditional βj may be the reason for some desirable asymptotic properties of our method even when p = O(n) (discussed in §3). However, our methods’ ability to use a local prior for gη (βj ) significantly reduces computational complexity of the associated Markov chain Monte Carlo (MCMC) algorithms, while facilitating the desirable asymptotic property. Figure 1: Density Plot for Different η When the error density fe in (1) is Gaussian φ(·; µ, σ 2 ) with mean 0 and variance σ 2 , we can specify a hierarchical Bayesian model using the prior π(β | η) in (1) along with known 4 priors for σ 2 and η, σ 2 ∼ IGa(a, b), η/2 ∼ Beta(c1 , d1 ) (5) and a hyperprior for the hyperparameters (π0 , σβ2 ). For computational simplicity, in §3, we establish variable selection consistency of this hierarchical Bayesian model using (1) along with the non-local prior (4) on β and the prior for σ 2 in (5). 3 Consistent variable selection for large p In this section, we investigate selection consistency of the proposed model when the number of covariates p is grows with sample size n, with p ≤ n and the true error density is skewed and heteroscedastic, but follows the same specification as in (1). Unlike the Gaussian likelihood with mixture priors of Johnson and Rossell (2010b), our Bayesian model described in (1) - (5) does not admit a closed form expression of the marginal likelihood. We derive appropriate bounds of the marginal likelihood to obtain the desired Bayesian consistency results. Here we only present a brief outline of our assumptions, developments and practical implications of our theoretical results. Supporting results and details of the proofs are deferred to §7. For brevity of exposition, we consider a design matrix X which are nearly orthogonal in the sense that there exists constant 0 < c1 ≤ c1 such that c1 n ≤ λ1 (X T X) ≤ λp (X T X) ≤ c2 n where λ1 (A) ≤ λ2 (A) ≤ · · · ≤ λp (A) denote ordered eigen values of the matrix A. The assumption ensures identifiability of the regression coefficient β and is commonly assumed in the selection consistency literature, refer for example to Johnson and Rossell (2010b). To estimate the posterior probability assigned to the correct model, we use Laplace approximation (Rossell and Telesca, 2015) to obtain probabilistic bounds of marginal likelihood p(y|γ). Here γ = (γ1 , . . . , γp ) denotes the predicted model P for which γj = I(βj 6= 0) for j = 1, 2, · · · , p are the indicators of active coefficients and pγ = pi=1 γi denotes the number of active variables. Denote by β ∗ the vector of true regression coefficients with γ ∗ defined accordingly. Assuming β̃ as the posterior mode and η is the optimal power parameter, the Laplace approximation of p(y|γ) around β̃ is p(y|γ) ≈ (2π)pγ /2 exp{log L(β̃) + log(π(β̃|γ)))} |H(β̃)|1/2 (6) where the projection of the prior fβ in (4) onto the support of γ, denote by π(β | γ) and is given as Y π(β | γ) = φ(gη (βj ); 0, σβ2 ) gη0 (βj ) . (7) j∈γ We note again that (7) becomes a non-local prior (Johnson and Rossell, 2010b) for η ∈ (1, 2) and is the primary reason for controlling false positives. Based on definitions of key concepts in (6) and (7), we state our main theorem on selection consistency of our Bayesian method even when p is of the order O(n). Theorem 1 When the observations are generated from (1) for a known η ∈ (1, 2) and σ > 0, and model (1) is fitted with priors (4) and (5) for the optimal η and with any π0 ∈ (0, 1), then for p ≤ n, the posterior probability P (γ = γ ∗ | y) → 1 almost surely as n, p → +∞ . 5 The detailed proof of Theorem 1, given in §7, is a non-trivial extension of the proof of Theorem 1 in Johnson and Rossell (2010b) which used non-local priors to obtain variable selection consistency. Unlike them, we use a local prior gη (β) to induce a possible nonlocal prior for β given η in (4). To the best of our knowledge, this is the first result on Bayesian selection consistency when the response distribution is skewed and heteroscedastic and our method of proof opens the theoretical investigation of sparse Bayesian methods for transformable models and heterodasticity. 4 Accommodating extremely large errors Presence of few observations with extremely large errors and their influences on final analysis for various application areas have been emphasized by many authors including Hampel et al. (2011). The assumption of Gaussian error density fe in (1) may not be valid due to the presence of a small number of observations with large errors even after optimal Box-Cox transformation. To address this, we extend the model (1) to a random location-shift model with gη (Yi ) = gη (xTi β) + γi + ei , (8) where γi is nonzero if the ith observation has large error, and zero otherwise. We assume the vector γ = (γ1 , . . . , γn )T to be sparse to ensure only a small probability of the response having a large error after transformation. Similar idea of location-shift model, however, with un-transformed response, is popular in the recent literature on robust linear models (for example, She and Owen (2011) and McCann and Welsch (2007)). To ensure that gη (xTi β) is the mean and median of gη (Yi ), we require the mean and median of γi + ei to be zero, that is, we need a symmetric distribution for γi . For this purpose, we use another spike-andslab mixture prior fγ (γi ) = πγ δ0 + (1 − πγ )φ(γi ; 0, σγ2 ) independently for i = 1, . . . , n, where 0 < πγ < 1. To induce a heavy-tailed error density after transformation, we also consider another extension of the model (1) as −1/2 gη (Yi ) = gη (xTi β) + Ui with Ui ∼ H(· | ν) , ei (9) where H(· | ν) is a positive mixing distribution indexed by a parameter ν and ei ’s are again independent N(0, σ 2 ). This class of heavy-tailed error distributions of (9) is called normal independent (NI) family (Lange and Sinsheimer, 1993). We consider three kinds of heavy tailed distribution, Student’s-t, slash and contaminated normal (CN) respectively, for the marginal error density in (9) using the following specific choices of H(· | ν) (Lachos et al., 2011): χ2ν /ν distribution with possibly non-integer ν > 2, H(u | ν) = uν for u ∈ [0, 1], and discrete H(u | ν) with P [ρ < 1] = 1 − P [ρ = 1] = ν. For student-t error, we use the prior for the degrees of freedom parameter ν to be a truncated exponential on the interval (2, ∞). For ν of the slash distribution marginal error, we use a Gamma(a, b) prior with small positive values of a and b with b  a. For contaminated normal marginal error, we assign Beta(ν0 , ν1 ) and Beta(ρ0 , ρ1 ) priors respectively for ν and ρ. In §5, we compare the performances of Bayesian analyses under these competing models for highly skewed and heteroscedastic responses. 6 5 Simulation Studies Simulation model with no outliers: We use different simulation models to compare our Bayesian methods under model (1) with LASSO (Tibshirani, 1996) and the penalized quantile methods (Koenker, 2005). From each simulation model, we simulated 50 replicated datasets of sample size n = 50. For both simulation studies, the observations are sampled from the model (1) with ei ∼ N(0, σ02 ) with σ02 = 1. The hyperparameters for priors in (5) are set as a = 2, b = 2, c1 = 1 and d1 = 1. The tuning parameters for LASSO and penalized quantile regression are selected via a grid search based on the 5-fold cross-validation. We compare the estimators from different methods based on following criteria: the mean masking proportion M (fraction of undetected true βj 6= 0), the mean swamping proportion S (fraction of wrongly selected βj = 0), and the joint detection rate JD (fraction of simulations with 0 masking). We also compare the goodness-of-fit of estimation methods using an influence measure L/L∗ − 1, where L= n X T 2 (gη0 (yi ) − gη0 (xi β̂)) /(2σ02 ) − n/2 log(2πσ02 ) + (η0 − 1) i=1 n X log(|yi |). (10) i=1 is the log-likelihood under (β̂, η0 , σ0 ) and L∗ is the same log-likelihood under (β0 , η0 , σ0 ), and (β0 , η0 , σ0 ) are the known true parameter values (of the simulation model). The results of our study using simulated data from TBS model (1) with different values of η are displayed in Table 1 with p = 8. Table 1: Results of simulation studies for using different methods of analysis: Simulation model of (1) with η0 = 0·5, p = 8, β0 = (3, 1·5, 0, 0, 2, 0, 0, 0). Method used TBS-SG Penalized Quantile LASSO TBSt-SG TBSS-SG TBSCN-SG L/L∗ − 1 -0·02 0·04 0·04 -0·01 -0·02 -0·02 # of non-zeros 3·16 5·84 4·98 3·16 3·16 3·14 M(%) 0 0 0 0 0 0 S(%) 3·2 56·8 3·96 3·2 3·2 2·8 JD(%) 100 100 100 100 100 100 Simulation model of (1) with η0 = 1·8, p = 8, β0 = (3, 1·5, 0, 0, 2, 0, 0, 0). Method used TBS-SG Penalized Quantile LASSO TBSt-SG TBSS-SG TBSCN-SG L/L∗ − 1 -0·06 0·04 0·66 -0·05 -0·06 -0·06 # of non-zeros 3·02 5·82 4·56 3 3 3 M(%) 0 0 0 0 0 0 S(%) 0·4 56·4 3·12 0 0 0 JD(%) 100 100 100 100 100 100 M : masking proportion (fraction of undetected true βj 6= 0); S: swamping proportion S (fraction of wrongly selected βj with true value 0); JD: joint detection rate. In Table 1, we compare our Bayesian TBS model (1) with prior (4) for β (called TBSSG in short) to frequentist methods of penalized quantile and LASSO. From the results in Table 1, it is evident that our TBS-SG method provides better results than competing 7 frequentist methods in terms of average number of non-zeros and swamping error rate. We also compare TBS-SG method with other Bayesian TBS models with heavy tailed normal independence (NI) error in (1). These competing NI models in (9) include TBSt-SG model (in short) with t distribution for H(· | ν), TBSS-SG model (in short) with slash distribution for H(· | ν) and TBSCN-SG model (in short) with contaminated normal distribution for H(· | ν). All our Bayesian methods have “SG” in their end of acronym to indicate the spike Gaussian prior of (4) for β. TBS models accommodating heavy tailed response perform the best in competing models with ideal masking, swamping and joint outlier detection rates. Both our methods and frequentist methods provide comparable performances based on average L/L∗ − 1 values, although the L/L∗ − 1 values from penalized quantile estimates using different datasets are highly variable. All methods perform desirable with respect to masking and joint detection. Also, we found that our Bayesian methods provide better results when true η value is η0 = 1.8, compared to η0 = 0.5. To compare the performances for different η, we set p = 20 and the number of non-zero coefficient to be 12. Denote by (x)k the vector formed by appending k copies of x. Consider case i) β0 = {(2)12 , (0)8 }, case ii) β0 = {(−10)6 , (4)6 , (0)8 }, case iii) β0 = {(−10)10 , (4)2 , (0)8 }, case iv) β0 = {(−10)2 , (−4)2 , (−2)2 , (2)2 , (4)2 , (10)2 , (0)8 }, case v) β0 = {(−10)6 , (2)6 , (0)8 }, case vi) β0 = {(−10)2 , (−8)2 , (−6)2 , (−4)2 , (−2)2 , (2)2 , (0)8 }. We use only TBSCN-SG model for analysis because these three TBS models accommodating heavy tailed response have similar performance. From the results in Table 2, we can clearly see that for all the cases, all the four methods perform better when η0 = 1.8 compared to when η0 = 0·5, with respect to average number of non-zeros, masking, swamping and joint detection rate. This can be explained by the fact that when η0 = 1·8, we expect the posterior draws of η to be close to 1·8 which corresponds to a non-local prior for β (see Figure 1). When the range of signals is large and when there are many groups of small coefficients (see case (iv) and case (vi)), all of the methods do not perform well. Considering only variable selection results (average number of non-zeros), our TBS model clearly out performs penalized quantile method and LASSO. Studies using simulation model with outliers and heavy-tailed distribution: Our simulation models are similar to previous simulation model of (1) except that a few of the observations are now have large errors even after transformation. Although the Bayesian TBS methods with NI error in (9) do not provide the identification and estimation of these observations, we wonder whether they ensure robust variable selection and estimation of β, particularly in comparison to the Bayesian method using random location-shift model of (8). For the sake of brevity of the presentation, we omit the tables for results of simulation studies using data simulated from models (8) and (9), and only summarize the results here. When we use the simulation model (8) with η0 = 0·5, p = 8, γ(1:2) = 8, γ3 = −8, γ(4:50) = 0, and β0 = (3, 1·5, 0, 0, 2, 0, 0, 0), our Bayesian method with model (8) obtains 3·32 non-zero γi ’s on average. The masking (M), swamping (S) and joint detection (JD) rates are 1·33%, 0·77% and 98%. Also, our method provides 3·22 non-zero estimated βj on average with the masking, swamping and joint detection rates of 0·67%, 4·8% and 98% respectively. For Simulation 4, we choose η0 = 1·8, p = 8, γ(1:2) = 8, γ3 = −8, γ(4:50) = 0 and β0 = (3, 1·5, 0, 0, 2, 0, 0, 0). For our Bayesian method with model (8), we have 3·28 nonzero γi ’s on average with the masking, swamping and joint detection rates of 0%, 0·6% and 8 Table 2: Results of simulation studies for using different methods of analysis when the true model is (1) with p = 20: Case i) Case ii) Case iii) Case iv) Case v) Case vi) Measurement L/L∗ − 1 # of non-zeros M (%) S(%) JD(%) L/L∗ − 1 # of non-zeros M (%) S(%) JD(%) L/L∗ − 1 # of non-zeros M (%) S(%) JD(%) L/L∗ − 1 # of non-zeros M (%) S(%) JD(%) L/L∗ − 1 # of non-zeros M (%) S(%) JD(%) L/L∗ − 1 # of non-zeros M (%) S(%) JD(%) TBS-SG η0 =0·5 -0·05 13·6 0 20 100 -0·03 13·26 0·67 16·75 94 -0·03 12·94 0·33 12·25 96 -0·01 12·58 6·17 16·5 46 0·01 11·32 11·17 8·25 24 -0·01 12·1 6·67 11·25 44 η0 =1·8 2·72 12·02 0 0·25 100 0·03 12 0 0 100 -0·06 12 0 0 100 0·09 12 0 0 100 0·04 12 0 0 100 0·10 12 0 0 100 Penalized Quantile η0 =0·5 η0 =1·8 0·02 0·7 16·36 15·58 0·5 0 55·25 44·75 94 100 0·05 -0·24 17·12 15·02 0·67 0 65 37·75 94 100 0·03 -0·15 16·94 14·52 0·33 0 62·25 31·5 96 100 0·05 -0·22 16·42 15·32 3·67 0 60·75 41·5 64 100 0·05 -0·21 16·12 14·96 5 0 59 37 62 100 0·06 -0·27 15·62 14·96 4·83 0 52·5 37 62 100 LASSO η0 =0·5 0·07 14·02 0 25·75 96 0·1 14·96 0 37·5 96 0·11 14·7 0·83 35 90 0·09 14·2 5·67 36 54 0·1 13·56 7·17 30·25 34 0·12 13·52 8·33 31·5 36 η0 =1·8 -82·81 12·24 0 3 100 -1282 12·14 0 1·75 100 -2736 12·24 0 3 100 -689·6 12·08 0·1 2 92 -1072 12·04 0·83 1·75 90 -763·3 12·14 1·33 3·75 84 TBSCN-SG η0 =0·5 η0 =1·8 -0·04 2·74 13·74 12·02 0 0 21·75 0·25 100 100 -0·02 0·09 13·24 12 8·33 0 16·75 0 92 100 -0·02 0·04 12·92 12 0·5 0 12·25 0 94 100 -0·01 0·13 12·18 12 7·67 0 13·75 0 34 100 0·01 0·09 11·16 12 12 0 7·5 0 14 100 0·01 0·13 11·76 12 8·33 0 9·5 0 36 100 M : masking proportion; S: swamping proportion S; JD: joint detection rate. 9 100%. Also, our method provides 3·22 non-zero estimated βj on average with the masking, swamping and joint detection rates of 0%, 0% and 100% respectively. When we simulate data from model (9), the Bayesian method leads to results similar to the results obtained for using simulation model (8). However, only the Bayesian method using (8) provides the identification of the observations with errors of large magnitude. In practice, identification of such observations will facilitate further investigations regarding their measurement accuracy, influence on inference and other exploratory diagnostics. All of our Bayesian models provide better results than the penalized quantile regression and LASSO with respect to average number of non-zeros, masking, swamping and joint detection. 6 Analysis of medical expenditure study Our motivating study is the Medical Expenditure Panel Survey (Cohen, 2003; Natarajan et al., 2008), called the MEPS study in short, where the response variable is each patient’s ‘total health care expenditures in the year 2002’. Previous analyses of of this study (Natarajan et al., 2008) suggest that the variance of the response is a function of the mean (heteroscedasticity). Often in practice, medical cost data are typically highly skewed to the right, because a small percentage of patients may accumulate extremely high costs compared to other patients, and the variance of total cost tends to increase as the mean increases. In this article, we focus only on one large cluster because every cluster of MEPS study has different sampling design. After removing only a few patients with missing observations, we have 173 patients and 24 potential predictors including age, gender, race, disease history, etc. The minimum cost is 0 and the maximum is $79660, with a mean $4584 and median $1342. For the convenience of computation, we standardize the response (cost) and five potential predictors of the patient: age in 2002, highest education degree attained, perceived health status, body mass index (BMI), and ability to overcome illness (OVERCOME). Rest of the potential predictors are binary variables with values 0 and 1. We analyze this study using our proposed Bayesian models and compare the results with the penalized quantile regression method of Koenker (2005). For Bayesian methods, we use our transform-bothsides model (1), the model of (8) with sparse large errors (TBSO-SG in short) and the model of (9) with contaminated normal marginal error. For each method, we compute an observed residual yi0 − xTi β̂, where yi0 is the observed un-transformed response and xTi β̂ is the estimated median. The Q-Q plots for the residuals are in Figure 2. From Q-Q plots in Figure 2, it is obvious that the normality assumption about untransformed response is untenable. We now compare the goodness-of-fit of the three Bayesian methods to evaluate their abilities from handling skewness and heteroscedasticity. For this purpose, we use the residual gη̂ (yi0 ) − gη̂ (xTi β̂) for the Bayesian TBS-SG model of (1) and the TBSCN-SG model of (9), and the residual gη̂ (yi0 ) − gη̂ (xTi β̂) − γ̂i for Bayesian TBSO-SG model of (8), and then display their Q-Q plots in Figure 3. It is evident from the Q-Q plots that TBSO-SG model of (8) has the best justification to use it for Bayesian analysis, and TBSCN-SG model of (9) also performs well except may be for some observations in both tails. Using our Bayesian model of (8), we find large posterior evidence of effects of OVERCOME variable with posterior mean=−0·17 and 95% credible interval (−0·21, −0·12), stroke 10 Figure 2: Q-Q plots of observed residuals obtained from 4 methods 11 Figure 3: Q-Q plots for residuals of transformed responses obtained from 3 Bayesian models 12 with posterior mean=0·92 and 95% credible interval (0·66, 1·23), and medication with posterior mean=−0·35 and 95% credible interval (−0·41, −0·24). Model(9) identifies these same predictors of model (8) with slightly different interval estimates. Model (1) also identifies three predictors with large posterior evidence of effects: perceived health status, stroke and the indicator of major ethnic group. Stroke is the only variable with large posterior evidence of effects in all three models. Even though penalized quantile regression based analysis selects a larger number of predictors compared to the number of predictors selected by our models, the only statistically significant variable from quantile regression analysis is age (estimate of 0·08 with standard error 0·03). This may be explained by the larger estimated standard errors of the estimates from quantile regression compared to the posterior standard deviations of the corresponding parameters obtained via Bayesian analysis. In order to better understand the prediction performance on observed data, we present a scatter plot with overlaid quantile lines for each Bayesian method in Figure 4. For each method, we display scaled xTi β̂ and scaled observed response yi0 , along with estimated 25th percentile and 75th percentile curves using gη̂−1 {gη̂ (xTi β) + Zα∗ }, where Zα∗ is estimated αpercentile of fe (·). Figure 4 shows that the method using (8) explains the observed data better than methods using (1) and (9). The observations with large errors identified by analysis using (8) are marked by asterisk signs in the second plot. We find that all the observations identified by (8) are outside the estimated interquartile ranges. It shows that our transform-both-sides model of (8) is successful in handling data with skewness, heteroscadesticity as well as very large errors in few subjects. Model of (9) is also able to handle skewness and heteroscadesticity but is not able to identify observations with extremely large errors. We also use posterior predictive loss approach (Gelfand and Ghosh, 1998) to evaluate the prediction accuracy underPeach Bayesian method. We compute the prediction errors of our Bayesian methods by ni=1 E[{gη̂ (yi0 ) − gη̂ (xTi β̂)}2 |D] from model (1), and by Pn 2 T i=1 E[{gη̂ (yi0 ) − gη̂ (xi β̂) − γi } |D] for model (8) using MCMC approximation, where D is the observed dataset. The average prediction error from model (8) is 15 · 03, which is considerably better than model (1) with average prediction error 174 · 45. 7 Discussion In this article, we propose Bayesian variable selection methods for skewed and heteroscedastic response. The methods are highly suitable for modeling, computation, analysis and interpretation of real-life health care cost studies, where we aim to determine and estimate effects of a sparse set of explanatory variables for health care expenditures out of a large set of potential explanatory variables. Simulation results indicate a better performance of our Bayesian methods compared to existing frequentist quantile regression tools. Also, our Bayesian approaches provide flexible and robust estimations to incorporate a wide variety of practical situations. The advantages of our Bayesian methods include their practical and easy implementation using standard statistical software. In the appendix, we prove the consistency of variable selection even when the number of potential predictors p is comparable to, however, smaller than n. The proofs are only provided for a special case of the covariate matrix and when the transform parameter η is known. Proof for a more general case can be obtained following a similar, but more tedious mathematical arguments. 13 Figure 4: Scatter plots of scaled observed responses and quantile regression functions obtained from 3 Bayesian models 14 References Bach, F. R. (2008), Bolasso: model consistent lasso estimation through the bootstrap, in ‘Proceedings of the 25th International Conference on Machine learning’, ACM, pp. 33–40. Bhattacharya, A., Pati, D., Pillai, N. and Dunson, D. (2014), ‘Dirichlet-laplace priors for optimal shrinkage’, JASA . Bickel, P. J. and Doksum, K. A. (1981), ‘An analysis of transformations revisited’, JASA 76(374), 296–311. Bondell, H. D. and Reich, B. J. (2012), ‘Consistent high-dimensional bayesian variable selection via penalized credible regions’, JASA 107(500), 1610–1624. Carvalho, C., Polson, N. and Scott, J. (2010), ‘The horseshoe estimator for sparse signals’, Biometrika 97(2), 465–480. Castillo, I., Schmidt-Hieber, J. and van der Vaart, A. W. (2014), ‘Bayesian linear regression with sparse priors’, ArXiv e-prints . Chen, L., Pourahmadi, M. and Maadooliat, M. (2014), ‘Regularized multivariate regression models with skew-t error distributions’, Journal of Statistical Planning and Inference 149, 125 – 139. Cohen, S. B. (2003), ‘Design strategies and innovations in the medical expenditure panel survey’, Medical Care 41(7), III. Efron, B., Hastie, T., Johnstone, I. and Tibshirani, R. (2004), ‘Least angle regression’, The Annals of statistics 32(2), 407–499. Fan, J. and Li, R. (2001), ‘Variable selection via nonconcave penalized likelihood and its oracle properties’, JASA 96(456), 1348–1360. Gelfand, A. E. and Ghosh, S. K. (1998), ‘Model choice: A minimum posterior predictive loss approach’, Biometrika 85(1), 1–11. George, E. I. and McCulloch, R. E. (1997), ‘Approaches for Bayesian variable selection’, Statistica Sinica 7(2), 339–373. George, E. and McCulloch, R. (1993), ‘Variable selection via Gibbs sampling’, JASA 88(423), 881–889. Hampel, F. R., Ronchetti, E. M., Rousseeuw, P. J. and Stahel, W. A. (2011), Robust Statistics: the Approach Based on Influence Functions, Vol. 114, Wiley. Hogg, R., McKean, J. and Craig, A. (2013), Introduction to Mathematical Statistics, Pearson. Johnson, V. E. and Rossell, D. (2010a), ‘On the use of non-local prior densities in bayesian hypothesis tests’, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72(2), 143–170. 15 Johnson, V. and Rossell, D. (2010b), ‘On the use of non-local prior densities in Bayesian hypothesis tests’, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72(2), 143–170. Koenker, R. (2005), Quantile Regression, Vol. 38, Cambridge University Press. Lachos, V. H., Bandyopadhyay, D. and Dey, D. K. (2011), ‘Linear and nonlinear mixed-effects models for censored hiv viral loads using normal/independent distributions’, Biometrics 67(4), 1594–1604. Lange, K. and Sinsheimer, J. S. (1993), ‘Normal/independent distributions and their applications in robust regression’, Journal of Computational and Graphical Statistics 2(2), 175– 198. Lin, J., Sinha, D., Lipsitz, S. and Polpo, A. (2012), ‘Semiparametric bayesian survival analysis using models with log-linear median’, Biometrics 68(4), 1136–1145. McCann, L. and Welsch, R. E. (2007), ‘Robust variable selection using least angle regression and elemental set sampling’, Computational Statistics & Data Analysis 52(1), 249–257. Mitchell, T. J. and Beauchamp, J. J. (1988), ‘Bayesian variable selection in linear regression’, JASA 83(404), 1023–1032. Natarajan, S., Lipsitz, S. R., Fitzmaurice, G., Moore, C. G. and Gonin, R. (2008), ‘Variance estimation in complex survey sampling for generalized linear models’, Journal of the Royal Statistical Society: Series C (Applied Statistics) 57(1), 75–87. Park, T. and Casella, G. (2008), ‘The Bayesian lasso’, JASA 103(482), 681–686. Rossell, D. and Telesca, D. (2015), ‘Non-local priors for high-dimensional estimation’, Journal of the American Statistical Association 0(just-accepted), 1–33. She, Y. and Owen, A. B. (2011), ‘Outlier detection using nonconvex penalized regression’, JASA 106(494), 626–639. Tibshirani, R. (1996), ‘Regression shrinkage and selection via the lasso’, Journal of the Royal Statistical Society. Series B (Methodological) pp. 267–288. Walker, A. M. (1969), ‘On the asymptotic behaviour of posterior distributions’, Journal of the Royal Statistical Society. Series B (Methodological) 31(1), 80–88. Zhang, C.-H. (2010), ‘Nearly unbiased variable selection under minimax concave penalty’, The Annals of Statistics pp. 894–942. Zhao, P. and Yu, B. (2006), ‘On model selection consistency of lasso’, J. Mach. Learn. Res. 7, 2541–2563. Zou, H. (2006), ‘The adaptive lasso and its oracle properties’, JASA 101(476), 1418–1429. Zou, H. and Hastie, T. (2005), ‘Regularization and variable selection via the elastic net’, Journal of the Royal Statistical Society, Series B 67, 301–320. 16 Proof of Theorem 1 For γ ∈ {0, 1}p and x ∈ Rp , define xγ ∈ Rpγ to be the vector (xj : γj 6= 0). The log-likelihood corresponding to (1) has the expression `(β) = n X i=1  n 1 log gη0 (yi ) − log(2π) − n log(σ) − 2 kgη (y) − gη (Xβ)k2 , 2 2σ (11) T  T where gη (y) = gη (y1 ), · · · , gη (yn ) , gη (Xβ) = gη (xT1 β), · · · , gη (xTn β) . The gradient of (11) is given by  1 ∇`(β) = 2 X T D̄η gη (y) − gη (Xβ) , (12) σ η−1 and D̄η = diag(d¯η ). β 7→ ∇`(β) where d¯η = (gη0 (xT1 β), · · · , gη0 (xTn β)) with gη0 (xTi β) = xTi β is continuous. Since the number of true signals βj∗ is finite, we assume βj∗ ∈ [ML , MU ]. Hence, η−1 as long as β is in a neighborhood of β ∗ , ∇`(β) is bounded since xTi β in (12) is bounded when η ∈ (1, 2). The Hessian of (11) is defined as H(β) = 1 T T ¯ T M (y, X)X, X − D̄ D̄ + D̄ η β η η σ2 (13) where d¯η is defined as the element-wise second derivative of gη (xTi β) on β with gη00 (xTi β) = η−2 ¯ = diag(d¯ ). Meanwhile, m (y, X) = g (y )−g (xT β), · · · , g (y )− and D̄ xTi β sgn(xTi β)(η−1) η n η η η η 1 η 1  T gη (xn β) and Mη (y, X) = diag(mη (y, X)). Using Laplace approximation, the Bayes factor can be approximated as pγ −pγ ∗ |H(βγ∗∗ |γ ∗ )|1/2 π(β̃γ |γ) p(y|β, γ) {`(β̃γ )−`(βγ∗∗ )} 2 = (2π) × e × × . (14) p(y|β ∗ , γ ∗ ) π(βγ∗∗ |γ ∗ ) |H(β̃γ |γ)|1/2 n The first term in the r.h.s of (14) is Op (1) with p ≤ n. For the second term, we denote by λ(y) = `(β̃) − `(β ∗ ) the likelihood ratio statistic. As in Rossell and Telesca (2015, Proposition 3), it is straightforward to verify that our sampling model (1) satisfies Walker’s conditions (A1)-(A5) and (B1)-(B4) (Walker, 1969). Hence, our MLE β̃i is consistent and the Hessian matrix H(β̃γ |γ) in (14) converges in probability. We consider two cases below. ∗ P → When γ ∗ 6⊂ γ, i.e., γ misses some true active coefficients, the second term e(logL(β̃γ )−logL(βγ ∗ )) − ∗ ∗ e−nKL(p(y|β ,γ ),p(y|β,γ)) where KL(p(y|β ∗ , γ ∗ ), p(y|β, γ)) is the Kullback-Leibler divergence between optimal p(y|β ∗ , γ ∗ ) and p(y|β, γ) under γ. Here the minimum KL divergence KL(p(y|β ∗ , γ ∗ ), p(y|β, γ)) is strictly positive since, n Z X ∗ ∗ [log(p(yi |β ∗ , γ ∗ )) − log(p(yi |β, γ))]p(yi |β ∗ , γ ∗ )dyi KL(p(y|β , γ ), p(y|β, γ)) = i=1 n 2  1 X T T ∗ 2 = E gη (yi ) − gη (xi β) − E gη (yi ) − gη (xi β ) 2σ 2 i=1 = n 2 1 X gη (xTi β ∗ ) − gη (xTi β) > 0 2 2σ i=1 17 (15) when β 6= β ∗ satisfies the eigenvalue conditions in §3 that indicates no linear dependency among covariates xi . Therefore the second term is Op (e−n ) when γ ∗ 6⊂ γ. When γ ∗ ⊂ γ, we denote the likelihood-ratio statistic by Λ(y) = logL(β̃γ ) − logL(βγ∗∗ ). Under appropriate regularity conditions (Hogg et al., 2013), our likelihood ratio statistic Λ(y) is asymptotically chi-square distributed. The regularity conditions relevant to the argument are listed as (R0)-(R9) in Hogg et al. (2013) where (R0)-(R2) and (R6)-(R8) can be obtained trivially. Conditions (R3) and (R4) are related to Fisher information and are satisfied by Hessian matrix (13). Conditions (R5) and (R9) essentially guarantee that the remainder of a second order Taylor expansion around β is bounded in probability. To that end, note that ∂3 `(β) ∂βj ∂βk ∂βl n h  T η−3 i  T 2η−3 η−1X T T + (η − 2) gη (yi ) − gη (xi β) |xi β| = xij xik xil − 2 + sgn(xi β) |xi β| σ 2 i=1 n h i η−1X T 2η−3 T T η−3 ≤ 3|x β| + | g (y ) − g (x β) | |x β| := Mjkl (y; X) (16) x x x η i η ij ik il i i i σ 2 i=1 where E[Mjkl (y; x)] < ∞ for all j, k, l ∈ 1, · · · , p. Therefore our model (1) satisfies all regularity conditions implying Λ(y) ∼ χ2pγ −pγ ∗ and hence Op (1) as required. When γ has moderate size with pγ ≤ n, we will show the first term in (14) is dominated by the second term later. Next consider the second term π(β̃|γ)/π(β ∗ |γ ∗ ) under a non-local prior with η ∈ (1, 2) is known. Qpγ 2 2 η−1 √ 1 i=1 2πσβ exp(−β̃γi /2σβ )|β̃γi | π(β̃|γ) = Qpγ ∗ 1 ∗2 2 ∗ η−1 √ π(β ∗ |γ ∗ ) j=1 2πσβ exp(−βγj∗ /2σβ )|βγj∗ | Q X X  |β̃γi |η−1 1 2 ∗2 2 pγ −pγ ∗ = (√ β̃γi − βγj∗ )/2σβ Q ∗ η−1 (17) ) exp − ( |βγj∗ | 2πσβ First if γ ∗ ⊂ γ, given that β̃γi = Op (n−1/2 ) and η − 1 > 0, the second term is ensentially Op (n−(η−1)(pγ −pγ ∗ )/2 ). When γ ∗ 6⊂ γ, denote s∗ = γ ∩ γ ∗ , the second term is Op (n−(η−1)(pγ −ps∗ )/2 ) and upper bounded by Op (n−(η−1)/2 ). To conclude the proof, we need to deal with the the third term in (14). The Hessian matrix H(β̃) is given by (13) with each element Hij = XiT Xj Op (1). Since β˜γ converge in p probability to βγ ∗ , we have n−1 H(β̃|γ) → − H(β̃|γ). Therefore by continous mapping theorem, the third term in (14) is approximated as |H(β ∗ |γ ∗ )|1/2 1/2 H(β̃|γ)  npγ ∗ /2 |n−1 H(β0 |γ ∗ )| = Op (n(pγ ∗ −pγ )/2 ). npγ /2 n−1 H(β̃|γ) (18) To conclude, the Bayes factor (14) is Op (n−η(pγ −pγ ∗ )/2 ) when γ ∗ ⊂ γ, and Op (n(pγ ∗ −pγ )/2 e−n ) 18 when γ ∗ 6⊂ γ. Then the posterior probability p(γ = γ ∗ | y) can be lower-bounded as p(y | γ ∗ )π(γ ∗ ) P p(y | γ ∗ )π(γ ∗ ) + γ6=γ ∗ p(y | γ)π(γ) h X p(y | γ)π(γ) i−1 X p(y | γ)π(γ) + = 1+ p(y | γ ∗ )π(γ ∗ ) γ ∗ 6⊂γ p(y | γ ∗ )π(γ ∗ ) γ ∗ ⊂γ h i−1 X X ≥ 1+ Op (n−η(pγ −pγ ∗ )/2 ) + Op (n(pγ ∗ −pγ )/2 e−n ) p(γ = γ ∗ | y) = γ ∗ ⊂γ γ ∗ 6⊂γ h i−1 X X a.s. −(pγ −pγ ∗ )/2 −n ≥ 1+ Op (n )+ Op (e ) −−→ 1 γ ∗ ⊂γ γ ∗ 6⊂γ which concludes the proof. 19
10math.ST
arXiv:1703.09902v4 [cs.CL] 29 Jan 2018 Survey of the State of the Art in Natural Language Generation: Core tasks, applications and evaluation∗ Albert Gatt Institute of Linguistics and Language Technology (iLLT) University of Malta, Tal-Qroqq, Msida MSD2080, Malta [email protected] Emiel Krahmer Tilburg center for Cognition and Communication (TiCC), Tilburg University, P.O.Box 90153, NL-5000 LE, Tilburg, The Netherlands [email protected] January 30, 2018 Abstract This paper surveys the current state of the art in Natural Language Generation (nlg), defined as the task of generating text or speech from non-linguistic input. A survey of nlg is timely in view of the changes that the field has undergone over the past two decades, especially in relation to new (usually data-driven) methods, as well as new applications of nlg technology. This survey therefore aims to (a) give an up-to-date synthesis of research on the core tasks in nlg and the architectures adopted in which such tasks are organised; (b) highlight a number of recent research topics that have arisen partly as a result of growing synergies between nlg and other areas of artificial intelligence; (c) draw attention to the challenges in nlg evaluation, relating them to similar challenges faced in other areas of nlp, with an emphasis on different evaluation methods and the relationships between them. ∗ This article appears in Journal of Artificial Intelligence Research (JAIR), volume 61, pp. 65-170 1 Contents 1 Introduction 1.1 What is Natural Language Generation? . . . . . . . . . . . . . . 1.2 Why a Survey on Natural Language Generation? . . . . . . . . . 1.3 Goals of this Survey . . . . . . . . . . . . . . . . . . . . . . . . . 2 NLG Tasks 2.1 Content Determination . . . . . . . . 2.2 Text Structuring . . . . . . . . . . . 2.3 Sentence Aggregation . . . . . . . . 2.4 Lexicalisation . . . . . . . . . . . . . 2.5 Referring Expression Generation . . 2.6 Linguistic Realisation . . . . . . . . 2.6.1 Templates . . . . . . . . . . . 2.6.2 Hand-Coded Grammar-Based 2.6.3 Statistical Approaches . . . . 2.7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 NLG Architectures and Approaches 3.1 Modular Approaches . . . . . . . . . . . . . . . . . . 3.2 Planning-Based Approaches . . . . . . . . . . . . . . 3.2.1 Planning through the Grammar . . . . . . . . 3.2.2 Stochastic Planning under Uncertainty using ment Learning . . . . . . . . . . . . . . . . . 3.3 Other Stochastic Approaches to NLG . . . . . . . . 3.3.1 Acquiring Data . . . . . . . . . . . . . . . . . 3.3.2 NLG as a Sequential, Stochastic Process . . . 3.3.3 NLG as Classification and Optimisation . . . 3.3.4 NLG as ‘Parsing’ . . . . . . . . . . . . . . . . 3.3.5 Deep Learning Methods . . . . . . . . . . . . 3.3.6 Encoder-Decoder Architectures . . . . . . . . 3.3.7 Conditioned Language Models . . . . . . . . 3.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reinforce. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 The Vision-Language Interface: Image Captioning and Beyond 4.1 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 The Core Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Image Analysis . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Text Generation or Retrieval . . . . . . . . . . . . . . . . 4.3 How is Language Grounded in Visual Data? . . . . . . . . . . . . 4.4 Vision and Language: Current and Future Directions for NLG . 2 4 6 7 8 9 10 12 13 14 16 19 19 20 20 22 22 23 26 27 28 30 31 33 35 37 38 39 40 41 42 44 44 44 45 47 49 5 Variation: Generating Text with Style, Personality and 5.1 Generating with Style: Textual Variation and Personality 5.2 Generating with Feeling: Affect and Politeness . . . . . . 5.3 Stylistic Control as a Challenge for Neural nlg . . . . . . 5.4 Style and Affect: Concluding Remarks . . . . . . . . . . . Affect . . . . . . . . . . . . . . . . 50 50 53 55 56 6 Generating Creative and Entertaining Text 6.1 Generating Puns and Jokes . . . . . . . . . . . . . . 6.2 Generating Metaphors and Similes . . . . . . . . . . 6.3 Generating Narratives . . . . . . . . . . . . . . . . . 6.4 Generating Creative Language: Concluding Remarks . . . . 57 58 59 61 63 . . . . . . . . . . . . . . . . . . . . . . . . 7 Evaluation 7.1 Intrinsic Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.1 Subjective (Human) Judgements . . . . . . . . . . . . . . 7.1.2 Objective Humanlikeness Measures Using Corpora . . . . 7.1.3 Evaluating Genre Compatibility and Stylistic Effectiveness 7.2 Extrinsic Evaluation Methods . . . . . . . . . . . . . . . . . . . . 7.3 Black Box Versus Glass Box Evaluation . . . . . . . . . . . . . . 7.4 On the Relationship Between Evaluation Methods . . . . . . . . 7.4.1 Metrics Versus Human Judgements . . . . . . . . . . . . . 7.4.2 Using Controlled Experiments . . . . . . . . . . . . . . . 7.5 Evaluation: Concluding Remarks . . . . . . . . . . . . . . . . . . 64 66 67 70 71 72 74 74 74 77 77 8 Discussion and Future Directions 8.1 Why (and How) Should NLG be Used? . . . . 8.2 Does NLG Include Text-to-Text? . . . . . . . . 8.3 Theories and Models in Search of Applications? 8.4 Where do We Go from Here? . . . . . . . . . . 78 79 79 80 81 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Conclusion 83 References 84 3 1 Introduction In his intriguing story The Library of Babel (La biblioteca de Babel , 1941), Jorge Luis Borges describes a library in which every conceivable book can be found. It is probably the wrong question to ask, but readers cannot help wondering: who wrote all these books? Surely, this could not be the work of human authors? The emergence of automatic text generation techniques in recent years provides an interesting twist to this question. Consider Philip M. Parker, who offered more than 100.000 books for sale via Amazon.com, including for example his The 2007-2012 Outlook for Tufted Washable Scatter Rugs, Bathmats, and Sets That Measure 6-Feet by 9-Feet or Smaller in India. Obviously, Parker did not write these 100,000 books by hand. Rather, he used a computer program that collects publicly available information, possibly packaged in human-written texts, and compiles these into a book. Just like the library of Babel contains many books that are unlikely to appeal to a broad audience, Parker’s books need not find many readers. In fact, even if only a small percentage of his books get sold a few times, this would still make him a sizeable profit. Parker’s algorithm can be seen to belong to a research tradition of so-called text-to-text generation methods, applications that take existing texts as their input, and automatically produce a new, coherent text as output. Other example applications that generate new texts from existing (usually humanwritten) text include: • machine translation, from one language to another (e.g., Hutchins & Somers, 1992; Och & Ney, 2003); • fusion and summarization of related sentences or texts to make them more concise (e.g., Clarke & Lapata, 2010); • simplification of complex texts, for example to make them more accessible for low-literacy readers (e.g., Siddharthan, 2014) or for children (Macdonald & Siddharthan, 2016); • automatic spelling, grammar and text correction (e.g., Kukich, 1992; Dale et al., 2012); • automatic generation of peer reviews for scientific papers (Bartoli et al., 2016); • generation of paraphrases of input sentences (e.g., Bannard & CallisonBurch, 2005; Kauchak & Barzilay, 2006); and • automatic generation of questions, for educational and other purposes (e.g., Brown et al., 2005; Rus et al., 2010). Often, however, it is necessary to generate texts which are not grounded in existing ones. Consider, as a case in point, the minor earthquake that took place close to Beverly Hills, California on March 17, 2014. The Los Angeles 4 Times was the first newspaper to report it, within 3 minutes of the event, providing details about the time, location and strength of the quake. This report was automatically generated by a ‘robo-journalist’, which converted the incoming automatically registered earthquake data into a text, by filling gaps in a predefined template text (Oremus, 2014). Robo-journalism and associated practices, such as data journalism, are examples of what is usually referred to as data-to-text generation. They have had a considerable impact in the fields of journalism and media studies (van Dalen, 2012; Clerwall, 2014; Hermida, 2015). The technique used by the Los Angeles Times was not new; many applications have been developed over the years which automatically generate text from non-linguistic data including, but not limited to, systems which produce: • soccer reports (e.g., Theune et al., 2001; Chen & Mooney, 2008); • virtual ‘newspapers’ from sensor data (Molina et al., 2011) and news reports on current affairs (Lepp et al., 2017); • text addressing environmental concerns, such as wildlife tracking (Siddharthan et al., 2013; Ponnamperuma et al., 2013), personalised environmental information (Wanner et al., 2015), and enhancing engagement of citizen scientists via generated feedback (van der Wal et al., 2016); • weather and financial reports (Goldberg et al., 1994; Reiter et al., 2005; Turner et al., 2008; Ramos-Soto et al., 2015; Plachouras et al., 2016); • summaries of patient information in clinical contexts (Hüske-Kraus, 2003; Harris, 2008; Portet et al., 2009; Gatt et al., 2009; Banaee et al., 2013); • interactive information about cultural artefacts, for example in a museum context (e.g., O’Donnell, 2001; Stock et al., 2007); and • text intended to persuade (Carenini & Moore, 2006), or motivate behaviour modification (Reiter et al., 2003). These systems may differ considerably in the quality and variety of the texts they produce, their commercial viability and the sophistication of the underlying methods, but all are examples of data-to-text generation. Many of the systems mentioned above focus on imparting information to the user. On the other hand, as shown by the examples cited above of systems focussed on persuasion or behaviour change, informing need not be the exclusive goal of nlg. Nor is it a trivial goal in itself, since in order to successfully impart information, a system needs to select what to say, distinguishing it from what can be easily inferred (possibly also depending on the target user), before expessing it coherently. Generated texts need not have a large audience. There is no need to automatically generate a report of, say, the Champions League European football final, which is covered by many of the best journalists in the field anyway. However, there are many other games, less important to the general public (but presumably very important to the parties involved). Typically, all sports statistics (who 5 played?, who scored? etc.) for these games are stored, but such statistics are not as a rule perused by sport-reporters. Companies like Narrative Science1 fill this niche by automatically generating sport reports for these games. Automated Insights2 even generates reports based on user-provided ‘fantasy football’ data. In a similar vein, the automatic generation of weather forecasts for offshore oil platforms (Sripada et al., 2003), or from sensors monitoring the performance of gas turbines (Yu et al., 2006), has proven to be a fruitful application of datato-text techniques. Such applications are now the mainstay of companies like Arria-NLG.3 Taking this idea one step further, data-to-text generation paves the way for tailoring texts to specific audiences. For example, data from babies in neonatal care can be converted into text differently, with different levels of technical detail and explanatory language, depending on whether the intended reader is a doctor, a nurse or a parent (Mahamood & Reiter, 2011). One could also easily imagine that different sport reports are generated for fans of the respective teams; the winning goal of one team is likely to be considered a lucky one from the perspective of the losing team, irrespective of its ‘objective’ qualities (van der Lee et al., 2017). A human journalist would not dream of writing separate reports about a sports match (if only for lack of time), but for a computer this is not an issue and this is likely to be appreciated by a reader who receives a more personally appropriate report. 1.1 What is Natural Language Generation? Both text-to-text generation and data-to-text generation are instances of Natural Language Generation (nlg). In the most widely-cited survey of nlg methods to date (Reiter & Dale, 1997, 2000), nlg is characterized as ‘the subfield of artificial intelligence and computational linguistics that is concerned with the construction of computer systems than can produce understandable texts in English or other human languages from some underlying non-linguistic representation of information’ (Reiter & Dale, 1997, p.1). Clearly this definition fits data-to-text generation better than text-to-text generation, and indeed Reiter and Dale (2000) focus exclusively on the former, helpfully and clearly describing the rule-based approaches that dominated the field at the time. It has been pointed out that precisely defining nlg is rather difficult (e.g., Evans et al., 2002): everybody seems to agree on what the output of an nlg system should be (text), but what the exact input is can vary substantially (McDonald, 1993). Examples include flat semantic representations, numerical data and structured knowledge bases. More recently, generation from visual input such as image or video has become an important challenge (e.g., Mitchell et al., 2012; Kulkarni et al., 2013; Thomason et al., 2014, among many others). A further complication is that the boundaries between different approaches are themselves blurred. For example, text summarisation was characterized 1 https://www.narrativescience.com 2 https://automatedinsights.com 3 http://www.arria.com 6 above as a text-to-text application. However, many approaches to text-to-text generation (especially abstractive summarisation systems, which do not extract content wholesale from the input documents) use techniques which are also used in data-to-text, as when opinions are extracted from reviews and expressed in completely new sentences (e.g., Labbé & Portet, 2012). Conversely, a data-totext generation system could conceivably rely on text-to-text generation techniques for learning how to express pieces of data in different or creative ways (McIntyre & Lapata, 2009; Gatt et al., 2009; Kondadadi et al., 2013). Considering other applications of nlg similarly highlights how blurred boundaries can get. For example, the generation of spoken utterances in dialogue systems (e.g., Walker et al., 2007; Rieser & Lemon, 2009; Dethlefs, 2014) is another application of nlg, but typically it is closely related to dialogue management, so that management and realisation policies are sometimes learned in tandem (e.g., Rieser & Lemon, 2011). The position taken in this survey is that what distinguishes data-to-text generation is ultimately its input. Although this varies considerably, it is precisely the fact that such input is not – or isn’t exclusively – linguistic that is the main challenge faced by most of the systems and approaches we will consider. In what follows, unless otherwise specified in context, the terms ‘Natural Language Generation’ and ‘nlg’ will be used to refer to systems that generate text from non-linguistic data. 1.2 Why a Survey on Natural Language Generation? Arguably Reiter and Dale (2000) is still the most complete available survey of nlg. However, the field of nlg has changed drastically in the last 15 years, with the emergence of successful applications generating tailored reports for specific audiences, and with the emergence of text-to-text as well as vision-to-text generation applications, which also tend to rely more on statistical methods than traditional data-to-text. None of these are covered by Reiter and Dale (2000). Also notably absent are discussions of applications that move beyond standard, ‘factual’ text generation, such as those that account for personality and affect, or creative text such as metaphors and narratives. Finally, a striking omission by Reiter and Dale (2000) is the lack of discussion of evaluation methodology. Indeed, evaluation of nlg output has only recently started to receive systematic attention, in part due to a number of shared tasks that were conducted within the nlg community. Since Reiter and Dale (2000) published their book, various other nlg overview texts have also appeared. Bateman and Zock (2005) cover the cognitive, social and computational dimensions of nlg. McDonald (2010) offers a general characterization of nlg as ‘the process by which thought is rendered into language’ (p. 121). Wanner (2010) zooms in on automatic generation of reports, while Di Eugenio and Green (2010) look at specific applications, especially in education and health-care. Various specialized collections of articles have also been published, including that by Krahmer and Theune (2010), which targets data-driven approaches; and by Bangalore and Stent (2014), which focusses on interactive 7 systems. The web offers various unpublished technical reports, such as the survey by Theune (2003) on dialogue systems; the reports by Piwek (2003) and Belz (2003) on affective nlg; and the survey by Gkatzia (2016) on content selection. While useful, these resources do not discuss recent developments or offer a comprehensive review. This indicates that a new state-of-the-art survey is highly timely. 1.3 Goals of this Survey The goal of the current paper is to present a comprehensive overview of nlg developments since 2000, both in order to provide nlg researchers with a synthesis and pointers to relevant research, and to introduce the field to researchers who are less familiar with nlg. Though nlg has been a part of ai and nlp from the early days (see e.g., Winograd, 1972; Appelt, 1985), as a field it has arguably not been fully embraced by these broader communities, and has only recently began to take full advantage of recent advances in data-driven, machine learning and deep learning approaches. Following Reiter and Dale (2000), our main focus, especially in the first part of the survey, will be on data-to-text generation. In any case, doing full justice to recent developments in the various text-to-text generation applications is beyond the scope of a single survey, and many of these are covered in other surveys, including those by Mani (2001) and Nenkova and McKeown (2011) for summarisation; Androutsopoulos and Malakasiotis (2010) on paraphrasing; and Piwek and Boyer (2012) on automatic question generation. However, we will in various places discuss connections between data-to-text and text-to-text generation, both because – as noted above – the boundaries are blurred, but also, and perhaps more importantly, because text-to-text systems have long been couched in the data-driven frameworks that are becoming increasingly popular in data-to-text generation, also giving rise to some hybrid systems that combine rule-bused and statistical techniques (e.g., Kondadadi et al., 2013). Our review will start with an updated overview of the core nlg tasks that were introduced by Reiter and Dale (2000), followed by a discussion of architectures and approaches, where we pay special attention to those not covered in the Reiter and Dale (2000) survey. These two sections constitute the ‘foundational’ part of the survey. Beyond these, we highlight several new developments, including approaches where the input data is visual; and research aimed at generating more varied, engaging or creative and entertaining texts, taking nlg beyond the factual, repetitive texts it is sometimes accused of producing. We believe that these applications are not only interesting in themselves, but may also inform more ‘utility’-driven text generation application. For example, by including insights from narrative generation we may be able to generate more engaging reports and by including insights from metaphor generation we may be able to phrase information in these reports in a more original manner. Finally, we will discuss recent developments in evaluation of natural language generation applications. In short, the goals of this survey are: 8 • To give an up-to-date synthesis of research on the core tasks in nlg, as well as the architectures adopted in the field, especially in view of recent developments exploiting data-driven techniques (Sections 2 and 3); • To highlight a number of relatively recent research issues that have arisen partly as a result of growing synergies between nlg and other areas of artificial intelligence, such as computer vision, stylistics and computational creativity (Sections 4, 5 and 6); • To draw attention to the challenges in nlg evaluation, relating them to similar challenges faced in other areas of nlp, with an emphasis on different evaluation methods and the relationships between them (Section 7). 2 NLG Tasks Traditionally, the nlg problem of converting input data into output text was addressed by splitting it up into a number of subproblems. The following six are frequently found in many nlg systems (Reiter & Dale, 1997, 2000); their role is illustrated in Figure 1: 1. Content determination: Deciding which information to include in the text under construction, 2. Text structuring: Determining in which order information will be presented in the text, 3. Sentence aggregation: Deciding which information to present in individual sentences, 4. Lexicalisation: Finding the right words and phrases to express information, 5. Referring expression generation: Selecting the words and phrases to identify domain objects, 6. Linguistic realisation: Combining all words and phrases into well-formed sentences. These tasks could be thought of in terms of ‘early’ decision processes (which information to convey to the reader?) to ‘late’ ones (which words to use in a particular sentence, and how to put them in their correct order?). Here, we refer to ‘early’ and ‘late’ tasks by way of distinguishing between choices that are more oriented towards the data (such as what to say) and choices that are of an increasingly linguistic nature (e.g., lexicalisation, or realisation). This characterization reflects a long-running distinction in nlg between strategy and tactics (a distinction that goes back at least to Thompson, 1977). This distinction also suggests a temporal order in which the tasks are executed, at least in systems with a modular, pipeline architecture (discussed in Section 9 tsequence bradycardia (17:03:57) bradycardia (17:01:15) (a) Content Determination bradycardia (17:06:03) (b) Text Structuring S VPpast PRO  Event  type   pred  tense   args  PP NPpl V  existential   be  there three successive bradycardias down to 69  past   theme {b1 , b2 , b3 }  min-val 69 be (c) Lexicalisation etc. (d) Realisation Figure 1: Tasks in nlg, illustrated with a simplified example from the neonatal intensive care domain. First the system has to decide what the important events are in the data (a, content determination), in this case, occurrences of low heart rate (bradycardias). Then it has to decide in which order it wants to present data to the reader (b, text structuring) and how to express these in individual sentence plans (c, aggregation, lexicalisation, reference). Finally, the resulting sentences are generated (d, linguistic realisation). 3.1): for example, the system first needs to decide which input data to express in the text, before it can order information for presentation. However, such ordering of modules is nowadays increasingly put into question in the datadriven architectures discussed below (Section 3). In this section, we briefly describe these six tasks, illustrating them with examples, and highlight recent developments in each case. As we shall see, while the ‘early’ tasks are crucial for the development of nlg systems, they are often intimately connected to the specific application. By contrast, ‘late’ tasks are more often investigated independently of an application, and hence have resulted in approaches that can be shared between applications. 2.1 Content Determination As a first step in the generation process, the nlg system needs to decide which information should be included in the text under construction, and which should 10 not. Typically, more information is contained in data than we want to convey through text, or the data is more detailed than we care to express in text. This is clear in Figure 1a, where the input signal – a patient’s heart rate – only contains a few patterns of interest. Selection may also depend on the target audience (e.g. does it consist of experts or novices, for example) and on the overall communicative intention (e.g. should the text inform the reader or convince him to do something). Content determination involves choice. In a soccer report, we may not want to verbalise each pass and foul committed, even though the data may contain this information. In the case of neonatal care, data might be collected continuously from sensors measuring heart rate, blood pressure and other physiological parameters. Data thus needs to be filtered and abstracted into a set of preverbal messages, semantic representations of information which are often expressed in a formal representation language, such as logical or database languages, attribute-value matrices or graph structures. They can express, among other things, which relations hold between which domain entities, for example, expressing that player X scored the first goal for team Y at time T. Though content determination is present in most nlg systems (cf. Mellish et al., 2006), approaches are typically closely related to the domain of application. A notable exception is the work of Guhe (2007), which offers a cognitively plausible, incremental account of content determination based on studies of speakers’ descriptions of dynamic events as they unfold. This work belongs to a strand of research which considers nlg first and foremost as a methodology eminently suitable for understanding human language production. In recent years, researchers have started exploring data-driven techniques for content determination (see e.g., Barzilay & Lee, 2004; Bouayad-Agha et al., 2013; Kutlak et al., 2013; Venigalla & Di Eugenio, 2013). Barzilay and Lee (2004), for example, used Hidden Markov Models to model topic shifts in a particular domain of discourse (say, earthquake reports), where the hidden states represented ‘topics’, modelled as sentences clustered together by similarity. A clustering approach was also used by Duboue and McKeown (2003) in the biography domain, using texts paired with a knowledge base, from which semantic data was clustered and scored according to its occurrence in text. In a similar vein Barzilay and Lapata (2005) use a database of American football records and corresponding text. Their aim was not only to identify bits of information that should be mentioned, but also dependencies between them, since mentioning a certain event (say, a score by a quarterback) may warrant the mention of another (say, another scoring event by a second quarterback). The solution proposed by Barzilay and Lapata was to compute both individual preference scores for events, and a link preference score. More recently, various researchers have addressed the question of how to automatically learn alignments between data and text, also in the broader context of grounded language acquisition, i.e., modelling how we learn language by looking at correspondences between objects and events in the world and the way we refer to them in language (Roy, 2002; Yu & Ballard, 2004; Yu & Siskind, 2013). For example, Liang et al. (2009) extended the work by Barzilay and Lapata 11 (2005) to multiple domains (soccer and weather), relying on weakly supervised techniques; in a similar vein, Koncel-Kedziorski et al. (2014) presented a weakly supervised multilevel approach, to deal with the fact that there is no one-to-one correspondence between, for example, soccer events in data and sentences in associated soccer reports. We shall return to these methods as part of a broader discussion of data-driven approaches below (Section 3.3). 2.2 Text Structuring Having determined what messages to convey, the nlg system needs to decide on their order of presentation to the reader. For example, Figure 1b shows three events of the same type (all bradycardia events, that is, brief drops in heart rate), selected (after abstraction) from the input signal and ordered as a temporal sequence. This stage is often referred to as text (or discourse or document) structuring. In the case of the soccer domain, for example, it seems reasonable to start with general information (where and when the game was played, how many people attended, etc.), before the goals are described, typically in temporal order. In the neonatal care domain, a temporal order can be imposed among specific events, as in Figure 1b, but larger spans of text may reflect ordering based on importance, and grouping of information based on relatedness (e.g. all events related to a patient’s respiration) (Portet et al., 2009). Naturally, alternative discourse relations may exist between separate messages, such as contrasts or elaborations. The result of this stage is a discourse, text or document plan, which is a structured and ordered representation of messages. These examples again imply that the application domain imposes constraints on ordering preferences. Early approaches, such as McKeown (1985), often relied on hand-crafted, domain-dependent structuring rules (which McKeown called schemata). To account for discourse relations between messages, researchers have alternatively relied on Rhetorical Structure Theory (rst; e.g., Mann & Thompson, 1988; Scott & Sieckenius de Souza, 1990; Hovy, 1993), which also typically involved domain-specific rules. For example, Williams and Reiter (2008) used rst relations to identify ordering among messages that would maximise clarity to low-skilled readers. Various researchers have explored the possibilities of using machine learning techniques for document structuring (e.g., Dimitromanolaki & Androutsopoulos, 2003; Althaus et al., 2004), sometimes doing this in tandem with content selection (Duboue & McKeown, 2003). General approaches for information ordering (Barzilay & Lee, 2004; Lapata, 2006) have been proposed, which automatically try to find an optimal ordering of ‘information-bearing items’. These approaches can be applied to text structuring, where the items to be ordered are typically preverbal messages; however, they can also be applied in (multidocument) summarisation, where the items to be ordered are sentences from the input documents which are judged to be summary-worthy enough to include (e.g., Barzilay et al., 2002; Bollegala et al., 2010). 12 2.3 Sentence Aggregation Not every message in the text plan needs to be expressed in a separate sentence; by combining multiple messages into a single sentence, the generated text becomes potentially more fluid and readable (e.g., Dalianis, 1999; Cheng & Mellish, 2000), although there are also situations where it has been argued that aggregation should be avoided (discussed in Section 5.2). For instance, the three events selected in Figure 1b are shown as ‘merged’ into a single pre-linguistic representation, which will be mapped to a single sentence. The process by which related messages are grouped together in sentences is known as sentence aggregation. To take another example, from the soccer domain, one (unaggregated) way to describe the fastest hat-trick in the English Premier League would be: (1) Sadio Mane scored for Southampton after 12 minutes and 22 seconds. (2) Sadio Mane scored for Southampton after 13 minutes and 46 seconds. (3) Sadio Mane scored for Southampton after 15 minutes and 18 seconds. Clearly, this is rather redundant, not very concise or coherent, and generally unpleasant to read. An aggregated alternative, such as the following, would therefore be preferred: (4) Sadio Mane scored three times for Southampton in less than three minutes. In general, aggregation is difficult to define, and has been interpreted in various ways, ranging from redundancy elimination to linguistic structure combination. Reape and Mellish (1999) offer an early survey, distinguishing between aggregation at the semantic level (as illustrated in Figure 1c) and at the level of syntax, illustrated in the transition from (1-3) to (4) above. It is probably fair to say that much early work on aggregation was strongly domain-dependent. This work focussed on domain- and application-specific rules (e.g. ‘if a player scores two consecutive goals, describe these in the same sentence’), that were typically hand-crafted (e.g., Hovy, 1988; Dalianis, 1999; Shaw, 1998). Once again, more recent work is gradually moving towards data-driven approaches, where aggregation rules are acquired from corpus data (e.g., Walker et al., 2001; Cheng & Mellish, 2000). Barzilay and Lapata (2006) present a system that learns how to aggregate on the basis of a parellel corpus of sentences and corresponding database entries, by looking for similarities between entries. As was the case with the content selection method of Barzilay and Lapata (2005), Barzilay and Lapata (2006) view the problem in terms of global optimisation: an initial classification is done over pairs of database entries which determines whether they should be aggregated or not on the basis of their pairwise similarity. Subsequently, a globally optimal set of linked entries is selected based on transitivity constraints (if hei , ej i and hej , ek i are linked, then so should hei , ek i) and global constraints, such as how many sentences should 13 be aggregated in a document. Global optimisation is cast in terms of Integer Linear Programming, a well-known mathematical optimization technique (e.g., Nemhauser & Wolsey, 1988). With syntactic aggregation, it is arguably more feasible to define domainindependent rules to eliminate redundancy (Harbusch & Kempen, 2009; Kempen, 2009). For example, converting (5) into (6) below (5) Sadio Mane scored in the 12th minute and he scored again in the 13th minute. (6) Sadio Mane scored in the 12th minute and again in the 13th. could be achieved by identifying the parallel verb phrases in the two conjoined sentences and eliding the subject and verb in the second. Recent work has explored the possibility of acquiring such rules from corpora automatically. For example, Stent and Molina (2009) describe an approach to the acquisition of sentence-combining rules from a discourse treebank, which are then incorporated into the sparky sentence planner described by Walker et al. (2007). A more general approach to the same problem is discussed by White and Howcroft (2015). Arguably, aggregation on the syntactic level can only account for relatively small reductions, compared to aggregation at the level of messages. Furthermore, syntactic aggregation assumes that the sentence planning process (which includes lexicalisation) is complete. Hence, while traditional approaches to nlg view aggregation as part of sentence planning, which occurs prior to syntactic realisation, the validity of this claim depends on the type of aggregation being performed (see also Theune et al., 2006). 2.4 Lexicalisation Once the content of the sentence has been finalised, possibly also as a result of aggregation at the message level, the system can start converting it into natural language. In our example (Figure 1c), the outcome of aggregation and lexicalisation are shown together: here, the three events have been grouped, and mapped to a representation that includes a verb (be) and its arguments, though the arguments themselves still have to be rendered in a referring expression (see below). This reflects an important decision, namely, which words or phrases to use to express the messages’ building blocks. A complication is that often a single event can be expressed in natural language in many different ways. A scoring event in a soccer match, for example, can be expressed as ‘to score a goal’, ‘to have a goal noted’, ‘to put the ball in the net’, among many others. The complexity of this lexicalisation process critically depends on the number of alternatives that the nlg system can entertain. Often, contextual constraints play an important role here as well: if the aim is to generate texts with a certain amount of variation (e.g., Theune et al., 2001), the system can decide to randomly select a lexicalisation option from a set of alternatives (perhaps even from a set of alternatives not used earlier in the text). However, stylistic 14 constraints come into play: ‘to score a goal’ is an unfortunate way of expressing an own goal, for example. In other applications, lexical choice may even be informed by other considerations, such as the attitude or affective stance towards the event in question (e.g., Fleischman & Hovy, 2002, and the discussion in Section 5). Whether or not nlg systems aim for variation in their output or not depends on the domain. For example, variation in soccer reports is presumably more appreciated by readers than variation in weather reports (on which see Reiter et al., 2005); it may also depend on where in a text the variation occurs. For example, variation in expressing timestamps may be less appreciated than variation in referential forms (Castro Ferreira et al., 2016). One straightforward model for lexicalisation – the one assumed in Figure 1 – is to operate on preverbal messages, converting domain concepts directly into lexical items. This might be feasible in well-defined domains. More often, lexicalisation is harder, for at least two reasons (cf. Bangalore & Rambow, 2000): First, it can involve selection between semantically similar, near-synonymous or taxonomically related words (e.g. animal vs dog; Stede, 2000; Edmonds & Hirst, 2002). Second, it is not always straightforward to model lexicalisation in terms of a crisp concept-to-word mapping. One source of difficulty is vagueness, which arises, for example, with terms denoting properties that are gradable. For example, selecting the adjectives ‘wide’ or ‘tall’ based on the dimensions of an entity requires the system to reason about the width or height of similar objects, perhaps using some standard of comparison (since a ‘tall glass’ is shorter than a ‘short man’; cf. Kennedy & McNally, 2005; van Deemter, 2012). A similar issue has been noted in the context of presenting numerical information, such as timestamps and quantities (Reiter et al., 2005; Power & Williams, 2012). For example, Reiter et al. (2005) discussed time expressions in the context of weather-forecast generation, pointing out that a timestamp 00:00 could be expressed as late evening, midnight, or simply evening (Reiter et al., 2005, p. 143). Not surprisingly, humans (including the professional forecasters that contributed to Reiter et al.’s evaluation), show considerable variation in their lexical choices. It is interesting to note that many issues related to lexicalisation have also been discussed in the psycholinguistic literature on lexical access (Levelt, 1989; Levelt et al., 1999). Among these is the question of how speakers home in on the right word and under what conditions they are liable to make errors, given that the mental lexicon is a densely connected network in which lexical items are connected at multiple levels (semantic, phonological, etc). This has also been a fruitful topic for computational modelling (e.g., Levelt et al., 1999). In contrast to cognitive modelling approaches, however, research in nlg increasingly views lexicalisation as part of surface realisation (discussed below) (a similar observation is made by Mellish & Dale, 1998, p.351). A fundamental contribution in this context is by Elhadad et al. (1997), who describe a unification-based approach, unifying conceptual representations (i.e., preverbal messages) with grammar rules encoding lexical as well as syntactic choices. 15 2.5 Referring Expression Generation Referring Expression Generation (reg) is characterised by Reiter and Dale (1997, p.11) as “the task of selecting words or phrases to identify domain entities”. This characterisation suggests a close similarity to lexicalisation, but Reiter and Dale (2000) point out that the essential difference is that referring expression generation is a “discrimination task, where the system needs to communicate sufficient information to distinguish one domain entity from other domain entities”. reg is among the tasks within the field of automated text generation that has received most attention in recent years (Mellish et al., 2006; Siddharthan et al., 2011). Since it can be separated relatively easily from a specific application domain and studied in its own right, various ‘standalone’ solutions for the reg problem exist. In our running example, the three bradycardia events shown in Figure 1b are later represented as a set of three entities under the theme argument of be, following lexicalisation (Figure 1c). How the system refers to them will depend, among other things, on whether they’ve already been mentioned (in which case, a pronoun or definite description might work) and if so, whether they need to be distinguished from any other similar entities (in which case, they might need to be distinguished by some properties, such as the time when they occurred). The first choice is therefore related to referential form: whether entities are referred to using a pronoun, a proper name or an (in)definite description, for example. This depends partly on the extent to which the entity is ‘in focus’ or ‘salient’ (see e.g., Poesio et al., 2004) and indeed such notions underlie many computational accounts of pronoun generation (e.g., McCoy & Strube, 1999; Callaway & Lester, 2002; Kibble & Power, 2004). Choosing referential forms has recently been the topic of a series of shared tasks on the Generation of Referring Expressions in Context (grec; Belz et al., 2010), using data from Wikipedia articles, which included choices such as reflexive pronouns and proper names. Many systems participating in this challenge framed the problem in terms of classification among these many options. Still, it is probably fair to say that much work on referential form has focussed on when to use pronouns. Forms such as proper names remain understudied, although recently various researchers have highlighted the problems of proper name generation (Siddharthan et al., 2011; van Deemter, 2016; Castro Ferreira et al., 2017). Determining the referential content usually comes into play when the chosen form is a description. Typically, there are multiple entities which have the same referential category or type in a domain (more than one player, for example, or several bradycardias). As a result, other properties of the entity will need to be mentioned if it is to be identified by the reader or hearer. Earlier reg research often worked with simple visual domains, such as Figure 2a or its corresponding tabular representation, taken from the gre3d corpus (Viethen & Dale, 2008). In this example, the reg content selection problem is to find a set of properties for a target (say d1 ) that singles it out from its two distractors (d2 and d3 ). reg content determination algorithms can be thought of as performing a search through the known properties of the referent for the ‘right’ combination 16 Attr Color Shape Size Rel Domain objects d1 d2 d3 blue green blue ball cube ball small large large bef(d2 ) beh(d1 ) nt(d2 ) (b) Table of objects and attributes. beh: ‘behind’; bef: ‘before’; nt: ‘next to’ (a) Visual domain from the gre3d corpus (Viethen & Dale, 2008) Figure 2: Visual domain and corresponding tabular representation that will distinguish it in context. What constitutes the ‘right’ combination depends on the underlying theory. Too much information in the description (as in the small blue ball before the large green cup) might be misleading or even boring; too little (the ball) might hinder identification. Much work on reg has appealed to the Gricean maxim stating that speakers should make sure that their contributions are sufficiently informative for the purposes of the exchange, but not more so (Grice, 1975). How this is interpreted has been the subject of a number of algorithmic interpretations, including: • Conducting an exhaustive search through the space of possible descriptions and choosing the smallest set of properties that will identify the target referent, the strategy incorporated by the Full Brevity procedure (Dale, 1989). In our example domain, this would select size. • Selecting properties incrementally, but choosing the one which rules out most distractors at each step, thereby minimising the possibility of including information that isn’t directly relevant to the identification task. This is the underlying idea of the Greedy Heuristic algorithm (Dale, 1989, 1992), and it has more recently been revived in stochastic utility-based models such as Frank et al. (2009). In our example scene, such an algorithm would once again consider size first. • Selecting properties incrementally, but based on domain-specific preference or cognitive salience. This is the strategy incorporated in the Incremental Algorithm (Dale & Reiter, 1995), which would predict that color should be preferred over size in our example. While these heuristics focus exclusively on the requirement that a referent be unambiguously identified, research on reference in dialogue (e.g., Jordan 17 & Walker, 2005) has shown that under certain conditions, referring expressions may also include ‘redundant’ properties in order to achieve other communicative goals, such as confirmation of a previous utterance by an interlocutor. Similarly, White et al. (2010) present a system which generates user-tailored descriptions in spoken dialogue, arguing that, for example, a frequent flyer would prefer different descriptions of flights than a student who only flies occasionally. These various algorithms compute (possibly different) distinguishing descriptions for target referents (more precisely: they select sets of properties that distinguish the target, but that still need to be expressed in words; see Section 2.6 below). Various strands of more recent work can be distinguished (surveyed in Krahmer & van Deemter, 2012). Some researchers have focussed on extending the expressivity of the ‘classical’ algorithms, to include plurals (the two balls) and relations (the ball in front of a cube) (e.g., Horacek, 1997; Stone, 2000; Gardent, 2002; Kelleher & Kruijff, 2006; Viethen & Dale, 2008, among many others). Other work has cast the problem in probabilistic terms; for example, FitzGerald et al. (2013) frame reg as a problem of estimating a log-linear distribution over a space of logical forms representing expressions for sets of objects. Other work has concentrated on evaluating the performance of different reg algorithms, by collecting controlled human references and comparing these with the references predicted by various algorithms (e.g., Belz, 2008; Gatt & Belz, 2010; Jordan & Walker, 2005, again among many others). In a similar vein, researchers have also started exploring the relevance of reg algorithms as psycholinguistic models of human language production (e.g., van Deemter et al., 2012b). A different line of work has moved away from the separation between content selection and form, performing these tasks jointly. For example, Engonopoulos and Koller (2014) use a synchronous grammar that directly relates surface strings to target referents, using a chart to compute the possible expressions for a given target. This work bears some relationship to planning-based approaches we discuss in Section 3.2 below, which exploit grammatical formalisms as planning operators (e.g. Stone & Webber, 1998; Koller & Stone, 2007), solving realisation and content determination problems in tandem (including reg as a special case). Finally, in earlier work visual information was typically ‘simplified’ into a table (as we did above), but there has been substantial progress on reg in more complex scenarios. For example, the give challenge (Koller et al., 2010), provided impetus for the exploration of situated reference to objects in a virtual environment (see also Stoia & Shockley, 2006; Garoufi & Koller, 2013). More recent work has started exploring the interface between computer vision and reg to produce descriptions of objects in complex, realistic visual scenes, including photographs (e.g., Mitchell et al., 2013; Kazemzadeh et al., 2014; Mao et al., 2016). This forms part of a broader set of developments focussing on the relatonship between vision and language, which we turn to in Section 4. 18 2.6 Linguistic Realisation Finally, when all the relevant words and phrases have been decided upon, these need to be combined to form a well-formed sentence. The simple example in Figure 1d shows the structure underlying the sentence there were three successive bradycardias down to 69 , the linguistic message corresponding to the portion selected from the original signal in Figure 1a. Usually referred to as linguistic realisation, this task involves ordering constituents of a sentence, as well as generating the right morphological forms (including verb conjugations and agreement, in those languages where this is relevant). Often, realisers also need to insert function words (such as auxiliary verbs and prepositions) and punctuation marks. An important complication at this stage is that the output needs to include various linguistic components that may not be present in the input (an instance of the ‘generation gap’ discussed in Section 3.1 below); thus, this generation task can be thought of in terms of projection between non-isomorphic structures (cf. Ballesteros et al., 2015). Many different approaches have been proposed, of which we will discuss 1. human-crafted templates; 2. human-crafted grammar-based systems; 3. statistical approaches. 2.6.1 Templates When application domains are small and variation is expected to be minimal, realisation is a relatively easy task, and outputs can be specified using templates (e.g., Reiter et al., 1995; McRoy et al., 2003), such as the following. (7) $player scored for $team in the $minute minute. This template has three variables, which can be filled with the names of a player, a team, and the minute in which this player scored a goal. It can thus serve to generate sentences like: (8) Ivan Rakitic scored for Barcelona in the 4th minute. An advantage of templates is that they allow for full control over the quality of the output and avoid the generation of ungrammatical structures. Modern variants of the template-based method include syntactic information in the templates, as well as possibly complex rules for filling the gaps (Theune et al., 2001), making it difficult to distinguish templates from more sophisticated methods (van Deemter et al., 2005). The disadvantage of templates is that they are labour-intensive if constructed by hand (though templates have recently been learned automatically from corpus data, see e.g., Angeli et al., 2012; Kondadadi et al., 2013, and the discussion in Section 3.3 below). They also do not scale well to applications which require considerable linguistic variation. 19 2.6.2 Hand-Coded Grammar-Based Systems An alternative to templates is provided by general-purpose, domain-independent realisation systems. Most of these systems are grammar-based, that is, they make some or all of their choices on the basis of a grammar of the language under consideration. This grammar can be manually written, as in many classic off-the-shelf realisers such as fuf/surge (Elhadad & Robin, 1996), mumble (Meteer et al., 1987), kpml (Bateman, 1997), nigel (Mann & Matthiessen, 1983), and RealPro (Lavoie & Rambow, 1997). Hand-coded grammar-based realisers tend to require very detailed input. For example, kpml (Bateman, 1997) is based on Systemic-Functional Grammar (sfg; Halliday & Matthiessen, 2004), and realisation is modelled as a traversal of a network in which choices depend on both grammatical and semantico-pragmatic information. This level of detail makes these systems difficult to use as simple ‘plug-and-play’ or ‘off the shelf’ modules (e.g., Kasper, 1989), something which has motivated the development of simple realisation engines which provide syntax and morphology apis, but leave choice-making up to the developer (Gatt et al., 2009; Vaudry & Lapalme, 2013; Bollmann, 2011; de Oliveira & Sripada, 2014; Mazzei et al., 2016). One difficulty for grammar-based systems is how to make choices among related options, such as the following, where hand-crafted rules with the right sensitivity to context and input are difficult to design: (9) Ivan Rakitic scored for Barcelona in the 4th minute. (10) For Barcelona, Ivan Rakitic scored in minute four. (11) Barcelona player Ivan Rakitic scored after four minutes. 2.6.3 Statistical Approaches Recent approaches have sought to acquire probabilistic grammars from large corpora, cutting down on the amount of manual labour required, while increasing coverage. Essentially, two approaches have been taken to include statistical information in the realisation process. One approach, introduced by the seminal work of Langkilde and Knight (Langkilde-Geary, 2000; Langkilde-Geary & Knight, 2002) on the halogen/nitrogen systems, relies on a two-level approach, in which a small, hand-crafted grammar is used to generate alternative realisations represented as a forest, from which a stochastic re-ranker selects the optimal candidate. Langkilde and Knight rely on corpus-based statistical knowledge in the form of n-grams, whereas others have experimented with more sophisticated statistical models to perform reranking (e.g., Bangalore & Rambow, 2000; Ratnaparkhi, 2000; Cahill et al., 2007). The second approach does not rely on a computationally expensive generate-and-filter approach, but uses statistical information directly at the level of generation decisions. An example of this approach is the pcru system developed by Belz (2008), which generates the most likely derivation of a sentence, given a corpus, using a context-free 20 grammar. In this case, the statistics are exploited to control the generator’s choice-making behaviour as it searches for the optimal solution. In both approaches, the base generator is hand-crafted, while statistical information is used to filter outputs. An obvious alternative would be to also rely on statistical information for the base-generation system. Fully data-driven grammar-based approaches have been developed by acquiring grammatical rules from treebanks. For example, the Openccg framework (Espinosa et al., 2008; White & Rajkumar, 2009, 2012) presents a broad coverage English surface realizer, based on Combinatory Categorial Grammar (ccg; Steedman, 2000), relying on a corpus of ccg representations derived from the Penn Treebank (Hockenmaier & Steedman, 2007) and using statistical language models for reranking. There are several other approaches to realisation that adopt a similar rationale, based on a variety of grammatical formalisms, including Head-Driven Phrase Structure Grammar (hpsg; Nakanishi et al., 2005; Carroll & Oepen, 2005), Lexical-Functional Grammar (lfg; Cahill & Van Genabith, 2006) and Tree Adjoining Grammar (tag; Gardent & Narayan, 2015). In many of these systems, the base generator uses some variant of the chart generation algorithm (Kay, 1996) to iteratively realise parts of an input specification and merge them into one or more final structures, which can then be ranked (see Rajkumar & White, 2014, for further discussion). The existence of stochastic realisers with wide-coverage grammars has motivated a greater focus on subtle choices, such as how to avoid structural ambiguity, or how to handle choices such as explicit complementiser insertion in English (see e.g., Rajkumar & White, 2011). In a somewhat similar vein, the statistical approach to microplanning proposed by Gardent and Perez-Beltrachini (2017) focuses on interactions between surface realization, aggregation, and sentence segmentation in a joint model. Other approaches to realisation also rely on one or more classifiers to improve outputs. For example, Filippova and Strube (2007, 2009) describe an approach to linearisation of constituents using a two-step approach with Maximum Entropy classifiers, first determining which constituent should occupy sentence-initial position, then ordering the constituents in the remainder of the sentence. Bohnet et al. (2010) present a realiser using underspecified dependency structures as input, in a framework based on Support Vector Machines, where classifiers are organised in a cascade. An initial classifier decodes semantic input into the corresponding syntactic features, while two subsequent classifiers first linearise the syntax and then render the correct morphological realisation for the component lexemes. Modelling choices using classifier cascades is not restricted to realisation alone. Indeed, in some cases, it has been adopted as a model for the nlg process as a whole, a topic we will return to in Section 3.3.3. One outcome of this view of nlg is that the nature of the input representation also changes: the more decisions that are made within the statistical generation system, the less linguistic and more abstract the input representation becomes, paving the way for integrated, end-to-end stochastic generation systems, such as Konstas and Lapata (2013), which we also discuss in the next section. 21 2.7 Discussion This section has given an overview of some classic tasks that are found in most nlg systems. One of the common trends that can be identified in each case is the steady move from early, hand-crafted approaches based on rules, to the more recent stochastic approaches that rely on corpus data, with a concomitant move towards more domain-independent approaches. Historically, this was the case already for individual tasks, such as referring expression generation or realisation, which became topics of intensive research in their own right. However, as more and more approaches to all nlg tasks begin to take a statistical turn, there is increasing emphasis on learning techniques; the domain-specific aspect is, as it were, incidental, a property of the training data itself. As we shall see in the next section, this trend has also influenced the way different nlg tasks are organised, that is, the architecture of systems for text generation from data. 3 NLG Architectures and Approaches Having given an overview of the most common sub-tasks that nlg systems incorporate, we now turn to the way such tasks can be organised. Broadly speaking, we can distinguish between three dominant approaches to nlg architectures: 1. Modular architectures: By design, such architectures involve fairly crisp divisions among sub-tasks, though with significant variations among them; 2. Planning perspectives: Viewing text generation as planning links it to a long tradition in ai and affords a more integrated, less modular perspective on the various sub-tasks of nlg; 3. Integrated or global approaches: Now the dominant trend in nlg (as it is in nlp more generally), such approaches cut across task divisions, usually by placing a heavy reliance on statistical learning of correspondences between (non-linguistic) inputs and outputs. The above typology of nlg is based on architectural considerations. An orthogonal question concerns the extent to which a particular approach relies on symbolic or knowledge-based methods, as opposed to stochastic, data-driven methods. It is important to note that none of the three architectural types listed above is inherently committed to one or the other of these. Thus, it is possible for a system to have a modular design but incorporate stochastic methods in several, or even all, sub-tasks. Indeed, our survey of the various tasks in Section 2 included several examples of stochastic approaches. Below, we will also discuss a number of data-driven systems whose design is arguably modular. Similarly, it is possible for a system to take a non-modular perspective, but eschew the use of data-driven models (this is a feature of some planning-based nlg systems discussed in Section 3.2 below, for instance). The fact that many modular nlg systems are not data-driven is largely due to historical reasons since, of the three designs outlined above, the modular one is 22 Text Planner text plan Sentence Planner sentence plan Realiser Figure 3: Classical three-stage NLG architecture, after Reiter and Dale (2000). Darker segments illustrate the three main modules; lighter segments show the outputs. the oldest. As we will show below, however, challenges to the classical modular pipeline architecture – once designated by Reiter (1994) as the consensus at the time – have included blackboard and revision-based architectures that were not stochastic. At the same time, it must be acknowledged that the large-scale adoption of integrated, non-modular approaches has been impacted significantly by the uptake of data-driven techniques within the nlg community and the development of repositories of data to support training and evaluation. In summary, there are at least two orthogonal ways of classifying nlg systems, based on their design or on the methods adopted in their development. Our survey in this section follows the typology outlined above for convenience of exposition. The caveats raised here should, however, be borne in mind by the reader, and will in any case be brought up repeatedly in what follows, as we discuss different approaches under each heading. 3.1 Modular Approaches Existing surveys of nlg, including those by Reiter and Dale (1997, 2000) and Reiter (2010), typically refer to some version of the pipeline architecture displayed in Figure 3 as the ‘consensus’ architecture in the field. Originally introduced by Reiter (1994), the pipeline was a generalisation based on actual practice and was claimed to have the status of a ‘de facto standard’. This, however, has been contested repeatedly, as we shall see. Different modules in the pipeline incorporate different subsets of the tasks described in Section 2. The first module, the Text Planner (or Document Planner, or Macroplanner), combines content selection and text structuring (or document planning). Thus, it is concerned mainly with strategic generation (McDonald, 1993), the choice of ‘what to say’. The resulting text plan, a structured representation of messages, is the input to the Sentence Planner (or microplanner), which typically combines sentence aggregation, lexicalisation and referring expression generation (Reiter & Dale, 2000). If text planning amounts to deciding what to say, sentence planning can be understood as deciding how to say it. All that remains then is to actually say it, i.e., generate the final sentences in a grammatically correct way, by applying syntactic and morphological rules. 23 text This task is performed by the Linguistic Realiser. Together, sentence planning and realisation encompass the set of tasks traditionally referred to as tactical generation. The pipeline architectures shares some characteristics with a widely-used architecture in text summarisation (Mani, 2001; Nenkova & McKeown, 2011), where the process is sub-divided into (a) analysis of source texts and selection of information; (b) transformation of the selected information to enhance fluency; and (c) synthesis of the summary. A second related architecture, which was also noted by Reiter (1994), is that proposed in psycholinguistics for human speech production, where the most influential psycholinguistic model of language production, proposed by Levelt (1989, 1999), makes a similar distinction between deciding what to say and determining how to say it. Levelt’s model allows for a limited degree of self-monitoring through feedback loops, a feature that is absent in Reiter’s nlg pipeline, but continues to play an important role in psycholinguistics (cf. Pickering & Garrod, 2013), though here too there has been increasing emphasis on more integrated models. A hallmark of the architecture in Figure 3 is that it represents clear-cut divisions among tasks that are traditionally considered to belong to the ‘what’ (strategic) and the ‘how’ (tactical). However, this does not imply that this division is universally accepted in practice. In an earlier survey, Mellish et al. (2006) concluded that while several nlg systems incorporate many of the core tasks outlined in Section 2, their organisation varies considerably from system to system. Indeed, some tasks may be split up across modules. For example, the content determination part of referring expression generation might be placed in the sentence planner, but decisions about form (such as whether to use an anaphoric np, and if so, what kind of np to produce) may have to wait until at least some realisation-related decisions have been taken. Based on these observations, Mellish et al. proposed an alternative formalism, the ‘objects-andarrows’ framework, within which different types of information flow between nlg sub-tasks can be accommodated. Rather than offering a specific architecture, this framework was intended as a formalism within which high-level descriptions of different architectures can be specified. However, it retains the principle that the tasks, irrespective of their organisation, are relatively well-defined and distinguished. Another recent development in relation to the pipeline architecture in Figure 3 is a proposal by Reiter (2007) to accommodate systems in which input consists of raw (often numeric) data that requires some preprocessing before it can undergo the kind of selection and planning that the Text Planner is designed to execute. The main characteristic of these systems is that input is unstructured, in contrast to systems which operate over logical forms, or database entries. Examples of application domains where this is the case include weather reporting (e.g., Goldberg et al., 1994; Busemann & Horacek, 1997; Coch, 1998; Turner et al., 2008; Sripada et al., 2003; Ramos-Soto et al., 2015), where the input often takes the form of numerical weather predictions; and generation of summaries from patient data (e.g., Hueske-Kraus, 2003; Harris, 2008; Gatt et al., 2009; 24 Banaee et al., 2013). In such cases, nlg systems often need to perform some form of data abstraction (for example, identifying broad trends in the data), followed by data interpretation. The techniques used to perform these tasks range from extensions of signal processing techniques (e.g., Portet et al., 2009) to the application of reasoning formalisms based on fuzzy set theory (e.g., Ramos-Soto et al., 2015). Reiter’s (2007) proposal accommodates these steps by extending the pipeline ‘backwards’, incorporating stages prior to Text Planning. Notwithstanding its elegance and simplicity, there are challenges associated with a pipeline nlg architecture, of which two are particularly worth highlighting: • The generation gap (Meteer, 1991) refers to mismatches between strategic and tactical components, so that early decisions in the pipeline have unforeseen consequences further downstream. To take an example from Inui et al. (1992), a generation system might determine a particular sentence ordering during the sentence planning stage, but this might turn out to be ambiguous once sentences have actually been realised and orthography has been inserted; • Generating under constraints: Itself perhaps an instance of the generation gap, this problem can occur when the output of a system has to match certain requirements, for example, it cannot exceed a certain length (see Reiter, 2000, for discussion). Formalising this constraint might appear possible at the realisation stage – by stipulating the length constraint in terms of number of words or characters, for instance – but it is much harder at the earlier stages, where the representations are pre-linguistic and their mapping to the final text are potentially unpredictable. These, and related problems, motivated the development of alternative architectures. For instance, some early nlg systems were based on an interactive design, in which a module’s initially incomplete output could be fleshed out based on feedback from a later module (the pauline system is an example of this; Hovy, 1988). An even more flexible stance is taken in blackboard architectures, in which task-specific procedures are not rigidly pre-organised, but perform their tasks reactively as the output, represented in a data structure shared between tasks, evolves (e.g., Nirenburg et al., 1989). Finally, revision-based architectures allow a limited form of feedback between modules under monitoring, with the possibility of altering choices which prove to be unsatisfactory (e.g., Mann & Moore, 1981; Inui et al., 1992). This has the advantage of not requiring ‘early’ modules to be aware of the consequences of their choices for subsequent modules, since something that goes wrong can always be revised (Inui et al., 1992). Revision need not be carried out exclusively to rectify shortcomings. For instance, Robin (1993) used revision in the context of sports summaries; an initial draft was revised to add historical background information that was made relevant by the events reported in the draft, also taking decisions as to where to place them in relation to the main text. The price that all of these 25 alternatives potentially incur is, of course, a reduction in efficiency, as noted by De Smedt et al. (1996). Despite early criticisms of the modular approach, the strategic versus tactical division continues to influence recent data-driven approaches to nlg, including a number of those discussed in Sections 3.3 and 3.3.5 below (e.g. Dušek & Jurčı́ček, 2015, 2016, among others). However, other alternatives to pipelines often end up blurring the boundaries between modules in the nlg system. This is a feature that is more evident in some planning-based and integrated approaches proposed in recent years. It is to these that we now turn. 3.2 Planning-Based Approaches In ai, the planning problem can be described as the process of identifying a sequence of one or more actions to satisfy a particular goal. An initial goal can be decomposed into sub-goals, satisfied by actions each of which has its preconditions and effects. In the classical planning paradigm (strips; Fikes & Nilsson, 1971), actions are represented as tuples of such preconditions and effects. The connection between planning and nlg lies in that text generation can be viewed as the execution of planned behaviour to achieve a communicative goal, where each action leads to a new state, that is, a change in a context that includes both the linguistic interaction or discourse history to date, but also the physical or situated context and the user’s beliefs and actions (see Lemon, 2008; Rieser & Lemon, 2009; Dethlefs, 2014; Garoufi & Koller, 2013; Garoufi, 2014, for some recent perspectives on this topic). This perspective on nlg is therefore related to the view of ‘language as action’ (Clark, 1996), itself rooted in a philosophical tradition inaugurated by the work of Austin (1962) and Searle (1969). Indeed, some of the earliest ai work in this tradition (especially Cohen & Perrault, 1979; Cohen & Levesque, 1985) sought an explicit formulation of preconditions (akin to Searle’s felicity conditions) for speech acts and their consequences. Given that there is in principle no restriction on what types of actions can be incorporated in a plan, it is possible for plan-based approaches to nlg to cut across the boundaries of many of the tasks that are normally encapsulated in the classic pipeline architecture, combining both tactical and strategic elements by viewing the problems of what to say and how to say it as part and parcel of the same set of operations. Indeed, there are important precedents in early work for a unified view of nlg as a hierarchy of goals, the kamp system (Appelt, 1985) being among the best known examples. For instance, to generate referring expressions in kamp, the starting point was reasoning about interlocutors’ beliefs and mutual knowledge, whereupon the system generated sub-goals that percolated all the way down to property choice and realisation, finally producing a referential np whose predicted effect was to alter the hearer’s belief state about the referent (see Heeman & Hirst, 1995, for a similar approach to the generation of referring expressions in dialogue). 26 One problem with these perspectives, however, is that deep reasoning about beliefs, desires and intentions (or bdi, as it is often called following Bratman, 1987) requires highly expressive formalisms and incurs considerable computational expense. One solution is to avoid general-purpose reasoning formalisms and instead adapt a linguistic framework to the planning paradigm for nlg. 3.2.1 Planning through the Grammar The idea of interpreting linguistic formalisms in planning terms is again prefigured in early nlg work. For example, some early systems (e.g. kpml, which we briefly discussed in the context of realisation in Section 2.6; Bateman, 1997) were based on Systemic-Functional Grammar (sfg; Halliday & Matthiessen, 2004), which can be seen as a precursor to contemporary planning-based approaches, since sfg models linguistic constructions as the outcome of a traversal through a decision network that extends backwards to pragmatic intentions. In a similar vein, both Hovy (1991) and Moore and Paris (1993) interpreted the relations of Rhetorical Structure Theory (Mann & Thompson, 1988) as operators for text planning. Some recent approaches integrate much of the planning machinery into the grammar itself, viewing linguistic structures as planning operators. This requires grammar formalisms which integrate multiple levels of linguistic analysis, from pragmatics to morpho-syntax. It is common for contemporary planningbased approaches to nlg to be couched in the formalism of Lexicalised Tree Adjoining Grammar (ltag; Joshi & Schabes, 1997), though other formalisms, such as Combinatory Categorial Grammar (Steedman, 2000) have also been shown to be adequate to the task (see especially Nakatsu & White, 2010, for an approach to generation using Discourse Combinatory Categorial Grammar). In an ltag, pieces of linguistic structure (so-called elementary trees in a lexicon) can be coupled with semantic and pragmatic information that specify (a) what semantic preconditions need to obtain in order for the item to be felicitously used; and (b) what pragmatic goals the use of that particular item will achieve (see Stone & Webber, 1998; Garoufi & Koller, 2013; Koller & Striegnitz, 2002, for planning-based work using ltag). As an example of how such a formalism could be deployed in a planning framework, let us focus on the task of referring to a target entity. Koller and Stone (2007) formulated the task in a way that obviates the need to distinguish between the content determination and realisation phases (an approach already taken in Stone & Webber, 1998). Furthermore, they do not separate sentence planning, reg and realisation, as is done in the traditional pipeline. Consider the sentence Mary likes the white rabbit. Simplifying the formalism for ease of presentation, we can represent the lexical item likes as follows (this example is based on Garoufi, 2014, albeit with some simplifications): (12) likes(u, x, y) action: preconditions: 27 • The proposition that x likes y is part of the knowledge base (i.e. the statement is supported); • x is animate; • The current utterance u can be substituted into the derivation S under construction; effects: • u is now part of S • New np nodes for x in agent position and y in patient position have been set up (and need to be filled). As in strips, an operator consists of preconditions and effects. Note that the preconditions associated with the lexical item require support in the knowledge base (thus making reference to the input kb, which normally would not be accessible to the realiser), and include semantic information (such as that the agent needs to be animate). Having inserted likes as the sentence’s main verb, we have two noun phrases which need to be filled by generating nps for the arguments x and y. Rather than deferring this task to a separate reg module, Koller and Stone build referring expressions by associating further pragmatic preconditions on the linguistic operators (elementary trees) that will be incorporated in the referential np. First, the entity must be part of the hearer’s knowledge state, since an identifying description (say, to x) presupposes that the hearer is familiar with it. Second, an effect of adding words to the np (such as the predicates rabbit or white) is that the phrase excludes distractors, i.e. entities of which those properties are not true. In a scenario with one human being and two rabbits, only one of which (the y in our example) is white, the derivation would proceed by first updating the np corresponding to y with rabbit, thereby excluding the human from the distractor set, but leaving the goal to distinguish y unsatisfied (since y is not the only rabbit). The addition of another predicate to the np (white) does the trick. A practical advantage to planning-based approaches is the availability of a significant number of off-the-shelf planners. Once the nlg task is formulated in an appropriate plan description language, such as the Planning Domain Definition Language (pddl; McDermott, 2000), it becomes possible in principle to use any planner to generate text. However, planners remain beset by problems of efficiency. In a set of experiments on nlg tasks of differing complexity, Koller and Petrick (2011) noted that planners tend to spend significant amounts of time on preprocessing, though solutions could often be found efficiently once preprocessing was complete. 3.2.2 Stochastic Planning under Uncertainty using Reinforcement Learning The approaches to planning we have discussed so far are largely rule-based and tend to view the relationship between a planned action and its consequences 28 (that is, its impact on the context), as fixed (though exceptions exist, as in contingency planning, which generates multiple plans to address different possible outcomes; Steedman & Petrick, 2007). As Rieser and Lemon (2009) note, this view is unrealistic. Consider a system that generates a restaurant recommendation. The consequences of its output (that is, the new state it gives rise to) are subject to noise arising from several sources of uncertainty. In part, this is due to trade-offs, for example, between needing to include the right amount of information while avoiding excessive prolixity. Another source of uncertainty is the user, whose actions may not be the ones predicted by the system. An instance of Meteer’s (1991) generation gap can rear its head, for instance if a stochastic realiser renders the content of a message in an ambiguous, or excessively lengthy utterance (Rieser & Lemon, 2009), a problem that could be addressed by allowing different sub-tasks to share knowledge sources and be guided by overlapping constraints (Dethlefs & Cuayáhuitl, 2015, discussed below). In short, planning a good solution to reach a communicative goal could be viewed as a stochastic optimisation problem (a theme we revisit in Section 3.3.3 below). This view is shared by many recent approaches based on Reinforcement Learning (rl; Lemon, 2008; Rieser & Lemon, 2009, 2011), especially those that tackle nlg within a dialogue context. In this framework, generation can be modelled as a Markov decision process where states are associated with possible actions and each state-action pair is associated with a probability of moving from a state at time t to a new state at t + 1 via action a. Crucially for the learning algorithm, transitions are associated with a reinforcement signal, via a reward function that quantifies the optimality of the generated output. Learning usually involves simulations in which different generation strategies or ‘policies’ – essentially, plans corresponding to possible paths through the state space – come to be associated with different rewards. The rl framework has been argued to be better at handling uncertainty in dynamic environments than supervised learning or classification, since these do not enable adaptation in a changing context (Rieser & Lemon, 2009). Rieser et al. (2011) showed that this approach is effective in optimising information presentation when generating restaurant recommendations. Janarthanam and Lemon (2014) used it to optimise the choice of information to select in a referring expression, given a user’s knowledge. The system learns to adapt its user model as the user acquires new knowledge in the course of a dialogue. An important contribution of this work has been in exploring joint optimisation, where the policy learned satisfies multiple constraints arising from different sub-tasks of the generation process, by sharing knowledge across the sub-tasks. Lemon (2011) showed that joint optimisation can learn a policy that determines when to generate informative utterances or queries to seek more information from a user. Similarly, Cuayáhuitl and Dethlefs (2011) used hierarchical rl to jointly optimise the problem of finding and describing a short route description, while adapting to a user’s prior knowledge, giving rise to a strategy whereby the user is guided past landmarks that they are familiar with, while avoiding potentially confusing junctions. Also in a route-finding setting, 29 Dethlefs and Cuayáhuitl (2015) develop a hierarchical model comprising a set of learning agents whose tasks range from content selection through realisation. They show that a joint framework in which agents share knowledge, outperforms an isolated learning framework in which each task is modelled separately. For example, the joint policy learns to give high-level navigation instructions, but switches to low-level instructions if the user goes off-track. Furthermore, utterances produced by the joint policy are less verbose and lead to shorter interactions overall. The joint optimisation framework is of course not unique to Reinforcement Learning and planning-based approaches. A number of approaches to content determination discussed in earlier sections, including the work of Marciniak and Strube (2005) and Barzilay and Lapata (2005), also use joint optimisation in their approach to content determination and realisation (see Sections 2.1), as does the work of Lampouras and Androutsopoulos (2013). We return to optimisation in Section 3.3.3 below. In summary, nlg research within the planning paradigm has highlighted the desirability of developing unified formalisms to represent constraints on the generation process at multiple levels, whether this is done using ai-based planning formalisms (Koller & Petrick, 2011), or stochastically via Reinforcement Learning. Among its contributions, the latter line of work has shed light on the value of (a) hierarchical relationships among sub-problems; and (b) joint optimisation of different sub-tasks. Indeed, the latter trend belongs to a much broader range of research on integrated approaches to nlg, to which we turn our attention immediately below. 3.3 Other Stochastic Approaches to NLG As we noted at the start of this section, whether a system is data-driven or not is independent of its architectural organisation. Indeed, some of the earliest challenges to a modular or pipeline approach described in Section 3.1 above, including revision-based and blackboard architectures, were symbolic in their methodological orientation. At the same time, the shift towards data-driven methods and the availability of data sources has given greater impetus to integrated approaches to nlg, although this shift began somewhat later that in other areas of nlp. As a result, a discussion of integrated approaches will necessarily tend to emphasise statistical methods. In the remainder of this section, we start with an overview of methods used to acquire training data for nlg – in particular, pairings of inputs (data) and outputs (text) – before turning to an overview of techniques and frameworks. One of the themes that will emerge from this overview is that, as in the case of planning, statistical methods often take a unified or ‘global’, rather than a modularised, view of the nlg process. 30 3.3.1 Acquiring Data As noted in Section 2, some nlg tasks support the transition to a stochastic approach fairly easily. For example, research on realisation often exploits the existence of treebanks from which input-output correspondences can be learned. Similarly, the emergence of corpora of referring expressions representing both input domains and output descriptions (e.g., Gatt et al., 2007; Viethen & Dale, 2011; Kazemzadeh et al., 2014; Gkatzia et al., 2015) has facilitated the development of probabilistic reg algorithms. Shared tasks have also contributed to the development of both data sources and methods (see Section 7). As we show in Section 4 below, recent work on image-to-text generation has also benefited from the availability of large datasets. For statistical, end-to-end generation in other domains, there is less of an embarrassment of riches. However, this situation is improving as methods to automatically align input data with output text are developed. Still, it is worth emphasising that many of these alignment approaches use data which is semi-structured, rather than the raw, numerical input (e.g., signals) used by the data-to-text systems that Reiter (2007), among others, drew attention to. Currently, there are a number of data-text corpora in specific domains, notably weather forecasting (Reiter et al., 2005; Belz, 2008; Liang et al., 2009) and sports summaries (Barzilay & Lapata, 2005; Chen & Mooney, 2008). These usually consist of database records paired with free text. A promising recent trend is the introduction of statistical techniques that seek to automatically segment and align such data and text (e.g., Barzilay & Lapata, 2005; Liang et al., 2009; Konstas & Lapata, 2013). In an influential paper, Liang et al. (2009) described this framework in terms of a generative model that defines a distribution p(wks), for sequences of words w and input states s, with latent variables specifying the correspondence between w and s in terms of three main components: (i) the likelihood of database records being selected, given s; (ii) the likelihood of certain fields being chosen for some record; (iii) the likelihood that a string of a certain length is generated given the records, fields and states. The parameters of the model can be found using the Expectation Maximization (em) algorithm. An example alignment is shown in Figure 4. These models perform alignment by identifying regular co-occurrences of segments of data and text. Koncel-Kedziorski et al. (2014) go beyond this by proposing a model that exploits linguistic structure to align at varying resolutions. For example, (13) below is related to two observations in a soccer game log (an aerial pass and a miss), but can be further analysed into two sub-parts (indicated by indices 1 and 2 in our example), which individually map to these two sub-events. (13) (Chamakh rises highest)1 and (aims a header towards goal which is narrowly wide)2 . A different approach to data acquisition is described by Mairesse and Young (2014), who use crowd-sourcing techniques to elicit realisations for semantic/pragmatic inputs describing dialogue acts in the restaurant domain (see Novikova & Rieser, 31 Events: Fields: Text: Events: Fields: Text: skycover1 percent=0-25 cloudy, with winddir1 mode=S [. . . ] south wind temperature1 time=6am-9pm min=9 temperatures between 10 windspeed1 mean=20 around 20mph. max=21 20 degrees. [. . . ] Figure 4: Database records aligned with text using minimal supervision (after Liang et al., 2009). 2016b, for another recent approach to crowd-sourcing in a similar domain). The key to the success of this technique is the development of a semantics that is sufficiently transparent for use with non-specialists. In an earlier paper, Mairesse et al. (2010) describe a method to cut down on the amount of training data required for generation by using uncertainty sampling (Lewis & Catlett, 1994), whereby a system can be trained on a relatively small amount of input data; subsequently, the learned model is applied to new data, from which the system samples the cases of which it is least certain, forwarding these to a (possibly human) oracle for feedback, which potentially leads to a new training cycle. Many of the stochastic end-to-end systems we discuss below rely on welldefined formalisms and typically need fairly precise alignments between inputs and portions of the output. One of the limitations of these approaches is that the reliance on alignment makes such systems highly domain-specific, as noted by Angeli et al. (2010). More recent stochastic methods obviate the need for alignment between input data and output strings. This is the case for many systems based on neural networks (e.g., Wen et al., 2015; Dušek & Jurčı́ček, 2016; Lebret et al., 2016; Mei et al., 2016, discussed in Section 3.3.5) as well as other machine-learning approaches (e.g., Dušek & Jurčı́ček, 2015; Lampouras & Vlachos, 2016). For example, Dušek and Jurčı́ček (2015) use the dialogue acts from the bagel dataset (Mairesse et al., 2010) as meaning representations; the bagel reference texts are parsed using an off-the-shelf deep syntactic analyser. They define a stochastic sentence planner, a variant of the A∗ algorithm, which builds optimal sentence plans using a base generator and a scoring function to rank candidates. Realisation is conducted using a rule-based realiser. The approach of Lampouras and Vlachos (2016), also uses unaligned mr-text pairs from bagel, as well as the related sf hotel and restaurant dataset by Wen et al. (2015). Here, content determination and realisation are both conceived as classification problems (choosing an attribute from the mr, or choosing a word for the output), but are optimised jointly in an iterative training algorithm using imitation learning. 32 3.3.2 NLG as a Sequential, Stochastic Process Given an alignment between data and text, one way of modelling the nlg process is to remain faithful to the division between strategic and tactical choices, using the statistical alignment to inform content selection, while deploying nlp techniques to acquire rules, templates or schemas (á la McKeown, 1985) to drive sentence planning and realisation. Recall that the generative model of Liang et al. (2009) pairs data to text based on a sequential, Markov process, combining strategic choices (of db records and fields) with tactical choices (of word sequences) into a single probabilistic model. In fact, Markov-based language modelling approaches continue to feature prominently in data-driven nlg. One of the earliest examples is the work of Oh and Rudnicky (2002) in the context of a dialogue system in the travel domain, where the input takes the form of a dialogue act (e.g. a query that the system needs to make to obtain information about the user’s travel plans) with the attributes to include (e.g. the departure city). Oh and Rudnicky’s approach encompasses both content planning and realisation. It relies on dialogue corpora annotated with utterance classes, that is, the type of dialogue act that each utterance is intended to fulfil. On this basis, they construct separate n-gram language models for each utterance class, as well as for word-classes that can appear in the input (for example, words corresponding to departure city). Content planning is handled by a model that predicts which attributes should be included in an utterance on the basis of recent dialogue history. Realisation is handled using a combination of templates and n-gram models. Thus, generation is conceived as a two-step (planning followed by realisation) process. The reliance on standard language models has one potential drawback, in that such models are founded on a local history assumption, limiting the extent to which prior selections can influence current choices. An alternative, discriminative model (known to the nlp community at least since Ratnaparkhi, 1996) is logistic regression (Maximum Entropy). The foundations for this approach in nlg can be found in the work of Ratnaparkhi (2000), who focussed primarily on realisation (albeit combined with elements of sentence planning). He compared two stochastic nlg systems based on a maximum entropy learning framework, to a baseline nlg system. The first of these (nlg2 in Ratnaparkhi’s paper) uses a conditional language model that generates sentences in an incremental, left-to-right fashion, by predicting the best word given both the preceding history (as in standard n-gram models) and the semantic attributes that remain to be expressed. The second (nlg3) augments the model with syntactic dependency relations, performing generation by recursively predicting the left and right children of a given constituent. In an evaluation based on judgements of correctness, Ratnaparkhi found that the system augmented with dependencies was generally preferred. In later work, Angeli et al. (2010) describe an end-to-end nlg system that maintains a separation between content selection, sentence planning and realisation, modelling each process as a sequence of decisions in a log-linear framework, where choices can be conditioned on arbitrarily long histories of previous deci- 33 Figure 5: Tree structure for a dialogue act, after Mairesse and Young (2014). Leaves correspond to word sequences. Non-terminal nodes are semantic attributes, shown at the bottom as semantic stacks. Stacks in bold represent mandatory content. sions. This enables them to handle long-range dependencies, such as coherence relations, more flexibly (e.g., a model can incorporate the information that a weather report which describes wind speed should do so after mentioning wind direction; see Barzilay & Lapata, 2005, for similar insights based on global optimisation). The separation of tasks is maintained insofar as a different set of features can be used to inform decisions at each stage of the process. Sentence planning and realisation decisions are based on templates acquired from corpus texts: a template is selected based on its likelihood given the database fields selected during content selection. Mairesse and Young (2014) describe a different approach, which also relies on alignments between database records and text, and seeks a global solution to generation, without a crisp distinction between strategic and tactical components. In this case, the basic representational framework is a tree of the sort shown in Figure 5. The root indicates a dialogue act type (in the example, the dialogue act seeks to inform). Leaves in the tree correspond to words or word sequences, while nonterminals are semantic stacks, that is, the pieces of input to which the words correspond. In this framework, content selection and realisation can be solved jointly by searching for the optimal stack sequence for a given dialogue act, and the optimal word sequence corresponding to that stack sequence. Mairesse and Young use a factored language model (flm), which extends n-gram models by conditioning probabilities on different utterance contexts, rather than simply on word histories. Given an input dialogue act, generation works by applying a Viterbi search through the flm at each of the following stages: (a) mandatory semantic stacks are identified for the dialogue act; (b) these are enriched with possible non-mandatory stacks (those which are not in boldface in Figure 5), usually corresponding to function words; (c) realisations are found for the stack sequence. The approach is also extended 34 to deal with n−best realisations, as well as to handle variation, in the form of paraphrases for the same input. 3.3.3 NLG as Classification and Optimisation An alternative way to think about nlg decisions at different levels is in terms of classification, already encountered in the context of specific tasks, such as content determination (e.g., Duboue & McKeown, 2003) and realisation (e.g., Filippova & Strube, 2007). Since generation is ultimately about choice-making at multiple levels, one way to model the process is by using a cascade of classifiers, where the output is constructed incrementally, so that any classifier Ci uses as (part of) its input the output of a previous classifier Ci−i . Within this framework, it is still possible to conceive of nlg in terms of a pipeline. As Marciniak and Strube (2005) note, an alternative way of thinking about it is in terms of a weighted, multi-layered lattice, where generation amounts to a best-first traversal: at any stage i, classifier Ci produces the most likely output, which leads to the next stage Ci+1 along the most probable path. This generalisation is conceptually related to the view of nlg in terms of policies in the Reinforcement Learning framework (see Section 3.2.2 above), which define a traversal through sequences of states which may be hierarchically organised (as in the work of Dethlefs & Cuayáhuitl, 2015, for example). Marciniak and Strube (2004) start from a small corpus of manually annotated texts of route descriptions, dividing generation into a series of eight classification problems, from determining the linear precedence of discourse units, to determining the lexical form of verbs and the type of their arguments. Generation decisions are taken using the instance-based KStar algorithm, which is shown to outperform a majority baseline on all classification decisions. Instancebased approaches to nlg are also discussed by Varges and Mellish (2010), albeit in an overgenerate-and-rank approach where rules overgenerate candidates, which are then ranked by comparison to the instance base. A similar framework was recently adopted by Zarrieß and Kuhn (2013), once again taking as their starting point textual data annotated with a dependency representation, as shown in (14) below, where referents are marked v and p and the implicit head of the dependency is underlined. (14) Junge Familiev:0 auf dem Heimwegposs:v ausgeraubtag:p Young family on the way home robbed ‘A young family was robbed on their way home.’ These authors use a sequence of classifiers to perform referring expression generation and realisation. They use a ranking model based on Support Vector Machines which, given an input dependency representation extracted from annotated text such as (14), performs two tasks in either order: (a) mapping the input to a shallow syntactic tree for linearisation; and (b) inserting referring expressions. Interestingly, Zarrieß and Kuhn (2013) observe that the performance of either task is order-dependent, in that both classification tasks perform worse 35 when they are second in the sequence. They observe a marginal improvement when the tasks are performed in parallel, but achieve the best performance in a revision-based architecture, where syntactic mapping is followed by referring expression insertion, followed by a revision of the syntax. Classification cascades for nlg maintain a clean separation between tasks, but research in this area has echoed earlier concerns about pipelines in general (see Section 3.1), the main problem being error propagation. Infelicitous choices will of course impact classification further downstream, a situation analogous to the problem of the generation gap. The conclusion by Zarrieß and Kuhn (2013) in favour of a revision-based architecture, brings our account full circle, in that a well-known solution is shown to yield improvements in a new framework. Our discussion so far has repeatedly highlighted the fact that a sequential organisation of nlg tasks is susceptible to error propagation, whether this takes the form of classifier errors, or decisions in a rule-based module that have a negative impact on downstream components. A potential solution is to view generation as an optimisation problem, where the best combination of decisions is sought in an exponentially large space of possible combinations. We have encountered the use of optimisation techniques, such as Integer Linear Programming (ilp) in the context of aggregation and content determination (Section 2.3). For example, Barzilay and Lapata (2006) group content units based on their pairwise similarity, with an optimisation step to identify a set of pairs that are maximally similar. ilp has also been exploited by Marciniak and Strube (2004, 2005), as a means to counteract the error propagation problem in their original classification-based approach. Similar solutions have been undertaken by Lampouras and Androutsopoulos (2013), in the context of generating text from owl ontologies. Lampouras and Androutsopoulos show that joint optimization using Integer Linear Programming to jointly determine content selection, lexicalisation and aggregation produces more compact verbalisations of ontology facts, compared to a pipeline system (which the authors presented earlier in Androutsopoulos et al., 2013). Conceptually, the optimisation framework is simple: 1. Each nlg task is once again modelled as classification or label-assignment, but this time, labels are modelled as binary choices (either a label is assigned or not), associated with a cost function, defined in terms of the probability of a label in the training data; 2. Pairs of tasks which are strongly inter-dependent (for example, syntactic choices and reg realisations, in the example from Zarrieß & Kuhn, 2013) have a cost based on the joint probability of their labels; 3. An ilp model seeks the global labelling solution that minimises the overall cost, with the added constraint that if one of a pair of correlated labels hli , lj i is selected, the other must be too. Optimisation solutions have been shown to outperform different versions of the classification pipeline (e.g., that of Marciniak & Strube, 2004), much as the 36 results of Dethlefs and Cuayáhuitl (2015), discussed above, showed that reinforcement learning of a joint policy produces better dialogue interactions than learning isolated policies for separate nlg tasks. The imitation learning framework of Lampouras and Vlachos (2016) (discussed earlier in Section 3.3.1), which seeks to jointly optimise content determination and realisation, was also shown to achieve competitive results, approaching the performance of the systems of Wen et al. (2015) on sf and of Dušek and Jurčı́ček (2015) on bagel. 3.3.4 NLG as ‘Parsing’ In recent years, there has been a resurgence of interest in viewing generation in terms of probabilistic context-free grammar (cfg) formalisms, or even as the ‘inverse’ of semantic parsing. For example, Belz (2008) formalises the nlg problem entirely in terms of cfgs: a base generator expands inputs (bits of weather data in this case) by applying cfg rules; corpus-derived probabilities are then used to control the choice of which rules to expand at each stage of the process. The base generator in this work is hand-crafted. However, it is possible to extract rules or templates from corpora, as has been done for aggregation rules (Stent & Molina, 2009; White & Howcroft, 2015, and Section 2.3), and also for more general statistical approaches to sentence planning and realisation in a text-to-text framework (e.g., Kondadadi et al., 2013). Similarly, approaches to nlg from structured knowledge bases, expressed in formalisms such as rdf, have described techniques to extract lexicalised grammars or templates from such inputs paired with textual descriptions (Ell & Harth, 2014; Duma & Klein, 2013; Gyawali & Gardent, 2014). The work of Mooney and colleagues (Wong & Mooney, 2007; Chen & Mooney, 2008; Kim & Mooney, 2010) has compared a number of different generation strategies inspired by the wasp semantic parser (Wong & Mooney, 2007), which uses probabilistic synchronous cfg rules learned from pairs of utterances and their semantic representations using statistical machine translation techniques. Chen and Mooney (2008) use this framework for generation both by adapting wasp in a generation framework, and by further adapting it to produce a new system, wasper-gen. While wasp seeks to maximise the probability of a meaning representation (mr) given a sentence, wasper-gen does the opposite, seeking the maximally probable sentence given an input mr, as it were, learning a translation model from meaning to text. When trained on a dataset of sportscasts (the robocup dataset), wasper-gen outperforms wasp on corpusbased evaluation metrics, and is shown to achieve a level of fluency and semantic correctness which approaches that of human text, based on subjective judgements by experimental participants. Note, however, that this framework focusses mainly on tactical generation. Content determination is performed separately, using a variant of the em-algorithm to converge on a probabilistic model that predicts which events or predicates should be mentioned. By contrast, the work of Konstas and Lapata (2012, 2013), which also relies on cfgs, uses a unified framework throughout. The starting point is an alignment of text with database records, extending the proposal by Liang et al. 37 (2009). The process of converting input data to output text is modelled in terms of rules which implicitly incorporate different types of decisions. For example, given a database of weather records, the rules might take the (somewhat simplified) form shown below: (15) R(windSpeed) → F S(temperature), R(rain) (16) F S(windSpeed,min) → F (windSpeed,max)F S(windSpeed,max) (17) F S(windSpeed,min) → W (windSpeed,min) where R stands for a database record, F S is a set of fields, F (x, y) stands for field y in record x, W is a word sequence, and all rules have associated probabilities that condition the rhs on the lhs, akin to the pcfgs used in parsing. These rules specify that a description of windSpeed (15) should be followed in the text by a temperature and a rain report. According to rule (16), minimum windspeed should be followed by a mention of the maximum windspeed with a certain probability. Rule (17) expands the minimum windspeed rule to a sequence of words according to a bigram language model (Konstas & Lapata, 2012). Konstas and Lapata (2012) pack the set of rules acquired from the alignment stage into a hypergraph, and treat generation as decoding to find the maximally likely word sequence. Under this view, generation is akin to inverted parsing. Decoding proceeds using an adaptation of the cyk algorithm. Since the model defining the mapping from input to output does not incorporate fluency heuristics, the decoder is interleaved with two further sources of linguistic knowledge by Konstas and Lapata (2013): (a) a weighted finite-state automaton (representing an n-gram language model); and (b) a dependency model (cf. Ratnaparkhi, 2000, , also discussed above). 3.3.5 Deep Learning Methods We conclude our discussion of data-driven nlg with an overview of applications of deep neural network (nn) architectures. The decision to dedicate a separate section is warranted by the recent, renewed interest in these models (see Goldberg, 2016, for an nlp-focussed overview), as well as the comparatively small (but steadily growing) range of nlg models couched within this framework to date. We will also revisit nn models for nlg under more specific headings in the following sections, especially in discussing stylistic variation (Section 5) and the image captioning (Section 4), where they are now the dominant approach. As a matter of fact, applications of nns in nlg hark back at least to Kukich (1987), though her work was restricted to small-scale examples. Since the early 1990s, when interest in neural approaches waned in the nlp and ai communities, cognitive science research has continued to explore their application to syntax and language production (e.g., Elman, 1990, 1993; Chang et al., 2006). The recent resurgence of interest in nns is in part due to advances in hardware that can support resource-intensive learning problems (Goodfellow et al., 2016). 38 More importantly, nns are designed to learn representations at increasing levels of abstraction by exploiting backpropagation (LeCun et al., 2015; Goodfellow et al., 2016). Such representations are dense, low-dimensional, and distributed, making them well-suited to capturing grammatical and semantic generalisations (see Mikolov et al., 2013; Luong et al., 2013; Pennington et al., 2014, inter alia). nns have also scored notable successes in sequential modelling using feedforward networks (Bengio et al., 2003; Schwenk & Gauvain, 2005), log-bilinear models (Mnih & Hinton, 2007) and recurrent neural networks (rnns, Mikolov et al., 2010), including rnns with long short-term memory units (lstm, Hochreiter & Urgen Schmidhuber, 1997). The latter are now the dominant type of rnn for language modelling tasks. Their main advantage over standard language models is that they handle sequences of varying lengths, while avoiding both data sparseness and an explosion in the number of parameters through the projection of histories into a low-dimensional space, so that similar histories share representations. A demonstration of the potential utility of recurrent networks for nlg was provided by Sutskever et al. (2011), who used a character-level lstm model for the generation of grammatical English sentences. This, however, focussed exclusively on their potential for realisation. Models that generate from semantic or contextual inputs cluster around two related types of models, descibed below. 3.3.6 Encoder-Decoder Architectures An influential architecture is the Encoder-Decoder framework (Sutskever et al., 2014), where an rnn is used to encode the input into a vector representation, which serves as the auxiliary input to a decoder rnn. This decoupling between encoding and decoding makes it possible in principle to share the encoding vector across multiple nlp tasks in a multi-task learning setting (see Dong et al., 2015; Luong et al., 2015, for some recent case studies). Encoder-Decoder architectures are particularly well-suited to Sequence-to-Sequence (seq2seq) tasks such as Machine Translation, which can be thought of as requiring the mapping of variable-length input sequences in the source language, to variablelength sequences in the target (e.g., Kalchbrenner & Blunsom, 2013; Bahdanau et al., 2015). It is easy to adapt this view to data-to-text nlg. For example, Castro Ferreira et al. (2017) adapt seq2seq models for generating text from abstract meaning representations (amrs). A further important development within the Encoder-Decoder paradigm is the use of attention-based mechanisms, which force the encoder, during training, to weight parts of the input encoding more when predicting certain portions of the output during decoding (cf. Bahdanau et al., 2015; Xu et al., 2015). This mechanism obviates the need for direct input-output alignment, since attentionbased models are able to learn input-output correspondences based on loose couplings of input representations and output texts (see Dušek & Jurčı́ček, 2016, for discussion). In nlg, many approaches to response generation in an interactive context (such as dialogue or social media posts) adopt this architecture. For example, 39 Wen et al. (2015) use semantically-conditioned lstms to generate the next act in a dialogue; a related approach is taken by Sordoni et al. (2015), who use rnns to encode both the input utterance and the dialogue context, with a decoder to predict the next word in the response (see also Serban et al., 2016). Goyal et al. (2016) found an improvement in the quality of generated dialogue acts when using a character-based, rather than a word-based rnn. Dušek and Jurčı́ček (2016) also use a seq2seq model with attention for dialogue generation, comparing an end-to-end model where content selection and realisation are jointly optimised (so that outputs are strings), to a model which outputs deep syntax trees, which are then realised using an off-the-shelf realiser (as done in Dušek & Jurčı́ček, 2015). Like Wen et al. (2015), they use a reranker during decoding to rank beam search outputs, penalising those that omit relevant information or include irrelevant information. Their evaluation, on bagel, shows that the joint optimisation setup is superior to the seq2seq model that generates trees for subsequent realisation. Mei et al. (2016) also explicitly address the division into content selection and realisation, using weathergov data (Angeli et al., 2010). They use a bidirectional lstm encoder to map input records to a hidden state, followed by an attention-based aligner which models content selection, determining which records to mention as a function of their prior probability and the likelihood of their alignment with words in the vocabulary; a further refinement step weights the outcomes of the alignment with the priors, making it more likely that more important records will be verbalised. In this approach, lstms are able to learn long-range dependencies between records and descriptors, which the log-linear model of Angeli factored in explicitly (see Section 3.3.2 above). Comparable approaches are now also use for automatic generation of poetry (see e.g., Zhang & Lapata, 2014), a topic to which we will return below. 3.3.7 Conditioned Language Models A related view of the data-to-text process views the generator as a conditioned language model, where output is generated by sampling words or characters from a distribution conditioned on input features, which may include semantic, contextual or stylistic attributes. For example, Lebret et al. (2016) restricts generation to the initial sentence of wikipedia biographies from the corresponding wiki fact table and models content selection and realisation jointly in a feedforward nn (Bengio et al., 2003), conditioning output word probabilities on both local context and global features obtained from the input table. This biases the model towards full coverage of the contents of a field. For example, a field in the table containing a person’s name typically consists of more than one word and the model should concatenate the words making up the entire name. While simpler than some of the models discussed above, this model can also be thought of as incorporating an attentional mechanism. Lipton et al. (2016) use character-level rnns conditioned on semantic information and sentiment, to generate product reviews, while Tang et al. (2016) generate such reviews using an lstm conditioned on input ‘contexts’, where contexts incorporate both dis40 crete (user, location etc) and continuous information. Similar approaches have been adopted in a number of models for stylistic and affective generation (see Li et al., 2016; Herzig et al., 2017; Asghar et al., 2017; Hu et al., 2017; Ficler & Goldberg, 2017, and the discussion in Section 5 below). 3.4 Discussion An important theme that has emerged from recent work is the blurring of boundaries between tasks that are encapsulated in traditional architectures. This is evident in planning-based approaches, but perhaps the most radical break from this perspective arises in stochastic data-to-text systems which capitalise on alignments between input data and output text, combining content-oriented and linguistic choices within a unified framework. Among the open questions raised by research on stochastic nlg is the extent to which sub-tasks need to be jointly optimised and, if so, which knowledge sources should be shared among them. This is also seen in recent work using neural models, where joint learning of content selection and realisation has been claimed to yield superior outputs, compared to models that leave the tasks separate (e.g., Dušek & Jurčı́ček, 2016). An outstanding issue is the balancing act between achieving adequate textual output versus doing so efficiently and robustly. Early approaches that departed from a pipeline architecture tended to sacrifice the latter in favour of the former; this was the case in revision-based and blackboard architectures. The same is to some extent true of planning-based approaches which are rooted in paradigms with a long history in ai: As recent empirical work has shown (Koller & Petrick, 2011), these too are susceptible to considerable computational cost, though this comes with the advantage of a unified view of language generation that is also compatible with well-understood linguistic formalisms, such as ltag. Stochastic approaches present a different problem, namely, that of acquiring the right data to construct the necessary statistical models. While plenty of datasets have become available, for tasks such as recommendations in the restaurant or hotel domains, brief weather reports, or sports summaries, it remains to be seen whether data-driven nlg models can be scaled up to domains where large volumes of heterogeneous data (numbers, symbols etc) are the norm, and where longer texts need to be generated. While such data is not easy to come by, crowd-sourcing techniques can presumably be exploited (Mairesse & Young, 2014; Novikova & Rieser, 2016b). As we have seen, systems vary in whether they require aligned data (by which we mean data where strings are paired with the portion of the input to which they correspond), or not. As deep learning approaches become more popular – and, as we shall see in the next section, they are now the dominant approach in certain tasks, such as generating image captions – the need for alignment is becoming less acute, as looser input-output couplings can constitute adequate training data, especially in models that incorporate attentional mechanisms. As these techniques become better understood, they are likely to feature more heavily in a broader range of nlg tasks, as well as end-to-end nlg systems. A second possible outcome of the renewed interest in deep learning is its 41 impact on representation learning and architectures. In a recent opinion piece, Manning (2015) suggested that the contribution of deep learning to nlp has to date been mainly due to the power of distributed representations, rather than the exploitation of the ‘depth’ of multi-layered models. Yet, as Manning also notes, greater depth can confer representational advantages. As researchers begin to define complex architectures that ‘self-organise’ during training by minimising a loss function, it might turn out that different components of such architectures acquire core representations pertaining to different aspects of the problem at hand. This raises the question whether such representations could be reusable, in the same way that the layers of deep convolutional networks in computer vision learn representations at different levels of granularity which turn out to be reusable in a range of tasks (not just object recognition, for instance, even though networks such as vgg are typically trained for such tasks; see Simonyan & Zisserman, 2015). A related aim, suggested by recent attempts at transfer learning, especially in the seq2seq paradigm, is to attempt to learn domain-invariant representations that carry over from one task to another. Could nlp, and the field of nlg in particular, be about to witness a renewed emphasis on multi-levelled approaches to nlg, with ‘deep’ architectures whose components learn optimal representations for different sub-tasks, perhaps along the lines detailed in Section 2 above? And to what extent would such representations be reusable? As a number of other commentators have pointed out, the prospect of learning domain-invariant linguistic representations that facilitate transfer learning in nlp, remains somewhat elusive, despite certain notable successes, not least those scored in the development of distributed word representations.4 This could well be the next frontier in research on statistical nlg. In the following sections, we turn our attention away from standard tasks and the way they are organised, focussing on three broad topics – image-totext generation, stylistic variation and computational creativity – in which nlg research has also intersected with research in other areas of Artificial Intelligence and nlp. 4 The Vision-Language Interface: Image Captioning and Beyond Over the past few years, there has been an explosion of interest in the task of automatically generating captions for images, as part of a broader endeavour to investigate the interface between vision and language (Barnard, 2016). Image captioning is arguably a paradigm case of data-to-text generation, where the input comes in the form of an image. The task has become a research focus not only in the nlg community but also in the computer vision community, raising 4 For some remarks on this topic, see for example the blog entry by Ruder (2017). A recent note of caution against unrealistic claims of success of neural methods in nlg was sounded by Goldberg (2017). 42 the possibility of more effective synergies between the two groups of researchers. Apart from its practical applications, the grounding of language in perceptual data has long been a matter of scientific interest in ai (see Winograd, 1972; Harnad, 1990; Roy & Reiter, 2005, for a variety of theoretical views on the computational challenges of the perception-language interface). (a) The man at bat readies to swing at the pitch while the umpire looks on (Human-authored caption from the ms-coco dataset Lin et al., 2014) (b) This picture shows one person, one grass, one chair, and one potted plant. The person is near the green grass, and in the chair. The green grass is by the chair, and near (c) A person is playing the potted plant (Kulka- a saxophone (Elliott & De Vries, 2015) rni et al., 2011) (e) A bus is driving down (d) A bus by the road the street in front of (f) A gecko is standing on with a clear blue sky a building (Mao et al., a branch of a tree (Hen(Mitchell et al., 2012) 2015a) dricks et al., 2016b) Figure 6: Some caption generation examples Figure 6 shows some examples of caption generation, sampled from publications spanning approximately 6 years. Current caption generation research focusses mainly on what Hodosh et al. (2013) refer to as concrete conceptual image descriptions of elements directly depicted in a scene. As Donahue et al. (2015) put it, image captioning is a task whose input is static and non-sequential (an image, rather than, say, a video), whereas the output is sequential (a multiword text), in contrast to non-sequential outputs such as object labels (e.g. Duygulu et al., 2002; Ordonez et al., 2016, among others). Our discussion will be brief, since image captioning has recently been the subject of an extensive review by Bernardi et al. (2016), and has also been discussed against the background of broader issues in research on the vision- 43 language interface by Barnard (2016). While the present section draws upon these sources, it is organised in a somewhat different manner, also bringing out the connections with nlg more explicitly. 4.1 Data A detailed overview of datasets is provided by Bernardi et al. (2016). Ferraro et al. (2015) offer a systematic comparison of datasets for both caption generation and visual question answering with an accompanying online resource.5 Datasets typically consist of images paired with one or more human-authored captions (mostly in English) and vary from artificially created scenes (Zitnick et al., 2013) to real photographs. Among the latter, the most widely used are Flickr8k (Hodosh et al., 2013), Flickr30k (Young et al., 2014) and ms-coco (Lin et al., 2014). Datasets such as the sbu1m Captioned Photo Dataset (Ordonez et al., 2011) include naturally-occurring captions of user-shared photographs on sites such as Flickr; hence the captions included therein are not restricted to the concrete conceptual. There are also a number of specialised, domain-specific datasets, such as the Caltech ucsd Birds datast (cub; Wah et al., 2011). There have also been a number of shared tasks in this area, including the coco (‘Common Objects in Context’) Captioning Challenge6 , organised as part of the Large-Scale Scene Understanding Challenge (lsun)7 and the Multimodal Machine Translation Task (Elliott et al., 2016). We defer discussion of evaluation of image captioning systems to Section 7 of this paper, where it is discussed in the context of nlg evaluation as a whole. 4.2 The Core Tasks There are two logically distinguishable sub-tasks in an image captioning system, namely, image analysis and text generation. This is not to say that they need to be organised separately or sequentially. However, prior to discussing architectures as such, it is worth briefly giving an overview of the methods used to deal with these two tasks. 4.2.1 Image Analysis There are three main groups of approaches to treating visual information for captioning purposes. Detection Some systems rely on computer vision methods for the detection and labelling of objects, attributes, ‘stuff’ (typically mapped to mass nouns, such as grass), spatial relations, and possibly also action and pose information. This is usually followed by a step mapping these outputs to linguistic structures 5 The resource provided by Ferraro et al. (2015) visionandlanguage.net. 6 http://mscoco.org/dataset/#captions-challenge2015 7 http://lsun.cs.princeton.edu/2016/ 44 can be found at http:// (‘sentence plans’ of the sort discussed in Section 2 and 3), such as trees or templates (e.g. Kulkarni et al., 2011; Yang et al., 2011; Mitchell et al., 2012; Elliott & De Vries, 2015; Yatskar et al., 2014; Kuznetsova et al., 2014). Since performance depends on the coverage and accuracy of detectors (Kuznetsova et al., 2014; Bernardi et al., 2016), some work has also explored generation from gold standard image annotations (Elliott & Keller, 2013; Wang & Gaizauskas, 2015; Muscat & Belz, 2015) or artificially created scenes in which the components are known in advance (Ortiz et al., 2015). Holistic scene analysis Here, a more holistic characterisation of a scene is used, relying on features that do not typically identify objects, attributes and the like. Such features include rgb histograms, scale-invariant feature transforms (sift; Lowe, 2004), or low-dimensional representations of spatial structure (as in gist; Oliva & Torralba, 2001), among others. This kind of image processing is often used by systems that frame the task in terms of retrieval, rather than caption generation proper. Such systems either use a unimodal space to compare a query image to training images before caption retrieval (e.g. Ordonez et al., 2011; Gupta et al., 2012), or exploit a multimodal space representing proximity between images and captions (e.g. Hodosh et al., 2013; Socher et al., 2014). Dense image feature vectors Given the success of convolutional neural networks (cnn) for computer vision tasks (cf. e.g., LeCun et al., 2015), many deep learning approaches use features from a pre-trained cnn such as AlexNet (Krizhevsky et al., 2012), vgg (Simonyan & Zisserman, 2015) or Caffe (Jia et al., 2014). Most commonly, caption generators use an activation layer from the pre-trained network as their input features (e.g. Kiros et al., 2014; Karpathy et al., 2014; Karpathy & Fei-Fei, 2015; Vinyals et al., 2015; Mao et al., 2015a; Xu et al., 2015; Yagcioglu et al., 2015; Hendricks et al., 2016b). 4.2.2 Text Generation or Retrieval Depending on the type of image analysis technique, captions can be generated using a variety of different methods, of which the following are well-established. Using templates or trees Systems relying on detectors can map the output to linguistic structures in a sentence planning stage. For example, objects can be mapped to nouns, spatial relations to prepositions, and so on. Yao et al. (2010) use semi-supervised methods to parse images into graphs and then generate text via a simple grammar. Other approaches rely on sequence classification algorithms, such as Hidden Markov Models (Yang et al., 2011) and conditional random fields (Kulkarni et al., 2011, 2013). Kulkarni et al. (2013, see the example in Figure 6b) experiment with both templates and web-derived n-gram language models, finding that the former are more fluent, but suffer from lack of variation, an issue we also addressed earlier, in connection with realisation (Section 2.6). 45 In the Midge system (Mitchell et al., 2012, see Figure 6d for an example caption), input images are represented as triples consisting of object/stuff detections, action/pose detections and spatial relations. These are subsequently mapped to hnoun, verb, prepositioni triples and realised using a tree substitution grammar. This is further enhanced with the ability to ‘hallucinate’ likely words using a probabilistic model, that is, to insert words which are not directly grounded in the detections performed on the image itself, but have a high probability of occurring, based on corpus data. In a human evaluation, Midge was shown to outperform both the system by Kulkarni et al. (2011) and Yang et al. (2011) on a number of criteria, including humanlikeness and correctness. Elliott and Keller (2013) use visual dependency representations (vdr), a dependency grammar-like formalism to describe spatial relations between objects based on physical features such as proximity and relative position. Detections from an image are mapped to their corresponding vdr relations prior to generation (see also Elliott & De Vries, 2015, and the example in Figure 6c). Ortiz et al. (2015) use ilp to identify pairs of objects in abstract scenes (Zitnick & Parikh, 2013) before mapping them to a vdr. Realisation is framed as a machine translation task over vdr-text pairs. A similar concern with identifying spatial relations is found in the work of Lin and Kong (2015), who use scene graphs as input to a grammar-based realiser. Muscat and Belz (2015) propose a naive Bayes model to predict spatial prepositions based on image features such as object proximity and overlap. Using language models Using language models has the potential advantage of facilitating joint training from image-language pairs. It may also yield more expressive or creative captions if it is used to overcome the limitations of grammars or templates (as shown by the example of Midge; Mitchell et al., 2012). In some cases, n-gram models are trained on out-of-domain data, the approach taken by Li et al. (2011) using web-scale n-grams, and by Fang et al. (2015), who used a maximum entropy language model. Most deep learning architectures use language models in the form of vanilla rnns or long short-term memory networks (e.g. Kiros et al., 2014; Vinyals et al., 2015; Donahue et al., 2015; Karpathy & Fei-Fei, 2015; Xu et al., 2015; Hendricks et al., 2016b, 2016a; Mao et al., 2016). These architectures model caption generation as a process of predicting the next word in a sequence. Predictions are biased both by the caption history generated so far (or the start symbol for initial words) and by the image features which, as noted above, are typically features extracted from a cnn trained on the object detection task. Caption retrieval and recombination Rather than generate captions, some systems retrieve them based on training data. The advantage of this is that it guarantees fluency, especially if retrieval is of whole, rather than partial, captions. Hodosh et al. (2013) used a multimodal space to represent training images and captions, framing retrieval as a process of identifying the nearest caption to a query image. The idea of ‘wholesale’ caption retrieval has a number of 46 precedents. For example Farhadi et al. (2010) use Markov random fields to parse images into hobject,action, scenei triples, paired with parsed captions. A caption for a query image is retrieved by comparing it to the parsed images in the training data, finding the most similar based on WordNet. Similarly, the Im2Text (Ordonez et al., 2011) system ranks candidate captions for a query image. Devlin et al. (2015b) use a k nearest neighbours approach, with caption similarity quantified using bleu (Papineni et al., 2002) and cider (Vedantam et al., 2015). A different view of retrieval is proposed by Feng and Lapata (2010), who use extractive summarisation techniques to retrieve descriptions of images and associated narrative fragments from their surrounding text in news articles. A potential drawback of wholesale retrieval is that captions in the training data may not be well-matched to a query image. For instance, Devlin et al. (2015b) note that the less similar a query is to training images, the more generic the caption returned by the system. A possible solution is to use partial matches, retrieving and recombining caption fragments. Kuznetsova et al. (2014) use detectors to match query images to training instances, retrieving captions in the form of parse tree fragments which are then recombined. Mason and Charniak (2014) use a domain-specific dataset to extract descriptions and adapt them to a query image using a joint visual and textual bag-of-words model. In the deep learning paradigm, both Socher et al. (2014) and Karpathy et al. (2014) use word embeddings derived from dependency parses, which are projected, together with cnn image features, into a multimodal space. Subsequent work by Karpathy and Fei-Fei (2015) showed that this fine-grained pairing works equally well with word sequences, eschewing the need for dependency parsing. Recently, Devlin et al. (2015a) compared nearest-neighbour retrieval approaches to different types of language models for caption generation, specifically, the Maximum Entropy approach of Fang et al. (2015), an lstm-based approach and rnns which are coupled with a cnn for image analysis (e.g. Vinyals et al., 2015; Donahue et al., 2015; Karpathy & Fei-Fei, 2015). A comparison of the linguistic quality of captions suggested that there was a significant tendency for all models to reproduce captions observed in the training set, repeating them for different images in the test set. This could be due to a lack of diversity in the data, which might also explain why the nearest neighbour approach compares favourably with language model-based approaches. 4.3 How is Language Grounded in Visual Data? As the foregoing discussion suggests, views on the relationship between visual and linguistic data depend on how each of the two sub-tasks is dealt with. Thus, systems which rely on detections tend to make a fairly clear-cut distinction between input processing and content selection on the one hand, and sentence planning and realisation on the other (e.g. Kulkarni et al., 2011; Mitchell et al., 2012; Elliott & Keller, 2013). The link between linguistic expressions and visual features is mediated by the outcomes of the detectors. For example, Midge (Mitchell et al., 2012) uses the object detections to determine which nouns to 47 mention, before fleshing out the caption with attributes (mapped to adjectives) and verbs. Similarly, Elliott and Keller (2013) uses vdrs to determine spatial expressions. Retrieval-based systems relying on unimodal or multimodal similarity spaces represent the link between linguistic expressions and image features more indirectly. Here, similarity plays the dominant role. In a unimodal space (Ordonez et al., 2011; Gupta et al., 2012; Mason & Charniak, 2014; Kuznetsova et al., 2012, 2014), it is images which are compared, with (partial) captions retrieved based on image similarity. A number of deep learning approaches also broadly conform to this scheme. For example, both Yagcioglu et al. (2015) and Devlin et al. (2015b) retrieve and rank captions for a query image, using a cnn for the representation of the visual space. By contrast, multimodal spaces involve a direct mapping between visual and linguistic features (e.g. Hodosh et al., 2013; Socher et al., 2014; Karpathy et al., 2014), enabling systems to map from images to ‘similar’ – that is, related or relevant – captions. Much interesting work on vision-language integration is being carried out with deep learning models. Kiros et al. (2014) introduced multimodal neural language models (mrnn), experimenting with two main architectures. Their Modality-Biased Log-Bilinear Model (mlbl-b) uses an additive bias to predict the next word in a sequence based on both the linguistic context and cnn image features. The Factored 3-way Log-Bilinear Model (mlbl-f) also gates the representation matrix for a word with image features. In a related vein, Donahue et al. (2015) propose a combined cnn + lstm architecture (also used in Venugopalan et al., 2015b, 2015a, for video captioning) where the next word is predicted as a function of both previous words and image features. In one version of the architecture, they inject cnn features into the lstm at each timestep. In a second version, they use two stacked lstms, the first of which takes cnn features and produces an output which constitutes the input to the next lstm to predict the word. Finally, Mao et al. (2015a) experiment with various mrnn configurations, obtaining their best results with an architecture in which there are two word embedding layers preceding the recurrent layer, which is in turn projected into a multimodal layer where linguistic features are combined with cnn features. An example caption is shown in Figure 6e above. These neural network models shed light on the consequences of combining the two modalities at different stages, reflecting the point made by Manning (2015, cf. Section 3.3.5) that this paradigm encourages a focus on architectures and design. In particular, image features can be used to bias the recurrent, language generation layer – at the start, or at each time-step of the rnn – as in the work of Donahue et al. (2015). Alternatively, the image features can be combined with linguistic features at a stage following the rnn, as in the work of Mao et al. (2015a). 48 4.4 Vision and Language: Current and Future Directions for NLG Image to text generation is one area of nlg where there is a clear dominance of deep learning methods. Current work focusses on a number of themes: 1. Generalising beyond training data is still a challenge, as shown by the work of Devlin et al. (2015a). More generally, dealing with novel images remains difficult, though experiments have been performed on using outof-domain training data to expand vocabulary (Ordonez et al., 2013), learn novel concepts (Mao et al., 2015b) or transfer features from image regions containing known labels, to similar, but previously unattested ones (Hendricks et al., 2016b, from which an example caption is shown in Figure 6f). Progress in zero-shot learning, where the aim is to identify or categorise images for which little or no training data is available, is likely to contribute to the resolution of data sparseness problems (e.g. Antol et al., 2014; Elhoseiny et al., 2017). 2. Attention is also being paid to what Barnard (2016) refers to as localisation, that is, the association of linguistic expressions with parts of images, and the ability to generate descriptions of specific image regions. Recent work includes that of Karpathy and Fei-Fei (2015), Johnson et al. (2016) and Mao et al. (2016), who focus on unambiguous descriptions of specific image regions and/or objects in images (see Section 2.5 above for some related work). Attention-based models are a further development on this front. These have been exploited in various seq2seq tasks, notably for machine translation (Bahdanau et al., 2015). In the case of image captioning, the idea is to allocate variable weights to portions of captions in the training data, depending on the current context, to reflect the ‘relevance’ of a word given previous words and an image region (Xu et al., 2015). 3. Recent work has also begun to explore generation from images that goes beyond the concrete conceptual, for instance, producing explanatory descriptions (Hendricks et al., 2016a). A further development is work on Visual Question Answering, where rather than descriptive captions, the aim is to produce responses to specific questions about images (Antol et al., 2015; Geman et al., 2015; Malinowski et al., 2016; Barnard, 2016; Mostafazadeh et al., 2016). Recently, a new dataset was proposed providing both concrete conceptual and ‘narrative’ texts coupled with images (Huang et al., 2016), a promising new direction for this branch of nlg. 4. There is a growing body of work that generalises the task from static inputs to sequential ones, especially videos (e.g. Kojima et al., 2002; Regneri et al., 2013; Venugopalan et al., 2015b, 2015a). Here, the challenges include handling temporal dependencies between scenes, but also dealing with redundancy. 49 5 Variation: Generating Text with Style, Personality and Affect Based on the preceding sections, the reader could be excused for thinking that nlg is mostly concerned with delivering factual information, whether this is in the form of a summary of weather data, or a description of an image. This bias was also flagged in the Introduction, where we gave a brief overview of some domains of application, and noted that informing was often, though not always, the goal in nlg. Over the past decade or so, however, there has been a growing trend in the nlg literature to also focus on aspects of textual information delivery that are arguably non-propositional, that is, features of text that are not strictly speaking grounded in the input data, but are related to the manner of delivery. In this section, we focus on these trends, starting with the broad concept of ‘stylistic variation’, before turning to generation of affective text and politeness. 5.1 Generating with Style: Textual Variation and Personality What does the term ‘linguistic style’ refer to? Most work on what we shall refer to as ‘stylistic nlg’ shies away from a rigorous definition, preferring to operationalise the notion in the terms most relevant to the problem at hand. ‘Style’ is usually understood to refer to features of lexis, grammar and semantics that collectively contribute to the identifiability of an instance of language use as pertaining to a specific author, or to a specific situation (thus, one distinguishes between levels of stylistic formality, or speaks of the distinctive characteristics of the style of William Faulkner). This implies that any investigation of style must concern itself, at least in part, with variation among the features that mark such authorial or situational variables. In line with this usage, this section reviews developments in nlg in which variation is the key concern, usually at the tactical, rather than the strategic, level, the idea being that a given piece of information can be imparted in linguistically distinct, ways (cf. van der Sluis & Mellish, 2010). This strategy was, for example, explicitly adopted by Power et al. (2003). Given its emphasis on linguistic features, controlling style (however it is defined) is a problem of great interest for nlg since it directly addresses issues of choice, which are arguably the hallmark of any nlg system (cf. Reiter, 2010). Early contributions in this area defined stylistic features using rules to vary generation according to pragmatic or stylistic goals. For example, McDonald and Pustejovsky (1985) argued that “prose style is a consequence of what decisions are made during the transition from the conceptual representation level to the linguistic level” (p. 61), thereby placing the problem within the domain of sentence planning and realisation. This stance was also adopted by DiMarco and Hirst (1993), who focus on syntactic variation, proposing a stylistic grammar for English and French. Sheikha and Inkpen (2011) proposed an adaptation 50 of the SimpleNLG realiser (Gatt et al., 2009) to handle formal versus informal language, via specific features, such as contractions (are not vs. aren’t) and lexical choice. A related perspective on stylistic variation was adopted by Walker et al. (2002), in their description of how the spot sentence planner was adapted to learn strategies for different communicative goals, as reflected in the rhetorical and syntactic structures of the sentence plans. The planner was trained using a boosting technique to learn correlations between features of sentence plans and human ratings of the adequacy of a sample of outputs for different communicative goals. Like Walker et al. (2002), contemporary approaches to stylistic variation have tended to eschew rules in favour of data-driven methods to identify relevant features and dimensions of variation from corpora, in what might be thought of as an inductive view of style, where variation is characterised by the distribution of whatever linguistic features are considered relevant. An important precedent for this view is Biber’s corpus-based multidimensional approach to style and register variation (Biber, 1988), roughly a contemporary of the grammar-inspired approach of DiMarco and Hirst (1993). Biber’s model was at the heart of work by Paiva and Evans (2005), which exhibits some characteristics in common with the ‘global’ statistical approaches to nlg discussed in Section 3.3, insofar as it exploits statistics to inform decisionmaking at the relevant choice points, rather than to filter the outputs of an overgeneration module. Paiva and Evans (2005) used a corpus of patient information leaflets, conducting factor analysis on their linguistic features to identify two stylistic dimensions. They then allowed their system to generate a large number of texts, varying its decisions at a number of choice points (e.g. choosing a pronoun versus a full np) and maintaining a trace. Texts were then scored on the two stylistic dimensions, and a linear regression model was developed to predict the score on a dimension based on the choices made by the system. This model was used during testing to predict the best choice at each choice point, given a desired style. Style, however, is a global feature of a text, though it supervenes on local decisions. These authors solved the problem by using a best-first search algorithm to identify the series of local decisions as scored by the linear models, that was most likely to maximise the desired stylistic effect, yielding variations such as the following (examples from Paiva & Evans, 2005, p. 61): (18) The dose of the patient’s medicine is taken twice a day. It is two grams. (19) The two-gram dose of the patient’s medicine is taken twice a day. (20) The patient takes the two-gram dose of the patient’s medicine twice a day. Some authors (e.g., Mairesse & Walker, 2011, on which more below) have noted that certain features, once selected, may ‘cancel’ or obscure the stylistic effect of other features. This raises the question whether style can in fact be 51 modelled as a linear, additive phenomenon, in which each feature contributes to an overall perception of style independently of others (modulo its weight in the regression equation). A second question is whether stylistic variation could be modelled in a more specific fashion, for example, by tailoring style to a specific author, rather than to generic dimensions related to ‘formality’, ‘involvement’ and so on. For instance a corpus-based analysis of human-written weather forecasts by Reiter et al. (2005) found that lexical choice varies in part based on the author. One line of work has investigated this using corpora of referring expressions, such as the tuna Corpus (van Deemter et al., 2012a), in which multiple referring expressions by different authors are available for a given input domain. For instance, Bohnet (2008) and Di Fabbrizio et al. (2008) explore statistical methods to learn individual preferences for particular attributes, a strategy also used by Viethen and Dale (2010). Hervás et al. (2013) use case-based reasoning to inform lexical choice when realising a set of semantic attributes for a referring expression, where the case base differentiates between authors in the corpus to take individual lexicalisation preferences into account (see also Hervás et al., 2016). A more ambitious view of individual variation is present in the work of Mairesse and Walker (2010, 2011), in the context of nlg for dialogue systems. Here, the aim is to vary the output of a generator so as to project different personality traits. Similar to the model of Biber (1988), personality is here given a multidimensional definition, via the classic ‘Big 5’ model (e.g., John & Srivastava, 1999), where personality is a combination of five major traits (e.g. introversion/extraversion). However, while stylistic variation is usually defined as a linguistic phenomenon, the linguistic features of personality are only indirectly reflected in speaking or writing (a hypothesis underlying much work on detection of personality and other features in text, including Oberlander & Nowson, 2006; Argamon et al., 2007; Schwartz et al., 2013; Youyou et al., 2015). Mairesse and Walker’s personage system, originally based on rules derived from an exhaustive review of psychological literature (Mairesse & Walker, 2010), was developed in the restaurant domain. The subsequent, data-driven version of the system (Mairesse & Walker, 2011) takes as input a pragmatic goal and, like the system of Paiva and Evans (2005), a list of real-valued style parameters, this time representing scores on the five personality traits. The system estimates generation parameters for stylistic features based on the input traits, using machine-learned models acquired from a dataset pairing sample utterances with human personality judgements. For example, an utterance reflecting high extraversion might be more verbose and involve more use of expletives (21), compared to a more introverted style, which might demonstrate more uncertainty, for example through the use of stammering and hedging (22). (21) Kin Khao and Tossed are bloody outstanding. Kin Khao just has rude staff. Tossed features sort of unmannered waiters, even if the food is somewhat quite adequate. 52 (22) Err... I am not really sure. Tossed offers kind of decent food. Mmhm... However, Kin Khao, which has quite ad-ad-adequate food, is a thai place. You would probably enjoy these restaurants. An interesting outcome of the evaluation with human subjects reported by Mairesse and Walker (2011) is that readers vary significantly in their judgements of what personality is actually reflected by a given text. This suggests that the relationship between such psychological features and their linguistic effects is far from straightforward. Walker et al. (2011b) compared the ‘Big 5’ model incorporated in the rule-based version of personage, to a corpus-based model drawn from character utterances in film scripts. These models were used to generate utterances for characters in an augmented reality game; their main finding was that modelling characters’ style directly using corpora of utterances results in more specific and easily perceived traits than using a model based on personality traits, where the relationship between personality and individual style is more indirect. In another set of experiments on generating utterances for characters in a role-playing game, Walker et al. (2011a) report the successful porting of personage to the new domain by tuning some of its parameters on features identified in film dialogue. Models learned from film corpora were found to be close in style to the characters they were actually based on. 5.2 Generating with Feeling: Affect and Politeness Personality is usually thought of in terms of traits, which are relatively stable across time. However, language use may vary not only across individuals, as a function of their stable characteristics, but also within individuals across time, as a function of their more transient affective states. ‘Affective nlg’ (a term due to De Rosis & Grasso, 2000) is concerned with variation that reflects emotional states which, unlike personality traits, are relatively transient. In this case, the goals can be twofold: (i) to induce an emotional state in the receiver; or (ii) to reflect the emotional state of the producer. As in the case of personality, the relationship between emotion and language is far from clear, as noted by Belz (2003). For one thing, it isn’t clear whether only surface linguistic choices need be affected. Some authors have argued that a text’s affective impact impinges on content selection; this stance has been adopted, for example, in some applications in e-health where reporting of health-related issues should be sensitive to their potential emotional impact (DiMarco et al., 2007; Mahamood & Reiter, 2011). Most work on affective nlg has however focussed on tactical choices (e.g. Hovy, 1988; Fleischman & Hovy, 2002; Strong et al., 2007; van Deemter et al., 2008; Keshtkar & Inkpen, 2011). Various linguistic features that can have emotional impact have been identified, from the increased use of redundancy to enhance understanding of emotionally laden messages (Walker, 1992; De Rosis & Grasso, 2000), to the increased use of first-person pronouns and adverbs, as well as sentence ordering to achieve emphasis or reduce adverse emotional impact (De Rosis & Grasso, 2000). 53 This research on affective nlg relies on models of emotion of various degrees of complexity and cognitive plausibility. The common trend underlying all these approaches however is that emotional states should impact lexical, syntactic and other linguistic choices. The question then is to what extent such choices are actually perceived by readers or users of a system. In an empirical study, van der Sluis and Mellish (2010) reported on two experiments investigating the effect of various tactical decisions on the emotional impact of text on readers. In one experiment, texts gave a (fake) report to participants on their performance on an aptitude test, with manually induced variations, such as these: (23) Positive slant: On top of this you also outperformed most people in your age group with your exceptional scores for Imagination and Creativity (7.9 vs 7.2) and Logical- Mathematical Intelligence (7.1 vs. 6.5). (24) Neutral/factual slant: You did better than most people in your age group with your scores for Imagination and Creativity (7.9 vs 7.2) and Logical-Mathematical Intelligence (7.1 vs. 6.5). Evaluation of these texts showed that the extent to which affective tactical decisions influence hearer’s emotional states is dependent on a host of other factors, including the degree to which the reader is directly implicated in what the text says (in the case of an aptitude test, the reader would be assumed to feel the outcomes have personal relevance). An important question raised by this study is how affect should be measured: van der Sluis and Mellish (2010) used a standardised self-rating questionnaire to estimate changes in affect before and after reading a text, but the best way to measure emotion remains an open question. The emotional slant in the language used by an author or speaker may have implications for the degree to which the listener or reader may feel ‘impinged upon’. This becomes particularly relevant in interactive systems, where nlg components are generating language in the context of dialogue. Consider, for example, the difference between these requests: (25) Direct strategy: Chop the tomatoes! (26) Approval strategy: Would it be possible for you to chop the tomatoes? (27) Autonomy strategy: Could you possibly chop the tomatoes? (28) Indirect strategy: The tomatoes aren’t chopped yet. The four strategies exemplified above come across as having varying degrees of politeness which, according to one influential account (Brown & Levinson, 1987), depends on face. Positive face reflects the speaker’s desire that some of her goals be shared with her interlocutors; negative face refers to the speaker’s desire not to have her goals impinged upon by others. The connection with affect that we suggested above hinges on these distinctions: different degrees of 54 politeness reflect different degrees of ‘threat’ to the listener; hence, generating language based on the right face strategy could be seen as a branch of affective nlg. In an early, influential proposal, Walker et al. (1997) proposed an interpretation of the framework of Brown and Levinson (1987) in terms of the four dialogue strategies exemplified in (25 – 28) above. Subsequently, Moore et al. (2004) used this framework in the generation of tutorial feedback, where a discourse planner used a Bayesian network to inform linguistic choices compatible with the target politeness/affect value in a given context (see Johnson et al., 2004, for a related approach). Gupta et al. (2007) also used the four dialogue strategies identified by Walker et al. (1997) in the polly system, which used strips-based planning to generate a plan distributed among two agents in a collaborative task (see also Gupta et al., 2008). An interesting finding in their evaluation is that perception of facethreat depends on the speech act; for example, requests can be more threatening. Gupta et al. (2007) also note possible cultural differences in perception of face threat (in this case, between uk and Indian participants). 5.3 Stylistic Control as a Challenge for Neural nlg In the past few years, stylistic – and especially affective – nlg has witnessed renewed interest by researchers working on neural approaches to generation. The trends that can be observed here mirror those outlined in our general overview of deep learning approaches (Section 3.3.5). A number of models focus on response generation (in the context of dialogue, or social media exchanges), where the task is to generate a response, given an utterance. Thus, these models fit well within the seq2seq or Encoder-Decoder framework (see Section 3.3.5 for discussion). Often, these models exploit social media data, especially from Twitter, a trend which goes back at least to Ritter et al. (2011), who adapted a Phrase-Based Machine Translation model to response generation. For example Li et al. (2016) proposed a persona-based model in which the decoder lstm is conditioned on embeddings obtained from tweets pertaining to individual speakers/authors. An alternative model conditions on both speaker and addressee profiles, with a view to incorporating not only the ‘persona’ of the generator, but its variability with respect to different interlocutors. Herzig et al. (2017), also working on Twitter data, condition their decoder on personality features extracted from tweets based on the ‘Big Five’ model, rather than on speaker-specific embeddings. This has the advantage of not enabling the generator to be tuned to specific personality settings, without re-training to adapt to a particular speaker style. While their personality-based model does not beat Li et al.’s model, a human evaluation showed that judges were able to identify high-trait responses as more expressive than low-trait responses, suggesting that the conditioning was having a noticeable impact on style. In a dialogue context, Asghar et al. (2017) proposed to achieve affective responses on three levels: (a) by augmenting word embeddings with data from an affective dictionary; (b) by decoding with an affect-sensitive beam search; 55 and (c) by training with an affect-sensitive loss function. On the other hand, a number of models condition an lstm on attributes reflecting affective or personality traits, with a view to generating strings that express such traits. Ghosh et al. (2017) used lstms trained on speech corpora conditioned on affect category and emotional intensity to drive lexical choice. Hu et al. (2017) used variational auto-encoders and attribute discriminators, to control the stylistic parameters of generated texts individually. They experimented on controlling sentiment and tense, but restricted the generation to sentences of up to 16 words. By contrast, Ficler and Goldberg (2017) extend the range of parameters used to condition the lstm, with two content-related attributes (sentiment and theme) and four stylistic parameters (length, whether the text is descriptive, whether it has a personal voice, and whether the style is professional). Their generator is trained on a corpus of movie reviews. Similarly, Dong et al. (2017) propose an attribute-to-sequence model for product review generation based on a corpus of Amazon user reviews (see also Lipton et al., 2016; Tang et al., 2016, for neural models for product review generation). The conditioning includes the reviewer id, reminiscent of the persona-based response model of Li et al. (2016); however, they also include the rating, which functions to modulate the affect in the output. Their model incorporates an attentional mechanism to concentrate on different parts of the input encoding when predicting the next word during decoding. For example, for a specific reviewer and a specific product, changing the input rating from 1 to 5 yields the following difference: (29) (Rating: 1) im sorry to say this was a very boring book. i didnt finish it. im not a new fan of the series, but this was a disappointment (30) (Rating: 5) this was a very good book. i enjoyed the characters and the story line. im looking forward to reading more in this series. 5.4 Style and Affect: Concluding Remarks Controlling stylistic, affective and personality-based variation in nlg is still in a rather fledgling state, with several open questions of both theoretical and computational import. Among these is the question of how best to model complex, multi-dimensional constructs such as personality or emotion; this question speaks both to the cognitive plausibility of the models informing linguistic choices, and to the practical viability of different machine learning strategies that could be leveraged for the task (for example, linear, additive models versus more ‘global’ models of personality or style). Also important here is the kind of data used to inform generation strategies: as we have seen above, a lot of affective nlg work relies on ratings by human judges. However, some recent work in affective computing has questioned the use of ratings, comparing them to ranking-based and physiological methods (e.g. Martinez et al., 2014; Yannakakis & Martı́nez, 2015). This and similar research is probably of high relevance to nlg researchers. Some recent work relied on automatic extraction 56 of personality features using tools such as ibm’s Personality Insights (Herzig et al., 2017). As such tools (another example of which is Lingustic Inquiry and Wordcount or liwc, Pennebaker et al., 2007) become more reliable and widely available, we may see a turn towards less reliance on human elicitation. A second important question is which linguistic choices truly convey the intended variation to the reader or listener. While current systems use a range of devices, from aggregation strategies to lexical choice, it is not clear which ones are actually perceived as having the desired effect. A third important research avenue, which is especially relevant to interactive systems, is adaptivity, that is, the way speakers (or systems) alter their linguistic choices as a result of their interlocutors’ utterances (Clark, 1996; Niederhoffer & Pennebaker, 2002; Pickering & Garrod, 2004), a theme that has also begun to be explored in nlg (Isard et al., 2006; Herzig et al., 2017). 6 Generating Creative and Entertaining Text ‘Good’ writers not only present their ideas in coherent and well-structured prose. They also succeed in keeping the attention of the reader through narrative techniques, and in occasionally surprising the reader, for example, through creative language use such as small jokes or well-placed metaphors (see e.g., among many others, Flower & Hayes, 1981; Nauman et al., 2011; Veale & Li, 2015). The nlg techniques and applications discussed so far in this survey arguably do not simulate good writers in this sense, and as a result automatically generated texts can be perceived as somewhat boring and repetitive. This lack of attention to creative aspects of language production within nlg is not due to a general lack of scholarly interest in these phenomena. Indeed, computational research into creativity has a long tradition, with roots that go back to the early days of ai (as Gervás, 2013, notes, the first story generation algorithm on record, Novel Writer, was developed by Sheldon Klein in 1973). However, it is fair to say that, so far, there has been little interaction between researchers from the computational creativity and nlg communities respectively, even though both groups in our opinion could learn a lot from each other. In particular, nlg researchers stand to benefit from insights into what constitutes creative language production, as well as structural features of narrative that have the potential to improve nlg output even in data-to-text systems (see Reiter et al., 2008, for an argument to this effect in relation to a medical text generation system). At the same time, researchers in computational creativity could also benefit from the insights provided by the nlg community where the generation of fluent language is concerned since, as we shall see, a lot of the focus in this research, especially where narrative is concerned, is on the generation of plans and on content determination. In what follows, we give an overview of automatic approaches to creative language production, starting from relatively simple jokes and metaphors to more advanced forms, such as narratives. 57 6.1 Generating Puns and Jokes Consider: (31) What’s the difference between money and a bottom? One you spare and bank, the other you bare and spank. (32) What do you call a weird market? A bizarre bazaar. These two (pretty good!) punning riddles were automatically generated by the jape system developed by Binsted and Ritchie (1994, 1997). Punning riddles form a specific joke genre and have received considerable attention in the context of computational humor, presumably because they are relatively straightforward to define, often relying on spelling or word sense ambiguities. Many good, human-produced examples have been collected in joke books and sites and may thus act as a source of inspiration or training data. Simplifying somewhat, jape (Joke Analysis and Production Engine) relies on a template-based nlg system, combining fixed text (What’s the difference between X and Y? or What do you call X?) with slots, which are the source of the riddle. Various standard lexical resources are used for joke production, including a British pronunciation dictionary (to find different words with a similar pronunciation, such as ‘bizarre’ and ‘bazaar’) and WordNet (Miller, 1995, to find words with a similar meaning, such as bazaar and market). jape uses various techniques to create the punning riddles, such as juxtaposition, in which related words are simply placed next to each other and treated as a normal construction, while making sure that the combination is novel (i.e., not in the jape database already). It is interesting to observe that in this way jape may automatically come up with existing jokes (a quick Google search reveals that many bizarre bazaars, as well as bazaar bizarres, exist). Following the seminal work of Binsted and Ritchie, various other systems have been developed which can automatically generate jokes, including for example the hahacronym system of Stock and Strapparava (2005), which produces humorous acronyms, and the system of Binsted et al. (2003), which focusses on the generation of referential jokes (“It was so cold, I saw a lawyer with his hands in his own pockets.”). Petrovic and Matthews (2013) offer an interesting, unsupervised alternative to this earlier work, which does not require labelled examples or hard-coded rules . Like their predecessors, Petrovic and Matthews also start from a template – in their case I like my X like I like my Y, Z – where X and Y are nouns (e.g., coffee and war) and Z is an attribute (e.g., cold). Clearly, linguistic realisation is not an issue, but content selection – finding ‘funny’ triples X, Y and Z – is a challenge. Interestingly, the authors postulate a number of guiding principles for ‘good’ triples. In particular, they hypothesize that (a) the joke is funnier if the attribute Z can be used to describe both nouns X and Y ; (b) the joke is funnier if attribute Z is both common and ambiguous;and (c) the joke is funnier the more dissimilar X and Y are. These three statements can be quantified relying 58 on standard resources such as Wordnet and the Google n-gram corpus (Brants & Franz, 2006), and using these measures their system outputs, for example: (33) I like my relationships like I like my source, open. It is probably fair to say that computational joke generation research to date has mostly focussed on laying bare the basic structure of certain relatively simple puns and exploiting these to good effect (e.g., Ritchie, 2009). However, many other kinds of jokes exist, often requiring sophisticated, hypothetical reasoning. Presumably, many of the central problems within ai need to be solved first before generation systems will be capable of producing these kinds of advanced jokes. 6.2 Generating Metaphors and Similes Whether you think something is funny or not may be subjective, but in any case insights from joke generation can be useful as a stepping stone towards a better understanding of creative language use, including metaphor, simile and analogy. In all of these, a mapping is made between two conceptual domains, in such a way that terminology from the source domain is used to say something about the target domain, typically in a nonliteral fashion, which can be helpful in computer-generated texts to illustrate complex information. For example, Hervás et al. (2006) study analogies in narrative contexts, such as Luke Skywalker was the King Arthur of the Jedi Knights, which immediately clarifies an important aspect of Luke Skywalker for those not in the know. In a simile, the two domains are compared (A ‘is like’ B); in a metaphor they are equated. Jokes and metaphors/similes are related: the automatically generated jokes of Petrovic and Matthews are comparable to similes, while Kiddon and Brun (2011), for example, frame the problem of identifying double entendre jokes as a type of metaphor identification. Nevertheless, one could argue that generating jokes is more complex because of the extra funniness constraint. Like computational humor, the automatic recognition and interpretation of metaphorical, non-literal language has received considerable attention since the early days of ai (see Shutova et al., 2012, for an overview). Martin (1990, 1994), for example, focussed on the recognition of metaphor in the context of Unix Support, as in the following examples: (34) How can I kill a process? (35) How can I enter lisp? The first one, for example, makes a mapping between ‘life’ (source) and ‘processes’ (target), and is by now so common that is almost a dead metaphor, but this was not the case in the early days of Unix. Clearly, understanding of the metaphors is a prerequisite for automatically answering these questions. Early research on the computational interpretation of metaphor already recognised that metaphors rely on semantic conventions that are exploited (‘broken’) to 59 express new meanings. A system for metaphor understanding, as well as one for metaphor generation, therefore requires knowledge about what literal meanings are, and how these can be stretched or translated into metaphoric meanings (e.g., Wilks, 1978; Fass, 1991). Recent work by Veale and Hao (2007, 2008) has shown that this kind of knowledge can be acquired from the web, and used for the generation of new metaphors and similes (comparisons). Their system, called Sardonicus, is capable of generating metaphors for user-provided targets (t), such as the following, expressing that Paris Hilton (“the person, not the hotel, though the distinction is lost on Sardonicus”, Veale & Hao, 2007, p. 1474) is skinny: (36) Paris Hilton is a stick Sardonicus searches the web for nouns (n) that are associated with skinniness, which are included in a case-base and range from pole, pencil, and stick to snake and stick insect. Inappropriate ones (like cadaver) are ruled out, based on the theory of category-inclusion of Glucksberg (2001). This list of potential similes is then used to create Google queries, inspired by the work of Hearst (1992), of the form n-like t (e.g., stick insect-like Paris Hilton, which actually occurs on the web), giving a ranking of the potential similes to be generated. A comparable technique is used by Veale (2013) to generate metaphors with an affective component, as in ‘Steve Jobs was a great leader, but he could be such a tyrant’. The Google n-gram corpus is used to find stereotypes suitable for simile generation (e.g., ‘lonesome as a cowboy’), a strategy reminiscent of the use of web-scale n−gram data to smooth the output of image-to-text systems (see Section4). Next, an affective dimension is added, based on the assumption that properties occurring in a conjunction (‘as lush and green as a jungle’) are more likely to have the same affect than properties that do not. Using positive (e.g., ‘happy’, ‘wonderful’) and negative (e.g., ‘sad’, ‘evil’) seeds, coordination queries (e.g., ‘happy and X’) are used to collect positive and negative labels for stereotypes, indicating, for instance, that babies are positively associated with qualities such as ‘smiling’ and ‘cute’, and negatively associated with ‘crying’ and ‘sniveling’. This enables the automatic generation of positive (‘cute as a baby’) and negative (‘crying like a baby’) similes. Veale even points out that by collecting, for example, a number of negative metaphors for Microsoft being a monopoly, and using these in a set of predefined tropes, it becomes possible to automatically generate a poem such as the following: No Monopoly Is More Ruthless Intimidate me with your imposing hegemony No crime family is more badly organized, or controls more ruthlessly Haunt me with your centralized organization Let your privileged security support me O Microsoft, you oppress me with your corrupt reign In fact, automatic generation of poetry is an emerging area at the crossroads of computational creativity and natural language generation (see for example 60 Lutz, 1959; Gervás, 2001; Wong et al., 2008; Netzer et al., 2009; Greene et al., 2010; Colton et al., 2012; Manurung et al., 2012; Zhang & Lapata, 2014, for variations on this theme). See the recent review by Goncalo Oliveira (2017). 6.3 Generating Narratives Computational narratology is concerned with computational models for the generation and interpretation of narrative texts (e.g., Gervás, 2009; Mani, 2010, 2013). The starting point for many approaches to narrative generation is a view of narrative coming from classical narratology, a branch of literary studies with roots in the Formalist and Structuralist traditions (e.g., Propp, 1968; Genette, 1980; Bal, 2009). This field has been concerned with analysing both the defining characteristics of narrative, such as plot or character, and more subtle features, such as the handling of time and temporal shifts, focalisation (that is, the ability to convey to the reader that a story is being recounted from a specific point of view), and the interaction of multiple narrative threads, in the form of sub-plots, parallel narratives, etc. An important recent development is the interest, on the part of narratologists, in bringing to bear insights from Cognitive Science and ai on their literary work, making this field ripe for multi-disciplinary interaction (see especially Herman, 1997, 2007; Meister, 2003, for programmatic statements to this effect, as well as theoretical contributions). Classical narratology makes a fundamental distinction between the ‘story world’ and the text that narrates the story. In line with the formalist and structuralist roots of this tradition, the distinction is usually articulated as a dichotomy between fabula (or story) and suzjet (or discourse). There is a parallel between this distinction and that between a text plan in nlg, versus the actual text which articulates that plan. However, the crucial difference is that in producing a plan for a narrative, a story generation system typically does not use input data of the sort required by most of the nlg systems reviewed thus far, since the story is usually fictional. On the other hand, narratological tools have also been successfully applied to real-world narratives, including oral narratives of personal experience (e.g., Herman, 2001; Labov, 2010). The focus of most work on narrative generation has been on the pre-linguistic stage, that is, on generating plans within a story world for fictional narratives, usually within a specific genre whose structural properties are well-understood, for example, fairy tales or Arthurian legends (see Gervás, 2013, for a review). There are however links between the techniques used for such stories and those we have discussed above in relation to nlg (see especially Section 3.2). Prominent among these are planning and reasoning techniques to model the creative process as a problem-solving task. For example, minstrel (Turner, 1992) uses reasoning to model creativity from the author’s perspective, producing narrative plans based on authorial goals, such as the goal of introducing drama into a narrative, while ensuring thematic consistency. More recently, brutus (Bringsjord & Ferrucci, 1999) used a knowledge base of story schemas, from which one is selected and elaborated using planning techniques to link causes and effects (see also Young, 2008; Riedl & Young, 61 2010, among others, for recent examples of the use of planning techniques to model the creative process in narrative generation). John Bear is somewhat hungry. John Bear wants to get some berries. John Bear wants to get near the blueberries. John Bear walks from a cave entrance to the bush by going through a pass through a valley through a meadow. John Bear takes the blueberries. John Bear eats the blueberries. The blueberries are gone. John Bear is not very hungry. Once upon a time a woodman and his wife lived in a pretty cottage on the borders of a great forest. They had one little daughter, a sweet child, who was a favorite with every one. She was the joy of her mother’s heart. To please her, the good woman made her a little scarlet cloak and hood. She looked so pretty in it that everybody called her Little Red Riding Hood. (a) Excerpt from TaleSpin (b) Excerpt from storybook Figure 7: Examples of automatically generated narratives. The left panel shows an excerpt from a story produced by TaleSpin (Meehan, 1977); the right panel is an excerpt from the Little Red Riding Hood fairy-tale, generated by the storybook system (Callaway & Lester, 2002). As Gervás (2010) notes, the focus on planning story worlds and modelling creativity has often implied a sidelining of linguistic issues, so that rendering a story plan into text has often been viewed as a secondary consideration. For example Figure 7a shows an excerpt of a story produced by the talespin system (Meehan, 1977): here, the emphasis is on using problem-solving techniques to produce a narrative in which events follow from each other in a coherent fashion, rather than on telling it in a fluent way. An important exception to this trend is the work of Callaway and Lester (2002), who explicitly addressed the gap between computational narratology and nlg. Their system took a narrative plan as a starting point, but focussed on the process of rendering the narrative in fluent English, handling time shifts, aggregation, anaphoric nps and many other linguistic phenomena, as the excerpt in Figure 7b shows. It is worth noting that this system has since been re-used in the context of generating interactive text for a portable museum guide by Stock et al. (2007). In addition, there have been a number of contributions from the generation community on more specific issues related to narrative, such as how to convey the temporal flow of narrative discourse (Oberlander & Lascarides, 1992; Dorr & Gaasterland, 1995; Elson & McKeown, 2010). This is a problem that deserves more attention in nlg, since texts with a complex narrative structure often narrate events in a different order from which they occurred. For example, a narrative or narrative-like text may recount events in order of importance rather than in temporal order, even when they are grounded in real-world data (e.g. Portet et al., 2009). This makes the use of the right choices for tense, aspect 62 and temporal adverbials crucial to ensure clarity for the reader. This type of complexity in narrative structure also emerges in interactive narrative fiction (for example, in games; cf., Montfort, 2007). Beyond the focus on specific linguistic issues, there has also been some work that leverages data-driven techniques to generate stories. For example, McIntyre and Lapata (2009) propose a story generation system whose input is a database of entities and their interactions, extracted from a corpus of stories by parsing them, retrieving grammatical dependencies, and building chains of events in which specific entities play a role. The outcome is a graph encoding a partial order of events, with edges weighted by mutual information to reflect the degree of association between nodes. Sentence planning then takes place using template-like grammar rules specifying verbs with subcategorisation information, followed by realisation using realpro (Lavoie & Rambow, 1997). One of the most interesting features of this work is the coupling of the generation model with an interest model to predict which stories would actually be rated as interesting by readers. This was achieved by training a kernel-based classifier on shallow lexical and syntactic features of stories, a novel take on an old problem in narratology, namely, what makes a story ‘tellable’, thereby distinguishing it from a mere report (e.g., Herman, 1997; Norrick, 2005; Bruner, 2011). Most story generation work is restricted to (very) short stories. It is certainly true that planning a book-length narrative along the lines sketched above is extremely challenging, but researchers have recently started exploring the possibilities, for instance in the context of NaNoGenMon (National Novel Generation Month), in which participants write a computer program capable of generating a ’novel’. Perhaps the best known example is World Clock (Montfort, 2013) which describes 1440 (24 × 60) events taking place around the world, one randomly selected minute at a time. These are the first two: It is now exactly 05:00 in Samarkand. In some ramshackle dwelling a person who is called Gang, who is on the small side, reads an entirely made-up word on a box of breakfast cereal. He turns entirely around. It is now right about 18:01 in Matamoros. In some dim yet decent structure a man named Tao, who is no larger or smaller than one would expect, reads a tiny numeric code from a recipe clipping. He smiles a tiny smile. The book was fully generated by 165 lines of Python code, written by the author in a few hours, and later published (together with the software) by Harvard Book Store press. There is even a Polish translation (by Piotr Marecki), created by translating the terms and phrases used in the Python implementation of the original algorithm. 6.4 Generating Creative Language: Concluding Remarks In this section we have highlighted recent developments in the broad area of creative language generation, a topic which is rather understudied in nlg. Nev63 ertheless, we would like to argue that nlg researchers can improve the quality of their output by taking insights from computational creativity on board. Work that exploits corpora and other lexical resources for the automatic generation of jokes, puns, metaphors and similes has revealed different ways in which words are related and can be juxtaposed to form unexpected and possibly even ‘funny’ or ‘poetic’ combinations. Given that, for example, metaphor is pervasive in everyday language (as argued, for example, by Lakoff & Johnson, 1980), not just in overtly creative uses, nlg researchers interested in enhancing the readability – and especially the variability – of the text-generating capability of their models would benefit from a closer look at work in poetry, joke and metaphor generation. In a similar vein, work on narratology is rich in insights on the interaction of multiple threads in a single narrative, and how the choice of events and their ordering can give rise to interesting stories (e.g., Gervás, 2012). These insights are valuable, for example, in the development of more elaborate text planners in domains where time and causality play a role. Similarly, narratological work on character and focalisation can also help in the development of better nlg techniques to vary output according to specific points of view, an area that we touched on in Section 5, We have deferred discussion of evaluation of creative nlg to Section 7, which deals with evaluation in general. Anticipating some of that discussion, it is worth noting that evaluation of creative language generation remains something of a bottleneck. In part, this is because it is not always easy to determine the ‘right’ question to ask in an evaluation of creative text. For instance, in the case of joke and poetry generators, demonstrating genre compatibility and recognition (‘Is this a joke?’) is arguably already an achievement, insofar as it suggests that a system is producing artefacts that conform to normative expectations (this is discussed further in Section 7.1.3 below). In other types of creative language generation, evaluation is more challenging because it is difficult to carry out without ensuring quality at all levels of the generation process, from planning to realisation. In the case of narrative generation, for example, if the emphasis is placed entirely on story planning, the perceived quality of the narrative will be compromised if story plans are rendered using a an excessively simple realisation strategy (as is the case in Figure 7a). This is an area where the consensus in the field is that much further research effort is required (see Zhu, 2012, for a recent argument to this effect). It is also an area in which nlg can potentially offer much to computational creativity researchers, including in the use of techniques to render text fluently and consistently, facilitating the evaluation of generated artefacts with human subjects. 7 Evaluation Though we have touched on the subject of evaluation at various points, it deserves a full discussion as a topic which has become a central methodological concern in nlg. A factor that contributed to this development was the estab64 lishment of a number of nlg shared tasks, launched in the wake of an nsffunded workshop held in Virginia in 2007 (Dale & White, 2007). These tasks have focussed on referring expression generation (Belz et al., 2010; Gatt & Belz, 2010); surface realisation (Belz et al., 2011); generation of instructions in virtual environments (Striegnitz et al., 2011; Janarthanam & Lemon, 2011); content determination (Bouayad-Agha et al., 2013; Banik et al., 2013); and question generation (Rus et al., 2011). Recent proposals for new challenges extend these to narrative generation (Concepción et al., 2016), generation from structured web data (Colin et al., 2016), and from pairs of meaning representations and text (Novikova & Rieser, 2016a; May & Priyadarshi, 2017). In image captioning, shared tasks have helped the development of large-scale datasets and evaluation servers such as ms-coco8 (cf. Section 4.1). In general, however, nlg evaluation is marked by a great deal of variety and it is difficult to compare systems directly. There are at least two reasons why this is the case. Variable input There is no single, agreed-upon input format for nlg systems (McDonald, 1993; Mellish & Dale, 1998; Evans et al., 2002). Typically, one can only compare systems against a common benchmark if the input is similar. Examples are the image-captioning systems described in Section 4, or systems submitted to one of the shared tasks mentioned above. Even in case a common ‘standard’ dataset is available for evaluation, comparison may not be straightforward due to input variation, or due to implicit biases in the input data. For example, Rajkumar and White (2014) observe that, despite many realisers being evaluated against the Penn Treebank, they make different assumptions about the input format, including how detailed the pre-syntactic input representation is, a problem also observed in the first Surface Realisation shared task (Belz et al., 2011). As Rajkumar and White (2014) note, a comparison of realisers on the basis of scores on the Penn Treebank shows that the highest-ranking is the fuf/surge realiser (which is second in terms of coverage), based on experiments by Callaway (2005). However, these experiments required painstaking effort to extract the input representations at the level of detail needed by fuf/surge; other realisers support more underspecified input. In a related vein, image captioning evaluation studies have shown that many datasets contain a higher proportion of nouns than verbs, and few abstract concepts (Ferraro et al., 2015), making systems that generate descriptions emphasising objects more likely to score better. The relevance of this observation is shown by Elliott and De Vries (2015), who note that the ranking of their image captioning system based on visual dependency grammar depends in part on the data it is evaluated on, with better performance on data containing more images depicting actions (we return to this study below). Multiple possible outputs Even for a single piece of input and a single system, the range of possible outputs is open-ended, a problem that arguably 8 http://mscoco.org/dataset/#captions-upload 65 holds for any nlp task involving textual output, including machine translation and summarisation. Corpora often display a substantial range of variation and it is often unclear, without an independent assessment, which outputs are to be preferred (Reiter & Sripada, 2002). In the image captioning literature, authors who have framed the problem in terms of retrieval have motivated the choice in part based on this problem, arguing that ‘since there is no consensus on what constitutes a good image description, independently obtained human assessments of different caption generation systems should not be compared directly’ (Hodosh et al., 2013, p. 580). While capturing variation may itself be a goal (e.g., Belz, 2008; Viethen & Dale, 2010; Hervás et al., 2013; Castro Ferreira et al., 2016), as we also saw in our discussion of style in Section 5, this is not always the case. Thus, in a user-oriented evaluation, the SumTimemousam system weather forecasts were preferred by readers over those written by forecasters because the latter’s lexicalisation decisions were susceptible to apparently arbitrary variation (Reiter et al., 2005); similar outcomes were more recently reported for statistical nlg systems trained on the SumTime corpus (Belz, 2008; Angeli et al., 2010). Rather than give an exhaustive review of nlg evaluation – hardly a realistic prospect given the diversity we have pointed out – the rest of this section will highlight some topical issues in current work. By way of an overview of these issues, consider the hypothetical scenario sketched in Figure 8, which is loosely inspired by work on various weather-reporting systems developed in the field. This nlg system is embedded in the environment of an offshore oil-rig; the relevant features of the setup (in the sense of Sparck Jones & Galliers, 1996) are the system itself and its users, here a group of engineers. While the task of the system is to generate weather reports from numerical weather prediction data, its ultimate purpose is to facilitate users’ planning of drilling and maintenance operations. Figure 8 highlights some of the common questions addressed in nlg evaluation, together with a broad typology of the methods used to address them, in particular, whether they are objective – that is measurable against an external criterion, such as corpus similarity or experimentally obtained behavioural data – or subjective, requiring human judgements. A fundamental methodological distinction, due to Sparck Jones and Galliers (1996), is between intrinsic and extrinsic evaluation methods. In the case of nlg, an intrinsic evaluation measures the performance of a system without reference to other aspects of the setup, such as the system’s effectiveness in relation to its users. In our example scenario, questions related to text quality, correctness of output and readability qualify as intrinsic, whereas the question of whether the system actually achieves its goal in supporting adequate decisionmaking on the offshore platform is extrinsic. 7.1 Intrinsic Methods Intrinsic evaluation in nlg is dominated by two methodologies, one relying on human judgements (and hence subjective), the other on corpora. 66 Figure 8: Hypothetical evaluation scenario: a weather report generation system embedded in an offshore oil platform environment. Possible evaluation methods, focussing on different questions, are highlighted at the bottom, together with the typical methodological orientation (subjective/objective) adopted to address them. 7.1.1 Subjective (Human) Judgements Human judgements are typically elicited by exposing naive or expert subjects to system outputs and getting them to rate them on some criteria. Common criteria include: • Fluency or readability, that is, the linguistic quality of the text (e.g., Callaway & Lester, 2002; Mitchell et al., 2012; Stent et al., 2005; Lapata, 2006; Cahill, 2009; Espinosa et al., 2010, inter alia); • Accuracy, adequacy, relevance or correctness relative to the input, reflecting the system’s rendition of the content (e.g. Lester & Porter, 1997; Sripada et al., 2005; Hunter et al., 2012), a criterion often used in subjective evaluations of image-captioning systems as well (e.g. Kulkarni et al., 2011; Mitchell et al., 2012; Kuznetsova et al., 2012; Elliott & Keller, 2013). Though they are the most common, these two sets of criteria do not exhaust the possibilities. For example, subjective ratings have also been elicited for argument effectiveness in a system designed to generate persuasive text for prospective house buyers (Carenini & Moore, 2006). In image captioning, at least one system was evaluated by asking users to judge the creativity of the generated caption, with a view to assessing the contribution of web-scale ngram language models to the captioning quality (Li et al., 2011). Below, we 67 also discuss judgements of genre compatibility (Section 7.1.3). In the case of fictional narrative, some evaluations have elicited judgments on qualities such as novelty (e.g., Pérez et al., 2011) or believability of characters (e.g., Riedl & Young, 2005). The use of scales to elicit judgements raises a number of questions. One has to do with the nature of the scale itself. While discrete, ordinal scales are the dominant method, a continuous scale – for example, one involving a visually presented slider (Gatt & Belz, 2010; Belz & Kow, 2011) – might give subjects the possibility of giving more nuanced judgements. For example, a text generated by our hypothetical weather report system might be judged so disfluent as to be given the lowest rating on an ordinal scale; if the following text is judged as being worse, a subject would have no way of indicating this. A related question is whether subjects find it easier to compare items rather than judge each one in its own right. This question has begun to be addressed in the nlp evaluation literature, usually with binary comparisons, for example between the outputs of two mt systems (see Dras, 2015, for discussion). In a recent study evaluating causal connectives produced by an nlg system, Siddharthan and Katsos (2012) used Magnitude Estimation, whereby subjects are not given a predefined scale, but are asked to choose their own and proceed to make comparisons of each item to a ‘modulus’, which serves as a comparison point throughout the experiment (see Bard et al., 1996).9 Belz and Kow (2010) compared a preference-based paradigm to a standard rating scale to evaluate systems from two different domains (weather reporting and reg), and found that the former was more sensitive to differences between systems, and less susceptible to variance between subjects. An additional concern with subjective evaluations is inter-rater reliability. Multiple judgements by different evaluators may exhibit high variance, a problem that was encountered in the case of Question Generation (Rus et al., 2011). Recently, Godwin and Piwek (2016) suggested that such variance can be reduced by an iterative method whereby training of judges is followed by a period of discussion, leading to the updating of evaluation guidelines. This, however, is more costly in terms of time and resources. It is probably fair to state that, these days, subjective, human evaluations are often carried out via online platforms such as Amazon Mechanical Turk and CrowdFlower, though this is probably more feasible for widely-spoken languages such as English. A seldom-discussed issue with such platforms concerns their ethical implications (for example, they involve large groups of poorly paid individuals; see Fort et al., 2011) as well as the reliability of the data collected, though measures can be put in place to ensure, for instance, that contributors are fluent in the target language (see e.g., Goodman et al., 2013; Mason & Suri, 2012). 9 The modulus is an item – a text, or a sentence – which is selected in advance and which subjects are asked to rate first. All subsequent ratings or judgements are performed in comparison to this modus item. Though subjects are able to use any scale they choose, this method allows all judgements to be normalised by the judgement given for the modulus. Typically, normalised judgements are analysed on a logarithmic scale. 68 Metric bleu nist N-gram overlap rouge meteor gtm cider wmd String distance Edit distance ter terp terpa Content overlap Dice/Jaccard masi pyramid spice Description Precision score over variable-length n-grams, with a length penalty (Papineni et al., 2002) and, optionally, smoothing (Lin & Och, 2004). A version of bleu with higher weighting for less frequent n−grams and a different length penalty (Doddington, 2002). Recall-oriented score, with options for comparing noncontiguous n−grams and longest common subsequences (Lin & Hovy, 2003). Harmonic mean of unigram precision and recall, with options for handling (near-synonymy) and stemming (Lavie & Agarwal, 2007). General Text Matcher. F-Score based on precision and recall, with greater weight for contiguous matching spans (Turian et al., 2003) Cosine-based n-gram similarity score, with n-gram weighting using tf-idf (Vedantam et al., 2015). Word-Mover Distance, a similarity score between texts, based on the (semantic) distance between words in the texts (Kusner et al., 2015). For nlp, distance is operationalised using normalised bag of words (nbow) representations (Mikolov et al., 2013). Number of insertions, deletions, substitutions and, possibly, transposition required to transform the candidate into the reference string (Levenshtein, 1966). Translation edit rate, a version of edit distance (Snover et al., 2006). Version of ter handling phrasal substitution, stemming and synonymy (Snover et al., 2006). Version of ter optimised for correlations with adequacy judgements (Snover et al., 2006). Set-theoretic measures of overlap between two unordered sets (e.g. of predicates or other content units) Measure of agreement between set-valued items, a weighted version of Jaccard (Passonneau, 2006) Overlap measure relying on comparison of weighted Summarization Content Units (SCUs) (Nenkova & Passonneau, 2004; Yang et al., 2016) Measure of overlap between candidate and reference texts based on propositional content obtained by parsing the text into graphs representing objects and relations, by first parsing captions into scene graphs representing objects and relations (Anderson et al., 2016) Table 1: Intrinsic, corpus-based metrics based on string overlap, string distance, or content overlap. The last column indicates the nlp sub-discipline in which a metric originated, where applicable. Legend: mt = Machine translation; as = automatic summarisation; ic = image captioning; ds = document similarity. 69 Origins mt mt as mt mt ic ds; ic n/a mt mt mt n/a as as ic 7.1.2 Objective Humanlikeness Measures Using Corpora Intrinsic methods that rely on corpora can generally be said to be addressing the question of ‘humanlikeness’, that is, the extent to which the system’s output matches human output under comparable conditions. From the developer’s perspective, the selling point of such methods is their cheapness, since they are usually based on automatically computed metrics. A variety of corpusbased metrics, often used earlier in related fields such as Machine Translation or Summarisation, have been used in nlg evaluation. Some of the main ones are summarised in Table 1, which groups them according to their principal characteristics, and for each adds a key reference. Measures of n-gram overlap or string edit distance, usually originating in Machine Translation or Summarisation (with some exceptions, such as cider, Vedantam et al., 2015) are frequently used for evaluating surface realisation (e.g., White et al., 2007; Cahill & Van Genabith, 2006; Espinosa et al., 2010; Belz et al., 2011) and occasionally also to evaluate short texts characteristic of data-driven systems in domains such as weather reporting (e.g. Reiter & Belz, 2009; Konstas & Lapata, 2013) and image captioning (see Bernardi et al., 2016; Kilickaya et al., 2017). Edit distance metrics have been exploited for realisation (Espinosa et al., 2010), but also for reg (Gatt & Belz, 2010). The focus of these metrics is on the output text, rather than its fidelity to the input. In a limited number of cases, surface-oriented metrics have been used to evaluate the adequacy with which output text reflects content (Banik et al., 2013; Reiter & Belz, 2009). However, if content determination is the focus, a measure of surface overlap is at best a proxy, relying on an assumption of a straightforward correspondence between input and output. This assumption may be tenable if texts are brief and relatively predictable. In some cases, it has been possible to use metrics to measure content determination directly, based on semantically annotated corpora. For instance, reg algorithms have been evaluated in this fashion using set overlap metrics (Viethen & Dale, 2007; van Deemter et al., 2012a). Also relevant in this connection is the pyramid method (Nenkova & Passonneau, 2004) for summarisation, which relies on the identification of the content units (which maximally correspond to clauses) in multiple human summaries. These are weighted and ordered by their frequency of mention by human summarises. A candidate summary is scored according to the ratio between the weight of the content units it includes, compared to the weight of an ideal summary bearing the same number of content units (see Nenkova & McKeown, 2011, for discussion). Direct measurements of content overlap between generated and candidate outputs will likely increase, as automatic data-text alignment techniques make such ‘semantically transparent’ corpora more readily available for end-to-end nlg (see e.g., Chen & Mooney, 2008; Liang et al., 2009, and the discussion in Section 3.3). An important development away from pure surface overlap is the use of semantic resources (as in the case of meteor, Lavie & Agarwal, 2007), or word embeddings (as in wmd, Kusner et al., 2015), to compute the proximity of output to reference texts beyond literal string overlap. In a 70 comparative evaluation of metrics for image captioning, Kilickaya et al. (2017) found an advantage for wmd compared to other metrics. 7.1.3 Evaluating Genre Compatibility and Stylistic Effectiveness A slightly different question that has occasionally been posed in evaluation studies asks whether the linguistic artefact produced by a system is a recognisable instance of a particular genre or style. As noted in Section 5, it is difficult to ascertain to what extent readers actually perceive subtle stylistic variation. Thus, Mairesse and Walker (2011) found inconsistent perceptions of personality in the evaluation of personage, which was complicated by the fact that stylistic features interact and may cancel each other out. Genre perception is a central question for approaches to generating creative language (see Section 6). For example, Hardcastle and Scott (2008) describe an evaluation of a generation system for cryptic crossword clues based on a Turing test in which the objective was to determine whether the system’s outputs were recognisably different from human-authored clues. In a related vein, when evaluating the jape joke generation system, Binsted et al. (1997, see Section 6.1) presented 120 8-11 year old children with a number of punning riddles, some automatically generated by jape and some selected from joke books. They also included a number of non-joke controls, such as: (37) What do you get when you cross a horse and a donkey? A mule For each stimulus that they were exposed to, children were asked to indicate whether they thought it was a joke, and how funny they considered it. The results revealed that computer generated riddles were recognised as jokes, and considered funnier than non-jokes. Interestingly, the joke children rated highest was automatically generated by jape (we urge the reader to inspect the original paper), although in general, human-produced jokes were considered funnier by children than automatically generated ones. In this evaluation study, therefore, an extrinsic aspect of the generated text, concerning its efficacy (here, its ‘funniness’) was found to be correlated with its recognisability as an instance of the target genre. Petrovic and Matthews (2013) evaluated their unsupervised approach to joke generation by harvesting human-written jokes from Twitter, conforming to the I like my X . . . template used by their system. Blind ratings by human judges of human-written and automatically generated jokes showed that their bestperforming model was rated as funny in 16% of cases, compared to 33% of the human jokes (itself a relatively low rate). While the questions posed in these studies clearly have an intrinsic orientation (‘Is the text compatible with the expected genre conventions?’), they also have a bearing on extrinsic factors, since the ability to recognise an artefact as an instance of a genre or as exhibiting a certain style or personality is arguably one of the sources of its impact, which in turn includes judgments of whether a text is funny or interesting, for example. 71 Of course, the intention behind variation in style, personality or affect may well be to ultimately increase effectiveness in achieving some ulterior goal. Indeed, any nlg system intended to be embedded in a specific environment will need to address stylistic and genre-based issues. For example, our hypothetical weather report generator might use a very brief, technical style given its professional pool of target users (as was the case with SumTime Reiter et al., 2005); in contrast, weather reports intended for public consumption, such as those in the WeatherGov corpus, would probably be longer and less technical (Angeli et al., 2010). However, there is a difference between evaluating whether genre constraints or stylistic variation help contribute to a goal, and evaluating whether the text actually exhibits the desired variation. For example, Mairesse and Walker (2011) evaluated the personage system (see Section 5) by asking users to judge personality traits as reflected in generated dialogue fragments (rather than, say, measuring whether users were more likely to eat at a restaurant if this was recommended by a configuration of the system with a high degree of extraversion). This is similar in spirit to the question about jokehood asked by Binsted et al. (1997), in contrast to the more explicitly extrinsic evaluation of the standup joke generator by Waller et al. (2009), which asked whether the system actually helped users improve their interactions with peers. 7.2 Extrinsic Evaluation Methods In contrast to intrinsic methods, extrinsic evaluations measure effectiveness in achieving a desired goal. In the example scenario of Figure 8, such an evaluation might address the impact on planning by the engineers who are the target users of the system. Clearly, ‘effectiveness’ is dependent on the application domain and purpose of a system. Examples include: • persuasion and behaviour change, for example, through exposure to personalised smoking cessation letters (Reiter et al., 2003); • purchasing decision after presentation of arguments for and against options on the housing market based on a user model (Carenini & Moore, 2006); • engagement with ecological issues after reading blogs about migrating birds (Siddharthan et al., 2013); • decision support in a medical setting following the generation of patient reports (Portet et al., 2009; Hunter et al., 2012); • enhancing linguistic interaction among users with complex communication needs via the generation of personal narratives (Tintarev et al., 2016); • enhancing learning efficacy in tutorial dialogue (Di Eugenio et al., 2005; Fossati et al., 2015; Boyer et al., 2011; Lipschultz et al., 2011; Chi et al., 2014) 72 While questionnaire-based or self-report studies can be used to address extrinsic criteria (e.g., Hunter et al., 2012; Siddharthan et al., 2013; Carenini & Moore, 2006), in many cases evaluation relies on some objective measure of performance or achievement. This can be done with the target users in situ, enhancing the ecological validity of the study, but can also take the form of a task that models the scenarios for which the nlg system has been designed. Thus, in the give Challenge (Striegnitz et al., 2011), in which nlg systems generated instructions for a user to navigate through a virtual world, a largescale task-based evaluation was carried out by having users play the give game online, while various indices of success were logged, including the time it took a user to complete the game. reg algorithms whose goal was to generate identifying descriptions of objects in visual domains, were evaluated in part based on the time it took readers to identify a referent based on a generated description, as well as their error rate (Gatt & Belz, 2010). skillsum, a system to generate feedback reports from literacy assessments, was evaluated by measuring how user’s self-assessment of their own literacy skills improved after reading generated feedback, compared to control texts (Williams & Reiter, 2008). A potential drawback of extrinsic studies, in addition to time and expense, is a reliance on an adequate user base (which can be difficult to obtain when users have to be sampled from a specific population, such as the engineers in our hypothetical scenario in Figure 8) and the possibility of carrying out the study in a realistic setting. Such studies also raise significant design challenges, due to the need to control for intervening and confounding variables, comparing multiple versions of a system (e.g. in an ablative design; see Section 7.3 below), or comparing a system against a gold standard or baseline. For example, Carenini and Moore (2006) note that evaluating the effectiveness of arguments presented in text needs to take into account aspects of a user’s personality which may impact how receptive they are to arguments in the first place. An example of the trade-off between design and control issues and ecological validity is provided by the BabyTalk family of systems. A pilot system called bt-45 (Portet et al., 2009), which generated patient summaries from 45-minute spans of historical patient data, was evaluated in a task involving nurses and doctors, who chose from among a set of clinical actions to take based on the information given. These were then compared to ‘ground truth’ decisions by senior neonatal experts. This evaluation was carried out off-ward; hence, subjects took clinical decisions in an artificial environment without direct access to the patient. On the other hand, in the evaluation of bt-nurse, a successor to bt45 which summarised patient data collected over a twelve-hour shift (Hunter et al., 2012), the system was evaluated on-ward using live patient data, but ethical considerations precluded a task-based evaluation. For the same reasons, comparison to ‘gold standard’ human texts was also impossible. Hence, the evaluation elicited judgements, both on intrinsic criteria such as understandability and accuracy and on extrinsic criteria such as perceived clinical utility (see Siddharthan et al., 2013, for a similarly indirect extrinsic measure of impact, this time in an ecological setting). 73 7.3 Black Box Versus Glass Box Evaluation With the exception of evaluations of specific modules or algorithms, as in the case of reg or surface realisers, most of the evaluation studies discussed so far would be classified as ‘black box’ evaluations of ‘end-to-end’, or complete, nlg systems. In a ‘glass box’ evaluation, on the other hand, it is the contribution of individual components that is under scrutiny, ideally in a setup where versions of a system with and without a component are evaluated in the same manner. Note that the distinction between black box and glass box evaluation is orthogonal to the question of which methods are used. An excellent example of a glass-box evaluation is that by Callaway and Lester (2002), who used an ablative design, eliciting judgements of the quality of the output of their narrative generation system based on different configurations that omitted or included key components. In a related vein, Elliott and Keller (2013) compared image-to-text models that included fine-grained dependency representations of spatial as well as linguistic dependencies, to models with a coarser-grained image representation, finding an advantage for the former. However, exhaustive component-wise comparisons are sometimes difficult to make and may result in a combinatorial explosion of configurations, with a concomitant reduction in data points collected per configuration (assuming subjects are limited and need to be divided among different conditions) and a reduction in statistical power. Alternatives do exist in the literature. Reiter et al. (2003) elicited judgements on weather forecasts using human and machinegenerated texts, together with a ‘hybrid’ version where the content was selected by forecasters, but the language was automatically generated. This enabled a comparison of human and automatic content selection. Angeli et al. (2010) used corpus-based and subjective measures to assess linguistic quality, coupled with precision and recall-based measures to assess content determination of their statistical system against human-annotated texts. In bt-nurse (Hunter et al., 2012), nurses were prompted for free text comments (in addition to answering a questionnaire targeting extrinsic dimensions), which were then manually annotated and analysed to determine which elements of the system were potentially problematic. 7.4 On the Relationship Between Evaluation Methods To what extent are the plethora of methods surveyed – from extrinsic, taskoriented to intrinsic ones relying on automatic metrics or human judgements – actually related? It turns out that multiple evaluation methods seldom give converging verdicts on a system, or on the relative ranking of a set of systems under comparison. 7.4.1 Metrics Versus Human Judgements Although corpus-based metrics used in mt and summarisation are typically validated by demonstrating their correlation with human ratings, meta-evaluation 74 studies in these fields have suggested that the correspondence is somewhat weak (e.g., Dorr et al., 2004; Callison-Burch et al., 2006; Caporaso et al., 2008). Similarly, shared task evaluations on referring expression generation showed that corpus-based, judgement-based and experimental or task-based methods frequently do not correlate (Gatt & Belz, 2010). In their recent review Bernardi et al. (2016) note a similar issue in image captioning system evaluation. Thus, Kulkarni et al. (2013) found that their image description system did not outperform two earlier methods (Farhadi et al., 2010; Yang et al., 2011) on bleu scores; however, human judgements indicated the opposite trend, with readers preferring their system (similar observations are made by Kiros et al., 2014). Hodosh et al. (2013) compared the agreement (measured by Cohen’s κ) between human judgements and bleu or rouge scores for retrieved captions, finding that outputs were not ranked similarly by humans and metrics, unless the retrieved captions were identical to the reference captions. On occasion, the correlation between a metric and human judgements appears to differ across studies, suggesting that metric-based results are highly susceptible to variation due to generation algorithms and datasets. For instance, Konstas and Lapata (2013) (discussed in Section 3.3.4 above) find that on corpus-based metrics, the best-performing version of their model does not outperform that of Kim and Mooney (2010) on the robocup domain, or that of Angeli et al. (2010) on their weather corpus (weathergov), though it performs better than Angeli et al.’s on the noisier atis travel dataset. However, an evaluation of fluency and semantic correctness, based on human judgements, showed that the system outperformed, by a small margin, both Kim and Mooney’s and Angeli et al.’s on both measures in all domains with the exception of weathergov, where Angeli et al.’s system did marginally better. In a related vein, Elliott and De Vries (2015) compare their image captioning system, based on visual dependency relations, to the Bidirectional rnn developed by Karpathy and Fei-Fei (2015), on two different datasets. The two systems were close to each other on the vlt2k dataset, but not on Pascal1k, a result that the authors claim is due to vlt2k containing more pictures involving actions. As for the relationship between metrics and human judgements, Elliott and Keller (2013) concluded that meteor correlates better than bleu (see Elliott & Keller, 2014, for a systematic comparison of automatic metrics in this domain), a finding also confirmed in their later work (Elliott & De Vries, 2015), as well as in the ms-coco Evaluation Challenge, which found that meteor was more robust. However, work by Kuznetsova et al. (2014) showed variable results; their highest-scoring method as judged by humans, involving tree composition, was ranked higher by bleu than by meteor. In the ms-coco Evaluation Challenge, some systems outperformed a human-human upper bound when compared to reference texts using automatic metrics, but no system reached this level in an evaluation based on human judgements (see Bernardi et al., 2016, for further discussion). Some studies have explicitly addressed the relationship between methods as a research question in its own right. An important contribution in this direction is the study by Reiter and Belz (2009), which addressed the validity of 75 corpus-based metrics in relation to human judgements, within the domain of weather forecast generation (a similar study has recently been conducted on image captioning; see Elliott & Keller, 2014). In a first experiment, focussing on linguistic quality, the authors found a high correlation between expert and non-expert readers’ judgements, but the correlation between human judgements and the automatic metrics varied considerably (from 0.3 to 0.87), depending on the version of the metric used and whether the reference texts were included in the comparison by human judges. The second experiment evaluated both linguistic quality, by asking human judges to rate clarity/readability; and content determination, by eliciting judgements of accuracy/appropriateness (by comparing texts to the raw data). The automatic metrics correlated significantly with judgements of clarity, but far less with accuracy, suggesting that they were better at predicting the linguistic quality than correctness. Other studies have yielded similarly inconsistent results. In a study on paraphrase generation, Stent et al. (2005) found that automatic metrics correlated highly with judgements of adequacy (roughly akin to accuracy), but not fluency. By contrast, Espinosa et al. (2010) found that automatic metrics such as nist, meteor and gtm correlate moderately well with human fluency and adequacy judgements of English surface realisation quality, while Cahill (2009) reported only a weak correlation for German surface realisation. Wubben et al. (2012), comparing text simplification strategies, found low, but significant correlations between bleu and fluency judgements, and a very low, negative correlation between bleu and adequacy. These contrasting findings suggest that the relationship between metrics may depend on purpose and genre of the text under consideration; for example, Reiter and Belz (2009) used weather reports, while Wubben et al. (2012) used Wikipedia articles. Various factors can be adduced to explain the inconsistency of these metaevaluation studies: 1. Metrics such as bleu are sensitive to the length of the texts under comparison. With shorter texts, n-gram based metrics are likely to result in lower scores. 2. The type of overlap matters: for example, many evaluations in image captioning rely on bleu-1 (Elliott & Keller, 2013, 2014, was among the first to experiment with longer n-grams), but longer n-grams are harder to match, though they capture more syntactic information and are arguably better indicators of fluency. 3. Semantic variability is an important issue. Generated texts may be similar to reference texts, but differ on some near-synonyms, or subtle word order variations. As shown in Table 1, some metrics are designed to partially address these issues. 4. Many intrinsic corpus-based metrics are designed to compare against multiple reference texts, but this is not always possible in nlg. For example, while image captioning datasets typically contain multiple captions per 76 image (typically, around 5), this is not the case in other domains, like weather reporting or restaurant recommendations. The upshot is that nlg evaluations increasingly rely on multiple methods, a trend that is equally visible in other areas of nlp , such as mt (Callison-Burch et al., 2007, 2008). 7.4.2 Using Controlled Experiments A few studies have validated evaluation measures against experimental data. For example, Siddharthan and Katsos (2012) compared the outcomes of their magnitude estimation judgement study (see Section 7.1 above) to the results from a sentence recall task, finding that the results from the latter are largely consistent with judgements and concluding that they can substitute for taskbased evaluations to shed light on breakdowns in comprehension at sentence level. A handful of studies have also used behavioral experiments and compared ‘online’ processing measures, such as reading time of referring expressions, to corpus-based metrics (e.g. Belz et al., 2010). Correlations with automatic metrics are usually poor. A somewhat different use of reading times was made by Lapata (2006), who used them as an objective measure against which to validate Kendall’s τ as a metric for assessing information ordering in text (an aspect of text stucturing). In a recent study, Zarrießet al. (2015) compared generated texts to human-authored and ‘filler’ texts (which were manually manipulated to compromise their coherence). They found that reading-time measures were more useful to distinguish these classes of texts than offline measures based on elicited judgements of fluency and clarity. 7.5 Evaluation: Concluding Remarks Against the background of this section, three main conclusions can be drawn: 1. There is a widespread acceptance of the necessity of using multiple evaluation methods in nlg. While these are not always consistent among themselves, they are useful in shedding light on different aspects of quality, from fluency and clarity of output, to adequacy of semantic content and effectiveness in achieving communicative intentions. The choice of method has a direct impact on the way in which results can be interpreted. 2. Meta-evaluation studies have yielded conflicting results on the relationship between human judgements, behavioural measures and automatically computed metrics. The correlation among them varies depending on task and application domain. This is a subject of ongoing research, with plenty of studies focussing on the reliabilty of metrics and their relationship to other measures, especially human judgements. 3. A question that remains under-explored concerns the dimensions of quality that are themselves the object of inquiry. (In this connection, it is worth 77 noting that some kindred disciplines have sought to de-emphasise their role on the grounds that they are inconsistent; see Callison-Burch et al., 2008, among others). For example, what are people judging when they judge fluency or adequacy and how consistently do they do so? It is far from obvious whether these judgements should really be expected to correlate with other measures, given that the latter are producer-oriented, focussing on output, while judgements are themselves often receiver-oriented, focussing on how the output is read or processed (for a related argument, see Oberlander, 1998). Furthermore, while meta-linguistic judgements can be expected to reflect the impact of a text on its readers, there is nevertheless the possibility that behavioural, online methods designed to directly investigate aspects of processing would yield a different picture, a result that has been obtained in some psycholinguistic studies (e.g. Engelhardt et al., 2006). In conclusion, our principal recommendation to nlg practitioners, where evaluation is concerned, is to err in favour of diversity, by using multiple methods, as far as possible, and reporting not only their results, but also the correlation between them. Weak correlations need not imply that the results of a particular method are invalid. Rather, they may indicate that measures focus on different aspects of a system or its output. 8 Discussion and Future Directions Over the past two decades, the field of nlg has advanced considerably, and many of these recent advances have not been covered in a comprehensive survey yet. This paper has sought to address this gap, with the following goals: 1. to give an update of the core tasks and architectures in the field, with an emphasis on recent data-driven techniques; 2. to briefly highlight recent developments in relatively new areas, incuding vision-to-text generation and the generation of stylistically varied, engaging or creative texts; and 3. to extensively discuss the problems and prospects of evaluating nlg applications. Throughout this survey, various general, related themes have emerged. Probably the central theme has been the gradual shift away from traditional, rulebased approaches to statistical, data-driven ones, which, of course, has been taking place in ai in general. In nlg, this has had substantial impact on how individual tasks are approached (e.g., moving away from domain-dependent to more general, domain-independent approaches, relying on available data instead) as well as on how tasks are combined in different architectures (e.g., moving away from modular towards more integrated approaches). The trade-off between output quality of the generated text and the efficiency and robustness 78 of an approach is becoming a central issue: data-driven approaches are arguably more efficient than rule-based approaches, but the output quality may be compromised, for reasons we have discussed. Another important theme has been the increased interplay between core nlg research and other disciplines, such as computer vision (in the case of vision-to-text) and computational creativity research (in the case of creative language use). At the conclusion of this comprehensive survey of the state of the art in nlg, and given the fast pace at which developments occur both in industry and academia, we feel it is useful to point to some potential future directions, as well as to raise a number of questions which recent research has brought to the fore. 8.1 Why (and How) Should NLG be Used? Towards the beginning of their influential survey on nlg, Reiter and Dale (2000) recommended to the developer that she pose this question before embarking on the design and implementation of a system. Can nlg really help in the target domain? Does a cheaper, more standard solution exist and would it work just as well? From the perspective of an engineer or a company, these are obviously relevant questions. As recent industry-based applications of nlg show, this technology is typically valuable whenever information that needs to be presented to users is relatively voluminous, and comes in a form which is not easily consumed and does not afford a straightforward mapping to a more userfriendly modality without considerable transformation. This is arguably where nlg comes into its own, offering a battery of techniques to select, structure and present the information. However, the question whether nlg is worth using in a specific setting should also be accompanied by the question of how it should be used. Our survey has focussed on techniques for the generation of text, but text is not always presented in isolation. Other important dimensions include document structure and layout, an under-studied problem (but see Power et al., 2003). They also include the role of graphics in text, an area where there is the potential for further interaction between the nlg and visualisation communities, addressing such questions as which information should be rendered textually and which can be made more accessible in a graphical modality (e.g., Demir et al., 2012). These questions are of great relevance in some domains, especially those where accurate information delivery is a precursor to decision-making in fault-critical situations (for some examples, see Elting et al., 1999; Law et al., 2005; van der Meulen et al., 2007). 8.2 Does NLG Include Text-to-Text? In our introductory section, we distinguished text-to-text generation from datato-text generation; this survey has focussed primarily on the latter. The two areas have distinguishing characteristics, not least the fact that nlg inputs tend to vary widely, as do the goals of nlg systems as a function of the domain 79 under consideration. In contrast, the input in text-to-text generation, especially Automatic Summarisation, is comparatively homogeneous, and while its goals can vary widely, the field has also been successful at defining tasks and datasets (for instance, through the duc shared tasks), which have set the standard for subsequent research. Yet, a closer look at the two types of generation will show more scope for convergence than the above characterisation suggests. To begin with, if nlg is concerned with going from data to text, then surely textual input should be considered as one out of broad variety of forms in which input data might be presented. Some recent work, such as that of Kondadadi et al. (2013) (discussed in Section 3.3) and McIntyre and Lapata (2009) (discussed in Section 6) has explicitly focussed on leveraging such data to generate coherent text. Other approaches to nlg, including some systems that conform to a standard, modular, data-to-text architecture (e.g., Hunter et al., 2012), have had to deal with text as one out of a variety of input types, albeit using very simple techniques. Generation from heterogeneous inputs which include text as one type of data is a promising research direction, especially in view of the large quantities of textual data available, often accompanied by numbers or images. 8.3 Theories and Models in Search of Applications? In their overview of the status of evaluation in nlg in the late 1990s, Mellish and Dale (1998) discussed, among the possible ways of evaluating a system, its theoretical underpinnings and in particular whether the theoretical model underlying an nlg system or one of its components is adequate to the task and can generalise to new domains. Rather than evaluating an nlg system as such, this question targets the theory itself, and suggests that we view nlg as a potential testbed for such theories or models. But what are the theories that underlie nlg? The prominence of theoretical models in nlg tends to depend on the task under consideration. For instance, many approaches to realisation discussed in Section 2.6 are based on a specific theory of syntactic structure; research on reg has often been based on insights from pragmatic theory, especially the Gricean maxims (Grice, 1975); and much research on text structuring has been inspired by Rhetorical Structure Theory (Mann & Thompson, 1988). Relatively novel takes on various sentence planning tasks – especially those concerned with style, affect and personality – tend to have a theoretical inspiration, in the form of a model of personality (John & Srivastava, 1999) or a theory of politenes (Brown & Levinson, 1987), for example. More often than not, such theories are leveraged in the process of formalising a particular problem to achieve a tractable solution. Treating their implementation in an nlg system as an explicit test of the theory, as Mellish and Dale (1998) seem to suggest, happens far less often. This is perhaps a reflection of a division between ‘engineering-oriented’ and ‘theoretically-oriented’ perspectives in the field: the former perspective emphasises workable solutions, robustness and output quality; the latter emphasises theoretical soundness, cognitive plau80 sibility and so forth. However, the theory/engineering dichotomy is arguably a false one. While the goal of nlg research is often different from, say, that of cognitive modelling (for example, few nlg systems seek to model production errors explicitly), it is also true that theory-driven implementations are themselves worthy contributions to theoretical work. Recently, some authors have argued that nlg practitioners should pay closer attention to theoretical and cognitive models. The reasons marshalled in favour of this argument are twofold. First, psycholinguistic results and theoretical models can actually help to improve implemented systems, as Rajkumar and White (2014) show for the case of realisation. Second, as argued for example by van Deemter et al. (2012b), theoretical models can benefit from the formal precision that is the bread-and-butter of computational linguistic research; a concrete case in point in nlp is provided by Poesio et al. (2004), whose implementation of Centering Theory (Grosz et al., 1995) shed light on a number of underspecified parameters in the original model and subsequent modifications of it. Our argument here is that nlg has provided a wealth of theoretical insights which should not be lost to the broader research community; similarly, nlg researchers would undoubtedly benefit from an awareness of recent developments in theoretical and experimental work. 8.4 Where do We Go from Here? Finally, we conclude with some speculations on some further directions for future research for which the time seems ripe. Within the field of Natural Language Processing as a whole, a remarkable recent developments is the explosion of interest in social media, including online blogs, micro-blogs such as Twitter feeds, and social platforms such as Facebook. In one respect, interest in social media could be seen as a natural extension of long-standing topics in nlp, including the desire to deal with language ‘in the wild’. However, social media data has given more impetus to the exploration of non-canonical language (e.g. Eisenstein, 2013); the impact of social and demographic factors on language use (e.g. Hovy & Søgaard, 2015; Johannsen et al., 2015); the prevalence of paralinguistic features such as affect, irony and humour (Pang & Lee, 2008; Lukin & Walker, 2013); and other variables such as personality (e.g. Oberlander & Nowson, 2006; Farnadi et al., 2013; Schwartz et al., 2013). Social media feeds are also important data streams for the identification of topical and trending events (see Atefeh & Khreich, 2015, for a recent review). There is as yet little work on generating textual or multimedia summaries of such data (but see, for example, Wang et al., 2014) or generating text in social media contexts (exceptions include Ritter et al., 2011; Cagan et al., 2014). Since much of social media text is subjective and opinionated, an increased interest in social media on the part of nlg researchers may also give new impetus to research on the impact of style, personality and affect on textual variation (discussed in Section 5), and on non-literal language (including some of the phenomena discussed in Section 6). A second potential growth area for nlg is situated language generation. 81 The term situated is usually taken to refer to language use in physical or virtual environments where production choices explicitly take into account perceptual and physical properties. Research on situated language processing has advanced significantly in the past several years, with frameworks for language production and understanding in virtual contexts (e.g., Kelleher et al., 2005), as well as a number of contributions within nlg, especially for the generation of language in interactive environments (Kelleher & Kruijff, 2006; Stoia & Shockley, 2006; Garoufi & Koller, 2013; Dethlefs & Cuayáhuitl, 2015). The popular give Challenge added further impetus to this research (Striegnitz et al., 2011). Clearly, this work is also linked to the enterprise of grounding generated language in the perceptual world, of which the research discussed in Section 4 constitutes one of the current trends. However, there are many fields where situatedness is key, in which nlg can still make novel contributions. One of these is gaming. With the exception of a few endeavours to enhance the variety of linguistic expressions used in virtual environments (e.g., Orkin & Roy, 2007), nlg technology is relatively unrepresented in research on games, despite significant progress on dynamic content generation in game environments (e.g., Togelius et al., 2011). This may be due to the perception that linguistic interaction in games is predictable and can rely on ‘canned’ text. However, with the growing influence of gamification as a strategy for enhancing a variety of activities beyond entertainment, such as pedagogy, as well as the development of sophisticated planning techniques for varying the way in which game worlds unfold on the fly, the assumption of predictability where language use is concerned may well be up for revision. Third, there is a growing interest in applying nlg techniques to generation from structured knowledge bases and ontologies (e.g. Ell & Harth, 2014; Duma & Klein, 2013; Gyawali & Gardent, 2014; Mrabet et al., 2016; Sleimi & Gardent, 2016, some of which were briefly discussed in Section 3.3.4). The availability of knowledge bases such as dbpedia, or folksonomies such as Freebase, not only constitute input sources in their own right, but also open up the possibility of exploring alignments between structured inputs and text in a broader variety of domains than has hitherto been the case. Finally, while there has been a significant shift in the past few years towards data-driven techniques in nlg, many of these have not been tested in commercial or real-world applications, despite the growth in commercialisation of text generation services noted in the introductory section. Typically, the arguments for rule-based systems in commercial scenarios, or in cases where input is high-volume and heterogeneous, are that (1) their output is easier to control for target systems; or (2) that data is in any case unavailable in a given domain, rendering the use of statistical techniques moot; or (3) data-driven systems have not been shown to be able to scale up beyond experimental scenarios (some of these arguments are made, for instance, by Harris, 2008). A response to the first point depends on the availability of techniques which enable the developer to ‘look under the hood’ and understand the statistical relationships learned by a model. Such techniques are, for example, being developed to investigate or visualise the representations learned by deep neural networks. The second 82 point calls for more investment in research on data acquisition and data-text alignment. Techniques for generation which rely on less precise alignments between data and text are also a promising future direction. Finally, scalability remains an open challenge. Many of the systems we have discussed have been developed within research environments, where the aim is of course to push the frontiers of nlg and demonstrate feasibility or correctness of novel approaches. While in some cases, research on data-to-text has addressed large-scale problems – notably in some of the systems that summarise numerical data – a greater concern with scalability would also focus researchers’ attention on issues such as the time and resources required to collect data and train a system and the efficiency of the algorithms being deployed. Clearly, developments in hardware will alleviate these problems, as has happened with some statistical methods that have recently become more feasible. 9 Conclusion Recent years have seen a marked increase in interest in automatic text generation. Companies now offer nlg technology for a range of applications in domains such as journalism, weather, and finance. The huge increase in available data and computing power, as well as rapid developments in machine-learning, have created many new possibilities and motivated nlg researchers to explore a number of new applications, related to, for instance, image-to-text generation, while applications related to social media seem to be just around the corner, as witness, for instance, the emergence of nlg-related techniques for automatic content-creation as well as nlg for twitter and chatbots (e.g., Dale, 2016). With developments occurring at a steady pace, and the technology also finding its way into industrial applications, the future of the field seems bright. In our view, research in nlg should be further strengthened by more collaboration with kindred disciplines. It is our hope that this survey will serve to highlight some of the potential avenues for such multi-disciplinary work. Acknowledgements We thank the four reviewers for their detailed and constructive comments. In addition, we have greatly benefitted from discussions with and comments from Grzegorz Chrupala, Robert Dale, Raquel Hervás, Thiago Castro Ferreira, Ehud Reiter, Marc Tanti, Mariët Theune, Kees van Deemter, Michael White and Sander Wubben. EK received support from RAAK-PRO SIA (2014-01-51PRO) and The Netherlands Organization for Scientific Research (NWO 360-89-050), which is gratefully acknowledged. 83 References Althaus, E., Karamanis, N., & Koller, A. (2004). Computing locally coherent discourses. In Proc. ACL’04, pp. 399–406. Anderson, P., Fernando, B., Johnson, M., & Gould, S. (2016). SPICE: Semantic Propositional Image Caption Evaluation. In Proc. ECCV’16, pp. 1–17. Androutsopoulos, I., Lampouras, G., & Galanis, D. (2013). Generating natural language descriptions from OWL ontologies: The natural OWL system. Journal of Artificial Intelligence Research, 48, 671–715. Androutsopoulos, I., & Malakasiotis, P. (2010). A survey of paraphrasing and textual entailment methods. Journal of Artificial Intelligence Research, 38, 135–187. Angeli, G., Liang, P., & Klein, D. (2010). A Simple Domain-Independent Probabilistic Approach to Generation. In Proc. EMNLP’10, pp. 502–512. Angeli, G., Manning, C. D., & Jurafsky, D. (2012). Parsing time: Learning to interpret time expressions. In Proc. NAACL-HLT’12, pp. 446–455. Antol, S., Agrawal, A., Lu, J., Mitchell, M., Batra, D., Zitnick, C. L., & Parikh, D. (2015). VQA: Visual Question Answering. In Proc. ICCV’15, pp. 2425–2433. Antol, S., Zitnick, C. L., & Parikh, D. (2014). Zero-shot learning via visual abstraction. In Proc. ECCV’14, pp. 401–416. Appelt, D. (1985). Planning English Sentences. Cambridge University Press, Cambridge, UK. Argamon, S., Koppel, M., Pennebaker, J. W., & Schler, J. (2007). Mining the Blogosphere: Age, gender and the varieties of self-expression. First Monday, 12 (9). Asghar, N., Poupart, P., Hoey, J., Jiang, X., & Mou, L. (2017). Affective Neural Response Generation. CoRR, 1709.03968. Atefeh, F., & Khreich, W. (2015). A survey of techniques for event detection in twitter. Computational Intelligence, 31 (1), 132–164. Austin, J. L. (1962). How to do things with words. Clarendon Press, Oxford. Bahdanau, D., Cho, K., & Bengio, Y. (2015). Neural Machine Translation By Jointly Learning To Align and Translate. In Proc. ICLR’15, pp. 1–15. Bal, M. (2009). Narratology (Third edition). University of Toronto Press, Toronto. Ballesteros, M., Bohnet, B., Mille, S., & Wanner, L. (2015). Data-driven sentence generation with non-isomorphic trees. In Proc. NAACL-HTL’15, pp. 387– 397. Banaee, H., Ahmed, M. U., & Loutfi, A. (2013). Towards NLG for Physiological Data Monitoring with Body Area Networks. In Proc. ENLG’13, pp. 193– 197. 84 Bangalore, S., & Rambow, O. (2000). Corpus-based lexical choice in Natural Language Generation. In Proc. ACL’00, pp. 464–471. Bangalore, S., & Stent, A. (2014). Natural Language Generation in Interactive Systems. Cambridge University Press. Banik, E., Gardent, C., & Kow, E. (2013). The KBGen Challenge. In Proc. ENLG’13, pp. 94–97. Bannard, C., & Callison-Burch, C. (2005). Paraphrasing with bilingual parallel corpora. In Proc. ACL’05, pp. 597–604. Bard, E. G., Robertson, D., & Sorace, A. (1996). Magnitude Estimation of Linguistic Acceptability. Lamguage, 72 (1), 32–68. Barnard, K. (2016). Computational Methods for Integrating Vision and Language. Morgan and Claypool Publishers. Bartoli, A., De Lorenzo, A., Medvet, E., & Tarlao, F. (2016). Your paper has been accepted, rejected, or whatever: Automatic generation of scientific paper reviews. In International Conference on Availability, Reliability, and Security, pp. 19–28. Barzilay, R., Elhadad, N., & McKeown, K. R. (2002). Inferring strategies for sentence ordering in multidocument news summarization. Journal of Artificial Intelligence Research, 17, 35–55. Barzilay, R., & Lapata, M. (2005). Collective content selection for concept-totext generation. In Proc. HLT/EMNLP’05, pp. 331–338. Barzilay, R., & Lapata, M. (2006). Aggregation via Set Partitioning for Natural Language Generation. In Proc. HLT-NAACL’06, pp. 359–366. Barzilay, R., & Lee, L. (2004). Catching the Drift: Probabilistic Content Models, with Applications to Generation and Summarization. In Proc. HLTNAACL’04, pp. 113–120. Bateman, J. A. (1997). Enabling technology for multilingual natural language generation: the KPML development environment. Natural Language Engineering, 3 (1), 15–55. Bateman, J. A., & Zock, M. (2005). Natural Language Generation. In Mitkov, R. (Ed.), The Oxford Handbook of Computational Linguistics. Oxford University Press, Oxford, UK. Belz, A. (2003). And Now with Feeling: Developments in Emotional Language Generation (Technical Report No. ITRI-03-21). Tech. rep., University of Brighton, Brighton, UK. Belz, A. (2008). Automatic generation of weather forecast texts using comprehensive probabilistic generation-space models. Natural Language Engineering, 14 (04). Belz, A., & Kow, E. (2010). Comparing rating scales and preference judgements in language evaluation. In Proc. INLG’10, pp. 7–15. 85 Belz, A., & Kow, E. (2011). Discrete vs . Continuous Rating Scales for Language Evaluation in NLP. In Proc. ACL’11, pp. 230–235. Belz, A., Kow, E., Viethen, J., & Gatt, A. (2010). Generating referring expressions in context: The GREC task evaluation challenges. In Krahmer, E., & Theune, M. (Eds.), Empirical Methods in Natural Language Generation. Springer, Berlin and Heidelberg. Belz, A., White, M., Espinosa, D., Kow, E., Hogan, D., & Stent, A. (2011). The First Surface Realisation Shared Task: Overview and Evaluation Results. In Proc. ENLG’11, pp. 217–226. Bengio, Y., Ducharme, R., Vincent, P., & Janvin, C. (2003). A Neural Probabilistic Language Model. Journal of Machine Learning Research, 3, 1137– 1155. Bernardi, R., Cakici, R., Elliott, D., Erdem, A., Erdem, E., Ikizler-Cinbis, N., Keller, F., Muscat, A., & Plank, B. (2016). Automatic Description Generation from Images: A Survey of Models, Datasets, and Evaluation Measures. Journal of Artificial Intelligence Research, 55, 409–442. Biber, D. (1988). Variation Across Speech and Writing. Cambridge University Press, Cambridge. Binsted, K., Bergen, B., & McKay, J. (2003). Pun and non-pun humour in second-language learning. In Proc. CHI’03 Workshop on Humor Modeling in the Interface. Binsted, K., Pain, H., & Ritchie, G. D. (1997). Children’s evaluation of computer-generated punning riddles. Pragmatics & Cognition, 5 (2), 305– 354. Binsted, K., & Ritchie, G. D. (1994). An implemented model of punning riddles. In Proc. AAAI’94. Binsted, K., & Ritchie, G. D. (1997). Computational rules for generating punning riddles. Humor: International Journal of Humor Research, 10 (1), 25–76. Bohnet, B. (2008). The fingerprint of human referring expressions and their surface realization with graph transducers. In Proc. INLG’08, pp. 207– 210. Bohnet, B., Wanner, L., Mille, S., & Burga, A. (2010). Broad Coverage Multilingual Deep Sentence Generation with a Stochastic Multi-Level Realizer. In Proc. COLING’10, pp. 98–106. Bollegala, D., Okazaki, N., & Ishizuka, M. (2010). A bottom-up approach to sentence ordering for multi-document summarization. Information Processing & Management, 46 (1), 89–109. Bollmann, M. (2011). Adapting SimpleNLG for German. In Proc. ENLG’11, pp. 133–138. 86 Bouayad-Agha, N., Casamayor, G., Wanner, L., & Mellish, C. (2013). Overview of the First Content Selection Challenge from Open Semantic Web Data. In Proc. ENLG’11, pp. 98–102. Boyer, K. E., Phillips, R., Ingram, A., Ha, E. Y., Wallis, M., Vouk, M., & Lester, J. C. (2011). Investigating the relationship between dialogue structure and tutoring effectiveness: A hidden markov modeling approach. International Journal of Artificial Intelligence in Education, 21 (1-2), 65–81. Brants, T., & Franz, A. (2006). Web 1T 5-gram Version 1. Tech. rep., Linguistic Data Consortium. Bratman, M. E. (1987). Intentions, Plans and Practical Reason. CSLI, Stanford, CA. Bringsjord, S., & Ferrucci, D. A. (1999). Artificial Intelligence and Literary Creativity: Inside the Mind of BRUTUS, a Storytelling Machine. Lawrence Erlbaum Associates, Hillsdale, NJ. Brown, J. C., Frishkoff, G. A., & Eskenazi, M. (2005). Automatic question generation for vocabulary assessment. In Proc. EMNLP’05, pp. 819–826. Brown, P., & Levinson, S. C. (1987). Politeness: Some Universals in Language Usage. Cambridge University Press, Cambridge, UK. Bruner, J. (2011). The Narrative Construction of Reality. Critical Inquiry, 18 (1), 1–21. Busemann, S., & Horacek, H. (1997). Generating Air Quality Reports From Environmental Data. In Busemann, S., Becker, T., & Finkler, W. (Eds.), DFKI Workshop on Natural Language Generation (DFKI Document D97-06), pp. 1–7. DFKI, Saarbrücken. Cagan, T., Frank, S. L., & Tsarfaty, R. (2014). Generating Subjective Responses to Opinionated Articles in Social Media: An Agenda-Driven Architecture and a Turing-Like Test. In Proc. Joint Workshop on Social Dynamics and Personal Attributes in Social Media, pp. 58–67. Cahill, A. (2009). Correlating Human and Automatic Evaluation of a German Surface Realiser. In Proc. ACL-IJCNLP’09, pp. 97–100. Cahill, A., Forst, M., & Rohrer, C. (2007). Stochastic realisation ranking for a free word order language. In Proc. ENLG’07, pp. 17–24. Cahill, A., & Van Genabith, J. (2006). Robust PCFG-Based Generation using Automatically Acquired LFG Approximations. In Proc. COLINGACL’06, pp. 1033–1040. Callaway, C. B. (2005). The Types and Distributions of Errors in a Wide Coverage Surface Realizer Evaluation. In Proc. ENLG’05, pp. 162–167. Callaway, C. B., & Lester, J. C. (2002). Narrative prose generation. Artificial Intelligence, 139 (2), 213–252. Callison-Burch, C., Fordyce, C., Koehn, P., Monz, C., & Schroeder, J. (2007). (Meta-) evaluation of machine translation. In Proc. StatMT’07, pp. 136– 158. 87 Callison-Burch, C., Fordyce, C., Koehn, P., Monz, C., & Schroeder, J. (2008). Further Meta-Evaluation of Machine Translation. In Proc. StatMT’08, pp. 70–106. Callison-Burch, C., Osborne, M., & Koehn, P. (2006). Re-evaluating the Role of BLEU in Machine Translation Research. In Proc. EACL’06, pp. 249–256. Caporaso, J. G., Deshpande, N., Fink, J. L., Bourne, P. E., Bretonnel Cohen, K., & Hunter, L. (2008). Intrinsic evaluation of text mining tools may not predict performance on realistic tasks. Pacific Symposium on Biocomputing, 13, 640–651. Carenini, G., & Moore, J. D. (2006). Generating and evaluating evaluative arguments. Artificial Intelligence, 170 (11), 925–952. Carroll, J., & Oepen, S. (2005). High efficiency realization for a wide-coverage unification grammar. In Dale, R. (Ed.), Procedings of the 2nd International Joint Conference on Natural Language Processing (IJCNLP’05), pp. 165– 176. Springer. Castro Ferreira, T., Calixto, I., Wubben, S., & Krahmer, E. (2017). Linguistic realisation as machine translation: Comparing different MT models for AMR-to-text generation. In Proc. INLG’17, pp. 1–10. Castro Ferreira, T., Krahmer, E., & Wubben, S. (2016). Towards more variation in text generation: Developing and evaluating variation models for choice of referential form. In Proc. ACL’16, pp. 568 – 577. Castro Ferreira, T., Wubben, S., & Krahmer, E. (2017). Generating flexible proper name references in text: Data, models and evaluation. In Proc. EACL’17, pp. 655–664. Chang, F., Dell, G. S., & Bock, K. (2006). Becoming syntactic. Psychological review, 113 (2), 234–72. Chen, D. L., & Mooney, R. J. (2008). Learning to sportscast: a test of grounded language acquisition. In Proc. ICML’08, pp. 128–135. Cheng, H., & Mellish, C. (2000). Capturing the interaction between aggregation and text planning in two generation systems. In Proc. INLG ’00, pp. 186– 193. Chi, M., Jordan, P. W., & VanLehn, K. (2014). When Is Tutorial Dialogue More Effective Than Step-Based Tutoring?. In Proc. ITS’14, pp. 210–219. Clark, H. H. (1996). Using Language. Cambridge University Press, Cambridge, UK. Clarke, J., & Lapata, M. (2010). Discourse Constraints for Document Compression. Computational Linguistics, 36 (3), 411–441. Clerwall, C. (2014). Enter the Robot Journalist. Journalism Practice, 8 (5), 519–531. Coch, J. (1998). Interactive generation and knowledge administration in MultiMeteo. In Proc. IWNLG’98, pp. 300–303. 88 Cohen, P. R., & Levesque, H. J. (1985). Speech acts and rationality. In Proc. ACL’85, pp. 49–60. Cohen, P. R., & Perrault, C. R. (1979). Elements of a plan-based theory of speech acts. Cognitive Science, 3, 177–212. Colin, E., Gardent, C., Mrabet, Y., Narayan, S., & Perez-Beltrachini, L. (2016). The webNLG challenge: Generating text from dbpedia data. In Proc. INLG’16, pp. 163–167. Colton, S., Goodwin, J., & Veale, T. (2012). Full-FACE Poetry Generation. In Proc. ICCC’12, pp. 95–102. Concepción, E., Méndez, G., Gervás, P., & León, C. (2016). A challenge proposal for narrative generation using CNLs. In Proc. INLG’16, pp. 171–173. Cuayáhuitl, H., & Dethlefs, N. (2011). Hierarchical Reinforcement Learning and Hidden Markov Models for Task-Oriented Natural Language Generation. In Proc. ACL’11, pp. 654–659. Dale, R. (1989). Cooking up referring expressions. In Proc. ACL’89, pp. 68–75. Dale, R. (1992). Generating Referring Expressions: Constructing Descriptions in a Domain of Objects and Processes. MIT Press, Cambridge, MA. Dale, R. (2016). The return of the chatbots. Natural Language Engineering, 22 (5), 811–817. Dale, R., Anisimoff, I., & Narroway, G. (2012). Hoo 2012: A report on the preposition and determiner error correction shared task. In Proc. 7th Workshop on Building Educational Applications Using NLP, pp. 54–62. Dale, R., & Reiter, E. (1995). Computational Interpretations of the Gricean Maxims in the Generation of Referring Expressions. Cognitive Science, 19 (2), 233–263. Dale, R., & White, M. (2007). Shared Tasks and Comparative Evaluation in Natural Language Generation: Workshop Report. Tech. rep., Ohio State University, Arlington, Virginia. Dalianis, H. (1999). Aggregation in Natural Language Generation. Computational Intelligence, 15 (4), 384–414. de Oliveira, R., & Sripada, S. (2014). Adapting SimpleNLG for Brazilian Portugese realisation. In Proc. INLG’14, pp. 93–94. De Rosis, F., & Grasso, F. (2000). Affective Natural Language Generation. In Paiva, A. (Ed.), Affective interactions, pp. 204–218. Springer, Berlin and Heidelberg. De Smedt, K., Horacek, H., & Zock, M. (1996). Architectures for Natural Language Generation : Problems and Perspectives. In Adorni, G., & Zock, M. (Eds.), Trends in Natural Language Generation: an Artificial Intelligence Perspective, pp. 17–46. Springer, Berlin and Heidelberg. Demir, S., Carberry, S., & McCoy, K. F. (2012). Summarizing information graphics textually. Computational Linguistics, 38 (3), 527–574. 89 Dethlefs, N. (2014). Context-Sensitive Natural Language Generation: From Knowledge-Driven to Data-Driven Techniques. Language and Linguistics Compass, 8 (3), 99–115. Dethlefs, N., & Cuayáhuitl, H. (2015). Hierarchical reinforcement learning for situated natural language generation. Natural Language Engineering, 21 (3), 391–435. Devlin, J., Cheng, H., Fang, H., Gupta, S., Deng, L., He, X., Zweig, G., & Mitchell, M. (2015a). Language Models for Image Captioning : The Quirks and What Works. In Proc. ACL/IJCNLP’15, pp. 100–105. Devlin, J., Gupta, S., Girshick, R., Mitchell, M., & Zitnick, C. L. (2015b). Exploring Nearest Neighbor Approaches for Image Captioning. CoRR, 1505.04467. Di Eugenio, B., Fossati, D., Yu, D., Haller, S., & Glass, M. (2005). Aggregation improves learning: Experiments in natural language generation for intelligent tutoring systems. In Proc. ACL’05, pp. 50–57. Di Eugenio, B., & Green, N. (2010). Emerging applications of natural language generation in information visualization, education, and health-care. In Indurkhya, N., & Damerau, F. (Eds.), Handbook of Natural Language Processing (2nd edition)., pp. 557–575. Chapman and Hall/CRC, London. Di Fabbrizio, G., Stent, A., & Bangalore, S. (2008). Trainable Speaker-Based Referring Expression Generation. In Proc. CoNLL’08, pp. 151–158. DiMarco, C., Covvey, H. D., Bray, P., Cowan, D., DiCiccio, V., Hovy, E. H., Mulholland, D., & Lipa, J. (2007). The Development of a Natural Language Generation System For Personalized e-Health Information. In Proc. MedInfo’07. DiMarco, C., & Hirst, G. (1993). A Computational Theory of Goal-Directed Style in Syntax. Computational Linguistics, 19 (3), 451–499. Dimitromanolaki, A., & Androutsopoulos, I. (2003). Learning to Order Facts for Discourse Planning in Natural Language Generation. In Proc. ENLG’03, pp. 23–30. Doddington, G. (2002). Automatic evaluation of machine translation quality using n-gram co-occurrence statistics. In Proc. ARPA Workshop on Human Language Technology, pp. 128–132. Donahue, J., Hendricks, L. A., Rohrbach, M., Venugopalan, S., Guadarrama, S., Saenko, K., & Darrell, T. (2015). Long-term Recurrent Convolutional Networks for Visual Recognition and Description. In Proc. CVPR’15, pp. 1–14. Dong, D., Wu, H., He, W., Yu, D., & Wang, H. (2015). Multi-Task Learning for Multiple Language Translation. In Proc. ACL/IJCNLP’15, pp. 1723– 1732. 90 Dong, L., Huang, S., Wei, F., Lapata, M., Zhou, M., & Xu, K. (2017). Learning to Generate Product Reviews from Attributes. In Proc. EACL’17, pp. 623–632. Dorr, B., & Gaasterland, T. (1995). Selecting tense, aspect and connecting words in language generation. In Proc. IJCAI’95, pp. 1299–1305. Dorr, B., Monz, C., Oard, D., President, S., Zajic, D., & Schwartz, R. (2004). Extrinsic Evaluation of Automatic Metrics (LAMP-TR-115). Tech. rep., University of Maryland, College Park, MD. Dras, M. (2015). Evaluating human pairwise preference judgments. Computational Linguistics, 41 (2), 309–317. Duboue, P. A., & McKeown, K. R. (2003). Statistical acquistion of content selection rules for natural language generation. In Proc. EMNLP’03, pp. 121–128. Duma, D., & Klein, E. (2013). Generating natural language from linked data: Unsupervised template extraction. In Proc. IWCS’13, pp. 83–94. Dušek, O., & Jurčı́ček, F. (2015). Training a Natural Language Generator From Unaligned Data. In Proc. ACL/IJCNLP’15, pp. 451–461. Dušek, O., & Jurčı́ček, F. (2016). Sequence-to-Sequence Generation for Spoken Dialogue via Deep Syntax Trees and Strings. In Proc. ACL’16, pp. 45–51. Duygulu, P., Barnard, K., de Freitas, N., & Forsyth, D. (2002). Object recognition as machine translation: Learning a lexicon for a fixed image vocabulary. In Proc. ECCV’02, pp. 97–112. Edmonds, P., & Hirst, G. (2002). Near-Synonymy and Lexical Choice. Computational Linguistics, 28 (2), 105–144. Eisenstein, J. (2013). What to do about bad language on the internet. In Proc. NAACL-HLT’13, pp. 359–369. Elhadad, M., & Robin, J. (1996). An overview of SURGE: A reusable comprehensive syntactic realization component. In Procedings of the 8th International Natural Language Generation Workshop (IWNLG’98), pp. 1–4. Elhadad, M., Robin, J., & McKeown, K. R. (1997). Floating constraints in lexical choice. Computational Linguistics, 23 (2), 195–239. Elhoseiny, M., Elgammal, A., & Saleh, B. (2017). Write a Classifier: Predicting Visual Classifiers from Unstructured Text Descriptions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39 (12), 2539–2553. Ell, B., & Harth, A. (2014). A language-independent method for the extraction of RDF verbalization templates. In Proc. INLG’14, pp. 26–34. Elliott, D., & De Vries, A. P. (2015). Describing Images using Inferred Visual Dependency Representations. In Proc. ACL-IJCNLP’15, pp. 42–52. Elliott, D., Frank, S., Sima’an, K., & Specia, L. (2016). Multi30K: Multilingual English-German Image Descriptions. CoRR, 1605.00459. 91 Elliott, D., & Keller, F. (2013). Image Description using Visual Dependency Representations. In Proc. EMNLP’13, pp. 1292–1302. Elliott, D., & Keller, F. (2014). Comparing Automatic Evaluation Measures for Image Description. In Proc. ACL’14, pp. 452–457. 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, 71–99. Elson, D., & McKeown, K. R. (2010). Tense and aspect assignment in narrative discourse. In Proc. INLG’10, pp. 47–56. Elting, L. S., Martin, C. G., Cantor, S. B., & Rubenstein, E. B. (1999). Influence of data display formats on physician investigators’ decisions to stop clinical trials: prospective trial with repeated measures. BMJ (Clinical research ed.), 318 (7197), 1527–1531. Engelhardt, P., Bailey, K., & Ferreira, F. (2006). Do speakers and listeners observe the Gricean Maxim of Quantity?. Journal of Memory and Language, 54 (4), 554–573. Engonopoulos, N., & Koller, A. (2014). Generating effective referring expressions using charts. In Proc. INLG’14, pp. 6–15. Espinosa, D., Rajkumar, R., White, M., & Berleant, S. (2010). Further MetaEvaluation of Broad-Coverage Surface Realization. In Proc. EMNLP’10, pp. 564–574. Espinosa, D., White, M., & Mehay, D. (2008). Hypertagging: Supertagging for surface realization with CCG. In Proc. ACL-HLT’08, pp. 183–191. Evans, R., Piwek, P., & Cahill, L. (2002). What is nlg?. In Proc. INLG’02, pp. 144–151. Fang, H., Gupta, S., Iandola, F., Srivastava, R., Deng, L., Dollár, P., Gao, J., He, X., Mitchell, M., Platt, J. C., Zitnick, C. L., & Zweig, G. (2015). From Captions to Visual Concepts and Back. In Proc. CVPR’15, pp. 1473–1482. Farhadi, A., Hejrati, M., Sadeghi, M. A., Young, P., Rashtchian, C., Hockenmaier, J., & Forsyth, D. (2010). Every picture tells a story: Generating sentences from images. In Proc. ECCV’10, Vol. 6314 LNCS, pp. 15–29. Farnadi, G., Zoghbi, S., Moens, M.-F., & De Cock, M. (2013). Recognising Personality Traits Using Facebook Status Updates. In AAAI Technical Report WS-13-01: Computational Personality Recognition (Shared Task), pp. 14–18. Fass, D. (1991). met*: A Method for Discriminating Metonymy and Metaphor by Computer. Computational Linguistics, 17 (1), 49–90. Feng, Y., & Lapata, M. (2010). How many words is a picture worth? Automatic caption generation for news images. In Proc. ACL’10, pp. 1239–1249. 92 Ferraro, F., Mostafazadeh, N., Huang, T.-H., Vanderwende, L., Devlin, J., Galley, M., & Mitchell, M. (2015). A Survey of Current Datasets for Vision and Language Research. In Proc. EMNLP’15, pp. 207–213. Ficler, J., & Goldberg, Y. (2017). Controlling Linguistic Style Aspects in Neural Language Generation. In Proc. Workshop on Stylistic Variation, pp. 94– 104. Fikes, R. E., & Nilsson, N. J. (1971). Strips: A new approach to the application of theorem proving to problem solving. Artificial Intelligence, 2 (3-4), 189– 208. Filippova, K., & Strube, M. (2007). Generating Constituent Order in German Clauses. In Proc. ACL’07, pp. 320–327. Filippova, K., & Strube, M. (2009). Tree linearization in English: Improving language model based approaches. In Proc. NAACL-HLT’09, pp. 225– 228. FitzGerald, N., Artzi, Y., & Zettlemoyer, L. (2013). Learning Distributions over Logical Forms for Referring Expression Generation. In Proc. EMNLP’13, pp. 1914–1925. Fleischman, M., & Hovy, E. H. (2002). Emotional Variation in speech-based Natural Language Generation. In Proc. INLG’02, pp. 57–64. Flower, L., & Hayes, J. R. (1981). A cognitive process theory of writing. College composition and communication, 32 (4), 365–387. Fort, K., Adda, G., & Bretonnel Cohen, K. (2011). Amazon Mechanical Turk: Gold Mine or Coal Mine?. Computational Linguistics, 37 (2), 413–420. Fossati, D., Di Eugenio, B., Ohlsson, S., Brown, C., & Chen, L. (2015). Data Driven Automatic Feedback Generation in the iList Intelligent Tutoring System. Technology, Instruction, Cognition and Learning, 10, 5–26. Frank, M. C., Goodman, N. D., & Tenenbaum, J. B. (2009). Using speakers’ referential intentions to model early cross-situational word learning. Psychological Science, 20 (5), 578–85. Gardent, C. (2002). Generating Minimal Definite Descriptions. In Proc. ACL’02, pp. 96–103. Gardent, C., & Narayan, S. (2015). Multiple adjunction in feature-based treeadjoining grammar. Computational Linguistcs, 41 (1), 41–70. Gardent, C., & Perez-Beltrachini, L. (2017). A statistical, grammar-based approach to microplanning. Computational Linguistics, 43 (1), 1–30. Garoufi, K. (2014). PlanningBased Models of Natural Language Generation. Language and Linguistics Compass, 8 (1), 1–10. Garoufi, K., & Koller, A. (2013). Generation of effective referring expressions in situated context. Language and Cognitive Processes, 29 (8), 986–1001. 93 Gatt, A., & Belz, A. (2010). Introducing shared task evaluation to NLG: The TUNA shared task evaluation challenges. In Krahmer, E., & Theune, M. (Eds.), Empirical methods in natural language generation. Springer, Berlin and Heidelberg. Gatt, A., Portet, F., Reiter, E., Hunter, J. R., Mahamood, S., Moncur, W., & Sripada, S. (2009). From data to text in the neonatal intensive care Unit: Using NLG technology for decision support and information management. AI Communications, 22 (3), 153–186. Gatt, A., van der Sluis, I., & van Deemter, K. (2007). Evaluating algorithms for the Generation of Referring Expressions using a balanced corpus. In Proc. ENLG’07, pp. 49–56. Geman, D., Geman, S., Hallonquist, N., & Younes, L. (2015). Visual Turing test for computer vision systems. Proceedings of the National Academy of Sciences, 112 (12), 3618–3623. Genette, G. (1980). Narrative Discourse: An Essay in Method. Cornell University Press, Ithaca, NY. Gervás, P. (2001). An expert system for the composition of formal Spanish poetry. Knowledge-Based Systems, 14 (3-4), 181–188. Gervás, P. (2009). Computational approaches to storytelling and creativity. AI Magazine, Fall 2009, 49–62. Gervás, P. (2010). Engineering Linguistic Creativity: Bird Flight and Jet Planes. In Proc. 2nd Workshop on Computational Approaches to Linguistic Creativity, pp. 23–30. Gervás, P. (2012). From the Fleece of Fact to Narrative Yarns : a Computational Model of Composition. In Proc. Workshop on Computational Models of Narrative. Gervás, P. (2013). Story Generator Algorithms. In Hühn, P. (Ed.), The Living Handbook of Narratology. Hamburg University, Hamburg. Ghosh, S., Chollet, M., Laksana, E., Morency, L.-P., & Scherer, S. (2017). AffectLM: A Neural Language Model for Customizable Affective Text Generation. In Proc. ACL’17, pp. 634–642. Gkatzia, D. (2016). Content selection in data-to-text systems: A survey. CoRR, 1610.08375. Gkatzia, D., Rieser, V., Bartie, P., & Mackaness, W. (2015). From the Virtual to the Real World : Referring to Objects in Real-World Spatial Scenes. In Proc. EMNLP’15, pp. 1936–1942. Glucksberg, S. (2001). Understanding figurative language: From metaphors to idioms. Oxford University Press, Oxford. Godwin, K., & Piwek, P. (2016). Collecting Reliable Human Judgements on Machine-Generated Language: The Case of the QGSTEC Data. In Proc. INLG’16, pp. 212–216. 94 Goldberg, E., Driedger, N., & Kittredge, R. I. (1994). Using Natural Language Processing to Produce Weather Forecasts. IEEE Expert, 2, 45–53. Goldberg, Y. (2016). A Primer on Neural Network Models for Natural Language Processing. Journal of Artificial Intelligence Research, 57, 345–420. Goldberg, Y. (2017). An adversarial review of ‘adversarial generation of natural language’. https://goo.gl/EMipHQ. Goncalo Oliveira, H. (2017). A Survey on Intelligent Poetry Generation : Languages, Features, Techniques, Reutilisation and Evaluation. In Proc. INLG’17, pp. 11–20. Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press, Cambridge, MA. Goodman, J., Cryder, C., & Cheema, A. (2013). Data collection in a flat world: The strengths and weaknesses of mechanical turk samples. Journal of Behavioral Decision Making, 26 (3), 213–224. Goyal, R., Dymetman, M., & Gaussier, E. (2016). Natural Language Generation through Character-Based RNNs with Finite-State Prior Knowledge. In Proc. COLING’16, pp. 1083–1092. Greene, E., Ave, L., Knight, K., & Rey, M. (2010). Automatic Analysis of Rhythmic Poetry with Applications to Generation and Translation. In Proc. EMNLP’10, pp. 524–533. Grice, H. P. (1975). Logic and conversation. In Syntax and Semantics 3: Speech Acts, pp. 41–58. Elsevier, Amsterdam. Grosz, B. J., Joshi, A. K., & Weinstein, S. (1995). Centering : A Framework for Modeling the Local Coherence of Discourse. Computational Linguistics, 21 (2), 203–225. Guhe, M. (2007). Incremental Conceptualization for Language Production. Lawrence Erlbaum Associates, Hillsdale, NJ. Gupta, A., Verma, Y., & Jawahar, C. V. (2012). Choosing Linguistics over Vision to Describe Images. In Proc. AAAI’12, pp. 606–612. Gupta, S., Walker, M. A., & Romano, D. M. (2007). Generating Politeness in Task Based Interaction : An Evaluation of Linguistic Form and Culture. In Proc. ENLG’07, pp. 57–64. Gupta, S., Walker, M. A., & Romano, D. M. (2008). POLLy: A Conversational System that uses a Shared Representation to Generate Action and Social Language. In Proc. IJCNLP’08, pp. 7–12. Gyawali, B., & Gardent, C. (2014). Surface Realisation from Knowledge-Bases. In Proc. ACL’14, pp. 424–434. Halliday, M., & Matthiessen, C. M. (2004). Introduction to Functional Grammar (3rd Edition edition). Hodder Arnold, London. 95 Harbusch, K., & Kempen, G. (2009). Generating clausal coordinate ellipsis multilingually: A uniform approach based on postediting. In Proc. ENLG’09, pp. 138–145. Hardcastle, D., & Scott, D. (2008). Can we evaluate the quality of generated text?. In Proc. LREC’08, pp. 3151–3158. Harnad, S. (1990). The symbol grounding problem. Physica, D42 (1990), 335– 346. Harris, M. D. (2008). Building a large-scale commercial NLG system for an EMR. In Proc. INLG ’08, pp. 157–160. Hearst, M. A. (1992). Automatic Acquisition of Hyponyms ftom Large Text Corpora. In Proc. COLING’92, pp. 539–545. Heeman, P. A., & Hirst, G. (1995). Collaborating on referring expressions. Computational Linguistics, 21 (3), 351–382. Hendricks, L. A., Akata, Z., Rohrbach, M., Donahue, J., Schiele, B., & Darrell, T. (2016a). Generating Visual Explanations. In Proc. ECCV’16. Hendricks, L. A., Venugopalan, S., Rohrbach, M., Mooney, R. J., Saenko, K., & Darrell, T. (2016b). Deep Compositional Captioning: Describing Novel Object Categories without Paired Training Data. In Proc. CVPR’16, pp. 1–10. Herman, D. (1997). Scripts, sequences and stories: Elements of a postclassical narratology. PMLA, 112 (5), 1046–1059. Herman, D. (2001). Story logic in conversational and literary narratives. Narrative, 9 (2), 130–137. Herman, D. (2007). Storytelling and the sciences of mind: Cognitive narratology, discursive psychology, and narratives in face-to-face interaction. Narrative, 15 (3), 306–334. Hermida, A. (2015). From Mr and Mrs Outlier to Central Tendencies: Computational Journalism and crime reporting at the Los Angeles Times. Digital Journalism, 3 (3), 381–397. Hervás, R., Arroyo, J., Francisco, V., Peinado, F., & Gervás, P. (2016). Influence of personal choices on lexical variability in referring expressions. Natural Language Engineering, 22 (2), 257–290. Hervás, R., Francisco, V., & Gervás, P. (2013). Assessing the influence of personal preferences on the choice of vocabulary for natural language generation. Information Processing & Management, 49 (4), 817–832. Hervás, R., Pereira, F., Gervás, P., & Cardoso, A. (2006). Cross-domain analogy in automated text generation. In Proc. 3rd joint workshop on Computational Creativity, pp. 43–48. Herzig, J., Shmueli-scheuer, M., Sandbank, T., & Konopnicki, D. (2017). Neural Response Generation for Customer Service based on Personality Traits. In Proc. INLG’17, pp. 252–256. 96 Hochreiter, S., & Urgen Schmidhuber, J. (1997). Long Short-Term Memory. Neural Computation, 9 (8), 1735–1780. Hockenmaier, J., & Steedman, M. (2007). CCGbank: A Corpus of CCG Derivations and Dependency Structures Extracted from the Penn Treebank. Computational Linguistics, 33 (3), 355–396. Hodosh, M., Young, P., & Hockenmaier, J. (2013). Framing image description as a ranking task: Data, models and evaluation metrics. Journal of Artificial Intelligence Research, 47, 853–899. Horacek, H. (1997). An Algorithm For Generating Referential Descriptions With Flexible Interfaces. In Proc. ACL’97, pp. 206–213. Hovy, D., & Søgaard, A. (2015). Tagging Performance Correlates with Author Age. In ACL’15, pp. 483–488. Hovy, E. H. (1988). Generating Natural Language Under Pragmatic Constraints. Lawrence Erlbaum Associates, Hillsdale, NJ. Hovy, E. H. (1991). Approaches to the Planning of Coherent Text. In Paris, C. L., Swartout, W. R., & Mann, W. C. (Eds.), Natural Language Generation in Artificial Intelligence and Computational Linguistics, pp. 83–102. Kluwer, Dordrecht. Hovy, E. H. (1993). Automated discourse generation using discourse structure relations. Artificial intelligence, 63 (1), 341–385. Hu, Z., Yang, Z., Liang, X., Salakhutdinov, R., & Xing, E. P. (2017). Toward Controlled Generation of Text. In Proc. ICML’17, pp. 1587–1596. Huang, T.-H., Ferraro, F., Mostafazadeh, N., Misra, I., Agrawal, A., Devlin, J., Girshick, R., He, X., Kohli, P., Batra, D., Zitnick, C. L., Parikh, D., Vanderwende, L., Galley, M., & Mitchell, M. (2016). Visual Storytelling. In Proc. NAACL-HLT’16, pp. 1233–1239. Hueske-Kraus, D. (2003). Suregen-2 : a shell system for the generation of clinical documents. In Proc. EACL’03, pp. 215–218. Hunter, J. R., Freer, Y., Gatt, A., Reiter, E., Sripada, S., & Sykes, C. (2012). Automatic generation of natural language nursing shift summaries in neonatal intensive care: BT-Nurse. Artificial Intelligence in Medicine, 56 (3), 157–172. Hüske-Kraus, D. (2003). Text generation in clinical medicine: A review. Methods of information in medicine, 42 (1), 51–60. Hutchins, W. J., & Somers, H. L. (1992). An introduction to machine translation, Vol. 362. Academic Press London. Inui, K., Tokunaga, T., & Tanaka, H. (1992). Text revision: A model and its implementation. In Dale, R., Hovy, E. H., Rosner, D., & Stock, O. (Eds.), Aspects of automated natural language generation, Vol. 587, pp. 215–230. Springer, Berlin and Heidelberg. 97 Isard, A., Brockmann, C., & Oberlander, J. (2006). Individuality and Alignment in Generated Dialogues. In Proc. INLG’06, pp. 25–32. Janarthanam, S., & Lemon, O. (2011). The GRUVE Challenge: Generating Routes under Uncertainty in Virtual Environments. In Proc. ENLG’11, pp. 208–211. Janarthanam, S., & Lemon, O. (2014). Adaptive Generation in Dialogue Systems Using Dynamic User Modeling. Computational Linguistics, 40 (4), 883–920. Jia, Y., Shelhamer, E., Donahue, J., Karayev, S., Long, J., Girshick, R., Guadarrama, S., & Darrell, T. (2014). Caffe: Convolutional Architecture for Fast Feature Embedding. In Proc. ACM International Conference on Multimedia, pp. 675–678. ACM. Johannsen, A., Hovy, D., & Søgaard, A. (2015). Cross-lingual syntactic variation over age and gender. In Proc. CoNLL’15, pp. 103–112. John, O., & Srivastava, S. (1999). The Big Five trait taxonomy: History, measurement, and theoretical perspectives. In Pervin, L., & John, O. (Eds.), Handbook of Personlity Theory and Research. Guilford Press, New York. Johnson, J., Karpathy, A., & Fei-Fei, L. (2016). DenseCap: Fully Convolutional Localization Networks for Dense Captioning. In Proc. CVPR’16, pp. 4565– 4574. Johnson, W. L., Rizzo, P., Bosma, W., Kole, S., Ghijsen, M., & Van Welbergen, H. (2004). Generating socially appropriate tutorial dialog. In Andre, E., Dybkjæ r, L., Minker, W., & Heisterkamp, P. (Eds.), Affective Dialog Systems: Proceedings of the ADS 2004 Tutorial and Research Workshop, Vol. Lecture No, pp. 254–264. Springer, Berlin and Heidelberg. Jordan, P. W., & Walker, M. A. (2005). Learning content selection rules for generating object descriptions in dialogue. Journal of Artificial Intelligence Research, 24, 157–194. Joshi, A. K., & Schabes, Y. (1997). Tree-Adjoining Grammars. In Handbook of Formal Languages, Vol. 3, pp. 69–123. Springer, New York. Kalchbrenner, N., & Blunsom, P. (2013). Recurrent Continuous Translation Models. In Proc. EMNLP’13, pp. 1700–1709. Karpathy, A., & Fei-Fei, L. (2015). Deep visual-semantic alignments for generating image descriptions. In Proc. CVPR’15, pp. 3128–3137. Karpathy, A., Joulin, A., & Fei-Fei, L. (2014). Deep Fragment Embeddings for Bidirectional Image Sentence Mapping. In Proc. NIPS’14, pp. 1–9. Kasper, R. T. (1989). A Flexible Interface for Linking Applications to Penman’s Sentence Generator. In Proc. Workshop on Speech and Natural Langauge, pp. 153–158. Kauchak, D., & Barzilay, R. (2006). Paraphrasing for automatic evaluation. In Proc. NAACL-HLT’06, pp. 455–462. 98 Kay, M. (1996). Chart Generation. In Proc. ACL’96, pp. 200–204. Kazemzadeh, S., Ordonez, V., Matten, M., & Berg, T. (2014). ReferItGame: Referring to Objects in Photographs of Natural Scenes. In Proc. EMNLP’14, pp. 787–798. Kelleher, J., Costello, F., & Van Genabith, J. (2005). Dynamically structuring, updating and interrelating representations of visual and linguistic discourse context. Artificial Intelligence, 167, 62–102. Kelleher, J., & Kruijff, G.-J. (2006). Incremental generation of spatial referring expressions in situated dialog. In Proc. COLING-ACL’06, pp. 1041–1048. Kempen, G. (2009). Clausal coordination and coordinate ellipsis in a model of the speaker. Linguistics, 47 (3), 653–696. Kennedy, C., & McNally, L. (2005). Scale Structure, Degree Modification, and the Semantics of Gradable Predicates. Language, 81 (2), 345–381. Keshtkar, F., & Inkpen, D. (2011). A pattern-based model for generating text to express emotion. In Proc. ACII’11, pp. 11–21. Kibble, R., & Power, R. (2004). Optimizing referential coherence in text generation. Computational Linguistics, 30 (4), 401–416. Kiddon, C., & Brun, Y. (2011). That’s what she said: double entendre identification. In Proc. ACL-HLT’11, pp. 89–94. Kilickaya, M., Erdem, A., Ikizler-Cinbis, N., & Erdem, E. (2017). Re-evaluating Automatic Metrics for Image Captioning. In Proc. EACL’17, pp. 199–209. Kim, J., & Mooney, R. J. (2010). Generative Alignment and Semantic Parsing for Learning from Ambiguous Supervision. In Proc. COLING’10, pp. 543– 551. Kiros, R., Zemel, R. S., & Salakhutdinov, R. (2014). Multimodal Neural Language Models. In Proc. ICML’14, pp. 1–14. Kojima, A., Tamura, T., & Fukunaga, K. (2002). Natural language description of human activities from video images based on concept hierarchy of actions. International Journal of Computer Vision, 50 (2), 171–184. Koller, A., & Petrick, R. P. (2011). Experiences with planning for natural language generation. Computational Intelligence, 27 (1), 23–40. Koller, A., & Stone, M. (2007). Sentence generation as a planning problem. In Proc. ACL’07, pp. 336–343. Koller, A., & Striegnitz, K. (2002). Generation as Dependency Parsing. In Proc. ACL’02, pp. 17–24. Koller, A., Striegnitz, K., Gargett, A., Byron, D., Cassell, J., Dale, R., Moore, J. D., & Oberlander, J. (2010). Report on the second nlg challenge on generating instructions in virtual environments (give-2). In Proc. INLG’10, pp. 243–250. 99 Koncel-Kedziorski, R., Hajishirzi, H., & Farhadi, A. (2014). Multi-resolution language grounding with weak supervision. In Proc. EMNLP’14, pp. 386– 396. Kondadadi, R., Howald, B., & Schilder, F. (2013). A Statistical NLG Framework for Aggregated Planning and Realization. In Proc. ACL’13, pp. 1406–1415. Konstas, I., & Lapata, M. (2012). Unsupervised concept-to-text generation with hypergraphs. In Proc. NAACL-HLT’12, pp. 752–761. Konstas, I., & Lapata, M. (2013). A global model for concept-to-text generation. Journal of Artificial Intelligence Research, 48, 305–346. Krahmer, E., & Theune, M. (2010). Empirical Methods in Natural Language Generation. Springer, Berlin & Heidelberg. Krahmer, E., & van Deemter, K. (2012). Computational generation of referring expressions: A survey. Computational Linguistics, 38 (1), 173–218. Krizhevsky, A., Sutskever, I., & Hinton, G. (2012). ImageNet Classification with Deep Convolutional Neural Networks. In Proc. NIPS’12, pp. 1097–1105. Kukich, K. (1987). Where do phrases come from: Some preliminary experiments in connectionist phrase generation. In Natural Language Generation: New Results in Artificial Intelligence, Psychology and Linguistics. Springer, Berlin and Heidelberg. Kukich, K. (1992). Techniques for automatically correcting words in text. ACM Computing Surveys (CSUR), 24 (4), 377–439. Kulkarni, G., Premraj, V., Dhar, S., Li, S., Choi, Y., Berg, A. C., & Berg, T. (2011). Baby Talk : Understanding and Generating Image Descriptions. In Proc. CVPR’11, pp. 1601–1608. Kulkarni, G., Premraj, V., Ordonez, V., Dhar, S., Li, S., Choi, Y., Berg, A. C., & Berg, T. (2013). Baby talk: Understanding and generating simple image descriptions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35 (12), 2891–2903. Kusner, M. J., Sun, Y., Kolkin, N. I., & Weinberger, K. Q. (2015). From Word Embeddings To Document Distances. In Proc. ICML’15, pp. 957–966. Kutlak, R., Mellish, C., & van Deemter, K. (2013). Content Selection Challenge - University of Aberdeen Entry. In Proc. ENLG’13, pp. 208–209. Kuznetsova, P., Ordonez, V., Berg, A. C., Berg, T., & Choi, Y. (2012). Collective Generation of Natural Image Descriptions. In Proc. ACL’12, pp. 359–368. Kuznetsova, P., Ordonez, V., Berg, T., & Choi, Y. (2014). TREETALK: Composition and Compression of Trees for Image Descriptions. Transactions of the Association for Computational Linguistics, 2, 351–362. Labbé, C., & Portet, F. (2012). Towards an abstractive opinion summarisation of multiple reviews in the tourism domain. In Proc. International Workshop on Sentiment Discovery from Affective Data, pp. 87–94. 100 Labov, W. (2010). Oral narratives of personal experience. In Hogan, P. C. (Ed.), Cambridge Encyclopedia of the Language Sciences, pp. 546–548. Cambridge University Press, Cambridge, UK. Lakoff, G., & Johnson, M. (1980). Metaphors we Live By. Chicago University Press, Chicago, Ill. Lampouras, G., & Androutsopoulos, I. (2013). Using Integer Linear Programming in Concept-to-Text Generation to Produce More Compact Texts. In Proc. ACL’13, pp. 561–566. Lampouras, G., & Vlachos, A. (2016). Imitation learning for language generation from unaligned data. In Proc. COLING’16, pp. 1101–1112. Langkilde-Geary, I. (2000). Forest-based statistical sentence generation. In Proc. ANLP-NAACL’00, pp. 170–177. Langkilde-Geary, I., & Knight, K. (2002). HALogen Statistical Sentence Generator. In Proc. ACL’02 (Demos), pp. 102–103. Lapata, M. (2006). Automatic Evaluation of Information Ordering: Kendall’s Tau. Computational Linguistics, 32 (4), 471–484. Lavie, A., & Agarwal, A. (2007). METEOR: An Automatic Metric for MT Evaluation with Improved Correlation with Human Judgments. In Proc. Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization, pp. 65–72. Lavoie, B., & Rambow, O. (1997). A fast and portable realiser for text generation. In Proc. ANLP’97, pp. 265–268. Law, A. S., Freer, Y., Hunter, J. R., Logie, R. H., McIntosh, N., & Quinn, J. (2005). A comparison of graphical and textual presentations of time series data to support medical decision making in the neonatal intensive care unit. Journal of clinical monitoring and computing, 19 (3), 183–94. Lebret, R., Grangier, D., & Auli, M. (2016). Generating Text from Structured Data with Application to the Biography Domain. CoRR, 1603.07771. LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521 (7553), 436–444. Lemon, O. (2008). Adaptive Natural Language Generation in Dialogue using Reinforcement Learning. In Proc. LONDIAL’08, pp. 141–148. Lemon, O. (2011). Learning what to say and how to say it: Joint optimisation of spoken dialogue management and natural language generation. Computer Speech and Language, 25 (2), 210–221. Lepp, L., Munezero, M., Granroth-wilding, M., & Toivonen, H. (2017). DataDriven News Generation for Automated Journalism. In Proc. INLG’17, pp. 188–197. Lester, J. C., & Porter, B. W. (1997). Developing and Empirically Evaluating Robust Explanation Generators : The KNIGHT Experiments. Computational Linguistcs, 23 (1), 65–101. 101 Levelt, W. (1989). Speaking: From Intention to Articulation. MIT Press, Cambridge, MA. Levelt, W. (1999). Producing spoken language: a blueprint of the speaker. In Brown, C., & Hagoort, P. (Eds.), The Neurocognition of Language, pp. 83–122. Oxford University Press, Oxford and London. Levelt, W., Roelofs, A., & Meyer, A. S. (1999). A theory of lexical access in speech production. Behavioral and Brain Sciences, 22 (1), 1–75. Levenshtein, V. I. (1966). Binary codes capable of correcting deletions, insertions, and reversals. Soviet Physics Doklady, 10 (8), 707–710. Lewis, D. D., & Catlett, J. (1994). Heterogeneous uncertainty sampling for supervised learning. In Proc. ICML’94, pp. 148–156. Li, J., Galley, M., Brockett, C., Spithourakis, G. P., Gao, J., & Dolan, B. (2016). A Persona-Based Neural Conversation Model. In Proc. ACL’16, pp. 994– 1003. Li, S., Kulkarni, G., Berg, T., Berg, A. C., & Choi, Y. (2011). Composing simple image descriptions using web-scale n-grams. In Proc. CoNLL’11, pp. 220–228. Liang, P., Jordan, M. I., & Klein, D. (2009). Learning Semantic Correspondences with Less Supervision. In Proc. ACL-IJCNLP’09, pp. 91–99. Lin, C.-Y., & Hovy, E. H. (2003). Automatic Evaluation of Summaries Using N-gram Co-Occurrence Statistics. In Proc. HLT-NAACL’03, pp. 71–78. Lin, C.-Y., & Och, F. J. (2004). Automatic Evaluation of Machine Translation Quality Using Using Longest Common Subsequence and Skip-Bigram Statistics. In Proc. ACL’04, pp. 605–612. Lin, D., & Kong, C. (2015). Generating Multi-sentence Natural Language Descriptions of Indoor Scenes. In Proc. BMVC’15, pp. 1–13. Lin, T. Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., & Zitnick, C. L. (2014). Microsoft COCO: Common objects in context. In Proc. ECCV’14, Vol. 8693 LNCS, pp. 740–755. Springer. Lipschultz, M., Litman, D. J., Jordan, P. W., & Katz, S. (2011). Predicting Changes in Level of Abstraction in Tutor Responses to Students. In Proc. FLAIRS’11, pp. 525–530. Lipton, Z. C., Vikram, S., & McAuley, J. (2016). Generative Concatenative Nets Jointly Learn to Write and Classify Reviews. CoRR, 1511.03683, 1–11. Lowe, D. G. (2004). Distinctive image features from scale invariant keypoints. International Journal of Computer Vision, 60, 91–110. Lukin, S., & Walker, M. A. (2013). Really? Well. Apparently Bootstrapping Improves the Performance of Sarcasm and Nastiness Classifiers for Online Dialogue. In Proc. LSM’13, pp. 30–40. 102 Luong, M.-T., Le, Q. V., Sutskever, I., Vinyals, O., & Kaiser, L. (2015). MultiTask Sequence to Sequence Learing. CoRR, 1511.06114. Luong, M.-T., Socher, R., & Manning, C. D. (2013). Better Word Representations with Recursive Neural Networks for Morphology. In Proc. CoNLL’13, pp. 104–113. Lutz, T. (1959). Stochastische texte. Augenblick, 4 (1), 3–9. Macdonald, I., & Siddharthan, A. (2016). Summarising news stories for children. In Proc. INLG’16, pp. 1–10. Mahamood, S., & Reiter, E. (2011). Generating Affective Natural Language for Parents of Neonatal Infants. In Proc. ENLG’11, pp. 12–21. Mairesse, F., Gasic, M., Jurcicek, F., Keizer, S., Thompson, B., Yu, K., & Young, S. (2010). Phrase-based statistical language generation using graphical models and active learning. In Proc. ACL’10, pp. 1552–1561. Mairesse, F., & Walker, M. A. (2010). Towards personality-based user adaptation: Psychologically informed stylistic language generation. User Modelling and User-Adapted Interaction, 20 (3), 227–278. Mairesse, F., & Walker, M. A. (2011). Controlling User Perceptions of Linguistic Style: Trainable Generation of Personality Traits. Computational Linguistics, 37 (3), 455–488. Mairesse, F., & Young, S. (2014). Stochastic language generation in dialogue using factored language models. Computational Linguistcs, 4 (4), 763–799. Malinowski, M., Rohrbach, M., & Fritz, M. (2016). Ask your neurons: A neuralbased approach to answering questions about images. In Proc. ICCV’15, pp. 1–9. Mani, I. (2001). Automatic Summarization. John Benjamins Publishing Company, Amsterdam. Mani, I. (2010). The Imagined Moment: Time, Narrative and Computation. University of Nebraska Press, Lincoln, NE. Mani, I. (2013). Computational Modeling of Narrative. Morgan and Claypool Publishers, USA. Mann, W. C., & Matthiessen, C. M. (1983). Nigel: A systemic grammar for text generation (Technical Report RR-83-105). Tech. rep., ISI, University of Southern California, Marina del Rey, CA. Mann, W. C., & Moore, J. A. (1981). Computer generation of multiparagraph text. American Journal of Computational Linguistics, 7 (1), 17–29. Mann, W. C., & Thompson, S. A. (1988). Rhetorical structure theory: Toward a functional theory of text organization. Text, 8 (3), 243–281. Manning, C. D. (2015). Last words: Computational linguistics and deep learning. Computational Linguistics, 41, 701–707. 103 Manurung, R., Ritchie, G. D., & Thompson, H. (2012). Using genetic algorithms to create meaningful poetic text. Journal of Experimental & Theoretical Artificial Intelligence, 24 (1), 43–64. Mao, J., Huang, J., Toshev, A., Camburu, O., Yuille, A., & Murphy, K. (2016). Generation and Comprehension of Unambiguous Object Descriptions. In Proc. CVPR’16, pp. 11–22. Mao, J., Xu, W., Yang, Y., Wang, J., Huang, Z., & Yuille, A. (2015a). Deep Captioning with Multimodal Recurrent Neural Networks (m-RNN). CoRR, 1412.6632. Mao, J., Xu, W., Yang, Y., Wang, J., Huang, Z., & Yuille, A. (2015b). Learning like a Child: Fast Novel Visual Concept Learning from Sentence Descriptions of Images. In Proc. ICCV’15, pp. 2533–2541. Marciniak, T., & Strube, M. (2004). Classification-based generation using TAG. In Proc. INLG’04, pp. 100–109. Marciniak, T., & Strube, M. (2005). Beyond the Pipeline: Discrete Optimization in NLP. In Proc. CoNLL’05, pp. 136–143. Martin, J. H. (1990). A Computational Model of Metaphor Interpretation. Academic Press, New York. Martin, J. H. (1994). Metabank: A knowledge-base of metaphoric language conventions. Computational Intelligence, 10 (2), 134–149. Martinez, H. P., Yannakakis, G. N., & Hallam, J. (2014). Don’t classify ratings of affect; Rank Them!. IEEE Transactions on Affective Computing, 5 (3), 314–326. Mason, R., & Charniak, E. (2014). Domain-Specific Image Captioning. In Proc. CONLL’14, pp. 11–20. Mason, W., & Suri, S. (2012). Conducting behavioral research on amazons mechanical turk. Behavior Research Methods, 44 (1), 1–23. May, J., & Priyadarshi, J. (2017). SemEval-2017 Task 9: Abstract Meaning Representation Parsing and Generation. In Proc. SemEval’17, pp. 536– 545. Mazzei, A., Battaglino, C., & Bosco, C. (2016). SimpleNLG-IT : adapting SimpleNLG to Italian. In Proc. INLG’16, pp. 184–192. McCoy, K. F., & Strube, M. (1999). Generating Anaphoric Expressions: Pronoun or Definite Description?. In Cristea, D., Ide, N., & Marcu, D. (Eds.), The Relation of Discourse/Dialogue Structure and Reference: Proceedings of the Workshop held in conjunction with ACL’99, pp. 63–71. McDermott, D. (2000). The 1998 AI planning systems competition. AI magazine, 21 (2), 1–33. McDonald, D. D. (1993). Issues in the Choice of a Source for Natural Language Generation. Computational Linguistics, 19 (1), 191–197. 104 McDonald, D. D. (2010). Natural language generation. In Indurkhya, N., & Damerau, F. (Eds.), Handbook of Natural Language Processing (2nd edition)., pp. 121–144. Chapman and Hall/CRC, London. McDonald, D. D., & Pustejovsky, J. D. (1985). A computational theory of prose style for natural language generation. In Proc. EACL’85, pp. 187–193. McIntyre, N., & Lapata, M. (2009). Learning to Tell Tales : A Data-driven Approach to Story Generation. In Proc. ACL-IJCNLP’09, pp. 217–225. McKeown, K. R. (1985). Text Generation. Cambridge University Press, Cambridge, UK. McRoy, S. W., Channarukul, S., & Ali, S. S. (2003). An augmented templatebased approach to text realization. Natural Language Engineering, 9 (4), 381–420. Meehan, J. R. (1977). TALE-SPIN, An Interactive Program that Writes Stories. In Proc. IJCAI’77, pp. 91–98. Mei, H., Bansal, M., & Walter, M. R. (2016). What to talk about and how? Selective generation using LSTMs with coarse-to-fine alignment. In Proc. NAACL-HLT’16, pp. 720–730. Meister, J. C. (2003). Computing Action. A Narratological Approach. Mouton de Gruyter, Berlin. Mellish, C., & Dale, R. (1998). Evaluation in the context of natural language generation. Computer Speech & Language, 12 (4), 349–373. Mellish, C., Scott, D., Cahill, L., Paiva, D. S., Evans, R., & Reape, M. (2006). A Reference Architecture for Natural Language Generation Systems. Natural Language Engineering, 12 (1), 1–34. Meteer, M. W. (1991). Bridging the generation gap between text planning and linguistic realization. Computational Intelligence, 7 (4), 296–304. Meteer, M. W., McDonald, D. D., Anderson, S., Forster, D., Gay, L., Iluettner, A., & Sibun, P. (1987). Mumble-86: Design and Implementation (Technical Report COINS 87-87). Tech. rep., University of Massachusetts at Amherst, Amherst, MA. Mikolov, T., Chen, K., Corrado, G., & Dean, J. (2013). Distributed Representations of Words and Phrases and their Compositionality. In Proc. NIPS’13, pp. 3111–3119. Mikolov, T., Karafiat, M., Burget, L., Cernocky, J., & Khudanpur, S. (2010). Recurrent Neural Network based Language Model. In Proc. Interspeech’10, pp. 1045–1048. Miller, G. A. (1995). WordNet: a lexical database for English. Communications of the ACM, 38 (11), 39–41. Mitchell, M., Dodge, J., Goyal, A., Yamaguchi, K., Stratos, K., Han, X., Mensch, A., Berg, A., Han, X., Berg, T., & Daume III, H. (2012). Midge: Generating Image Descriptions From Computer Vision Detections. In Proc. EACL’12, pp. 747–756. 105 Mitchell, M., van Deemter, K., & Reiter, E. (2013). Generating Expressions that Refer to Visible Objects. In Proc. NAACL’13, pp. 1174–1184. Mnih, A., & Hinton, G. (2007). Three new graphical models for statistical language modelling. In Proc. ICML’07, pp. 641–648. Molina, M., Stent, A., & Parodi, E. (2011). Generating Automated News to Explain the Meaning of Sensor Data. In Proc. IDA’11, pp. 282–293. Montfort, N. (2007). Ordering events in interactive fiction narratives. In Proc. AAAI Fall Symposium on Intelligent Narrative Technologies, pp. 87–94. Montfort, N. (2013). World clock. Harvard Book Store Press, Cambridge, MA. Moore, J. D., & Paris, C. (1993). Planning text for advisory dialogues: Capturing intentional and rhetorical information. Computational Linguistics, 19 (4), 651–694. Moore, J. D., Porayska-Pomsta, K., Zinn, C., & Varges, S. (2004). Generating Tutorial Feedback with Affect. In Proc. FLAIRS’04, pp. 923–928. Mostafazadeh, N., Misra, I., Devlin, J., Mitchell, M., He, X., & Vanderwende, L. (2016). Generating natural questions about an image. In Proc. ACL’16, pp. 1802–1813. Mrabet, Y., Vougiouklis, P., Kilicoglu, H., Gardent, C., Demner-Fushman, D., Hare, J., & Simperl, E. (2016). Aligning Texts and Knowledge Bases with Semantic Sentence Simplification. In Proc. WebNLG’16, pp. 29–36. Muscat, A., & Belz, A. (2015). Generating Descriptions of Spatial Relations between Objects in Images. In Proc. ENLG’15, pp. 100–104. Nakanishi, H., Miyao, Y., & Tsujii, J. (2005). Probabilistic Models for Disambiguation of an HPSG-Based Chart Generator. In Proc. IWPT’05, pp. 93–102. Nakatsu, C., & White, M. (2010). Generating with Discourse Combinatory Categorial Grammar. Linguistic Issues in Language Technology, 4 (1), 1– 62. Nauman, A. D., Stirling, T., & Borthwick, A. (2011). What makes writing good? an essential question for teachers. The Reading Teacher, 64 (5), 318–328. Nemhauser, G. L., & Wolsey, L. A. (1988). Integer programming and combinatorial optimization. Wiley, Chichester, UK. Nenkova, A., & McKeown, K. R. (2011). Automatic Summarization. Foundations and Trends in Information Retrieval, 5 (2-3), 103–233. Nenkova, A., & Passonneau, R. (2004). Evaluating content selection in summarization: The pyramid method. In Proc. HLT-NAACL’04, pp. 145–152. Netzer, Y., Gabay, D., Goldberg, Y., & Elhadad, M. (2009). Gaiku : Generating Haiku with Word Associations Norms. In Proc. Workshop on Computational Approaches to Linguistics Creativity, pp. 32–39. 106 Niederhoffer, K. G., & Pennebaker, J. W. (2002). Linguistic Style Matching in Social Interaction. Journal of Language and Social Psychology, 21 (4), 337–360. Nirenburg, S., Lesser, V., & Nyberg, E. (1989). Controlling a language generation planner. In Proc. IJCAI’89, pp. 1524–1530. Norrick, N. R. (2005). The dark side of tellability. Narrative Inquiry, 15 (2), 323–343. Novikova, J., & Rieser, V. (2016a). The analogue challenge: Non aligned language generation. In Proc. INLG’16, pp. 168–170. Novikova, J., & Rieser, V. (2016b). Crowdsourcing NLG Data: Pictures elicit better data. In Proc. INLG’16, pp. 265–273. Oberlander, J. (1998). Do the Right Thing ... but Expect the Unexpected. Computational Linguistics, 24 (3), 501–507. Oberlander, J., & Lascarides, A. (1992). Preventing false temporal implicatures: Interactive defaults for text generation. In Proc. COLING’92, pp. 721– 727. Oberlander, J., & Nowson, S. (2006). Whose thumb is it anyway ? Classifying author personality from weblog text. In Proc. COLING/ACL’06, pp. 627– 634. Och, F. J., & Ney, H. (2003). A systematic comparison of various statistical alignment models. Computational linguistics, 29 (1), 19–51. O’Donnell, M. (2001). ILEX: an architecture for a dynamic hypertext generation system. Natural Language Engineering, 7 (3), 225–250. Oh, A. H., & Rudnicky, A. I. (2002). Stochastic natural language generation for spoken dialog systems. Computer Speech and Language, 16 (3-4), 387–407. Oliva, A., & Torralba, A. (2001). Modeling the shape of the scene: A holistic representation of the spatial envelope. International Journal of Computer Vision, 42 (3), 145–175. Ordonez, V., Deng, J., Choi, Y., Berg, A. C., & Berg, T. (2013). From Large Scale Image Categorization to Entry-Level Categories. In Proc. ICCV’13, pp. 2768–2775. Ordonez, V., Kulkarni, G., & Berg, T. (2011). Im2text: Describing images using 1 million captioned photographs. In Proc. NIPS’11, pp. 1143–1151. Ordonez, V., Liu, W., Deng, J., Choi, Y., Berg, A. C., & Berg, T. (2016). Learning to name objects. Communications of the ACM, 59 (3), 108–115. Oremus, W. (2014). The first news report on the L.A. earthquake was written by a robot. https://goo.gl/jeHRPX. Orkin, J., & Roy, D. (2007). The restaurant game: Learning social behavior and language from thousands of players online. Journal of Game Development, 3, 39–60. 107 Ortiz, L. G. M., Wolff, C., & Lapata, M. (2015). Learning to Interpret and Describe Abstract Scenes. In Proc. NAACL’15, pp. 1505–1515. Paiva, D. S., & Evans, R. (2005). Empirically-based control of natural language generation. In Proc. ACL’05, pp. 58–65. Pang, B., & Lee, L. (2008). Opinion Mining and Sentiment Analysis. Foundations and Trends in Information Retrieval, 1 (2), 1–135. Papineni, K., Roukos, S., Ward, T., & Zhu, W.-j. (2002). BLEU : a Method for Automatic Evaluation of Machine Translation. In Proc. ACL’02, pp. 311–318. Passonneau, R. J. (2006). Measuring Agreement on Set-valued Items (MASI) for Semantic and Pragmatic Annotation. In Proc. LREC’06, pp. 831–836. Pennebaker, J. W., Booth, R. J., & Francis, M. E. (2007). Linguistic Inquiry and Word Count (LIWC2007): A text analysis program. Austin, TX. Pennington, J., Socher, R., & Manning, C. D. (2014). GloVe: Global Vectors for Word Representation. In Proc. EMNLP’14, pp. 1532–1543. Pérez, R., Ortiz, O., Luna, W., Negrete, S., Castellanos, V., Peñalosa, E., & Ávila, R. (2011). A System for Evaluating Novelty in Computer Generated Narratives. In Proc. ICCC’11, pp. 63–68. Petrovic, S., & Matthews, D. (2013). Unsupervised joke generation from big data. In Proc. ACL’13, pp. 228–232. Pickering, M. J., & Garrod, S. (2004). Toward a mechanistic psychology of dialogue. Behavioral and Brain Sciences, 27 (2), 169–226. Pickering, M. J., & Garrod, S. (2013). An integrated theory of language production and comprehension. Behavioral and Brain Sciences, 36 (4), 329–347. Piwek, P. (2003). An annotated bibliography of affective natural language generation. Tech. rep., ITRI, University of Brighton. Piwek, P., & Boyer, K. E. (2012). Varieties of question generation: Introduction to this special issue. Dialogue and Discourse, 3 (2), 1–9. Plachouras, V., Smiley, C., Bretz, H., Taylor, O., Leidner, J. L., Song, D., & Schilder, F. (2016). Interacting with financial data using natural language. In Proc. SIGIR’16, pp. 1121–1124. Poesio, M., Stevenson, R., Di Eugenio, B., & Hitzeman, J. (2004). Centering: A parametric theory and its instantiations. Computational Linguistics, 30 (3), 309–363. Ponnamperuma, K., Siddharthan, A., Zeng, C., Mellish, C., & van der Wal, R. (2013). Tag2Blog: Narrative Generation from Satellite Tag Data. In Proc. ACL’13, pp. 169–174. Portet, F., Reiter, E., Gatt, A., Hunter, J. R., Sripada, S., Freer, Y., & Sykes, C. (2009). Automatic generation of textual summaries from neonatal intensive care data. Artificial Intelligence, 173 (7-8), 789–816. 108 Power, R., Scott, D., & Bouayad-Agha, N. (2003). Document Structure. Computational Linguistics, 29 (2), 211–260. Power, R., & Williams, S. (2012). Generating numerical approximations. Computational Linguistics, 38 (1), 113–134. Propp, V. (1968). Morphology of the Folk Tale. University of Texas Press, Austin, TX. Rajkumar, R., & White, M. (2011). Linguistically Motivated Complementizer Choice in Surface Realization. In Proc. UCNLG+Eval’11, pp. 39–44. Rajkumar, R., & White, M. (2014). Better Surface Realization through Psycholinguistics. Language and Linguistics Compass, 8 (10), 428–448. Ramos-Soto, A., Bugarin, A. J., Barro, S., & Taboada, J. (2015). Linguistic Descriptions for Automatic Generation of Textual Short-Term Weather Forecasts on Real Prediction Data. IEEE Transactions on Fuzzy Systems, 23 (1), 44–57. Ratnaparkhi, A. (1996). A maximum entropy model for part-of-speech tagging. In Proc. EMNLP’96, pp. 133–142. Ratnaparkhi, A. (2000). Trainable methods for surface natural language generation. In Proc. NAACL’00, pp. 194–201. Reape, M., & Mellish, C. (1999). Just what is aggregation anyway?. In Proc. ENLG’99, pp. 20–29. Regneri, M., Rohrbach, M., Wetzel, D., & Thater, S. (2013). Grounding Action Descriptions in Videos. Transactions of the Association for Computational Linguistics, 1, 25–36. Reiter, E. (1994). Has a consensus NL generation architecture appeared, and is it psycholinguistically plausible?. In Proc. IWNLG’94, pp. 163–170. Reiter, E. (2000). Pipelines and Size Constraints. Computational Linguistics, 26 (2), 251–259. Reiter, E. (2007). An architecture for data-to-text systems. In Proc. ENLG’07, pp. 97–104. Reiter, E. (2010). Natural Language Generation. In Clark, A., Fox, C., & Lappin, S. (Eds.), Handbook of Computational Linguistics and Natural Language Processing, pp. 574–598. Wiley, Oxford. Reiter, E., & Belz, A. (2009). An Investigation into the Validity of Some Metrics for Automatically Evaluating Natural Language Generation Systems. Computational Linguistcs, 35 (4), 529–558. Reiter, E., & Dale, R. (1997). Building natural-language generation systems. Natural Language Engineering, 3, 57–87. Reiter, E., & Dale, R. (2000). Building Natural Language Generation Systems. Cambridge University Press, Cambridge, UK. 109 Reiter, E., Gatt, A., Portet, F., & van Der Meulen, M. (2008). The Importance of Narrative and Other Lessons from an Evaluation of an NLG System that Summarises Clinical Data. In Proc. INLG’08, pp. 147–155. Reiter, E., Mellish, C., & Levine, J. (1995). Automatic Generation of Technical Documentation. Applied Artificial Intelligence, 9, 259–287. Reiter, E., Robertson, R., & Osman, L. M. (2003). Lessons from a failure: Generating tailored smoking cessation letters. Artificial Intelligence, 144 (1-2), 41–58. Reiter, E., & Sripada, S. (2002). Should corpora texts be gold standards for NLG?. In Proc. INLG’02, pp. 97–104. Reiter, E., Sripada, S., Hunter, J. R., Yu, J., & Davy, I. (2005). Choosing words in computer-generated weather forecasts. Artificial Intelligence, 167 (1-2), 137–169. Riedl, M. O., & Young, R. M. (2005). An objective character believability evaluation procedure for multi-agent story generation systems. In Panayiotopoulos, T., Gratch, J., Aylett, R., Ballin, D., Olivier, P., & Thomas Rist (Eds.), Proc. 5th International Conference on Intelligent Virtual Agents. Riedl, M. O., & Young, R. M. (2010). Narrative planning: Balancing plot and character. Journal of Artificial Intelligence Research, 39, 217–268. Rieser, V., Keizer, S., Liu, X., & Lemon, O. (2011). Adaptive Information Presentation for Spoken Dialogue Systems : Evaluation with human subjects. In Proc. ENLG’11, pp. 102–109. Rieser, V., & Lemon, O. (2009). Natural Language Generation as Planning Under Uncertainty for Spoken Dialogue Systems. In EACL’09, pp. 683– 691. Rieser, V., & Lemon, O. (2011). Reinforcement Learning for Adaptive Dialogue Systems. Springer, Berlin and Heidelberg. Ritchie, G. D. (2009). Can computers create humor?. AI Magazine, 30 (3), 71–81. Ritter, A., Cherry, C., & Dolan, W. B. (2011). Data-driven response generation in social media. In Proc. EMNLP’11, pp. 583–593. Robin, J. (1993). A Revision-Based Generation Architecture for Reporting Facts in their Historical Context. In Horacek, H., & Zock, M. (Eds.), New Concepts in Natural Language Generation: Planning, Realization and Systems, pp. 238–268. Pinter, London. Roy, D. (2002). Learning visually grounded words and syntax for a scene description task. Computer Speech and Language, 16 (3-4), 353–385. Roy, D., & Reiter, E. (2005). Connecting language to the world. Artificial Intelligence, 167 (1-2), 1–12. 110 Ruder, S. (2017). Transfer learning: Machine learning’s next frontier. http: //ruder.io/transfer-learning/. Rus, V., Piwek, P., Stoyanchev, S., Wyse, B., Lintean, M., & Moldovan, C. (2011). Question generation shared task and evaluation challenge: status report. In Proc. ENLG’11, pp. 318–320. Rus, V., Wyse, B., Piwek, P., Lintean, M., Stoyanchev, S., & Moldovan, C. (2010). Overview of the first question generation shared task evaluation challenge. In Proc. 3rd Workshop on Question Generation, pp. 45–57. Schwartz, H. A., Eichstaedt, J. C., Kern, M. L., Dziurzynski, L., Ramones, S. M., Agrawal, M., Shah, A., Kosinski, M., Stillwell, D., Seligman, M. E. P., & Ungar, L. H. (2013). Personality, gender, and age in the language of social media: the open-vocabulary approach. PloS one, 8 (9), 1–16. Schwenk, H., & Gauvain, J.-l. (2005). Training Neural Network Language Models. In Proc. EMNLP/HLT’05, pp. 201–208. Scott, D., & Sieckenius de Souza, C. (1990). Getting the message across in RSTbased text generation. In Dale, R., Mellish, C., & Zock, M. (Eds.), Current research in natural language generation, pp. 47–73. Academic Press Professional, Inc., San Diego, CA. Searle, J. R. (1969). Speech Acts: An Essay in the Philosophy of Language. Cambridge University Press, Cambridge, UK. Serban, I. V., Sordoni, A., Bengio, Y., Courville, A., & Pineau, J. (2016). Building End-To-End Dialogue Systems Using Generative Hierarchical Neural Network Models. In Proc. AAAI’16, pp. 3776–3784. Shaw, J. (1998). Clause aggregation using linguistic knowledge. IWNLG’98, pp. 138–148. In Proc. Sheikha, F. A., & Inkpen, D. (2011). Generation of Formal and Informal Sentences. In Proc. ENLG’11, pp. 187–193. Shutova, E., Teufel, S., & Korhonen, A. (2012). Statistical Metaphor Processing. Computational Linguistics, 2 (2013), 301–353. Siddharthan, A. (2014). A survey of research on text simplification. International Journal of Applied Linguistics, 165 (2), 259–298. Siddharthan, A., Green, M., van Deemter, K., Mellish, C., & van der Wal, R. (2013). Blogging birds: Generating narratives about reintroduced species to promote public engagement. In Proc. INLG’13, pp. 120–124. Siddharthan, A., & Katsos, N. (2012). Offline sentence processing measures for testing readability with users. In Proc. PITR’12, pp. 17–24. Siddharthan, A., Nenkova, A., & McKeown, K. R. (2011). Information Status Distinctions and Referring Expressions: An Empirical Study of References to People in News Summaries. Computational Linguistics, 37 (4), 811–842. Simonyan, K., & Zisserman, A. (2015). Very Deep Convolutional Networks for Large-Scale Image Recognition. In Proc. ICLR’15, pp. 1–10. 111 Sleimi, A., & Gardent, C. (2016). Generating Paraphrases from DBPedia using Deep Learning. In Proc. WebNLG’16, pp. 54–57. Snover, M., Dorr, B., Schwartz, R., Micciulla, L., & Makhoul, J. (2006). A Study of Translation Edit Rate with Targeted Human Annotation. In Proc. AMTA’06, pp. 223–231. Socher, R., Karpathy, A., Le, Q. V., Manning, C. D., & Ng, A. Y. (2014). Grounded Compositional Semantics for Finding and Describing Images with Sentences. Transactions of the Association for Computational Linguistics, 2, 207–218. Sordoni, A., Galley, M., Auli, M., Brockett, C., Ji, Y., Mitchell, M., Nie, J.-Y., Gao, J., & Dolan, B. (2015). A Neural Network Approach to ContextSensitive Generation of Conversational Responses. In Proc. NAACLHLT’15, pp. 196–205. Sparck Jones, K., & Galliers, J. R. (1996). Evaluating Natural Language Processing Systems: An Analysis and Review. Springer, Berlin and Heidelberg. Sripada, S., Reiter, E., & Davy, I. (2003). SUMTIME-MOUSAM: Configurable Marine Weather Forecast Generator. Expert Update, 6 (1), 4–10. Sripada, S., Reiter, E., & Hawizy, L. (2005). Evaluation of an NLG System using Post-Edit Data: Lessons Learned. In Proc. ENLG’05, pp. 133–139. Stede, M. (2000). The hyperonym problem revisited: Conceptual and lexical hierarchies in language. In Proc. INLG’00, pp. 93–99. Steedman, M. (2000). The Syntactic Process. MIT Press, Cambridge, MA. Steedman, M., & Petrick, R. P. (2007). Planning dialog actions. In Proc. SIGDIAL’07, pp. 265–272. Stent, A., Marge, M., & Singhai, M. (2005). Evaluating evaluation methods for generation in the presence of variation. In Proc. CiCLing’05, pp. 341–351. Stent, A., & Molina, M. (2009). Evaluating automatic extraction of rules for sentence plan construction. In Proc. SIGDIAL’09, pp. 290–297. Stock, O., & Strapparava, C. (2005). The act of creating humorous acronyms. Applied Artificial Intelligence, 19 (2), 137–151. Stock, O., Zancanaro, M., Busetta, P., Callaway, C., Krüger, A., Kruppa, M., Kuflik, T., Not, E., & Rocchi, C. (2007). Adaptive, intelligent presentation of information for the museum visitor in PEACH. User Modeling and User-Adapted Interaction, 17 (3), 257–304. Stoia, L., & Shockley, D. (2006). Noun phrase generation for situated dialogs. In Proc. INLG’06, pp. 81–88. Stone, M. (2000). On Identifying Sets. In Proc. INLG’00, pp. 116–123. Stone, M., & Webber, B. (1998). Textual Economy through Close Coupling of Syntax and Semantics. In Proc. INLG’98, pp. 178–187. 112 Striegnitz, K., Gargett, A., Garoufi, K., Koller, A., & Theune, M. (2011). Report on the second NLG challenge on generating instructions in virtual environments (GIVE-2). In Proc. ENLG’11, pp. 243–250. Strong, C. R., Mehta, M., Mishra, K., Jones, A., & Ram, A. (2007). Emotionally driven natural language generation for personality rich characters in interactive games. In Proc. AIIDE’07, pp. 98–100. Sutskever, I., Martens, J., & Hinton, G. (2011). Generating Text with Recurrent Neural Networks. In Proc. ICML’11, pp. 1017–1024. Sutskever, I., Vinyals, O., & Le, Q. V. (2014). Sequence to sequence learning with neural networks. In Proc. NIPS’14, pp. 3104–3112. Tang, J., Yang, Y., Carton, S., Zhang, M., & Mei, Q. (2016). Context-aware Natural Language Generation with Recurrent Neural Networks. CoRR, 1611.09900. Theune, M., Hielkema, F., & Hendriks, P. (2006). Performing aggregation and ellipsis using discourse structures. Research on Language and Computation, 4, 353–375. Theune, M., Klabbers, E., de Pijper, J.-R., Krahmer, E., & Odijk, J. (2001). From data to speech: a general approach. Natural Language Engineering, 7 (1), 47–86. Theune, M. (2003). Natural language generation for dialogue: System survey. Tech. rep., Twente University. Thomason, J., Venugopalan, S., Guadarrama, S., Saenko, K., & Mooney, R. J. (2014). Integrating Language and Vision to Generate Natural Language Descriptions of Videos in the Wild. In Proc. COLING’14, pp. 1218–1227. Thompson, H. (1977). Strategy and Tactics: a Model for Language Production. In Papers from the 13th Regional Meeting of the Chicago Linguistic Society, Vol. 13, pp. 651–668. Tintarev, N., Reiter, E., Black, R., Waller, A., & Reddington, J. (2016). Personal storytelling: Using Natural Language Generation for children with complex communication needs, in the wild. International Journal of Human Computer Studies, 92-93, 1–16. Togelius, J., Yannakakis, G. N., Stanley, K. O., & Browne, C. (2011). Searchbased procedural content generation: A taxonomy and survey. IEEE Transactions on Computational Intelligence and AI in Games, 3 (3), 172– 186. Turian, J., Shen, L., & Melamed, I. D. (2003). Evaluation of Machine Translation and its Evaluation. In Proc. MT Summit IX, pp. 386–393. Turner, R., Sripada, S., Reiter, E., & Davy, I. (2008). Selecting the Content of Textual Descriptions of Geographically Located Events in SpatioTemporal Weather Data. In Applications and Innovations in Intelligent Systems XV, pp. 75–88. 113 Turner, S. R. (1992). MINSTREL: A computer model of creativity and storytelling. Ph.d. thesis, University of California at Los Angeles. van Dalen, A. (2012). The algorithms behind the headlines. Journalism Practice, 6 (5-6), 648–658. van Deemter, K. (2012). Not exactly: In praise of vagueness. Oxford University Press, Oxford. van Deemter, K. (2016). Designing algorithms for referring with proper names. In Proc. INLG 2016, pp. 31–35. van Deemter, K., Gatt, A., van der Sluis, I., & Power, R. (2012a). Generation of Referring Expressions: Assessing the Incremental Algorithm. Cognitive Science, 36 (5), 799–836. van Deemter, K., Gatt, A., van Gompel, R. P. G., & Krahmer, E. (2012b). Toward a computational psycholinguistics of reference production. Topics in cognitive science, 4 (2), 166–83. van Deemter, K., Krahmer, E., & Theune, M. (2005). Real versus templatebased natural language generation: A false opposition?. Computational Linguistics, 31 (1), 15–24. van Deemter, K., Krenn, B., Piwek, P., Klesen, M., Schröder, M., & Baumann, S. (2008). Fully generated scripted dialogue for embodied agents. Artificial Intelligence, 172 (10), 1219–1244. van der Lee, C., Krahmer, E., & Wubben, S. (2017). Pass: A dutch data-to-text system for soccer, targeted towards specific audiences. In Proc. INLG’17, pp. 95–104. van der Meulen, M., Logie, R. H., Freer, Y., Sykes, C., McIntosh, N., & Hunter, J. (2007). When a Graph is Poorer Than 100 Words: A Comparison of Computerised Natural Language Generation, Human Generated Descriptions and Graphical Displays in Neonatal Intensive Care. Applied Cognitive Psychology, 21, 1057–1075. van der Sluis, I., & Mellish, C. (2010). Towards Empirical Evaluation of Affective Tactical NLG. In Krahmer, E., & Theune, M. (Eds.), Empirical methods in natural language generation, pp. 242–263. Springer, Berlin and Heidelberg. van der Wal, R., Sharma, N., Mellish, C., Robinson, A., & Siddharthan, A. (2016). The role of automated feedback in training and retaining biological recorders for citizen science. Conservation Biology, 30 (3), 550–561. Varges, S., & Mellish, C. (2010). Instance-based natural language generation. Natural Language Engineering, 16 (3), 309–346. Vaudry, P.-L., & Lapalme, G. (2013). Adapting SimpleNLG for bilingual FrenchEnglish realisation. In Proc. ENLG’13, pp. 183–187. Veale, T. (2013). Once More, With Feeling! Using Creative Affective Metaphors to Express Information Needs. In Proc. ICCM’13, pp. 16–23. 114 Veale, T., & Hao, Y. (2007). Comprehending and Generating Apt Metaphors: A Web-driven, Case-based Approach to Figurative Language. In Proc. AAAI’07, pp. 1471–1476. Veale, T., & Hao, Y. (2008). A fluid knowledge representation for understanding and generating creative metaphors. In Proc. COLING’08, pp. 945–952. Veale, T., & Li, G. (2015). Distributed divergent creativity: Computational creative agents at web scale. Cognitive Computation, 8 (2), 175–186. Vedantam, R., Zitnick, C. L., & Parikh, D. (2015). CIDEr: Consensus-based image description evaluation. In Proc. CVPR’15, pp. 4566–4575. Venigalla, H., & Di Eugenio, B. (2013). UIC-CSC: The Content Selection Challenge Entry from the University of Illinois at Chicago. In Proc. ENLG’13, pp. 210–211. Venugopalan, S., Rohrbach, M., Darrell, T., Donahue, J., Saenko, K., & Mooney, R. J. (2015a). Sequence to Sequence Video to Text. In Proc. ICCV’15, pp. 4534–4542. Venugopalan, S., Xu, H., Donahue, J., Rohrbach, M., Mooney, R. J., & Saenko, K. (2015b). Translating Videos to Natural Language Using Deep Recurrent Neural Networks. In Proc. NAACL’15, pp. 1494–1504. Viethen, J., & Dale, R. (2007). Evaluation in natural language generation: Lessons from referring expression generation. Traitement Automatique des Langues, 48 (1), 141–160. Viethen, J., & Dale, R. (2008). The Use of Spatial Relations in Referring Expression Generation. In Proc. INLG’08, pp. 59–67. Viethen, J., & Dale, R. (2010). Speaker-dependent variation in content selection for referring expression generation. In Proc. 8th Australasian Language Technology Workshop, pp. 81–89. Viethen, J., & Dale, R. (2011). GRE3D7: A Corpus of Distinguishing Descriptions for Objects in Visual Scenes. In Proc. UCNLG+Eval’11, pp. 12–22. Vinyals, O., Toshev, A., Bengio, S., & Erhan, D. (2015). Show and tell: A neural image caption generator. In Proc. CVPR’15, pp. 3156–3164. Wah, C., Branson, S., Welinder, P., Perona, P., & Belongie, S. (2011). The Caltech-UCSD Birds-200-2011 Dataset (Technical Report CNS-TR-2011001). Tech. rep., California Institute of Technology, California. Walker, M. A. (1992). Redundancy in Collaborative Dialogue. In Proc. COLING’92, pp. 345–351. Walker, M. A., Cahn, J. E., & Whittaker, S. J. (1997). Improvising linguistic style: Social and affective bases for agent personality. In Proc. Agents’97, pp. 96–105. Walker, M. A., Grant, R., Sawyer, J., Lin, G. I., Wardrip-Fruin, N., & Buell, M. (2011a). Perceived or Not Perceived: Film Character Models for Expressive NLG. In Proc. ICIDS’11, pp. 109–121. 115 Walker, M. A., Lin, G. I., Sawyer, J., Grant, R., Buell, M., & Wardrip-Fruin, N. (2011b). Murder in the Arboretum: Comparing Character Models to Personality Models. In Proc. AIIDEWS’11, pp. 106–114. Walker, M. A., Park, F., Rambow, O., & Rogati, M. (2001). SPoT: A Trainable Sentence Planner. In Proc. NAACL’01, pp. 1–8. Walker, M. A., Rambow, O., & Rogati, M. (2002). Training a sentence planner for spoken dialogue using boosting. Computer Speech and Language, 16 (34), 409–433. Walker, M. A., Stent, A., Mairesse, F., & Prasad, R. (2007). Individual and domain adaptation in sentence planning for dialogue. Journal of Artificial Intelligence Research, 30, 413–456. Waller, A., Black, R., O’Mara, D., Pain, H., Ritchie, G. D., & Manurung, R. (2009). Evaluating the STANDUP Pun Generating Software with Children with Cerebral Palsy. ACM Transactions on Accessible Computing, 1 (3), 1–27. Wang, J., & Gaizauskas, R. (2015). Generating Image Descriptions with Gold Standard Visual Inputs : Motivation , Evaluation and Baselines. In Proc. ENLG’15, pp. 117–126. Wang, L., Raghavan, H., Cardie, C., & Castelli, V. (2014). Query-Focused Opinion Summarization for User-Generated Content. In Proc. COLING ’14, pp. 1660–1669. Wanner, L. (2010). Report generation. In Indurkhya, N., & Damerau, F. (Eds.), Handbook of Natural Language Processing (2nd edition)., pp. 533–555. Chapman and Hall/CRC, London. Wanner, L., Bosch, H., Bouayad-Agha, N., & Casamayor, G. (2015). Getting the environmental information across: from the Web to the user. Expert Systems, 32 (3), 405–432. Wen, T.-h., Gasic, M., Mrksić, N., Su, P.-h., Vandyke, D., & Young, S. (2015). Semantically Conditioned LSTM-based Natural Language Generation for Spoken Dialogue Systems. In Proc. EMNLP’15, pp. 1711–1721. White, M., Clark, R. A. J., & Moore, J. D. (2010). Generating tailored, comparative descriptions with contextually appropriate intonation. Computational Linguistics, 36 (2), 159–201. White, M., & Howcroft, D. M. (2015). Inducing Clause-Combining Rules : A Case Study with the SPaRKy Restaurant Corpus. In Proc. ENLG’15, pp. 28–37. White, M., & Rajkumar, R. (2009). Perceptron reranking for CCG realization. In Proc. EMNLP’09, pp. 410–419. White, M., & Rajkumar, R. (2012). Minimal dependency length in realization ranking. In Proc. EMNLP’12, pp. 244–255. White, M., Rajkumar, R., & Martin, S. (2007). Towards Broad Coverage Surface Realization with CCG. In Proc. UCNLG+MT. 116 Wilks, Y. (1978). Making preferences more active. Artificial Intelligence, 11 (3), 197–223. Williams, S., & Reiter, E. (2008). Generating basic skills reports for low-skilled readers. Natural Language Engineering, 14 (4), 495–525. Winograd, T. (1972). Understanding natural language. Cognitive Psychology, 3 (1), 1–191. Wong, M. T., Hon, A., & Chun, W. (2008). Automatic Haiku Generation Using VSM. In Proc. ACACOS’08, pp. 318–323. Wong, Y. W., & Mooney, R. J. (2007). Generation by Inverting a Semantic Parser That Uses Statistical Machine Translation. In Proc. NAACLHLT’07, pp. 172–179. Wubben, S., van den Bosch, A., & Krahmer, E. (2012). Sentence Simplification by Monolingual Machine Translation. In Proc. ACL’12, pp. 1015–1024. Xu, K., Ba, J. L., Kiros, R., Cho, K., Courville, A., Salakhutdinov, R., Zemel, R. S., & Bengio, Y. (2015). Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. In Proc. ICML’15, pp. 2048–2057. Yagcioglu, S., Erdem, E., & Erdem, A. (2015). A Distributed Representation Based Query Expansion Approach for Image Captioning. In Proc. ACLIJCNLP’15, pp. 106–111. Yang, Q., Passonneau, R., & de Melo, G. (2016). Peak: Pyramid evaluation via automated knowledge extraction.. In Proc. AAAI’16, pp. 2673–2680. Yang, Y., Teo, C. L., Daume III, H., & Aloimonos, Y. (2011). Corpus-Guided Sentence Generation of Natural Images. In Proc. EMNLP’11, pp. 444–454. Yannakakis, G. N., & Martı́nez, H. P. (2015). Ratings are Overrated!. Frontiers in ICT, 2 (July). Yao, B. Z., Yang, X., Lin, L., Lee, M. W., & Zhu, S. C. (2010). I2T: Image parsing to text description. Proceedings of the IEEE, 98 (8), 1485–1508. Yatskar, M., Galley, M., Vanderwende, L., & Zettlemoyer, L. (2014). See No Evil, Say No Evil: Description Generation from Densely Labeled Images. In Proc. *SEM COLING’14, pp. 110–120. Young, P., Lai, A., Hodosh, M., & Hockenmaier, J. (2014). From Image Descriptions to Visual Denotations: New Similarity Metrics for Semantic Inference over Event Descriptions. Transactions of the Association for Computational Linguistics, 2, 67–78. Young, R. M. (2008). Computational Creativity in Narrative Generation: Utility and Novelty Based on Models of Story Comprehension. In Creative Intelligent Systems, Papers from the 2008 AAAI Spring Symposium (Technical Report SS-08-03), pp. 149–155. Youyou, W., Kosinski, M., & Stillwell, D. (2015). Computer-based personality judgments are more accurate than those made by humans. Proceedings of the National Academy of Sciences, 112 (4), 1036–1040. 117 Yu, C., & Ballard, D. H. (2004). A multimodal learning interface for grounding spoken language in sensory perceptions. ACM Transactions on Applied Perception, 1 (1), 57–80. Yu, H., & Siskind, J. M. (2013). Grounded language learning from video described with sentences. In Proc. ACL’13, pp. 53–63. Yu, J., Reiter, E., Hunter, J. R., & Mellish, C. (2006). Choosing the content of textual summaries of large time-series data sets. Natural Language Engineering, 13 (01), 25. Zarrieß, S., & Kuhn, J. (2013). Combining Referring Expression Generation and Surface Realization: A Corpus-Based Investigation of Architectures. In Proc. ACL’13, pp. 1547–1557. Zarrieß, S., Loth, S., & Schlangen, D. (2015). Reading Times Predict the Quality of Generated Text Above and Beyond Human Ratings. In Proc. ENLG’15, pp. 38–47. Zhang, X., & Lapata, M. (2014). Chinese poetry generation with recurrent neural networks. In Proc. EMNLP’2014, pp. 670–680. Zhu, J. (2012). Towards a Mixed Evaluation Approach for Computational Narrative Systems. In Proc. ICCC’12, pp. 150–154. Zitnick, C. L., & Parikh, D. (2013). Bringing semantics into focus using visual abstraction. In Proc. CVPR’13, pp. 3009–3016. Zitnick, C. L., Parikh, D., & Vanderwende, L. (2013). Learning the Visual Interpretation of Sentences. In Proc. ICCV’13, pp. 1681–1688. 118
9cs.NE
arXiv:1604.04372v2 [math.AG] 14 Jul 2016 The Chow Form of the Essential Variety in Computer Vision Gunnar Fløystad, Joe Kileel, Giorgio Ottaviani Abstract The Chow form of the essential variety in computer vision is calculated. Our derivation uses secant varieties, Ulrich sheaves and representation theory. Numerical experiments show that our formula can detect noisy point correspondences between two images. 1 Introduction The essential variety E is the variety of 3 × 3 real matrices with two equal singular values, and the third one equal to zero (σ1 = σ2 , σ3 = 0). It was introduced in the setting of computer vision; see [19, §9.6]. Its elements, the so-called essential matrices, have the form T R, where T is real skew-symmetric and R is real orthogonal. The essential variety is a cone of codimension 3 and degree 10 in the space of 3×3-matrices, defined by homogeneous cubic equations, that we recall in (2.1). The complex solutions of these cubic equations define the complexification EC of the essential variety. While the real essential variety is smooth, its complexification has a singular locus that we describe precisely in §2. The Chow form of a codimension c projective variety X ⊂ Pn is the equation Ch(X) of the divisor in the Grassmannian Gr(Pc−1 , Pn ) given by those linear subspaces of dimension c−1 which meet X. It is a basic and classical tool that allows one to recover much geometric information about X; for its main properties we refer to [17, §4]. In [1, §4], the problem of computing the Chow form of the essential variety was posed, while the analogous problem for the fundamental variety was solved, another important variety in computer vision. The main goal of this paper is to explicitly find the Chow form of the essential variety. This provides an important tool for the problem of detecting if a set of image point correspondences {(x(i) , y (i) ) ∈ R2 × R2 | i = 1, . . . , m} comes from m world points in R3 and two calibrated cameras. It furnishes an exact solution for m = 6 and it behaves well given noisy input, as we will see in §4. Mathematically, we can consider the system of equations: ( g g (i) ≡ x (i) AX (1.1) g (i) ≡ g BX y (i) . 2010 Mathematics Subject Classification. 14M12, 14C05, 14Q15, 13D02, 13C14, 68T45. Key words and phrases. Chow form, Ulrich sheaf, Pieri resolutions, calibrated cameras, essential variety. 1 (i) (i) g (i) = (x(i) : x(i) : 1)T ∈ P2 and g Here x y (i) = (y1 : y2 : 1)T ∈ P2 are the given image points. 1 2 The unknowns are two 3 × 4 matrices A, B with rotations in their left 3 × 3 blocks and g (i) ∈ P3 . These represent calibrated cameras and world points, respectively. m = 6 points X A calibrated camera has normalized image coordinates, as explained in [19, §8.5]. Here ≡ denotes equality up to nonzero scale. From our calculation of Ch(EC ), we deduce: Theorem 1.1. There exists an explicit 20 × 20 skew-symmetric matrix M(x, y) of degree ≤ (6, 6) polynomials over Z in the coordinates of (x(i) , y (i) ) with the following properties. If (1.1) admits a complex solution then M(x(i) , y (i) ) is rank-deficient. Conversely, the variety of point correspondences (x(i) , y (i) ) such that M(x(i) , y (i) ) is rank-deficient contains a dense subset for which (1.1) admits a complex solution. In fact, we will produce two such matrices. Both of them, along with related formulas we derive, are available in ancillary files accompanying the arXiv version of this paper, and we have posted them at http://math.berkeley.edu/~jkileel/ChowFormulas.html. Our construction of the Chow form uses the technique of Ulrich sheaves introduced by Eisenbud and Schreyer in [12]. We construct rank 2 Ulrich sheaves on the essential variety EC . For an analogous construction of the Chow form of K3 surfaces, see [3]. From the point of view of computer vision, this paper contributes a complete characterization for an ‘almost-minimal’ problem. Here the motivation is 3D reconstruction. Given multiple images of a world scene, taken by cameras in an unknown configuration, we want to estimate the camera configuration and a 3D model of the world scene. Algorithms for this are complex, and successful. See [2] for a reconstruction from 150,000 images. By contrast, the system (1.1) encodes a tiny reconstruction problem. Suppose we are given six point correspondences in two calibrated pictures (the right-hand sides in (1.1)). We wish to reconstruct both the two cameras and the six world points (the left-hand sides in (1.1)). If an exact solution exists then it is typically unique, modulo the natural symmetries. However, an exact solution does not always exist. In order for this to happen, a giant polynomial of degree 120 in the 24 variables on the right-hand sides has to vanish. Theorem 1.1 gives an explicit matrix formula for that polynomial. The link between minimal or almost-minimal reconstructions and large-scale reconstructions is surprisingly strong. Algorithms for the latter use the former reconstructions repeatedly as core subroutines. In particular, solving the system (1.1) given m = 5 point pairs, instead of m = 6, is a subroutine in [2]. This solver is optimized in [24]. It is used to generate hypotheses inside random sampling consensus (RANSAC) [15] schemes for robust reconstruction from pairs of calibrated images. See [19] for more vision background. This paper is organized as follows. In §2, we prove that EC is a hyperplane section of s of 4 × 4 symmetric matrices of rank ≤ 2. This implies a determinantal the variety P X4,2 description of EC ; see Proposition 2.6. A side result of the construction is that EC is the secant variety of its singular locus, which corresponds to pairs of isotropic vectors in C3 . In §3, we construct two Ulrich sheaves on the variety of 4 × 4 symmetric matrices of rank ≤ 2. One of the constructions we propose is new to our knowledge. Both sheaves are 2 GL(4)-equivariant, and they admit “Pieri resolutions” in the sense of [28]. We carefully analyze the resolutions using representation theory, and in particular show that their middle differentials may be represented by symmetric matrices; see Propositions 3.8 and 3.11. In §4, we combine the results of the previous sections and we construct the Chow form of the essential variety. The construction from [12] starts with our rank 2 Ulrich sheaves and allows to define two 20 × 20 matrices in the Plücker coordinates of Gr(P2 , P8 ) each of which drops rank exactly when the corresponding subspace P2 meets the essential variety EC . It requires some technical effort to put these matrices in skew-symmetric form, and here our analysis from §3 pays off. We conclude the paper with numerical experiments demonstrating the robustness to noise that our matrix formulas in Theorem 1.1 enjoy. Acknowledgements. The authors are grateful to Bernd Sturmfels for his interest and encouragement. They thank Anton Fonarev pointing out the connection to Littlewood complexes in Remark 3.6. J.K. and G.O. are grateful to Frank Schreyer for very useful conversations. G.F. and J.K. thank Steven Sam for help with PieriMaps and for suggesting references to show that the middle maps φ are symmetric. J.K. thanks Justin Chen for valuable comments. G.O. is a member of GNSAGA-INDAM. 2 The essential variety is a determinantal variety 2.1 Intrinsic description Let E ⊂ R3×3 be the essential variety defined by the conditions: E := {M ∈ R3×3 | σ1 (M ) = σ2 (M ), σ3 (M ) = 0}. The polynomial equations of E are (see [14, §4]) as follows:  E = {M ∈ R3×3 | det(M ) = 0, 2(M M T )M − tr M M T M = 0}. (2.1) These 10 cubics minimally generate the real radical ideal [4, p.85] of the essential variety E, and that ideal is prime. Indeed, the real radical property follows from our Proposition 2.1(i) and [21, Theorem 12.6.1]. We denote by EC the projective variety in P8C given by the complex solutions of (2.1). The essential variety EC has codimension 3 and degree 10. In s this section, we will prove that it is isomorphic to a hyperplane section of the variety P X4,2 of complex symmetric 4 × 4 matrices of rank ≤ 2. The first step towards this is Proposition 2.1 below, and that relies on the group symmetries of EC , which we now explain. Consider R3 with the standard inner product Q, and the corresponding action of SO(3, R) on R3 . Complexify R3 and consider C3 with the action of SO(3, C), which has universal cover SL(2, C). It is technically simpler to work with the action of SL(2, C). Denoting by U the irreducible 2-dimensional representation of SL(2, C), we have the equivariant isomorphism C3 ∼ = S2 U . Writing Q also for the complexification of the Euclidean product, 3 the projective space P(S2 U ) divides into two SL(2, C)-orbits, namely the isotropic quadric with equation Q(u) = 0 and its complement. Let V be another complex vector space of dimension 2. The essential variety EC is embedded into the projective space of 3 × 3-matrices P(S2 U ⊗ S2 V ). Since the singular value conditions defining E are SO(3, R) × SO(3, R)invariant, it follows that EC is SL(U ) × SL(V )-invariant using [10, Theorem 2.2]. The following is a new geometric description of the essential variety. From the computer vision application, we start with the set of real points E. However, below we see that the surface Sing(EC ) inside EC , which has no real points, ‘determines’ the algebraic geometry. Part (i) of Prop. 2.1 is proved also in [22, Prop. 5.9]. Proposition 2.1. (i) The singular locus of EC is the projective surface given by:  Sing(EC ) = a · bT ∈ P(C3×3 ) | Q(a) = Q(b) = 0 . (ii) The second secant variety of Sing(EC ) equals EC .  Proof. Denote by S the variety a · bT ∈ P(C3×3 ) | Q(a) = Q(b) = 0 , and let Sb be the b consists of elements of the form M = affine cone over it. The line secant variety σ2 (S) 3×3 T T T such that Q(ai ) = ai ai = Q(bi ) = bTi bi = 0 for i = 1, 2. We coma 1 b1 + a 2 b2 ∈ C T pute that M M = a1 bT1 b2 aT2 + a2 bT2 b1 aT1 so that tr(M M T ) = 2(bT1 b2 )(aT1 a2 ). Moreover M M T M = a1 bT1 b2 aT2 a1 bT1 + a2 bT2 b1 aT1 a2 bT2 = (bT1 b2 )(aT1 a2 )M . Hence the equations (2.1) of EC are satisfied by M . This proves that σ2 (S) ⊂ EC . Since σ2 (S) and EC are both of codimension 3 and EC is irreducible, the equality σ2 (S) = EC follows. It remains to prove (i). Denote by [ai ] the line generated by ai . Every element a1 bT1 + a2 bT2 with [a1 ] 6= [a2 ], [b1 ] 6= [b2 ] and Q(ai ) = Q(bi ) = 0 for i = 1, 2 can be taken by SL(U ) × SL(V ) to a scalar multiple of any other element of the same form. This is the open orbit of the action of SL(U ) × SL(V ) on EC . The remaining orbits are the following: 1. the surface S, with set-theoretic equations M M T = M T M = 0.  2. T1 \ S, where T1 = a · bT ∈ P(C3×3 ) | Q(a) = 0 is a threefold, with set-theoretic equations M T M = 0.  3. T2 \ S, where T2 = a · bT ∈ P(C3×3 ) | Q(b) = 0 is a threefold, with set-theoretic equations M M T = 0. 4. Tan(S) \ (T1 ∪ T2 ), where the tangential variety Tan(S) is the fourfold union of all tangent spaces to S, with set-theoretic equations tr(M M T ) = 0, M M T M = 0.   0 0 √1 One can compute explicitly that the Jacobian matrix of EC at  −1 0 0 ∈ T1 \ S 0 0 0 has rank 3. The following code in Macaulay2 [18] does that computation: 4 R = QQ[m_(1,1)..m_(3,3)] M = transpose(genericMatrix(R,3,3)) I = ideal(det(M))+minors(1,2*M*transpose(M)*M - trace(M*transpose(M))*M) Jac = transpose jacobian I S = QQ[q]/(1+q^2) specializedJac = (map(S,R,{1,0,0,q,0,0,0,0,0}))(Jac) minors(3,specializedJac) Hence the points in T1 \ S are smooth points of EC . By symmetry, also the points in T2 \ S are smooth. By semicontinuity, the points in Tan(S) \ (T1 ∪ T2 ) are smooth. Since points in S are singular for the secant variety σ2 (S), this finishes the proof of (i). Remark 2.2. From the study of tensor decomposition, the parametric description in Proposition 2.1 is identifiable. That shows that real essential matrices have the form aT b + aT b with a, b ∈ C3 and Q(a) = Q(b) = 0. This may be written in the alternative form (u2 )T v 2 + (u2 )T v 2 ∈ S2 (U ) ⊗ S2 (V ) with u ∈ U , v ∈ V . This may help in computing real essential matrices. Note that the four non-open orbits listed in the proof of Proposition 2.1 are contained in the isotropic quadric tr(M M T ) = 0, hence they have no real points. Remark 2.3. The surface Sing(EC ) is more familiar with the embedding by O(1, 1), when it is the smooth quadric surface, doubly ruled by lines. In the embedding by O(2, 2), the two rulings are given by conics. These observations suggests expressing EC as a determinantal variety, as we do next in Proposition 2.4. Indeed, note that the smooth quadric surface embedded by O(2, 2) is isomorphic to a linear section of the second Veronese embedding of P3 , which is the variety of 4 × 4 symmetric matrices of rank 1. Proposition 2.4. The essential variety EC is isomorphic to a hyperplane section of the variety of rank ≤ 2 elements in P(S2 (U ⊗ V )). Concretely, that ambient space identifies s , and with the projective variety of 4 × 4 symmetric matrices of rank ≤ 2, denoted by P X4,2 the section consists of traceless 4 × 4 symmetric matrices of rank ≤ 2. Proof. The embedding of P(U ) × P(V ) in P(S2 (U ) ⊗ S2 (V )) is given by (u, v) 7→ u2 ⊗ v 2 . Recall that Cauchy’s formula states S2 (U ⊗ V ) = (S2 (U ) ⊗ S2 (V )) ⊕ ∧2 U ⊗ ∧2 V , where dim(U ⊗ V ) = 4. Hence, P(S2 (U ) ⊗ S2 (V )) is equivariantly embedded as a codimension one subspace in P(S2 (U ⊗ V )). The image is the subspace of traceless elements, and this map sends u2 ⊗ v 2 7→ (u ⊗ v)2 . By Proposition 2.1, we have shown that Sing(EC ) embeds into a hyperplane section of the variety of rank 1 elements in P(S2 (U ⊗ V )). So, EC = σ2 (Sing(EC )) embeds into that hyperplane section of the variety of rank ≤ 2 elements. Comparing dimensions and degrees, the result follows. Remark 2.5. In light of the description in Proposition 2.4, it follows by Example 3.2 and Corollary 6.4 of [7] that the Euclidean distance degree is EDdegree(EC ) = 6. This result has been proved also in [9], where the computation of EDdegree was performed in the more 5 general setting of orthogonally invariant varieties. This quantity measures the algebraic complexity of finding the nearest point on E to a given noisy data point in R3×3 . 2.2 Coordinate description We now make the determinantal description of EC in Proposition 2.4 explicit in coordinates. For this, denote a = (a1 , a2 , a3 )T ∈ C3 . We have Q(a) = a21 + a22 + a23 . The SL(2, C)-orbit T √ Q(a) = 0 is parametrized by u21 − u22 , 2u1 u2 , −1(u21 + u22 ) where (u1 , u2 )T ∈ C2 . Let:   m11 m12 m13 M = m21 m22 m23  ∈ C3×3 , m31 m32 m33 and define the 4 × 4 traceless symmetric matrix s(M ) (depending linearly on M ):  m11 − m22 − m33  m13 + m31 1 s(M ) :=  2 m12 + m21 m23 − m32 m13 + m31 −m11 − m22 + m33 m23 + m32 m12 − m21 m12 + m21 m23 + m32 −m11 + m22 − m33 −m13 + m31  m23 − m32  m12 − m21  . −m13 + m31  m11 + m22 + m33 (2.2) This construction furnishes a new view on the essential variety E, as described in Proposition 2.6. Proposition 2.6. The linear map s in (2.2) is a real isometry from the space of 3 × 3 real matrices to the the space of traceless symmetric 4 × 4 real matrices. We have that: M ∈ E ⇐⇒ rk(s(M )) ≤ 2. The complexification of s, denoted again by s, satisfies for any M ∈ C3×3 : M ∈ Sing(EC ) ⇐⇒ rk(s(M )) ≤ 1, M ∈ EC ⇐⇒ rk(s(M )) ≤ 2. Proof. We construct the correspondence over C at the level of Sing(EC ) and then we extend it by linearity. Choose coordinates (u1 , u2 ) in U and coordinates (v1 , v2 ) in V . Consider the following parametrization of matrices M ∈ Sing(EC ):   u21 − u22   √   · v12 − v22 , 2v1 v2 , −1(v12 + v22 ) . M =  (2.3) √ 2u1 u2  2 2 −1(u1 + u2 ) Consider also the following parametrization of the Euclidean quadric in U ⊗ V : √ √  −1(u2 v2 − u1 v1 ), u1 v1 + u2 v2 , − −1(u1 v2 + u2 v1 ), −u1 v2 + u2 v1 . k= 6 The variety of rank 1 traceless 4 × 4 symmetric matrices is accordingly parametrized by kT k. Substituting (2.3) into the right-hand side below, a computation verifies that: kT k = s(M ). This proves the second equivalence in the statement above and explains the definition of s(M ), namely that it is the equivariant embedding from Proposition 2.4 in coordinates. The third equivalence follows because EC = σ2 (Sing(EC )), by Proposition 2.1(ii). For the first equivalence, wenote that s is defined over R and now a direct computation verifies that tr s(M )s(M )T = tr M M T for M ∈ R3×3 . Note that the ideal of 3-minors of s(M ) is indeed generated by the ten cubics in (2.1). Remark 2.7. The critical points of the distance function from any data point M ∈ R3×3 to E can be computed by means of the SVD of s(M ), as in [7, Example 2.3]. Ulrich sheaves on the variety of symmetric 4 × 4 matrices of rank ≤ 2 3 Our goal is to construct the Chow form of the essential variety. By the theory of Eisenbud and Schreyer [12], this can be done provided one has an Ulrich sheaf on this variety. The notions of Ulrich sheaf, Chow forms and the construction of [12] will be explained below. As shown in §2, the essential variety EC is a linear section of the projective variety s of symmetric 4 × 4 matrices of rank ≤ 2. If we construct an Ulrich sheaf on P X s , P X4,2 4,2 then a quotient of this sheaf by a linear form is an Ulrich sheaf on EC provided that linear s . We will achieve this twice, in §3.4 and §3.5. form is regular for the Ulrich sheaf on P X4,2 3.1 Definition of Ulrich modules and sheaves Definition 3.1. A graded module M over a polynomial ring A = C[x0 , . . . , xn ] is an Ulrich module provided: 1. It is generated in degree 0 and has a linear minimal free resolution: d 2 0 ←− M ← Aβ0 ←− A(−1)β1 ←− A(−2)β2 ←− · · · ←− A(−c)βc ←− 0. (3.1) 2. The length of the resolution c equals the codimension of the support of the module M .  2’. The Betti numbers are βi = ci β0 for i = 0, . . . , c. One can use either (1) and (2), or equivalently, (1) and (2)’ as the definition. 7 A sheaf F on a projective space Pn with support of dimension ≥ 1 is an Ulrich sheaf provided it is the sheafification of an Ulrich module. Equivalently, the module of twisted L 0 global sections M = d∈Z H (Pn , F(d)) is an Ulrich module over the polynomial ring A. Fact 3.2. If the support of an Ulrich sheaf F is a variety X of degree d, then β0 is a multiple of d, say rd. This corresponds to F being a sheaf of rank r on X. Since there is a one-to-one correspondence between Ulrich modules over A and Ulrich sheaves on Pn , we interchangably speak of both. But in our constructions we focus on Ulrich modules. A prominent conjecture of Eisenbud and Schreyer [12, p.543] states that on any variety X in a projective space, there is an Ulrich sheaf whose support is X. 3.2 The variety of symmetric 4 × 4 matrices We fix notation. Let X4s be the space of symmetric 4 × 4 matrices over the field C. This identifies as C10 . Let xij = xji be the coordinate functions on X4s where 1 ≤ i ≤ j ≤ 4, so the coordinate ring of X4s is: A = C[xij ]1≤i≤j≤4 . s the affine subvariety of X s consisting of matrices of rank For 0 ≤ r ≤ 4, denote by X4,r 4 s is generated by the (r + 1) × (r + 1)-minors of the generic 4 × 4 ≤ r. The ideal of X4,r symmetric matrix (xij ). This is in fact a prime ideal, by [31, Theorem 6.3.1]. The rank subvarieties have the following degrees and codimensions: variety s X4,4 s X4,3 s X4,2 s X4,1 s X4,0 degree 1 4 10 8 1 codimension 0 1 3 6 10 s are defined by homogeneous ideals, they give rise to projective Since the varieties X4,r s in the projective space P9 . However, in §3.4 and §3.5 it will be convenient varieties P X4,r to work with affine varieties, and general (instead of special) linear group actions. The group GL(4, C) acts on X4s . If M ∈ GL(4, C) and X ∈ X4s , the action is as follows: M· X = M · X · M T . Since any symmetric matrix can be diagonalized by a unitary coordinate change, there are five orbits of the action of GL(4, C) on X4s , one per rank of the symmetric matrix. Let: E = C4 be a four-dimensional complex vector space. The coordinate ring of X4s identifies as A ∼ = Sym(S2 (E)). The space of symmetric matrices X4s may then be identified with the dual space S2 (E)∗ , so again we see that GL(E) = GL(4, C) acts on S2 (E)∗ . 8 3.3 Representations and Pieri’s rule We shall recall some basic representation theory of the general linear group GL(W ), where W is a n-dimensional complex vector space. The irreducible representations of GL(W ) are given by Schur modules Sλ (W ) where λ is a partition: a sequence of integers λ1 ≥ λ2 ≥ · · · ≥ λn . When λ = d, 0, . . . , 0, then Sλ (W ) is the dth symmetric power Sd (W ). When λ = 1, . . . , 1, 0, . . . , 0, with d 1’s, then Sλ (W ) is the exterior wedge ∧d W . For all partitions λ there are isomorphisms of GL(W )-representations: Sλ (W )∗ ∼ = S−λn ,...,−λ1 (W ) Sλ (W ) ⊗ (∧n W )⊗r ∼ = Sλ+r·1 (W ) and where 1 = 1, 1, . . . , 1. Here ∧n W is the one-dimensional representation C of GL(W ) where a linear map φ acts by its determinant. Denote by |λ| := λ1 + · · · + λn . Assume λn , µn ≥ 0. The tensor product of two Schur modules Sλ (W ) ⊗ Sµ (W ) splits into irreducibles as a direct sum of Schur modules: M u(λ, µ; ν)Sν (W ) ν where the sum is over partitions with |ν| = |µ| + |λ|. The multiplicities u(λ, µ; ν) ∈ Z≥0 are determined by the Littlewood-Richardson rule [13, Appendix A]. In one case, that will be important to us below, there is a particularly nice form of this rule. Given two partitions λ′ and λ, we say that λ′ /λ is a horizontal strip if λ′i ≥ λi ≥ λ′i+1 . Fact 3.3 (Pieri’s rule). As GL(W )-representations, we have the rule: M Sλ′ (W ). Sλ (W ) ⊗ Sd (W ) ∼ = |λ′ | = |λ|+d λ′ /λ is a horizontal strip 3.4 The first Ulrich sheaf 2 . We We are now ready to describe our first Ulrich sheaf on the projective variety P X4,2 s construct it as an Ulrich module supported on the variety X4,2 . We use notation from §3.2, so E is 4-dimensional. Consider S3 (E) ⊗ S2 (E). By Pieri’s rule this decomposes as: S5 (E) ⊕ S4,1 (E) ⊕ S3,2 (E). We therefore get a GL(E)-inclusion S3,2 (E) → S3 (E) ⊗ S2 (E) unique up to nonzero scale. Since A1 = S2 (E) from §3.2, this extends uniquely to an A-module map: α S3 (E) ⊗ A ←− S3,2 (E) ⊗ A(−1). This map can easily be programmed using Macaulay2 and the package PieriMaps [27]: 9 R=QQ[a..d] needsPackage "PieriMaps" f=pieri({3,2},{2,2},R) S=QQ[a..d,y_0..y_9] a2=symmetricPower(2,matrix{{a..d}}) alpha=sum(10,i->contract(a2_(0,i),sub(f,S))*y_i) We can then compute the resolution of the cokernel of α in Macaulay2. It has the form: α A20 ←− A(−1)60 ←− A(−2)60 ← A(−3)20 . Thus the cokernel of α is an Ulrich module by (1) and (2)’ in Definition 3.1. An important point is that the res command in Macaulay2 computes differential matrices in unenlightening bases. We completely and intrinsically describe the GL(E)-resolution below: Proposition 3.4. The cokernel of α is an Ulrich module M of rank 2 supported on the s . The resolution of M is GL(E)-equivariant and it is: variety X4,2 φ α F• : S3 (E) ⊗ A ←− S3,2 (E) ⊗ A(−1) ←− S3,3,1 (E) ⊗ A(−2) (3.2) β ←− S3,3,3 (E) ⊗ A(−3) with ranks 20, 60, 60, 20, and where all differential maps are induced by Pieri’s rule. The dual complex of this resolution is also a resolution, and these two resolutions are isomorphic up to twist. As in [28], we can visualize the resolution by: 0 ← M ←− ← ← ← ← 0. Proof. Since M is the cokernel of a GL(E)-map, it is GL(E)-equivariant. So, the support of M is a union of orbits. By Definition 3.1(2), M is supported in codimension 3. Since s \X s , the support of M is the closure of this orbit, the only orbit of codimension 3 is X4,2 4,3 s which is X4,2 . It can also easily be checked with Macaulay2, by restricting α to diagonal s where r ≤ 2. matrices of rank r for r = 0, . . . , 4, that M is supported on the strata X4,r Also, the statement that the rank of M equals 2 is now immediate from Fact 3.2. Now we prove that the GL(E)-equivariant minimal free resolution of M is F• as above. By Pieri’s rule there is a GL(E)-map unique up to nonzero scalar: S3,2 (E) ⊗ S2 (E) ←− S3,3,1 (E) and a GL(E)-map unique up to nonzero scalar: S3,3,1 (E) ⊗ S2 (E) ←− S3,3,3 (E). 10 These are the maps φ and β in F• respectively. The composition α ◦ φ maps S3,3,1 (E) to a submodule of S3 (E) ⊗ S2 (S2 (E)). By [31, Proposition 2.3.8] the latter double symmetric power equals S4 (E) ⊕ S2,2 (E), and so this tensor product decomposes as: M S3 (E) ⊗ S4 (E) S3 (E) ⊗ S2,2 (E). By Pieri’s rule, none of these summands contains S3,3,1 (E). Hence α ◦ φ is zero by Schur’s lemma. The same type of argument shows that φ ◦ β is zero. Thus F• is a complex. By our Macaulay2 computation of Betti numbers before the Proposition, ker(α) is generated in degree 2 by 60 minimal generators. In F• these must be the image of S3,3,1 (E), since that is 60-dimensional by the hook content formula and it maps injectively to F1 . So F• is exact at F1 . Now again by the Macaulay2 computation, it follows that ker φ is generated in degree 3 by 20 generators. These must be the image of S3,3,3 (E) since that is 20-dimensional and maps injectively to F2 . So F• is exact at F2 . Finally, the computation implies that β is injective, and F• is the GL(E)-equivariant minimal free resolution of M . For the statement about the dual, recall that since F• is a resolution of a CohenMacaulay module, the dual complex, obtained by applying HomA (−, ωA ) with ωA = A(−10), is also a resolution. If we twist this dual resolution with (∧4 E)⊗3 ⊗ A(7), the terms will be as in the original resolution. Since the nonzero GL(E)-map α is uniquely determined up to scale, it follows that F• and its dual are isomorphic up to twist. Remark 3.5. The GL(E)-representations in this resolution could also have been computed using the Macaulay2 package HighestWeights [16]. Remark 3.6. The dual of this resolution is: S3,3,3 (E ∗ ) ⊗ A ← S3,3,1 ⊗ A(−1) ← S3,2 (E ∗ ) ⊗ A(−2) ← S3 (E ∗ ) ⊗ A(−3). (3.3) A symmetric form q in S2 (E ∗ ) corresponds to a point in Spec(A) and a homomorphism A → C. The fiber of this complex over the point q is then an SO(E ∗ , q)-complex: S3,3,3 (E ∗ ) ← S3,3,1 ← S3,2 (E ∗ ) ← S3 (E ∗ ). (3.4) When q is a nondegenerate form, this is the Littlewood complex L3,3,3 as defined in [29, • §4.2]. (The terms of L3,3,3 can be computed using the plethysm in §4.6 of loc.cit.) This partition λ = (3, 3, 3) is not admissible since 3 + 3 > 4, see Sec.4.1 loc.cit. The cohomology of (3.4) is then given by Theorem 4.4 in loc.cit. and it vanishes (since here i4 (λ) = ∞), as it should in agreement with Proposition 3.4. The dual resolution (3.3) of the Ulrich sheaf can then be thought of as a “universal” Littlewood complex for the parition λ = (3, 3, 3). In other cases when Littlewood complexes are exact, it would be an interesting future research topic to investigate the sheaf that is resolved by the “universal Littlewood complex”. 11 To obtain nicer formulas for the Chow form of the essential variety EC in §4, we now prove that the middle map φ in the resolution (3.2) is symmetric, in the following approµ priate sense. In general, suppose that we are given a linear map W ∗ −→ W ⊗ L∗ where L µT is a finite dimensional vector space. Dualizing, we get a map W ←− W ∗ ⊗ L which in turn ν gives a map W ⊗ L∗ ←− W ∗ . By definition, the map µ is symmetric if µ = ν and skewsymmetric if µ = −ν. If µ is symmetric and µ is represented as a matrix with entries in L∗ with respect to dual bases of W and W ∗ , then that matrix is symmetric, and analogously η when µ is skew-symmetric. Note that the map µ also induces a map L −→ W ⊗ W . Fact 3.7. The map µ is symmetric if the image of η is in the subspace S2 (W ) ⊆ W ⊗ W and it is skew-symmetric if the image is in the subspace ∧2 W ⊆ W ⊗ W . Proposition 3.8. The middle map φ in the resolution (3.2) is symmetric. Proof. Consider the map φ in degree 3. It is: S3,2 (E) ⊗ S2 (E) ←− S3,3,1 (E) ∼ = S3,2 (E)∗ ⊗ (∧4 E)⊗3 and it induces the map: S3,2 (E) ⊗ S3,2 (E) ←− S2 (E)∗ ⊗ (∧4 E)⊗3 ∼ = S3,3,3,1 (E). By the Littlewood-Richardson rule, the right representation above occurs with multiplicity 1 in the left side. Now one can check that S3,3,3,1 (E) occurs in S2 (S3,2 (E)). This follows by Corollary 5.2 in [5] or one can use the package SchurRings [30] in Macaulay2: needsPackage "SchurRings" S = schurRing(s,4,GroupActing=>"GL") plethysm(s_2,s_{3,2}) Due to Fact 3.7, we can conclude that the map φ is symmetric. 3.5 The second Ulrich sheaf s and analyze it similarly to as above. This will We construct another Ulrich sheaf on P X4,2 lead to a second formula for Ch(EC ) in §4. Consider S2,2,1 (E) ⊗ S2 (E). By Pieri’s rule: S2,2,1 (E) ⊗ S2 (E) ∼ = S4,2,1 (E) ⊕ S3,2,2 (E) ⊕ S3,2,1,1 (E) ⊕ S2,2,2,1 (E). Thus there is a GL(E)-map, with nonzero degree 1 components unique up to scale: α S2,2,1 (E) ⊗ A ←− (S3,2,2 (E) ⊕ S3,2,1,1 (E) ⊕ S2,2,2,1 (E)) ⊗ A(−1). This map can be programmed in Macaulay2 using PieriMaps as follows: 12 R=QQ[a..d] needsPackage "PieriMaps" f1= transpose pieri({3,2,2,0},{1,3},R) f2=transpose pieri({3,2,1,1},{1,4},R) f3=transpose pieri({2,2,2,1},{3,4},R) f = transpose (f1||f2||f3) S=QQ[a..d,y_0..y_9] a2=symmetricPower(2,matrix{{a..d}}) alpha=sum(10,i->contract(a2_(0,i),sub(f,S))*y_i) We can then compute the resolution of coker(α) in Macaulay2. It has the form: α A20 ←− A(−1)60 ←− A(−2)60 ←− A(−3)20 . Thus the cokernel of α is an Ulrich module, and moreover we have: Proposition 3.9. The cokernel of α is an Ulrich module M of rank 2 supported on the s . The resolution of M is GL(E)-equivariant and it is: variety X4,2 F• : S2,2,1 (E) ⊗ A α ←− (S3,2,2 (E) ⊕ S3,2,1,1 (E) ⊕ S2,2,2,1 (E)) ⊗ A(−1) φ ←− (S4,2,2,1 (E) ⊕ S3,3,2,1 (E) ⊕ S3,2,2,2 (E)) ⊗ A(−2) (3.5) β ←− S4,3,2,2 (E) ⊗ A(−3) with ranks 20, 60, 60, 20. The dual complex of this resolution is also a resolution and these two resolutions are isomorphic up to twist. We can visualize the resolution by: 0 ← M ←− ← ⊕ ⊕ ← ⊕ ⊕ ← ← 0. Proof. The argument concerning the support of M is exactly as in Proposition 3.4. Now we prove that the minimal free resolution of M is of the form above, differently than in 3.4. To start, note that the module S4,2,2,1 (E) occurs by Pieri once in each of: S3,2,2 (E) ⊗ S2 (E), S3,2,1,1 (E) ⊗ S2 (E), S2,2,2,1 (E) ⊗ S2 (E). On the other hand, it occurs in: S2,2,1 (E) ⊗ S2 (S2 (E)) ∼ = S2,2,1 (E) ⊗ S4 (E) ⊕ S2,2,1 (E) ⊗ S2,2 (E) only twice, as seen using Pieri’s rule and the Littlewood-Richardson rule. Thus S4,2,2,1 (E) occurs at least once in the degree 2 part of ker(α). Similarly we see that each of S3,3,2,1 (E) and S3,2,2,2 (E) occurs at least once in ker(α) in degree 2. But by the Macaulay2 computation before this Proposition, we know that ker(α) is a module with 60 generators in degree 13 2. And the sum of the dimensions of these three representations is 60. Hence each of them occurs exactly once in ker(α) in degree 2, and they generate ker(α). Now let C be the 20-dimensional vector space generating ker(φ). Since the resolution of M has length equal to codim(M ), the module M is Cohen-Macaulay and the dual of its resolution, obtained by applying HomA (−, ωA ) where ωA ∼ = A(−4), is again a resolution of Ext3A (M, ωA ). Thus the map from C ⊗ A(−3) to each of: S4,2,2,1 (E) ⊗ A(−2), S3,3,2,1 (E) ⊗ A(−2), S3,2,2,2 (E) ⊗ A(−2) is nonzero. In particular C maps nontrivially to: S3,2,2,2 (E) ⊗ S2 (E) ∼ = S5,2,2,2 (E) ⊕ S4,3,2,2 (E). Each of the right-hand side representations have dimension 20, so one of them equals C. However only the last one occurs in S3,3,2,1 (E) ⊗ S2 (E), and so C ∼ = S4,3,2,2 (E). We have proven that the GL(E)-equivariant minimal free resolution of M indeed has the form F• . For the statement about the dual, recall that each of the three components of α in degree 1 are nonzero. Also, as the dual complex is a resolution, here obtained by applying HomA (−, ωA ) with ωA = A(−10), all three degree 1 components of β are nonzero. If we twist this dual resolution with (∧4 E)⊗4 ⊗ A(7), the terms will be as in the original resolution. Because each of the three nonzero components of the map α are uniquely determined up to scale, the resolution F• and its dual are isomorphic up to twist. Remark 3.10. Again the GL(E)-representations in this resolution could have been computed using the Macaulay2 package HighestWeights. Proposition 3.11. The middle map φ in the resolution (3.5) is symmetric. Proof. We first show that the three ‘diagonal’ components of φ in (3.5) are symmetric: φ1 S3,2,2 (E) ⊗ S2 (E) ←− S4,2,2,1 (E) φ2 S3,2,1,1 (E) ⊗ S2 (E) ←− S3,3,2,1 (E) φ3 S2,2,2,1 (E) ⊗ S2 (E) ←− S3,2,2,2 (E). Twisting the third component φ3 with (∧4 E ∗ )⊗2 , it identifies as: E ∗ ⊗ S2 (E) ←− E and so φ3 is obviously symmetric. Twisting the second map φ2 with ∧4 E ∗ it identifies as: S2,1 (E) ⊗ S2 (E) ←− S2,2,1 (E) = (S2,1 (E)∗ ) ⊗ (∧4 E)⊗2 , which induces the map: S2,1 (E) ⊗ S2,1 (E) ←− S2 (E)∗ ⊗ (∧4 E)⊗2 = S2,2,2 (E). By the Littlewood-Richardson rule, the left tensor product contains S2,2,2 (E) with multiplicity 1. By Corollary 5.2 in [5] or SchurRings in Macaulay2, this is in S2 (S2,1 (E)): 14 needsPackage "SchurRings" S = schurRing(s,4,GroupActing=>"GL") plethysm(s_2,s_{2,1}) So by Fact 3.7, the component φ2 is symmetric. The first map φ1 may be identified as: S3,2,2 (E) ⊗ S2 (E) ←− (S3,2,2 (E))∗ ⊗ (∧4 E)⊗4 , which induces the map: S3,2,2 (E) ⊗ S3,2,2 (E) ←− S2 (E)∗ ⊗ (∧4 E)⊗4 = S4,4,4,2 (E). Again by Littlewood-Richardson, S4,4,4,2 (E) is contained with multiplicity 1 in the left side. By Corollary 5.2 in [5] or the package SchurRings in Macaulay2, this is in S2 (S3,2,2 (E)): needsPackage "SchurRings" S = schurRing(s,4,GroupActing=>"GL") plethysm(s_2,s_{3,2,2}) It is now convenient to tensor the resolution (3.5) by (∧4 E ∗ )⊗2 , and to let: T1 = S1,0,0,−2 (E), T2 = S1,0,−1,−1 (E), T3 = S0,0,0,−1 (E). We can then write the middle map as:  T1 ⊗A(1)⊕T2 ⊗A(1)⊕T3 ⊗A(1) φ1  µ1 ν1 µ2 φ2 0 ←−  ν2  0 φ3 T1∗ ⊗A(−1)⊕T2∗ ⊗A(−1)⊕T3∗ ⊗A(−1) (3.6) Note indeed that the component: S1,0,−1,−1 (E) ⊗ S2 (E) = T2 ⊗ S2 (E) ←− T3∗ ∼ = S1 (E) must be zero, since the left tensor product does not contain S1 (E) by Pieri’s rule. Similarly the map T3 ⊗ S2 (E) ←− T2∗ is zero. We know the maps φ1 , φ2 and φ3 are symmetric. Consider: µ1 µ2 T2 ⊗ A(1) ←− T1∗ ⊗ A(−1), T1 ⊗ A(1) ←− T2∗ ⊗ A(−1). Since the resolution (3.5) is isomorphic to its dual, either both µ1 and µ2 are nonzero, or µT 2 they are both zero. Suppose both are nonzero. The dual of µ2 is T2 ⊗A(1) ←− T1∗ ⊗A(−1). But such a GL(E)-map is unique up to scalar, as is easily seen by Pieri’s rule. Thus whatever the case we can say that µ1 = cµ µT2 for some nonzero scalar cµ . Similarly we 15 get ν1 = cν ν2T . Composing the map (3.6) with the automorphism on its right given by the block matrix:   1 0 0 0 cµ 0  , 0 0 cν we get a middle map:  T1 ⊗ A(1) ⊕ T2 ⊗ A(1) ⊕ T3 ⊗ A(1) φ1  µ1 ν1 µ′2 φ′2 0 ←− ν2′  0 ′ φ3  T1∗ ⊗ A(−1) ⊕ T2∗ ⊗ A(−1) ⊕ T3∗ ⊗ A(−1) where the diagonal maps are still symmetric, and µ1 = (µ′2 )T and ν1 = (ν2′ )T . So we get a symmetric map, and the result about φ follows. This second Ulrich module constructed above in Proposition 3.9 is a particular instance of a general construction of Ulrich modules on the variety of symmetric n × n matrices of rank ≤ r; see [31], §6.3 and Exercise 34 in §6. We briefly recall the general construction. Let W = Cn and G be the Grassmannian Gr(n − r, W ) of (n − r)-dimensional subspaces of W . There is a tautological exact sequence of algebraic vector bundles on G: 0 → K → W ⊗ OG → Q → 0, where r is the rank of Q. Let X = Xns be the affine space of symmetric n × n matrices, and define Z to be the incidence subvariety of X × G given by: i φ Z = {((W −→ W ), (Cn−r ֒→ W )) ∈ X × G | φ ◦ i = 0}. The variety Z is the affine geometric bundle VG (S2 (Q)) of the locally free sheaf S2 (Q) on the Grassmannian G. There is a commutative diagram: Z   y −−−−→ X × G   y s −−−−→ Xn,r X s . For any locally free sheaf E, the Schur functor in which Z is a desingularization of Xn,r Sλ applies to give a new locally free sheaf Sλ (E). Consider then the locally free sheaf: E(n, r) = S(n−r)r (Q) ⊗ Sn−r−1,n−r−2,··· ,1,0 (K) on the Grassmannian Gr(n − r, W ). Note that S(n−r)r (Q) = (det(Q))n−r is a line bundle n−r p and E(n, r) is a locally free sheaf of rank 2( 2 ) . Let Z −→ G be the projection map. By pullback we get the locally free sheaf p∗ (E(n, r)) on Z. The pushforward of this locally free 16 s is an Ulrich sheaf on this variety. Since X s is affine this corresponds sheaf down to Xn,r n,r to the module of global sections H 0 (Z, p∗ E). The Ulrich module in Proposition 3.9 is that module when n = 4 and r = 2. For our computational purposes realized in §4, we worked out the equivariant minimal free resolution as above. Interestingly, we do not know yet whether the ‘simpler’ Ulrich sheaf presented in §3.4, which is new to our knowledge, generalizes to a construction for other varieties. 4 4.1 The Chow form of the essential variety Grassmannians and Chow divisors The Grassmannian variety Gr(c, n + 1) = Gr(Pc−1 , Pn ) parametrizes the linear subspaces of dimension c − 1 in Pn , i.e the Pc−1 ’s in Pn . Such a linear subspace may be given as the rowspace of a c × (n + 1) matrix. The tuple of maximal minors of this matrix is uniquely determined by the linear subspace up to scale. The number of such minors is n+1 c . Hence n+1 −1 ( ) we get a well-defined point in the projective space P c . This defines an embedding of the Grassmannian Gr(c, n + 1) into that projective space, called the Plücker embedding. Somewhat more algebraically, let W be a vector space of dimension n + 1 and let P(W ) be the space of lines in W through the origin. Then a linear subspace V of dimension c in n+1 W defines a line ∧c V in ∧c W , and so it defines a point in P(∧c W ) = P( c )−1 . Thus the Grassmannian Gr(c, W ) embeds into P(∧c W ). If X is a variety of codimension c in a projective space Pn , then a linear subspace of dimension c − 1 will typically not intersect X. The set of points in the Grassmannian Gr(c, n+1) that do have nonempty intersection with X forms a divisor in Gr(c, n+1), called the Chow divisor. The divisor class group of Gr(c, n + 1) is isomorphic to Z. Considering n+1 the Plücker embedding Gr(c, n + 1) ⊆ P( c )−1 , any hyperplane in the latter projective space intersects the Grassmannian in a divisor which generates the divisor class group of n+1 Gr(c, n + 1). The homogeneous coordinate ring of this projective space P( c )−1 = P(∧c W ) is Sym(∧c W ∗ ). Note that here ∧c W ∗ are the linear forms, i.e. the elements of degree 1. If X has degree d, then its Chow divisor is cut out by a single form Ch(X) of degree d unique up to nonzero scale, called the Chow form, in the coordinate ring of the Grassmannian Sym(∧c W ∗ )/IGr(c,n+1) . As the parameters n, c, d increase, Chow forms become unwieldy to even store on a computer file. Arguably, the most efficient (and useful) representations of Chow forms are as determinants or Pfaffians of a matrix with entries in ∧c W ∗ . As we explain next, Ulrich sheaves can give such formulas. 4.2 Construction of Chow forms We now explain how to obtain the Chow form Ch(X) of a variety X from an Ulrich sheaf F whose support is X. The reference for this is [12, p.552-553]. Let M = ⊕d∈Z H 0 (Pn , F(d)) 17 be the graded module of twisted global sections over the polynomial ring A = C[x0 , . . . , xn ]. We write W ∗ for the vector space generated by the variables x0 , . . . , xn . Consider the minimal free resolution (3.1) of M . The map di may be represented by a matrix Di of size βi × βi+1 , with entries in the linear space W ∗ . Since (3.1) is a complex the product of two successive matrices Di−1 Di is the zero matrix. Note that when we multiply the entries of these matrices, we are multiplying elements in the ring A = Sym(W ∗ ) = C[x0 , . . . , xn ]. Now comes the shift of view: Let B = ⊕ni=0 ∧i W ∗ be the exterior algebra on the vector space W ∗ . We now consider the entries in the Di (which are all degree one forms in A1 = W ∗ = B1 ) to be in the ring B instead. We then multiply together all the matrices Di corresponding to the maps di . The multiplications of the entries are performed in the skew-commutative ring B. We then get a product: D = D0 · D1 · · · Dc−1 , where c is the codimension of the variety X which supports F. If F has rank r and the degree of X is d, the matrix D is a nonzero rd×rd matrix. The entries in the product D now lie in ∧c W ∗ . Now comes the second shift of view: We consider the entries of D to be linear forms in the polynomial ring Sym(∧c W ∗ ). Then we take the determinant of D, computed in this polynomial ring, and get a form of degree rd in Sym(∧c W ∗ ). When considered in the coordinate ring of the Grassmannian Sym(∧c W ∗ )/IG , then det(D) equals the r th power of the Chow form of X. For more information on the fascinating links between the symmetric and exterior algebras, the reader can start with the Bernstein-Gel’fand-Gel’fand correspondence as treated in [11]. 4.3 s Skew-symmetry of the matrices computing the Chow form of P X4,2 s of symIn §3 we constructed two different Ulrich modules of rank 2 on the variety P X4,2 metric 4 × 4 matrices of rank ≤ 2. That variety has degree 10. The matrix D thus in both cases is 20 × 20, and its determinant is a square in Sym(∧c W ∗ ). In fact, and here our analysis of the equivariant resolutions pays off, the matrix D in both cases is skew-symmetric when we use the bases distinguished by representation theory for the differential matrices: Lemma 4.1. Let A, B, C be matrices of linear forms in the exterior algebra. Their products behave as follows under transposition: 1. (A · B)T = −B T · AT 2. (A · B · C)T = −C T · B T · AT . Proof. Part (1) is because uv = −vu when u and v are linear forms in the exterior algebra. Part (2) is because uvw = −wvu for linear forms in the exterior algebra. The resolutions (3.2) and (3.5) of our two Ulrich sheaves, have the form: α φ β F ←− G ←− G∗ ←− F ∗ . 18 (4.1) Dualizing and twisting we get the resolution: βT φT αT F ←− G ←− G∗ ←− F ∗ . Since φ = φT , both β and αT map isomorphically onto the same image. We can therefore replace the map β in (4.1) with αT , and get the GL(E)-equivariant resolution: α φ αT F ←− G ←− G∗ ←− F ∗ . Let α, φ and αT be the maps in the resolution above, but now considered to live over the exterior algebra. The Chow form associated to the two Ulrich sheaves is then the Pfaffian of the matrix: α φ αT . s ) constructed from the Ulrich sheaf is, in each Proposition 4.2. The Chow form Ch(P X4,2 case, the Pfaffian of a 20 × 20 skew-symmetric matrix. Proof. The Chow form squared is the determinant of α φ αT and we have: T α φ αT = − (αT )T φT αT = − α φ αT . 4.4 s Explicit matrices computing the Chow form of P X4,2 Even though our primary aim is to compute the Chow form of the essential variety, we get s as a by-product of our method. We explicit matrix formulas for the Chow form of P X4,2 carried out the computation in Proposition 4.2 in Macaulay2 for both Ulrich modules on s . We used the package PieriMaps to make matrices D and D representing α and P X4,2 1 2 φ with respect to the built-in choice of bases parametrized by semistandard tableaux. We had to multiply D2 on the right by a change of basis matrix to get a matrix representative with respect to dual bases, i.e. symmetric. For example in the case of the first Ulrich module (3.2) this change of basis matrix computes the perfect pairing S3,2 (E)⊗S3,3,1 (E) → (∧4 E)⊗3 . Let us describe the transposed inverse matrix that represents the dual pairing. Columns are labeled by the semistandard Young tableaux S of shape (3, 2), and rows are labeled by the semistandard Young tableaux T of shape (3, 3, 1). The (S, T )-entry in the matrix is obtained by fitting together the tableau S and the tableau T rotated by 180◦ into a tableau of shape (3, 3, 3, 3), straightening, and then taking the coefficient of 0 1 2 3 0 1 2 3 0 1 2 3 . To finish for each Ulrich module, we took the product D1 D2 D1T over the exterior algebra. The two resulting explicit 20 × 20 skew-symmetric matrices are available as arXiv s , ancillary files or at this paper’s webpage1 . Their Pfaffians equal the Chow form of P X4,2 which is an element in the homogeneous coordinate of the Gr(3, 10) = Gr(P2 , P9 ). To get 1 http://math.berkeley.edu/~ jkileel/ChowFormulas.html 19 a feel for the ‘size’ of this Chow form, note that this ring is a quotient of the polynomial ring Sym(∧3 Sym2 (E)) in 120 Plücker variables, denoted Q[p{11,12,13} , . . . , p{33,34,44} ] on our website, by the ideal minimally generated by 2310 Plücker quadrics. We can compute that s ) lives is a 108,284,013,552-dimensional vector space. the degree 10 piece where Ch(P X4,2 Both 20×20 matrices afford extremely compact formulas for this special element. Their entries are linear forms in p{11,12,13} , . . . , p{33,34,44} with one- and two-digit relatively prime integer coefficients. No more than 5 of the p-variables appear in any entry. In the first matrix, 96 off-diagonal entries equal 0. The matrices give new expressions for one of the two irreducible factors of a discriminant studied since 1879 by George Salmon ([26]) and as recently as 2011 ([25]), as we see next in Remark 4.3. Remark 4.3. From the subject of plane curves, it is classical that every ternary quartic form f ∈ C[x, y, z]4 can be written as f = det(xA + yB + zC) for some 4 × 4 symmetric matrices A, B, C. Geometrically, this expresses V(f ) inside the net of plane quadrics hA, B, Ci as the locus of singular quadrics. By Theorem 7.5 of [25], that plane quartic curve V(f ) is singular if and only if the Vinnikov discriminant: ∆(A, B, C) = M(A, B, C)P(A, B, C)2 evaluates to 0. Here M is a degree (16, 16, 16) polynomial known as the tact invariant and s ) after P is a degree (10, 10, 10) polynomial. The factor P equals the Chow form Ch(P X4,2 substituting Plücker coordinates for Stiefel coordinates:   ai1 j1 ai2 j2 ai3 j3 p{i1 j1 ,i2 j2 ,i3 j3 } = det  bi1 j1 bi2 j2 bi3 j3  . ci1 j1 ci2 j2 ci3 j3 4.5 Explicit matrices computing the Chow form of EC We now can put everything together and solve the problem raised by Agarwal, Lee, Sturmfels and Thomas in [1] of computing the Chow form of the essential variety. In Proposition 2.6, we constructed a linear embedding s : P8 ֒→ P9 that restricts to an embedding s . Both of our Ulrich sheaves supported on P X s pull back to Ulrich sheaves EC ֒→ P X4,2 4,2 supported on EC , and their minimal free resolutions pull back to minimal free resolutions: s∗ α s∗ φ s∗ αt s∗ F ←−−−− s∗ G ←−−−− s∗ G∗ ←−−−− s∗ F ∗ . Here we verified in Macaulay2 that s∗ quotients by a linear form that is a nonzero divisor for the two Ulrich modules. So, to get the Chow form Ch(EC ) from Propositions 3.4 and 3.9, we took matrices D1 and D2 symmetrized from above, and applied s∗ . That amounts to substituting xij = s(M )ij , where s(M ) is from §2.2. We then multiplied D1 D2 D1T , which is a product of a 20 × 60, a 60 × 60 and a 60 × 20 matrix, over the exterior algebra. 20 The two resulting explicit 20 × 20 skew-symmetric matrices are available at the paper’s webpage. Their Pfaffians equal the Chow form of EC , which is an element in the homogeneous coordinate of Gr(P2 , P8 ). We denote that ring as the polynomial ring in 84 (dual) Plücker variables Q[q{11,12,13} , . . . , q{31,32,33} ] modulo 1050 Plücker quadrics. Here Ch(EC ) lives in the 9,386,849,472-dimensional subspace of degree 10 elements. Both matrices are excellent representations of Ch(EC ). Their entries are linear forms in q{11,12,13} , . . . , q{31,32,33} with relatively prime integer coefficients less than 216 in absolute value. In the first matrix, 96 off-diagonal entries vanish, and no entries have full support. Bringing this back to computer vision, we can now prove our main result stated in §1: Proof of Theorem 1.1. Given {(x(i) , y (i) )}. Let us first assume that we have a solution g g (1) , . . . , X (6) to the system (1.1). Note that the group: A, B, X G := {g ∈ GL(4, C) | (gij )1≤i,j≤3 ∈ SO(3, C) and g41 = g42 = g43 = 0} equals the stabilizer of the set of calibrated camera matrices inside C3×4 , with respect to right multiplication. We now make two simplifying assumptions about our solution to (1.1). • Without loss of generality, A = [ id3×3 | 0 ]. For otherwise, select g ∈ G so that g g (6) is also a solution to (1.1). (1) , . . . , g −1 X Ag = [ id3×3 | 0 ], and then Ag, Bg, g −1 X • Denoting B = [ R | t ] for R ∈ SO(3, C) and t ∈ C3 , then without loss of generality, g (i) and replace t 6= 0. For otherwise, we may zero out the last coordinate of each X ′ ′ 3 B by [ R | t ] for any t ∈ C , and then we still have a solution to the system (1.1).   0 t3 −t2 t1 . Set M = [ t ]× R. Then M ∈ EC . The following Denote [ t ]× := −t3 0 t2 −t1 0 computation gives the basic link with Ch(EC ):  (i) (i) y1 y2   (i) x  T  1  g g (i)  ≡ (B X (i) ) M (AX (i) ) 1 M  x  2  1  T g g (i) (i) [ R | t ]T [ t ]× R [ id3×3 | 0 ] X =X  T g g (i) (i) [ R | 0 ]T [ t ]× [R | 0 ] X =X = 0. Here the second-to-last equality is because tT [ t ]× = 0, and the last equality is because the matrix in parentheses is skew-symmetric. In particular, this calculation shows that M ∈ EC satisfies six linear constraints. Explicitly, these are: 21  (1) (1) y1 x1   (2) (2) y1 x1   (3) (3) y x  1 1   (4) (4) y1 x1    (5) (5) y1 x1   (6) (6) y 1 x1 (1) (1) y 1 x2 (1) y1 (2) (2) y1 (3) (3) y1 (4) (4) y1 (5) (5) y1 (6) (6) y1 y 1 x2 y 1 x2 y 1 x2 y 1 x2 y 1 x2 (1) (1) y 2 x1 (2) y 2 x1 (3) y 2 x1 (4) y 2 x1 (5) y 2 x1 (6) y 2 x1 (1) (1) y 2 x2 (2) (2) y 2 x2 (3) (3) y 2 x2 (4) (4) y 2 x2 (5) (5) y 2 x2 (6) (6) y 2 x2 (1) y2 (2) (2) y2 (3) (3) y2 (4) (4) y2 (5) (5) y2 (6) (6) y2 (1) x1 (1) x2 (2) x2 (3) x2 (4) x2 (5) x2 (6) x2 (2) x1 (3) x1 (4) x1 (5) x1 (6) x1 (2) (3) (4) (5) (6)  1   1   1    1    1   1   m11 m   12  m   13  m   21  m   22  = 0.   m23    m31    m32  m33 Let the above 6 × 9 matrix be denoted Z. We consider two cases. • Case 1: Z is full rank. Then ker(Z) determines a P2 in P8 . This P2 meets EC , namely at M . So, Ch(EC ) evaluates to 0 there. By [17, p.94], we can compute the Plücker coordinates of this projective plane from the maximal minors of Z. • Case 2: Z is not full rank. Then all maximal minors of Z are 0. Thus, to get M(x(i) , y (i) ) as in Theorem 1.1, we take either of the 20 × 20 skewsymmetric matrix formulas for Ch(EC ) described above, and we replace each qijk by the determinant of Z with columns i, j and k removed. In Case 1, this M(x(i) , y (i) ) drops rank, by the definition of Chow forms. In Case 2, this M(x(i) , y (i) ) evaluates to the zero matrix. We have proven that this M(x(i) , y (i) ) satisfies the first property stated in Theorem 1.1. We now prove that this M(x(i) , y (i) ) satisfies the converse property in Theorem 1.1. Factor M = U diag(1, 1, 0) V T with U, V ∈ SO(3, C). This is possible for a Zariski open subset of M ∈ EC . For the dense subset in Theorem 1.1, we take those {(x(i) , y (i) )} for T g (i) M x (i) = 0. This is a which there is M in the above Zariski open subset such that yf dense  open subsetin all pairs {(x(i) , y (i) )} such that M(x(i) , y (i) ) is rank deficient. Denote 0 −1 0     g (i) W = 1 0 0. Now set A = I | 0 and B = U W V T | U 0 0 1 T . Now X 0 0 1 are uniquely determined (see [19, 9.6.2]). We illustrate the main theorem with two examples. Note that since the first example is a ‘positive’, it is a strong (and reassuring) check of correctness for our formulas. 22 Example 4.4. Consider the image data of 6 point correspondences {(x(i) , y (i) ) ∈ R2 × R2 | i = 1, . . . , m} given by the corresponding rows of the two matrices:  8 16    11 11 0 0 7 5   1 −1    22 22      0 −1  8 34   2  29  [ x(i) ] =  [ y (i) ] =  29  . −3 0   17 −1 20  3    1  2 − 25  1  7 7  1 1 9 3 7 4 In this example,  0 1  0  (i)  X =  3  3 7 4 they do come from world points X (i) ∈ R3 and calibrated cameras A, B:  0 2   7 4 4   −1 1   9 9 9 0 1 0 0 0 −2 4    , A = 0 1 0 0 , B = − 49 − 91 98 0 . 0 −1  4 0 0 1 0 − 98 91 1 −5 2  9 1 7 To detect this, we form the 6 × 9 matrix Z from the proof of  16 8 0 0 0 0 0 11 11  7 7 7 5 5 5 1  22 − 22 22 22 − 22 22  8 34 17 4  0 0 − 29 29 0 − 29 29  Z =  51 17 − 20 0 3 0 −1 −3 20   3 5 1 3 5 3  14 − 14 7 14 − 14 71 2 9 4 9 28 9 4 3 4 3 28 3 4 1 Theorem 1.1:  0 1  −1 1  − 21 1  . 0 1   − 25 1 1 7 1 We substitute the maximal minors of Z into the matrices computing Ch(EC ) in Macaulay2. The determinant command then outputs 0. This computation recovers the fact that the point correspondences are images of 6 world points under a pair of calibrated cameras. Example 4.5. Random data {(x(i) , y (i) ) ∈ R2 × R2 | i = 1, . . . , 6} is expected to land outside the Chow divisor of EC . We made an instance using the random(QQ) command in Macaulay2 for each coordinate of image point. The coordinates ranged from 18 to 5 in absolute value. We carried out the substitution from Example 4.4, and got two full-rank skew-symmetric matrices with Pfaffians ≈ 5.5 × 1025 and ≈ 1.3 × 1022 , respectively. These matrices certified that the system (1.1) admits no solutions for that random input. The following proposition is based on general properties of Chow forms, collectively known as the U-resultant method to solve zero-dimensional polynomial systems. In our 23 situation, it gives a connection with the ‘five-point algorithm’ for computing essential matrices. The proposition is computationally inefficient as-is for that purpose, but see [23] for a more efficient algorithm that would exploit our matrix formulas for Ch(EC ). Implementing the algorithms in [23] for our matrices is one avenue for future work. Proposition 4.6. Given a generic 5-tuple {(x(i) , y (i) ) ∈ R2 × R2 | i = 1, . . . , 5}, if we make the substitution from the proof of Theorem 1.1, then the Chow form Ch(EC ) specializes to (6) (6) (6) (6) a polynomial in R[x1 , x2 , y1 , y2 ]. Over C, this specialization completely splits as:  (6)  x1 10 Y  (6) (6) (i)  (6)  y1 y2 1 M x2  . i=1 1 Here M (1) , . . . , M (10) ∈ EC are the essential matrices determined by the given five-tuple. Proof. By the proof of Theorem 1.1, any zero of the above product is a zero of the specialization of Ch(EC ). By Hilbert’s Nullstellensatz, this implies that the product divides the specialization. But both polynomials are inhomogeneous of degree 20, so they are ≡. 4.6 Numerical experiments with noisy point correspondences In this final subsection, we discuss how our Theorem 1.1 is actually resistant to a common complication in concrete applications of algebra: noisy data. Indeed, on real image data, correctly matched point pairs will only come to the computer vision practitioner with finite accuracy. In other words, they differ from exact correspondences by some noise. Practical Question 4.7. While in Theorem 1.1 the matrix M(x, y) drops rank when there is an exact solution to (1.1), how can we tell if there is an approximate solution? The answer is to calculate the Singular Value Decomposition of the matrices M(x, y) from Theorem 1.1, when a noisy six-tuple of image point correspondences is plugged in. Since Singular Value Decomposition is numerically stable [8, §5.2], we expect approximately rank-deficient SVD’s when there exists an approximate solution to (1.1). To summarize, since we have matrix formulas, we can look at spectral gaps in the presence of noise. We offer experimental evidence that this works. For our experiments, we assumed uniform noise from unif [−10−r , 10−r ]; this arises in image processing from pixelation [6, §4.5]. For each r = 1, 1.5, 2, . . . , 15, we executed five hundred of the following trials: • Pseudo-randomly generate an exact six-tuple of image point correspondences {(x(i) , y (i) ) ∈ Q2 × Q2 | i = 1, . . . , 6} with coordinates of size O(1). 24 Average signal from SVD 15 matrix from first sheaf matrix from second sheaf 10 5 0 0 2 4 6 8 10 12 14 16 Accuracy of point correspondences FIGURE. Both matrices satisfying Theorem 1.1 detect approximately consistent point pairs. • Corrupt each image coordinate in the six-tuple by adding an independent and identically distributed sample from unif [−10−r , 10−r ]. • Compute the SVD’s of both 20 × 20 matrices M(x, y), derived from the first and second Ulrich sheaf respectively, with the above noisy image coordinates plugged in. These experiments were performed in Macaulay2 using double precision for all floatingpoint arithmetic. Since it is a little subtle, we elaborate on our algorithm to pseudorandomly generate exact correspondences in the first bullet. It breaks into three steps: 1. Generate calibrated cameras A, B ∈ Q3×4 . To do this, we sample twice from the Haar measure on SO(3, R) and sample twice from the uniform measure on the radius 2 ball centered at the origin in R3 . Then we concatenate nearby points in SO(3, Q) and Q3 to obtain A and B. To find the nearby rotations, we pullback under R3 −→ S 3 \{N } −→ SO(3, R), we take nearby points in Q3 , and then we pushforward. 2. Generate world points X (i) ∈ Q3 (i = 1, . . . , 6). To do this, we sample six times from the uniform measure on the radius 6 ball centered at the origin in R3 (a choice fitting with some real-world data) and then we replace those by nearby points in Q3 . g g g (i) ≡ AX (i) and g (i) . 3. Set x y (i) ≡ B X The most striking takeaway of our experiments is stated in the following result concerning the bottom spectral gaps we observed. Bear in mind that since M(x, y) is skewsymmetric, its singular values occur with multiplicity two, so σ19 (M(x, y)) = σ20 (M(x, y)). 25 Empirical Result 4.8. In the experiments described above, we observed for both matrices: σ18 (M(x, y)) = O(10r ). σ20 (M(x, y)) Here M(x, y) has r-noisy image coordinates, and σi denotes the ith largest singular value.   (M(x,y)) The figure above plots log10 σσ18 averaged over the five hundred trials against r. 20 (M(x,y)) References [1] S. Agarwal, H.-L. Lee, B. Sturmfels, R. Thomas, Certifying the Existence of Epipolar Matrices, Int. J. Comput. Vision, to appear, arXiv:1510.01401v1. [2] S. Agarwal, N. Snavely, I. Simon, S.M. Seitz, R. Szeliski, Building Rome in a day, Proc. Int. Conf. on Comput. Vision (2009), 72–79. [3] M. Aprodu, G. Farkas, A. Ortega, Minimal resolutions, Chow forms and Ulrich bundles on K3 surfaces, J. Reine Angew. Math., to appear, arXiv:1212.6248v4. [4] J. Bochnak, M. Coste and M.-F. Roy, Real Algebraic Geometry, A Series of Modern Surveys in Mathematics 36, Springer-Verlag, Berlin, 1998. [5] C. Carré, B. Leclerc, Splitting the Square of a Schur Function into its Symmetric and Antisymmetric Parts, J. Algebraic Combin. 4 (1995), no. 3, 201–231. [6] A. Bovik, Handbook of Image and Video Processing, 2nd ed., Academic Press, San Diego, 2005. [7] J. Draisma, E. Horobeţ, G. Ottaviani, B. Sturmfels, R. Thomas, The Euclidean Distance Degree of an Algebraic Variety, Found. Comput. Math. 16 (2016), no. 1, 99–149, arXiv:1309.0049v3. [8] J. Demmel, Applied Numerical Linear Algebra, Society for Industrial and Applied Mathematics, Philadelphia, 1997. [9] D. Drusvyatski, H.-L. Lee, R. Thomas, Counting Real Critical Points of the Distance to Orthogonally Invariant Matrix Sets, SIAM J. Matrix Anal. Appl. 36 (2015), no. 3, 1360–1380, arXiv:1502.02074v2. [10] D. Drusvyatski, H.-L. Lee, G. Ottaviani, R. Thomas, The Euclidean Distance Degree of Orthogonally Invariant Matrix Varieties, Israel J. Math., to appear, arXiv:1601.07210v1. [11] D. Eisenbud, G. Fløystad, F. Schreyer, Sheaf cohomology and free resolutions over exterior algebras, Trans. Amer. Math. Soc. 355 (2003), no. 11, 4397–4426, arXiv:math/0104203v2. [12] D. Eisenbud, F. Schreyer, J. Weyman, Resultants and Chow forms via exterior syzygies, J. Amer. Math. Soc. 16 (2003), no. 3, 537–579, arXiv:math/0111040v1. [13] W. Fulton, J. Harris, Representation Theory: A First Course, Graduate Texts in Mathematics 129, Springer-Verlag, New York, 1991. [14] O.D. Faugeras, S. Maybank, Motion from point matches: Multiplicity of solutions, Int. J. Comput. Vision 4 (1990), no. 3, 225–246. [15] M. Fischler, R. Bolles, Random Sample Consensus: a Paradigm for Model Fitting with Application to Image Analysis and Automated Cartography, Commun. Assoc. Comp. Mach. 24 (1981) 381–395. [16] F. Galetto, Free resolutions and modules with a semisimple Lie group action, J. Softw. Algebra Geom. 7 (2015), 17–29. 26 [17] I.M. Gelfand, M.M. Kapranov, and A.V. Zelevinsky, Discriminants, Resultants and Multidimensional Determinants, Mathematics: Theory & Applications, Birkhäuser, Boston, 1994. [18] D. Grayson, M. Stillman, Macaulay2, a software system for research in algebraic geometry. Available at http://www.math.uiuc.edu/Macaulay2/. [19] R.I. Hartley, A. Zisserman, Multiple View Geometry in Computer Vision, 2nd ed., Cambridge University Press, Cambridge, 2004. [20] M. Joswig, J. Kileel, B. Sturmfels, A. Wagner, Rigid Multiview Varieties, Int. J. Algebra Comput. 26 (2016), 775–778, arXiv:1509.03257v2. [21] M. Marshall, Positive Polynomials and Sums of Squares, Mathematical Surveys and Monographs 146, American Mathematical Society, Providence, 2008. [22] S. Maybank, Theory of Reconstruction from Image Motion, Springer, Berlin, 1993. [23] H. Murao, H. Kobayashi, T. Fujise, On Factorizing the Symbolic U-resultant – Application of the ddet operator, J. Symbolic Comput. 15 (1993), no. 2, 123–142. [24] D. Nistér, An efficient solution to the five-point relative pose problem, IEEE Trans. Pattern Anal. Mach. Intell. 26 (2004), no. 6, 756–770. [25] D. Plaumann, B. Sturmfels, C. Vinzant, Quartic Curves and Their Bitangents, J. Symbolic Comput. 46 (2011), no. 6, 712–733, arXiv:1008.4104v2. [26] G. Salmon, A Treatise on the Higher Plane Curves: Intended as a Sequel to “A Treatise on Conic Sections”, 3rd ed., Dublin, 1879; reprinted by Chelsea Publ. Co., New York, 1960. [27] S. Sam, Computing inclusions of Schur modules, J. Softw. Algebra Geom. 1 (2009), 5–10, arXiv:0810.4666v2. [28] S. Sam, J. Weyman, Pieri resolutions for classical groups, J. Algebra 329 (2011), no. 1, 222–259, arXiv:0907.4505v5. [29] S. Sam, A. Snowden, J. Weyman, Homology of Littlewood complexes, Selecta Mathematica 19 (2013), no. 3, 655–698, arXiv:1209.3509v2. [30] M. Stillman, H. Schenck, C. Raicu, SchurRings, a package for Macaulay2. Available at http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.8.2/share/doc/Macaulay2/SchurRings/html/. [31] J. Weyman, Cohomology of Vector Bundles and Syzygies, Cambridge Tracts in Mathematics 149, Cambridge University Press, Cambridge, 2003. Authors’ addresses: Gunnar Fløystad, Universitetet i Bergen, Norway, [email protected] Joe Kileel, University of California, Berkeley, USA, [email protected] Giorgio Ottaviani, Università di Firenze, Italy, [email protected] 27
0math.AC
PREPRINT 1 SVD-based Kalman Filter Derivative Computation arXiv:1612.04777v2 [cs.SY] 6 Apr 2017 J.V. Tsyganova and M.V. Kulikova Abstract— Recursive adaptive filtering methods are often used for solving the problem of simultaneous state and parameters estimation arising in many areas of research. The gradient-based schemes for adaptive Kalman filtering (KF) require the corresponding filter sensitivity computations. The standard approach is based on the direct differentiation of the KF equations. The shortcoming of this strategy is a numerical instability of the conventional KF (and its derivatives) with respect to roundoff errors. For decades, special attention has been paid in the KF community for designing efficient filter implementations that improve robustness of the estimator against roundoff. The most popular and beneficial techniques are found in the class of square-root (SR) or UD factorization-based methods. They imply the Cholesky decomposition of the corresponding error covariance matrix. Another important matrix factorization method is the singular value decomposition (SVD) and, hence, further encouraging KF algorithms might be found under this approach. Meanwhile, the filter sensitivity computation heavily relies on the use of matrix differential calculus. Previous works on the robust KF derivative computation have produced the SR- and UD-based methodologies. Alternatively, in this paper we design the SVD-based approach. The solution is expressed in terms of the SVD-based KF covariance quantities and their derivatives (with respect to unknown system parameters). The results of numerical experiments illustrate that although the newly-developed SVD-based method is algebraically equivalent to the conventional approach and the previously derived SRand UD-based strategies, it outperforms the mentioned techniques for estimation accuracy in ill-conditioned situations. Index Terms— Kalman filter, filter sensitivity equations, SVD factorization, array algorithms. I. I NTRODUCTION The problem of filter sensitivities evaluation plays a key role in many areas of research; for instance, in state estimation and parameter identification realm [1], [2], in the field of optimal input design [3], [4], in information theory for computing the Fisher information matrix [5]–[7] etc. In this paper we explore linear discrete-time stochastic systems where the associated Kalman filter (KF) is used for estimating the unknown dynamic states. Therefore, the standard approach for computing the filter sensitivities (with respect to unknown system parameters) is a direct differentiation of the KF equations. This conventional methodology is comprehensively studied in [3], [8], [9]. The shortcoming of this strategy is a numerical instability of the conventional KF (and its derivatives) with respect to roundoff errors discussed in [10], [11]. Due to this fact, special attention has been paid in the KF community for designing robust KF implementation methods. The most popular techniques belong to the class of square-root (SR) or UD factorization-based methods; see [12]–[15] and many others. These algorithms imply the Cholesky decomposition and its modification for the corresponding covariance matrix factorization [13], [16], [17]. We may note that the Cholesky decomposition exists and is unique when the symmetric matrix to be decomposed is positive definite [18]. If it is a positive semidefinite, then the Cholesky decomposition still exists, however, it Manuscript received ??; revised ??. The second author thanks the support of Portuguese National Fund (Fundação para a Ciência e a Tecnologia) within the scope of project UID/Multi/04621/2013. The first author is with Ulyanovsk State University, Str. L. Tolstoy 42, 432017 Ulyanovsk, Russian Federation. The second author is with CEMAT (Center for Computational and Stochastic Mathematics), Instituto Superior Técnico, Universidade de Lisboa, Av. Rovisco Pais 1, 1049-001 LISBOA, Portugal; Emails: [email protected]; [email protected] is not unique [19]. Further encouraging KF implementation methods might be found with the use of singular value decomposition (SVD). Some evidences of better estimation quality obtained under the SVDbased approach exist in the field of nonlinear filtering; for instance, see discussion in [20]–[22] and others. For linear filtering problem examined in this paper, the first SVD-based KF was, to the best of our knowledge, designed in [23]. Our recent analysis exposes that the mentioned SVD-based filter can be further improved for enhancing its numerical robustness. This result is comprehensively studied in [24], where some new stable SVD-based KF implementations are designed. Despite the existence of inherently more stable SR-, UD- and SVDbased KF variants, the problem of robust filter derivative computation is seldom addressed in practice because of its complicated matter. The solution to the mentioned problem heavily relies on the use of matrix differential calculus. The first SR-based information-type algorithm for the KF derivative computations belongs to Bierman et al. and was appeared in 1990; see [25]. Alternatively, the SR-based covariance-type method was proposed in [26] as well as the UDbased scheme designed in [27]. Later on, a general “differentiated” SR-based methodology was designed for both orthogonal and Jorthogonal transformations involved in the filtering equations (and their derivatives) in [28]–[30]. Alternatively, in this technical note we develop the SVD-based approach for the KF derivative computation. We show that the new technique is algebraically equivalent to the conventional “differentiated” KF, but it improves the robustness against roundoff errors as well as the existing “differentiated” SR- and UD-based methodologies. However, motivated by the results obtained in nonlinear filtering realm, we expect that the newly-designed SVDbased method outperforms the previously derived algorithms while solving the parameters estimation problem, especially when the error covariance is ill-conditioned. II. F ILTER SENSITIVITY EQUATIONS : CONVENTIONAL APPROACH Consider the state-space equations xk = F (θ)xk−1 + B(θ)uk−1 + G(θ)wk−1 , k ≥ 1, zk = H(θ)xk + vk , vk ∼ N (0, R(θ)) , wk ∼ N (0, Ω(θ)) (1) (2) where zk ∈ Rm , uk ∈ Rd , xk ∈ Rn and θ ∈ Rp are, respectively, the vectors of available measurements, the known deterministic control input, the unknown dynamic state and the unknown system parameters that need to be estimated from the available experimental data, {z1 , . . . , zN }. The process and the measurement noises are independent Gaussian zero-mean white-noise processes that are also independent from the initial state x0 ∼ N (x̄0 , Π0 (θ)). The covariances are assumed to be Ω(θ) ≥ 0, R(θ) > 0 and Π0 (θ) ≥ 0. Equations (1), (2) represent a set of the state-space models (SSMs). Each of them corresponds to a particular system parameter value. This means that for any fixed value of θ, say θ̂∗ , the system matrices are known, i.e. there is no uncertainty in model (1), (2). For simplicity, throughout the paper we write F etc. instead of F (θ̂∗ ) etc. when evaluating at the fixed point θ̂∗ . The associated KF yields the linear minimum least-square estimate of the unknown dynamic state that PREPRINT 2 can be recursively computed via the equations [16, Theorem 9.2.1]: ek = zk − H x̂k|k−1 , Kp,k = F Pk|k−1 H T x̂1|0 = x̄0 , −1 Re,k , k ≥ 1, (3) T Re,k = R + HPk|k−1 H , x̂k+1|k = F x̂k|k−1 + Buk + Kp,k ek (4) (5) where {ek } are innovations of the discrete-time KF. The important property of the  KF for Gaussian SSMs is ek ∼ N (0, Re,k ). The Pk|k−1 = E (xk − x̂k|k−1 )(xk − x̂k|k−1 )T is the one-step ahead predicted error covariance matrix computed as follows: T Pk+1|k = F Pk|k−1 F T + GΩGT − Kp,k Re,k Kp,k , P1|0 = Π0 . (6) The conventional approach for deriving the related sensitivity model is based on differentiation of the corresponding filtering equations. Let A(θ) ∈ Rm×n , B(θ) ∈ Rn×q be matrices, which entries are differentiable functions of the parameter vector θ ∈ Rp . The m×n matrix ∂i A = ∂A/∂θi implies the partial derivative of the A with respect Pto the i-th component of θ, i = 1, . . . p. The m × n matrix dA = pi=1 (∂i A) · (dθi ) is the differential form of first-order derivatives of A(θ). Taking into account the matrix product rule of differentiation [31, p. 955]: d (AB) = (dA) B + A (dB), and the  fact dI = 0, we derive d A−1 = −A−1 (dA) A−1 for any square and invertible matrix A (it is also known as the Jacobi’s formula); see also [8, p. 546]. Using these differentiation rules, the necessary differentials of (3)-(6) can be written as follows [8], [9]:   dek = − (dH) x̂k|k−1 + H dx̂k|k−1 , (7)  dx̂k+1|k = (dF ) x̂k|k−1 + F dx̂k|k−1 + (dB) uk + (dKp,k ) ek + Kp,k (dek ), T (8)  −1 Re,k + F dPk|k−1 H dKp,k = (dF ) Pk|k−1 H   T −1 + F Pk|k−1 dH Re,k T −1 Re,k −1 −1 , (dRe,k ) Re,k − F Pk|k−1 H T Re,k T  (9) T dRe,k = dR + (dH) Pk|k−1 H + H dPk|k−1 H   (10) + HPk|k−1 dH T ,  T T dPk+1|k = (dF ) Pk|k−1 F + F dPk|k−1 F   + F Pk|k−1 dF T + (dG) ΩGT + G (dΩ) GT   T + GΩ dGT − (dKp,k ) Re,k Kp,k   T T − Kp,k (dRe,k ) Kp,k − Kp,k Re,k dKp,k . (11) In deriving the equations above we take into account that dzk = 0 and duk = 0, because the observations zk and the control input uk do not depend on the parameters (i.e. their realizations are independent of variations in θ) and therefore have a differential equal to zero. We may also note that except for the scalar factor dθi , ∂i A is a special case of dA, so that to obtain partial-derivative forms from differential forms, we only have to everywhere replace operator d (·) with ∂i (·) for i = 1, . . . p [8, p. 546]. Hence, from (7) – (11) we obtain a set of p vector equations, known as the filter sensitivity equations, for computing ∂i x̂k+1|k , i = 1, . . . p, and a set of p matrix equations, known as the Riccati-type sensitivity equations, for computing ∂i Pk+1|k , i = 1, . . . p. This approach for the KF sensitivity model derivation is called the “differentiated KF”. Its main drawback is a numerical instability of the conventional KF (3) – (6) and inherently its derivative (7) – (11) with respect to roundoff errors. The goal of this paper is to design a robust methodology for updating the “differentiated” KF equations above in terms of SVD factors (and their derivatives) of the error covariance matrices Pk|k−1 instead of using the full matrices Pk|k−1 (and their derivatives). III. SVD FACTORIZATION - BASED K ALMAN FILTERING To the best of our knowledge, the first SVD-based KF was by Wang et al. and appeared in 1992; see Eqs (17), (22), (23) in [23, pp. 12251226]. Our recent research shows that although that implementation is inherently more stable than the KF (3) – (6), it is still sensitive to roundoff and poorly treats ill-conditioned problems. The cited analysis exposes that the SVD-based filter can be further improved for enhancing its numerical robustness. This result is comprehensively studied in [24], where new stable SVD-based KF implementations are designed. The readers are referred to the cited paper for the detailed derivations, numerical stability discussion and proofs. Here, we briefly outline the principle steps for construction of the most advanced SVD-based KF variant. Next, we extend it to a stable filter sensitivities computation, which is the main purpose of this study. Consider the SVD factorization [32, Theorem 2.8.1]: suppose A ∈ Cm×n , rank A = r. There exist positive numbers σ1 ≥ . . . σr > 0 and unitary matrices W ∈ Cm×m and V ∈ Cn×n such that   S 0 ∗ ∈ Cm×n , S = diag{σ1 , . . . , σr } A = W ΣV , Σ = 0 0 where V ∗ is the conjugate transpose of V . The diagonal entries of Σ are known as the singular values of A. The non-zero σi (i = 1, . . . , r) are the square roots of the non-zero eigenvalues of both A∗ A and AA∗ . If A is a square matrix such that A∗ A = AA∗ , then the A can be diagonalized using a basis of eigenvectors according to the spectral theorem, i.e. it can be factorized as follows: A = QDQ∗ where Q is a unitary matrix and D is a diagonal matrix, respectively. If A is also positive semi-definite, then the spectral decomposition above, A = QDQ∗ , is also a SVD factorization, i.e. the diagonal matrix D contains the singular values of A. For the SSMs examined in this paper, the initial error covariance Π0 ∈ Rn is a symmetric positive semi-definite matrix and, hence, the spectral decomposition implies Π0 = QΠ0 DΠ0 QTΠ0 where QΠ0 and DΠ0 are the orthogonal and diagonal matrices, respectively. It is also a SVD factorization, i.e. the factor DΠ0 contains the singular values of Π0 . Now, we are ready to present the SVD-based KF implementation developed recently in [24]. Instead of conventional recursion (3)-(6) 1/2 for Pk|k−1 , we update only their SVD factors, {QPk|k−1 , DPk|k−1 }, at each iteration step of the filter as shown below. I NITIAL S TEP (k = 0). Apply the SVD factorization for the initial error covariance matrix Π0 = QΠ0 DΠ0 QTΠ0 and, additionally, for the process and measurement noise covariances: Ω = QΩ DΩ QTΩ and R = QR DR QTR , respectively. Set the initial values as follows: 1/2 1/2 QP1|0 = QΠ0 , DP1|0 = DΠ0 and x̂1|0 = x̄0 . M EASUREMENT U PDATE (k = 1, . . . , N ). Build the pre-arrays from the filter quantities that are currently available and, then, apply the SVD factorizations in order to obtain the corresponding SVD factors of the updated filter quantities as follows: # " # " 1/2 1/2 DR QTR DRe,k (1) QTRe,k , (12) = W 1/2 MU DPk|k−1 QTPk|k−1 H T 0 | {z } | {z } Pre−array Post−array SVD factors   K̄k = QPk|k−1 DPk|k−1 QTPk|k−1 H T QRe,k , (13) # " # " 1/2 1/2 DPk|k−1 QTPk|k−1 (I − Kk H)T DPk|k (2) QTPk|k (14) = WM U 1/2 0 DR QTR KkT {z } | {z } | Pre−array Post−array SVD factors (1) −1 where we denote Kk = K̄k DR QTRe,k . The matrices WM U ∈ e,k (2) m×m (n+m)×(n+m) (m+n)×(m+n) and WM U ∈ R , R , QRe,k ∈ R QPk|k ∈ Rn×n are the orthogonal matrices of the corresponding PREPRINT 3 1/2 1/2 SVD factorizations in (12), (14). Next, DRe,k ∈ Rm×m and DPk|k ∈ Rn×n are diagonal matrices with square roots of the singular values of Re,k and Pk|k , respectively. It can be easily seen that the required SVD factors of the inno1/2 vation covariance Re,k , i.e. {QRe,k , DRe,k }, and a posteriori error 1/2 covariance matrix Pk|k , i.e. {QPk|k , DPk|k }, are directly read-off from the post-array factors in (12) and (14), respectively. Finally, find a posteriori estimate x̂k|k through equations  −1 x̂k|k = x̂k|k−1 + K̄k DR ē , ēk = QTRe,k zk − H x̂k|k−1 . (15) e,k k T IME U PDATE (k = 1, . . . , N ). Build the pre-array and apply the SVD factorization to obtain a priori error covariance SVD factors 1/2 {QPk+1|k , DPk+1|k } as follows: " 1/2 # DPk|k QTPk|k F T 1/2 DΩ QTΩ GT | {z Pre−array } = WT U | " 1/2 DPk+1|k 0 {z # QTPk+1|k Post−array SVD factors and find a priori estimate x̂k+1|k as follows: x̂k+1|k = F x̂k|k + Buk . (16) } the derivative of the pre-array, A′θ , the following formulas calculate the corresponding derivatives of the post-arrays:  ′ h i S Σ′θ = θ , Sθ′ = diag WT A′θ V , (19) 0 s×s h i V′θ = V L̄T2 − L̄2 (20)   where WT A′θ V s×s denotes the main s × s block of the matrix product WT A′θ V, and L̄2 is a strictly lower triangular matrix, which entries are computed as follows: (l̄2 )ij = ūji σj + ¯ lij σi , σi2 − σj2 i = 2, . . . , s, j = 1, . . . , i − 1. (21) In equation above, the quantities ūji and l̄ji denote the entries of matrices L̄ and Ū , respectively. The L̄,Ū are strictly  lower and upper triangular parts of the matrix product WT A′θ V s×s , respectively. Proof: By differentiating (18) with respect to θ, we obtain A′θ = W′θ ΣVT + WΣ′θ VT + WΣ (VT )′θ . (22) T (17) The SVD-based KF implementation above is formulated in twostage form. Meanwhile, following [15], the conventional KF (3) – (6) is expressed in the so-called “condensed” form. Nevertheless, these KF variants are algebraically equivalent. It is easy to prove if we take into account the SVD factorization A = WΣVT and the properties of orthogonal matrices. Indeed, for each pre-array to be decomposed we have AT A = (VΣWT )(WΣVT ) = VΣ2 VT . Next, by comparing both sides of the obtained matrix equations, we come to the corresponding SVD-based KF formulas. The detailed derivation can be found in [24]. IV. F ILTER SENSITIVITY EQUATIONS : SVD- BASED APPROACH To begin constructing the “differentiated” SVD-based method for computing the filter sensitivities, we pay attention to the underlying SVD-based filter and remark that it is formulated in the so-called array form. This makes the modern KF algorithms better suited to parallel implementation and to very large scale integration (VLSI) implementation as mentioned in [15]. Each iteration of the SVDbased filter examined has the following pattern: given a pre-array A ∈ R(k+s)×s , compute the post-array SVD factors W ∈ R(k+s)×(k+s) , Σ ∈ R(k+s)×s and V ∈ Rs×s by means of the SVD factorization   S T , S = diag{σ1 , . . . , σs } (18) A=WΣV , Σ= 0 where the matrix A is of full column rank, i.e. rank A = s; the W, V are orthogonal matrices and S is a diagonal matrix with singular values of the pre-array A. The goal of our study is to develop the method that naturally extends formula (18) on the post-array SVD factors’ derivative computation. More precisely, the computational procedure is expected to utilize the pre-array A and its derivative A′θ for reproducing the SVD post-arrays {W, Σ, V} together with their derivatives {W′θ , Σ′θ , V′θ }. To achieve our goal, we prove the result presented below. We also bear in mind that the SVD post-array factor W is of no interest in the presented SVD-based KF for performing the next step of the filter recursion and, hence, the quantity W′θ is not required to be computed. Lemma 1: Consider the SVD factorization in (18). Let entries of the pre-array A(θ) be known differentiable functions of a scalar parameter θ. We assume that σi (θ) 6= σj (θ), j 6= i, for all θ. Given Having applied a right-multiplier V and a left-multiplier W to equation (22), we have h i h i WT A′θ V = WT W′θ Σ + Σ′θ + Σ (VT )′θ V . (23) In deriving the equation above we take into account the properties of any orthogonal matrix Q, i.e. QQT = QT Q = I. It is also easy to show that for any orthogonal matrix Q the product Q′θ QT is a skew symmetric matrix. Indeed, by differentiating ′ both sides of QQT = I with respect to θ, we get Q′θ QT + Q QT θ = 0, T or in the equivalent form Q′θ QT = − Q′θ QT . The latter implies ′ T that the matrix Qθ Q is skew symmetric. For the sake of simplicity we introduce the following notations: Υ = WT W′θ and Λ = VT V′θ . As discussed above, the matrices Υ ∈ R(k+s)×(k+s) and Λ ∈ Rs×s are skew symmetric, because W and V are orthogonal matrices. Hence, we have ΛT = −Λ. Taking into account this fact, we obtain the following partitioning of the matrix form of equation (23): " #      ′   WT A′θ V s×s S [Υ]s×s [Υ]s×k S S  T ′  + θ − Λ. = 0 0 [Υ]k×s [Υ]k×k 0 W Aθ V k×s From the equation above, we derive the formula for the main s × s block of the matrix product WT A′θ V h i = [Υ]s×s S + Sθ′ − SΛ. (24) WT A′θ V s×s Hence, the diagonal matrix Sθ′ obeys the equation i h − [Υ]s×s S + SΛ. Sθ′ = WT A′θ V s×s (25) Now, let us discuss formula (25) in details. Recall the matrices Υ and Λ are skew symmetric matrices and, hence, their diagonal entries are equal to zero. The multiplication of any skew symmetric matrix by a diagonal matrix does not change the matrix structure, i.e. the diagonal entries of the matrix products [Υ]s×s S and SΛ are equal to zero as well. Meanwhile, the matrix WT A′θ V s×s is a full matrix and contains a diagonal part. Hence, from equation (25) we conclude that diagonal matrix Sθ′ is, in fact, a diagonal part of the main s × s block of the matrix product WT A′θ V. This completes the proof of formulas in equation (19). Finally, we need to compute V′θ where Λ = VT V′θ . Since V is an orthogonal matrix, we obtain V′θ = VΛ. Next, any skew symmetric matrix can be presented as a difference of a strictly lower triangular PREPRINT 4 matrix and its transpose. Hence, the skew symmetric matrices [Υ]s×s and Λ can be represented as follows: [Υ]s×s = L̄T1 − L̄1 Λ = L̄T2 − L̄2 (26) where L̄1 and L̄2 are strictly lower triangular matrices.   Next, we split the matrix product WT A′θ V s×s into strictly lower diagonal and strictly upper triangular parts, i.e.  T triangular,  W A′θ V s×s = L̄ + D + Ū . It was proved above that Sθ′ = D. Taking into account this fact, the substitution of both formulas in (26) into (25) yields h i h i T T D = L̄ + D + Ū . (27) S + S L̄ − L̄ − L̄ − L̄ 2 1 2 1 |{z} | {z } | {z } | {z } ′ ′V Sθ T W A [ θ ]s×s Λ [Υ]s×s Hence, we obtain L̄ + Ū = [L̄T1 − L̄1 ]S − S[L̄T2 − L̄2 ]. (28) In (28), the L̄, L̄1 , L̄2 are strictly lower triangular matrices, the Ū is a strictly upper triangular matrix and S is a diagonal. Hence, equation (28) implies  Ū = L̄T1 S − S L̄T2 , L̄ = −L̄1 S + S L̄2 . A LGORITHM 2. D IFFERENTIATED SVD- BASED KF(x̄0 , Π0 ) Initial Step (k = 0). 1 Ω = QΩ DΩ QTΩ and R = QR DR QTR ✄ SVD factorization ✄ SVD factorization 2 Π0 = QΠ0 DΠ0 QTΠ0 1/2 1/2 3 Set QP1|0 = QΠ0 , DP1|0 = DΠ0 and x̂1|0 = x̄0 . 7 8 9 10 11 12 13 14 15 16 It can be solved with respect to entries of L̄2 as follows: (l̄2 )ij = ūji sj + l̄ij si , i = 2, . . . , s, j = 1, . . . , i − 1. s2i − s2j The formula above is exactly equation (21). Having computed the entries (l̄2 )ij we can form the matrix Λ = L̄T2 − L̄2 in (26) and, then, compute the derivative V′θ = VΛ. This completes the proof of (20) and Lemma 1. Remark 1: The assumption of singular values of A(θ) being distinct for all values of parameter θ is necessary for avoiding the division by zero in formula (21). In future, if possible, we will intend for relaxing this restriction, which reduces the practical applicability of the proposed method. For readers’ convenience, Algorithm 1 provides a pseudocode for the computational scheme derived in Lemma 1. A LGORITHM 1. D IFFERENTIATED SVD(A, A′θ ) Input: A, A′θ ✄ Pre-array and its derivative 1 Apply SVD from (18) to the pre-array A. Save W, S, V. 2 Compute the matrix product WT A′θV.  3 Extract the main s × s block M = WT A′θ V s×s . 4 M = L̄ + D + Ū . ✄ Split into strictly lower triangular, diagonal ✄ and strictly upper triangular parts 5 Given L̄, Ū and S, compute the lower triangular L̄2 by (21).   6 Find V′θ = V L̄T2 − L̄2 . T 7 Find Sθ′ = D. Hence, Σ′θ = [Sθ′ | 0] . ′ ′ Output: Σ, V and Σθ , Vθ ✄ Post-arrays and their derivative The theoretical result presented in Lemma 1 can be further applied to the SVD factorization-based KF discussed in Section III. The obtained computational scheme is summarized in Algorithm 2 and shown in the form of a pseudocode. The new “differentiated” SVDbased KF extends the underlying SVD-based filter on the derivative computation (with respect to unknown system parameters) for updating the corresponding filter sensitivities equations. The method can be used for replacing the conventional “differentiated KF” approach discussed in Section II by inherently more stable approach, which is preferable for practical implementation. Finally, we would like to remark that any “differentiated” filtering technique consists of two parts: i) the underlying KF variant, and ii) its “differentiated” extension used for the filter sensitivities computation. 1/2 1/2 Set ∂i QP1|0 = ∂i QΠ0 , ∂i DP1|0 = ∂i DΠ0 , ∂i x̂1|0 = 0. Measurement Update: (k = 1, . . . , N ). 5 Build pre-array A in (12) and its derivatives ∂i A, i = 1, p. 6 [Σ, n V, ∂i Σ, ∂i V]o← Differentiated SVD(A, ∂i A). 4 17 18 19 20 21 22 23 1/2 1/2 DRe,k , ∂i DRe,k ← read-off from Σ, ∂i Σ (i = 1, p). QRe,k , ∂i QRe,k ← read-off from V, ∂i V (i = 1, p). −1 Find K̄k from (13) and Kk = K̄k DR QTRe,k . e,k   ∂i K̄k = ∂i QPk|k−1 DPk|k−1 QTPk|k−1 H T QRe,k , i = 1, p.  Build pre-array A in (14) and its derivatives ∂i A, i = 1, p. [Σ, n V, ∂i Σ, ∂i V]o← Differentiated SVD(A, ∂i A). 1/2 1/2 D , ∂i DPk|k ← read-off from Σ, ∂i Σ (i = 1, p). n Pk|k o QPk|k , ∂i QPk|k ← read-off from V, ∂i V (i = 1, p). Find a posteriori estimate x̂k|k and ēk from (15).    T ∂i ēk = ∂i QRe,k zk − H x̂k|k−1   − QTRe,k (∂i H) x̂k|k−1 + H ∂i x̂k|k−1 , i = 1, p.  −1 −1 ∂i x̂k|k = ∂i x̂k|k−1 + ∂i K̄k DRe,k ēk + K̄k DR (∂i ēk ) e,k  −1 −1 − K̄k DRe,k ∂i DRe,k DRe,k ēk , i = 1, p. Time Update: (k = 1, . . . , N ). Build pre-array A in (16) and its derivatives ∂i A, i = 1, p. [Σ, Differentiated SVD(A, ∂i A). n V, ∂i Σ, ∂i V] ← o 1/2 1/2 D , ∂i DPk+1|k ← read-off from Σ, ∂i Σ (i = 1, p). n Pk+1|k o QPk+1|k , ∂i QPk+1|k ← read-off from V, ∂i V (i = 1, p). Find a priori estimate x̂k+1|k from equation (17).  ∂i x̂k+1|k = (∂i F ) x̂k|k + F ∂i x̂k|k + (∂i B) uk , i = 1, p. End. At the same manner, one can naturally augment any existing SVDbased KF variant (see, for instance, the algorithms in [23], [24]) or potentially new SVD-based KF implementation on the corresponding filter sensitivities computation. Finally, taking into account the properties of orthogonal matrices, it is not difficult to show that the negative log likelihood function (LF) given as [33]: N   o 1 Xn −1 L θ, Z1N = c0 + ln (det Re,k ) + eTk Re,k ek 2 k=1 can be rewritten in terms of the SVD filter variables QRe,k , DRe,k and ēk appeared in equations (12) – (17) as follows: N o    1 Xn −1 ēk ln det DRe,k + ēTk DR (29) L θ, Z1N = c0 + e,k 2 k=1 where Z1N = {z1 , . . . , zN } is N -step measurement history and c0 is ln(2π). a constant value where c0 = Nm 2 Taking into account that the matrix DRe,k is diagonal and using the Jacobi’s formula, d A−1 = −A−1 (dA) A−1 , from (29) we obtain the expression for the log LF gradient evaluation in terms of the SVD filter variables and their derivatives computed in the newly-developed Algorithm 2 (for each i = 1, . . . , p): N      −1 i 1 Xn h −1 ∂i L θ, Z1N = tr ∂i DRe,k DR +2 ∂i ēTk DR ēk e,k e,k 2 k=1 o  −1 −1 ē . −ēTk DR ∂i DRe,k DR (30) e,k k e,k PREPRINT 5 V. N UMERICAL EXPERIMENTS By using simple test problem, we would like to demonstrate thoroughly each step of the method summarized in Algorithm 1. Example 1: Given pre-array A(θ) and its derivative A′θ   −2θ sin(θ) 2  2θ θ    2 sin (θ) 1/3 θ3  A(θ) =  ,   θ 2θ2 − 1  cos2 (θ) θ3 + θ2 compute the corresponding SVD post-arrays Σ, V and their derivative Σ′θ , V′θ at the point θ̂ = 0.5. Table 1 illustrates each step of the computational scheme in Algorithm 1. To assess the accuracy of computations, we compute ′ ′ l∞ = (AT A)θ̂=0.5 − (VΣ2 VT )θ̂=0.5 . This quantity should be ∞ small. Indeed, taking into account the properties of diagonal and orthogonal matrices, from (18) we have AT A = VΣT WT WΣVT = VΣ2 VT . Hence, the derivatives of both sides of the last formula should coincide as well. In our numerical experiment we obtain l∞ = 1.99 · 10−15 . This justifies the correctness of computations via Algorithm 1 and confirms the theoretical derivations in Lemma 1. TABLE I A LGORITHM 1 ILLUSTRATIVE CALCULATIONS FOR E XAMPLE 1 Input Pre-array derivative: Line 1.  −0.6070 W= Σ=  0.8776 1.0000 0.2500  2.0000 1.7500  " 1.7061 0#  0.9967 0.0811  0 0.8185 0 0 , V = −0.0811 0.9967 0 0 0  0  2.2959 −1.6522 1.1584 0.5691 M =  0.5177 −0.1427 . −0.2470 −2.2944 −1.8181 −0.8517 Compute Line 3. Extract [M ]2×2 = Line 4. Split [M ]2×2 = Line 5. Compute L̄2 = Line 6. V′θ Output " −1.0000 0.4848 0.1556 0.2057 0.5745 0.5723 0.4035 0.0539 −0.5533 0.4478 0.1323 0.0735 0.9579 0.1059 −0.2197  0.3159 −0.5593 0.0946 0.4337 0.6247 0.4321 0.5329 −0.2152 0.6724 −0.1756 Line 2. Line 7. 0.4794 # 1.0000 0.2500 0.2298 0.0417 0.5000 −0.5000 0.7702  0.3750 −2.0000 2.0000 A′θ θ̂=0.5 =  0.8415 1.0000 −0.8415 Pre-array: A|θ̂=0.5 = θ̂=0.5 Σ′θ θ̂=0.5 = = Post-arrays: Post-arrays’    2.2959 1.1584 0 0 1.1584 0 0 0 0.8348 0 −1.6522 0.5691    2.2959 0   0 −1.6522  + 0 0.5691 + 0 0   0.0677 −0.8321  0.8321 " 2.2959 0 0 0 0 0.0677 0 0.5691 0 0 0 # " 1.7061 # 0 0 0.8185 0 0 Σ|θ̂=0.5 = 0 0 0 h 0 i 0.9967 −0.0811 V|θ̂=0.5 = −0.0811 −0.9967 derivative: Σ′θ θ̂=0.5 and V′θ θ̂=0.5 (Lines 6,7) Next, we wish to demonstrate how the novel method for the filter sensitivities evaluation (Algorithm 2) works in practice. For that, we consider the parameter estimation problem where the gradientbased optimization method is applied for finding the optimal value of unknown system parameters. We test the conventional “differentiated” KF (Eqs (3) – (11) in Section II) and the previously derived SR- and UD-based “differentiated” KF variants from [26] and [27], respectively, against the new “differentiated” SVD-based KF (Algorithm 2). As discussed in Section IV, all “differentiated” methods consist of two parts and, hence, they compute the Log LF and its gradient simultaneously. These values are utilized by a gradient-based optimization method for maximizing the log LF with respect to system parameters. Our library of codes is implemented in MATLAB where we use the built-in optimization method fminunc. Example 2: Consider a linearized version of the in-track motion dynamic when a satellite travels in a circular orbit [34]:     0 0 0 0 1 1 0.5 0.5   0 1 1 1   xk−1 + wk−1 , Ω = 0 0 0 0  xk =    0 0 0 0 0 0 1 0 0 0 0 q1 0 0 0 0.606    2 2  θ δ 0 1 1 1 1 xk + vk , R= zk = 0 θ2 δ 2 1 1 1 1+δ where q1 = 0.63 · 10−2 , x0 ∼ N (0, θ2 I4 ) and θ is the unknown system parameter that needs to be estimated. In contrast to [34], we wish to test both well-conditioned and ill-conditioned situations. For that, following [17], we simulate the roundoff by parameter δ. It is assumed to be δ 2 < ǫroundof f , but δ > ǫroundof f where ǫroundof f denotes the unit roundoff error1 . When δ → ǫroundof f , i.e. the machine precision limit, the problem above becomes ill-conditioned. By varying the ill-conditioning parameter δ, we are able to explore some numerical insights of each method assessed. The numerical experiment is organized as follows. For each fixed value of ill-conditioning parameter δ, the SSM in Example 2 is simulated for θ∗ = 5 to generate N = 100 measurements. Next, the unknown system parameter θ is estimated from the available experimental data, Z1N = {z1 , . . . , zN }, by using gradient-based adaptive KF techniques examined, i.e. by four “differentiated” KF methods mentioned earlier in this Section. For a fair comparison, each “differentiated” algorithm utilizes the same data Z1N and the same initial value for the optimization method, θ̂(0) = 1. Next, the obtained optimal estimate θ̂∗ is compared with the “true” value of θ∗ = 5 for assessing the estimation quality of each method. We repeat the experiment M = 100 times and calculate a posterior mean of the estimate, the root mean squared error (RMSE) and the mean absolute percentage error (MAPE) over 100 Monte Carlo runs. Having carefully analyzed the obtained numerical results summarized in Table 2, we make a few important conclusions. First, all “differentiated” KF variants work equally well when δ is about 10−1 and 10−2 , i.e. when the problem is not ill-conditioned. This confirms that all “differentiated” techniques are algebraically equivalent. Second, among all methods examined, the conventional approach (“differentiated” KF) shows the worst performance. It degrades faster than any other algorithms when δ → ǫroundof f . Furthermore, the line in Table 2 means that MATLAB can not even run the algorithm. Third, we analyze the outcomes obtained by other methods tested and observe that the UD- and SVD-based “differentiated” techniques produce a better estimation quality than the SR-based counterpart. This conclusion is reasonable if we recall that in this paper we do not explore the filtering algorithms, but their differential form for the KF sensitivities computation. Any existing “differentiated” SR1/2 based scheme requires the triangular matrix inversion Re,k that is a square-root factor of the innovation covariance Re,k ; see Eq (6) in [26]. In contrast, the UD- and SVD-based “differentiated” methods involve the inversion of only diagonal matrix DRe,k ; see (30) and Eq (8) in [27]. Finally, we observe that the new SVD-based approach slightly outperforms the UD-based counterpart when δ → ǫroundof f . 1 Computer roundoff for floating-point arithmetic is characterized by a single parameter ǫroundof f , defined in different sources as the largest number such that either 1+ǫroundof f = 1 or 1+ǫroundof f /2 = 1 in machine precision. PREPRINT 6 TABLE II E FFECT OF ROUNDOFF ERRORS IN ILL - CONDITIONED TEST PROBLEMS IN E XAMPLE 2; EXACT θ ∗ = 5, 100 M ONTE C ARLO RUNS δ 10−1 10−2 10−3 10−4 10−5 10−6 10−7 10−8 10−9 10−10 “differentiated” KF Mean RMSE MAPE% 5.0046 4.9649 5.2764 8.8812 0.2803 -0.1315 − − − − 0.2485 0.2784 0.7027 4.1440 8.0217 7.2403 − − − − 3.8829 4.2892 9.7757 77.623 >100% >100% − − − − “differentiated” SR-based KF Mean RMSE MAPE% “differentiated” UD-based KF Mean RMSE MAPE% “differentiated” SVD-based KF Mean RMSE MAPE% 5.0046 4.9649 5.0083 4.9879 4.9509 4.9310 4.9298 − − − 5.0046 4.9649 5.0083 4.9879 4.9508 4.9323 4.9268 5.0437 6.0119 6.7496 5.0046 4.9649 5.0083 4.9879 4.9509 5.0288 4.9249 5.0493 5.9738 6.7021 0.2485 0.2784 0.3555 0.3715 0.3352 1.0362 0.3658 − − − 3.8829 4.2883 5.7217 5.8595 5.6154 6.8368 5.8586 − − − In summary, the previously derived UD- and the new SVDbased techniques provide the best estimation quality when solving parameter estimation problem by the gradient-based adaptive filtering methodology. This creates a strong background for their practical use. In our ill-conditioned test example, the new SVD-based approach even slightly outperforms the UD-based counterpart. R EFERENCES [1] R. K. Mehra, “Approaches to adaptive filtering,” IEEE Trans. Automat. Contr., vol. 17, no. 5, pp. 693–698, Oct. 1972. [2] G. Bastin and M. R. Gevers, “Stable adaptive observers for nonlinear time-varying systems,” IEEE Trans. Automat. Contr., vol. 33, no. 7, pp. 650–658, Jul. 1988. [3] R. K. Mehra, “Optimal input signals for parameter estimation in dynamic systems – survey and new results,” IEEE Trans. Automat. Contr., vol. AC-19, no. 6, pp. 753–768, Dec. 1974. [4] N. K. Gupta and R. K. Mehra, “Computational aspects of maximum likelihood estimation and reduction in sensitivity function calculations,” IEEE Trans. Automat. Contr., vol. AC-19, no. 6, pp. 774–783, Dec. 1974. [5] P. A. Zadrozny and S. Mittnik, “Kalman-filtering methods for computing information matrices for time-invariant, periodic, and generally timevarying VARMA models and samples,” Computers & Mathematics with Applications, vol. 28, no. 4, pp. 107–119, 1994. [6] A. Klein and G. Mélard, “Computation of the Fisher information matrix for time series models,” Journal of computational and applied mathematics, vol. 64, no. 1, pp. 57–68, 1995. [7] A. Klein, G. Mélard, and T. Zahaf, “Construction of the exact Fisher information matrix of Gaussian time series models by means of matrix differential rules,” Linear Algebra and its Applications, vol. 321, no. 1, pp. 209–232, 2000. [8] P. A. Zadrozny, “Analytic derivatives for estimation of linear dynamic models,” Computers & Mathematics with Applications, vol. 18, no. 6, pp. 539–553, 1989. [9] A. Klein and H. Neudecker, “A direct derivation of the exact Fisher information matrix of Gaussian vector state space models,” Linear Algebra and its Applications, vol. 321, no. 1, pp. 233–238, 2000. [10] M. Verhaegen and P. Van Dooren, “Numerical aspects of different kalman filter implementations,” IEEE Trans. Automat. Contr., vol. AC31, no. 10, pp. 907–917, Oct. 1986. [11] M. Verhaegen, “Round-off error propagation in four generallyapplicable, recursive, least-squares estimation schemes,” Automatica, vol. 25, no. 3, pp. 437–444, 1989. [12] P. G. Kaminski, A. E. Bryson, and S. F. Schmidt, “Discrete square-root filtering: a survey of current techniques,” IEEE Trans. Automat. Contr., vol. AC-16, no. 6, pp. 727–735, Dec. 1971. [13] G. J. Bierman, Factorization Methods For Discrete Sequential Estimation. New York: Academic Press, 1977. [14] A. H. Sayed and T. Kailath, “Extended Chandrasekhar recursion,” IEEE Trans. Automat. Contr., vol. AC-39, no. 3, pp. 619–622, Mar. 1994. [15] P. Park and T. Kailath, “New square-root algorithms for Kalman filtering,” IEEE Trans. Automat. Contr., vol. 40, no. 5, pp. 895–899, May 1995. [16] T. Kailath, A. H. Sayed, and B. Hassibi, Linear Estimation. New Jersey: Prentice Hall, 2000. 0.2485 0.2784 0.3555 0.3715 0.3353 1.0333 0.3562 0.3757 1.2179 2.6030 3.8829 4.2883 5.7217 5.8596 5.6162 6.8265 5.6883 6.0712 20.762 49.405 0.2485 0.2784 0.3555 0.3715 0.3352 0.3138 0.3507 0.3790 1.1853 2.5286 3.8829 4.2883 5.7217 5.8597 5.6150 4.8826 5.5674 6.0946 20.106 49.252 [17] M. Grewal and A. Andrews, Kalman filtering: theory and practice. New Jersey: Prentice Hall, 2001. [18] G. H. Golub and C. F. Van Loan, Matrix computations. Baltimore, Maryland: Johns Hopkins University Press, 1983. [19] N. J. Higham, “Analysis of the Cholesky decomposition of a semidefinite matrix,” University of Manchester, Tech. Rep. MIMS EPrint: 2008.56, 1990. [20] X. Zhang, W. Hu, Z. Zhao, Y. Wang, and Q. Wei, “SVD based Kalman particle filter for robust visual tracking,” in Proceedings of the 19th International Conference on Pattern Recognition. Tampa, FL, USA: IEEE, 2008, pp. 1–4. [21] O. Straka, J. Dunik, M. Simandl, and J. Havlik, “Aspects and comparison of matrix decompositions in unscented Kalman filter,” in Proceedings of the IEEE American Control Conference (ACC), 2013, pp. 3075–3080. [22] Q. Zhang, X. Meng, S. Zhang, and Y. Wang, “Singular Value Decomposition-based Robust Cubature Kalman Filtering for an Integrated GPS/SINS Navigation System,” Journal of Navigation, vol. 68, no. 3, pp. 549–562, 2014. [23] L. Wang, G. Libert, and P. Manneback, “Kalman Filter Algorithm based on Singular Value Decomposition,” in Proceedings of the 31st Conference on Decision and Control. Tuczon, AZ, USA: IEEE, 1992, pp. 1224–1229. [24] M. V. Kulikova and J. V. Tsyganova, “Improved discrete-time Kalman filtering within singular value decomposition,” IET Control Theory & Applications, 2016, (in progress). [Online]. Available: https://arxiv.org/abs/1611.03686 [25] G. J. Bierman, M. R. Belzer, J. S. Vandergraft, and D. W. Porter, “Maximum likelihood estimation using square root information filters,” IEEE Trans. Automat. Contr., vol. 35, no. 12, pp. 1293–1298, Dec. 1990. [26] M. V. Kulikova, “Likelihood gradient evaluation using square-root covariance filters,” IEEE Trans. Automat. Contr., vol. 54, no. 3, pp. 646– 651, Mar. 2009. [27] J. V. Tsyganova and M. V. Kulikova, “State sensitivity evaluation within UD based array covariance filter,” IEEE Trans. Automat. Contr., vol. 58, no. 11, pp. 2944–2950, Nov. 2013. [28] M. V. Kulikova and A. Pacheco, “Kalman filter sensitivity evaluation with orthogonal and J-orthogonal transformations,” IEEE Trans. Automat. Contr., vol. 58, no. 7, pp. 1798–1804, Jul. 2013. [29] M. V. Kulikova and J. V. Tsyganova, “Constructing numerically stable Kalman filter-based algorithms for gradient-based adaptive filtering,” International Journal of Adaptive Control and Signal Processing, vol. 29, no. 11, pp. 1411–1426, 2015. [30] ——, “A unified square-root approach for the score and Fisher information matrix computation in linear dynamic systems,” Mathematics and Computers in Simulation, vol. 119, pp. 128–141, 2016. [31] H. Neudecker, “Some theorems on matrix differentiation with special reference to Kronecker matrix products,” Journal of the American Statistical Association, vol. 64, no. 327, pp. 953–963, 1969. [32] E. E. Tyrtyshnikov, A brief introduction to numerical analysis. Springer Science & Business Media: Springer, 2012. [33] F. C. Schweppe, “Evaluation of likelihood functions for Gaussian signals,” IEEE Trans. Inf. Theory, vol. IT-11, pp. 61–70, Jan. 1965. [34] H. E. Rauch, C. T. Striebel, and F. Tung, “Maximum likelihood estimates of linear dynamic systems,” AIAA journal, vol. 3, no. 8, pp. 1445–1450, 1965.
3cs.SY
DEVELOPMENT OF A CARGO SCREENING PROCESS SIMULATOR: A FIRST APPROACH Peer-Olaf Siebers (a), Galina Sherman (b), Uwe Aickelin (c) (a) Computer Science, Nottingham University, Nottingham, NG8 1BB, UK CASS Business School, City University London, London, EC1Y 8TZ, UK (c) Computer Science, Nottingham University, Nottingham, NG8 1BB, UK (b) (a) [email protected], (b)[email protected], (c)[email protected] ABSTRACT The efficiency of current cargo screening processes at sea and air ports is largely unknown as few benchmarks exists against which they could be measured. Some manufacturers provide benchmarks for individual sensors but we found no benchmarks that take a holistic view of the overall screening procedures and no benchmarks that take operator variability into account. Just adding up resources and manpower used is not an effective way for assessing systems where human decision-making and operator compliance to rules play a vital role. Our aim is to develop a decision support tool (cargo-screening system simulator) that will map the right technology and manpower to the right commodity-threat combination in order to maximise detection rates. In this paper we present our ideas for developing such a system and highlight the research challenges we have identified. Then we introduce our first case study and report on the progress we have made so far. Keywords: port security, cargo screening, modelling and simulation, decision support, detection rate matrix 1. INTRODUCTION The primary goal of cargo screening at sea ports and air ports is to detect human stowaways, conventional, nuclear, chemical and radiological weapons and other potential threats. This is an extremely difficult task due to the sheer volume of cargo being moved through ports between countries. For example in sea freight, 200 million containers are moved through 220 ports around the globe every year; this is 90% of all non bulk sea cargo (Dorndorf, Herbers, Panascia, and Zimmermann 2007). Little is known about the efficiency of current cargo screening processes as few benchmarks exist against which they could be measured (e.g. %detected vs. %missed). Some manufacturer benchmarks are available for individual sensors, but these have been measured under laboratory conditions. It is rare to find unbiased benchmarks that come from independent field tests under real world conditions. Furthermore, we have not found any benchmarks that take a holistic view of the entire screening process assessing a combination of sensors and also taking operator skills, judgment and variability into account. In our research we attempt to identify and test innovative methods in order to advance the use of simulation for supporting decision making at the strategic and the operational level of the cargo screening process. Wilson (2005) confirms the usefulness of simulation for the analysis and prediction of operational effectiveness, efficiency, and detection rates of existing or proposed security systems. Our research aim is to develop a methodology for building such Decision Support Systems (DSS) that will map the right technology and manpower to the right commodity-threat combination in order to maximise detection rates. The concept for such a DSS (a cargo screening process simulator) is shown in Figure 1. For developing the methodology we are using a case study approach. In our work we focus solely on DSSs development; we do not work on new sensor development. However, with our DSSs we might be able to give some recommendations of what characteristics new to be developed sensors might require to reach certain system performances. The core of the proposed cargo screening process simulator will consist of three elements: a Detection Rate Matrix (DRM), a simulation model and a resource optimiser. The DRM will provide sensor detection rates as an input for the sensors represented in the simulation model, based on sensor types, commodities, threats, and other indicators. The simulation model will allow carrying out what-if analyses for the system under examination. The results of the simulation will be fed into the resource optimiser to create a new set of input parameter values for the simulation. The previous two steps are repeated until an acceptable solution has been found. The output of the simulator will consist of required technology and manpower and an estimation of the system detection rate that can be achieved by implementing the proposed system set-up. A sensor data database will provide some information for the core elements (in particular for the DRM). The content of the database will be a mixture of data provided by vendors but will also consider operators experience with Sensor data (theoretical) Sensor type Commodity Threat DB with sensor data Detection rate matrix Simulation for what-if analysis Resource optimiser Annual job list (expected cargo + % split of commodities) Guidelines + observations Anecdotal evidence about detection rates Required technology Detection rate Required personnel Existing sensors and staff Figure 1: Conceptual Model of Our Cargo Screening Process Simulator the equipment. Other input data required for the cargo screening process simulator include an annual job list, guideline on how to carry out jobs, and observations if jobs are carried out in accordance with these guidelines, and a list of existing sensors and staff. Section 2 contains a brief review of existing work in the field. In Section 3 we discuss the development of a DRM. In Section 4 we state our research questions regarding model design and matrix development. Section 5 introduces our case study, the ferry port in Calais. We present a description of the real system and its operations, a conceptual model of it, an implementation of the conceptual model in form of a discrete event simulation model, and finally we show the results of an initial test run with our simulation model. Section 6 concludes the paper by discussing the results of our current efforts and proposes further work. 2. BACKGROUND Simulation modelling is commonly used to support design and analysis of complex systems. With regards to modelling ports Tahar and Hussain (2000) confirm that simulation modelling is a tool widely used for the management, planning and optimisation of port systems. According to Turner and Williams (2005) the same is true for the management, planning and optimisation of complex supply chain systems. In the context of the cargo screening process, some examples (e.g. Leone and Liu 2005, Wilson 2005) have been found that use simulation modelling to evaluate key design parameters for checked baggage security screening systems in airports, in order to balance equipment cost, passenger and baggage demand, screening capacity, and security effectiveness in an attempt to meet the requirements imposed by the checked baggage screening explosive detection deadline established by the US Aviation and Transportation Security Act. Another related subject is the enhancement of the security throughout the supply chain, i.e. achieving supply chain integrity (Closs and McGarrell 2004). Here, simulation modelling is often used to analyse the system. For example, Sekine, Campos-Náñnez, Harrald, and Abeledo (2006) use simulation and the response surface method for a trade-off analysis of port security in order to construct a set of Pareto optimal solutions. The development of a dynamic security airport simulation is described by Weiss (2008). In contrast to the other papers mentioned so far, this simulation focuses on the human aspects in the system and employs the agent paradigm to represent the behaviour of attackers and defenders. Both, attacker and defender agents are equipped with the capability to make their individual decisions after assessing the current situation and to adapt their general behaviour through learning from previous experiences. This allows accounting for rapid security adaptation to shifting threads, as they might be experienced in the real world. 3. CONCEPTS OF THE DETECTION RATE MATRIX The mapping process (right technology and manpower to the right commodity-threat combination) will be implemented using a multi-dimensional DRM. The DRM contains the information required to estimate the type and amount of sensors and manpower we need in order to maximise our detection rate if we have an estimate of the number and type of cargo containers we want to screen and what they will contain. The values to fill the DRM can either come from vendors, the literature, from trials, or anecdotal evidence of the border agency staff. From all the information received we have to create a single value that represents the detection rate for a certain commodity-threat combination. An example for a partially filled DRM derived from laboratory experiments can be found in Klock (2005). Klock states that developing a DRM from real world data would be desirable but poses a big challenge as for various reasons it is a problem to collect all relevant data for the all commodity-threat combinations in the real system. In our case the problems are as follows. In most cases the security screening procedures cannot be compromised for research purposes, i.e. there are legal boundaries regarding the sampling frame. Furthermore, it would be difficult to capture the variability of operational procedures that exist in the real system. However, as much as the technology itself, the way in which the technology is used contributes to the success rate of detecting threats. Our current plan is to fill some of the gaps in our DRM by simulating specific scenarios, rather than trying to collect all data from the real system. We will start the development of our DRM by creating a two dimensional matrix and then gradually increase its complexity (i.e. the number of dimensions). The values for our first DRM will be derived by collecting anecdotal evidence from system insiders and where anecdotal evidence is not available by simulating specific scenarios of interest (1). The next step will be to generalise the initial DRM and to consider that the applicability and performance of sensors is related to the commodity screened and the category of threats investigated (2). For example, if one wants to detect stowaways in a lorry using CO2 probes which measure the level of carbon dioxide and the load consist of wood or wooden furniture which naturally exhumes carbon dioxide then the detector readings will be wrong. For this commodity the sensor is not useful and would produce many false positives (type 1 error), which means that in return many false negatives (type 2 error) will stay undetected as time is wasted with manually inspecting the wrong lorries. The next dimension we will add is a definition of the cargo containment which consists of a description of the type of containment, its wall thickness and its wall density (3). The containment type is important as some of the sensors might need to have access to the interior of the containment while others might be applicable to be used from the outside. Wall thickness and density are important as many sensors have limitations regarding the penetration of the containments, depending on the containment properties. rate of detection = f (commodity & thread combination, specific scenario) (1) rate of detection = f (commodity, threat, sensor) (2) rate of detection = f (cargo containment, commodity, threat, sensor) (3) There are many more dimensions one could add (e.g. cargo origin, cargo destination, shipping company, or environmental conditions of test facility location) and part of the research will have to deal with the question of which are the most relevant indicators of sensor efficiency? 4. RESEARCH QUESTION One of the key questions we are keen on answering during our research is how and where it makes sense to use simulation in a project like ours. Besides the standard application areas for simulation modelling in operations research (e.g. system analysis, optimisation, as a communication tool) we want to find and test some new application areas (e.g. validating the DRM parts where we have data and helping to estimate the values where we have gaps in our DRM). Furthermore, we will examine if our simulation models can be used to support the decision making process in other fields, e.g. supply chain management or risk analysis. Before we can build our cargo screening process simulator we will have to investigate several questions which can be broadly grouped in two categories, related to model design or matrix development. Research questions regarding model design: [a] How much detail do we have to model to get some meaningful output? [b] How should we model people in our system (e.g. officers or stowaways) - as simple resources or as autonomous entities? [c] How can we get a good estimate on how many stowaways, weapons or drugs are passing the borders? [d] What effect does the fact that we are dealing with rare events have on input sampling and output analysis? Research questions regarding matrix development: [e] Which are the most relevant indicators of sensor efficiency? [f] What is the best way to develop and validate a detection rate matrix in absence of real data or when real data is incomplete, i.e. missing data for certain technology / commodity / threat combinations? [g] Can we develop a framework to support the development of a DRM for different environments and for different threats? 5. CASE STUDY: CALAIS FERRY PORT In order to achieve our research aim of developing a methodology for building cargo screening process simulator we have chosen to use a case study approach. This allows us to gain the knowledge, insight, and experience we need for developing our methodology. For each case study we will first develop simulation models that allow us to analyse the system under study and then create a DRM for this system. For our first case study we have selected the ferry port in Calais (France) that links Calais with Dover (UK). This site is ideal for beginning as the security measures in place focus on detecting only one threat, illegal immigrants, or clandestines, as they are called by the UK Border Force. Clandestines are people found on a lorry with the aim to get into Britain without a passport or any other papers (Sky1 2009). These can be individuals or groups. Clandestines come in hope of a better future in Britain, drawn by the English language, the lack of national identity cards and the possibility of illegal work. When clandestines do not succeed little or no publicity is generated, thereby perpetuating the false idea that clandestines are always successful. On the other hand, for every successful clandestine arriving in Britain the word goes out that the process is successful, which generates even more attempts of illegal immigration (Brown 1995). 5.1. The Real System Between April 2007 and April 2008 more than 900,000 lorries passed the check points in Calais. Of these, approx. 0.3% contained additional human freight (UK Border Agency 2009). How many clandestines were missed during these checks is unknown. Although companies supplying the sensor technology promise a detection rate close to 100%, independent test have shown that this is not the case when using the equipment in real world scenarios (Klock 2005). In addition, in the real system the detection rates also depend on factors like the time of day (at busy times the operators have less time to apply the sensors and wait for the readings and therefore readings are more likely to produce more type I and type II errors), operators’ skills (of interpreting the outputs from the sensors), and operators’ fatigue. In Calais the cargo screening process is separated into two major zones, the first under the control of the Calais Chamber of Commerce (CCI), the second under the control of the UK Border Agency (see Figure 2). Different types of sensors are used at the various screening facilities and some of them are also in use as mobile devices. The technology / operations used for screening includes Passive MilliMetre Wave scanners (PMMW), Heart Beat Detectors (HBD), CO2 measurement probes (CO2), canine sniffers and visual inspection. The process on the French site starts with a passport check by the French authorities. Then all lorries are screened for clandestines and suspicious lorries are routed to deep search facilities where they are further inspected by using an alternative method and if suspicion is substantiated then lorries are opened for visual inspection. In some cases (e.g. if it does not interrupt the process flow much, e.g. at non-busy times) lorries are opened directly for a quick visual check after or instead of being screened. If clandestines are found on board a lorry they are removed by the French police, registered, and released into freedom. The process on the UK site is very similar; the major difference is that lorries are searched rather then screened and that only a fraction of the lorries going through the system is actually searched (at average 33%). The number of vehicles searched is on the basis of profiling and intelligence. Once the lorries have passed all check points they park at the Berth where mobile squads are operating to check the lorries a last time before they get on their way to Dover. 5.2. Modelling the Real System: A First Approach This initial modelling exercise acts as a data requirement analysis for our case study. It will help us to make informed decisions about the information and data we need to collect during our main data collection French Border Control Offices and Detention Facilities French Passport Check French Screening Facilities Tickets French Deep Search Facilities Controlled by Calais Chamber of Commerce (CCI) for this case study. Furthermore, it will help us to uncover areas where we might encounter problems during our main modelling and implementation process at an early stage, so that we can respond to it in sufficient time. Finally, we want to use our initial models to communicate theories, ideas, potential investigation techniques, outputs and solutions to stake holders and other interested parties. Before we started our modelling exercise we visited the case study site to observe the operations, for discussions with stake holders, and for collecting system performance data. From the information gathered we developed a conceptual model that reflects the current operations of the cargo screening process at the ferry port in Calais. 5.2.1. Modelling Challenges The case study system presents several modelling challenges, some of which have already been mentioned in Section 4. Below is a list of the modelling challenges we are currently facing. The first challenge is related to the fact that we are dealing here with a complex system where factors that are difficult to quantify are assumed to have a big impact on system behaviour and ultimately system performance. An example for such a factor is the human decision making process. Therefore, the application of abstraction and simplification for the purpose of model design is a very delicate issue. The second challenge is related to the lack of input data. On the one hand we are dealing with rare events (e.g. detecting a clandestine) which impacts on the way we have to do our input sampling and output analysis (Heidelberger 1995) and some data cannot be obtained from the real system (e.g. number of clandestines that manage to cross the borders) so we have to make a lot of guesses. Some mathematical models exist for estimate such values as for example success rates for clandestine border crossing (Wein, Liu, and Motskin 2009; Epenshade 1995); their usefulness however is debatable as still many assumptions have to be made to derive these estimates. Even if we had the resources to collect the data there are some legal issues regarding the sampling frame which prohibits us to collect some of the required data as we are not allowed to sample an entire population. The third challenge relates to the objects we have to model, some of which are fixed and some of which UK Border Control Offices and Detention Facilities UK Passport Check UK Screening Facilities Berth Parking Space UK Deep Search Facilities Controlled by UK Border Agency Figure 2: The cargo screening process at Calais can be moving around freely. Three different situations can be identified: [1] Sensors are fixed and targets (lorries and clandestines) are fixed, for example in a screening shed lorries are parking while sensors are applied. [2] Sensors are moving and targets (clandestines) are moving, for example in the allocation lanes officers are patrolling and clandestines are running around in order to get into the lorries. [3] Sensors are moving and targets (lorries and clandestines) are fixed, for example in the Berth squads are checking the parking lorries either with mobile sensors or by opening suspicious lorries directly. While the first situation is relatively easy to model using traditional Discrete Event Modelling (DEM) the latter two require some further reflection before they can be modelled successfully. In those cases sensors and/or targets need to possess some form of autonomy and probably proactiveness which are concepts not directly supported by traditional DEM. Agent-Based Modelling (ABM) presents an alternative modelling paradigm that supports the consideration of autonomy and proactiveness of entities. The fourth challenge relates to the injection of clandestines into the model. Anecdotal evidence suggests that clandestines enter the system at numerous places. Clandestines either get into the lorries before these enter the compound or they climb over the fences that surround the compound and get into the lorries while they pass through the compound or wait for the ferry. While the first is easy to model the latter causes some problems as no data is available exactly where and when the clandestines enter the compound. Finally, the fifth challenge relates to the human decision making. The operation of this system is human centric and relies very much on the experience of the officers and the compliance to rules. Human decision making involves the routing (i.e. choosing the lorries to be screened), choosing the sensor to be used, interpreting the sensor outputs (i.e. choosing the lorries to be opened), and compliance to rules (sticking to recommended sensor application periods). All these points depend very much on the state of the system. At peak times decisions will be different compared to quiet times, e.g. sensor application periods will be shorter to avoid congestion in front of the service sheds and therefore the number of true and false negatives will be much higher and therefore the detection rates vary throughout the day. In the end the big question is if modelling all these details is really necessary for getting useful results. In order to answer this question we will have to implement them at least partially and conduct a sensitivity analysis. For this purpose we will build some smaller simulation models that only represent a small section of the overall real system. Once we have the results we can give some recommendations regarding the level of detail that is required for getting a useful representation of the real system. 5.2.2. The Conceptual Model In order to capture the cargo screening process taking place at the Calais ferry port we have developed a process centric conceptual model (Figure 3). It reflects the process flow as it appears in the real system. Dark blue fields represent system entry and exit points. Brown fields represent jump starting points (where the text is followed by @) and targets (where the text is lead by @). These jumps do not consume any time. Light blue fields represent the locations where time is consumed. The %s represent flow probabilities while the numbers below the light blue fields represent detection rates. For confidentiality reasons the true values have been replaced by place holders. The splits in the model have been defined in a somewhat arbitrary way but often a single row represents all activities that happen at one specific location. 5.3. Implementation Based on our conceptual model presented in Section 5.2.2 we have developed a first version of a Discrete Event Simulation (DES) model which is implemented in AnyLogic Version 6.4, a java-based multi-paradigm simulation software. The purpose of this exercise is to identify where we have gaps in knowledge about the system and to identify missing data that could be obtained during our main data collection. 5.3.1. Simulation Software The object-oriented model design paradigm supported by AnyLogic provides for modular, hierarchical, and incremental construction of large models (XJ Technologies 2009). Each model contains a set of active objects which often represent objects found in the real world. At the lowest level these active objects can contain parameters, variables, functions, events, state charts and other active objects. For DES modelling there is also a library containing higher-level objects that support the creation of discrete event patterns frequently used in process-centric modelling (e.g. entity generation, buffering, resource usage, entity routing, entity destruction). One of the benefits of AnyLogic is that you can build mixed models, i.e. you can mix process-centric DEM and individual based ABM in one hybrid simulation model. Technically the main difference is that an agent compared to an active object has some additional features with respect to dynamic creation and destruction, synchronisation, space-, mobility-, and spatial animation, agent connections and agent communication. We will use these features when we model for example sensor and target movement in the allocation lanes. For our current simulation model we use the elements from the library but we have also developed our own element in form of embedded active objects that contain a collection of parameters, variables and library elements. These are reusable components that can currently represent any of the service sheds as well as passport and ticket booth on the Calais compound. Arrive at Calais 100% x.x% 0.x S 100% Screening_F@ x.x% PassportCheck_F BorderAgency_F DeepSearch_F@ x.x% PMMWCheck_F x.x% 0.x Tickets@ @Screening_F H 100% x.x% HBCheck_F x.x% x.x% 0.x 100% @Ticket 100% TicketFerry 100% RemovePeople_S 100% BorderAgency_F Tickets@ Tickets@ Routing@ x.x% PassportCheck_UK x.x% 0.x @Routing Tickets@ BorderAgency_F x.x% 0.x x.x% 0.x x.x% OpenCheck_S x.x% CO2Check_F BorderAgency_F Tickets@ @DeepSearch_F x.x% 100% Tickets@ RemovePeople_S x.x% OpenCheck_S RemovePeople_H x.x% 0.x x.x% 0.x x.x% OpenCheck_H BorderAgency_UK Berth@ x.x% x.x% Screening_UK@ x.x% CO2Check_UK 100% DeepSearch_UK@ x.x% 0.x Berth@ S x.x% @Screening_UK x.x% HBCheck_UK x.x% OpenCheck_H 0.x x.x% 0.x RemovePeople_H 100% BorderAgency_UK x.x% Berth@ Berth@ H x.x% x.x% OpenCheck_H RemovePeople_H Berth@ x.x% 100% OpenCheck_S RemovePeople_S random checks 100% CO2Check_F WaitFerryArrival H random checks BorderAgency_UK Berth@ 0.x @Berth 100% x.x% 0.x S BorderAgency_UK x.x% 0.x @DeepSearch_UK 100% x.x% x.x% OpenCheck_S 0.x x.x% x.x% RemovePeople_S x.x% 0.x BorderAgency_UK @Berth @Berth a maximum of 175 lorries can leave Calais once per hour OpenCheck_H 100% RemovePeople_H 100% Leave to Dover BorderAgency_UK x.x% @Berth Figure 3: Conceptual model of the cargo screening process at Calais (S=soft sided, H=hard sided, F=French site; UK=UK site; x=replacement for real value) We tried to make them as generic as possible so that we can also use them for modelling other locations or types of systems. A screenshot of the elements of such an embedded active object is presented in Figure 4. It shows a service station with a linked resource pool (symbolised by the clock and the linked box) an entrance buffer and two single space exit buffers. The hold element between entrance queue and service station is released to let one entity pass at a time as soon as the previously serviced entity has left the exit buffer, which only happens if there is some space available in one of the upstream queues. The variables on the left are used for data collection while the parameters on the right allow each instance of this active object class to be defined by an individual set of parameters. Figure 4: Embedded active object serviceShed 5.3.2. Simulation Model Entities of type Lorry (soft and hard sided) are injected into the simulation at a certain rate by the source element (arrival). Some lorries will arrive with an additional load (clandestines) on board. Clandestines are currently modelled as resources (a boolean variable defines if there are clandestines on board a lorry or not). The main elements in the simulation model are the serviceShed elements which have been described in Section 5.3.1. These are used for modelling the situations when we have fixed sensors and fixed targets. The serviceShed elements are linked via some routing elements. The routing elements use a custom-made function which routes the entity to the next level upstream element with the shortest queue. This represents the routing activities normally conducted by an officer. Figure 5 displays a section of the simulation model within the AnyLogic IDE. The project view window on the left shows the project tree of the current project. The graphical editor in the middle shows the content of the Main object. The pallet window on the right displays the different pallets available in AnyLogic, amongst them the Enterprise Library pallet. The properties window at the bottom is used to define the properties of the element, which can contain Java commands and method calls. Figure 5: A section of the simulation model within the AnyLogic IDE For modelling the Berth activities we could not use our serviceShed elements as we have a situation with moving sensors and fixed targets. Instead we developed the solution presented in Figure 6. The moving squads are modelled by events that pick one lorry at random (mobile CO2 checks will be conducted on soft sided lorries while hard sided lorries will be opened) and check it. The time it takes to check a lorry is represented by the inter arrival time between two events. This means that the squads are currently modelled as being 100% utilised as long as there are lorries to check. There are two modus operandi, either lorries can be checked only ones (lorries that have been checked already are registered on an ignore list) or lorries can be checked multiple times (which represents the situation where clandestines enter the lorries while these are parking at the Berth and therefore the squad would check suspicious lorries again). Figure 6: Modelling the Berth activities To set up the model parameters we had to use some best guesses and common sense. However, as we have some average input and output data we have tried to use settings for the unknown parameters to match the output data of the real system when using the input data of the real system. A problem is that the available data are average data for multiple stations or monthly averages. Where ever possible we have used multiple data sources for estimating values for the data required (e.g. for calculating process flow probabilities). 5.3.3. Current Omissions This simulation model presented here represents the first draft of our aspired DES model. The main simplifications and abstractions in the current model are listed below: • • Queues: We use large queue capacities in front of the service stations; therefore congestion does not occur. However, it is an important phenomenon that occurs in the real system and influences service times and therefore indirectly the detection rates. Average values: We use the same average entity arrival rates for the entire simulation runtime but the collected data indicates a significant difference in arrival rates as well as inspection and detection rates depending on time of the day and day of the week (the higher the arrival rates the lower detection rates, as officers have less time for conducting an individual screening). However, first we need • to sort out the congestion problem mentioned above; otherwise the impact of high arrival rates is not adequately considered in the results. Currently we don’t model multiple clandestine entry points, canine sniffers nor the search for clandestines in the allocation lanes. 5.4. Testing the Simulation Model So far we have only conducted some very basic preliminary tests with our simulation model. A verification and validation exercise is still to be carried out. However, here we briefly report on one of the tests we have conducted. We have set up the simulation model using our standard set of parameter values, except for the sensor detection rates, which we have set to the same value for all sensors. During the experiment we have systematically changed this collective value, starting from 0% to 100% in steps of 10%. Our simulated runtime was equivalent to a one year period and we conducted 20 replications for each set of values. As for the results we expect to see a non-linear relationship between sensor detection rates and the average proportions of clandestines detected. This is due to the fact that many lorries will go through several screening procedures and therefore combinatorial effects appears for this relationship, where higher individual sensor detection rates will have a proportionally lower benefit regarding the system detection rate. Figure 7 confirms our expectation. This first test has already shown the impact of modelling rare events. We observed that the clandestine detection rates vary significantly throughout most of the simulation runtime and seems only to stabilise towards the end. Furthermore, we noticed some significant differences between runs. Therefore, in future we have to assess very carefully the required warm-up period, run length and number of replications. 6. CONCLUSIONS In this paper we have presented our first steps towards the development of a cargo-screening process simulator and we have introduced a case study that we want to use for gaining some experience with developing such a simulator. Our current task is to conduct a data requirement analysis. For this we have created a first draft of our aspired DES model to be used for the cargoscreening process simulator. This modelling exercise has allowed us to make a well informed decision about which kind of information and data we require for representing the real system to allow some useful systems analysis. We found that a big challenge when modelling the case study system is to capture the variability inherent in the system. By omitting details like differences in arrival rates throughout the day and week, congestion in front of service sheds and associated with this service time variation and detection rate variations we do not get a good representation of the real system, in particular when we are not only interested in the average proportion of clandestines detected 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% sensor detection rate Figure 7: Results from the experiment: sensor detection rates vs. proportion of clandestines detected average system performance but also want to gain an insight into its operations. We are currently working on the mechanisms to implement varying arrival rate and the consequences of these, i.e. congestion and varying service times. Once we have conducted our main data collection we will add some real data to it. Once this is done we will work on verification and validation of the simulation model. ACKNOWLEDGMENTS This project is supported by the EPSRC, grant number EP/G004234/1 and the UK Border Agency. REFERENCES Brown, D.A., 1995. Human occupancy detection. Proceedings of the Institute of Electrical and Electronics Engineers 29th Annual 1995 International Carnahan Conference on Security Technology, 166-174. October 18-20, Sanderstead, Surrey, England. Closs, D.J., McGarrell, E.F., 2004. Enhancing security throughout the supply chain. Special Report to the IBM Center for the Business of Government. Dorndorf, U., Herbers, J., Panascia, E., Zimmermann, H.J., 2007. Ports o’ call for O.R. problems. OR/MS Today. Available from http://www.accessmylibrary.com/coms2/summary _0286-30867578_ITM [accessed 01 April 2009]. Epenshade, T.J., 1995. Using INS border apprehension data to measure the flow of undocumented migrants crossing the US-Mexico frontier. International Migration Review 29:545-565. Heidelberger, P., 1995. Fast simulation of rare events in queuing and reliability models. ACM Transactions on Modeling and Computer Simulation 5(1):4385. Klock, B.A., 2005. Examination of possible technologies for the detection of human stowaways in air cargo containers. Final Report produced for Transportation Security Administration. Atlantic City: New Jersey, USA. Leone, K., Liu, R., 2005. The key design parameters of checked baggage screening systems in airports. Journal of Air Transport Management 11:69-78. Sekine, J., Campos-Náñnez, E., Harrald, J.R., Abeledo, H., 2006. A simulation-based approach to trade-off analysis of port security. Proceedings of the 38th Winter Simulation Conference, 521-528. December 03-06, Monterey, Califoernia, USA. Sky1, 2009. UK Border Force: Jargon Buster Part I. Available from: http://sky1.sky.com/uk-borderforce-jargon-buster-part-i [accessed 01 April 2009]. Tahar, R.M., Hussain, K., 2000. Simulation and analysis for the Kelang container terminal operations. Logistics Information Management 13(1):14-20. Turner, K., Williams, G., 2005. Modelling complexity in the automotive industry supply chain. Journal of Manufacturing Technology Management 16(4):447-458. UK Border Agency, 2009. Freight search figures for 2007/2008. Provided by the UK Border Agency. Wein, L.M., Liu, Y., Motskin, A., 2009. Analyzing the homeland security of the U.S.-Mexico Border. Risk Analysis 29(5):699-713. Weiss, W.E., 2008. Dynamic security: An agent-based model for airport defense. Proceedings of the 40th Winter Simulation Conference, 1320-1325. December 07-10, Miami, Florida, USA. Wilson, D.L., 2005. Use of modeling and simulation to support airport security. IEEE Aerospace and Electronic Systems Magazine 208:3-8. XJ Technologies, 2009. XJ Technologies - Simulation Software and Services. Available from: http://www.xjtek.com [accessed 01 April 2009]. AUTHORS BIOGRAPHY PEER-OLAF SIEBERS is a Research Fellow at The University of Nottingham, School of Computer Science. His main research interest is the application of computer simulation to study human-centric complex adaptive systems. This is a highly interdisciplinary research field, involving disciplines like social science, psychology, management science, operations research, economics and engineering. Furthermore, he is interested in nature inspired computing and agent-based robotics. For more information see http://www.cs.nott.ac.uk/~pos/ GALINA SHERMAN is a PhD student at City University, Cass Business School. Her current research is related to supply chain management, risk analysis and rare event modelling. UWE AICKELIN is a Professor of Computer Science and an Advanced EPSRC Research Fellow at The University of Nottingham, School of Computer Science. His main research interests are mathematical modelling, agent-based simulation, heuristic optimisation and artificial immune systems. For more information see http://www.cs.nott.ac.uk/~uxa/
5cs.CE
Counterfactual Conditionals in Quantified Modal Logic Naveen Sundar Govindarajulu and Selmer Bringsjord arXiv:1710.04161v2 [cs.AI] 2 Nov 2017 Rensselaer Polytechnic Institute, Troy, NY {naveensundarg,selmer.bringsjord}@gmail.com Abstract We present a novel formalization of counterfactual conditionals in a quantified modal logic. Counterfactual conditionals play a vital role in ethical and moral reasoning. Prior work has shown that moral reasoning systems (and more generally, theory-of-mind reasoning systems) should be at least as expressive as first-order (quantified) modal logic (QML) to be well-behaved. While existing work on moral reasoning has focused on counterfactual-free QML moral reasoning, we present a fully specified and implemented formal system that includes counterfactual conditionals. We validate our model with two projects. In the first project, we demonstrate that our system can be used to model a complex moral principle, the doctrine of double effect. In the second project, we use the system to build a data-set with true and false counterfactuals as licensed by our theory, which we believe can be useful for other researchers. This project also shows that our model can be computationally feasible. Introduction Natural-language counterfactual conditionals (or simply counterfactuals) are statements that have two parts (semantically, and sometimes syntactically): an antecedent and a consequent. Counterfactual conditionals differ from standard material conditionals in that the mere falsity of the antecedent does not lead to the conditional being true. For example, the sentence “If John had gone to the doctor, John would not be sick now” is considered a counterfactual as it is usually uttered when “John has not gone to the doctor”. Note that the surface syntactic form of such conditionals might not be an explicit conditional such as “If X then Y”; for example: “John going to the doctor would have prevented John being sick now”. Material conditionals in classical logic fail when used to model such sentences. Counterfactuals occur in certain ethical principles and are often associated with moral reasoning. We present a formal computational model for such conditionals. The plan for the paper is as follows. We give a brief overview of how counterfactuals are used, focusing on moral reasoning. Then we briefly discuss prior art in modeling counterfactuals, including computational studies of counterfactuals. We then present our formal system, used as a founCopyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. dation for building our model of counterfactual conditionals. After this, we present the model itself and prove some general properties of the system. We end by discussing two projects to demonstrate how the formal model can be used. Use of Counterfactual Conditionals Counterfactual reasoning plays a vital role in human moral reasoning. For instance, the doctrine of double effect (DDE) requires counterfactual statements in its full formalization. DDE is an attractive target for building ethical machines, as numerous empirical studies have shown that human behavior in moral dilemmas is in accordance with what the doctrine (or modified versions of it) predict.1 Another reason for considering DDE is that many legal systems use the doctrine for defining criminality. We briefly state the doctrine below. Assume that we have an ethical hierarchy of actions as in the deontological case (e.g. forbidden, morally neutral, obligatory); see (McNamara 2010).2 We also assume that we have a utility or goodness function for states of the world or effects, as in the consequentialist case. Given an agent a, an action α in a situation σ at time t is said to be DDE-compliant iff (the clauses are verbatim from (Govindarajulu and Bringsjord 2017a)): DDE Informal C1 the action is not forbidden C2 the net utility or goodness of the action is greater than some positive amount γ; C3a the agent performing the action intends only the good effects; C3b the agent does not intend any of the bad effects; C4 the bad effects are not used as a means to obtain the good effects; and C5 if there are bad effects, the agent would rather the situation be different and the agent not have to perform the action. That is, the action is unavoidable. Note that while (Govindarajulu and Bringsjord 2017a) present a formalization and corresponding implementation 1 Moral dilemmas are situations in which all available actions have large positive and negative effects. 2 There are also exist in the literature more fine-grained hierarchies(Bringsjord 2015). and “stopwatch” test of the first four clauses above, there is no formalization of C5 . Work presented here will enable such a formalization. The last clause has been rewritten below to make explicit its counterfactual nature. C5 Broken Up C5a The agent desires that the current situation be different. C5b The agent believes that if the agent itself were in a different situation, the agent would not perform the action α. Separately, (Migliore et al. 2014) have an empirical study in which they elicit subjects to produce counterfactual answers to questions in a mix of situations with and without moral content. Their answers have the form of C5a and C5b . Their study shows with statistical significance that humans spent more time responding to situations that had moral content. This suggests the presence of non-trivial counterfactual reasoning in morally-charged situations. Counterfactual reasoning also plays an important role in the intelligence community in counterfactual forecasting (Lehner 2017). In counterfacutal forecasting, analysts try to forecast what would have happened if the situation in the past was different than what we know, and as Lehner states there is a need for formal/automated tools for counterfactual reasoning. Prior Art Most formal modeling of counterfactuals has been in work on subjunctive conditionals. While there are varying definitions of what a subjunctive conditional is, the hallmark of such conditionals is that the antecedent, while not necessarily contrary to established facts (as is the case in counterfactuals), does speak of what could hold even if it presently doesn’t; and then the consequent expresses that which would (at least supposedly) hold were this antecedent to obtain.3 Hence, to ease exposition herein, we simply note that (i) subjunctives are assuredly non-truth-functional conditionals, and (ii) we can take subjunctive conditionals to be a superclass of counterfactual conditionals. A lively overview of formal systems for modeling subjunctive conditionals can be found in (Nute 1984). Roughly, prior work can be divided into cotenability theories versus possible-worlds theories. In cotenability theories, a subjunctive φ > ψ holds iff (C + φ) → ψ holds. Here C is taken to be a set of laws (logical/physical/legal) cotenable with φ. One major issue with many theories of cotenability is that they at least have the appearance of circularly defining cotenability in terms of cotenability. In possible-worlds theories, semantics of subjunctive conditionals are defined in terms of possible worlds.4 While conceptually attractive to a degree, such approaches are problematic. For example, many 3 E.g., “If you were to practice every day, your serve would be reliable” is a subjunctive conditional. It might not be the the case that you’re not already practicing hard. However, “If you had practiced hard, your serve would have been reliable” is a counterfactual (because, as it’s said in the literature, the antecedent is “contrary to fact”). 4 E.g., (Lewis 1973) famously aligns each possible world with an order of relative similarity among worlds, and is thereby able possible-worlds accounts are vulnerable to proofs that certain conceptions of possible worlds are provably inconsistent (e.g. see (Bringsjord 1985)). For detailed argumentation against possible-world semantics for counterfactual conditionals, see (Ellis, Jackson, and Pargetter 1977). Relevance logics strive to fix issues such as explosion and non-relevance of antecedents and consequents in material conditionals; see (Mares 2014) for a wide-ranging overview. The main concern in relevance logics, as the name implies, is to ensure that there is some amount of relevance between an antecedent and a consequent of a conditional, and between the assumptions in a proof and its conclusions. Our model does not reflect this concern, as common notions of relevance such as variable/expression sharing become muddled when the system includes equality, and become even more muddled when intensionality is added. Most systems of relevance logic are primarily possibleworlds-based and share some of the same concerns we have discussed above. For example, (Mares and Fuhrmann 1995; Mares 2004) discuss relevance logics that can handle counterfactual conditionals but are all based on possible-worlds semantics, and the formulae are only extensional in nature.5 Work in (Pereira and Saptawijaya 2016) falls under extensional systems, and as we explain below, is not sufficient for our modeling requirements. Differently, recent work in natural language processing by (Son et al. 2017) focuses on detecting counterfactuals in social-media updates. Due to the low base rate of counterfactual statements, they use a combined rule-based and statistical method for detecting counterfactuals. Their work is on detecting (and not evaluating, analyzing further, or reasoning over) counterfactual conditionals and other counterfactual statements. Needed Expressivity Our modeling goals require a formal system F of adequate expressivity to be used in moral and other theoryof-mind reasoning tasks. F should be free of any consistency or soundness issues. In particular, F needs to avoid inconsistencies such as the one demonstrated below, modified from (Govindarajulu and Bringsjord 2017a). In the inference chain below, we have an agent a who knows that the murderer is the person who owns the gun. Agent a does not know that agent m is the murderer, but it’s true that m is the owner of the gun. If the knowledge operator K is a simple first-order logic predicate, we get the proof shown below, which produces a contradiction from sound premises. to capture in clever fashion the idea that a counterfactual φ > ψ holds just in case the possible world satisfying φ that is the most similar to the actual world also satisfies ψ. While as is plain we are not fans of possible-worlds semantics, those attracted to such an approach to counterfactuals would do well in our opinion to survey (Fritz and Goodman 2017). 5 By extensional logics, we refer broadly to non-modal logics such as propositional logic, first-order logic, second-order logic etc. By intensional logics, we refer to modal logics. Note that this is different from intentions which can be represented by intensional operators, just as knowledge, belief, desires etc can be represented by intensional operators. See (Zalta 1988) for an overview. Modeling Knowlege (or any Intension) in First-order Logic 1 K (a, Murderer (owner (gun))) ; given 2 ¬K (a, Murderer (m)) ; given 3 m = owner (gun) ; given 4 K (a, Murderer (m)) ; first-order inference from 3 and 1 5 ⊥ ; first-order inference from 4 and 2 Even more robust representation schemes can still result in such inconsistencies, or at least unsoundness, if the scheme is extensional in nature (Bringsjord and Govindarajulu 2012). Issues such as this arise due to uniform handling of terms that refer to the same object in all contexts. This is prevented if the formal system F is a quantified modal logic (and other sufficiently expressive intensional systems). We present one such quantified modal logic below. Background: Formal System reasoning can be easly switched out in-place of the event calculus. The modal operators present in the calculus include the standard operators for knowledge K, belief B, desire D, intention I, etc. The general format of an intensional operator is K (a, t, φ), which says that agent a knows at time t the proposition φ. Here φ can in turn be any arbitrary formula. Also, note the following modal operators: P for perceiving a state, C for common knowledge, S for agent-to-agent communication and public announcements, B for belief, D for desire, I for intention, and finally and crucially, a dyadic deontic operator O that states when an action is obligatory or forbidden for agents. It should be noted that DCEC is one specimen in a family of easily extensible cognitive calculi. The calculus also includes a dyadic (arity = 2) deontic operator O. It is well known that the unary ought in standard deontic logic lead to contradictions. Our dyadic version of the operator blocks the standard list of such contradictions, and beyond.7 Syntax S ::= Agent | ActionType | Action ⊑ Event | Moment | Fluent  action : Agent × ActionType → Action       initially : Fluent → Formula       Holds : Fluent × Moment → Formula       happens : Event × Moment → Formula f ::=   clipped : Moment × Fluent × Moment → Formula       initiates : Event × Fluent × Moment → Formula       terminates : Event × Fluent × Moment → Formula     prior : Moment × Moment → Formula In this section, we present the formal system in which we model counterfactual conditionals. The formal system we use is deontic cognitive event calculus (DCEC). Arkoudas and Bringsjord (2008) introduced, for their modeling of the false-belief task, the general family of cognitive event calculi to which DCEC belongs. DCEC has been used to formalize and automate highly intensional moral reasoning processes and principles, such as akrasia (giving in to temptation that violates moral principles) (Bringsjord et al. 2014). and the doctrine of double effect described above.6 Briefly, DCEC is a sorted (i.e. typed) quantified modal logic (also known as sorted first-order modal logic). The calculus has a well-defined syntax and proof calculus; outlined below. The proof calculus is based on natural deduction (Gentzen 1935), commonly used by practicing mathematicians and logicians, as well as to teach logic; the proof calculus includes all the standard introduction and elimination rules for first-order logic, as well as inference schemata for the modal operators and related structures. t ::= x : S | c : S | f (t1 , . . . , tn )  q : Formula | ¬φ | φ ∧ ψ | φ ∨ ψ | ∀x : φ(x) |        P(a, t, φ) | K(a, t, φ) |   φ ::= C(t, φ) | S(a, b, t, φ) | S(a, t, φ) | B(a, t, φ)      D(a, t, φ) | I(a, t, φ)     O(a, t, φ, (¬)happens(action(a∗ , α), t′ )) Inference Schemata Syntax DCEC is a sorted calculus. A sorted system can be regarded analogous to a typed single-inheritance programming language. We show below some of the important sorts used in DCEC. Among these, the Agent, Action, and ActionType sorts are not native to the event calculus. The syntax can be thought of as having two components: a first-order core and a modal system that builds upon this first-order core. The figures below show the syntax and inference schemata of DCEC. The syntax is quantified modal logic. The first-order core of DCEC is the event calculus (Mueller 2006). Commonly used function and relation symbols of the event calculus are included. Other calculi (e.g. the situation calculus) for modeling commonsense and physical 6 The description of DCE C here is mostly a subset of the discussion in (Govindarajulu and Bringsjord 2017a) relevant for us. The figure below shows a fragment of the inference schemata for DCEC. First-order natural deduction introduction and elimination rules are not shown. Inference schemata RK and RB let us model idealized systems that have their knowledge and beliefs closed under the DCEC proof theory. While humans are not dedcutively closed, these two rules lets us model more closely how more deliberate agents such as organizations, nations and more strategic actors reason. (Some dialects of cognitive calculi restrict the number of iterations on intensional operators.) R4 states that knowledge of a proposition implies that the proposition holds R13 ties intentions directly to perceptions (This model does not take into account agents that could fail to carry out their intentions). R14 dictates how obligations get translated into known intentions. 7 A overview of this list is given lucidly in (McNamara 2010). On Using the Material Conditional Inference Schemata (Fragment) K(a, t1 , Γ), Γ ⊢ φ, t1 ≤ t2 K(a, t2 , φ) B(a, t1 , Γ), Γ ⊢ φ, t1 ≤ t2 B(a, t2 , φ) K(a, t, φ) φ [RK ] [RB ] t < t′ , I(a, t, ψ) [R4 ] If we are considering a simple material conditional φ → ψ, then if Γ ⊢ ¬φ, then trivially Γ ⊢ φ → ψ, if the proof calculus subsumes standard propositional logic ⊢Prop , as is is the case with logics used in moral reasoning. Another issue is that whether Γ ⊢ (φ ֒→ ψ) holds is not simply a function of whether Γ ⊢ φ holds and Γ ⊢ ψ holds, that is ֒→ is not a truth-functional connective, unlike the material conditional →. P(a, t′ , ψ) [R13 ] B(a, t, φ) B(a, t, O(a, t, φ, χ)) O(a, t, φ, χ) [R14 ] K(a, t, I(a, t, χ)) Semantics The semantics for the first-order fragment is the standard first-order semantics. The truth-functional connectives ∧, ∨, →, ¬ and quantifiers ∀, ∃ for pure first-order formulae all have the standard first-order semantics. The semantics of the modal operators differs from what is available in the so-called Belief-Desire-Intention (BDI) logics (Rao and Georgeff 1991) in many important ways. For example, DCEC explicitly rejects possible-worlds semantics and model-based reasoning, instead opting for a proof-theoretic semantics and the associated type of reasoning commonly referred to as natural deduction (Gentzen 1935; Francez and Dyckhoff 2010). Briefly, in this approach, meanings of modal operators are defined via arbitrary computations over proofs, as we will see for the counterfactual conditional below. Reasoning is performed through the first-order modal logic theorem prover, ShadowProver (Govindarajulu and Bringsjord 2017a). While we use the prover in our simulations, describing the prover in more detail is out of scope for the present paper.8 The Formal Problem At a time point t, we are given a set of sentences Γ describing what the system (or agent at hand) is working with. This set of sentences can be taken to describe the current state of the world at t; state of the world before t, up-to to some horizon h in the past; and also desires and beliefs about the future. We are given a counterfactual conditional φ ֒→ ψ with possibly (but not always) Γ ⊢ ¬φ. We require that our formal model provide us with the following: Required Conditions 1. Given a set of formulae Γ, and a sentence of the form φ ֒→ ψ, we should be able to tell whether or not Γ ⊢ φ ֒→ ψ. 2. Given a set of formulae Γ, and a sentence of the form Θ(a, t, φ ֒→ ψ), we should be able to tell whether or not Γ ⊢ Θ(a, t, φ ֒→ ψ), here Θ is either B, K or D. first-order Extensional Context Rcf 1 ֒→ Introduction   ′   [I1 ] Γ ⊆ Γ Γ ⊢ φ ֒→ ψ ⇔¬Cons[{φ}] ∨ ∃Γ′ [I2 ] Con[Γ′ + φ]   [I3 ] (Γ′ + φ) ⊢ ψ  The elimination rule for ֒→ is much simpler and resembles the rule for the material conditional →. Rcf 2 ֒→ Elimination Reasoner (Theorem Prover) 8 The underlying (Stickel et al. 1994). Modeling Counterfactual Conditionals The general intuition is that given φ ֒→ ψ, one has to drop some of the formulae in Γ arriving at Γ′ and then if (Γ+φ) ⊢ ψ, we can conclude that φ ֒→ ψ. More precisely, φ ֒→ ψ can be proven from Γ iff there is a subset Γ′ of Γ consistent with φ such that (Γ′ + φ) ⊢ ψ. Since we are using a natural deduction proof calculus, we need to specify introduction and elimination rules for ֒→. Let Cons[Φ] denote that a set of formulae Φ is consistent. prover is SNARK Γ + {φ, φ ֒→ ψ} ⊢ ψ Intensional Context The inference schema given below apply to the presence of the counterfactual in any arbitrary context Υ. The context for a formula is defined as below. Let hi denote the empty list and let ⊕ denote list concatentation. ֒→ Definition of Υ  hi if the top connective in φ is not modal     hK, a, ti, ⊕Υ[ψ], if φ ≡ K(a, t, ψ) Υ[φ] =  hB, a, ti, ⊕Υ[ψ], if φ ≡ B(a, t, ψ)    hD, a, ti, ⊕Υ[ψ], if φ ≡ D(a, t, ψ) For example, Υ[B(a, t1 , K(b, t2 , P ))] = hB, a, t1 , K, b, t2 i With the context defined as above, inference schemata for ֒→ occurring within a modal context is given below. We also use the following shorthands in the two rules given below: (i)Υ[φ] denotes that formula φ has context Υ. (ii)Υ[Γ] denotes the subset of Γ with context Υ. Rcf 3 ֒→ Introduction Property 2; R2 in (Pollock 1976)  ′   [I1 ] Γ ⊆ Υ[Γ]  ′ Γ ⊢ Υ [φ ֒→ ψ] ⇔ ¬Cons[{φ}] ∨ ∃Γ [I2 ] Con[Γ′ + φ]   [I3 ] (Γ′ + φ) ⊢ ψ The elimination rule for ֒→ under any arbitrary context is given below. Rcf 4 ֒→ Elimination Γ + {Υ[φ], Υ[φ ֒→ ψ]} ⊢ Υ[ψ] For a simple example of the above rules, see the experiments sections below. A Note on Implementing the Introduction Rules There are two possible dynamic programming algorithms. In the worst case, both the algorithms amount to searching over all possible subsets of a given Γ. In the first algorithm, we start from smaller subsets and compute whether (Γ′ + φ) ⊢ ψ and Cons[Γ′ + φ]. For any larger sets Γ′′ , (Γ′′ + φ) ⊢ ψ need not be computed. In the second algorithm, we start with larger subsets and compute (Γ′′ + φ) ⊢ ψ and Cons[Γ′′ + φ]. For any smaller sets Γ′ , Cons[Γ′ + φ] need not be computed. If ⊢ is first-order and above, the second algorithm is preferable. If ⊢ encompasses first-order logic, then computing Cons[Φ] for any set is hard in the general case. In our implementation, we approximate Cons[Φ] by running querying a prover for Φ ⊢ ⊥ up to a time limit δ. As δ increases, the approximation becomes better. Properties of the System Now we canvass some meta-theorems about the system. All the four inference schemata given above, when added to a monotonic proof theory, preserve monotonicity. Theorem 1: Monotonicity Preservation If ⊢ is monotonic, then ⊢ augmented with Rcf 1 , Rcf 2 , Rcf 3 , and Rcf 4 is still monotonic. Proof Sketch: Notice that the right-hand side of the condition for the introduction rules stay satisfied if we replace Γ with a superset Φ. The elimination rules hold regardless of Γ.  We assume that ⊢ is monotonic. For monotonic systems, for any Γ′ ⊆ Γ, Cons[Γ] ⇒ Cons[Γ′ ]. We show that some desirable properties that hold for other systems in the literature hold for the system presented here.   {} ⊢ φ → ψ ⇒ {} ⊢ φ ֒→ ψ Proof: Either ¬Cons[{φ}] or Cons[{φ}]. If the former holds, we are done. If the latter holds, then take Γ′ = {} and we have Cons[Γ′ + φ] and Γ′ + φ ⊢ ψ, satisfying all three conditions I1 , I2 , and I3 . ∴ letting us introduce φ ֒→ ψ.  Property 3; R3 in (Pollock 1976)     {} ⊢ φ → ψ ⇒ {} ⊢ (χ ֒→ φ) → (χ ֒→ ψ) Proof: Assume {} ⊢ φ → ψ. We need to prove {χ ֒→ φ} ⊢ (χ ֒→ ψ). If ¬Cons[{χ ֒→ φ}], we succeed. Otherwise, take Γ′ to be {χ ֒→ φ}. By the elimination rule we have {χ ֒→ φ} + χ ⊢ φ, and using {} ⊢ φ → ψ, we have {χ ֒→ φ} + χ ⊢ ψ, thus satisfying our conditions I1 , I2 , and I3 to introduce χ ֒→ ψ.  Property 4; A6 in (Pollock 1976), MP in (Nute 1984), If Γ ⊢ φ ֒→ ψ, then Γ ⊢ φ → ψ Proof: Γ ⊢ (φ ֒→ ψ), therefore Γ+{φ} ⊢ ψ using ֒→ -elim. Using → -intro we have Γ ⊢ φ → ψ.  Property 5; MOD in (Nute 1984) If Γ ⊢ (¬ψ) ֒→ ψ, then Γ ⊢ φ → ψ Proof: Given Γ ⊢ (¬ψ) ֒→ ψ, therefore using ֒→ -elim Γ + ¬ψ ⊢ ψ, and using ¬-elim we have Γ ⊢ ψ, giving us Γ ⊢ φ → ψ.  Property 6 If Γ ⊢ (φ ֒→ ψ) ∧ (ψ ֒→ φ) then Γ ⊢ (φ → χ) ⇔ Γ ⊢ (ψ → χ) Proof: We prove the left-to-right direction of the biconditional Γ ⊢ (φ → χ) ⇒ Γ ⊢ (ψ → χ) Assume Γ ⊢ (φ → χ). We need to prove Γ ⊢ (ψ → χ). Since we are given Γ ⊢ ψ ֒→ φ, either ¬Cons[{ψ}] or there is a Γ′ ⊆ Γ such that Cons[Γ′ + ψ] and Γ′ + ψ ⊢ φ. If the former holds, we are finished. If the latter holds, we then have Γ + ψ ⊢ φ since ⊢ is monotonic. Using the given Γ ⊢ (φ → χ) and the → −elimination rule, we obtain Γ+ψ ⊢ χ. Therefore, Γ ⊢ ψ → χ.  Property 7; CSO in (Nute 1984) If {} ⊢ (φ ֒→ ψ) ∧ (ψ ֒→ φ) then Γ ⊢ (φ ֒→ χ) ⇔ Γ ⊢ (ψ ֒→ χ) Property 1; ID in (Nute 1984) {} ⊢ φ ֒→ φ Proof: If ¬Cons[{φ}], we are done. Otherwise, since {φ} ⊢ φ, we can see that I1 , I2 , and I3 hold.  Proof: We establish the left-to-right direction of the biconditional Γ ⊢ (φ ֒→ χ) ⇒ Γ ⊢ (ψ ֒→ χ) Assuming {} ⊢ (φ ֒→ ψ) ∧ (ψ ֒→ φ) and using Property 4 and ⊢Prop , we have {} ⊢ (φ → ψ) ∧ (ψ → φ); and using ⊢Prop again we obtain {} ⊢ φ ↔ ψ. Assume Γ ⊢ (φ ֒→ χ). We need to prove Γ ⊢ (ψ ֒→ χ). Since we assumed Γ ⊢ φ ֒→ χ, either ¬Cons[{φ}] or there is a Γ′ ⊆ Γ such that Cons[Γ′ + φ] and Γ′ + φ ⊢ χ. If the former holds we are done because ¬Cons[{φ}] ⇒ ¬Cons[{ψ}]. If the latter holds, we have Cons[Γ′ +ψ] and Γ′ +ψ ⊢ χ as {} ⊢ φ ↔ ψ.  Property 8 If {} ⊢ (φ ֒→ ψ) ∧ (ψ ֒→ φ) then Γ ⊢ (χ ֒→ φ) ⇔ Γ ⊢ (χ ֒→ ψ) Γ′ + (φ1 ∨ φ2 ) ⊢ ⊥ through ∨-elim, which overthrows our assumption that Cons[Γ′ + (φ1 ∨ φ2 )]. So either Cons[Γ′ + φ1 ] or Cons[Γ′ + φ2 ], then I2 is satisfied for either φ1 ֒→ ψ or φ2 ֒→ ψ. Assume that it holds for the former. (3) I3 is satisfied as {φ1 } ⊢ φ1 ∨ φ2 and we have Γ′ + (φ1 ∨ φ2 ) ⊢ ψ; therefore Γ′ + φ1 ⊢ ψ.  With stronger assumptions we can obtain a property that directly resembles SDA. Property 10 Proof: Similar to the previous proof, we prove the left-toqright direction of the biconditional If  Γ ⊢ (φ1 ∨ φ2 ) ֒→ ψ and Γ 6⊢ ¬φ1 and Γ 6⊢ ¬φ2  Γ ⊢ (φ ֒→ χ) ⇒ Γ ⊢ (ψ ֒→ χ) then Γ ⊢ (φ1 ֒→ ψ) ∧ (φ1 ֒→ ψ) Assuming {} ⊢ (φ ֒→ ψ) ∧ (ψ ֒→ φ) and using Property 4 and ⊢Prop , we deduce {} ⊢ (φ → ψ) ∧ (ψ → φ); and using ⊢Prop again we infer {} ⊢ φ ↔ ψ. Assume Γ ⊢ (χ ֒→ φ). We need to show Γ ⊢ (χ ֒→ ψ). Since we assumed Γ ⊢ χ ֒→ φ, either ¬Cons[{χ}] or there is a Γ′ ⊆ Γ such that Cons[Γ′ + χ] and Γ′ + χ ⊢ φ. If the former, we are done; if the latter, we have Γ′ + χ ⊢ ψ.  The next property states that if we are given φ ֒→ ψ1 and φ ֒→ ψ2 , we can reach φ ֒→ ψ1 ∧ ψ2 . For instance, “If a had gone to the doctor, a would not have been sick” and “If a had gone to the doctor, a would be happy now” give us “If a had gone to the doctor, a would not have been sick and a would be happy now”. One property which has been problematic for many previous formal systems is simplification of disjunctive antecedents (SDA). For instance, given “If a had gone to the doctor or if a had taken medication, a would not be sick now” should give us “If a had gone to the doctor, a would not be sick now, and if a had taken medication, a would not be sick now.” Logics based on possible worlds find it quite challenging to handle this property — yet it seems like a necessary property to secure (Ellis, Jackson, and Pargetter 1977), though there are some disagreements on this front (Loewer 1976). As a middle ground we can prove “If a had gone to the doctor, a would not be sick now, or if a had taken medication, a would not be sick now.” Proof: The proof is similar to the previous proof, needing only minor modifications. Property 9 If Γ ⊢ (φ1 ∨ φ2 ) ֒→ ψ then Γ ⊢ (φ1 ֒→ ψ) ∨ (φ1 ֒→ ψ) Proof: We need to either prove Γ ⊢ φ1 ֒→ ψ or Γ ⊢ φ1 ֒→ ψ and use ∨−introduction to get Γ ⊢ (φ1 ֒→ ψ) ∨ (φ2 ֒→ ψ). If ¬Cons[φ1 ∨ φ2 ], we have ¬Cons[φ1 ] and ¬Cons[φ2 ], we then reach our conclusion. Otherwise, if Cons[φ1 ∨ φ2 ], then there is a Γφ1 ∨φ2 serving as Γ′ . We need to prove three clauses: (1) I1 is satisfied as Γ′ = Γφ1 ∨φ2 . (2) I2 is satisfied because if Cons[Γ′ + φ1 ∨ φ2 ] then at least one of Cons[Γ′ + φ1 ] or Cons[Γ′ + φ2 ]; otherwise if Γ′ + φ1 ⊢ ⊥ and Γ′ + φ2 ⊢ ⊥, giving us Property 11, A4 in (Pollock 1976) If Γ ⊢ (φ ֒→ ψ) and Γ ⊢ (φ ֒→ χ) then Γ ⊢ (φ ∧ ψ) ֒→ χ Proof: Since we have Γ ⊢ (φ ֒→ χ), either ¬Cons[{φ}] or there is a Γ′ ⊆ Γ such that Cons[Γ′ + φ] ⊢ χ. If the former holds, we have ¬Cons[{φ∧ψ}], giving us Γ ⊢ (φ∧ψ) ֒→ χ. If the latter holds, we have Γ′ + (φ ∧ ψ) ⊢ χ. Assume that ¬Cons[Γ′ + (φ ∧ ψ)]; then we get Γ ∪ {φ, ψ} ⊢ ⊥, giving us Γ + φ ⊢ ¬ψ through ¬−introduction. With → − introduction we get Γ ⊢ φ → ¬ψ, but using Property 4 and the given Γ ⊢ φ ֒→ ψ, we have Γ ⊢ φ → ψ. Therefore, Γ ⊢ ¬φ. This goes against Cons[Γ′ + φ], giving us that Cons[Γ′ + (φ∧ψ)]. This satisfies I1 , I2 , and I3 which yields Γ ⊢ (φ ∧ ψ) ֒→ χ.  Finally, we have the following theorem, the proof of which can be obtained by exploiting all the properties above. Theorem 2 All the above properties hold if every counterfactual φ ֒→ ψ is replaced by Υ[φ ֒→ ψ]. Given the above, we can prove the following, using rules R4 and R14 . The following theorem gives an account of how an agent might assert a counterfactual conditional in a moral/ethical situation. Theorem 3    Γ ⊢ B a, t, O(a, t, φ, χ) ∧ O(a, t, φ, χ)  ⇒ Γ ⊢ B(a, t, φ) ֒→ χ Experiments We describe two experiments that demonstrate the model in action, the first in moral dilemmas and the second in general situations.9 9 Axioms for both the experiments, data and the reasoning system can be obtained here: https://goo.gl/nDZtWX Counterfactual Conditionals in Moral Dilemmas We look at moral dilemmas used in (Govindarajulu and Bringsjord 2017a). Each dilemma d has an axiomatization Γd . Two such dilemmas are axiomatized and studied in (Govindarajulu and Bringsjord 2017a). Assume that an agent a is facing a given dilemma d. The axiomatization Γd includes a’s knowledge and beliefs about the dilemma. We show that for each d, we can get C5a and C5b . Note that C5a and C5b talk about situations. Though event calculus does not directly model situations, we can use fluents to do so. A situation is formalized as an object of sort Situation: Situation ⊏ Object in : Agent × Situation → Fluent Action : Agent × ActionType × Situation × Moment → Formula We have the following axiom which states that the only actions that an agent can perform in a situation at a time are those sanctioned by the Action predicate. ∀a : Agent, α : ActionType, t : Moment.   happens (action(a, α), t) →    ∃σ : Situation. Holds(in(a, σ), t) ∧ Action(a, α, σ, t) As a warmup to C5b , we state C5a below. Let the current agent be I and time be denoted by t. The formula below states that the agent believes it is in a situation σ ′ and desires to be in a situation σ ′ different from σ with at least one action type α that is not forbidden and does not have any negative effects.10 Here µ : Fluent → R denotes the total utility of a fluent for all agents and all times. Formalization of C5a ¬∃f [µ(f ) > 0] ∧ terminates(α, f, t)             Let αD be the DDE-complaint action that the agent is saddled with in the current situation σ. Let Θ(σ, t) be the inner statement in the desires modal operator above. The statement below formalizes C5b and can be read as the agent believing that if the agent were in a different situation with at least one action that is not forbidden and does not have any negative effects, it would then not perform the action αD required of it by DDE. 10   B I, t, Θ(σ, t) ֒→ ¬happens action(I, αD ), t + 1 ! We derive the above two conditions from: (1) axioms describing situations; and (2) common knowledge C(Φ) dictating that agents should only perform non-forbidden actions and in a non-dilemma situation will peform an action with only positive effects. C5a takes around 780ms and C5b takes around 8.378s. Evaluation of the System We have the following additional symbols that tell us when an agent is in a situation and what actions are possible for an agent in a situation at a given time: B (I, t, Holds (in (I, σ))) ∧   Holds (in (I, σ)) ∧   Action(I, α, ρ, t)∧         ¬O(I, t, ρ, ¬happens (action(I, α), t) I, t, ∃ρ D  ∃α       ¬∃f [µ(f ) < 0] ∧ initiates(α, f, t)  Formalization of C5b Note that this is a mere first formulation of a complex mental state and further refinements, simple and drastic, are possible and expected. We demonstrate the feasibility of our system by showing the model working for a small dataset of representative problems. There are 16 problems each with its own set of assumptions Γ. For each problem Γ, we have a statement that is provably counterfactual, that is Γ ⊢ ¬φ. Using this statement, we build three conditionals: (1) a counterfactual conditional φ ֒→ ψ; (2) an absurd material conditional φ → ⊥; and (3) an absurd counterfactual φ ֒→ ⊥. The number of premises range from 2 to 15. One simple problem is shown below: Γ=   ∀x : Human(x) → Mortal (x) , Human(socrates) Γ ⊢ ¬Mortal (socrates) ֒→ ¬Human(socrates) Γ ⊢ ¬Mortal (socrates) → (P ∧ ¬P ) Γ 6⊢ ¬Mortal (socrates) ֒→ (P ∧ ¬P ) The table below shows how much time proving the true and false counterfactuals takes when compared with proving the absurd material conditional for the same problem. As expected, the counterfactual conditional takes more time than the material conditional. The absurd counterfactual φ ֒→ ⊥ is merely intended as a sanity check and the large reasoning times are expected (mainly due to timeouts), and is not expected to be a common use case. Formula Mean (s) Min (s) Max (s) φ ֒→ ψ φ→⊥ φ ֒→ ⊥ 2.496 0.169 19.7 0.449 0.089 1.93 11.14 0.341 120.67 Conclusion & Future Work We have presented a novel formal model for counterfactual conditionals. We have applied this model to complete a formalization of an important ethical principle, the doctrine of double effect. We have also provided an implementation of a reasoning system and a dataset with counterfactual conditionals. There are three main threads for future work. First, the reasoning algorithm is quite simple and can be improved by looking at either hand-built or learned heuristics. Second, we hope to leverage recent work in developing an uncertainty system for a cognitive calculus (Govindarajulu and Bringsjord 2017b). Finally, we hope to build a more robust and extensive dataset of counterfactual reasoning validated by multiple judgements from humans. References [Arkoudas and Bringsjord 2008] Arkoudas, K., and Bringsjord, S. 2008. Toward Formalizing CommonSense Psychology: An Analysis of the False-Belief Task. In Ho, T.-B., and Zhou, Z.-H., eds., Proceedings of the Tenth Pacific Rim International Conference on Artificial Intelligence (PRICAI 2008), number 5351 in Lecture Notes in Artificial Intelligence (LNAI), 17–29. Springer-Verlag. [Bringsjord and Govindarajulu 2012] Bringsjord, S., and Govindarajulu, N. S. 2012. Given the Web, What is Intelligence, Really? Metaphilosophy 43(4):361–532. This URL is to a preprint of the paper. [Bringsjord et al. 2014] Bringsjord, S.; Govindarajulu, N. S.; Thero, D.; and Si, M. 2014. Akratic Robots and the Computational Logic Thereof. In Proceedings of ETHICS • 2014 (2014 IEEE Symposium on Ethics in Engineering, Science, and Technology), 22–29. IEEE Catalog Number: CFP14ETI-POD. [Bringsjord 1985] Bringsjord, S. 1985. Are There SetTheoretic Worlds? Analysis 45(1):64. [Bringsjord 2015] Bringsjord, S. 2015. A 21st-Century Ethical Hierarchy for Humans and Robots: EH. In Ferreira, I.; Sequeira, J.; Tokhi, M.; Kadar, E.; and Virk, G., eds., A World With Robots: International Conference on Robot Ethics (ICRE 2015). Berlin, Germany: Springer. 47–61. [Ellis, Jackson, and Pargetter 1977] Ellis, B.; Jackson, F.; and Pargetter, R. 1977. An Objection to Possible-world Semantics for Counterfactual logics. Journal of Philosophical Logic 6(1):355–357. [Francez and Dyckhoff 2010] Francez, N., and Dyckhoff, R. 2010. Proof-theoretic Semantics for a Natural Language Fragment. Linguistics and Philosophy 33:447–477. [Fritz and Goodman 2017] Fritz, P., and Goodman, J. 2017. Counterfactuals and Propositional Contingentism. Review of Symbolic Logic 10(3):509–529. [Gentzen 1935] Gentzen, G. 1935. Investigations into Logical Deduction. In Szabo, M. E., ed., The Collected Papers of Gerhard Gentzen. Amsterday, The Netherlands: NorthHolland. 68–131. This is an English version of the wellknown 1935 German version. [Govindarajulu and Bringsjord 2017a] Govindarajulu, N. S., and Bringsjord, S. 2017a. On Automating the Doctrine of Double Effect. In Sierra, C., ed., Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI-17, 4722–4730. Preprint available at this url: https://arxiv.org/abs/1703.08922. [Govindarajulu and Bringsjord 2017b] Govindarajulu, N. S., and Bringsjord, S. 2017b. Strength Factors: An Uncertainty System for a Quantified Modal Logic. Presented at Workshop on Logical Foundations for Uncertainty and Machine Learning at IJCAI 2017, Melbourne, Australia. [Lehner 2017] Lehner, P. 2017. Forecasting counterfactuals in uncontrolled settings. webpage. [Lewis 1973] Lewis, D. 1973. Counterfactuals. Oxford, UK: Blackwell. [Loewer 1976] Loewer, B. 1976. Counterfactuals with disjunctive antecedents. The Journal of Philosophy 73(16):531–537. [Mares and Fuhrmann 1995] Mares, E. D., and Fuhrmann, A. 1995. A relevant theory of conditionals. Journal of Philosophical Logic 24(6):645–665. [Mares 2004] Mares, E. D. 2004. Relevant Logic: A Philosophical Interpretation. Cambridge University Press. [Mares 2014] Mares, E. 2014. Relevance logic. In Zalta, E. N., ed., The Stanford Encyclopedia of Philosophy. Metaphysics Research Lab, Stanford University, spring 2014 edition. [McNamara 2010] McNamara, P. 2010. Deontic Logic. In Zalta, E., ed., The Stanford Encyclopedia of Philosophy. McNamara’s (brief) note on a paradox arising from Kant’s Law is given in an offshoot of the main entry. [Migliore et al. 2014] Migliore, S.; Curcio, G.; Mancini, F.; and Cappa, S. F. 2014. Counterfactual thinking in moral judgment: An experimental study. Frontiers in Psychology 5. [Mueller 2006] Mueller, E. 2006. Commonsense Reasoning: An Event Calculus Based Approach. San Francisco, CA: Morgan Kaufmann. This is the first edition of the book. The second edition was published in 2014. [Nute 1984] Nute, D. 1984. Conditional Logic. In Gabay, D., and Guenthner, F., eds., Handbook of Philosophical Logic Volume II: Extensions of Classical Logic. Dordrecht, The Netherlands: D. Reidel. 387–439. [Pereira and Saptawijaya 2016] Pereira, L. M., and Saptawijaya, A. 2016. Counterfactuals, Logic Programming and Agent Morality. In Rahman, S., and Redmond, J., eds., Logic, Argumentation and Reasoning. Springer. 85–99. [Pollock 1976] Pollock, J. 1976. Subjunctive Reasoning. Dordrecht, Holland & Boston, USA: D. Reidel. [Rao and Georgeff 1991] Rao, A. S., and Georgeff, M. P. 1991. Modeling Rational Agents Within a BDI-architecture. In Fikes, R., and Sandewall, E., eds., Proceedings of Knowledge Representation and Reasoning (KR&R-91), 473–484. San Mateo, CA: Morgan Kaufmann. [Son et al. 2017] Son, Y.; Buffone, A.; Raso, J.; Larche, A.; Janocko, A.; Zembroski, K.; Schwartz, H. A.; and Ungar, L. 2017. Recognizing Counterfactual Thinking in Social Media Texts. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, 654–658. [Stickel et al. 1994] Stickel, M.; Waldinger, R.; Lowry, M.; Pressburger, T.; and Underwood, I. 1994. Deductive Composition of Astronomical Software From Subroutine Libraries. In Proceedings of the Twelfth International Conference on Automated Deduction (CADE–12), 341–355. SNARK can be obtained at the url provided here. [Zalta 1988] Zalta, E. N. 1988. Intensional Logic and the Metaphysics of Intentionality. Cambridge, MA: MIT Press.
2cs.AI
A Note on Topology Preservation in Classification, and the Construction of a Universal Neuron Grid arXiv:1308.1603v4 [cs.NE] 1 Feb 2018 Dietmar Volz [email protected] February 2, 2018 Abstract It will be shown that according to theorems of K. Menger, every neuron grid if identified with a curve is able to preserve the adopted qualitative structure of a data space. Furthermore, if this identification is made, the neuron grid structure can always be mapped to a subset of a universal neuron grid which is constructable in three space dimensions. Conclusions will be drawn for established neuron grid types as well as neural fields. 1 Mathematical Preliminaries Topology is one of the basic branches of mathematics. It is sometimes also referred to as qualitative geometry, in a way that it deals with the qualitative properties and structure of geometrical objects. The geometrical objects of interest in this paper are vector spaces, manifolds, and curves. These form the basis of the presented mathematical treatment of clustering with neuron grids. Consequently, the paper has to begin with some mathematical preliminaries. 1.1 Manifolds In the following, a n-dimensional vector space will be identified with a subspace of IRn . It is assumed that IRn is equipped with a topology which in turn is induced by a metric. Mappings between subspaces of IRn are called homeomorphic or topology preserving if they are one-to-one and continuous in both directions. It is known from the theorem of dimension invariance (Brouwer, 1911) that mappings between non-empty open sets U ⊂ IRm and V ⊂ IRn for m 6= n are never homeomorphic. In the light of Brouwer’s theorem it is the open sets that fix the topological dimension of a subset of IRn . As the IRn is introduced as a metric space, the open sets are given by open balls that formalize the concept of distance between points of this metric space. Homeomorphic mappings preserve the neighborhood relationship between points of IRn . Amongst the huge variety of subsets of the metric space IRn , the n-dimensional manifolds (or n-manifolds) have turned out to be of interest as these describe solution spaces of equations or geometrical entities. Manifolds are parameterized geometrical objects, parameters could describe e.g. the coordinates of a physical space. As n-manifolds are locally Euclidean of dimension n they are subject to Brouwer’s theorem and therefore of fixed topological 1 dimension. As a consequence, dimension reducing mappings between manifolds will not be able to transfer mutual topological structures. A vivid example of the dimension conflict of two manifolds of different dimension is given by a surjective and continuous mapping of [0, 1] onto [0, 1] × [0, 1] which is also called a ’Peano curve’ (Peano, 1890). The convoluted structure of a Peano curve does not reflect the neighborhood relationship of elements of the underlying manifold ⊂ IR2 , not even locally: There is no topology preserving mapping of [0, 1] onto [0, 1] × [0, 1]. An illustration of a Peano curve to 4th iteration is given in figure 1. Figure 1: A Peano curve (source: Wikipedia) 1.2 Curves The Peano curve introduced in the preceding section is based on the conventional definition of a compact curve as a continuous mapping of [0, 1]. The following definition according to (Menger, 1968) renders the definition of a compact curve more precisely. Beforehand, a definition of a continuum is required. Definition A compact, connected set ⊂ IRn having more than one element is a continuum. A set ⊂ IRn which contains no continuum is called discontinuous. Definition A continuum K as a subset of a metric space is called a curve if every point of K is contained in arbitrary small neighborhoods having discontinuous intersects with K. From Menger’s definition of a curve the following theorem results: Theorem[Menger] Every curve defined in a metric space is homeomorphic to a curve defined in IR3 . The proof of this theorem is left here. The interested reader is referred to Menger’s textbook (Menger, 1968). The theorem states that with regard to topological aspects, the transition from curves defined in three-dimensional Euclidean space to curves de- 2 fined in an arbitrary metric space doesn’t give any generalization. Menger’s definition of a curve even leads to another theorem (Menger, 1968). Theorem[Menger] Every compact curve in a metric space can be mapped to a subset of a so-called universal curve ⊂ IR3 . The universal curve K is constructable and up to homeomorphism uniquely defined. The construction starts with a cube [0, 1]3 ⊂ IR3 . K is the set of all points of [0, 1]3 such that at least two of the three coordinates have triadic expansions that do not contain a 1. The hereby constructed set fulfills the definition of a curve (Menger, 1968) and leads to a self-similar structure. The construction is shown in figure 2. Figure 2: Menger’s universal curve in perspective view Summarizing, the topological relationships that arise from Brouwer’s and Menger’s theorems are as follows: ∼ 6 = ∼ 6 = X ⊂ IRn −−−−→ −−−−→ Z ⊂ IR3 , if C ⊂ IRn −−−−−−−−−−−−−−−−−−−−−→ C ⊂ IR3 , ∀n Y ⊂ IRm ∼ = m 6= n and m 6= 3 hereby X, Y, Z are (n,m,3)-manifolds, C a curve, ∼ = identifies a homeomorphic mapping. Subsets of the universal curve as introduced in this section usually are no manifolds. The only exception are the trivial cases of subsets that are homeomorphic to an interval or S1 . 3 2 Application to Neuron Grids 2.1 Vector Quantization The method of Vector Quantization (VQ) (Linde et al., 1980) classifies elements of a vector space V ⊂ IRn by approximating the probability density function p(v) of elements v of V . Hereby, the elements of V are mapped iteratively to a set of weight vectors U such that respective a suitable metric the quantization error functional gets minimal. An extension of the VQ method introduces a topology on the set of weight vectors such that U constitutes a topological space which is then called a neuron grid. By means of the topology of the neuron grid, elements of U are mutually adjacent if they are adjacent on the neuron grid. Using algorithms of machine learning, for example Kohonen’s feature maps (Kohonen, 1990) and several variants thereof (Fritzke, 1992; Oja et al., 1999) try to transfer the topology of the vector space V to the topology of the neuron grid U. Hereby, the topology of the neuron grid U as adapted to the vector space topology V is representative of the topology of V . The following section will provide some insight to the restrictions of topology preservation in clustering of a vector space with VQ methods. 2.2 Identification of a Neuron Grid with a Curve Assuming Menger’s curve definition, the following identification is made: Definition A neuron grid is a curve It is required that neurons of a neuron grid constitute a discrete point set of a curve. Subsets of a neuron grid which contain no neurons are called links between neurons. Consequently, the topology of the defined neuron grid corresponds to a curve topology. The identification of a neuron grid with a curve as motivated in this section is coherent and straightforward for neuron grids whose topologies are identifiable with a subset of Menger’s universal curve. This is the case for neuron grids of the Kohonen type (Kohonen, 1990) as well as some variants thereof e.g. (Fritzke, 1992; Oja et al., 1999) that constitute topological spaces of a discrete point set together with a set of links between the point set. The presented identification with a curve produces the following results: i All neuron grid topologies are uniquely definable in IR3 . There’s no need to introduce ’hypercubes’ or ’high-dimensional’ grid topologies. ii Given the neuron grid topology is adapted to a vector space topology ⊂ IRn , then the neuron grid topology will generally be retained in IR3 . Clustering results are always visualizable in IR3 . iii Up to homeomorphism it exists a uniquely defined universal neuron grid such that every connected neuron grid is a subset of the universal neuron grid. These results were inferred directly from Menger’s curve theorems. It should be mentioned though that Brouwer’s theorem precludes a direct topology preserving mapping between the vector space topology V which is induced by the metric of IRn and U ⊂ IRm if m 6= n. The conflict of dimension as illustrated in the example of section 1.1 is hereby reproduced, this time as the lack of homeomorphic mappings between open balls of metric spaces. In consequence, metrical properties of IRn generally won’t be reproduced on the clustering result. 4 It should also be mentioned that similar results are not possible for a neuron grid if it is defined by a two- or higher-dimensional manifold. The well-known ’Klein bottle’ (Klein, 1923) provides a vivid example what might happen to a two-dimensional surface that is defined in IRn , n > 3, and shows an apparent self-intersection if mapped to IR3 . The self-intersection generates a subset of points on the Klein bottle that are separate in IRn , n > 3 and get identified through the mapping to IR3 . Hereby, two separate clusters are spuriously merged into one. Discussion The presented theorems of Brouwer and Menger illustrate an alternative though simple and straightforward approach to the topological foundation of neuron grids. The identification of a neuron grid with a subset of the universal curve at a first or second glance may be seen as trivial. This is in particular due to the presented definition of a curve which is intuitive and comprehensible, also from a naive standpoint. The presented topological framework of neuron grids restricts neuron sets to discrete point sets. Alternative approaches (Amari, 1977; Bressloff, 2005; Cottet, 1995) introduce continuous models of neural fields. As neural fields per definition provide open sets in their domain, the present paper also incloses the caveat that neural fields might produce unusable results if applied to clustering tasks. Acknowledgements I would like to thank Catalin Dartu for the nice visualization of Menger’s universal curve. References Amari, S. (1977). Dynamics of pattern formation in lateral-inhibition type neural fields. Biol Cybern, 27, 77 – 87. Bressloff, P. C. (2005). Spontaneous symmetry breaking in self-organizing neural fields. Biol Cybern, 93(4), 256 – 274. Brouwer, L. E. J. (1911). Beweis der Invarianz der Dimensionszahl. Math. Ann., 70, 161 – 165 Cottet, G. (1995). Neural networks: Continuous approach and applications to image processing. Journal of Biological Systems, 3, 1131 – 1139. Fritzke, B. (1992). Growing Cell Structures - A Self-Organizing Network in k Dimensions. Artificial Neural Networks. North-Holland. Amsterdam, Vol. II, 1051 – 1056. Klein, F. (1923). Gesammelte Mathematische Abhandlungen. Springer. Berlin, Bd.III, 571 5 Kohonen, T. (1990). The self-organizing map. Proceedings of the IEEE, 78(9), 1464 – 1480. Linde, Y., Buzo, A., & Gray, R. M. (1980). An algorithm for vector quantizer design. IEEE Trans. Comm., 28, 84 – 95. Menger, K. (1968). Kurventheorie. Chelsea Pub Co, 347 – 360. Oja, E., Laaksonen, J., & Koskela, M. (1999). Application of Tree Structured SelfOrganizing Maps in Content-Based Image Retrieval. Proc. of the 9th Int. Conf. on ANN (ICANN’99), Vol. 1, 174 – 179. Peano, G. (1890). Sur une courbe, qui remplit toute une aire plane. Math. Ann., 36, 157 – 160. 6
9cs.NE
Gradient Descent Learns Linear Dynamical Systems Moritz Hardt∗ Tengyu Ma† Benjamin Recht‡ arXiv:1609.05191v1 [cs.LG] 16 Sep 2016 September 19, 2016 Abstract We prove that gradient descent efficiently converges to the global optimizer of the maximum likelihood objective of an unknown linear time-invariant dynamical system from a sequence of noisy observations generated by the system. Even though the objective function is non-convex, we provide polynomial running time and sample complexity bounds under strong but natural assumptions. Linear systems identification has been studied for many decades, yet, to the best of our knowledge, these are the first polynomial guarantees for the problem we consider. 1 Introduction Many learning problems are by their nature sequence problems where the goal is to fit a model that maps a sequence of input words x1 , . . . , xT to a corresponding sequence of observations y1 , . . . , yT . Text translation, speech recognition, time series prediction, video captioning and question answering systems, to name a few, are all sequence to sequence learning problems. For a sequence model to be both expressive and parsimonious in its parameterization, it is crucial to equip the model with memory thus allowing its prediction at time t to depend on previously seen inputs. Recurrent neural networks form an expressive class of non-linear sequence models. Through their many variants, such as long-short-term-memory [HS97], recurrent neural networks have seen remarkable empirical success in a broad range of domains. At the core, neural networks are typically trained using some form of (stochastic) gradient descent. Even though the training objective is non-convex, it is widely observed in practice that gradient descent quickly approaches a good set of model parameters. Understanding the effectiveness of gradient descent for non-convex objectives on theoretical grounds is a major open problem in this area. If we remove all non-linear state transitions from a recurrent neural network, we are left with the state transition representation of a linear dynamical system. Notwithstanding, the natural training objective for linear systems remains non-convex due to the composition of multiple linear operators in the system. If there is any hope of eventually understanding recurrent neural networks, it will be inevitable to develop a solid understanding of this special case first. To be sure, linear dynamical systems are important in their own right and have been studied for many decades independently of machine learning within the control theory community. Control theory provides a rich set techniques for identifying and manipulating linear systems. The learning problem in this context corresponds to “linear dynamical system identification”. Maximum ∗ Google. Email: [email protected] Princeton University. Email: [email protected]. Work performed at Google. Partially supported by Simons Award in Theoretical Computer Science, IBM PhD Fellowship, Dodds Fellowship and Siebel Scholarship. ‡ UC Berkeley. Email: [email protected]. Work performed at Google. † 1 likelihood estimation with gradient descent is a popular heuristic for dynamical system identification [Lju98]. In the context of machine learning, linear systems play an important role in numerous tasks. For example, their estimation arises as subroutines of reinforcement learning in robotics [LK13], location and mapping estimation in robotic systems [DWB06], and estimation of pose from video [RRD05]. In this work, we show that gradient descent efficiently minimizes the maximum likelihood objective of an unknown linear system given noisy observations generated by the system. More formally, we receive noisy observations generated by the following time-invariant linear system: ht+1 = Aht + Bxt (1.1) yt = Cht + Dxt + ξt Here, A, B, C, D are linear transformations with compatible dimensions and we denote by Θ = (A, B, C, D) the parameters of the system. The vector ht represents the hidden state of the model at time t. Its dimension n is called the order of the system. The stochastic noise variables {ξt } perturb the output of the system which is why the model is called an output error model in control theory. We assume the variables are drawn i.i.d. from a distribution with mean 0 and variance σ 2 . Throughout the paper we focus on controllable and externally stable systems. A linear system is externally stable (or equivalently bounded-input bounded-output stable) if and only if the spectral radius of A, denoted ρ(A), is strictly bounded by 1. Controllability is a mild non-degeneracy assumption that we formally define later. Without loss of generality, we further assume that the transformations B, C and D have bounded Frobenius norm. This can be achieved by a rescaling of the output variables. We assume we have N pairs of sequences (x, y) as training examples, n o S = (x(1) , y (1) ), . . . , (x(N ) , y (N ) ) . Each input sequence x ∈ RT of length T is drawn from a distribution and y is the corresponding output of the system above generated from an unknown initial state h. We allow the unknown initial state to vary from one input sequence to the next. This only makes the learning problem more challenging. Our goal is to fit a linear system to the observations. We parameterize our model in exactly the same way as (1.1). That is, for linear mappings (Â, B̂, Ĉ, D̂), the trained model is defined as: ĥt+1 = Âĥt + B̂xt , ŷt = Ĉ ĥt + D̂xt (1.2) The (population) risk of the model is obtained by feeding the learned system with the correct initial states and comparing its predictions with the ground truth in expectation over inputs and errors. Denoting by ŷt the t-th prediction of the trained model starting from the correct initial state b as a short hand for (Â, B̂, Ĉ, D̂), we formally define population risk that generated yt , and using Θ as: " # T X 1 2 b = f (Θ) kŷt − yt k (1.3) E {xt },{ξt } T t=1 Note that even though the prediction ŷt is generated from the correct initial state, the learning algorithm does not have access to the correct initial state for its training sequences. While the squared loss objective turns out to be non-convex, it has many appealing properties. Assuming the inputs xt and errors ξt are drawn independently from a Gaussian distribution, the corresponding population objective corresponds to maximum likelihood estimation. In this work, we make the weaker assumption that the inputs and errors are drawn independently from possibly 2 different distributions. The independence assumption is certainly idealized for some learning applications. However, in control applications the inputs can often be chosen by the controller rather than by nature. Moreover, the outputs of the system at various time steps are correlated through the unknown hidden state and therefore not independent even if the inputs are. 1.1 Our results We show that we can efficiently minimize the population risk using projected stochastic gradient descent. The bulk of our work applies to single-input single-output (SISO) systems meaning that inputs and outputs are scalars xt , yt ∈ R. However, the hidden state can have arbitrary dimension n. Every controllable SISO admits a convenient canonical form called controllable canonical form that we formally introduce later. In this canonical form, the transition matrix A is governed by n parameters a1 , . . . , an which coincide with the coefficients of the characteristic polynomial of A. The minimal assumption under which we might hope to learn the system is that the spectral radius of A is smaller than 1. However, the set of such matrices is non-convex and does not have enough structure for our analysis. We will therefore make additional assumptions. The assumptions we need differ between the case where we are trying to learn A with n parameter system, and the case where we allow ourselves to over-specify the trained model with n0 > n parameters. The former is sometimes called proper learning, while the latter is called improper learning. In the improper case, we are essentially able to learn any system with spectral radius less than 1 under a mild separation condition on the roots of the characteristic polynomial. Our assumption in the proper case is stronger and we introduce it next. 1.2 Proper learning Suppose that the state transition matrix A is given by parameters a1 , . . . , an and consider the polynomial q(z) = 1 + a1 z + a2 z 2 + · · · + an z n over the complex numbers C. We will require that the image of the unit circle on the complex plane under the polynomial q is contained in the Complex plane cone of complex numbers whose real part is larger than their absolute imaginary part. Formally, for all z ∈ C 1 such that |z| = 1, we require that <(q(z)) > |=(q(z))|. Here, <(z) and =(z) denote the real and imaginary part of z, respectively. We illustrate this condition in the figure on the right for a degree 4 system. 0 Our assumption has three important implications. First, it implies (via Rouché’s theorem) that the spectral radius of A is smaller than 1 and therefore ensures 1 the stability of the system. Second, the vectors satisfying n our assumption form a convex set in R . Finally, it en1 0 1 sures that the objective function is weakly quasi-convex, a condition we introduce later when we show that it enables stochastic gradient descent to make sufficient progress. √ We note in passing that our assumption can be satisfied via the `1 -norm constraint kak1 ≤ √ 2/2. Moreover, if we pick random Gaussian coefficients with expected norm bounded by o(1/ log n), then the resulting vector will satisfy our assumption with probability 1 − o(1). Roughly speaking, the assumption requires the roots of the characteristic polynomial p(z) = z n + a1 z n−1 + · · · + an are relatively dispersed inside the unit circle. (For comparison, on the other end of the spectrum, 3 the polynomial p(z) = (z − 0.99)n have all its roots colliding at the same point and doesn’t satisfy the assumption.) Theorem 1.1 (Informal). Under our assumption, projected stochastic gradient descent, when b with population risk given N sample sequence of length T , returns parameters Θ ! r 5 + σ 2 n3 n b ≤ f (Θ) + O . f (Θ) TN Recall that f (Θ) is the population risk of the optimal system, and σ 2 refers to the variance of the noise variables. We also assume that the inputs xt are drawn from a pairwise independent distribution with mean 0 and variance 1. Note, however, that this does not imply independence of the outputs as these are correlated by a common hidden state. The stated version of our result glosses over the fact that we need our assumption to hold with a small amount of slack; a precise version follows in Section 4. Our theorem establishes a polynomial convergence rate for stochastic gradient descent. Since each iteration of the algorithm only requires a sequence of matrix operations and an efficient projection step, the running time is polynomial, as well. Likewise, the sample requirements are polynomial since each iteration requires only a single fresh example. An important feature of this result is that the error decreases with both the length T and the number of samples N . Computationally, the projection step can be a bottleneck, although it is unlikely to be required in practice and may be an artifact of our analysis. 1.3 The power of over-parameterization Endowing the model with additional parameters compared to the ground truth turns out to be surprisingly powerful. We show that we can essentially remove the assumption we previously made in proper learning. The idea is simple. If p is the characteristic polynomial of A of degree n. We can find a system of order n0 > n such that the characteristic polynomial of its transition matrix becomes p · p0 for some polynomial p0 of order n0 − n. This means that to apply our result we only need the polynomial p · p0 to satisfy our assumption. At this point, we can choose p0 to be an approximation of the inverse p−1 . For sufficiently good approximation, the resulting polynomial p · p0 is close to 1 and therefore satisfies our assumption. Such an approximation exists generically for n0 = O(n) under mild non-degeneracy assumptions on the roots of p. In particular, any small random perturbation of the roots would suffice. Theorem 1.2 (Informal). Under a mild non-degeneracy assumption, stochastic gradient descent b corresponding to a system of order n0 = O(n) with population risk returns parameters Θ ! r 5 + σ 2 n3 n b ≤ f (Θ) + O f (Θ) , TN when given N sample sequences of length T . We remark that the idea we sketched also shows that, in the extreme, improper learning of linear dynamical systems becomes easy in the sense that the problem can be solved using linear regression against the outputs of the system. However, our general result interpolates between the proper case and the regime where linear regression works. We discuss in more details in Section 6.3. 4 1.4 Multi-input multi-output systems Both results we saw immediately extend to single-input multi-output (SIMO) systems as the dimensionality of C and D are irrelevant for us. The case of multi-input multi-output (MIMO) systems is more delicate. Specifically, our results carry over to a broad family of multi-input multi-output systems. However, in general MIMO systems no longer enjoy canonical forms like SISO systems. In Section 7, we introduce a natural generalization of controllable canonical form for MIMO systems and extend our results to this case. 1.5 Related work System identification is a core problem in dynamical systems and has been studied in depth for many years. The most popular reference on this topic is the text by Ljung [Lju98]. Nonetheless, the list of non-asymptotic results on identifying linear systems from noisy data is surprisingly short. Several authors have recently tried to estimate the sample complexity of dynamical system identification using machine learning tools [VK08, CW02, WC99]. All of these result are rather pessimistic with sample complexity bounds that are exponential in the degree of the linear system and other relevant quantities. Contrastingly, we prove that gradient descent has an associated polynomial sample complexity in all of these parameters. Moreover, all of these papers only focus on how well empirical risk approximates the true population risk and do not provide guarantees about any algorithmic schemes for minimizing the empirical risk. The only result to our knowledge which provides polynomial sample complexity for identifying linear dynamical systems is in Shah et al [SBTR12]. Here, the authors show that if certain frequency domain information about the linear dynamical system is observed, then the linear system can be identified by solving a second-order cone programming problem. This result is about improper learning only, and the size of the resulting system may be quite large, scaling as the (1 − ρ(A))−2 . As we describe in this work, very simple algorithms work in the improper setting when the system degree is allowed to be polynomial in (1 − ρ(A))−1 . Moreover, it is not immediately clear how to translate the frequency-domain results to the time-domain identification problem discussed above. Our main assumption about the image of the polynomial q(z) is an appeal to the theory of passive systems. A system is passive if the dot product between the input sequence ut and output sequence yt are strictly positive. Physically, this notion corresponds to systems that cannot create energy. For example, a circuit made solely of resistors, capacitors, and inductors would be a passive electrical system. If one added an amplifier to the internals of the system, then it would no longer be passive. The set of passive systems is a subset of the set of stable systems, and the subclass is somewhat easier to work with mathematically. Indeed, Megretski used tools from passive systems to provide a relaxation technique for a family of identification problems in dynamical systems [Meg08]. His approach is to lower bound a nonlinear least-squares cost with a convex functional. However, he does not prove that his technique can identify any of the systems, even asymptotically. Bazanella et al use a passivity condition to prove quasi-convexity of a cost function that arises in control design [BGMA08]. Building on this work, Eckhard and Bazanella prove a weaker version of Lemma 3.3 in the context of system identification [EB11], but no sample complexity or global convergence proofs are provided. 1.6 Proof overview The first important step in our proof is to develop population risk in Fourier domain where it is closely related to what we call idealized risk. Idealized risk essentially captures the `2 -difference between the transfer function of the learned system and the ground truth. The transfer function 5 is a fundamental object in control theory. Any linear system is completely characterized by its transfer function G(z) = C(zI − A)−1 B. In the case of a SISO, the transfer function is a rational function of degree n over the complex numbers and can be written as G(z) = s(z)/p(z). In the canonical form introduced in Section 1.7, the coefficients of p(z) are precisely the parameters that specify A. Moreover, z n p(1/z) = 1 + a1 z + a2 z 2 + · · · + an z n is the polynomial we encountered in the introduction. Under the assumption illustrated earlier, we show in Section 3 that the idealized risk is weakly quasi-convex (Lemma 3.3). Quasi-convexity implies that gradients cannot vanish except at the optimum of the objective function; we review this (mostly known) material in Section 2. In particular, this lemma implies that in principle we can hope to show that gradient descent converges to a global optimum. However, there are several important issues that we need to address. First, the result only applies to idealized risk, not our actual population risk objective. Therefore it is not clear how to obtain unbiased gradients of the idealized risk objective. Second, there is a subtlety in even defining a suitable empirical risk objective. The reason is that risk is defined with respect to the correct initial state of the system which we do not have access to during training. We overcome both of these problems. In particular, we design an almost unbiased estimator of the gradient of the idealized risk in Lemma 5.4 and give variance bounds of the gradient estimator (Lemma 5.5). Our results on improper learning in Section 6 rely on a surprisingly simple but powerful insight. We can extend the degree of the transfer function G(z) by extending both numerator and denominator with a polynomial u(z) such that G(z) = s(z)u(z)/p(z)u(z). While this results in an equivalent system in terms of input-output behavior, it can dramatically change the geometry of the optimization landscape. In particular, we can see that only p(z)u(z) has to satisfy the assumption of our proper learning algorithm. This allows us, for example, to put u(z) ≈ p(z)−1 so that p(z)u(z) ≈ 1, hence trivially satisfying our assumption. A suitable inverse approximation exists under light assumptions and requires degree no more than d = O(n). Algorithmically, there is almost no change. We simply run stochastic gradient descent with n + d model parameters rather than n model parameters. 1.7 Preliminaries For complex matrix (or vector, number) C, we use <(C) to denote the real part and =(C) the imaginary part, and C̄ the conjugate and C ∗ = C̄ > its conjugate transpose . We use | · | to denote the absolute value of a complex number c. For complex vector u and v, we use hu, vi = u∗ v to √ denote the inner product and kuk = u∗ u is the norm of u. For complexpmatrix A and B with same dimension, hA, Bi = tr(A∗ B) defines an inner product, and kAkF = tr(A∗ A) is the Frobenius norm. For a square matrix A, we use ρ(A) to denote the spectral radius of A, that is, the largest absolute value of the elements in the spectrum of A. We use In to denote the identity matrix with dimension n × n, and we drop the subscript when it’s clear from the context.We let ei denote the i-th standard basis vector. A SISO of order n is in controllable canonical form if A and B have the following form     0 1 0 ··· 0 0  0  0   0 1 · · · 0       ..  .. .. ..  .. A =  ... B = (1.4)   .  . . . .      0  0  0 0 ··· 1  1 −an −an−1 −an−2 · · · −a1 We will parameterize Â, B̂, Ĉ, D̂ accordingly. We will write A = CC(a) for brevity, where a is used to denote the unknown last row [−an , . . . , −a1 ] of matrix A. We will use â to denote 6 the corresponding training variables for a. Since here B is known, so B̂ is no longer a trainable parameter, and is forced to be equal to B. Moreover, C is a row vector and we use [c1 , · · · , cn ] to denote its coordinates (and similarly for Ĉ). A SISO is controllable if and only if the matrix [B | AB | A2 B | · · · | An−1 B] has rank n. This statement corresponds to the condition that all hidden states should be reachable from some initial condition and input trajectory. Any controllable system admits a controllable canonical form [HRS07]. For vector a = [an , . . . , a1 ], let pa (z) denote the polynomial pa (z) = z n + a1 z n−1 + · · · + an . (1.5) When a defines the matrix A that appears in controllable canonical form, then pa is precisely the characteristic polynomial of A. That is, pa (z) = det(zI − A). 2 Gradient descent and quasi-convexity It is known that under certain mild conditions (stochastic) gradient descent converges even on nonconvex functions to local minimum [GHJY15, LSJR16]. Though usually for concrete problems the challenge is to prove that there is no spurious local minimum other than the target solution. Here we introduce a condition similar to the quasi-convexity notion in [HLS15], which ensures that any point with vanishing gradient is the optimal solution . Roughly speaking, the condition says that at any point θ the negative of the gradient −∇f (θ) should be positively correlated with direction θ∗ −θ pointing towards the optimum. Our condition is slightly weaker than that in [HLS15] since we only require quasi-convexity and smoothness with respect to the optimum, and this (simple) extension will be necessary for our analysis. Definition 2.1 (Weak quasi-convexity). We say an objective function f is τ -weakly-quasi-convex (τ -WQC) over a domain B with respect to global minimum θ∗ if there is a positive constant τ > 0 such that for all θ ∈ B, ∇f (θ)> (θ − θ∗ ) ≥ τ (f (θ) − f (θ∗ )) . (2.1) We further say f is Γ-weakly-smooth if for for any point θ, k∇f (θ)k2 ≤ Γ(f (θ) − f (θ∗ )). Note that indeed any Γ-smooth convex function in the usual sense is O(Γ)-weakly-smooth. For a random vector X ∈ Rn , we define it’s variance to be Var[X] = E[kX − EXk2 ]. Definition 2.2. We call r(θ) an unbiased estimator of ∇f (θ) with variance V if it satisfies E[r(θ)] = ∇f (θ) and Var[r(θ)] ≤ V . Projected stochastic gradient descent over some closed convex set B with learning rate η > 0 refers to the following algorithm in which ΠB denotes the Euclidean projection onto B: for k = 0 to K − 1 : wk+1 = θk − ηr(θk ) θk+1 = ΠB (wk+1 ) return θj with j uniformly picked from 1, . . . , K (2.2) The following Proposition is well known for convex objective functions (corresponding to 1weakly-quasi-convex functions). We extend it (straightforwardly) to the case when τ -WQC holds with any positive constant τ . 7 Proposition 2.3. Suppose the objective function f is τ -weakly-quasi-convex and Γ-weakly-smooth, and r(·) is an unbiased estimator for ∇f (θ) with variance V . Moreover, suppose the global minimum θ∗ belongs to B, and the initial point θ0 satisfies kθ0 −θ∗ k ≤ R. Then projected gradient descent (2.2) with a proper learning rate returns θK in K iterations with expected error ( √ )! ΓR2 R V f (θK ) ≤ O max , √ . τ 2K τ K Remark 1. It’s straightforward to see (from the proof) that the algorithm tolerates inverse exponential in√the  n bias ogradient estimator. Technically, suppose E[r(θ)] = ∇f (θ) ± ζ then f (θK ) ≤ ΓR2 R√ V O max τ 2 K , τ K + poly(K) · ζ. Throughout the paper, we assume that the error that we are shooting for is inverse polynomial and therefore the effect of inverse exponential bias is negligible. We defer the proof of Proposition 2.4 to Appendix A which is a simple variation of the standard convergence analysis of stochastic gradient descent (see, for example, [Bot98]). Finally, we note that the sum of two quasi-convex functions may no longer be quasi-convex. However, if a sequence functions is τ -WQC with respect to a common point θ∗ , then their sum is also τ -WQC. This follows from the linearity of gradient operation. Proposition 2.4. Suppose functions f1 , . . . , fn are individually τ -weakly-quasi-convex in B with ∗ respect w1 , . . . , wn the linear combination Pnto a common global minimum θ , then for non-negative f = i=1 wi fi is also τ -weakly-quasi-convex with respect to θ∗ in B. 3 Population risk in frequency domain We next establish conditions under which risk is weakly-quasi-convex. Our strategy is to first b by what we call idealized risk. This approximation of the approximate the risk functional f (Θ) objective function is fairly straightforward; we justify it toward the end of the section. We can show that  b ≈ kD − D̂k2 + P∞ Ĉ Âk B − CAk B 2 . (3.1) f (Θ) k=0 The leading term kD − D̂k2 is convex in D̂ which appears nowhere else in the objective. It therefore doesn’t affect the convergence of the algorithm (up to lower order terms) by virtue of Proposition 2.4, and we restrict our attention to the remaining terms. Definition 3.1 (Idealized risk). We define the idealized risk as g(Â, Ĉ) = ∞  X Ĉ Âk B − CAk B 2 . (3.2) k=0 We now use basic concepts from control theory (see [HRS07, Hes09] for more background) to express the idealized risk (3.2) in Fourier domain. The transfer function of the linear system is G(z) = C(zI − A)−1 B . (3.3) Note that G(z) is a rational function over the complex numbers of degree n and hence we s(z) can find polynomials s(z) and p(z) such that G(z) = p(z) , with the convention that the leading 8 coefficient of p(z) is 1. In controllable canonical form (1.4), the coefficients of p will correspond to the last row of the A, while the coefficients of s correspond to the entries of C. Also note that G(z) = ∞ X z −t CAt−1 B = t=1 ∞ X z −t rt−1 t=1 The sequence r = (r0 , r1 , . . . , rt , . . .) = (CB, CAB, . . . , CAt B, . . .) is called the impulse response of the linear system. The behavior of a linear system is uniquely determined by the impulse response and therefore by G(z). Analogously, we denote the transfer function of the learned system by b G(z) = Ĉ(zI − Â)−1 B = ŝ(z)/p̂(z) . The idealized risk (3.2) is only a function of the impulse b response r̂ of the learned system, and therefore it is only a function of G(z). For future reference, we note that by some elementary calculation (see Lemma B.1), we have G(z) = C(zI − A)−1 B = zn c1 + · · · + cn z n−1 , + a1 z n−1 + · · · + an (3.4) which implies that s(z) = c1 + · · · + cn z n−1 and p(z) = z n + a1 z n−1 + · · · + an . With these definitions in mind, we are ready to express idealized risk in Fourier domain. Proposition 3.2. Suppose pâ (z) has all its roots inside unit circle, then the idealized risk g(â, Ĉ) can be written in the Fourier domain as Z 2π 2 b iθ ) − G(eiθ ) dθ . g(Â, Ĉ) = G(e 0 b iθ ) the Fourier Proof. Note that G(eiθ ) is the Fourier transform of the sequence {rk } and so is G(e 1 transform of r̂k . Therefore by Parseval’ Theorem, we have that g(Â, Ĉ) = ∞ X Z 2 kr̂k − rk k = b iθ ) − G(eiθ )|2 dθ . |G(e 0 k=0 3.1 2π Quasi-convexity of the idealized risk Now that we have a convenient expression for risk in Fourier domain, we can prove that the idealized risk g(Â, Ĉ) is weakly-quasi-convex when â is not so far from the true a in the sense that pa (z) and p̂a (z) have an angle less than π/2 for every z on the unit circle. We will use the convention that a and â refer to the parameters that specify A and Â, respectively. Lemma 3.3. For τ > 0 and every Ĉ, the idealized risk g(Â, Ĉ) is τ -weakly-quasi-convex over the domain     pa (z) n Nτ (a) = â ∈ R : < ≥ τ /2, ∀ z ∈ C, s.t. |z| = 1 . (3.5) pâ (z) b b Proof. We first analyze a single term h = |G(z) − G(z)|2 . Recall that G(z) = ŝ(z)/p̂(z) where n n−1 p̂(z) = pâ (z) = z + â1 z + · · · + ân . Note that z is fixed and h is a function of â and Ĉ. Then it is straightforward to see that     ∂h 1 ŝ(z) s(z) ∗ = 2< − . (3.6) ∂ŝ(z) p̂(z) p̂(z) p(z) 1 The Fourier transform exists since krk k2 = kĈ Âk B̂k2 ≤ kĈkkÂk kkB̂k ≤ cρ(Â)k where c doesn’t depend on k and ρ(Â) < 1. 9 and ∂h = −2< ∂ p̂(z)  ŝ(z) p̂(z)2  ŝ(z) s(z) − p̂(z) p(z) ∗  . (3.7) Since ŝ(z) and p̂(z) are linear in Ĉ and â respectively, by chain rule we have that h ∂h ∂h ∂h ∂ p̂(z) ∂h ∂ŝ(z) , â − ai + h , Ĉ − Ci = h , â − ai + h , Ĉ − Ci ∂â ∂ p̂(z) ∂â ∂ŝ(z) ∂ Ĉ ∂ Ĉ ∂h ∂h = (p̂(z) − p(z)) + (ŝ(z) − s(z)) . ∂ p̂(z) ∂ŝ(z) Plugging the formulas (3.6) and (3.7) for ∂h ∂ŝ(z) and ∂h ∂ p̂(z) into the equation above, we obtain that  −ŝ(z)(p̂(z) − p(z)) + p̂(z)(ŝ(z) − s(z)) p̂(z)2     ŝ(z)p(z) − s(z)p̂(z) ŝ(z) s(z) ∗ = 2< − p̂(z)2 p̂(z) p(z) ) ( p(z) ŝ(z) s(z) 2 − = 2< p̂(z) p̂(z) p(z)   2 p(z) b G(z) − G(z) . = 2< p̂(z) ∂h ∂h h , â − ai + h , Ĉ − Ci = 2< ∂â ∂ Ĉ  ŝ(z) s(z) − p̂(z) p(z) ∗  o n b Hence h = |G(z) − G(z)|2 is τ -weakly-quasi-convex with τ = 2 min|z|=γ < p(z) p̂(z) . This implies our claim, since by Proposition 3.2, the idealized risk g is convex combination of functions of the b form |G(z) − G(z)|2 for |z| = 1. Moreover, Proposition 2.4 shows convex combination preserves quasi-convexity. For future reference, we also prove that the idealized risk is O(n2 /τ14 )-weakly smooth. Lemma 3.4. The idealized risk g(Â, Ĉ) is Γ-weakly smooth with Γ = O(n2 /τ14 ). Proof. By equation (3.7) and the chain rule we get that ∂g ∂ Ĉ Z = T b ∂|G(z) − G(z)|2 ∂p(z) · dz = ∂p(z) ∂ Ĉ  Z 2< T 1 p̂(z)  ŝ(z) s(z) − p̂(z) p(z) ∗  · [1, . . . , z n−1 ]dz . therefore we can bound the norm of the gradient by ! Z  Z ∂g 2 ŝ(z) s(z) 2 1 2 n−1 2 ≤ − dz · 4k[1, . . . , z ]k · | | dz ≤ O(n/τ12 ) · g(Â, Ĉ) . p(z) p(z) ∂ Ĉ T p̂(z) T Similarly, we could show that 3.2 ∂g ∂â 2 ≤ O(n2 /τ12 ) · g(Â, Ĉ). Justifying idealized risk We need to justify the approximation we made in Equation (3.1). 10 Lemma 3.5. Assume that ξt and xt are drawn i.i.d. from an arbitrary distribution with mean 0 b can be written as, and variance 1. Then the population risk f (Θ) 2 b = (D̂ − D) + f (Θ) T −1  X k=1 k 1− T  Ĉ Âk−1 B − CAk−1 B 2 + σ2 . (3.8) Proof of Lemma 3.5. Under the distributional assumptions on ξt and xt , we can calculate the objective functions above analytically. We write out yt , ŷt in terms of the inputs, yt = Dxt + t−1 X t−k−1 CA t−1 Bxk + CA h0 + ξt , ŷt = D̂xt + k=1 t−1 X Ĉ Ât−k−1 B̂xk + CAt−1 h0 . k=1 Therefore, using the fact that xt ’s are independent and with mean 0 and covariance I, the expectation of the error can be calculated (formally by Claim B.2),   Pt−1 2 2 E kŷt − yt k = kD̂ − DkF + k=1 Ĉ Ât−k−1 B̂ − CAt−k−1 B 2 F + E[kξt k2 ] . 2 F + σ2 . (3.9) Using E[kξt k2 ] = σ 2 , it follows that b = kD̂ − Dk2F + PT −1 1 − f (Θ) k=1 k T  Ĉ Âk−1 B̂ − CAk−1 B (3.10) Recall that under the controllable canonical form (1.4), B = en is known and therefore B̂ = B is no longer a variable. We use â for the training variable corresponding to a. Then the expected objective function (3.10) simplifies to b = (D̂ − D)2 + PT −1 1 − f (Θ) k=1 k T  Ĉ Âk−1 B − CAk−1 B 2 . The previous lemma does not yet control higher order contributions present in the idealized risk. This requires additional structure that we introduce in the next section. 4 Effective relaxations of spectral radius The previous section showed quasi-convexity of the idealized risk. However, several steps are missing towards showing finite sample guarantees for stochastic gradient descent. In particular, we will need to control the variance of the stochastic gradient at any system that we encounter in the training. For this purpose we formally introduce our main assumption now and show that it serves as an effective relaxation of spectral radius. This results below will be used for proving convergence of stochastic gradient descent in Section 5. Consider the following convex region C in the complex plane, C = {z : <z ≥ (1 + τ0 )|=z|} ∩ {z : τ1 < <z < τ2 } . (4.1) where τ0 , τ1 , τ2 > 0 are constants that are considered as fixed constant throughout the paper. Our bounds will have polynomial dependency on these parameters. Definition 4.1. We say a polynomial p(z) is α-acquiescent if {p(z)/z n : |z| = α} ⊆ C. A linear system with transfer function G(z) = s(z)/p(z) is α-acquiescent if the denominator p(z) is. 11 The set of coefficients a ∈ Rn defining acquiescent systems form a convex set. Formally, for a positive α > 0, define the convex set Bα ⊆ Rn as  Bα = a ∈ Rn : {pa (z)/z n : |z| = α} ⊆ C . (4.2)  We note that definition (4.2) is equivalent to the definition Bα = a ∈ Rn : {z n p(1/z) : |z| = 1/α} ⊆ C , which is the version that we used in introduction for simplicity. Indeed, we can verify the convexity of Bα by definition and the convexity of C: a, b ∈ Bα implies that pa (z)/z n , pb (z)/z n ∈ C and therefore, p(a+b)/2 (z)/z n = 12 (pa (z)/z n + pb (z)/z n ) ∈ C. We also note that the parameter α in the definition of acquiescence corresponds to the spectral radius of the companion matrix. In particular, an acquiescent system is stable for α < 1. Lemma 4.2. Suppose a ∈ Bα , then the roots of polynomial pa (z) have magnitudes bounded by α. Therefore the controllable canonical form A = CC(a) defined by a has spectral radius ρ(A) < α. Proof. Define holomorphic function f (z) = z n and g(z) = pa (z) = z n + a1 z n−1 + · · · + an . We apply the symmetric form of Rouche’s theorem [Est62] on the circle K = {z : |z| = α}. For any point z on K, we have that |f (z)| = αn , and that |f (z) − g(z)| = αn · |1 − pa (z)/z n |. Since a ∈ Bα , we have that pa (z)/z n ∈ C for any z with |z| = α. Observe that for any c ∈ C we have that |1 − c| < 1 + |c|, therefore we have that |f (z) − g(z)| = αn |1 − pa (z)/z n | < αn (1 + |pa (z)|/|z n |) = |f (z)| + |pa (z)| = |f (z)| + |g(z)| . Hence, using Rouche’s Theorem, we conclude that f and g have same number of roots inside circle K. Note that function f = z n has exactly n roots in K and therefore g have all its n roots inside circle K. The following lemma establishes the fact that Bα is a monotone family of sets in α. The proof follows from the maximum modulo principle of the harmonic functions <(z n p(1/z)) and =(z n p(1/z)). We defer the short proof to Section C.1. We remark that there are larger convex sets than Bα that ensure bounded spectral radius. However, in order to also guarantee monotonicity and the no blow-up property below, we have to restrict our attention to Bα . Lemma 4.3 (Monotonicity of Bα ). For any 0 < α < β, we have that Bα ⊂ Bβ . Our next lemma entails that acquiescent systems have well behaved impulse responses. Lemma 4.4 (No blow-up property). Suppose a ∈ Bα for some α ≤ 1. Then the companion matrix A = CC(a) satisfies ∞ X kα−k Ak Bk2 ≤ 2πnα−2n /τ12 . (4.3) k=0 Moreover, it holds that for any k ≥ 0, kAk Bk2 ≤ min{2πn/τ12 , 2πnα2k−2n /τ12 } . P iλk α−k Ak B be the Fourier transform of the series α−k Ak B. Proof of Lemma 4.4. Let fλ = ∞ k=0 e Then using Parseval’s Theorem, we have Z 2π Z 2π ∞ X −k k 2 2 kα A Bk = |fλ | dλ = |(I − α−1 eiλ A)−1 B|2 dλ 0 k=0 Z = 0 0 2π Pn |pa 2j j=1 α dλ (αe−iλ )|2 12 Z ≤ 0 2π n dλ. |pa (αe−iλ )|2 (4.4) where at the last step we used the fact that (I − wA)−1 B = 1 [w−1 , w−2 . . . , z −n ]> (see pa (w−1 ) |qa (α−1 eiλ )| ≥ τ1 , and therefore Lemma B.1), and that α ≤ 1. Since a ∈ Bα , we have that pa (αe−iλ ) = αn e−inλ q(eiλ /α) has magnitude at least τ1 αn . Plugging in this into equation (4.4), we conclude that Z 2π ∞ X n −k k 2 kα A Bk ≤ dλ ≤ 2πnα−2n /τ12 . |pa (αe−iλ )|2 0 k=0 Finally we establish the bound for kAk Bk2 . By Lemma 4.3, we have Bα ⊂ B1 for α ≤ 1. Therefore we can pick α = 1 in equation (4.3) and it still holds. That is, we have that ∞ X kAk Bk2 ≤ 2πn/τ12 . k=0 This also implies that kAk Bk2 ≤ 2πn/τ12 . 4.1 Efficiently computing the projection In our algorithm, we require a projection onto Bα . However, the only requirement of the projection step is that it projects onto a set contained inside Bα that also contains the true linear system. So a variety of subroutines can be used to compute this projection or an approximation. First, the explicit projection onto Bα is representable by a semidefinite program. This is because each of the three constrains can be checked by testing if a trigonometric polynomial is non-negative. A simple inner approximation can be constructed by requiring the constraints to hold on an a finite grid of size O(n). One can check that this provides a tight, polyhedral approximation to the set Bα , following an argument similar to Appendix C of Bhaskar et al [BTR13]. See Section F for more detailed discussion on why projection on a polytope suffices. Furthermore, sometimes we can replace the constraint by an `1 or `2 -constraint if we know that the system satisfies the corresponding assumption. Removing the projection step entirely is an interesting open problem. 5 Learning acquiescent systems Next we show that we can learn acquiescent systems. Theorem 5.1. Suppose the true system Θ is α-acquiescent and satisfies kCk ≤ 1. Then with N samples of length T ≥ Ω(n + 1/(1 − α)), stochastic gradient descent (Algorithm 1) with projection b = (Â, B̂, Ĉ, D̂) with population risk set Bα returns parameters Θ ! r 2 5 + σ 2 n3 n n b ≤ f (Θ) + O f (Θ) + , (5.1) N TN where O(·)-notation hides polynomial dependencies on 1/(1 − α), 1/τ0 , 1/τ1 , τ2 , and R = kak. Recall that T is the length of the sequence and N is the number of samples. The first term in the bound (5.1) comes from the smoothness of the population risk and the second comes from the variance of the gradient estimator of population risk (which will be described in detail below). 3 Note that ỹt is different from ŷt defined in equation (1.2) which is used to define the population risk: here ŷt is obtained from the (wrong) initial state h0 = 0 while ŷt is obtained from the correct initial state. 3 See Algorithm Box 3 for a detailed back-propagation algorithm that computes the gradient. 13 Algorithm 1 Projected stochastic gradient descent with partial loss For i = 0 to N : 1. Take a fresh sample ((x1 , . . . , xT ), (y1 , . . . , yT )). Let ỹt be the simulated outputs2 of system b on inputs x and initial states h0 = 0. Θ b = 2. Let TP Run stochastic gradient descent3 on loss function `((x, y), Θ) 1 = T /4. 1 ∂` ∂` ∂` 2 , and , GD = , we update t>T1 kỹt − yt k . Concretely, let GA = ∂â , GC = T −T1 ∂ Ĉ ∂ D̂ [â, Ĉ, D̂] → [â, Ĉ, D̂] − η[GA , GC , GD ] . b = (â, Ĉ, D̂) to the set Bα ⊗ Rn ⊗ R. 3. Project Θ An important (but not surprising) feature here is the variance scale in 1/T and therefore for long √ sequence actually we got 1/N convergence instead of 1/ N (for relatively small N ). We can further balance the variance of the estimator with the number of samples by breaking each long sequence of length T into Θ(T /n) short sequences of length Θ(n), and then run backpropagation (1) on these T N/n shorter sequences. This leads us to the following bound which gives the right dependency in T and N as we expected: T N should be counted as the true number of samples for the sequence-to-sequence model. b with Corollary 5.2. Under the assumption of Theorem 5.1, Algorithm 2 returns parameters Θ population risk ! r 5 + σ 2 n3 n b ≤ f (Θ) + O f (Θ) , TN where O(·)-notation hides polynomial dependencies on 1/(1 − α), 1/τ0 , 1/τ1 , τ2 , and R = kak. Algorithm 2 Projected stochastic gradient descent for long sequences Input: N samples sequences of length T b Output: Learned system Θ 1. Divide each sample of length T into T /(βn) samples of length βn where β is a large enough b constant. Then run algorithm 1 with the new samples and obtain Θ. We remark the the gradient computation procedure takes time linear in T n since one can use chain-rule (also called back-propagation) to compute the gradient efficiently . For completeness, Algorithm 3 gives a detailed implementation. Finally and importantly, we remark that although we defined the population risk as the expected error with respected to sequence of length T , actually our error bound generalizes to any longer (or shorter) sequences of length T 0  max{n, 1/(1 − α)}. By b (Lemma 3.5) and the fact that kCAk Bk decays exponentially for k  n the explicit formula for f (Θ) (Lemma 4.4), we can bound the population risk on sequences of different lengths. Concretely, let b denote the population risk on sequence of length T 0 , we have for all T 0  max{n, 1/(1 − α)}, fT 0 (Θ) ! r 5 + σ 2 n3 n b ≤ 1.1f (Θ) b + exp(−(1 − α) min{T, T 0 }) ≤ O fT 0 (Θ) . TN 14 We note that generalization to longer sequence does deserve attention. Indeed in practice, it’s usually difficult to train non-linear recurrent networks that generalize to longer sequences than the training data. Our proof of Theorem 5.1 simply consists of three parts: a) showing the idealized risk is quasiconvex in the convex set Bα (Lemma 5.3); b) designing an (almost) unbiased estimator of the gradient of the idealized risk (Lemma 5.4); c) variance bounds of the gradient estimator (Lemma 5.5). First of all, using the theory developed in Section 3 (Lemma 3.3 and Lemma 3.4), it is straightforward to verify that in the convex set Bα ⊗ Rn , the idealized risk is both weakly-quasi-convex and weakly-smooth. Lemma 5.3. Under the condition of Theorem 5.1, the idealized risk (3.2) is τ -weakly-quasi-convex in the convex set Bα ⊗ Rn and Γ-weakly smooth, where τ = Ω(τ0 τ1 /τ2 ) and Γ = O(n2 /τ14 ). Proof of Lemma 5.3. It suffices to show that for all â, a ∈ Bα , it satisfies â ∈ Nτ (a) for τ = Ω(τ0 τ1 /τ2 ). Indeed, by the monotonicity of the family of sets Bα (Lemma 4.3), we have that â, a ∈ B1 , which by definition means for every z on unit circle, pa (z)/z n , pâ (z)/z n ∈ C. By definition of C, for any point w, ŵ ∈ C, the angle φ between w and ŵ is at most π − Ω(τ0 ) and ratio of the magnitude is at least τ1 /τ2 , which implies that <(w/ŵ) = |w|/|ŵ| · cos(φ) ≥ Ω(τ0 τ1 /τ2 ). Therefore <(pa (z)/pâ (z)) ≥ Ω(τ0 τ1 /τ2 ), and we conclude that â ∈ Nτ (a). The smoothness bound was established in Lemma 3.4. Towards designing an unbiased estimator of the gradient, we note that there is a small caveat here that prevents us to just use the gradient of the empirical risk, as commonly done for other (static) problems. Recall that the population risk is defined as the expected risk with known initial state h0 , while in the training we don’t have access to the initial states and therefore using the naive approach we couldn’t even estimate population risk from samples without knowing the initial states. We argue that being able to handle the missing initial states is indeed desired: in most of the interesting applications h0 is unknown (or even to be learned). Moreover, the ability of handling unknown h0 allows us to break a very long sequence into shorter sequences, which helps us to obtain Corollary 5.2. Here the difficulty is essentially that we have a supervised learning problem with missing data h0 . We get around it by simply ignoring first T1 = Ω(T ) outputs of the system and setting the corresponding errors to 0. Since the influence of h0 to any outputs later than time k ≥ T1  max{n, 1/(1 − α)} is inverse exponentially small, we could safely assume h0 = 0 when the error earlier than time T1 is not taken into account. This small trick also makes our algorithm suitable to the cases when these early outputs are actually not observed. This is indeed an interesting setting, since in many sequence-to-sequence model [SVL14], there is no output in the first half fraction of iterations (of course these models have non-linear operation that we cannot handle). The proof of the correctness of the estimator is almost trivial and deferred to Section C. Lemma 5.4. Under the assumption of Theorem 5.1, suppose â, a ∈ Bα . Then in Algorithm 1, at each iteration, GA , GC are unbiased estimators of the gradient of the idealized risk (3.2) in the sense that:   ∂g ∂g , ± exp(−Ω((1 − α)T )) . E [GA , GC ] = ∂â ∂ Ĉ (5.2) Finally, we control the variance of the gradient estimator. 15 Lemma 5.5. The (almost) unbiased estimator (GA , GC ) of the gradient of g(Â, Ĉ) has variance bounded by  O n3 Λ2 /τ16 + σ 2 n2 Λ/τ14 Var [GA ] + Var [GC ] ≤ . T where Λ = O(max{n, 1/(1 − α) log 1/(1 − α)}). Note that Lemma 5.5 does not directly follow from the Γ-weakly-smoothness of the population b is also Γ-smooth for every sample. risk, since it’s not clear whether the loss function `((x, y), Θ) Moreover, even if it could work out, from smoothness the variance bound can be only as small as Γ2 , while the true variance scales linearly in 1/T . Here the discrepancy comes from that smoothness implies an upper bound of the expected squared norm of the gradient, which is equal to the variance plus the expected squared mean. Though typically for many other problems variance is on the same order as the squared mean, here for our sequence-to-sequence model, actually the variance decreases in length of the data, and therefore the bound of variance from smoothness is very pessimistic. We bound directly the variance instead. It’s tedious but very simple in spirit. We mainly need Lemma 4.4 to control various difference sums that shows up from calculating the expectation. The only tricky part is to obtain the 1/T dependency which corresponds to the cancellation of the contribution from the cross terms. In the proof we will basically write out the variance as a (complicated) function of Â, Ĉ which consists of sums of terms involving (Ĉ Âk B − CAk B) and Âk B. We control these sums using Lemma 4.4. The proof is deferred to Section C. Finally we are ready to prove Theorem 5.1. We essentially just combine Lemma 5.3, Lemma 5.4 and Lemma 5.5 with the generic convergence Proposition 2.3. This will give us low error in idealized risk and then we relate the idealized risk to the population risk. Proof of Theorem 5.1. We consider g 0 (Â, Ĉ, D̂) = (D̂ − D)2 + g(Â, Ĉ), an extended version of the idealized risk which takes the contribution of D̂ into account. By Lemma 5.4 we have that Algorithm 1 computes GA , GC which are almost unbiased estimators of the gradients of g 0 up to negligible error exp(−Ω((1 − α)T )), and by Lemma C.2 we have GD is an unbiased estimator of g 0 with respect to D̂. Moreover by Lemma 5.5, these unbiased estimator has total variance O(n5 +σ 2 n3 ) V = where O(·) hides dependency on τ1 and (1 − α). Applying Proposition 2.3 (which T only requires an unbiased estimator of the of g 0 ), we obtain that after T iterations, we  gradient q 2 5 2 n3 b ≤ converge to a point with g 0 (â, Ĉ, D̂) ≤ O nN + n +σ . Then, by Lemma 3.5 we have f (Θ) TN   q n2 n5 +σ 2 n3 0 2 0 + f (Θ) which completes the proof. g (â, Ĉ, D̂) + σ = g (â, Ĉ, D̂) + f (Θ) ≤ O N + TN 6 The power of improper learning We observe an interesting and important fact about the theory in Section 5: it solely requires a condition on the characteristic function p(z). This suggests that the geometry of the training objective function depends mostly on the denominator of the transfer function, even though the system is uniquely determined by the transfer function G(z) = s(z)/p(z). This might seem to be an undesirable discrepancy between the behavior of the system and our analysis of the optimization problem. However, we can actually exploit this discrepancy to design improper learning algorithms that succeed under much weaker assumptions. We rely on the following simple observation about the s(z) . For an arbitrary polynomial u(z) of leading coefficient 1, we invariance of a system G(z) = p(z) 16 can write G(z) as G(z) = s̃(z) s(z)u(z) = , p(z)u(z) p̃(z) where s̃ = su and p̃ = pu. Therefore the system s̃(z)/p̃(z) has identical behavior as G. Although this is a redundant representation of G(z), it should counted as an acceptable solution. After all, learning the minimum representation4 of linear system is impossible in general. In fact, we will encounter an example in Section 6.1. While not changing the behavior of the system, the extension from p(z) to p̃(z), does affect the geometry of the optimization problem. In particular, if p̃(z) is now an α-acquiescent characteristic polynomial as defined in Definition 4.1, then we could find it simply using stochastic gradient descent as shown in Section 5. Observe that we don’t require knowledge of u(z) but only its existence. Denoting by d the degree of u, the algorithm itself is simply stochastic gradient descent with n + d model parameters instead of n. Our discussion motivates the following definition. Definition 6.1. A polynomial p(z) of degree n is α-acquiescent by extension of degree d if there exists a polynomial u(z) of degree d and leading coefficient 1 such that p(z)u(z) is α-acquiescent. For a transfer function G(z), we define it’s H2 norm as kGk2H2 1 = 2π Z 2π |G(eiθ )|2 dθ . 0 We assume (with loss of generality) that the true transfer function G(z) has bounded H2 norm, that is, kGkH2 ≤ 1. This can be achieve by a rescaling5 of the matrix C. Theorem 6.2. Suppose the true system has transfer function G(z) = s(z)/p(z) with a characteristic function p(z) that is α-acquiescent by extension of degree d, and kGkH2 ≤ 1, then projected stochastic gradient descent with m = n + d states (that is, Algorithm 2 with m states) returns a b with population risk system Θ ! r 5 + σ 2 m3 m b ≤O f (Θ) . TK where the O(·) notation hides polynomial dependencies on τ0 , τ1 , τ2 , 1/(1 − α). The theorem follows directly from Corollary 5.2 (with some additional care about the scaling. Proof of Theorem 6.2. Let p̃(z) = p(z)u(z) be the acquiescent extension of p(z). Since τ2 ≥ |u(z)p(z)| = |p̃(z)| ≥ τ0 on the unit circle, we have that |s̃(z)| = |s(z)||u(z)| = s(z) · Oτ (1/p(z)). Therefore we have that s̃(z) satisfies that ks̃kH2 = Oτ (ks(z)/p(z)kH2 ) = Oτ (kG(z)kH2 ) ≤ Oτ (1). That means that the vector C that determines the coefficients of s̃ satisfies that kCk ≤ Oτ (1), since for a polynomial h(z) = b0 + · · · + bn−1 z n−1 , we have khkH2 = kbk. Therefore we can apply Corollary 5.2 to complete the proof. In the rest of this section, we discuss in subsection 6.1 the instability of the minimum representation in subsection, and in subsection 6.2 we show several examples where the characteristic function p(z) is not α-acquiescent but is α-acquiescent by extension with small degree d. 4 The minimum representation of a transfer function G(z) is defined as the representation G(z) = s(z)/p(z) with p(z) having minimum degree. 5 In fact, this is a natural scaling that makes comparing error easier. Recall that the population risk is essentially kĜ − GkH2 , therefore rescaling C so that kGkH2 = 1 implies that when error  1 we achieve non-trivial performance. 17 As a final remark, the examples illustrated in the following sub-sections may be far from optimally analyzed. It is beyond the scope of this paper to understand the optimal condition under which p(z) is acquiescent by extension. 6.1 Instability of the minimum representation We begin by constructing a contrived example where the minimum representation of G(z) is not stable at all and as a consequence one can’t hope to recover the minimum representation of G(z). s(z) s0 (z) z n −0.8−n 1 0 Consider G(z) = p(z) := (z−0.1)(z n −0.9−n ) and G (z) = p0 (z) := z−0.1 . Clearly these are the minimum representations of the G(z) and G0 (z), which also both satisfy acquiescence. On the one hand, the characteristic polynomial p(z) and p0 (z) are very different. On the other hand, the transfer functions G(z) and G0 (z) have almost the same values on unit circle up to exponentially small error, 0.8−n − 0.9−n |G(z) − G0 (z)| ≤ ≤ exp(−Ω(n)) . (z − 0.1)(z − 0.9−n ) Moreover, the transfer functions G(z) and Ĝ(z) are on the order of Θ(1) on unit circle. These suggest that from an (inverse polynomially accurate) approximation of the transfer function G(z), we cannot hope to recover the minimum representation in any sense, even if the minimum representation satisfies acquiescence. 6.2 Power of improper learning in various cases We illustrate the use of improper learning through various examples below. 6.2.1 Example: artificial construction We consider a simple contrived example where improper learning can help us learn the transfer function dramatically. We will show an example of characteristic function which is not 1-acquiescent but (α + 1)/2-(α + 1)/2-acquiescent by extension of degree 3. Let n be a large enough integer and α be a constant. Let J = {1, n − 1, n} and ω = e2πi/n , and Q 3 j then define p(z) = z j∈[n],j ∈J / (z − αω ). Therefore we have that p(z)/z n = z 3 Y (1 − αω j /z) = j∈[n],j∈J 1 − αn /z n (1 − ω/z)(1 − ω −1 /z)(1 − 1/z) (6.1) Taking z = e−iπ/2 we have that p(z)/z n has argument (phase) roughly −3π/4, and therefore it’s not in C, which implies that p(z) is not 1-acquiescent. On the other hand, picking u(z) = (z−ω)(z−1)(z−ω −1 ) as the helper function, from equation (6.1) we have p(z)u(z)/z n+3 = 1−αn /z n takes values inverse exponentially close to 1 on the circle with radius (α + 1)/2. Therefore p(z)u(z) is (α + 1)/2-acquiescent. 6.2.2 Example: characteristic function with separated roots A characteristic polynomial with well separated roots will be acquiescent by extension. Our bound will depend on the following quantity of p that characterizes the separateness of the roots. 18 Definition 6.3. For a polynomial h(z) of degree n with roots λ1 , . . . , λn inside unit circle, define the quantity Γ(·) of the polynomial h as: Γ(h) := X Q j∈[n] λnj . i6=j (λi − λj ) Lemma 6.4. Suppose p(z) is a polynomial of degree n with distinct roots inside circle with radius √ α. Let Γ = Γ(p), then p(z) is α-acquiescent by extension of degree d = O(max{(1 − α)−1 log( nΓ · kpkH2 ), 0}). Our main idea to extend p(z) by multiplying some polynomial u that approximates p−1 (in a relatively weak sense) and therefore pu will always take values in the set C. We believe the following lemma should be known though for completeness we provide the proof in Section D. Lemma 6.5 (Approximation of inverse of a polynomial). Suppose p(z) is a polynomial of degree n and leading coefficient 1 with distinct roots inside circle with radius α, and Γ = Γ(p). Then for 1 Γ d = O(max{( 1−α log (1−α)ζ , 0}), there exists a polynomial h(z) of degree d and leading coefficient 1 such that for all z on unit circle, z n+d − h(z) ≤ ζ . p(z) Proof of Lemma 6.4. Let γ = 1 − α. Using Lemma 6.5 with ζ = 0.5kpk−1 H∞ , we have that there 1 exists polynomial u of degree d = O(max{ 1−α log(ΓkpkH∞ ), 0}) such that z n+d − u(z) ≤ ζ . p(z) Then we have that p(z)u(z)/z n+d − 1 ≤ ζ|p(z)| < 0.5 . Therefore p(z)u(z)/z n+d ∈ Cτ0 ,τ1 ,τ2 for constant τ0 , τ1 , τ2 . Finally noting that for degree n polyno√ mial we have khkH∞ ≤ n · khkH2 , which completes the proof. 6.2.3 Example: Characteristic polynomial with random roots We consider the following generative model for characteristic polynomial of degree 2n. We generate n complex numbers λ1 , . . . , λn uniformly randomly on circle with radius α < 1, and take λi , λ̄i for i = 1, . . . , n as the roots of p(z). That is, p(z) = (z − λ1 )(z − λ̄1 ) . . . (z − λn )(z − λ̄n ). We show that with good probability (over the randomness of λi ’s), polynomial p(z) will satisfy the condition in subsection 6.2.2 so that it can be learned efficiently by our improper learning algorithm. Theorem 6.6. Suppose p(z) with random roots inside circle of radius α is generated from the process described above. Then with high probability over the choice of p, we have that Γ(p) ≤ e √n)) and kpkH ≤ exp(Õ(√n)). As a corollary, p(z) is α-acquiescent by extension of degree exp(O( 2 e O((1 − α)−1 n). Towards proving Theorem 6.6, we need the following lemma about the expected distance of two random points with radius ρ and r in log-space. 19 Lemma 6.7. Let x ∈ C be a fixed point with |x| = ρ, and λ uniformly drawn on the circle with radius r. Then E [ln |x − λ|] = ln max{ρ, r} . Proof. When r 6= ρ, let N be an integer and ω = e2iπ/N . Then we have that N 1 X ln |x − rω k | N →∞ N E[ln |x − λ| | r] = lim (6.2) k=1 P k The right hand of equation (6.2) can be computed easily by observing that N1 N k=1 ln |x − rω | = Q P N N 1 1 1 k N N k=1 (x − rω ) = N ln |x − r |. Therefore, when ρ > r, we have limN →∞ N k=1 ln |x − N ln rω k | = limN →∞ ρ + N1 ln |(x/ρ)N − (r/ρ)N | = ln ρ. On the other hand, when ρ < r, we have P k that limN →∞ N1 N k=1 ln |x − rω | = ln r. Therefore we have that E[ln |x − λ| | r] = ln(max ρ, r). For ρ = r, similarly proof (with more careful concern of regularity condition) we can show that E[ln |x − λ| | r] = ln r. Now we are ready to prove Theorem 6.6. Proof of Theorem 6.6. Fixing index i, and the choice of λi , we consider the random variable Yi = 2n P ln( Q |λ −λ|λi| |Q |λ −λ¯ | )n ln |λi |− j6=i ln |λi −λj |. By Lemma 6.7, we have that E[Yi ] = n ln |λi |− P j6=i i j j6=i i j j6=i E[ln |λi − λj |] = ln(1 − δ). Let Zj = ln |λi − λj |. Then we have that Zj are random variable with mean 0 and ψ1 -Orlicz norm bounded by 1 since E[eln |λi −λj | − 1] ≤ 1. Therefore by Bernstein inequality for sub-exponential tail random variable (for example, [LT13, Theorem 6.21]), we have P e √ e that with high probability (1 − n−10 ), it holds that j6=i Zj ≤ O( n) where O hides logarithmic e √n). factors. Therefore, with high probability, we have |Yi | ≤ O( Finally we take union bound overPall i ∈ [n], and obtain that with high probability, for ∀i ∈ e √n)). With similar technique, we can e √n), which implies that n exp(Yi ) ≤ exp(O( [n], |Yi | ≤ O( i=1 √ prove that kpkH2 ≤ exp(Õ( n). 6.2.4 Example: Passive systems We will show that with improper learning we can learn almost all passive systems, an important class of stable linear dynamical system as we discussed earlier. We start off with the definition of a strict-input passive system. Definition 6.8 (Passive System, c.f [KA10]). A SISO linear system is strict-input passive if and only if for some τ0 > 0 and any z on unit circle, <(G(z)) ≥ τ0 . In order to learn the passive system, we need to add assumptions in the definition of strict passivity. To make it precise, we define the following subsets of complex plane: For positive constant τ0 , τ1 , τ2 , define Cτ+0 ,τ1 ,τ2 = {z ∈ C : |z| ≤ τ2 , <(z) ≥ τ1 , <(z) ≥ τ0 |=(z)| } . (6.3) We say a transfer function G(z) = s(z)/p(z) is (τ0 , τ1 , τ2 )-strict input passive if for any z on unit circle we have G(z) ∈ Cτ+0 ,τ1 ,τ2 . Note that for small constant τ0 , τ1 and large constant τ2 , this basically means the system is strict-input passive. Now we are ready to state our main theorem in this subsection. We will prove that passive systems could be learned improperly with a constant factor more states (dimensions), assuming s(z) has all its roots strictly inside unit circles and Γ(s) ≤ exp(O(n)). 20 Theorem 6.9. Suppose G(z) = s(z)/p(z) is (τ0 , τ1 , τ2 )-strict-input passive. Moreover, suppose the roots of s(z) have magnitudes inside circle with radius α and Γ = Γ(s) ≤ exp(O(n)) and kpkH2 ≤ exp(O(n)). Then p(z) is α-acquiescent by extension of degree d = Oτ,α (n), and as a consequence we can learn G(z) with n + d states in polynomial time. Moreover, suppose in addition we assume that G(z) ∈ Cτ0 ,τ1 ,τ2 for every z on unit circle. Then p(z) is α-acquiescent by extension of degree d = Oτ,α (n). The proof of Theorem 6.9 is similar in spirit to that of Lemma 6.4, and is deferred to Section D. 6.3 Improper learning using linear regression In this subsection, we show that under stronger assumption than α-acquiescent by extension, we can improperly learn a linear dynamical system with linear regression, up to some fixed bias. The basic idea is to fit a linear function that maps [xk−` , . . . , xk ] to yk . This is equivalent to a dynamical system with ` hidden states and with the companion matrix A in (1.4) being chosen as a` = 1 and a`−1 = · · · = a1 = 0. In this case, the hidden states exactly memorize all the previous ` inputs, and the output is a linear combination of the hidden states. Equivalently, in the frequency space, this corresponds to fitting the transfer function G(z) = `−1 +···+c 1 s(z)/p(z) with a rational function of the form c1 z z `−1 = c1 z −(`−1) + · · · + cn . The following is a sufficient condition on the characteristic polynomial p(x) that guarantees the existence of such fitting, Definition 6.10. A polynomial p(z) of degree n is extremely-acquiescent by extension of degree d with bias ε if there exists a polynomial u(z) of degree d and leading coefficient 1 such that for all z on unit circle, p(z)u(z)/z n+d − 1 ≤ ε (6.4) We remark that if p(z) is 1-acquiescent by extension of degree d, then there exists u(z) such that p(z)u(z)/z n+d ∈ C. Therefore, equation (6.4) above is a much stronger requirement than acquiescence by extension.6 When p(z) is extremely-acquiescent, we see that the transfer function G(z) = s(z)/p(z) can be approximated by s(z)u(z)/z n+d up to bias ε. Let ` = n + d + 1 and s(z)u(z) = c1 z `−1 + · · · + c` . Then we have that G(z) can be approximated by the following dynamical system of ` hidden states with ε bias: we choose A = CC(a) with a` = 1 and a`−1 = · · · = a1 = 0, and C = [c1 , . . . , c` ]. As we have argued previously, such a dynamical system simply memorizes all the previous ` inputs, and therefore it is equivalent to linear regression from the feature [xk−` , . . . , xk ] to output yk . Proposition 6.11 (Informal). If the true system G(z) = s(z)/p(z) satisfies that p(z) is extremelyacquiescent by extension of degree d. Then using linear regression we can learn mapping from [xk−` , . . . , xk ] to yk with bias ε and polynomial sampling complexity. We remark that with linear regression the bias ε will only go to zero as we increase the length ` of the feature, but not as we increase the number of samples. Moreover, linear regression requires a stronger assumption than the improper learning results in previous subsections do. The latter can be viewed as an interpolation between the proper case and the regime where linear regression works. 6 We need (1−δ)-acquiescence by extension in previous subsections for small δ > 0, though this is merely additional technicality needed for the sample complexity. We ignore this difference between 1−δ-acquiescence and 1-acquiescence and for the purpose of this subsection 21 7 Learning multi-input multi-output (MIMO) systems We consider multi-input multi-output systems with the transfer functions that have a common denominator p(z), 1 G(z) = · S(z) (7.1) p(z) where S(z) is an `in × `out matrix with each entry being a polynomial with real coefficients of degree at most n and p(z) = z n + a1 z n−1 + · · · + an . Note that here we use `in to denote the dimension of the inputs of the system and `out the dimension of the outputs. Although a special case of a general MIMO system, this class of systems still contains many interesting cases, such as the transfer functions studied in [FHB01, FHB04], where G(z) is assumed P Ri to take the form G(z) = R0 + ni=1 z−λ , for λ1 , . . . , λn ∈ C with conjugate symmetry and Ri ∈ i ` ×` C out in satisfies that Ri = R̄j whenever λi = λ̄j . In order to learn the system G(z), we parametrize p(z) by its coefficients a1 , . . . , an and S(z) by the coefficients of its entries. Note that each entry of S(z) depends on n + 1 real coefficients and therefore the collection of coefficients forms a third order tensor of dimension `out × `in × (n + 1). It will be convenient to collect the leading coefficients of the entries of S(z) into a matrix of dimension `out × `in , named D, and the rest of the coefficients into a matrix of dimension `out × `in n, denoted by C. This will be particularly intuitive when a state-space representation is used to learn the system with samples as discussed later. We parameterize the training transfer function Ĝ(z) by â, Ĉ and D̂ using the same way. Let’s define the risk function in the frequency domain as, Z 2π 2 g(Â, Ĉ, D̂) = G(eiθ ) − Ĝ(eiθ ) dθ . (7.2) F 0 The following lemma is an analog of Lemma 3.3 for the MIMO case. Itss proof actually follows from a straightforward extension of the proof of Lemma 3.3 by observing that matrix S(z) (or Ŝ(z)) commute with scalar p(z) and p̂(z), and that Ŝ(z), p̂(z) are linear in â, Ĉ. Lemma 7.1. The risk function g(â, Ĉ) defined in (7.2) is τ -weakly-quasi-convex in the domain     pa (z) 0 n Nτ (a) = â ∈ R : < ≥ τ /2, ∀ z ∈ C, s.t. |z| = 1 ⊗ R`in ×`out ×n pâ (z) Finally, as alluded before, we use a particular state space representation for learning the system in time domain with example sequences. It is known that any transfer function of the form (7.1) can be realized uniquely by the state space system of the following special case of Brunovsky normal form [Bru70],     0 I`in 0 ··· 0 0   0 0 I`in ··· 0   ..    .    . . . .. . .. .. .. .. (7.3) A =  , B = ,   .    0    0 0 0 ··· I`in I`in −an I`in −an−1 I`in −an−2 I`in · · · −a1 I`in and, C ∈ R`out ×n`in , D ∈ R`out ×`in . The following Theorem is a straightforward extension of Corollary 5.2 and Theorem 6.2 to the MIMO case. 22 Theorem 7.2. Suppose transfer function G(z) of a MIMO system takes form (7.1), and has norm kGkH2 ≤ 1. If the common denominator p(z) is α-acquiescent by extension of degree d then b with projected stochastic gradient descent over the state space representation (7.3) will return Θ risk −1 b ≤ poly(n + d, σ, τ, (1 − α) ) . f (Θ) TN We note that since A and B are simply the tensor product of I`in with CC(a) and en , the no blow-up property (Lemma 4.4) for Ak B still remains true. Therefore to prove Theorem 7.2, we essentially only need to run the proof of Lemma 5.5 with matrix notation and matrix norm. We defer the proof to the full version. Acknowledgments We thank Amir Globerson, Alexandre Megretski, Pablo A. Parrilo, Yoram Singer and Ruixiang Zhang for helpful discussions. We are indebted to Mark Tobenkin for pointers to relevant prior work. We also thank Alexandre Megretski for helpful feedback, insights into passive systems and suggestions on how to organize Section 3. References [BGMA08] Alexandre S. Bazanella, Michel Gevers, Ljubisa Miskovic, and Brian D.O. Anderson. Iterative minimization of h2 control performance criteria. Automatica, 44:2549–2559, 2008. [Bot98] Léon Bottou. On-line learning in neural networks. chapter On-line Learning and Stochastic Approximations, pages 9–42. Cambridge University Press, New York, NY, USA, 1998. [Bru70] Pavol Brunovsky. A classification of linear controllable systems. 06(3):(173)–188, 1970. [BTR13] Badri Narayan Bhaskar, Gongguo Tang, and Benjamin Recht. Atomic norm denoising with applications to line spectral estimation. IEEE Transactions on Signal Processing, 61(23):5987–5999, 2013. [CW02] M. C. Campi and Erik Weyer. Finite sample properties of system identification methods. IEEE Transactions on Automatic Control, 47(8):1329–1334, 2002. [DWB06] Hugh Durrant-Whyte and Tim Bailey. Simultaneous localization and mapping: part i. Robotics & Automation Magazine, IEEE, 13(2):99–110, 2006. [EB11] Diego Eckhard and Alexandre Sanfelice Bazanella. On the global convergence of identification of output error models. In Proc. 18th IFAC World congress, 2011. [Est62] T. Estermann. Complex numbers and functions. Athlone Press, 1962. [FHB01] Maryam Fazel, Haitham Hindi, and Stephen P Boyd. A rank minimization heuristic with application to minimum order system approximation. In Proc. American Control Conference, volume 6, pages 4734–4739. IEEE, 2001. 23 Kybernetika, [FHB04] Maryam Fazel, Haitham Hindi, and S Boyd. Rank minimization and applications in system theory. In Proc. American Control Conference, volume 4, pages 3273–3278. IEEE, 2004. [GHJY15] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points - online stochastic gradient for tensor decomposition. In Proc. 28th COLT, pages 797–842, 2015. [Hes09] Joao P Hespanha. Linear systems theory. Princeton university press, 2009. [HLS15] E. Hazan, K. Y. Levy, and S. Shalev-Shwartz. Beyond Convexity: Stochastic QuasiConvex Optimization. ArXiv e-prints, July 2015. [HRS07] Christiaan Heij, André Ran, and Freek van Schagen. Introduction to mathematical systems theory : linear systems, identification and control. Birkhäuser, Basel, Boston, Berlin, 2007. [HS97] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. [KA10] Nicholas Kottenstette and Panos J Antsaklis. Relationships between positive real, passive dissipative, & positive systems. In American Control Conference (ACC), 2010, pages 409–416. IEEE, 2010. [Lju98] Lennart Ljung. System Identification. Theory for the user. Prentice Hall, Upper Saddle River, NJ, 2nd edition, 1998. [LK13] Sergey Levine and Vladlen Koltun. Guided policy search. In Proceedings of The 30th International Conference on Machine Learning, pages 1–9, 2013. [LSJR16] J. D. Lee, M. Simchowitz, M. I. Jordan, and B. Recht. Gradient Descent Converges to Minimizers. ArXiv e-prints, February 2016. [LT13] Michel Ledoux and Michel Talagrand. Probability in Banach Spaces: isoperimetry and processes, volume 23. Springer Science & Business Media, 2013. [Meg08] Alexandre Megretski. Convex optimization in robust identification of nonlinear feedback. In Proceedings of the 47th Conference on Decision and Control, 2008. [RRD05] Ali Rahimi, Ben Recht, and Trevor Darrell. Learning appearance manifolds from video. In Proc. IEEE CVPR, 2005. [SBTR12] Parikshit Shah, Badri Narayan Bhaskar, Gongguo Tang, and Benjamin Recht. Linear system identification via atomic norm regularization. In Proceedings of the 51st Conference on Decision and Control, 2012. [Sch41] A. C. Schaeffer. Inequalities of a. markoff and s. bernstein for polynomials and related functions. Bull. Amer. Math. Soc., 47(8):565–579, 08 1941. [SVL14] Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proc. 27th NIPS, pages 3104–3112, 2014. [VK08] M. Vidyasagar and Rajeeva L. Karandikar. A learning theory approach to system identification and stochastic adaptive control. Journal of Process Control, 18(3):421– 430, 2008. 24 [WC99] A Erik Weyer and M. C. Campi. Finite sample properties of system identification methods. In Proceedings of the 38th Conference on Decision and Control, 1999. Background on optimization The proof below uses the standard analysis of gradient descent for non-smooth objectives and demonstrates that the argument still works for weakly-quasi-convex functions. Proof of Proposition 2.3. We start by using the weakly-quasi-convex condition and then the rest follows a variant of the standard analysis of non-smooth projected sub-gradient descent7 . We conditioned on θk , and have that τ (f (θk ) − f (θ∗ )) ≤ ∇f (θk )> (θk − θ∗ ) = E[r(θk )> (θk − θ∗ ) | θk ]   1 ∗ = E (θk − wk+1 )(θk − θ ) | θk η     1 ∗ 2 2 ∗ 2 = E kθk − wk+1 k | θk + kθk − θ k − E kwk+1 − θ k | θk η   1   = η E kr(θk )k2 + kθk − θ∗ k2 − E kwk+1 − θ∗ k2 | θk η (A.1) where the first inequality uses weakly-quasi-convex and the rest of lines are simply algebraic manipulations. Since θk+1 is the projection of wk+1 to B and θ∗ belongs to B, we have kwk+1 − θ∗ k ≥ kθk+1 − θ∗ k. Together with (A.1), and   2 ∗ 2 E kr(θk )k = k∇f (θk )k + Var[r(θk )] ≤ Γ(f (θk ) − f (θ )) + V, we obtain that τ (f (θk ) − f (θ∗ )) ≤ ηΓ(f (θk ) − f (θ∗ )) + ηV +   1 kθk − θ∗ k2 − E kθk+1 − θ∗ k2 | θk . η Taking expectation over all the randomness and summing over k we obtain that     K−1 X 1 1 1 1 2 ∗ ∗ 2 ηKV + kθ0 − θ k ≤ ηKV + R . E [f (θk ) − f (θ )] ≤ τ − ηΓ η τ − ηΓ η k=0 2 2 Γ where we use the assumption that kθ0 − θ∗ k ≤ R. Suppose K ≥ 4R , then we take η = √VRK . V τ2 Therefore we have that τ − ηΓ ≥ τ /2 and therefore √ √ K−1 X 4R V K ∗ . (A.2) E [f (θk ) − f (θ )] ≤ τ k=0 4R2 Γ2 , V τ2 τ we pick η = 2Γ and obtain that   K−1 X 2 τ KV 2ΓR2 8ΓR2 ∗ + ≤ . E [f (θk ) − f (θ )] ≤ τ 2Γ τ τ2 On the other hand, if K ≤ (A.3) k=0 Therefore using equation (A.3) and (A.2) we obtain that when choosing η properly according to K as above, ( √ ) 2 4R V 8ΓR ∗ , √ . E [f (θk ) − f (θ )] ≤ max τ 2K τ K k∈[K] 7 Although we used weak smoothness to get a slightly better bound 25 B Toolbox Lemma B.1. Let B = en ∈ Rn×1 and λ ∈ [0, 2π], w ∈ C. Suppose A with ρ(A) · |w| < 1 has the controllable canonical form A = CC(a). Then  −1  w −2   1 w  −1 (I − wA) B =  .  pa (w−1 )  ..  w−n where pa (x) = xn + a1 xn−1 + · · · + an is the characteristic polynomial of A. Proof. let v = (I − wA)−1 B then we have (I − wA)v = B. form  1 −w 0  0 1 −w   .. . .. . I − wA =  . . .   0 0 0 an w an−1 w an−2 w Note that B = en , and I − wA is of the  ··· 0  ··· 0   . .. .. (B.1)  .   ··· −w · · · 1 + a1 w Therefore we obtain that vk = wvk+1 for 1 ≤ k ≤ n − 1. That is, vk = v0 w−k for v0 = v1 w1 . Using the fact that ((I − wA)v)n = 1, we obtain that v0 = pa (w−1 )−1 where pa (·) is the polynomial −1 −n nw pa (x) = xn + a1 xn−1 + · · · + an . Then we have that u(I − wA)−1 B = u1 w pa+···+u (w−1 ) Claim B.2. Suppose x1 , . . . , xn are independent variables with mean 0 and covariance matrices and I, U1 , . . . , Ud are fixed matrices, then  Pn  Pn E k k=1 Uk xk k2 = k=1 kUk k2F . Proof. We have that  Pn  Pn Pn Pn 2 > > > E k k=1 Uk xk k2F = k,` tr(Uk xk x> k=1 kUk kF k tr(Uk xk xk Uk ) = ` U` ) = C C.1 Missing proofs in Sections 4 and 5 Monotonicity of acquiescence: Proof of Lemma 4.3 Lemma C.1 (Lemma 4.3 restated). For any 0 < α < β, we have that Bα ⊂ Bβ . Proof. Let qa (z) = 1 + a1 z + · · · + an z n . Note that q(z −1 ) = pa (z)/z n . Therefore we note that Bα = {a : qa (z) ∈ C, ∀|z| = 1/α}. Suppose a ∈ Bα , then <(qa (z)) ≥ τ1 for any z with |z| = 1/α. Since <(qa (z)) is the real part of the holomorphic function qa (z), its a harmonic function. By maximum (minimum) principle of the harmonic functions, we have that for any |z| ≤ 1/α, <(qa (z)) ≥ inf |z|=1/α <(qa (z)) ≥ τ1 . In particular, it holds that for |z| = 1/β < 1/α, <(qa (z)) ≥ τ1 . Similarly we can prove that for z with |z| = 1/β, <(qa (z)) ≥ (1 + τ0 )=(qa (z)), and other conditions for a being in Bβ . 26 C.2 Proof of Lemma 5.4 Lemma 5.4 follows directly from the following general Lemma which also handles the multi-input multi-output case. It can be seen simply from calculation similar to the proof of Lemma 3.5. We mainly need to control the tail of the series using the no-blow up property (Lemma 4.4) and argue that the wrong value of the initial states h0 won’t cause any trouble to the partial loss function b (defined in Algorithm 1). This is simply because after time T1 = T /4, the influence of `((x, y), Θ) the initial state is already washed out. Lemma C.2. In algorithm 3 the values of GA , GC , GD are equal to the gradients of g(Â, Ĉ) + (D̂ − D)2 with respect to Â, Ĉ and D̂ up to inverse exponentially small error. b has expecProof of Lemma C.2. We first show that the partial empirical loss function `((x, y), Θ) tation almost equal to the idealized risk (up to the term for D̂ and exponential small error), b = g(Â, Ĉ) + (D̂ − D)2 ± exp(−Ω((1 − α)T )). E[`((x, y), Θ)] This can be seen simply from similar calculation to the proof of Lemma 3.5. Note that yt = Dxt + t−1 X CAt−k−1 Bxk + CAt−1 h0 + ξt and ỹt = D̂xt + t−1 X Ĉ Ât−k−1 B̂xk . (C.1) k=1 k=1 Therefore noting that when t ≥ T1 ≥ Ω(T ), we have that kCAt−1 h0 k ≤ exp(−Ω((1 − α)T ) and therefore the effect of h0 is negligible. Then we have that   T X 1 b = kyt − yt k2  ± exp(−Ω((1 − α)T )) E[`((x, y), Θ)] E T − T1 t>T1 = kD̂ − Dk2 + = kD̂ − Dk2 + 1 T − T1 T1 X X X T ≥t>T1 0≤j≤t−1 kĈ Âj B − CAj Bk2 + = kD̂ − Dk2 + X T ≥j≥T1 j=0 ∞ X kĈ Âj B − CAj Bk2 ± exp(−Ω((1 − α)T )) T −j kĈ Âj B − CAj Bk2 ± exp(−Ω((1 − α)T )) T − T1 kĈ Âj B − CAj Bk2 ± exp(−Ω((1 − α)T )) . j=0 where the first line use the fact that kCAt−1 h0 k ≤ exp(−Ω((1−α)T ), the second uses equation (3.9) and the last line uses the no-blowing up property of Ak B (Lemma 4.4). b is also close to the gradient of Similarly, we can prove that the gradient of E[`((x, y), Θ)] 2 g(Â, Ĉ) + (D̂ − D) up to inverse exponential error. C.3 Proof of Lemma 5.5 Proof of Lemma 5.5. Both GA and GC can be written in the form of a quadratic form (with vector coefficients) of x1 , . . . , xT and ξ1 , . . . , ξT . That is, we will write X X X X 0 GA = xs xt ust + xs ξt u0st and GC = xs xt vst + xs ξt vst . s,t s,t s,t 27 s,t where ust and vst are vectors that will be calculated later. By Claim C.3, we have that # " X X X X 0 ku0st k2 . (C.2) kust k2 + O(σ 2 ) xs ξt ust ≤ O(1) Var xs xs ust + s,t s,t s,t s,t P P 0 2 Therefore in order to bound from above Var [GA ], it suffices to bound kust k2 and kust k , and similarly for GC . We begin by writing out ust for fixed s, t ∈ [T ] and bounding its norm. We use the same set of notations as int the proof of Lemma 5.4. Recall that we set rk = CAk B and r̂k = Ĉ Âk B, and ∆rk = r̂k − rk . Moreover, let zk = Âk B. We note that the sums of kzk k2 and rk2 can be controlled. By the assumption of the Lemma, we have that ∞ X kzk k2 ≤ 2πnτ1−2 , k=t ∞ X ∆rk2 ≤ 4πnτ1−2 , kzk k2 ≤ 2πnα2k−2n τ1−2 . (C.3) k∆rk k2 ≤ 4πnα2k−2n τ1−2 . (C.4) k=t which will be used many times in the proof that follows. We calculate the explicit form of GA using the explicit back-propagation Algorithm 3. We have that in Algorithm 3, P P (C.5) ĥk = kj=1 Âk−j Bxj = kj=1 zk−j xj and T X ∆hk = (Â> )j−k Ĉ > ∆yj = αj−k (Â> )j−k Ĉ > 1j>T1 ξj + > ∆h j X ! ∆rj−` x` (C.6) `=1 j=k j=k P T X 0> k hk−1 and equation (C.5) and equation (C.6) above, we have that P  P j−k B 1 k−t−1 B ust = Tk=2 ∆r Ĉ  j−s k≥t+1 ·  j≥max{k,s,T1 +1}  P P (C.7) ∆r r̂ = Tk=2 j−s j−k 1k≥t+1 · zk−t−1 . j≥max{k,s,T1 +1} Then using GA = k≥2 B and that, u0st = T X 0 zk−1−s · 1k≥s+1 · r̂t−k · 1t>max{T1 ,k} = k=2 X 0 zk−1−s · r̂t−k · 1t>max{T1 } (C.8) s+1≤k≤t   1 Towards bounding kust k, we consider four different cases. Let Λ = Ω {max{n, (1 − α)−1 log( 1−α )} be a threshold. When 0 ≤ s − t ≤ Λ, we rewrite ust by rearranging equation (C.7), X X X X zk−t−1 ∆rj−s r̂j−k + zk−t−1 ∆rj−s r̂j−k ust = Case 1: T ≥k≥s = X `≥0,`≥T1 +1−s t<k<s j≥max{k,T1 +1} ∆r` X r̂`+s−k zk−t−1 + s≤k≤l+s,k≤T j≥max{s,T1 +1} X `≥0,`≥T1 +1−s 28 ∆r` X s>k>t r̂`+s−k zk−t−1 where at the second line, we did the change of variables ` = j − s. Then by Cauchy-Schartz inequality, we have,   2 X X X kust k2 ≤ 2  ∆r`2   r̂`+s−k zk−t−1  `≥0,`≥T1 +1−s `≥0,`≥T1 +1−s s≤k≤l+s,k≤T {z |   X + 2 } T1 2 X ∆r`2   `≥0,`≥T1 +1−s X r̂`+s−k zk−t−1  . (C.9) `≥0,`≥T1 +1−s s>k>t {z | T2 } We could bound the contribution from ∆rk2 ssing equation (C.4), and it remains to bound terms T1 and T2 . Using the tail bounds for kzk k (equation (C.3)) and the fact that |r̂k | = |Ĉ Âk B| ≤ kÂk Bk = kzk k , we have that  2 2 X X X X  T1 = r̂`+s−k zk−t−1 ≤ |r̂`+s−k |kzk−t−1 k . (C.10) `≥0,`≥T1 +1−s s≤k≤l+s,k≤T `≥0 s≤k≤`+s We bound the inner sum of RHS of (C.10) using the fact that kzk k2 ≤ O(nα2k−2n /τ12 ) and obtain that, X X |r̂`+s−k |kzk−t−1 k ≤ O(nα(`+s−t−1)−2n /τ12 ) s≤k≤`+s s≤k≤`+s ≤ O(`nα(`+s−t−1)−2n /τ12 ) . (C.11) Note that equation (C.11) is particular effective when ` > Λ. When ` ≤ Λ, we can refine the bound using equation (C.3) and obtain that  1/2  1/2 X X X |r̂`+s−k |kzk−t−1 k ≤  |r̂`+s−k |2   kzk−t−1 k2  s≤k≤`+s s≤k≤`+s s≤k≤`+s √ √ ≤ O( n/τ1 ) · O( n/τ1 ) = O(n/τ12 ) . (C.12) Plugging equation (C.12) and (C.11) into equation (C.10), we have that  2 X X X X  |r̂`+s−k |kzk−t−1 k ≤ O(n2 /τ14 ) + O(`2 n2 α2(`+s−t−1)−4n /τ14 ) `≥0 s≤k≤`+s Λ≥`≥0 ≤ O(n 2 Λ/τ14 ) `>Λ 2 + O(n /τ14 ) = O(n2 Λ/τ14 ) . (C.13) For the second term in equation (C.9), we bound similarly, 2 T2 ≤ X X r̂`+s−k zk−t−1 ≤ O(n2 Λ/τ14 ) . (C.14) `≥0,`≥T1 +1−s s>k>t Therefore using the bounds for T1 and T2 we obtain that, kust k2 ≤ O(n3 Λ/τ16 ) 29 (C.15) Case 2: When s − t > Λ, we tighten equation (C.13) by observing that,  2 X X X  O(`2 n2 α2` /τ14 ) T1 ≤ |r̂`+s−k |kzk−t−1 k ≤ α2(s−t−1)−4n `≥0 `≥0 s≤k≤`+s 2 (C.16) kust k2 ≤ O(n3 /((1 − α)3 τ16 )) · αs−t−1 . (C.17) ≤α s−t−1 · O(n /(τ14 (1 − α)3 )) . where we used equation (C.11). Similarly we can prove that T2 ≤ αs−t−1 · O(n2 /(τ14 (1 − α)3 )) . Therefore, we have when s − t ≥ Λ, Case 3: When −Λ ≤ s − t ≤ 0, we can rewrite us t and use the Cauchy-Schwartz inequality and obtain that X X X X r̂`+s−k zk−t−1 . ust = zk−t−1 ∆rj−s r̂j−k = ∆r` T ≥k≥t+1 `≥0,`≥T1 +1−s j≥max{k,T1 +1} t+1≤k≤l+s,k≤T and, kust k2 ≤  2   X X ∆r`2   X r̂`+s−k zk−t−1 . `≥0,`≥T1 +1−s t+1≤k≤l+s,k≤T `≥0,`≥T1 +1−s Using almost the same arguments as in equation (C.11) and (C.12), we that X |r̂`+s−k | · kzk−t−1 k ≤ O(`nα(`+s−t−1)−2n /τ12 ) t+1≤k≤`+s X and √ √ |r̂`+s−k | · kzk−t−1 k ≤ O( n/τ1 ) · O( n/τ1 ) = O(n/τ12 ) . t+1≤k≤`+s Then using a same type of argument as equation (C.13), we can have that 2 X X 0 0 r̂`+s−k zk−t−1 ≤ O(n2 Λ/τ14 ) + O(n2 /τ14 ) `≥0,`≥T1 +1−s t+1≤k≤l+s,k≤T = O(n2 Λ/τ14 ) . It follows that in this case kust k can be bounded with the same bound in (C.15). Case 4: When s − t ≤ −Λ, we use a different simplification of ust from above. First of all, it follows (C.7) that   T X X 0  kust k ≤ k∆rj−s r̂j−k zk−t−1 k1k≥t+1  k=2 j≥max{k,s,T1 +1} (C.18) ≤ X k≥t+1 0 kzk−t−1 k X j≥max{k,T1 +1} 30 0 |∆rj−s r̂j−k |. Since j − s ≥ k − s > 4n and it follows that X X 0 |∆rj−s r̂j−k |≤ √ √ O( n/τ1 · αj−s−n ) · O( n/τ1 · αj−k−n ) j≥max{k,T1 +1} j≥max{k,T1 +1} ≤ O(n/(τ12 (1 − α)) · αk−s−n ) Then we have that X kust k2 ≤ X 0 kzk−t−1 k k≥t+1 j≥max{k,T1 +1}  ≤  X X  k≥t+1 O(n/τ12 ) · O(n 2 /(τ14 (1 2   X 0 kzk−t−1 k2   k≥t+1 ≤ 0 |∆rj−s r̂j−k | 0 |∆rj−s r̂j−k |  j≥max{k,T1 +1} 3 − α) )αt−s ) = O(n3 /(τ16 δ 3 )αt−s ) Therefore, using the bound for kust k2 obtained in the four cases above, taking sum over s, t, we obtain that X X X kust k2 ≤ O(n3 Λ/τ16 ) + O(n3 /(τ16 (1 − α)3 )α|t−s|−1 ) 1≤s,t≤T s,t∈[T ]:|s−t|≤Λ 3 ≤ O(T n Λ 2 /τ16 ) s,t:|s−t|≥Λ + O(n 3 /τ16 ) = O(T n3 Λ2 /τ16 ) . (C.19) We finished the bounds for kust k and now we turn to bound ku0st k2 . Using the formula for u0st (equation C.8), we have that for t ≤ s + 1, u0st = 0. For s + Λ ≥ t ≥ s + 2, we have that by Cauchy-Schwartz inequality, 1/2  1/2  X X 0 |2  ≤ O(n/τ12 ) ≤ O(n/τ12 ) . ku0st k ≤  kzk−1−s k2   |r̂t−k s+1≤k≤t s+1≤k≤t On the other hand, for t > s + Λ, by the bound that |r̂k0 |2 ≤ kzk0 k2 ≤ O(nα2k−2n /τ12 ), we have, ku0st k ≤ T X kzk−1−s k · 0 | |r̂t−k nαt−s−1 /τ12 s+1≤k≤t−1 s+1≤k≤t−1 ≤ O(n(t − s)α ≤ T X t−s−1 /τ12 ) . Therefore taking sum over s, t, similarly to equation (C.19), X ku0st k2 ≤ O(T n2 Λ/τ14 ) . s,t∈[T ] Then using equation (C.2) and equation (C.19) and (C.20), we obtain that  Var[kGA k2 ] ≤ O T n3 Λ2 /τ16 + σ 2 T n2 Λ/τ14 . Hence, it follows that  O n3 Λ2 /τ16 + σ 2 n2 Λ/τ14 1 Var[GA ] ≤ . Var[GA ] ≤ (T − T1 )2 T We can prove the bound for GC similarly. 31 (C.20) Claim C.3. Let x1 , . . . , xT be independent random variables with mean 0 and variance 1 and 4-th moment bounded by O(1), and uij be vectors for i, j ∈ [T ]. Moreover, let ξ1 , . . . , ξT be independent random variables with mean 0 and variance σ 2 and u0ij be vectors for i, j ∈ [T ]. Then, Var hP i,j xi xj uij + P i P P 0 2 2 0 2 x ξ u i,j i j ij ≤ O(1) i,j kuij k + O(σ ) i,j kuij k . Proof. Note that the two sums in the target are independent with mean 0, therefore we only need to bound the variance of both sums individually. The proof follows the linearity of expectation and the independence of xi ’s:   XX h i 2 P > = x x x x u u x x u E E i j k ` ij k` i,j i j ij i,j = X ≤ X k,` X > 4 E[uii uii xi ] + i X + O(1) X h i 2 2 > > x x (u u + u u ) E i j ij ij ij ji i,j i6=j u> ii ujj i,j =k > 2 2 E[uii ujj xi xj ] + 2 kuij + uji k i,j 2 i uii k + O(1) P X kuij k2 i,j α where at second line we usedP the fact that for Pany monomial x with an odd degree on one of the α xi ’s, E[x ] = 0. Note that E[ i,j xi xj uij ] = i uii . Therefore, Var hP i h P i P P 2 −k [ x x u k k x x u = E i,j xi xj uij ]k2 ≤ O(1) i,j kuij k2 E i,j i j ij i,j i j ij Similarly, we can control Var D (C.21) hP i P 0 2 0 2 x ξ u i,j kuij k . i,j i j ij by O(σ ) Missing proofs in Section 6 D.1 Proof of Lemma 6.5 Towards proving Lemma 6.5, we use the following lemma to express the inverse of a polynomial as a sum of inverses of degree-1 polynomials. Lemma D.1. Let p(z) = (z − λ1 ) . . . (z − λn ) where λj ’s are distinct. Then we have that n X tj 1 = , p(z) z − λj where tj = Q i6=j (λj −1 − λi ) . (D.1) j=1 Proof of Lemma D.1. By interpolating constant function at points λ1 , . . . , λn using Lagrange interpolating formula, we have that n Q X (x − λi ) Q i6=j 1= ·1 (D.2) i6=j (λj − λi ) j=1 Dividing p(z) on both sides we obtain equation (D.1). The following lemma computes the Fourier transform of function 1/(z − λ). 32 Lemma D.2. Let m ∈ Z, and K be the unit circle in complex plane, and λ ∈ C inside the K. Then we have that  Z zm 2πiλm for m ≥ 0 dz = 0 o.w. K z−λ Proof of Lemma D.2. For m ≥ 0, since z m is a holomorphic function, by Cauchy’s integral formula, we have that Z zm dz = 2πiλm . z − λ K For m < 0, by changing of variable y = z −1 we have that Z Z −m−1 zm y dz = dy . K z−λ K 1 − λy since |λy| = |λ| < 1, then we by Taylor expansion we have, Z K y −m−1 dy = 1 − λy Z y −m−1 K ∞ X ! (λy)k dy . k=0 Since the series λy is dominated by |λ|k which converges, we can switch the integral with the sum. Note that y −m−1 is holomorphic for m < 0, and therefore we conclude that Z −m−1 y dy = 0 . K 1 − λy Now we are ready to prove Lemma 6.5. Proof of Lemma 6.5. Let m = n + d. We compute the Fourier transform of z m /p(z). That is, we write ∞ X eimθ βk eikθ . = p(eiθ ) k=−∞ where 1 βk = 2π Z 0 2π ei(m−k)θ 1 dθ = iθ 2πi p(e ) By Lemma D.1, we write Z K z m−k−1 dz p(z) n X tj 1 = . p(z) z − λj j=1 Then it follows that n 1 X βk = tj 2πi Z j=1 Using Lemma D.2, we obtain that  Pn m−k−1 j=1 tj λj βk = 0 We claim that n X j=1 tj λn−1 = 1, j and K z m−k−1 dz z − λj if − ∞ ≤ k ≤ m − 1 o.w. n X j=1 33 tj λsj = 0 , 0 ≤ s < n − 1. (D.3) Indeed these can be obtained by writing out the lagrange interpolation for polynomial f (x) = xs with s ≤ n − 1 and compare the leading coefficient. Therefore, we further simplify βk to  Pn m−k−1 if − ∞ < k < m − n  j=1 tj λj βk = (D.4) 1 if k = m − n  0 o.w. P Let h(z) = k≥0 βk z k . Then we have that h(z) is a polynomial with degree d = m − n and leading term 1. Moreover, for our choice of d, X X X zm − h(z) = βk z k ≤ |βk | ≤ max |tj |(1 − λj )n (1 − γ)d−k−1 j p(z) k<0 k<0 k<0 d ≤ Γ(1 − γ) /γ < ζ . D.2 Proof of Theorem 6.9 Theorem 6.9 follows directly from a combination of Lemma D.3 and Lemma D.4 below. Lemma D.3 shows that the denominator of a function (under the stated assumptions) can be extended to a polynomial that takes values in C + on unit circle. Lemma D.4 shows that it can be further extended to another polynomial that takes values in C. Lemma D.3. Suppose the roots of s are inside circle with radius α < 1, and Γ = Γ(s). If transfer function G(z) = s(z)/p(z) satisfies that G(z) ∈ Cτ0 ,τ1 ,τ2 (or G(z) ∈ Cτ+0 ,τ1 ,τ2 ) for any z on unit circle, √ nΓ·kpk H2 1 then there exists u(z) of degree d = Oτ (max{( 1−α log , 0}) such that p(z)u(z)/z n+d ∈ 1−α + 0 n+d ∈ Cτ 0 ,τ 0 ,τ 0 respectively) for τ = Θτ (1) , where Oτ (·), Θτ (·) hide the Cτ 0 ,τ 0 ,τ 0 (or p(z)u(z)/z 0 1 2 0 1 2 polynomial dependencies on τ0 , τ1 , τ2 . Proof of Lemma D.3. By the fact that G(z) = s(z)/p(z) ∈ Cτ0 ,τ1 ,τ2 , we have that p(z)/s(z) ∈ Cτ00 ,τ10 ,τ20 for some τ 0 that polynomially depend on τ . Using Lemma 6.5, there exists u(z) of degree d such that z n+d − u(z) ≤ ζ . s(z) where we set ζ  min{τ00 , τ10 }/τ20 · kpk−1 H∞ . Then we have that p(z)u(z)/z n+d − p(z) ≤ |p(z)|ζ  min{τ00 , τ10 }. s(z) (D.5) It follows from equation (D.5) implies that that p(z)u(z)/z n+d ∈ Cτ000 ,τ100 ,τ200 , where τ 00 polynomially depends on τ . The same proof still works when we replace C by C + . Lemma D.4. Suppose p(z) of degree n and leading coefficient 1 satisfies that p(z) ∈ Cτ+0 ,τ1 ,τ2 for any z on unit circle. Then there exists u(z) of degree d such that p(z)u(z)/z n+d ∈ Cτ00 ,τ10 ,τ20 for any z on unit circle with d = Oτ (n) and τ00 , τ10 , τ20 = Θτ (1), where Oτ (·), Θτ (·) hide the dependencies on τ0 , τ1 , τ2 . p Proof of Lemma D.4. We fix z on unit circle first. Let’s defined p(z)/z n be the square root of p(z)/z n with principle value. Let’s write p(z)/z n = τ2 (1 + ( τp(z) − 1)) and we take Taylor P 2 z n  −1/2 −1/2 p(z) p(z) ∞ 1 −1/2 = τ k . Note that since expansion for √ = τ (1 + ( − 1)) ( − 1) n n 2 2 k=0 τ z τ z n 2 2 p(z)/z 34 τ1 < |p(z)| < τ2 , we have that | τp(z) n − 1| < 1 − τ1 /τ2 . Therefore truncating the Taylor series at 2z k = Oτ (1) we obtain a polynomial a rational function h(z) of the form h(z) = p(z) j≥0 ( τ2 z n Pk − 1)j , 1 p(z)/z n with precision ζ  min{τ0 , τ1 }/τ2 , that is, √ 1 n − h(z) ≤ ζ . p(z)/z p p(z)h(z) n n − p(z)/z ≤ ζ|p(z)/z | ≤ ζτ2 . Note that since p(z)/z n ∈ Therefore, we obtain that zn p Cτ+0 ,τ1 ,τ2 , we have that p(z)/z n ∈ Cτ00 ,τ10 ,τ20 for some constants τ00 , τ10 , τ20 . Therefore p(z)h(z) ∈ Cτ00 ,τ10 ,τ20 . zn nk Note that h(z) is not a polynomial yet. Let u(z) = z h(z) and then u(z) is polynomial of degree at most nk and p(z)u(z)/z (n+1)k ∈ Cτ00 ,τ10 ,τ20 for any z on unit circle. which approximates √ E Back-propagation implementation In this section we give a detailed implementation of using back-propagation to compute the gradient of the loss function. The algorithm is for general MIMO case with the parameterization (7.3). To obtain the SISO sub-case, simply take `in = `out = 1. Algorithm 3 Back-propagation Parameters: â ∈ Rn , Ĉ ∈ R`in ×n`out , and D̂ ∈ R`in ×`out . Let  = MCC(â) = CC(â) ⊗ I`in and B̂ = en ⊗ I`in . Input: samples ((x(1) , y 1 ), . . . , x(N ) , y (N ) ) and projection set Bα . for each sample (x(j) , y j ) = ((x1 , . . . , xT ), (y1 , . . . , yT )) do Feed-forward pass: h0 = 0 ∈ Rn`in . for k = 1 to T ĥk ← Âhk−1 + B̂xk , ŷt ← Ĉhk + D̂xk and ĥk ← Âhk−1 + B̂xk . end for Back-propagation: ∆hT +1 ← 0, GA ← 0, GC ← 0. GD ← 0 T1 ← T /4 for k = T to 1 if k > T1 , ∆yk ← ŷk − yk , o.w. ∆yk ← 0. Let ∆hk ← Ĉ > ∆yk + Â> ∆hk+1 . 1 1 update GC ← GC + T −T ∆yk ĥk , GA ← GA − T −T B > ∆hk ĥ> k−1 , and GD ← GD + 1 1 1 T −T1 ∆yk xk . end for Gradient update:  ←  − η · GA , Ĉ ← Ĉ − η · GC , D̂ ← D̂ − η · GD . Projection step: Obtain â from  and set â ← ΠB (â), and  = MCC(â) end for F Projection to the set Bα In order to have a fast projection algorithm to the convex set Bα , we consider a grid GM of size M over the circle with radius α. We will show that M = Oτ (n) will be enough to approximate the set Bα in the sense that projecting to the approximating set suffices for the convergence. 35 0 Let Bα,τ = {a : pa (z)/z n ∈ Cτ0 ,τ1 ,τ2 , ∀z ∈ GM } and Bα,τ0 ,τ1 ,τ2 = {a : pa (z)/z n ∈ Cτ0 ,τ1 ,τ2 , ∀|z| = 0 ,τ1 ,τ2 α}. Here Cτ0 ,τ1 ,τ2 is defined the same as before though we used the subscript to emphasize the dependency on τi ’s, Cτ0 ,τ1 ,τ2 = {z : <z ≥ (1 + τ0 )|=z|} ∩ {z : τ1 < <z < τ2 } . (F.1) 0 We will first show that with M = Oτ (n), we can make Bα,τ to be sandwiched within to 1 ,τ2 ,τ3 two sets Bα,τ0 ,τ1 ,τ2 and Bα,τ00 ,τ10 ,τ20 . Lemma F.1. For any τ0 > τ00 , τ1 > τ10 , τ2 < τ20 , we have that for M = Oτ (n), there exists κ0 , κ1 , κ2 0 ⊂ Bα,τ00 ,τ10 ,τ20 that polynomially depend on τi , τi0 ’s such that Bα,τ0 ,τ1 ,τ2 ⊂ Bα,κ 0 ,κ1 ,κ2 Before proving the lemma, we demonstrate how to use the lemma in our algorithm: We will pick τ00 = τ0 /2, τ10 = τ1 /2 and τ20 = 2τ2 , and find κi ’s guaranteed in the lemma above. Then 0 we use Bα,κ as the projection set in the algorithm (instead of Bα,τ0 ,τ1 ,τ2 )). First of all, the 0 ,κ1 ,κ2 0 0 ground-truth solution Θ is in the set Bα,κ . Moreover, since Bα,κ ⊂ Bα,τ00 ,τ10 ,τ20 , we will 0 ,κ1 ,κ2 0 ,κ1 ,κ2 b will remain in the set Bα,τ 0 ,τ 0 ,τ 0 and therefore the quasi-convexity of guarantee that the iterates Θ 0 1 2 the objective function still holds8 . 0 Note that the set Bα,κ contains O(n) linear constraints and therefore we can use linear 0 ,κ1 ,κ2 programming to solve the projection problem. Moreover, since the points on the grid forms a Fourier basis and therefore Fast Fourier transform can be potentially used to speed up the projection. Finally, we will prove Lemma F.1. We need S. Bernstein’s inequality for polynomials. Theorem F.2 (Bernstein’s inequality, see, for example, [Sch41]). Let p(z) be any polynomial of degree n with complex coefficients. Then, sup |p0 (z)| ≤ n sup |p(z)|. |z|≤1 |z|≤1 We will use the following corollary of Bernstein’s inequality. Corollary F.3. Let p(z) be any polynomial of degree n with complex coefficients. Then, for m = 20n, sup |p0 (z)| ≤ 2n sup |p(e2ikπ/m )|. |z|≤1 k∈[m] Proof. For simplicity let τ = supk∈[m] |p(e2ikπ/m )|, and let τ 0 = supk∈[m] |p(e2ikπ/m )|. If τ 0 ≤ 2τ then we are done by Bernstein’s inequality. Now let’s assume that τ 0 > 2τ . Suppose p(z) = τ 0 . Then there exists k such that |z − e2πik/m | ≤ 4/m and |p(e2πik/m )| ≤ τ . Therefore by Cauchy mean-value theorem we have that there exists ξ that lies between z and e2πik/m such that p0 (ξ) ≥ m(τ 0 − τ )/4 ≥ 1.1nτ 0 , which contradicts Bernstein’s inequality. Lemma F.4. Suppose a polynomial of degree n satisfies that |p(w)| ≤ τ for every w = αe2iπk/m for some m ≥ 20n. Then for every z with |z| = α there exists w = αe2iπk/m such that |p(z) − p(w)| ≤ O(nατ /m). Proof. Let g(z) = p(αz) by a polynomial of degree at most n. Therefore we have g 0 (z) = αp(z). Let w = αe2iπk/m such that |z − w| ≤ O(α/m). Then we have 1 |p(z) − p(w)| = |g(z/α) − p(w/α)| ≤ sup |g 0 (x)| · |z − w| (By Cauchy’s mean-value Theorem) α |x|≤1 ≤ sup |p0 (x)| · |z − w| ≤ nτ |z − w| . (Corallary F.3) |x|≤1 ≤ O(αnτ /m) . 8 with a slightly worse parameter up to constant factor since τi ’s are different from τi ’s up to constant factors 36 Now we are ready to prove Lemma F.1. Proof of Lemma F.1. We choose κi = 12 (τi + τi0 ).The first inequality is trivial. We prove the second 0 −1 )z n . one. Consider a such that a ∈ Bα,κ0 ,κ1 ,κ2 . We wil show that a ∈ Bα,τ 0 ,τ 0 ,τ 0 . Let qa (z) = p(z 0 1 2 By Lemma F.4, for every z with |z| = 1/α, we have that there exists w = α−1 e2πik/M for some integer k such that |qa (z) − qa (w)| ≤ O(τ2 n/(αM )). Therefore let M = cn for sufficiently large c (which depends on τi ’s), we have that for every z with |z| = 1/α, qa (z) ∈ Cτ00 ,τ10 ,τ20 . This completes the proof. 37
8cs.DS
LINEARITY DEFECT OF EDGE IDEALS AND FRÖBERG’S THEOREM arXiv:1506.05769v7 [math.AC] 16 Jan 2016 HOP D. NGUYEN AND THANH VU Abstract. Fröberg’s classical theorem about edge ideals with 2-linear resolution can be regarded as a classification of graphs whose edge ideals have linearity defect zero. Extending his theorem, we classify all graphs whose edge ideals have linearity defect at most 1. Our characterization is independent of the characteristic of the base field: the graphs in question are exactly weakly chordal graphs with induced matching number at most 2. The proof uses the theory of Betti splittings of monomial ideals due to Francisco, Hà, and Van Tuyl and the structure of weakly chordal graphs. Along the way, we compute the linearity defect of edge ideals of cycles and weakly chordal graphs. We are also able to recover and generalize previous results due to Dochtermann-Engström, Kimura and Woodroofe on the projective dimension and Castelnuovo-Mumford regularity of edge ideals. 1. Introduction Let (R, m) be a standard graded algebra over a field k with the graded maximal ideal m. Let M be a finitely generated graded R-module. For integers i, j, the (i, j)-graded Betti number of M is defined by βi,j (M) = dimk TorR i (k, M)j . The following number is called the (CastelnuovoMumford) regularity of M over R regR M = sup{j − i : βi,j (M) 6= 0}. The regularity is an important invariant of graded modules over R. When R is a polynomial ring and M is a monomial ideal of R, its regularity exposes many combinatorial flavors. This fact has been exploited and proved to be very useful for studying the regularity; for recent surveys, see [13], [28], [38]. A classical and instructive example is Fröberg’s theorem. Recall that if G is a graph on the vertex set {x1 , . . . , xn } (where n ≥ 1), and by abuse of notation, R is the polynomial ring k[x1 , . . . , xn ], then the edge ideal of G is I(G) = (xi xj : {xi , xj } is an edge of G). Unless otherwise stated, whenever we talk about an invariant of I(G) (including the regularity and the linearity defect, to be defined below), it is understood that the base ring is the polynomial ring R. For m ≥ 3, the cycle Cm is the graph on vertices x1 , . . . , xm with edges x1 x2 , . . . , xm−1 xm , xm x1 . We say that a graph G is weakly chordal (or weakly triangulated) if for every m ≥ 5, neither G, nor its complement contains Cm as an induced subgraph. G is chordal if for any m ≥ 4, Cm is not an induced subgraph of G. Fröberg’s theorem [10] says that I(G) has regularity 2 if and only if the complement graph of G is chordal. It is of interest to find generalizations of this important result; see, for instance, [7], [8]. Fernández-Ramos and Gimenez [8, Theorem 4.1] extended Fröberg’s theorem by providing a combinatorial characterization of connected bipartite graphs G such that reg I(G) = 3. In general, the regularity 3 condition on edge ideals is not 2010 Mathematics Subject Classification. 05C25, 13D02, 13H99. Key words and phrases. Edge ideal; Linearity defect; Weakly chordal graph; Castelnuovo-Mumford regularity. This work is partially supported by the NSF grant DMS-1103176. Part of this work was done when Nguyen was a Marie Curie fellow of the Istituto Nazionale di Alta Matematica. 1 2 HOP D. NGUYEN AND THANH VU purely combinatorial as it depends on the characteristic of the field; see Katzman’s example in [24, Page 450]. The linearity defect was introduced by Herzog and Iyengar [19] motivated by work of Eisenbud, Fløystad, and Schreyer [6]. It is defined via the linear part of minimal free resolutions of modules over R, see Section 2 for details. The linear part appears naturally: from [6, Theorem 3.4], taking homology of a complex over a polynomial ring is equivalent to taking the linear part of a minimal free complex over the (Koszul dual) exterior algebra. The linearity defect itself is interesting because it yields stronger homological information than the regularity: over a local ring, Herzog and Iyengar [19, Proposition 1.8] proved that modules with finite linearity defect have rational Poincaré series with constant denominator. On the other hand, there exist modules which have finite regularity and transcendental Poincaré series [22, Page 252]. Furthermore, the linearity defect is flexible enough to generate a rich theory: going beyond regular rings, one still encounters reasonable classes of rings over which every module has finite linearity defect, e.g. exterior algebras [6], homogeneous complete intersections defined by quadrics [19]. Let R again be a polynomial ring over k and M a finitely generated graded R-module. The linearity defect of M over R is denoted by ldR M or simply ld M. Then ld M equals ℓ (where ℓ ≥ 0) if and only if the first syzygy module of M which is componentwise linear in the sense of Herzog and Hibi [17] is the ℓ-th one. In particular, the condition that an edge ideal has 2-linear resolution is equivalent to the condition that its linearity defect is 0. Fröberg’s theorem can be rephrased as a classification of edge ideals with linearity defect 0. Our motivation is to find a purely combinatorial characterization for linearity defect 1 edge ideals; it turns out that indeed there is one. Finding such a characterization is non-trivial due to several reasons. First, while the Hochster’s formula can give much information about the regularity of Stanley-Reisner ideals (see for example Dochtermann and Engström [5]), up to now there is no combinatorial interpretation of the linearity defect of Stanley-Reisner ideals. (See [32], [35] for some results about the linearity defect of such ideals.) Second and furthermore, the linearity defect generally cannot be read off from the Betti table: for example (see [20, Example 2.8]), the ideals I1 = (x41 , x31 x2 , x21 x22 , x1 x32 , x42 , x31 x3 , x21 x2 x23 , x21 x33 , x1 x22 x23 ) and I2 = (x41 , x31 x2 , x21 x22 , x31 x3 , x1 x22 x3 , x1 x2 x23 , x1 x42 , x21 x33 , x42 x3 ) in k[x1 , x2 , x3 ] have the same graded Betti numbers, but the first one has linearity defect 0 while the second one has positive linearity defect (equal to 1). Third, the quest of finding the aforementioned characterization yields interesting new insights even to the more classical topics concerning Castelnuovo-Mumford regularity or the projective dimension. Indeed, in proving one of the main results (Theorem 5.5), we recover a theorem of Woodroofe [40, Theorem 14] on regularity of edge ideals of weakly chordal graphs. In Theorem 7.7, we prove a new result about the projective dimension of edge ideals of weakly chordal graphs, extending previous work of Dochtermann and Engström [5] and Kimura [26], [27]. As mentioned earlier, our motivation is to see if the linearity defect one condition is purely combinatorial. Recall that for g ≥ 1, the gK2 graph is the graph consisting of g disjoint edges. The induced matching number of a graph G, denoted by indmatch(G), is the largest number g such that there is an induced gK2 subgraph in G. The first main result of our paper is the following new generalization of Fröberg’s theorem. LINEARITY DEFECT OF EDGE IDEALS 3 Theorem 1.1 (See Theorem 7.6). Let G be a graph. Then ld I(G) = 1 if and only if G is a weakly chordal graph with induced matching number indmatch(G) = 2. This suggests (to us) a surprising, if little exploited connection between the linearity defect of edge ideals and combinatorics of graphs. The hard part of Theorem 1.1, the sufficiency, follows from a more general statement about the linearity defect of edge ideals of weakly chordal graphs. Thus the second main result of our paper, which was inspired by the aforementioned theorem of Woodroofe [40, Theorem 14], is Theorem 1.2 (See Theorem 5.5). Let G be a weakly chordal graph with at least one edge. Then there is an equality ld I(G) = indmatch(G) − 1. Our proof of Theorem 1.2 takes a cue from the theory of Betti splittings due to Francisco, Hà, and Van Tuyl [9]. Let I be a monomial ideal of R, and G(I) its set of uniquely determined minimal monomial generators. Let J, K be monomial ideals contained in I such that G(J) ∩ G(K) = ∅ and G(I) = G(J) ∪ G(K), so that in particular I = J + K. The decomposition of I as J + K is called a Betti splitting if for all i ≥ 0 and all j ≥ 0, the following equality of Betti numbers βi,j (I) = βi,j (J) + βi,j (K) + βi−1,j (J ∩ K) (1.1) holds. In [9], [14], [15], Betti splittings were used to study Betti numbers and regularity of edge ideals and more general squarefree monomial ideals. What makes Betti splittings useful to the study of linearity defect is the following fact, proven in [9, Proposition 2.1]: the decomposition R I = J + K is a Betti splitting if and only if the natural maps TorR i (k, J ∩ K) −→ Tori (k, J) R and TorR i (k, J ∩ K) −→ Tori (k, K) are trivial for all i ≥ 0. It is proved in Proposition 4.3 of Section 4 that we have a good control of the linearity defect along short exact sequences for which certain induced maps of Tor have strong vanishing properties. This result implies that Betti splittings are suitable for bounding the linearity defect (Theorem 4.9). The second component of the proof of Theorem 1.2 comes from the structure theory of weakly chordal graphs. Specifically, we use the existence of co-two-pair edges [16] in a weakly chordal graph. The main work of Section 5 is to show that any co-two-pair in a weakly chordal graph gives rise to a Betti splitting of the corresponding edge ideal; see Theorem 5.5. A variety of techniques is employed to prove the last result, including the theory of lcm-lattice in monomial resolutions developed in [11] and [33]. The paper is organized as follows. We start by recalling the necessary background in Section 2. Section 3 provides a lower bound for the linearity defect of edge ideals in terms of the induced matching number of the associated graphs. This bound plays a role in the proof of the necessity part of Theorem 1.1 and in Theorem 1.2. The main result of Section 4 is that linearity defect behaves well with respect to Betti splittings (Theorem 4.9). In Section 5, we compute the linearity defect of edge ideals associated to weakly chordal graphs. In particular we prove in Section 5 Theorem 1.2 introduced above. Section 6 concerns with the computation of linearity defect for the simplest non-weakly-chordal graphs, namely cycles of length ≥ 5. (For complements of cycles, the computation was done in [32, Theorem 5.1].) Besides applications to the theory of regularity and projective dimension of edge ideals, in Section 7, we prove Theorem 1.1. In Section 8, we study the dependence of the linearity defect of edge ideals on the characteristic of the field k, and propose some open questions. Since the linearity defect was originally defined in [19] for modules over local rings, we state some of our results in this greater generality; see for example Proposition 4.3, Theorem 4.9 and 4 HOP D. NGUYEN AND THANH VU Proposition 4.10. The reader may check easily that the analogues of these results for graded algebras are also true, using the same method. 2. Background We assume that the reader is familiar with the basic of commutative algebra; a good reference for which is [3]. For the theory of free resolutions, we refer to [2]. 2.1. Linearity defect. Let (R, m, k) be a standard graded k-algebra with the graded maximal ideal m, or a noetherian local ring with the maximal ideal m and the residue field k. By a “standard graded k-algebra”, we mean that R is a commutative algebra over k, R is N-graded with R0 = k, and R is generated over k by finitely many elements of degree 1. Sometimes, we omit k and write (R, m) for simplicity. Let us define the linearity defect for complexes of modules over local rings; the modification for graded algebras is straightforward. Let (R, m) be a noetherian local ring, and M be a chain complex of R-modules with homology H(M) degreewise finitely generated and bounded below, i.e. Hi (M) is finitely generated for all i ∈ Z and Hi (M) = 0 for i ≪ 0. Let F be its minimal free resolution: F : · · · −→ Fi −→ Fi−1 −→ · · · −→ F1 −→ F0 −→ F−1 −→ · · · . In particular, up to isomorphism of complexes, F is the unique complex of finitely generated free R-modules that fulfills the following conditions: (i) Im(Fi ) ⊆ mFi−1 for all i ∈ Z, (ii) there is a morphism of complexes F −→ M which induces isomorphism on homology. The complex F can be chosen such that Fi = 0 for all i < inf M := inf{i : Hi (M) 6= 0}. See the monograph of Roberts [34] for more details. The complex F admits a filtration (F i F )i≥0 , where F i F is the complex F i F : · · · −→ Fi+1 −→ Fi −→ mFi−1 −→ · · · −→ mi−1 F1 −→ mi F0 −→ mi+1 F−1 −→ · · · , with the differential being induced by that of F . The complex M F iF linR F = F i+1 F i∈Z is called the linear part of F . It is a complex of graded free grm R-modules. Here, as usual, M mi R grm R = mi+1 R i≥0 is the associated graded ring of R with respect to the m-adic filtration. By a straightforward computation, one has for all i ≥ 0 an isomorphism of graded grm R-modules: Fi (linR F )i = (grm Fi ) (−i) ∼ ⊗R/m (grm R)(−i). (2.1) = mFi It is worth pointing out here a simple procedure for computing the linear part of minimal free resolutions if R is a graded algebra. Now M is a complex of graded R-modules with H(M) degreewise finitely generated and bounded below, and F is the minimal graded free resolution of M. It is not hard to see that linR F has the same underlying module structure as F itself, and LINEARITY DEFECT OF EDGE IDEALS 5 the matrices of differentials of linR F are obtained from that of F by replacing each non-zero entry of degree at least 2 by zero. For example, let R = k[x, y] and I = (x2 , xy 2 , y 4), then a minimal graded free resolution of I is   −y 2 0    x −y 2    0 x F : 0 −→ R(−4) ⊕ R(−5) −−−−−−−−−−−→ R(−2) ⊕ R(−3) ⊕ R(−4) −→ 0. The linear part of F is the following complex 0 0  x 0   0 x linR F : 0 −→ R(−1)2 −−−−−−−→ R3 −→ 0.      The linearity defect of M over R, denoted by ldR M, is defined as follows: ldR M = sup{i : Hi (linR F ) 6= 0}. By convention, ldR M = 0 if M is the trivial module 0. Except for the proof of Proposition 4.3, we will work solely with linearity defect of modules. The notion of linearity defect was introduced by Herzog and Iyengar in 2005; see their paper [19] for more information about the homological significance of the complex linR F and the linearity defect. In the above example, we can verify that H1 (linR F ) = 0 and ldR I = 0. Following [19], modules which have linearity defect zero are called Koszul modules. 2.2. Castelnuovo-Mumford regularity. Let (R, m) now be a standard graded k-algebra, and M a finitely generated graded R-module. The Castelnuovo-Mumford regularity of M over R is regR M = sup{j − i : TorR i (k, M)j 6= 0}. Ahangari Maleki and Rossi [1, Proposition 3.5] showed that if ldR M = ℓ < ∞ then the regularity of M can be computed using the first ℓ steps in its minimal free resolution: regR M = sup{j − i : TorR i (k, M)j 6= 0 and i ≤ ℓ}. In particular, if M is a Koszul R-module then regR M equals the maximal degree of a minimal homogeneous generator of M. We say that M has a linear resolution if for some d ∈ Z, M is generated in degree d and regR M = d. We also say that M has a d-linear resolution in that case. Römer [35] proved that if R is a Koszul algebra, i.e. regR k = 0, then the following statements are equivalent: (i) M is a Koszul module; (ii) M is componentwise linear, namely for every d ∈ Z, the submodule Mhdi of M generated by homogeneous elements of degree d has a d-linear resolution. A proof of this result can be found in [21, Theorem 5.6]. From Römer’s theorem, one gets immediately that if R is a Koszul algebra, and M is generated in a single degree d, then ldR M = 0 if and only if M has a d-linear resolution. 6 HOP D. NGUYEN AND THANH VU 2.3. Graphs and their edge ideals. We always mean by a graph G a pair (V (G), E(G)), where V (G) = {x1 , . . . , xn } is a finite set (with n ≥ 1), and E(G) is a collection of non-ordered pairs {xi , xj } where 1 ≤ i, j ≤ n, i 6= j. Elements in V (G) are called vertices of G, while elements in E(G) are termed edges of G. In this paper, we do not consider infinite graphs, nor do we consider graphs with loops or multiple edges between two vertices. Most of the material on graph theory that we need can be found in [38]. For a graph G and x ∈ V (G), a vertex y ∈ V (G) is called a neighbor of x if {x, y} ∈ E(G). We also say that y is adjacent to x in that case. We denote by N(x) the set of neighbors of x. The graph Gc with the same vertices as G and with edge set consisting of non-ordered pairs {x, y} of non-adjacent vertices of G, is called the complement graph of G. By a cycle, we mean a graph with vertices x1 , . . . , xm (with m ≥ 3) and edges x1 x2 , . . . , xm−1 xm , xm x1 . In that case, m is called the length of the cycle. The complement graph of a cycle (of length m) is called an anticycle (of length m). The path of length m − 1 (where m ≥ 2), denoted by Pm , is the graph with vertices x1 , . . . , xm and edges x1 x2 , . . . , xm−1 xm . A subgraph of G is a graph H such that V (H) ⊆ V (G) and E(H) ⊆ E(G). For a set of edges E ⊆ E(G), the deletion of G to E is the subgraph of G with the same vertex set as G and with the edge set E(G) \ E. If E consists of a single edge e, we denote G \ E simply by G \ e. A subgraph H of G is called an induced subgraph if for every pair (x, y) of vertices of H, x and y are adjacent in H if and only if they are adjacent in G. Clearly for any subset V of V (G), there exists a unique induced subgraph of G with the vertex set V . For a subset of vertices V ⊆ V (G), the deletion of G to V , denoted by G \ V is the induced subgraph of G on the vertex set V (G) \ V . If V consists of a single vertex x, then we denote G \ V simply by G \ x. For a graph G on the vertex set {x1 , . . . , xn }, let R be the polynomial ring on n variables, also denoted by x1 , . . . , xn . The edge ideal of G is I(G) = (xi xj : {xi , xj } is an edge of G) ⊆ R. We will usually refer to the symbol xi xj (where i 6= j, 1 ≤ i, j ≤ n) both as an edge of G and as a monomial of R. Instead of writing regR I(G) and ldR I(G), we will usually omit the obvious base ring and write simply reg I(G) and ld I(G). We refer to [39, Chapter 6] for a rich source of information about the theory of edge ideals. 2.4. Induced matchings. The graph with 2m vertices x1 , . . . , xm , y1 , . . . , ym (where m ≥ 1) and exactly m edges x1 y1 , . . . , xm ym is called the mK2 graph. Let G be a graph. A matching of G is a collection of edges e1 , . . . , em (where m ≥ 1) such that no two of them have a common vertex. The number m is then called the size of the matching. A matching e1 , . . . , em of G is an induced matching if the induced subgraph of G on the vertex set e1 ∪ · · · ∪ em is the mK2 graph. The induced matching number indmatch(G) is defined as the largest size of an induced matching of G. 2.5. Weakly chordal graphs. Definition 2.1. A graph G is said to be weakly chordal if every induced cycle in G or in Gc has length at most 4. G is said to be chordal if it does not contain any induced cycle of length greater than 3. We say that G is co-chordal if Gc is a chordal graph. Example 2.2. Every chordal graph is weakly chordal: for such a graph G, clearly G has no induced cycle of length greater than 3. Moreover, Gc has no induced cycle of length at least 5. LINEARITY DEFECT OF EDGE IDEALS 7 Indeed, if Gc contains an induced cycle of length 5, then taking the complement, we see that G contains an induced cycle of length 5. If Gc contains an induced cycle of length at least 6, then Gc contains an induced 2K2 . This implies that G contains an induced cycle of length 4. In any case, we get a contradiction. From the definition, G is weakly chordal if and only if Gc is weakly chordal. Hence the above arguments also show that every co-chordal graph is weakly chordal. Theorem 2.3 (Fröberg’s theorem [10]). Let G be a graph. Then the following statements are equivalent: (i) ld I(G) = 0; (ii) G is co-chordal; (iii) G is weakly chordal and indmatch(G) = 1. Proof. Since I(G) is generated in degree 2, (i) is equivalent to the condition that I(G) has 2linear resolution; see Section 2.2. Hence that (i) ⇐⇒ (ii) is a reformulation of Fröberg’s theorem. It is not hard to see that (ii) ⇐⇒ (iii).  3. Linearity defect and induced matchings Firstly we have the following simple change-of-rings statement. Lemma 3.1. Let (R, m) → (S, n) be a morphism of noetherian local rings such that grn S is a flat grm R-module. Let M be a finitely generated R-module. Then there is an equality ldR M = ldS (M ⊗R S). Proof. Let F be the minimal free resolution of M over R. Since grm R → grn S is a flat morphism, so is the map R → S. Hence F ⊗R S is a minimal free resolution of M ⊗R S over S. Observe that we have an isomorphism of complexes of grn S-modules linS (F ⊗R S) ∼ = linR F ⊗grm R (grn S). Indeed, at the level of modules, we wish to show   linS (F ⊗R S) i ∼ = linR F i ⊗grm R (grn S) (3.1) (3.2) as graded grn S-modules for each i ≥ 0. On the one hand, there is the following chain in which the first isomorphism follows from (2.1),   Fi R ∼ (lin F )i ⊗grm R (grn S) = ⊗R/m (grm R)(−i) ⊗grm R (grn S) mFi Fi ∼ ⊗R/m (grn S)(−i) = mFi   Fi ∼ ⊗R/m (S/n) ⊗S/n (grn S)(−i). = mFi On the other hand, also from (2.1), there is an isomorphism  Fi ⊗R S ⊗S/n (grn S)(−i). linS (F ⊗R S) i ∼ = n(Fi ⊗R S) 8 HOP D. NGUYEN AND THANH VU Since Fi is a free R-module, we have a natural isomorphism of (S/n)-modules Fi ⊗R S ∼ Fi ⊗R/m (S/n). = n(Fi ⊗R S) mFi Hence the isomorphisms of type (3.2) were established. We leave it to the reader to check that such isomorphisms give rise to an isomorphism at the level of complexes. Since grm R → grn S is a morphism of standard graded algebras, it is also faithfully flat. Hence the isomorphism (3.1) gives us sup{i : Hi (linR F ) 6= 0} = sup{i : Hi (linS (F ⊗R S)) 6= 0}, which is the desired conclusion.  Corollary 3.2. Let (R, m) → (S, n) be a flat extension of standard graded k-algebras, and I a homogeneous ideal of R. Then there are equalities ldR I = ldS (IS), regR I = regS (IS). Proof. For the first equality, use the graded analog of Lemma 3.1 for the map R → S and note that grm R ∼ = R. The second equality follows from the same line of thought and is even simpler.  Hence below, especially in Sections 5 and 6, whenever we work with a polynomial ring S, a polynomial subring R and an ideal I of R, there is no danger of confusion in writing simply ld I instead of ldR I or ldS (IS). The same remark applies to the regularity. Now we prove that for any graph G, ld I(G) is bounded below by indmatch(G) − 1. Although this inequality is simple, it becomes an equality for a non-trivial class of graphs – weakly chordal graphs. This will be proved in Theorem 5.5. Recall that a ring homomorphism θ : R → S is called an algebra retract if there exists a local homomorphism ϕ : S → R such that ϕ ◦ θ is the identity map of R. In such a case, ϕ is called the retraction map of the algebra retract θ. If R, S are graded rings, we require θ, ϕ to preserve the gradings. The following result can be proved in the same manner as [30, Lemma 4.7]. Note that the proof of ibid. depends critically on a result of Şega [36, Theorem 2.2] which was stated for local rings, but holds in the graded case as well. Lemma 3.3. Let θ : (R, m) → (S, n) be an algebra retract of standard graded k-algebras with the retraction map ϕ : S → R. Let I ⊆ m be a homogeneous ideal of R. Let J ⊆ n be a homogeneous ideal containing θ(I)S such that ϕ(J)R = I. Then there are inequalities ldR (R/I) ≤ ldS (S/J), ldR I ≤ ldS J, regR I ≤ regS J. Corollary 3.4. Let G be a graph and H an induced subgraph. Then there are inequalities reg I(H) ≤ reg I(G), ld I(H) ≤ ld I(G). Proof. Straightforward application of Lemma 3.3.  LINEARITY DEFECT OF EDGE IDEALS 9 A direct consequence is the following statement. The bound for the regularity in the next corollary is well-known; see [24, Lemma 2.2], [40, Lemma 7]. Corollary 3.5. Let G be a graph. Then there are inequalities ld I(G) ≥ indmatch(G) − 1, reg I(G) ≥ indmatch(G) + 1. Proof. Let m = indmatch(G) and x1 y1 , . . . , xm ym be an induced matching of G. Then by Corollary 3.4, ld I(G) ≥ ld(x1 y1 , . . . , xm ym ) = m − 1 = indmatch(G) − 1, where the second equality follows from direct inspection. The same proof works for the regularity.  It is of interest to find good upper bounds for the linearity defect of edge ideals in terms of the combinatorics of their associated graphs. A trivial bound exists: using Taylor’s resolution [18, Section 7.1], we have that ld I(G) is not larger than the number of edges of G minus 1. 4. Morphisms which induce trivial maps of Tor 4.1. Exact sequence estimates. The following result will be employed several times in the sequel. It was proved using Şega’s interpretation of the linearity defect in terms of Tor modules [36, Theorem 2.2]. Lemma 4.1 (Nguyen, [29, Proposition 2.5 and Corollary 2.10]). Let (R, m, k) be a noetherian local ring. Let 0 −→ M −→ P −→ N −→ 0 be an exact sequence of finitely generated R-modules. Denote R dP = inf{m ≥ 0 : TorR i (k, M) −→ Tori (k, P ) is the trivial map for all i ≥ m}, R dN = inf{m ≥ 0 : TorR i (k, P ) −→ Tori (k, N) is the trivial map for all i ≥ m}, R dM = inf{m ≥ 0 : TorR i+1 (k, N) −→ Tori (k, M) is the trivial map for all i ≥ m}. (i) There are inequalities ldR P ≤ max{ldR M, ldR N, min{dM , dN }}, ldR N ≤ max{ldR M + 1, ldR P, min{dM + 1, dP }}, ldR M ≤ max{ldR P, ldR N − 1, min{dP , dN − 1}}. (ii) If moreover P is a free module, then ldR M = ldR N − 1 if ldR N ≥ 1 and ldR M = 0 if ldR N = 0. Remark 4.2. Unfortunately, in general without the correcting terms dM , dN , dP , none of the “simplified” inequalities ldR P ≤ max{ldR M, ldR N}, ldR N ≤ max{ldR M + 1, ldR P }, ldR M ≤ max{ldR P, ldR N − 1}. is true. See [29, Example 2.9] for details. 10 HOP D. NGUYEN AND THANH VU We state now the main technical result of this section. Although the second inequality will not be employed much in the sequel, it might be of independent interest. φ Proposition 4.3. Let (R, m, k) be a noetherian local ring. Let M −→ P be an injective morTorR (k,φ) i phism of finitely generated R-modules, and N = Coker φ. Assume that TorR i (k, M) −−−−−→ R Tori (k, P ) is the trivial map for all i ≥ max{ldR M, ldR P − 1}. Then there are inequalities: ldR N ≤ max{ldR M + 1, ldR P }, ldR P ≤ max{ldR M, ldR N}. If additionally, the map TorR i (k, φ) is trivial for all i ≥ 0, then there is one further inequality ldR M ≤ max{ldR P, ldR N − 1}. Proof. We have an exact sequence of R-modules 0 −→ M −→ P −→ N −→ 0. Consider the number dP = inf{m ≥ 0 : TorR i (k, φ) is the trivial map for all i ≥ m}. By Lemma 4.1, there are inequalities ldR N ≤ max{ldR P, ldR M + 1, dP }, ldR M ≤ max{ldR P, ldR N − 1, dP }. By the hypothesis, dP ≤ max{ldR M, ldR P − 1}. Hence ldR N ≤ max{ldR M + 1, ldR P }. In the second part of the statement, dP = 0, hence ldR M ≤ max{ldR P, ldR N − 1}. It remains to show that if dP ≤ max{ldR M, ldR P − 1} then ldR P ≤ max{ldR M, ldR N}. If ldR P ≤ ldR M, then we are done. Assume that ldR P = s ≥ ldR M + 1, then s ≥ 1. Let F, G be the minimal free resolution of M, P , respectively. Let ϕ : F −→ G be a lifting of φ : M −→ P . By the hypothesis, ϕ ⊗R k is the zero map for all i ≥ s − 1, hence ϕ(Fi ) ⊆ mGi for all such i. The mapping cone of ϕ is a free resolution of N. Let L be this mapping cone, then L = G ⊕ F [−1]. Note that L is not necessarily minimal. Consider the complex H = L≥s−1 : · · · / Li / Li−1 / ··· / Ls / Ls−1 / 0, and U = Coker(Ls → Ls−1 ). Let Σs−1 U denote the complex with U in homological position s − 1 and 0 elsewhere. Then H is a minimal free resolution of Σs−1 U, as ϕ(Fi ) ⊆ mGi for all i ≥ s − 1. It is enough to show that ldR (Σs−1 U) ≥ s, namely ldR U ≥ 1. Indeed, using the fact that ldR U ≥ 1 and applying repeatedly Lemma 4.1(ii) for the complex 0 / U / Ls−2 / ··· / L1 / L0 / N / 0, we obtain ldR N = ldR U + s − 1 ≥ s. This gives us ldR P ≤ ldR N, as desired. Since Hs (linR G) 6= 0, there exists a cycle u ∈ mi Gs /(mi+1 Gs ) in (linR G)s which is not a boundary of linR G (where i ≥ 0). Let us show that the cycle mi Gs M mi Fs−1 , (u, 0) ∈ i+1 m Gs mi+1 Fs−1 LINEARITY DEFECT OF EDGE IDEALS 11 in (linR H)s is not a boundary of linR H. Assume the contrary is true. Denoting by ∂ F , ∂ G , ∂ H the differential of F, G, H, respectively, then there exists mi−1 Gs+1 M mi−1 Fs ⊆ (linR H)s+1 (u′, v ′ ) ∈ mi Gs+1 mi Fs such that (u, 0) = ∂ H (u′ , v ′ ) = (∂ G (u′ ) + ϕ(v ′), ∂ F (v ′ )). We have ∂ F (v ′ ) = 0. But v ′ ∈ (linR F )s and s ≥ ldR M + 1, so v ′ − ∂ F (v ′′ ) ∈ mi Fs for some v ′′ ∈ mi−2 Fs+1 . Applying ϕ, we obtain ϕ(v ′ ) − ∂ G (ϕ(v ′′ )) = ϕ(v ′ ) − ϕ(∂ F (v ′′ )) ∈ mi ϕ(Fs ). Observe that ϕ(Fs ) ⊆ mGs by the above argument. Hence the last chain gives ϕ(v ′ ) ≡ ∂ G (ϕ(v ′′ )) modulo mi+1 Gs . Combining the last statement with the equality u = ∂ G (u′ ) + ϕ(v ′), we have the following congruence modulo mi+1 Gs : 0 ≡ u − ∂ G (u′ ) − ϕ(v ′ ) ≡ u − ∂ G (u′ − ϕ(v ′′ )). Recall that v ′′ ∈ mi−2 Fs+1 , hence ϕ(v ′′ ) ∈ mi−2 ϕ(Fs+1 ) ⊆ mi−1 Gs+1 . The last inclusion follows from the fact that ϕ(Fi ) ⊆ mGi for i ≥ s − 1. Hence u ∈ mi Gs /(mi+1 Gs ) equals to the image of u′ − ϕ(v ′′ ) ∈ mi−1 Gs+1 /(mi Gs+1 ). This contradicts with the condition that u is not a boundary of linR G. Hence (u, 0) is not a boundary of linR H, and Hs (linR H) 6= 0, as desired. The last fact yields ldR (Σs−1 U) ≥ s, finishing the proof.  4.2. Betti splittings. Let (R, m, k) be a noetherian local ring. For a finitely generated Rmodule M, denote βi (M) = dimk TorR i (k, M) its i-th Betti number. Observe that β0 (M) equals the minimal number of generators of M. The following statement is an analog of [9, Proposition 2.1] and admits the same proof. Lemma 4.4. Let (R, m, k) be a noetherian local ring and I, J, K ⊆ m are ideals such that I = J + K. The following statements are equivalent: R R (i) for all i ≥ 0, the natural maps TorR i (k, J ∩ K) −→ Tori (k, J) and Tori (k, J ∩ K) −→ TorR i (k, K) are trivial; (ii) for all i ≥ 0, the equality βi (I) = βi (J) + βi (K) + βi−1 (J ∩ K) holds; (iii) the mapping cone construction for the map J ∩ K −→ J ⊕ K yields a minimal free resolution of I. The following concept is particularly useful to our purpose. It is a straightforward generalization of the notion introduced by Francisco, Hà, and Van Tuyl in [9, Definition 1.1]. Its modification for graded algebras and homogeneous ideals is routine. Definition 4.5. Let (R, m, k) be a noetherian local ring and I ⊆ m an ideal. A decomposition I = J + K of I, where J, K ⊆ m are ideals such that β0 (I) = β0 (J) + β0 (K), is called a Betti splitting if one of the equivalent conditions in Lemma 4.4 holds. 12 HOP D. NGUYEN AND THANH VU Remark 4.6. Strictly speaking, we do not need the condition β0 (I) = β0 (J) + β0 (K) in Definition 4.5 because of Lemma 4.4: in part (ii) of that lemma, choosing i = 0, we get β0 (I) = β0 (J) + β0 (K). However, we include this condition to stress the special feature of the decomposition of I as J + K. We record the following example of a Betti splitting for the sake of clarity. Example 4.7. Let (R1 , m), (R2 , n) be standard graded k-algebras and J ⊆ m, K ⊆ n be homogeneous ideals. Let I = J + K ⊆ R = R1 ⊗k R2 . We claim that the decomposition I = J + K is a Betti splitting. First, notice the following fact: Let M, N be finitely generated graded modules over R1 , R2 , respectively. Let FM , FN be the minimal free resolutions of M, N over R1 , R2 . Then FM ⊗k FN is a minimal free resolution of M ⊗k N over R. Next, consider the short exact sequence J ∼ R2 0 −→ JK −→ J −→ −→ 0. = J ⊗k JK K Let F and G be the minimal free resolutions of J and R2 /K over R1 and R2 , in that order. The map F −→ F ⊗k G naturally yields a lifting of the natural map J −→ J ⊗k (R2 /K). This R implies that the map TorR i (k, J) −→ Tori (k, J/(JK)) is injective for all i ≥ 0. From the above R exact sequence we get Tori (k, JK) −→ TorR i (k, J) is trivial for all i ≥ 0. It is an elementary R fact that JK = J ∩ K in R, thus the map TorR i (k, J ∩ K) −→ Tori (k, J) is also trivial for i ≥ 0. R R Similar arguments apply for the map Tori (k, J ∩ K) −→ Tori (k, K), hence the decomposition I = J + K is a Betti splitting. It is not hard to show that if R1 , R2 are polynomial rings and J, K are monomial ideals over them, then the decomposition I = J + K is an Eliahou-Kervaire splitting in the sense of [9]. Given a Betti splitting I = J + K, the projective dimension and regularity (in the graded case) of I can be read off from that of J, K and J ∩ K. Corollary 4.8 (See Hà and Van Tuyl [14, Theorem 2.3]). Let (R, m) be a noetherian local ring and I ⊆ m an ideal with a Betti splitting I = J + K. Then there is an equality pdR I = max{pdR J, pdR K, pdR (J ∩ K) + 1}. If moreover R is a standard graded k-algebra and I, J, K are homogeneous ideals then we also have regR I = max{regR J, regR K, regR (J ∩ K) − 1}. Proof. Straightforward from (the graded analog of) Lemma 4.4(ii).  Interestingly, the linearity defect stays under control as well in the presence of a Betti splitting. Theorem 4.9. Let (R, m) be a noetherian local ring, I ⊆ m an ideal with a Betti splitting I = J + K. Then there are inequalities ldR I ≤ max{ldR J, ldR K, ldR (J ∩ K) + 1}, max{ldR J, ldR K} ≤ max{ldR (J ∩ K), ldR I}, ldR (J ∩ K) ≤ max{ldR J, ldR K, ldR I − 1}. Proof. Applying Proposition 4.3 to the natural inclusion J ∩ K −→ J ⊕ K, we get the desired conclusion.  LINEARITY DEFECT OF EDGE IDEALS 13 We do not know any example of a Betti splitting I = J + K for which the inequality max{ldR J, ldR K} ≤ ldR I does not hold. A class of Betti splittings is supplied by the following Proposition 4.10. Let (R, m) be a noetherian local ring and I ⊆ m an ideal. Let J, L ⊆ m be ideals and 0 6= y ∈ m be an element such that I = J + yL and the following conditions are satisfied: (i) L is a Koszul ideal, (ii) J ∩ L ⊆ mL, (iii) y is a regular element w.r.t. (R/J), (iv) y is a regular element w.r.t. J and L, e.g. R is a domain. Then the decomposition I = J + yL is a Betti splitting. Moreover, there are inequalities ldR I ≤ max{ldR J, ldR (J ∩ L) + 1}, ldR J ≤ max{ldR (J ∩ L), ldR I}, ldR (J ∩ L) ≤ max{ldR J, ldR I − 1}. The following lemma is useful for the proof of Proposition 4.10 as well as that of Theorem 5.5. φ Lemma 4.11 (Nguyen, [29]). Let (R, m) be a noetherian local ring, and M −→ P be a morphism of finitely generated R-modules. Then the following statements hold: R (a) If for some ℓ ≥ ldR M, the map TorR i (k, M) −→ Tori (k, P ) is injective at i = ℓ, then that map is also injective for all i ≥ ℓ. (a1) In particular, if M is a Koszul module and φ−1 (mP ) = mM then the natural map R TorR i (k, M) −→ Tori (k, P ) is injective for all i ≥ 0. R (b) If for some ℓ ≥ ldR P , the map TorR i (k, M) −→ Tori (k, P ) is trivial at i = ℓ, then that map is also trivial for all i ≥ ℓ. (b1) In particular, if P is a Koszul module and φ(M) ⊆ mP then the map TorR i (k, M) −→ TorR (k, P ) is trivial for all i ≥ 0. i Proof. For (a) and (b), see [29, Lemma 2.8]. R For (a1), note that if φ−1 (mP ) = mM then the map TorR i (k, M) −→ Tori (k, P ) is injective at i = 0. Since M is Koszul, the conclusion follows from (a). Similar arguments work for (b1).  Proof of Proposition 4.10. Consider the following short exact sequence, in which the equality holds because of the assumption (iii): 0 / J ∩ yL = y(J ∩ L) / J ⊕ yL / I / 0. R R Since J ∩ L ⊆ J, the map TorR i (k, y(J ∩ L)) → Tori (k, J) factors through Tori (k, yJ) → R R TorR i (k, J). The last map is trivial since y is J-regular. Hence Tori (k, y(J ∩ L)) → Tori (k, J) is also the trivial map. Since y(J ∩ L) ∼ = L (by the assumption (iv)), the map TorR = J ∩ L, yL ∼ i (k, y(J ∩ L)) → R R R Tori (k, yL) can be identified with the map Tori (k, J ∩ L) → Tori (k, L). Since L is Koszul and J ∩ L ⊆ mL, the last map is trivial by Lemma 4.11(b1). Therefore TorR i (k, y(J ∩ L)) → R Tori (k, yL) is also the trivial map. This means that I = J + yL is a Betti splitting. For the remaining inequalities, note that J ∩ yL = y(J ∩ L) ∼ = J ∩ L, so Theorem 4.9 and the fact that ldR L = 0 yield the desired conclusion.  14 HOP D. NGUYEN AND THANH VU Let R = k[x1 , . . . , xn ] be a polynomial ring, I a monomial ideal and y one of the variables. The ideal I can be written as I = J + yL, where J is generated by monomials in I which are not divisible by y and yL is the ideal generated by the remaining generators of I. If y does not divide any minimal monomial generator of I, then J = I, L = 0. Following [9], we say that the unique decomposition I = J + yL is the y-partition of I. Among other things, the following result generalizes the second statement of [9, Corollary 2.7]. It will be employed in Section 6. Corollary 4.12. Let R = k[x1 , . . . , xn ] be a polynomial ring over k, where n ≥ 1. Let y be one of the variables. Let I be a monomial ideal and I = J + yL its y-partition. Assume that L is Koszul. Then I = J + yL is a Betti splitting and there are inequalities ldR I ≤ max{ldR J, ldR (J ∩ L) + 1}, ldR J ≤ ldR I, ldR (J ∩ L) ≤ max{ldR J, ldR I − 1}. In particular, either ldR I = ldR J ≥ ldR (J ∩ L), or ldR I = ldR (J ∩ L) + 1 ≥ ldR J + 1. Proof. It is straightforward to check that the conditions of Proposition 4.10 are satisfied. Hence the first and third inequalities follow. The second one is a consequence of Lemma 3.3. The last statement is an immediate consequence of the three inequalities.  5. Weakly chordal graphs and co-two-pairs The following notion will be important to inductive arguments with edge ideals of weakly chordal graphs. Definition 5.1. Two vertices x, y of a graph G form a two-pair if they are not adjacent and every induced path connecting them is of length 2. If x and y form a two-pair of Gc then we say that they are a co-two-pair. Clearly if two vertices form a co-two-pair then they are adjacent. By abuse of terminology, we also say that xy is a two-pair (or co-two-pair) of G if the pair x, y is so. Recall that a subset of vertices of a graph G is called a clique if every two vertices in that subset are adjacent. The existence of two-pairs is guaranteed by the following result. Lemma 5.2 (Hayward, Hoàng, Maffray [16, The WT Two-Pair Theorem, Page 340]). If G is a weakly chordal graph which is not a clique, then G contains a two-pair. A useful property of co-two-pairs is the following Lemma 5.3. If xy is a co-two-pair of a graph G, then any induced matching of G \ xy is also an induced matching of G. In particular, indmatch(G \ xy) ≤ indmatch(G). Proof. It suffices to prove the first part. Assume the contrary, there exists an induced matching of G \ xy which is not an induced matching of G. Then necessarily, there are two edges in this matching of the form xu and yv. But then in Gc , we have an induced path of length two xvuy. This contradicts the assumption that xy is a co-two-pair. The proof is concluded.  Another simple but useful property of co-two-pairs is the following LINEARITY DEFECT OF EDGE IDEALS 15 Lemma 5.4. Let G be a weakly chordal graph, and xy be a co-two-pair of G. Then G \ xy is also weakly chordal. Proof. From the definition of weak chordality, that G is weakly chordal is equivalent to Gc being weakly chordal. Note that (G \ xy)c is the addition of the edge xy to Gc . By [37, Edge addition lemma, Page 185], the graph (G \ xy)c is weakly chordal. Therefore G \ xy is weakly chordal itself.  Recall that a graph G is said to be weakly chordal if both G and Gc have no induced cycle of length 5 or larger. We can now prove Theorem 1.2 from the introduction. Theorem 5.5. Let G be a weakly chordal graph with at least one edge. Then: (i) For any co-two-pair e in G, the decomposition I(G) = (e) + I(G \ e) is a Betti splitting. (ii) There is an equality ld I(G) = indmatch(G) − 1. We remark that the argument below yields a new proof to the implication (ii) =⇒ (i) of Theorem 2.3 (Fröberg’s theorem). The reverse implication follows easily from Corollary 3.4 and Lemma 6.1. Proof of Theorem 5.5. For simplicity, whenever possible we will omit the obvious superscripts of Tor modules. Thanks to Corollary 3.2, we will systematically omit subscripts in writing regularity and linearity defect of ideals. Since (e) has 2-linear resolution and (e) ∩ I(G \ e) is generated in degree at least 3, the map Tori (k, (e) ∩ I(G \ e)) −→ Tori (k, (e)) is trivial for all i ≥ 0. Hence to prove that I(G) = (e) + I(G \ e) is a Betti splitting, it suffices to prove that the map Tori (k, (e) ∩ I(G \ e)) −→ Tori (k, I(G \ e)) is trivial for all i ≥ 0. We prove by induction on |E(G)| and indmatch(G) the following stronger result. Claim: Let G be a weakly chordal graph with at least one edge. Then the following statements hold: (S1) for any co-two-pair e in G, the natural map Tori (k, (e) ∩ I(G \ e)) −→ Tori (k, I(G \ e)) is trivial for all i ≥ 0, (S2) ld I(G) = indmatch(G) − 1, and, (S3) reg I(G) = indmatch(G) + 1. If G has only one edge then the statements are clear. Assume that G has at least 2 edges and indmatch(G) = 1. Let e = xy and consider the exact sequence 0 / (xy)(I(G \ e) : xy) / I(G \ e) ⊕ (xy) / I(G) / 0, Let y1 , . . . , yp be elements of the set N(x) ∪ N(y) \ {x, y}. Since indmatch(G) = 1, any edge of G \ e contains at least a neighbor of either x or y. Therefore I(G \ e) : xy = (y1 , . . . , yp ). Clearly p ≥ 1, so the first term in the above exact sequence has regularity reg(y1 , . . . , yp ) + 2 = 3. By Lemmas 5.3 and 5.4, G \ e is weakly chordal of induced matching number 1. Hence by the induction hypothesis, I(G \ e) has 2-linear resolution. From the last exact sequence, we deduce 16 HOP D. NGUYEN AND THANH VU that reg I(G) ≤ 2, proving (S2) and (S3). Since (e) ∩ I(G \ e) is generated in degree at least 3 and reg I(G \ e) = 2, statement (S1) is true by inspecting degrees. Therefore the case |E(G)| ≥ 2 and indmatch(G) = 1 was established. Now assume that |E(G)| ≥ 2 and indmatch(G) ≥ 2. We divide the remaining arguments into several steps. Step 1: We derive statements (S2) and (S3) by assuming that the statement (S1) is true. Since Gc is not a clique, by Lemma 5.2, there exists a co-two-pair xy in G. Denote e = xy, W = I(G \ e). Consider the short exact sequence 0 / (e) ∩ W / W ⊕ (e) / I(G) / 0. (5.1) Denote by L the ideal generated by the variables in N(x) ∪ N(y) \ {x, y}. Denote by H the induced subgraph of G on the vertex set G \ (N(x) ∪ N(y)). Then (e) ∩ W = e(W : e) = e(L + I(H)) ∼ = (L + I(H)) (−2), We have indmatch(H) ≤ indmatch(G) − 1, since we can add xy to any induced matching of H to obtain a larger induced matching in G. Since H is an induced subgraph of G, it is weakly chordal. Using [30, Lemma 4.10(ii)] and the induction hypothesis for H, we obtain the first and second equality, respectively, in the following display ld((e) ∩ W ) = ld I(H) = indmatch(H) − 1 ≤ indmatch(G) − 2. Similarly, there is a chain reg((e) ∩ W ) = reg(L + I(H)) + 2 = reg I(H) + 2 = indmatch(H) + 3 ≤ indmatch(G) + 2. The second equality in the chain holds since I(H) and L live in different polynomial subrings. By Lemma 5.4, G \ e is again weakly chordal. Now there is a chain ld W = ld I(G \ e) = indmatch(G \ e) − 1 ≤ indmatch(G) − 1, (5.2) in which the second equality follows from the induction hypothesis, the last inequality from Lemma 5.3. Similarly, the induction hypothesis gives reg W = indmatch(G \ e) + 1 ≤ indmatch(G) + 1. Since (S1) was assumed to be true, the decomposition I(G) = (e) + I(G \ e) is a Betti splitting. So using Theorem 4.9, we get ld I(G) ≤ max{ld((e) ∩ W ) + 1, ld W, ld(e)} ≤ indmatch(G) − 1. Together with Corollary 3.5, we get (S2). From the sequence (5.1), we also see that reg I(G) ≤ max{reg((e) ∩ W ) − 1, reg W, reg(e)} ≤ indmatch(G) + 1. The reverse inequality is true by Corollary 3.5, thus we obtain (S3). Step 2: Set g = indmatch(G), then g ≥ 2 by our working assumption. In order to prove (S1), it suffices to prove the following weaker statement: the map Tori (k, (e) ∩ W ) −→ Tori (k, W ) is trivial for all i ≤ g − 1. LINEARITY DEFECT OF EDGE IDEALS 17 Indeed, since e is a co-two-pair, by Lemma 5.4, we get that G \ e is weakly chordal. Furthermore, similarly to the chain (5.2) in Step 1, we have ld W = indmatch(G \ e) − 1 ≤ g − 1. Combining the last inequality with the statement, we deduce that Tori (k, (e) ∩ W ) −→ Tori (k, W ) is trivial for all i ≤ ld W . An application of Lemma 4.11(b) for the map (e) ∩ W −→ W implies that Tori (k, (e) ∩ W ) −→ Tori (k, W ) is also trivial for all i ≥ ld W . Step 3: It remains to prove the statement that the map φ : Tori (k, (e) ∩ W ) −→ Tori (k, W ) is trivial for i ≤ g − 1. Since G \ e is weakly chordal and indmatch(G \ e) ≤ g, we infer from the induction hypothesis for G \ e that reg W = reg I(G \ e) = indmatch(G \ e) + 1 ≤ g + 1. Hence it suffices to show that the map φj Tori (k, (e) ∩ W )j −→ Tori (k, W )j is trivial for all j ≤ i + g + 1 ≤ 2g. Since (e)∩W and W are squarefree monomial ideals, it suffices to prove the claim for squarefree multidegrees; see [11, Theorem 2.1 and Lemma 2.2]. So we will show that φm = 0 for each squarefree monomial m of degree ≤ 2g. Furthermore, by the just cited results, it is harmless to assume that e divides m and supp(m) ⊆ V (G). Let G† be the induced subgraph of G on the vertex set supp m, and W≤m the submodule of W generated by elements whose multidegree divides m. By [33, Proposition 3.10], there is a chain TorR (k, W )m ∼ = TorR (k, W≤m )m = TorR (k, I(G† \ e))m i i i for all i ≥ 0. For the same reason, R † ∼ TorR i (k, (e) ∩ W )m = Tori (k, (e) ∩ I(G \ e))m for all i ≥ 0. Note that e is automatically a co-two-pair of G† , and |V (G† )| = | supp(m)| ≤ 2g. Denote S = k[xi | xi ∈ supp(m)]. If indmatch(G† ) ≤ g − 1 then as G† is also weakly chordal, the induction hypothesis for G† implies that the map TorSi (k, (e) ∩ I(G† \ e)) −→ TorSi (k, I(G† \ e)) is trivial for all i ≥ 0. Since S −→ R is a faithfully flat extension, we also get that R † † TorR i (k, (e) ∩ I(G \ e)) −→ Tori (k, I(G \ e)) is trivial for all i ≥ 0. In particular, the last map is trivial for i ≤ g − 1, which is the desired conclusion. If indmatch(G† ) ≥ g, then having at most 2g vertices, there is no possibility for G† other than being a gK2 . After relabeling the vertices of G† , assume that G† has vertices x1 , . . . , xg , z1 , . . . , zg , edges x1 z1 , . . . , xg zg , and e = x1 z1 . Denote J = (x2 z2 , . . . , xg zg ) ⊆ S = k[x1 , . . . , xg , z1 , . . . , zg ]. What we have to show is TorSi (k, (x1 z1 ) ∩ J) −→ TorSi (k, J) 18 HOP D. NGUYEN AND THANH VU is trivial for i ≤ g − 1. This is easy: in fact we prove the claim for all i ≥ 0. First note that (x1 z1 ) ∩ J = (x1 z1 )J, and x1 z1 is J-regular. Hence the map TorSi (k, (x1 z1 ) ∩ J) −→ TorSi (k, J) is nothing but the multiplication with x1 z1 of TorSi (k, J). The latter is a trivial map. This finishes the induction step and the proof of the theorem.  Remark 5.6. Let R = k[x1 , . . . , xn ] be a standard graded polynomial ring over k (where n ≥ 0), and I a monomial ideal of R. Let J, K be monomial ideals of R such that I = J +K. A sufficient condition for the decomposition I = J + K to be a Betti splitting is that I is a splittable ideal with the (Eliahou-Kervaire) splitting as J + K; see [15, Definition 2.3 and Theorem 2.4]. Following Hà and Van Tuyl [15, Definition 3.1], we say that an edge e of a graph G is a splitting edge if the decomposition I(G) = (e)+I(G\e) makes I(G) into a splittable ideal. Splitting edges (of hypergraphs) are characterized in [15, Theorem 3.2]. By the above discussion, any splitting edge yields a Betti splitting in the sense that if e is a splitting edge of G, then I(G) = (e)+I(G\e) is a Betti splitting. Theorem 5.5(i) produces a new class of Betti splittings which do not come from splitting edges. For example, let G = C4 and e be any of its edge. The conditions of Theorem 5.5 are satisfied, so I(G) = (e) + I(G \ e) is a Betti splitting. Nevertheless, it is easy to check that e is not a splitting edge of G since it does not satisfy the condition specified in [15, Theorem 3.2]. 6. Cycles The linearity defect of edge ideals of anticycles is known; we recall the statement here. The following lemma is contained in [32, Theorem 5.1], which calls upon the case d = 2 of Example 4.7 in the same paper. We give a brief argument for the sake of clarity. Lemma 6.1 (See Okazaki and Yanagawa [32, Theorem 5.1]). Let G be the anticycle of length n ≥ 4. Then ld I(G) = n − 3. Proof. It is well-known, e.g. from [3, Theorem 5.6.1], that R/I(G) is Gorenstein of dimension 2. Therefore the resolution of R/I(G) is symmetric of length n − 2. In particular, the last differential matrix of the minimal free resolution F of R/I(G) is a column of elements of degree 2. This implies that Hn−2 (linR F ) 6= 0. Therefore ldR R/I(G) = n − 2. Since n − 2 ≥ 2, the last equality implies that ldR I(G) = n − 3.  The main result of this section is Theorem 6.2. Let Cn be the cycle of length n, where n ≥ 3. Then ld I(Cn ) = 2⌊ n−2 ⌋. 3 Proof. We prove by induction on n. For simplicity, we omit the subscript concerning the ring in the notation of linearity defect. The case n ∈ {3, 4} is a straightforward application of Fröberg’s theorem. The case n = 5 follows from Lemma 6.1. Assume that the conclusion is true up to n ≥ 5, we establish it for n + 1. Let Pn , as usual, be the path with edges x1 x2 , x2 x3 , . . . , xn−1 xn . By Corollary 4.12 we have that the xn+1 -partition I(Cn+1 ) = I(Pn ) + xn+1 (x1 , xn ) is a Betti splitting since (x1 , xn ) is Koszul. By Corollary 4.12 we also get ld I(Cn+1 ) ≤ max{ld I(Pn ), ld (I(Pn ) ∩ (x1 , xn )) + 1}, ld (I(Pn ) ∩ (x1 , xn )) ≤ max{ld I(Pn ), ld I(Cn+1 ) − 1}. (6.1) (6.2) LINEARITY DEFECT OF EDGE IDEALS 19 Denote I = I(Pn ) ∩ (x1 , xn ). Then I = x1 (x2 , x3 x4 , x4 x5 , . . . , xn−2 xn−1 ) + xn (x2 x3 , x3 x4 , . . . , xn−3 xn−2 , xn−1 ). By abuse of notation, denote I(Pn−4 ) = (x3 x4 , x4 x5 , . . . , xn−3 xn−2 ). By convention, for n = 5, I(P1 ) = 0. Denote J = (x2 , x3 x4 , x4 x5 , . . . , xn−2 xn−1 ) = (x2 , xn−2 xn−1 ) + I(Pn−4 ), and L = (x2 x3 , x3 x4 , . . . , xn−3 xn−2 , xn−1 ) = (x2 x3 , xn−1 ) + I(Pn−4 ). With the above notation, I = x1 J + xn L. Claim: The decomposition I = x1 J + xn L is a Betti splitting. Indeed, consider the exact sequence 0 / x1 J ∩ xn L = x1 xn (J ∩ L) / x1 J ⊕ xn L / I / 0. R R Take i ≥ 0. The map TorR i (k, x1 xn (J ∩ L)) → Tori (k, x1 J) factors through Tori (k, x1 xn J) → TorR i (k, x1 J), which is the trivial map. Hence the former map is also trivial. Arguing similarly R for the map TorR i (k, x1 xn (J ∩ L)) → Tori (k, xn L), we get the claim. ∼ ∼ Note that J = (x2 ) + I(Pn−3 ) and L = (xn−1 ) + I(Pn−3). Hence by [30, Lemma 4.10(ii)], ld J = ld L = ld I(Pn−3). Thanks to Corollary 7.5 (which is a direct consequence of Theorem 5.5), we then obtain   n−2 − 1. ld J = ld L = 3 Furthermore, J ∩ L = (x2 x3 , x3 x4 , . . . , xn−2 xn−1 , x2 xn−1 ) ∼ = I(Cn−2 ). Hence by the induction hypothesis,   n−4 ld(x1 J ∩ xn L) = ld(J ∩ L) = ld I(Cn−2 ) = 2 . 3 Since I = x1 J + xn L is a Betti splitting, Theorem 4.9 yields the inequalities ld I ≤ max{ld J, ld L, ld(J ∩ L) + 1}, ld(J ∩ L) ≤ max{ld J, ld L, ld I − 1}. (6.3) (6.4) Now we distinguish three cases according to whether n = 5, or n = 6, or n ≥ 7. Case 1: Consider the case n = 5. Now J = (x2 , x3 x4 ), L = (x2 x3 , x4 ) and I = x1 J + x5 L = (x1 x2 , x4 x5 , x1 x3 x4 , x2 x3 x5 ). Since J ∩ L = (x2 x3 , x3 x4 , x2 x4 ), we see from (6.3) that ld I ≤ 1. Using (6.1), we obtain ld I(C6 ) ≤ 2. Let U = (x1 x6 , x1 x2 , x2 x3 ), V = (x3 x4 , x4 x5 , x5 x6 ), then they are ideals with 2-linear resolutions. Clearly I(C6 ) = U + V . Obviously U ∩ V ⊆ mU and U ∩ V ⊆ mV , hence Lemma 4.11(b1) implies that the decomposition I(C6 ) = U +V is a Betti splitting. Using Theorem 4.9, we obtain an inequality ld(U ∩ V ) ≤ ld I(C6 ) − 1. If ld I(C6 ) < 2 then ld(U ∩ V ) = 0. On the other hand, (U ∩ V )h3i = (x1 x5 x6 , x2 x3 x4 ) does not have 3-linear resolution. This is a contradiction. So ld I(C6 ) = 2, as desired. Case 2: Consider the case n = 6. Arguing as in the case n = 5, we obtain ld I(C7 ) ≤ 2. Let the presentation of I(C7 ) be F/M, where F = R(−2)7 has a basis e1 , . . . , e7 such that ei maps to xi xi+1 for i = 1, . . . , 6 and e7 maps to x7 x1 . Since M ⊆ mF , obviously Mj = 0 for 20 HOP D. NGUYEN AND THANH VU j ≤ 2. It is easy to check that the following 7 elements belong to k-vector space M3 and they are k-linearly independent: f1 = x3 e1 − x1 e2 , f2 = x4 e2 − x2 e3 , f3 = x5 e3 − x3 e4 , f4 = x6 e4 − x4 e5 , f5 = x7 e5 − x5 e6 , f6 = x1 e6 − x6 e7 , f7 = x2 e7 − x7 e1 . There is an exact sequence of k-vector spaces 0 −→ M3 −→ F3 −→ I(C7 )3 −→ 0. It is not hard to see that dimk F3 = 49 and dimk I(C7 )3 = 42, hence dimk M3 = 7. In particular, M3 is generated by exactly the above elements. Let N = Mh3i . If ld I(C7 ) ≤ 1 then M must be Koszul, hence N must have a 3-linear resolution. Note that N is not a free module since we can check directly that x4 x5 x6 x7 f1 + x1 x5 x6 x7 f2 + x1 x2 x6 x7 f3 + x1 x2 x3 x7 f4 + x1 x2 x3 x4 f5 + x2 x3 x4 x5 f6 + x3 x4 x5 x6 f7 = 0. In particular, N has at least one non-trivial linear syzygy. So there exist linear forms a1 , . . . , a7 in R, not all of which are zero, such that a1 f1 + · · · + a7 f7 = 0. Looking at the coefficients of e1 and e2 , we get a1 x3 = a7 x7 , a1 x1 = a2 x4 . This implies that x7 and x4 divide a1 , which yields a1 = 0. From the two equations in the last display, we deduce that a2 = a7 = 0. Similarly, we get a3 = · · · = a6 = 0, a contradiction. Hence N does not have a 3-linear resolution, and thus ld I(C7 ) ≥ 2. Hence ld I(C7 ) = 2, as desired.  n−4  > Case 3: Now assume that n ≥ 7. Elementary considerations show that ld(J ∩ L) = 2 3  n−2  −1 = ld J 3  n−4  = ld L. Hence from the inequalities (6.3) and (6.4), we obtain ld I = ld(J ∩ L) + 1 = 2 3 + 1.     + 1 > n−2 = ld I(Pn ) for all n ≥ 7. So inspecting From the above discussions, ld I = 2 n−4 3 3 (6.1) and (6.2), we obtain     n−1 n−4 +2=2 . ld I(Cn+1) = ld I + 1 = 2 3 3 The induction step and hence the proof is now completed.  7. Applications 7.1. Regularity. The proof of Theorem 5.5 yields the following consequence. Corollary 7.1 (Woodroofe, [40, Theorem 14]). Let G be a weakly chordal graph with at least one edge. Then there is an equality reg I(G) = indmatch(G) + 1. Remark 7.2. Woodroofe’s proof of his result depends on the Kalai-Meshulam’s inequality [23], which asserts that for a polynomial ring R = k[x1 , . . . , xn ] (where n ≥ 1), and squarefree monomial ideals I1 , . . . , Im (where m ≥ 2), there is an inequality reg(I1 + I2 + · · · + Im ) ≤ reg I1 + reg I2 + · · · + reg Im − m + 1. LINEARITY DEFECT OF EDGE IDEALS 21 However, the following example shows that there is no hope for a straightforward analog of the Kalai-Meshulam’s inequality for linearity defect. Example 7.3. Take I to be the edge ideal of the anticycle of length n where n ≥ 5. Let I1 be the edge ideal of the induced subgraph of the anticycle on the vertex set {x1 , . . . , xn−1 }, and I2 = (x2 xn , . . . , xn−2 xn ). Clearly I = I1 + I2 . Moreover ldR I1 = 0, since I1 is the edge ideal of a co-chordal graph, and ldR I2 = 0 since I2 ∼ = (x2 , . . . , xn−2 ). On the other hand, by Lemma 6.1, ldR (I1 + I2 ) = n − 3. 7.2. Chordal graphs. In view of Example 2.2, an immediate corollary of Theorem 5.5 is Corollary 7.4. Let G be a chordal graph with at least one edge. Then there is an equality ld I(G) = indmatch(G) − 1. We can give a simplified proof of this result, using a Betti splitting statement in [15]. Alternative proof of Corollary 7.4. By Corollary 3.5, it is enough to show that ld I(G) ≤ indmatch(G) − 1. We use induction on |V (G)| and |E(G)|. The case G has at most 3 vertices is immediate. It is equally easy if |E(G)| = 1. Assume that |V (G)| ≥ 4 and |E(G)| ≥ 2. By a classical result due to Dirac, there exists a vertex of G whose neighbors form a clique (such a vertex is called a simplicial vertex). Working with a connected component of G with at least one edge if necessary, we can assume that the vertex in question has at least one neighbor. Assume that x is a simplicial vertex and y is a vertex in N(x). By [15, Lemma 5.7(i)] and the discussion in Remark 5.6, I(G) = (xy) + I(G \ xy) is a Betti splitting. By Theorem 4.9, we obtain ld I(G) ≤ max{ld I(G \ xy), ld(I(G \ xy) ∩ (xy)) + 1}. (7.1) Let L be the ideal generated by the variables in N(x) ∪ N(y) \ {x, y}. Let H be the induced subgraph of G on the vertex set V (G) \ (N(x) ∪ N(y)). Then I(G \ xy) ∩ (xy) = (xy)(I(G \ xy) : xy) = (xy)(L + I(H)). In particular, [30, Lemma 4.10(ii)] yields the second equality in the following display ld(I(G \ xy) ∩ (xy)) = ld(L + I(H)) = ld I(H). Substituting in (7.1), it follows that ld I(G) ≤ max{ld I(G \ xy), ld I(H) + 1}. We know that G \ xy and H are also chordal graphs; see [15, Lemma 5.7]. Moreover, we have indmatch(H) ≤ indmatch(G) − 1 as seen in the proof of Theorem 5.5. It is routine to check that xy is a co-two-pair. Thus by Lemma 5.3, we obtain indmatch(G \ xy) ≤ indmatch(G). Now by the induction hypothesis, ld I(G) ≤ max{ld I(G \ xy), ld I(H) + 1} ≤ max{indmatch(G \ xy) − 1, indmatch(H)}, which is not larger than indmatch(G) − 1. The proof is now completed.  Recall that G is called a forest if it contains no cycle. The connected components of a forest are trees. As a consequence of Corollary 7.4, we get 22 HOP D. NGUYEN AND THANH VU Corollary 7.5. Let G be a forest with at least one edge. Then ld I(G) = indmatch(G) − 1. In particular, let Pn be the path of length n − 1 (where n ≥ 2), then ld I(Pn ) = ⌊ n−2 ⌋. 3 Proof. For the first part, note that any forest is chordal. Hence Corollary 7.4 applies. For the second, use the simple fact that indmatch(Pn ) = ⌊ n+1 ⌋. 3  7.3. Linearity defect one. Now we prove Theorem 1.1 from the introduction. Together with Theorem 2.3, the next result gives the extension of Fröberg’s theorem advertised in the abstract. Theorem 7.6. Let G be a graph. Then ld I(G) = 1 if and only if G is weakly chordal and indmatch(G) = 2. Proof. For the “only if” direction: By Lemma 6.1 and Theorem 6.2, the linearity defect of any cycle/anticycle of length at least 5 is greater than or equal to 2. Hence Corollary 3.4 implies that G has to be weakly chordal. Obviously, for example by using Taylor’s resolution, we have that any homogeneous syzygy of I(G) is either linear or quadratic, hence the first syzygy of I(G) is generated in degree at most 4. But ld I(G) ≤ 1, so the first syzygy of I(G) is Koszul, hence from Section 2.2, its regularity is also at most 4. As I(G) is generated in degree 2, this implies that reg I(G) ≤ 3. But ld I(G) > 0, so reg I(G) = 3. By Corollary 7.1, we deduce that indmatch(G) = 2, as desired.  The “if” direction follows from Theorem 5.5. 7.4. Projective dimension. First, recall that a graph G = (V, E) is called a bipartite graph if (i) the vertex set V is a disjoint union of two subsets V1 and V2 , (ii) if two vertices are adjacent then they are not both elements of Vi for any i ∈ {1, 2}. In this case, the decomposition of V as V1 ∪ V2 is called its bipartite partition. We also denote G by (V1 , V2 , E) given a bipartite partition V1 ∪ V2 of the vertex set. A bipartite graph G = (V1 , V2 , E) is called a complete bipartite graph if E = {{x, y} : x ∈ V1 , y ∈ V2 }. In this section, we will use the notion of a strongly disjoint family of complete bipartite subgraphs, introduced by Kimura [27], to compute the projective dimension of edge ideals of weakly chordal graphs. For a graph G, we consider all families of (non-induced) subgraphs B1 , . . . , Bg of G such that (i) each Bi is a complete bipartite graph for 1 ≤ i ≤ g, (ii) the graphs B1 , . . . , Bg have pairwise disjoint vertex sets, (iii) there exist an induced matching e1 , . . . , eg of G for which ei ∈ E(Bi ) for 1 ≤ i ≤ g. Such a family is termed a strongly disjoint family of complete bipartite subgraphs. We define ( g ) X d(G) = max |V (Bi )| − g i=1 where the maximum is taken over all the strongly disjoint families of complete bipartite subgraphs B1 , . . . , Bg of G. The following result is a generalization of [26, Theorem 4.1(1)] and [5, Corollary 3.3]; the latter was reproved in [27, Corollary 5.3]. Theorem 7.7. Let G be a weakly chordal graph with at least one edge. Then there is an equality pd I(G) = d(G) − 1. LINEARITY DEFECT OF EDGE IDEALS 23 The inequality pd I(G) ≥ d(G) − 1 was established by Kimura’s work [27]. The following lemma, which might be of independent interest, is the crux in proving the reverse inequality. We are grateful to an anonymous referee for suggesting the main idea of the proof of the lemma. Lemma 7.8. Let x1 x2 be a co-two-pair of a graph G. Then there is a complete bipartite subgraph of G with the vertex set N(x1 ) ∪ N(x2 ) (the last union need not be the bipartite partition for that subgraph). Proof. Let V be the set N(x1 ) ∪ N(x2 ). Define the subsets V1,n and V2,n of V inductively on n ≥ 0 as follows: V1,0 = {x1 }, V2,0 = {x2 }. For n ≥ 0, we let V1,n+1 = V1,n ∪ {z ∈ V : V1,n 6⊆ N(z)}, and similarly V2,n+1 = V2,n ∪ {z ∈ V : V2,n 6⊆ N(z)}. Clearly V1,n ⊆ V1,n+1 and V2,n ⊆ V2,n+1 for all n ≥ 0. We set V1,−1 = V2,−1 = ∅ for systematic reason. Our aim is to prove the following statements: (i) V1,n ⊆ {z ∈ V : V2,n−1 ⊆ N(z)}, and V2,n ⊆ {z ∈ V : V1,n−1 ⊆ N(z)}, (ii) V1,n ∩ V2,n = ∅, (iii) G has a complete bipartite subgraph with the bipartite partition V1,n ∪ V2,n . Let us use induction on n. If n = 0, then (i) holds vacuously, while V1,0 = {x1 }, V2,0 = {x2 } therefore (ii) and (iii) are also true. Assume that the statements (i) – (iii) are true for n ≥ 0. We establish them for n + 1. For (i): if (i) was not true, we can assume that V1,n+1 6⊆ {z ∈ V : V2,n ⊆ N(z)}. Choose z ∈ V1,n+1 such that V2,n 6⊆ N(z). Clearly z ∈ / V1,n because of the induction hypothesis for (iii). Hence the definition of V1,n+1 forces V1,n 6⊆ N(z). Again the last non-containment implies that z∈ / V2,n . As N(z) contains neither V1,n nor V2,n , we can choose xi,n ∈ Vi,n such that xi,n ∈ / N(z) for i = 1, 2. By the definition of V1,n we can choose nr ≥ 0 such that x1,n ∈ V1,nr \ V1,nr −1 (recall that V1,−1 = ∅). Set x1,nr = x1,n . Since x1,nr ∈ V1,nr \ V1,nr −1 , there exists x1,nr−1 ∈ V1,nr −1 such that x1,nr and x1,nr−1 are not adjacent. Continuing this argument, finally we find a sequence of indices 0 = n0 < n1 < · · · < nr ≤ n and vertices x1 = x1,n0 , x1,n1 , . . . , x1,nr = x1,n such that x1,ni ∈ V1,ni \ V1,ni −1 for all 0 ≤ i ≤ r and x1,ni and x1,ni+1 are not adjacent for 0 ≤ i ≤ r − 1. Similarly, there exist a sequence of indices 0 = m0 < m1 < · · · < ms ≤ n and vertices x2 = x2,m0 , x2,m1 , . . . , x2,ms = x2,n such that x2,mj ∈ V2,mj \ V2,mj −1 for all 0 ≤ j ≤ s and x2,mj and x2,mj+1 are not adjacent for 0 ≤ j ≤ s − 1. Note that we have a path, called P , with vertices x1 = x1,n0 , x1,n1 , . . . , x1,nr = x1,n , z, x2,n = x2,ms , x2,ms−1 , . . . , x2,m0 = x2 connecting x1 and x2 in Gc with length r + s + 2 (see Figure 1). We claim that this is an induced path and its length is > 2. For the second part of the last claim, it suffices to observe that r and s cannot be both zero, otherwise z ∈ V but z ∈ / N(x1 ) ∪ N(x2 ), which is absurd. For the first part, note that as z∈ / V1,n ∪ V2,n , we have V1,n−1 ∪ V2,n−1 ⊆ N(z). Hence z is adjacent (in G) to all the vertices in 24 HOP D. NGUYEN AND THANH VU x1 = x1,n0 x2,m0 = x2 x1,n1 x2,m1 .. . .. . x1,nr−1 x2,ms−1 x1,nr x2,ms z Figure 1. The path P in Gc P except x1,n and x2,n . Since G has a complete bipartite subgraph with vertex set V1,n ∪ V2,n , it is clear that x1,ni is adjacent to x2,mj for all 0 ≤ i ≤ r, 0 ≤ j ≤ s. Now consider 0 ≤ i, j ≤ r such that i ≤ j − 2. We wish to show that x1,ni and x1,nj are adjacent. As x1,nj ∈ V1,nj \ V1,nj −1 , we see that V1,nj −2 ⊆ N(x1,nj ). Since i ≤ j − 2, clearly ni ≤ nj − 2, hence x1,ni ∈ V1,nj −2 ⊆ N(x1,nj ). Therefore x1,ni and x1,nj are adjacent. Similarly, for 0 ≤ i, j ≤ s with i ≤ j − 2, the vertices x2,mi and x2,mj are adjacent. This shows that P is an induced path connecting x1 and x2 in Gc with length > 2. But then we get a contradiction, since x1 x2 is a co-two-pair. In other words, we have V1,n+1 ⊆ {z ∈ V : V2,n ⊆ N(z)} and similarly V2,n+1 ⊆ {z ∈ V : V1,n ⊆ N(z)}. This finishes the induction step for (i). For (ii): assume that there exists z ∈ V1,n+1 ∩ V2,n+1 . As we have seen, V2,n+1 ⊆ {z ∈ V : V1,n ⊆ N(z)}. So the definition of V1,n+1 yields z ∈ V1,n . Similarly, z ∈ V2,n , but then V1,n ∩ V2,n 6= ∅, a contradiction. This finishes the induction step for (ii). For (iii): taking z1 ∈ V1,n+1 and z2 ∈ V2,n+1 , we want to show that {z1 , z2 } ∈ E(G). First, assume that z1 ∈ V1,n . From (i), we have the second inclusion in the following chain z2 ∈ V2,n+1 ⊆ {z ∈ V : V1,n ⊆ N(z)}, hence z1 is adjacent to z2 . Hence it suffices to consider the case z1 ∈ / V1,n and for the same reason, we restrict ourselves to the case z2 ∈ / V2,n . Note that z1 ∈ / V2,n since V1,n+1 ∩ V2,n ⊆ V1,n+1 ∩ V2,n+1 = ∅. Hence z1 ∈ / V1,n ∪ V2,n , and the same thing happens for z2 . Assume that on the contrary, {z1 , z2 } ∈ / E(G). As in the induction step for (i), we can choose a sequence of indices 0 = n0 < · · · < nr ≤ n + 1 (where r ≥ 0) and elements x1 = x1,n0 , x1,n1 , . . . , x1,nr = z1 such that x1,ni ∈ V1,ni \ V1,ni −1 for 0 ≤ i ≤ r and x1,ni and x1,ni+1 are not adjacent for 0 ≤ i ≤ r − 1. Similarly, we can choose a sequence of indices 0 = m0 < LINEARITY DEFECT OF EDGE IDEALS 25 · · · < ms ≤ n + 1 (where s ≥ 0) and elements x2 = x2,m0 , x2,m1 , . . . , x2,ms = z2 with the similar properties. Since z1 ∈ / V1,n and x1 ∈ V1,n , we have that r ≥ 1. Analogously, s ≥ 1. Since {z1 , z2 } ∈ / E(G), we have a path x1 = x1,n0 , x1,n1 , . . . , x1,nr = z1 , z2 = x2,ms , x2,ms−1 , . . . , x2,m0 = x2 of length r + s + 1 ≥ 3 connecting x1 and x2 in Gc . As in the induction step for (i), we see that the last path is an induced path in Gc . Again this yields a contradiction since x1 x2 is a co-two-pair. So {z1 , z2 } ∈ E(G), as desired. This finishes the induction step for (iii), so that all the statements (i)–(iii) are true. Since {V1,n }n≥0 and {V2,n }n≥0 are two monotonic sequences (with respect to inclusion) consisting of subsets of the finite set V , there exist q ≥ 0 such that V1,n = V1,n+1 , V2,n = V2,n+1 for all n ≥ q. If V = V1,q ∪ V2,q then we are done by statement (iii). Otherwise, consider an element z ∈ V \ (V1,q ∪ V2,q ). We have z ∈ / V1,q+1 = V1,q , so V1,q ⊆ N(z). Enlarging V2,q with all such elements z of V , again we see that there is a complete bipartite subgraph of G with the vertex set V . Hence the lemma is now proved.  Proof of Theorem 7.7. That pd I(G) ≥ d(G) − 1 follows from [27, Theorem 1.1]. We prove the reverse inequality by induction on |E(G)|. If |E(G)| = 1 then there is nothing to do. Assume that |E(G)| ≥ 2. Let e = x1 x2 be a co-two-pair of G, which exists because of Lemma 5.2. Denote V = N(x1 ) ∪ N(x2 ). Let L be the ideal generated by the variables in V \ {x1 , x2 } and H be the induced subgraph of G on the vertex set G \ V . Again we have I(G \ e) : x1 x2 = L + I(H). Denote p = |V | − 2; note that p ≥ 0 since x1 , x2 ∈ V . If I(H) = 0 then L 6= 0 since |E(G)| ≥ 2. From the exact sequence 0 / (x1 x2 )(L + I(H)) / I(G \ e) ⊕ (x1 x2 ) / I(G) / 0 (7.2) we get that pd I(G) ≤ max{pd I(G \ e), pd L + 1} = max{pd I(G \ e), p}. Since G\e is again a weakly chordal graph, by the induction hypothesis pd I(G\e) ≤ d(G\e)−1 ≤ d(G) − 1. The last inequality follows from the fact that d(G \ e) ≤ d(G), which in turn follows easily from Lemma 5.3. By Lemma 7.8, there is an complete bipartite subgraph B1 of G with the vertex set V . Now B1 has p + 2 vertices, hence by the definition of d(G), it follows that (p + 2) − 1 = p + 1 ≤ d(G). Finally pd I(G) ≤ max{pd I(G \ e), p} ≤ d(G) − 1, as desired. Assume that I(H) 6= 0. Since L and I(H) live in different polynomial subrings of R and L has codimension p, we obtain pd(L + I(H)) = pd I(H) + p. Since H is weakly chordal with fewer edges than G, by the induction hypothesis pd I(H) = d(H) − 1. 26 HOP D. NGUYEN AND THANH VU Let B2 , . . . , Bg be a strongly disjoint family of complete bipartite subgraphs of H which realizes d(H). Note that if e2 , . . . , eg form an induced matching of H, where ei ∈ Bi , then e, e2 , . . . , eg is an induced matching in G. Therefore B1 , B2 , . . . , Bg is a strongly disjoint family of complete bipartite subgraphs of G. In particular, d(G) ≥ |V (B1 )| + g X |V (Bi )| − g = p + 2 + d(H) − 1 = pd I(H) + p + 2. i=2 All in all, we see that pd(L + I(H)) = pd I(H) + p ≤ d(G) − 2. As above pd I(G \ e) = d(G \ e) − 1 ≤ d(G) − 1. So from the exact sequence (7.2), we obtain pd I(G) ≤ max{pd I(G \ e), pd(L + I(H)) + 1} ≤ d(G) − 1. This finishes the induction and the proof of the theorem.  Remark 7.9. See also, e.g., [25], [26], [27], for more results about the relationship between the projective dimension of I(G) and invariants coming from families of complete bipartite subgraphs of G. 8. Characteristic dependence It is well-known that the regularity of edge ideals depend on the characteristic of the field. In fact Katzman [24] shows that if R = k[x1 , . . . , xn ] is a polynomial ring of dimension n ≤ 10, then any edge ideal on the vertex set {x1 , . . . , xn } has characteristic-independent regularity. On the other hand, from dimension 11 onward, there are examples of edge ideals with characteristicdependent regularity. The following example is taken from Katzman’s paper [24, Page 450]. It comes from a triangulation of the projective plane P2k . The Macaulay2 package [31] is employed in our various computations of the linearity defect. Example 8.1. Let I ⊆ k[x1 , . . . , x11 ] be the following edge ideal: I = (x1 x2 , x1 x6 , x1 x7 , x1 x9 , x2 x6 , x2 x8 , x2 x10 , x3 x4 , x3 x5 , x3 x7 , x3 x10 , x4 x5 , x4 x6 , x4 x11 , x5 x8 , x5 x9 , x6 x11 , x7 x9 , x7 x10 , x8 x9 , x8 x10 , x8 x11 , x10 x11 ). Computations with Macaulay2 [12] show that ld I = 3 if char k = 0 and ld I = 7 if char k = 2. So for any m ≥ 0, applying [30, Lemma 4.10], we see that the edge ideal I +(y1 z1 , . . . , ym zm ) ⊆ k[x1 , . . . , x11 , y1 , . . . , ym , z1 , . . . , zm ] has linearity defect ld I + ld(y1 z1 , . . . , ym zm ) + 1 = m + 3 if char k = 0 and m + 7 if char k = 2. Moreover, we can replace I + (y1 z1 , . . . , ym zm ) by the edge ideal of a connected graph using Lemma 8.2. Indeed, take a new vertex y, then the edge ideal I + (y1 z1 , . . . , ymzm ) + y(x1 , . . . , x11 , y1, . . . , ym ) ⊆ k[x1 , . . . , x11 , y1 , . . . , ym , z1 , . . . , zm , y] comes from a connected graph and has the same linearity defect as I + (y1 z1 , . . . , ym zm ). Lemma 8.2. Let J ⊆ R = k[x1 , . . . , xn ] be a monomial ideal which does not contain a linear form. Let L be an ideal generated by variables such that J ⊆ L. Consider the ideal I = J + yL in the polynomial extension S = R[y]. There is an equality ldR J = ldS I. LINEARITY DEFECT OF EDGE IDEALS 27 Proof. By Lemma 3.3, we get ldR J ≤ ldS I. For the reverse inequality, let p = (x1 , . . . , xn , y) ⊆ S. Consider the exact sequence J J = −→ 0. 0 −→ yL −→ I −→ yL ∩ J yJ The equality follows from the fact that yL ∩ J = y(L ∩ J) = yJ. Note that yL is Koszul and yL∩pI = pyL by degree reasons. Hence by either [29, Theorem 3.1], or Lemma 4.11(a1) together with Lemma 4.1(i), we get the first inequality in the following chain     J k[y] J = ldS = ldR J. = ldS J ⊗k ldS I ≤ max 0, ldS yJ yJ yk[y] The last equality follows from [30, Lemma 4.9]. This completes the proof.  The linearity defect of edge ideals of bipartite graphs also may depend on the characteristic. Example 8.3. Dalili and Kummini [4, Example 4.8] found an example of a bipartite graph such that the regularity of the corresponding edge ideal depends on the characteristic. Specifically, their ideal is I = (x1 y1 , x2 y1 , x3 y1 , x7 y1 , x9 y1 , x1 y2 , x2 y2 , x4 y2 , x6 y2 , x10 y2 , x1 y3 , x3 y3 , x5 y3 , x6 y3 , x8 y3 , x2 y4 , x4 y4 , x5 y4 , x7 y4 , x8 y4 , x3 y5 , x4 y5 , x5 y5 , x9 y5 , x10 y5 , x6 y6 , x7 y6 , x8 y6 , x9 y6 , x10 y6 ) ⊆ k[x1 , . . . , x10 , y1 , . . . , y6]. Computations with Macaulay2 using our package [31] show that ld I = 6 if char k = 0 and ld I = 11 if char k = 2. We have seen from Theorem 7.6 that the condition ld I(G) = 1 is equivalent to G being weakly chordal and having induced matching number 2. Therefore we would like to ask the following Question 8.4. Can the condition ld I(G) = 2 be characterized solely in terms of the combinatorial properties of the graph G, independent of the characteristic of k? Remark 8.5. The analog of Question 8.4 for regularity has a clear answer. We know from Fröberg’s theorem that the condition reg I(G) = 2 is independent of characteristic. FernánderzRamos and Gimenez [8, Theorem 4.1] show that if G is bipartite and connected, then the following are equivalent: (i) reg I(G) = 3; (ii) Gc has an induced C4 and the bipartite complement of G has no induced Cm with m ≥ 5. It is not hard to see that (ii) is equivalent to the condition that the bipartite complement of G is weakly chordal and indmatch(G) = 2. Also, the reader may check that if G is bipartite and disconnected, then reg I(G) = 3 if and only if G has two connected components G1 , G2 , each of which is co-chordal. In particular, for a bipartite graph G, the condition reg I(G) = 3 is independent of the characteristic. On the other hand, if G is not bipartite, then the condition reg I(G) = 3 might depend on the characteristic: for Katzman’s ideal in Example 8.1, reg I(G) = 3 if char k = 0 and 4 if char k = 2. Dalili and Kummini’s ideal in Example 8.3 shows that for connected bipartite graphs, the condition reg I(G) = 4 is dependent on the characteristic: for their ideal, reg I = 4 if char k = 0 and 5 if char k = 2. 28 HOP D. NGUYEN AND THANH VU In view of Example 8.3, we wonder if for a bipartite graph G and 2 ≤ ℓ ≤ 5, the condition ld I(G) = ℓ is independent of the value of char k. Acknowledgments Parts of this work were finished when the first author was visiting the Department of Mathematics, University of Nebraska – Lincoln. We are grateful to Luchezar Avramov for his generosity and constant encouragement. The first author is grateful to Tim Römer for his useful comments and suggestions. Finally, we are indebted to two anonymous referees for their careful reading of the paper and for pointing a gap in the proof of Theorem 7.7 in a previous version. We were able to fill the gap and improve the readability of our paper thanks to their thoughtful suggestions and comments. References [1] R. Ahangari Maleki and M.E. Rossi, Regularity and linearity defect of modules over local rings. J. Commut. Algebra 6, no. 4 (2014), 485–504. [2] L.L. Avramov, Infinite free resolution. in Six lectures on Commutative Algebra (Bellaterra, 1996), 1–118, Progr. Math., 166, Birkhäuser (1998). [3] W. Bruns and J. Herzog, Cohen-Macaulay rings. Revised edition. Cambridge Studies in Advanced Mathematics 39, Cambridge University Press (1998). [4] K. Dalili and M. Kummini, Dependence of Betti numbers on characteristic. Comm. Algebra 42, no. 2 (2014), 563–570. [5] A. Dochtermann and A. Engström, Algebraic properties of edge ideals via combinatorial topology. Electron. J. Combin. 16 (2009), Special volume in honor of Anders Björner, Research Paper 2. [6] D. Eisenbud, G. Fløystad and F. -O. Schreyer, Sheaf cohomology and free resolutions over exterior algebras. Trans. Amer. Math. Soc. 355 (2003), 4397–4426. [7] D. Eisenbud, M. Green, K. Hulek and S. Popescu, Restricting linear syzygies: algebra and geometry. Compos. Math. 141 (2005), no. 6, 1460–1478. [8] O. Fernández-Ramos and P. Gimenez, Regularity 3 in edge ideals associated to bipartite graphs. J. Algebr. Combin. 39 (2014), 919–937. [9] C. Francisco, H.T. Hà and A. Van Tuyl, Splittings of monomial ideals. Proc. Amer. Math. Soc. 137 (2009), 3271–3282. [10] R. Fröberg, On Stanley-Reisner rings. In: Topics in Algebra, vol. 26 Part 2, pp. 57–70. Banach Center Publications, PWN-Polish Scientific Publishers, Warsaw (1990). [11] V. Gasharov, I. Peeva and V. Welker, The lcm-lattice in monomial resolutions. Math. Research Letters 6 (1999), 521–532. [12] D. Grayson and M. Stillman, Macaulay2, a software system for research in algebraic geometry. Available at http://www.math.uiuc.edu/Macaulay2. [13] H.T. Hà, Regularity of squarefree monomial ideals. In: Connections between algebra, combinatorics, and geometry, Springer Proc. Math. Stat., 76, Springer, New York (2014), pp. 251–276. [14] H.T. Hà and A. Van Tuyl, Splittable ideals and the resolutions of monomial ideals. J. Algebra 309 (2007), 405–425. [15] H.T. Hà and A. Van Tuyl, Monomial ideals, edge ideals of hypergraphs, and their graded Betti numbers. J. Algebr. Combin. 27 (2008), 215–245. [16] R. Hayward, C.T. Hoàng and F. Maffaray, Optimizing weakly triangulated graphs. Graphs and Combinatorics 5 (1989), no. 1, 339–349. [17] J. Herzog and T. Hibi, Componentwise linear ideals. Nagoya Math. J. 153 (1999), 141–153. [18] J. Herzog and T. Hibi, Monomial ideals. Graduate Texts in Mathematics 260, Springer (2011). [19] J. Herzog and S.B. Iyengar, Koszul modules. J. Pure Appl. Algebra 201 (2005), 154–188. LINEARITY DEFECT OF EDGE IDEALS 29 [20] J. Herzog, L. Sharifan and M. Varbaro, The possible extremal Betti numbers of a homogeneous ideal. Proc. Amer. Math. Soc. 142 (2014), no. 6, 1875–1891. [21] S.B. Iyengar and T. Römer, Linearity defects of modules over commutative rings. J. Algebra 322 (2009), 3212–3237. [22] C. Jacobsson, Finitely presented graded Lie algebras and homomorphisms of local rings. J. Pure Appl. Algebra 38 (1985) 243–253. [23] G. Kalai and R. Meshulam, Intersections of Leray complexes and regularity of monomial ideals. J. Combin. Theor. 113 (2006), 1586–1592. [24] M. Katzman, Characteristic-independence of Betti numbers of graph ideals. J. Combin. Theory, Ser. A 113 (2006) 435 – 454. [25] F. Khosh-Ahang and S. Moradi, Regularity and projective dimension of the edge ideal of C5 -free vertex decomposable graphs. Proc. Amer. Math. Soc. 142 (2014), 1567–1576. [26] K. Kimura, Non-vanishingness of Betti numbers of edge ideals. In: Harmony of Gröbner bases and the modern industrial society, World Sci. Publ., Hackensack, NJ (2012), pp. 153–168. [27] K. Kimura, Non-vanishingness of Betti numbers of edge ideals and complete bipartite subgraphs. Preprint (2013), Available online at http://arxiv.org/abs/1306.1333. [28] S. Morey and R. Villarreal, Edge ideals: algebraic and combinatorial properties. in Progress in Commutative Algebra, Combinatorics and Homology, Vol. 1 (C. Francisco, L. C. Klingler, S. Sather-Wagstaff and J. C. Vassilev, Eds.), De Gruyter, Berlin (2012), pp. 85–126. [29] H.D. Nguyen, Notes on the linearity defect and applications. Submitted (2015), available online at http://arxiv.org/abs/1411.0261. [30] H.D. Nguyen and T. Vu, Linearity defects of powers are eventually constant. Submitted (2015), available online at http://arxiv.org/abs/1504.04853. [31] H.D. Nguyen and T. Vu, LinearityDefect. A Macaulay2 package for computing the linearity defect. Available at http://www.math.unl.edu/~tvu5/research/LinearityDefect.m2. [32] R. Okazaki and K. Yanagawa, Linearity defect of face rings. J. Algebra 314 (2007), 362–382. [33] I. Peeva and M. Velasco, Frames and degenerations of monomial resolutions. Trans. Amer. Math. Soc. 363, no. 4 (2011), 2029–2046. [34] P. Roberts, Homological invariants of modules over commutative rings. Seminaire de Mathematiques Superieures 72, Les Presses de l’Universite de Montreal (1980). [35] T. Römer, On minimal graded free resolutions. Dissertation, Essen (2001). [36] L.M. Şega, On the linearity defect of the residue field. J. Algebra 384 (2013), 276–290. [37] J. Spinrad and R. Sritharan, Algorithms for weakly triangulated graphs. Discrete Appl. Math. 59 (1995), 181–191. [38] A. Van Tuyl, A beginner’s guide to edge and cover ideals. in Monomial ideals, computations and applications, 63–94, Lecture Notes in Math., 2083, Springer, Heidelberg (2013). [39] R.H. Villarreal, Monomial Algebras. Monographs and Textbooks in Pure and Applied Mathematics, 238. Marcel Dekker, Inc., New York (2001). [40] R. Woodroofe, Matchings, coverings, and Castelnuovo-Mumford regularity. J. Commut. Algebra 6 (2014), no. 2, 287–304. Fachbereich Mathematik/Informatik, Institut für Mathematik, Universität Osnabrück, Albrechtstr. 28a, 49069 Osnabrück, Germany Dipartimento di Matematica, Università di Genova, Via Dodecaneso 35, 16146 Genoa, Italy E-mail address: [email protected] Department of Mathematics, University of Nebraska-Lincoln, Lincoln, NE 68588, USA E-mail address: [email protected]
0math.AC
Noname manuscript No. (will be inserted by the editor) Compositional Falsification of Cyber-Physical Systems with Machine Learning Components Tommaso Dreossi · Alexandre Donzé · Sanjit A. Seshia arXiv:1703.00978v2 [cs.SY] 22 Nov 2017 the date of receipt and acceptance should be inserted later Abstract Cyber-physical systems (CPS), such as automotive systems, are starting to include sophisticated machine learning (ML) components. Their correctness, therefore, depends on properties of the inner ML modules. While learning algorithms aim to generalize from examples, they are only as good as the examples provided, and recent efforts have shown that they can produce inconsistent output under small adversarial perturbations. This raises the question: can the output from learning components lead to a failure of the entire CPS? In this work, we address this question by formulating it as a problem of falsifying signal temporal logic (STL) specifications for CPS with ML components. We propose a compositional falsification framework where a temporal logic falsifier and a machine learning analyzer cooperate with the aim of finding falsifying executions of the considered model. The efficacy of the proposed technique is shown on an automatic emergency braking system model with a perception component based on deep neural networks. Keywords Cyber-physical systems, machine learning, falsification, temporal logic, deep learning, neural networks, autonomous driving This work is funded in part by the DARPA BRASS program under agreement number FA8750-16-C-0043, NSF grants CNS-1646208, CNS-1545126, and CCF-1139138, and by TerraSwarm, one of six centers of STARnet, a Semiconductor Research Corporation program sponsored by MARCO and DARPA. The second author did much of the work while affiliated with UC Berkeley. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Titan Xp GPU used for this research. T. Dreossi University of California, Berkeley E-mail: [email protected] A. Donzé Decyphir, Inc. E-mail: [email protected] S. A. Seshia University of California, Berkeley E-mail: [email protected] 2 Dreossi, Donzé, Seshia 1 Introduction Over the last decade, machine learning (ML) algorithms have achieved impressive results providing solutions to practical large-scale problems (see, e.g., [4, 25, 18, 15]). Not surprisingly, ML is being used in cyber-physical systems (CPS) — systems that are integrations of computation with physical processes. For example, semi-autonomous vehicles employ Adaptive Cruise Controllers (ACC) or Lane Keeping Assist Systems (LKAS) that rely heavily on image classifiers providing input to the software controlling electric and mechanical subsystems (see, e.g., [5]). The safety-critical nature of such systems involving ML raises the need for formal methods [33]. In particular, how do we systematically find bugs in such systems? We formulate this question as the falsification problem for CPS models with ML components (CPSML): given a formal specification ϕ (say in a formalism such as signal temporal logic [22]) and a CPSML model M , find an input for which M does not satisfy ϕ. A falsifying input generates a counterexample trace that reveals a bug. To solve this problem, multiple challenges must be tackled. First, the input space to be searched can be intractable. For instance, a simple model of a semi-autonomous car already involves several control signals (e.g., the angle of the acceleration pedal, steering angle) and other rich sensor input (e.g., images captured by a camera, LIDAR, RADAR). Second, CPSML are often designed using languages (such as C, C++, or Simulink), for which clear semantics are not given, and involve third-party components that are opaque or poorly-specified. This obstructs the development of formal methods for the analysis of CPSML models and may force one to treat them as gray-boxes or black-boxes. Third, the formal verification of ML components is a difficult, and somewhat ill-posed problem due to the complexity of the underlying ML algorithms, large feature spaces, and the lack of consensus on a formal definition of correctness (see [33] for a longer discussion). Hence, we need a technique to systematically analyze ML components within the context of a CPS. In this paper, we propose a new framework for the falsification of CPSML addressing the issues described above. Our technique is compositional (modular) in that it divides the search space for falsification into that of the ML component and of the remainder of the system, while establishing a connection between the two. The obtained subspaces are respectively analyzed by a temporal logic falsifier (“CPS Analyzer”) and a machine learning analyzer (“ML analyzer”) that cooperate to search for a behavior of the closed-loop system that violates the property ϕ. This cooperation mainly comprises a sequence of input space projections, passing information about interesting regions in the input space of the full CPSML model to identify a sub-space of the input space of the ML component. The resulting projected input space of the ML component is typically smaller than the full input space. Moreover, misclassifications in this space can be mapped back to smaller subsets of the CPSML input space in which counterexamples are easier to find. Importantly, our approach can handle any machine learning technique, including the methods based on Compositional Falsification of CPSML 3 Environment Sensor Input Controller Plant Learning‐Based Perception Fig. 1: Automatic Emergency Braking System (AEBS) in closed loop. A machine learning based image classifier is used to perceive objects in the ego vehicle’s frame of view. deep neural networks [15] that have proved effective in many recent applications. The proposed ML Analyzer is a tool that analyzes the input space for the ML classifier and determines a region of the input space that could be relevant for the full cyber-physical system’s correctness. More concretely, the analyzer identifies sets of misclassifying features, i.e., inputs that “fool” the ML algorithm. The analysis is performed by considering subsets of parameterized features spaces that are used to approximate the ML components by simpler functions. The information gathered by the temporal logic falsifier and the ML analyzer together reduce the search space, providing an efficient approach to falsification for CPSML models. Example 1 As an illustrative example, let us consider a simple model of an Automatic Emergency Braking System (AEBS), that attempts to detect objects in front of a vehicle and actuate the brakes when needed to avert a collision. Figure 1 shows the AEBS as a system composed of a controller (automatic braking), a plant (vehicle sub-system under control, including transmission), and an advanced sensor (camera along with an obstacle detector based on deep learning). The AEBS, when combined with the vehicle’s environment, forms a closed loop control system. The controller regulates the acceleration and braking of the plant using the velocity of the subject (ego) vehicle and the distance between it and an obstacle. The sensor used to detect the obstacle includes a camera along with an image classifier based on deep neural networks. In general, this sensor can provide noisy measurements due to incorrect image classifications which in turn can affect the correctness of the overall system. Suppose we want to verify whether the distance between the subject vehicle and a preceding obstacle is always larger than 5 meters. Such a verification requires the exploration of a very large input space comprising the control inputs (e.g., acceleration and braking pedal angles) and the ML component’s feature space (e.g., all the possible pictures observable by the camera). The latter space is particularly large — for example, note that the feature space of RGB images of dimension 1000 × 600px (for an image classifier) contains 2561000×600×3 elements. 4 Dreossi, Donzé, Seshia At first, the input space of the model described in Example 1 appears intractably large. However, the twin notions of abstraction and compositionality, central to much of the advances in formal verification, can help address this challenge. As mentioned earlier, we decompose the overall CPSML model input space into two parts: (i) the input space of the ML component, and (ii) the input space for the rest of the system – i.e., the CPSML model with an abstraction of the ML component. A CPS Analyzer operates on the latter “pure CPS” input space, while an ML Analyzer handles the former. The two analyzers communicate information as follows: 1. The CPS Analyzer initially performs conservative analyses assuming abstractions of the ML component. In particular, consider two extreme abstractions — a “perfect ML classifier” (i.e., all feature vectors are correctly classified), and a “completely-wrong ML classifier” (all feature vectors are misclassified). Abstraction permits the CPS Analyzer to operate on a lowerdimensional input space (the “pure CPS” one) and identify a region in this space that may be affected by the malfunctioning of some ML modules – a so-called “region of interest” or “region of uncertainty.” This region is communicated to the ML Analyzer. 2. The ML Analyzer projects the region of uncertainty (ROU) onto its input space, and performs a detailed analysis of that input sub-space. Since this detailed analysis uses only the ML classifier (not the full CPSML model), it is a more tractable problem. In this paper, we present a novel samplingbased approach to explore the input sub-space for the ML component. We can also leverage other advances in analysis of machine learning systems operating on rich sensor inputs and for applications such as autonomous driving (see the related work section that follows). 3. When the ML Analyzer finds interesting test cases (e.g., those that trigger misclassifications of inputs whose labels are easily inferred), it communicates that information back to the CPS Analyzer, which checks whether the ML misclassification can lead to a system-level safety violation (e.g., a collision). If yes, we have found a system-level counterexample. If not, the ROU is updated and the revised ROU passed back to the ML Analyzer. The communication between the CPS Analyzer and ML Analyzer continues until either we find a system-level counterexample, or we run out of resources. For the class of CPSML models we consider, including those with highly nonlinear dynamics and even black-box components, one cannot expect to prove system correctness. We focus on specifications in Signal Temporal Logic (STL), and for this reason use a temporal logic falsifier, Breach [8], as our CPS Analyzer. Even though temporal logic falsification is a mature technology with initial industrial adoption (e.g., [42]), several technical challenges remain. First, we need to construct the validity domain of an STL specification — the input sub-space where the property is satisfied — for a CPSML model with abstracted (correct/incorrect) ML components, and identify the region of uncertainty (ROU). Second, we need a method to relate the ROU to the feature space of the ML modules. Third, we need to systematically analyze the feature space of the ML component with the goal of finding feature vectors leading Compositional Falsification of CPSML 5 to misclassifications. We describe in detail in Sections 3 and 4 how we tackle these challenges. In summary, the main contributions of this paper are: • A compositional framework for the falsification of temporal logic properties of arbitrary CPSML models that works for any machine learning classifier. • A machine learning analyzer that identifies misclassifications leading to system-level property violations, based on two main ideas: - An input space parameterization used to abstract the feature space of the ML component and relate it to the CPSML input space, and - A classifier approximation method used to abstract the ML component and identify misclassifications that can lead to executions of the CPSML that violate the temporal logic specification. • An experimental demonstration of the effectiveness of our approach on two instantiations of the Automatic Emergency Braking System (AEBS) example with multiple deep neural networks trained for object detection and classification, including some developed by experts in the machine learning and computer vision communities. In Sec. 5, we give detailed experimental results on an Automatic Emergency Braking System (AEBS) involving an image classifier for obstacle detection based on deep neural networks developed and trained using leading software packages — AlexNet developed with Caffe [18] and Inception-v3 developed with TensorFlow [23]. In this journal version of our original conference paper [10], we also present a new case study, an AEBS deployed within the Udacity self-driving car simulator [2] trained on images generated from the simulator. Related Work The verification of both CPS and ML algorithms have attracted several research efforts, and we focus here on the most closely related work. Techniques for the falsification of temporal logic specifications against CPS models have been implemented based on nonlinear optimization methods and stochastic search strategies (e.g., Breach [8], S-TaLiRo [3], RRT-REX [9], C2E2 [12]). While the verification of ML programs is less well-defined [33], recent efforts [36] show how even well trained neural networks can be sensitive to small adversarial perturbations, i.e., small intentional modifications that lead the network to misclassify the altered input with large confidence. Other efforts have tried to characterize the correctness of neural networks in terms of risk [39] (i.e., probability of misclassifying a given input) or robustness [13, 7] (i.e., a minimal perturbation leading to a misclassification), while others proposed methods to generate pictures [28, 11] or perturbations [26, 28, 16] including methods based on satisfiability modulo theories (SMT) [20] in such a way to “fool” neural networks. These methods, while very promising, are mostly limited to analyzing the ML components in isolation, and not in the 6 Dreossi, Donzé, Seshia context of a complex, closed-loop cyber-physical system. To the best of our knowledge, our work is the first to address the verification of temporal logic properties of CPSML—the combination of CPS and ML systems. The work that is closest in spirit to ours is that on DeepXplore [31], where the authors present a whitebox software testing approach for deep learning systems. However, there are some important differences: their work performs a detailed analysis of the learning software, whereas ours analyzes the entire closed-loop CPS while delegating the software analysis to the machine learning analyzer. Further, we consider temporal logic falsification whereas their work uses software and neural network coverage metrics. It may be interesting to see how these approaches can be combined. 2 Background 2.1 CPSML Models In this work, we consider models of cyber-physical systems with machine learning components (CPSML). We assume that a system model is given as a graybox simulator defined as a tuple M = (S, U, sim), where S is a set of system states, U is a set of input values, and sim : S × U × T → S is a simulator that maps a state x(tk ) ∈ S and input value u(tk ) ∈ U at time tk ∈ T to a new state x(tk+1 ) = sim(x(tk ), u(tk ), tk ), where tk+1 = tk + ∆k for a time-step ∆k ∈ Q>0 . Given an initial time t0 ∈ T , an initial state x(t0 ) ∈ S, a sequence of timesteps ∆0 , . . . , ∆n ∈ Q>0 , and a sequence of input values u(t0 ), . . . , u(tn ) ∈ U , a simulation trace of the model M = (S, U, sim) is a sequence: (t0 , x(t0 ), u(t0 )), (t1 , x(t1 ), u(t1 )), . . . , (tn , x(tn ), u(tn )) where x(tk+1 ) = sim(x(tk ), u(tk ), ∆k ) and tk+1 = tk + ∆k for k = 0, . . . , n. The gray-box aspect of the CPSML model is that we assume some knowledge of the internal ML components. Specifically, these components, termed classifiers, are functions f : X → Y that assign to their input feature vector x ∈ X a label y ∈ Y , where X and Y are a feature and label space, respectively. Without loss of generality, we focus on binary classifiers whose label space is Y = {0, 1}. A ML algorithm selects a classifier using a training set {(x(1) , y (1) ), . . . , (x(m) , y (m) )} where the (x(i) , y (i) ) are labeled examples with x(i) ∈ X and y (i) ∈ Y , for i = 1, . . . , m. The quality of a classifier can be estimated on a test set of examples comparing the classifier predictions against the labels of the examples. Precisely, for a given test set T = {(x(1) , y (1) ), . . . , (x(l) , y (l) )}, the number of false positives f pf (T ) and false negatives f nf (T ) of a classifier f on T are defined as: f pf (T ) = | {x(i) ∈ T | f (x(i) ) = 1 and y (i) = 0} | f nf (T ) = | {x(i) ∈ T | f (x(i) ) = 0 and y (i) = 1} | (1) Compositional Falsification of CPSML 7 The error rate of f on T is given by: errf (T ) = (f pf (T ) + f nf (T ))/l (2) A low error rate implies good predictions of the classifier f on the test set T . 2.2 Signal Temporal Logic We consider Signal Temporal Logic [22] (STL) as the language to specify properties to be verified against a CPSML model. STL is an extension of linear temporal logic (LTL) suitable for the specification of properties of CPS. A signal is a function s : D → S, with D ⊆ R≥0 an interval and either S ⊆ B or S ⊆ R, where B = {>, ⊥} and R is the set of reals. Signals defined on B are called booleans, while those on R are said real-valued. A trace w = {s1 , . . . , sn } is a finite set of real-valued signals defined over the same interval D. Let Σ = {σ1 , . . . , σk } be a finite set of predicates σi : Rn → B, with σi ≡ pi (x1 , . . . , xn ) C 0, C ∈ {<, ≤}, and pi : Rn → R a function in the variables x1 , . . . , xn . An STL formula is defined by the following grammar: ϕ := σ | ¬ϕ | ϕ ∧ ϕ | ϕUI ϕ (3) where σ ∈ Σ is a predicate and I ⊂ R≥0 is a closed non-singular interval. Other common temporal operators can be defined as syntactic abbreviations in the usual way, like for instance ϕ1 ∨ ϕ2 := ¬(¬ϕ1 ∧ ϕ2 ), FI ϕ := >UI ϕ, or GI ϕ := ¬FI ¬ϕ. Given a t ∈ R≥0 , a shifted interval I is defined as t + I = {t + t0 | t0 ∈ I}. Definition 1 (Qualitative semantics) Let w be a trace, t ∈ R≥0 , and ϕ be an STL formula. The qualitative semantics of ϕ is inductively defined as follows: w, t |= σ w, t |= ¬ϕ w, t |= ϕ1 ∧ ϕ2 w, t |= ϕ1 UI ϕ2 iff iff iff iff σ(w(t)) is true w, t 6|= ϕ (4) w, t |= ϕ1 and w, t |= ϕ2 ∃t0 ∈ t + I s.t. w, t0 |= ϕ2 and ∀t00 ∈ [t, t0 ], w, t00 |= ϕ1 A trace w satisfies a formula ϕ if and only if w, 0 |= ϕ, in short w |= ϕ. For given signal w, time instant t ∈ R≥0 , and STL formula ϕ, the satisfaction signal X (w, t, ϕ) is > if w, t |= ϕ, ⊥ otherwise. Given a CPSML model M = (S, U, sim), M |= ϕ if every simulation trace of M satisfies ϕ. 8 Dreossi, Donzé, Seshia Definition 2 (Quantitative semantics) Let w be a trace, t ∈ R≥0 , and ϕ be an STL formula. The quantitative semantics of ϕ is defined as follows: ρ(p(x1 , . . . , xn ) C 0, w, t) = ρ(¬ϕ, w, t) = ρ(ϕ1 ∧ ϕ2 , w, t) = ρ(ϕ1 UI ϕ2 , w, t) = p(w(t)) with C ∈ {<, ≤} − ρ(ϕ, w, t) min(ρ(ϕ1 , w, t), ρ(ϕ2 , w, t)) sup min(ρ(ϕ2 , w, t0 ), 00inf 0 ρ(ϕ1 , w, t00 )) t0 ∈t+I (5) t [t,t ] The robustness of a formula ϕ with respect to a trace w is the signal ρ(ϕ, w, ·). Given a CPSML model M = (S, U, sim), and a temporal logic formula ϕ, the validity domain of ϕ for model M is the subset of U for which traces of M satisfies ϕ. We denote the validity domain by Uϕ ; the remaining set of inputs U \ Uϕ is denoted by U¬ϕ . Simulation-based verification tools (such as [8]) can approximately compute validity domains via sampling-based methods. 3 Compositional Falsification Framework In this section, we formalize the falsification problem for STL specifications against CPSML models, define our compositional falsification framework, and show its functionality on the AEBS system of Example 1. Definition 3 (Falsification of CPSML) Given a model M = (S, U, sim) and an STL specification ϕ, find an initial state x(t0 ) ∈ S and a sequence of input values u = u(t0 ), . . . , u(tn ) ∈ U such that the trace of states w = x(t0 ), . . . , x(tn ) generated by the simulation of M from x(t0 ) ∈ S under u does not satisfy ϕ, i.e., w 6|= ϕ. We refer to such (x(t0 ), u) as counterexamples for ϕ. The problem of finding a counterexample is often called falsification problem. We now present the compositional framework for the falsification of STL formulas against CPSML models. Intuitively, the proposed method decomposes a given model into two abstractions: a version of the CPSML model under the assumption of perfectly correct ML modules and its actual ML components. The two abstractions are separately analyzed, the first by a temporal logic falsifier that builds the validity domain with respect to the given specification, the second by an ML analyzer that identifies sets of feature vectors that are misclassified by the ML components. Finally, the results of the two analysis are composed and projected back to a targeted input subspace of the original CPSML model where counterexamples can be found by invoking a temporal logic falsifier. Let us formalize this procedure. Let M = (S, U, sim) be a CPSML model and ϕ be an STL specification. Consider creating an “optimistic” abstraction M + of M : in other words, M + is a version of M with perfect ML components, that is, every feature vector of the ML feature space is correctly classified. Let us denote by ml the isolated ML components of the model M . Under the assumption of correct ML components, the lower-dimensional input space of M + can be analyzed by constructing the validity domain of ϕ, Compositional Falsification of CPSML 9 that is the partition of the input space into the sets Uϕ and U¬ϕ that do and do not satisfy ϕ, respectively. Note that considering the original model M , a possible misclassification of the ML components ml might affect the elements of Uϕ and U¬ϕ . In particular, we are interested in the elements of Uϕ that, due to misclassifications of ml, do not satisfy ϕ anymore. This corresponds to analyze the behavior of the ML components ml on the input set Uϕ . We refer to this step as the ML analysis, that can be seen as the procedure of finding a subset U ml ⊆ Uϕ of input values that are misclassified by the ML components ml. It is important to note that the input space of the CPS model M + and the feature spaces of the ML modules ml are different, thus the ML analyzer must adapt and relate the two different spaces. This important step will be clarified in Section 4. Finally, the intersection Uϕ ∩ U ml of the subsets identified by the decomposed analysis of the CPS model and its ML components targets a small set of input values that are misclassified by the ML modules and are likely to falsify ϕ. Thus, counterexamples in Uϕ ∩ U ml ⊆ U can be determined by invoking a temporal logic falsifier on ϕ against M . As explained below, we can pair the “optimistic” abstraction explained above with a “pessimistic” abstraction as well, so as to obtain a further restriction of the input space. Algorithm 1 CPSML falsification scheme (one iteration between CPS Analyzer and ML Analyzer) 1: function CompFalsfy(M, ϕ) . M CPSML, ϕ STL specification 2: [M + , ml] ←Decompose(M ) . M + – perfect ML, ml – ML component + + 3: [Uϕ , U¬ϕ ] ←ValidityDomain(M + , U, ϕ) . Validity domain of ϕ w.r.t. M + − − 4: [M , ml] ←Decompose(M ) . M – wrong ML, ml – ML component − − 5: [Uϕ , U¬ϕ ] ←ValidityDomain(M − , U, ϕ) . Validity domain of ϕ w.r.t. M − + − 6: Urou ← Uϕ \ Uϕ . Compute ROU 7: U ml ← MLAnalysis(ml, Urou ) . Find misclassified feature vectors in ROU ml 8: U¬ϕ ←Falsify(M, Uϕ ∩ U ml , ϕ) . Falsify on targeted input ml 9: return U¬ϕ ∪ U¬ϕ 10: end function The compositional falsification procedure is formalized in Algorithm 1. CompFalsfy receives as input a CPSML model M and an STL specification ϕ, and returns a set of falsifying counterexamples. At first, the algorithm decomposes M into M + and ml, where M + is an abstract version of M with ML components ml that return perfect answers (classifications) (Line 2). Then, the validity domain of ϕ with respect to the abstraction M + is computed by ValidityDomain (Line 3). Next, the algorithm computes from M , M − , and ml, where M − is an abstract version of M with ML components ml that always return wrong answers (misclassifications) (Line 4). Note that this step can be combined with Line 2, but we leave it separate for clarity in the abstract algorithm specification. Then, the validity domain of ϕ with respect to the abstraction M − is computed by ValidityDomain (Line 5). The region of 10 Dreossi, Donzé, Seshia Fig. 2: Compositional falsification scheme on AEBS model. The “score” indicates the confidence level with which the classifier determines whether the image contains a car or not. uncertainty (ROU), where misclassifications of the ML components can lead to violations of ϕ, is then computed as Urou (Line 6). From this, the subset of inputs that are misclassified by ml is identified by MLAnalysis (Line 7). Finally, the targeted input set Uϕ ∩ U ml , consisting in the intersection of the sets identified by the decomposed analysis, is searched by a temporal logic falsifier on the original model M (Line 8) and the set of inputs that falsify the temporal logic formula are returned. Note that the above approach can be implemented even without computing M − (Lines 4-6), in which case the entire validity domain of ϕ is considered as the ROU. For simplicity, we will take this truncated approach in the example described below. In Section 5, we will describe results on the AEBS case study with the full approach. Example 2 Let us consider the model described in Example 1 and let us assume that the input space U of the model M consists of the initial velocity of the subject vehicle vel(0), the initial distance between the vehicle and the proceeding obstacle dist(0), and the set of pictures that can be captured by the camera. Let ϕ := G[0,T ] (dist(t) ≥ τ ) be a specification that requires the vehicle to be always farther than τ from the preceding obstacle. Instead of Compositional Falsification of CPSML 11 analyzing the whole input space U (including a vast number of pictures), we can adopt our compositional framework to target a specific subset of U . Let M + be the AEBS model with a perfectly working image classifier and ml be the actual classifier. We begin by computing the validity subsets Uϕ and U¬ϕ of ϕ against M + , considering only vel(0) and dist(0) and assuming exact distance measurements during the simulation. Next, we analyze only the image classifier ml on pictures of obstacles whose distances fall in Uϕ , say in [dm , dM ] (see Figure 2). Our ML analyzer generates only pictures of obstacles whose distances are in [dm , dM ], finds possible sets of images that are misclassified, and returns the corresponding distances that, when projected back to U , yield the subset Uϕ ∩ U ml . Finally, a temporal logic falsifier can be invoked over Uϕ ∩ U ml and a set of counterexamples is returned. Algorithm 1 and the above example show how our compositional approach relies on three key steps: (i) computing the validity domain for an STL formula for a given simulation model; (ii) falsifying an STL formula on a simulation model, and (iii) a ML analyzer that computes a sub-space of its input feature space that lead to misclassifications. The first two steps have been well-studied in the literature on simulation-based verification of CPS, and implemented in tools such as Breach [8]. We discuss our approach to Step (iii) in the next section — our ML analyzer that identifies misclassifications of the ML component relevant to the overall CPSML input space. 4 Machine Learning Analyzer A central idea in our approach to analyzing CPSML models is to use abstractions of the ML components. For instance, in the preceding section, we used the notions of perfect ML classifiers and always-wrong classifiers in computing the region of uncertainty (ROU). In this section, we extend this abstraction-based approach to the ML classifier and its input (feature) space. One motivation for our approach comes from the application domain of autonomous driving where machine learning is used for object detection and perception. Instead of exploring the high-dimensional input space for the ML classifier involving all combinations of pixels, we instead perform the key simplification of exploring realistic and meaningful modifications to a given image dataset that corresponds to the ROU. Autonomous driving groups spend copius amounts of time collecting images and video to train their learningbased perception systems with. We focus on analyzing the space of images that is “close” to this data set but with semantically significant modifications that can identify problematic cases for the overall system. The space of modifications to input feature vectors (say, images) induces an abstract space over the concrete feature (image) space. Let us denote the abstract input domain by A. Given a classifier f : X → Y , our ML analyzer computes a simpler function f˜ : A → Y that approximates f on the abstract domain A. The abstract domain of the function f˜ is analyzed and clusters of misclassifying abstract elements are identified. The concretizations of such 12 Dreossi, Donzé, Seshia elements are subsets of features that are misclassified by the original classifier f . We describe further details of this approach in the remainder of this section. 4.1 Feature Space Abstraction Let X̃ ⊆ X be a subset of the feature space of f : X → Y . Let ≤ be a total order on a set A called the abstract set. An abstraction function is an injective function α : X̃ → A that maps every feature vector x ∈ X̃ to an abstract element α(x) ∈ A. Conversely, the concretization function γ : A → X̃ maps every abstraction a ∈ A to a feature γ(a) ∈ X̃. The abstraction and concretization functions play a fundamental role in our falsification framework. First, they allow us to map the input space of the CPS model to the feature space of its classifiers. Second, the abstract space can be used to analyze the classifiers on a compact domain as opposite to intractable feature spaces. These concepts are clarified in the following example, where a feature space of pictures is abstracted into a three-dimensional unit hyper-box. Example 3 Let X be the set of RGB pictures of size 1000 × 600, i.e., X = {0, . . . , 255}1000×600×3 . Suppose we are interested in analyzing a ML image classifier in the context of our AEBS system. In this case, we are interested in images of road scenarios rather than on arbitrary images in X. Further, assume that we start with a reference data set of images of a car on a two-lane highway with a desert road background, as shown in Figure 3. Suppose that we are interested only in the constrained feature space X̃ ⊆ X comprising this desert road scenario with a single car on the highway and three dimensions along which the scene can be varied: (i) the x-dimension (lateral) position of the car; (ii) the z-dimension (distance from the sensor) position of the car, and (iii) the brightness of the image. The x and z positions of the car and the brightness level of the picture can be seen as the dimensions of an abstract set A. In this setting, we can define the abstraction and concretization functions α and γ that relate the abstract set A = [0, 1]3 and X̃. For instance, the picture γ(0, 0, 0) sees the car on the left, close to the observer, and low brightness; the picture γ(1, 0, 0) places the car shifted to the right; on the other extreme, γ(1, 1, 1) has the car on the right, far away from the observer, and with a high brightness level. Figure 3 depicts some car pictures of S̃ disposed accordingly to their position in the abstract domain A (the surrounding box). 4.2 Approximation of Learning Components We now describe how the feature space abstraction can be used to construct an approximation that helps the identification of misclassified feature vectors. Given a classifier f : X → Y and a constrained feature space X̃ ⊆ X, we want to determine an approximated classifier f˜ : A → Y , such that errf˜(T ) ≤ , for some 0 ≤  ≤ 1 and test set T = {(a(1) , y (1) ), . . . , (a(l) , y (l) )}, with y (i) = f (γ(a(i) )), for i = 1, . . . , l. Compositional Falsification of CPSML 13 Fig. 3: Feature Space Abstraction. The cube represents the abstract space A with the three dimensions corresponding to three different image modifications. The displayed road images correspond to concretized elements of the concrete feature space X̃. Intuitively, the proposed approximation scheme samples elements from the abstract set, computes the labels of the concretized elements using the analyzed learning algorithm, and finally, interpolates the abstract elements and the corresponding labels in order to obtain an approximation function. The obtained approximation can be used to reason on the considered feature space and identify clusters of potentially misclassified feature vectors. Algorithm 2 Approximation construction of classifier f : X → Y 1: function Approximation(A, γ, ) 2: TI ← ∅ 3: repeat 4: TI ← TI ∪ sample(A, f ) 5: f˜ ← interpolate(TI ) 6: TE ← sample(A, f ) 7: until errf˜(TE ) ≤  8: return f˜ 9: end function . A abstract set (γ : A → X̃), 0 ≤  ≤ 1 The Approximation algorithm (Algorithm 2) formalizes the proposed approximation construction technique. It receives in input an abstract domain A for the concretization function γ : A → X̃, with X̃ ⊆ X, the error threshold 0 ≤  ≤ 1, and returns a function f˜ : A → Y that approximates f on the constrained feature space X̃. The algorithm consists in a loop that iteratively improves the approximation f˜. At every iteration, the algorithm populates the interpolation test set TI by sampling abstract features from A and computing 14 Dreossi, Donzé, Seshia the concretized labels accordingly to f (Line 4), i.e., sample(A, f )= {(a, y) | a ∈ Ã, y = f (γ(a))}, where à ⊆ A is a finite subset of samples determined with some sampling method. Next, the algorithm interpolates the points of TI (Line 5). The result is a function f˜ : A → Y that simplifies the original classifier f on the concretized constrained feature space X̃. The approximation is evaluated on the test set TE . Note that at each iteration, TE changes while TI incrementally grows. The algorithm iterates until the error rate errf˜(TE ) is smaller than the desired threshold  (Line 7). The technique with which the samples in TE and TI are selected strongly influences the accuracy of the approximation. In order to have a good coverage of the abstract set A, we propose the usage of low-discrepancy sampling methods that, differently from uniform random sampling, cover sets quickly and evenly. In this work, we use the Halton and lattice sequences, two common and easy-to-implement sampling methods, which we explain next. 4.3 Sampling Methods Discrepancy is a notion from equidistribution theory [41, 32] that finds application in quasi-Monte Carlo techniques for error estimation and approximating the mean, standard deviation, integral, global maxima and minima of complicated functions, such as, e.g., our classification functions. Definition 4 (Discrepancy [27]) Let X = {x(1) , . . . , x(m) } be a finite set of points in n-dimensional unit space, i.e., X ⊂ [0, 1]n . The discrepancy of X is given by: #(X, B) − vol(B) | (6) D(X) = sup | m B∈J where #(X, B) = |{x ∈ X | x ∈ B}|, i.e., the number of points in X that fall in B, vol(B) is the n-dimensional volume of B, and J is the set of boxes of the form {x ∈ Rn |ai ≤ xi ≤ bi }, where i = 1, . . . , n and 0 ≤ ai < bi < 1. Definition 5 (Low-discrepancy sequence [27]) A low-discrepancy sequence, also called quasi-random sequence, is a sequence with the property that for all m ∈ N, its subsequence X = {x(1) , . . . , x(m) } has low discrepancy. Low-discrepancy sequences fill spaces more uniformly than uncorrelated random points. This property makes low-discrepancy sequences suitable for problems where grids are involved, but it is unknown in advance how fine the grid must be to attain precise results. A low-discrepancy sequence can be stopped at any point where convergence is observed, whereas the usual uniform random sampling technique requires a large number of computations between stopping points [38]. Low-discrepancy sampling methods have improved computational techniques in many areas, including robotics [6], image processing [14], computer graphics [34], numerical integration [35], and optimization [30]. We now introduce two low-discrepancy sequences that will be used in this work. For more sequences and details see, e.g., [29]. Compositional Falsification of CPSML 15 1. Halton sequence [27]. Based on the choice of an arbitrary prime number p, the i-th sample is obtained by representing i in base p, reversing its digits, and moving the decimal point by one position. The resulting number is the i-th sample in base p. For the multi-dimensional case, it is sufficient to choose a different prime number for each dimension. In practice, this procedure corresponds to choosing a prime base p, dividing the [0, 1] interval in p segments, then p2 segments, and so on. 2. Lattice sequence [24]. A lattice can be seen as the generalization of a multidimensional grid with possibly nonorthogonal axes. Let α1 , . . . , αn−1 ∈ R>0 be irrational numbers and m ∈ N. The i-th sample of a lattice sequence is (i/m, {iα1 }, . . . , {iαn−1 }), where the curly braces {·} denote the fractional part of the real value (modulo-one arithmetic). Example 4 We now analyze two Convolutional Neural Networks (CNNs): the Caffe [18] version of AlexNet [21] and the Inception-v3 model of Tensorflow [23], both trained on the ImageNet database [1]. We sample 1000 points from the abstract domain defined in Example 3 using the lattice sampling techniques. These points encode the x and z displacements of a car in a picture and its brightness level (see Figure 3). Figure 4 (a) depicts the sampled points with their concretized labels. The green circles indicate correct classifications, i.e., the classifier identified a car, the red circles denote misclassifications, i.e., no car detected. The linear interpolation of the obtained points leads to an approximation function. The error rates errf˜(TE ) of the obtained approximations (i.e., the discrepancies between the predictions of the original image classifiers and their approximations) computed on 300 randomly picked test cases are 0.0867 and 0.1733 for AlexNet and Inception-v3, respectively. Figure 4 (b) shows the projections of the approximation functions for the brightness value 0.2. The more red a region, the larger the sets of pictures for which the neural networks do not detect a car. For illustrative purposes, we superimpose the projections of Figure 4 (b) over the background used for the picture generation. These illustrations show the regions of the concrete feature vectors in which a vehicle is misclassified. The analysis of Example 4 on AlexNet and Inception-v3 provides useful insights. First, we observe that Inception-v3 outperforms AlexNet on the considered road pictures since it correctly classifies more pictures than AlexNet. Second, we notice that AlexNet tends to correctly classify pictures in which the x abstract component is either close to 0 or 1, i.e., pictures in which the car is not in the middle of the street, but on one of the two lanes. This suggests that the model might not have been trained enough with pictures of cars in the center of the road. Third, using the lattice method on Inception-v3, we were able to identify a corner case misclassification in a cluster of correct predictions (note the isolated red cross with coordinates (0.1933, 0.0244, 0.4589)). All this information provides insights on the classifiers that can be useful in the hunt for counterexamples. 16 Dreossi, Donzé, Seshia (a) Sampling. (b) Interpolation projection. (c) Feature space analysis. Fig. 4: ML analysis of AlexNet network developed with Caffe (top) and Inception-v3 network developed with Tensorflow (bottom) on a road scenario. Compositional Falsification of CPSML 17 5 Experimental Results In this section we present two case studies, both involving an Automatic Emergency Braking System (AEBS), but differing in the details of the underlying simulator and controller. The first is a Simulink-based AEBS, the second is a Unity-Udacity simulator-based AEBS. The falsification framework for the first case study has been implemented in a Matlab toolbox.1 The framework for the second case study has been written in Python and C#.2 Our tools deal with models of CPSML and STL specifications. They mainly consist of a temporal logic falsifier and an ML analyzer that interact to falsify the given STL specification against the decomposed models. As an STL falsifier, we chose the existing tool Breach [8], while the ML analyzer has been implemented from scratch. The ML analyzer implementation has two components: the feature space abstractor and the ML approximation algorithm (see Section 4). The feature space abstractor implements a scene generator that concretizes the abstracted feature vectors. The algorithm that computes an approximation of the analyzed ML component gives the user the option of selecting the sampling method and interpolation technique, as well as setting the desired error rate. Our tools are interfaced with the deep learning frameworks Caffe [18] and Tensorflow [23]. We ran our tests on a desktop computer Dell XPS 8900, Intel (R) Core(TM) i7-6700 CPU 3.40GHz, DIMM RAM 16 GB 2132 MHz, GPUs NVIDIA GeForce GTX Titan X and Titan Xp, with Ubuntu 14.04.5 LTS and Matlab R2016b. 5.1 Case Study 1: Simulink-based AEBS Our first case study is a closed-loop Simulink model of a semi-autonomous vehicle with an Advanced Emergency Braking System (AEBS) [37] connected to a deep neural network-based image classifier. The model mainly consists of a four-speed automatic transmission controller linked to an AEBS that automatically prevents collisions with preceding obstacles and alleviate the harshness of a crash when a collision is likely to happen (see Figure 5). The AEBS determines a braking mode depending on the speed of the vehicle vs , the possible presence of a preceding obstacle, its velocity vp , and the longitudinal distance dist between the two. The distance dist is provided by radars having 30m of range. For obstacles farther than 30m, the camera, connected to an image classifier, alerts the AEBS that, in the case of detected obstacle, goes into warning mode. Depending on vs , vp , dist, and the presence of obstacles detected by the image classifier, the AEBS computes the time to collision and longitudinal safety indices, whose values determine a controlled transition between safe, warning, braking, and collision mitigation modes. In safe mode, the car does 1 2 https://github.com/dreossi/analyzeNN https://bitbucket.org/sseshia/uufalsifier 18 Dreossi, Donzé, Seshia Fig. 5: Simulink model of a semi-autonomous vehicle with AEBS. ML always correct ML always wrong Region of Uncertainty (yellow) Fig. 6: Validity domain for G(¬(dist(t)) ≤ 0) and AEBS model with different abstractions of ML component. The initial velocity and distance are on the x and y axes respectively. The dotted (horizontal) line is the image classifier activation threshold. Green indicates combinations of initial velocity and distance for which the property is satisfied and red indicates combinations for which the property is falsified. Our ML analyzer performs both optimistic (left) and pessimistic (middle) abstractions of the neural network classifier. On the right-most image, the yellow region denotes the region of uncertainty (ROU). not need to brake. In warning mode, the driver should brake to avoid a collision. If this does not happen, the system goes into braking mode, where the automatic brake slows down the vehicle. Finally, in collision mitigation mode, the system, determining that a crash is unavoidable, triggers a full braking action aimed to minimize the damage. To establish the correctness of the system and in particular of its AEBS controller, we formalize the STL specification G(¬(dist(t)) ≤ 0), that requires dist(t) to always be positive, i.e., no collision happens. The input space is vs (0) ∈ [0, 40] (mph), dist(0) ∈ [0, 60] (m), and the set of all RGB pictures of size 1000 × 600. The preceding vehicle is not moving, i.e., vp (t) = 0 (mph). At first, we compute the validity domain of ϕ assuming that the radars are able to provide exact measurements for any distance dist(t) and the image classifier correctly detects the presence of a preceding vehicle. The computed validity domain is depicted in Figure 6 (left-most image): green for Uϕ and red for U¬ϕ . Next, we try to identify candidate counterexamples that belong to the satisfactory set (i.e., the inputs that satisfy the specification) but might be influenced by a misclassification of the image classifier. Since the AEBS Compositional Falsification of CPSML 19 Fig. 7: Analysis of Region of Uncertainty (ROU) for AEBS and property G(¬(dist(t)) ≤ 0). Red crosses in the ROU denote misclassifications generated by the ML analyzer that leads to a system-level counterexample. A circle denotes a “benign” misclassification. relies on the classifier only for distances larger than 30m, we can focus on the subset of the input space with dist(0) ≥ 30. Specifically, we identify potential counterexamples by analyzing a pessimistic version of the model where the ML component always misclassifies the input pictures (see Figure 6, middle image). From these results, we can compute the region of uncertainty, shown in Figure 6 on the right. We can then focus our attention on the ROU, as shown in Fig. 7. In particular, we can identify candidate counterexamples, such as, for instance, (25, 40) (i.e., vs (0) = 25 and dist(0) = 40). Next, let us consider the AlexNet image classifier and the ML analyzer presented in Section 4 that generates pictures from the abstract feature space A = [0, 1]3 , where the dimensions of A determine the x and z displacements of a car and the brightness of a generated picture, respectively. The goal now is to determine an abstract feature ac ∈ A related to the candidate counterexample (25, 40), that generates a picture that is misclassified by the ML component and might lead to a violation of the specification ϕ. The dist(0) component of uc = (25, 40) determines a precise z displacement a2 = 0.2 in the abstract picture. Now, we need to determine the values of the abstract x displacement and brightness. Looking at the interpolation projection of Figure 4 (b), we notice that the approximation function misclassifies pictures with abstract component a1 ∈ [0.4, 0.5] and a3 = 0.2. Thus, it is reasonable to try to falsify the original model on the input element vs (0) = 25, dist(0) = 40, and concretized picture γ(0.5, 0.2, 0.2). For this targeted input, the temporal logic falsifier computed a robustness value for ϕ of −24.60, meaning that a falsifying counterexample has been found. Other counterexamples found with the same technique are, e.g., (27, 45) or (31, 56) that, associated with the correspondent concretized pictures with a1 = 0.5 and a3 = 0.2, lead to the robustness values −23.86 and −24.38, respectively (see Figure 7, red crosses). Conversely, we also disproved some candidate counterexamples, such as (28, 50), (24, 35), or 20 Dreossi, Donzé, Seshia (25, 45), whose robustness values are 9.93, 7.40, and 7.67 (see Figure 7, green circles). For experimental purposes, we try to falsify a counterexample in which we change the x position of the abstract feature so that the approximation function correctly classifies the picture. For instance, by altering the counterexample (27, 45) with γ(0.5, 0.225, 0.2) to (27, 45) with γ(1.0, 0.225, 0.2), we obtain a robusteness value of 9.09, that means that the AEBS is able to avoid the car for the same combination of velocity and distance of the counterexample, but different x position of the preceding vehicle. Another example, is the robustness value −24.38 of the falsifying input (31, 56) with γ(0.5, 0.28, 0.2), that altered to γ(0.0, 0.28, 0.2), changes to 12.41. Finally, we test Inception-v3 on the corner case misclassification identified in Section 4.2 (i.e., the picture γ(0.1933, 0.0244, 0.4589)). The distance dist(0) = 4.88 related to this abstract feature is below the activation threshold of the image classifier. Thus, the falsification points are exactly the same as those of the computed validity domain (i.e., dist(0) = 4.88 and vs (0) ∈ [4, 40]). This study shows how a misclassification of the ML component might not affect the correctness of the CPSML model. 5.2 Case Study 2: Unity-Udacity Simulator-based AEBS We now analyze an AEBS deployed within Udacity’s self-driving car simulator.3 The simulator, built with the Unity game engine4 , can be used to teach cars how to navigate roads using deep learning. We modified the simulator in order to focus exclusively on the braking system. In our settings, the car steers by following some predefined waypoints, while acceleration and braking are controlled by an AEBS connected to a CNN. An onboard camera sends images to the CNN whose task is to detect cows on the road. Whenever an obstacle is detected, the AEBS triggers a brake that slows the vehicle down and prevents the collision against the obstacle. We implemented a CNN that classifies the pictures captured by the onboard camera in two categories “cow” and “not cow”. The CNN has been implemented and trained using Tensorflow. We connected the CNN to the Unity C# class that controls the car. The communication between the neural network and the braking controller happens via Socket.IO protocol.5 A screenshot of the car braking in presence of a cow is shown in Figure 8a. A video of the AEBS in action can be seen at https://www.youtube.com/watch?v=Sa4oLGcHAhY. The CNN architecture is depicted in Figure 9. The network consists of eight layers: the first six are alternations of convolutions and max-pools with ReLU activations, the last two are a fully connected layer and a softmax that outputs the network prediction. The dimensions and hyperparameters of our 3 Udacity’s Self-Driving Car Simulator: self-driving-car-sim 4 Unity: https://unity3d.com/ 5 Socket.IO protocol: https://github.com/socketio https://github.com/udacity/ Compositional Falsification of CPSML 21 (a) Correct detection and braking. (b) Misclassification and collision. Fig. 8: Unity-Udacity simulator AEBS. The onboard camera sends images to the CNN. When a cow is detected a braking action is triggered until the car comes to a complete stop. Full videos available at https:// www.youtube.com/watch?v=Sa4oLGcHAhY and https://www.youtube.com/ watch?v=MaRoU5OgimE. Fig. 9: CNN architecture. [l] [l] nH × nW [l] nC f [l] p[l] s[l] 0 128 × 128 3 - 1 128 × 128 32 3 1 1 2 64 × 64 32 2 0 2 3 64 × 64 32 3 1 1 4 32 × 32 32 2 0 2 5 32 × 32 64 3 1 1 6 16 × 16 64 2 0 2 7 128 × 1 1 - 8 2×1 1 - Table 1: CNN dimensions and hyperparameters. [l] [l] [l] neural network are shown in Table 1, where l is a layer, nH × nW × nC is the dimension of the volume computed by the layer l, f [l] is the filter size, p[l] is the padding, and s[l] is the stride. Our dataset, composed by 1k road images, was split into 80% train data and 20% validation. We trained our model using cross-entropy cost function and Adam algorithm optimizer with learning rate 10−4 . Our model reached 0.95 accuracy on the validation set. In our experimental evaluation, we are interested in finding a case where our AEBS fails, i.e., the car collides against a cow. This requirement can be 22 Dreossi, Donzé, Seshia (a) Grid-based sampling. (b) Halton sequence sampling. Fig. 10: CNN analysis. formalized as the STL specification G(kxcar − xcow k > 0) that imposes the Euclidean distance of the car and cow positions (xcar and xcow , respectively) to be always positive. We analyzed the CNN feature space by considering the abstract space A = [0, 1]3 , where the dimensions of A determine the displacement of the cow of ±4m along the x-axis, its rotation along the y-axis, and the intensity of the red color channel. We sampled the elements from the abstract space using both Halton sequence and a grid-based approach. The obtained results are shown in Figure 10. In both figures, green points are those that lead to images that are correctly classified by the CNN; conversely, red points denote images that are misclassified by the CNN and can potentially lead to a system falsification. Note how we were able to identify a cluster of misclassifying images (lowerleft corners of both Figures 10a and 10b) as well as an isolated corner case (upper-center, Figure 10a). Finally, we ran some simulations with the misclassifying images identified by our analysis. Most of the them brought the car to collide against the cow. A screenshot of a collision is shown in Figure 8b. The full video is available at https://www.youtube.com/watch?v=MaRoU5OgimE. 6 Conclusion We presented a compositional falsification framework for STL specifications against CPSML models based on a decomposition between the analysis of machine learning components and the system containined them. We introduced an ML analyzer able to abstract feature spaces, approximate ML classifiers, and provide sets of misclassified feature vectors that can be used to drive the falsification process. We implemented our framework and showed its effectiveness for an autonomous driving controller using perception based on deep neural networks. Compositional Falsification of CPSML 23 This work lays the basis for future advancements. There are several directions for future work, both theoretical and applied. In the remainder of this section, we describe this landscape for future work. See [33] for a broader discussion of these points in the context of the goal of verified intelligent systems. Improvements in the ML Analyzer: We intend to improve our ML Analyzer exploring the automatic generation of feature space abstractions from given training sets. One direction is to exploit the structure of ML components, e.g., the custom architectures that have been developed for deep neural networks in applications such as autonomous driving [17]. For instance, one could perform a sensitivity analysis that indicates along which axis in the abstract space we should move in order to change the output label or reduce the confidence of the classifier on its output. Another direction is to improve the sampling techniques that we have explored so far, ideally devising one that captures the probability of detecting a corner-case scenario leading to a property violation. Of particular interest are adaptive sampling methods involving further cooperation between the ML Analyzer and the CPS Analyzer. We are also interested in integrating other techniques for generating misclassifications of ML components (e.g., [26, 16, 7]) into our approach. Impacting the ML component design: Our falsification approach produces input sequences that result in the violation of a desired property. While this is useful, it is arguably even more useful to obtain higher-level interpretable insight into where the training data falls short, what new scenarios must be added to the training set, and how the learning algorithms’ parameters must be adjusted to improve accuracy. For example, one could use techniques for mining specifications or requirements (e.g., [19, 40]) to aggregate interesting test images or video into a cluster that can be represented in a high-level fashion. One could also apply our ML Analyzer outside the falsification context, such as for controller synthesis. Further Applications: Although our approach has shown initial promise for reasoning about autonomous driving systems, much more remains to be done to make this practical. Real sensor systems for autonomous driving involve multiple sensors (cameras, LIDAR, RADAR, etc.) whose raw outputs are often fused and combined with deep learning or other ML techniques to extract higher level information (such as the location and type of objects around the vehicle). This sensor space has very high dimensionality and high complexity, not to mention streams of sensor input (e.g., video), that one must be able to analyze efficiently. To handle industrial-scale production systems, our overall analysis must be scaled up substantially, potentially via use of cloud computing infrastructure. Finally, our compositional methodology could be extended to other, non-cyber-physical, systems that contain ML components. References 1. Imagenet. http://image-net.org/. 2. Udacity self-driving car simulator built with unity. self-driving-car-sim. https://github.com/udacity/ 24 Dreossi, Donzé, Seshia 3. Y. Annpureddy, C. Liu, G. E. Fainekos, and S. Sankaranarayanan. S-taliro: A tool for temporal logic falsification for hybrid systems. In Tools and Algorithms for the Construction and Analysis of Systems, TACAS, pages 254–257, 2011. 4. A. L. Blum and P. Langley. Selection of relevant features and examples in machine learning. Artificial intelligence, 97(1):245–271, 1997. 5. M. Bojarski, D. Del Testa, D. Dworakowski, B. Firner, B. Flepp, P. Goyal, L. D. Jackel, M. Monfort, U. Muller, J. Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016. 6. M. S. Branicky, S. M. LaValle, K. Olson, and L. Yang. Quasi-randomized path planning. In Robotics and Automation, 2001. Proceedings 2001 ICRA. IEEE International Conference on, volume 2, pages 1481–1487. IEEE, 2001. 7. N. Carlini and D. Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pages 39–57, 2017. 8. A. Donzé. Breach, a toolbox for verification and parameter synthesis of hybrid systems. In Computer Aided Verification, CAV, pages 167–170, 2010. 9. T. Dreossi, T. Dang, A. Donzé, J. Kapinski, X. Jin, and J. Deshmukh. Efficient guiding strategies for testing of temporal properties of hybrid systems. In NASA Formal Methods, NFM, pages 127–142, 2015. 10. T. Dreossi, A. Donzé, and S. A. Seshia. Compositional falsification of cyber-physical systems with machine learning components. In NASA Formal Methods Conference (NFM), May 2017. 11. T. Dreossi, S. Ghosh, A. L. Sangiovanni-Vincentelli, and S. A. Seshia. Systematic testing of convolutional neural networks for autonomous driving. In ICML Workshop on Reliable Machine Learning in the Wild (RMLW), 2017. Published on Arxiv: abs/1708.03309. 12. P. S. Duggirala, S. Mitra, M. Viswanathan, and M. Potok. C2E2: a verification tool for stateflow models. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 68–82. Springer, 2015. 13. A. Fawzi, O. Fawzi, and P. Frossard. Analysis of classifiers’ robustness to adversarial perturbations. arXiv preprint arXiv:1502.02590, 2015. 14. B. Hannaford. Resolution-first scanning of multidimensional spaces. CVGIP: Graphical Models and Image Processing, 55(5):359–369, 1993. 15. G. Hinton et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. 16. X. Huang, M. Kwiatkowska, S. Wang, and M. Wu. Safety verification of deep neural networks. CoRR, abs/1610.06940, 2016. 17. 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.5 mb model size. arXiv preprint arXiv:1602.07360, 2016. 18. Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In ACM Multimedia Conference, ACMMM, pages 675–678, 2014. 19. X. Jin, A. Donzé, J. Deshmukh, and S. A. Seshia. Mining requirements from closedloop control models. IEEE Transactions on Computer-Aided Design of Circuits and Systems, 34(11):1704–1717, 2015. 20. G. Katz, C. W. Barrett, D. L. Dill, K. Julian, and M. J. Kochenderfer. Reluplex: An efficient SMT solver for verifying deep neural networks. In 29th International Conference on Computer Aided Verification (CAV), pages 97–117, 2017. 21. A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. 22. O. Maler and D. Nickovic. Monitoring temporal properties of continuous signals. In Formal Techniques, Modelling and Analysis of Timed and Fault-Tolerant Systems, pages 152–166. Springer, 2004. 23. Martı́n Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. 24. J. Matousek. Geometric discrepancy: An illustrated guide, volume 18. Springer Science & Business Media, 2009. Compositional Falsification of CPSML 25 25. R. S. Michalski, J. G. Carbonell, and T. M. Mitchell. Machine learning: An artificial intelligence approach. Springer Science & Business Media, 2013. 26. S.-M. Moosavi-Dezfooli, A. Fawzi, and P. Frossard. DeepFool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2574–2582, 2016. 27. W. J. Morokoff and R. E. Caflisch. Quasi-random sequences and their discrepancies. SIAM Journal on Scientific Computing, 15(6):1251–1279, 1994. 28. A. Nguyen, J. Yosinski, and J. Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Computer Vision and Pattern Recognition, CVPR, pages 427–436. IEEE, 2015. 29. H. Niederreiter. Low-discrepancy and low-dispersion sequences. Journal of number theory, 30(1):51–70, 1988. 30. H. Niederreiter. Random number generation and quasi-Monte Carlo methods. SIAM, 1992. 31. K. Pei, Y. Cao, J. Yang, and S. Jana. DeepXplore: Automated whitebox testing of deep learning systems. In Proceedings of the 26th Symposium on Operating Systems Principles (SOSP), pages 1–18, 2017. 32. J. Rosenblatt and M. Wierdl. Pointwise ergodic theorems via harmonic analysis. In Conference on Ergodic Theory, number 205, pages 3–151, 1995. 33. S. A. Seshia, D. Sadigh, and S. S. Sastry. Towards verified artificial intelligence. CoRR, abs/1606.08514, 2016. 34. P. Shirley et al. Discrepancy as a quality measure for sample distributions. In Proc. Eurographics, volume 91, pages 183–194, 1991. 35. I. H. Sloan and S. Joe. Lattice methods for multiple integration. Oxford University Press, 1994. 36. C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. arXiv:1312.6199, 2013. 37. L. Taeyoung, Y. Kyongsu, K. Jangseop, and L. Jaewan. Development and evaluations of advanced emergency braking system algorithm for the commercial vehicle. In Enhanced Safety of Vehicles Conference, ESV, pages 11–0290, 2011. 38. Trandafir, Aurel and Weisstein, Eric W. Quasirandom sequence. From MathWorld–A Wolfram Web Resource. 39. V. Vapnik. Principles of risk minimization for learning theory. In NIPS, pages 831–838, 1991. 40. M. Vazquez-Chanlatte, J. V. Deshmukh, X. Jin, and S. A. Seshia. Logical clustering and learning for time-series data. In Computer Aided Verification - 29th International Conference (CAV), pages 305–325, 2017. 41. H. Weyl. Über die gleichverteilung von zahlen mod. eins. Mathematische Annalen, 77(3):313–352, 1916. 42. T. Yamaguchi, T. Kaga, A. Donzé, and S. A. Seshia. Combining requirement mining, software model checking, and simulation-based verification for industrial automotive systems. In Proceedings of the IEEE International Conference on Formal Methods in Computer-Aided Design (FMCAD), October 2016.
3cs.SY
arXiv:1310.7623v2 [math.NT] 30 Oct 2013 DETECTING FAST SOLVABILITY OF EQUATIONS VIA SMALL POWERFUL GALOIS GROUPS S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI To Professors Tsit-Yuen Lam and Helmut Koch with admiration and respect. Abstract. Fix an odd prime p, and let F be a field containing a primitive pth root of unity. It is known that a p-rigid field F is characterized by the property that the Galois group GF (p) of the maximal p-extension F (p)/F is a solvable group. We give a new characterization of p-rigidity which says that a field F is p-rigid precisely when two fundamental canonical quotients of the absolute Galois groups coincide. This condition is further related to analytic p-adic groups and to some Galois modules. When F is p-rigid, we also show that it is possible to solve for the roots of any irreducible polynomials in F [X] whose splitting field over F has a p-power degree via non-nested radicals. We provide new direct proofs for hereditary p-rigidity, together with some characterizations for GF (p) – including a complete description for such a group and for the action of it on F (p) – in the case F is p-rigid. 1. Introduction The problem of solving algebraic equations by radicals has a long and rich history which dates back to the 7th century when the Indian mathematician Brahmagupta obtained the famous quadratic formula. After the Italian mathematicians Niccolò Tartaglia and Girolamo Cardano obtained the solution of the cubic equation in the 16th century, mathematicians naturally wondered whether it is possible to solve equations of any degree by radicals. Évariste Galois, in his theory of equations, gave an elegant answer in the 19th century. It is possible to solve an equation by radicals, provided the Galois group of the underlying equation is a solvable group. An important consequence is the result on the insolvability of general algebraic equations of degree 5 and above by radicals. Since every finite p-group is a solvable group, we know that every irreducible polynomial in F [X] whose splitting field over F has p-power degree, is solvable by radicals. In this paper, we will show that if the underlying field F is p-rigid (see definition below), then it is possible to do even better: we can “fast-solve” for the roots. That is, we can solve for the roots√of these irreducible polynomials via non-nested radicals, i.e., elements of the type n a p √ n m a + b, with a, b ∈ F r {0} and with a ∈ F r {0}. (An element of the form n, m > 1 is, for instance, nested.) This improves the following result: the Galois Date: November 4, 2017. 2010 Mathematics Subject Classification. 12F10, 12G10, 20E18. Key words and phrases. Rigid fields, Galois modules, Absolute Galois groups, Bloch-Kato groups, Powerful pro-p groups. The first author is partially supported by NSA grant H98230-13-1-0238 and the second author from NSERC grant RO37OA1OO6. 1 2 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI group of the maximal p-extension F (p)/F is a solvable group if and only if the field F is p-rigid (proved first in [EK98]). We make the blanket assumption that p is an odd prime, and all fields in this paper contain a primitive pth root of unity – unless explicitly stated otherwise. Let F be such a field and let F p denote the collection of elements in F that are pth powers. An element a in F r F p is said to be p-rigid if the image of the norm Sp−1 √ map F ( p a) → F is contained in k=0 ak F p . We say that F is p-rigid if all of the elements of F r F p are p-rigid. The notion of p-rigidity was introduced by K. Szymiczek in [Sz77, Ch. III, §2], and it was developed and thoroughly studied first in the case of p = 2, and then in the case of p odd. For p = 2, the definition of 2-rigidity depends on the behavior of certain quadratic forms. The consequences of 2-rigidity were studied in several papers including [Wr78, Wr81, Ja81, JW89, AGKM01, LS02]. Today many results about 2-rigid fields are known, and these fields are relatively well understood. For p odd, the study of p-rigid fields was developed by Ware in [Wr92], and later on by others (see [Ef06] and [MST] for some highlights on the history of p-rigidity). In [Wr92], Ware introduced a different notion of rigidity called hereditary p-rigidity. A field F is said to be hereditarily p-rigid if every subextension of the maximal pextension F (p)/F is p-rigid. As Ware pointed out, to conclude that F is hereditary p-rigid, it is enough to check that each finite extension K of F is p-rigid. Ware also gave a Galois-theoretic description of hereditarily p-rigid fields. In [EK98], A. Engler and J. Koenigsmann showed that p-rigidity implies hereditary p-rigidity. In this paper we establish some new characterizations and deeper connections for p-rigid fields. Associated√to a field F , we now introduce some important field extensions. Let F (2) = F ( p F ). Let F {3} denote the compositum of all Galois extensions K/F (2) of degree p. Similarly, let F (3) denote the compositum of all Galois extensions K/F (2) of degree p for which K/F is also Galois. Finally, let F (p) denote the compositum of all Galois extensions K/F that are of degree a power of p. Our main theorem then states: Theorem A. Let p be an odd prime, and let F be a field containing a primitive p-th root of unity. F is p-rigid if and only if F (3) = F {3} . It is worth pointing out that the fields F (3) and F {3} play an important role in studying the arithmetic and Galois cohomology of fields. For instance, in [MSp96] it is shown that Gal(F (3) /F ) in the case when p = 2 determines essentially the Witt ring of quadratic forms. More recently, in [CEM12] it is shown that Gal(F (3) /F ) determines the Galois cohomology of GF (p) := Gal(F (p)/F ) with Fp coefficients! In [EM13], an even smaller Galois group over F ; namely Gal(F {3} /F ), was shown to have this property. Therefore, Theorem A answers the natural question: “For which fields F , does one have F {3} = F (3) ?”, a question which has its own importance beyond the connection to p-rigid fields. Furthermore, we provide a Galois-theoretic characterization for p-rigid fields, together with an explicit description of the maximal p-extension F (p) of a p-rigid field F , and of its maximal pro-p Galois group GF (p). In particular, we prove the equivalence of the following three statements: GF (p) is solvable; F is p-rigid; and F is hereditarily p-rigid (see Theorem 3.16 and Corollary 3.22). Although this result is proved in [EK98, Prop. 2.2], this earlier proof is less direct than our approach. In particular, it relies on a number of results on Henselian valuations, covered in DETECTING FAST SOLVABILITY OF EQUATIONS 3 several papers, and on some results of [Wr92]. On the other hand, we refer to [Wr92] only for some definitions, and we develop and prove our results independently of both [Wr92] and [EK98]. In fact our approach is substantially different from the approach of Engler and Koenigsmann, as our proofs use only elementary methods from Galois theory and the theory of cyclic algebras – in the spirit of Ware’s paper. Using relatively simple argument but powerful Serre’s theorem on cohomological dimensions of open subgroups of pro-p groups and corollary of Rost-Voevodsky’s proof of the Bloch-Kato conjecture we are able to prove “going down p-rigidity theorem” in the case when GF (p) is finitely generated; see Theorem 4.16. Then, using this result and the well-known Lazard’s group theoretic characterization of p-adic analytic pro-p groups we are able to show that if GF (p) is finitely generated then F is p-rigid if and only if GF (p) is a p-adic analytic pro-p group. We also investigate how p-rigid fields are related to certain powerful pro-p groups, studied by the third author in [Qu13], and with certain Galois modules, studied by J. Swallow and the second author in [MS03]. Maximal pro-p Galois groups play a fundamental role in the study of absolute Galois groups of fields. Moreover, the cases where F is a p-rigid field and where GF (p) is a free pro-p group, or a Demuškin group, are cornerstones in the study of maximal pro-p Galois groups. Therefore, it is important to have a clear, complete and explicit description of the former case. In fact we will be able to recover the entire group GF (p) from rather small Galois groups and the structure of the pth roots of unity contained in F . This paper is organized as follows. In Section 2 we review some preliminary definitions and basic facts about pro-p groups and their cohomology. In Section 3 we state and prove results on the cohomology and the group structure of the Galois group GF (p), which will be used in proving that p-rigidity implies hereditary prigidity, and in characterizing GF (p) for p-rigid fields. Finally in Section 4 we prove Theorem A and we study the connections with the fast-solvability of equations and other group-theoretic consequences of p-rigidity. 2. Preliminaries 2.1. Pro-p groups. Henceforth we will work in the category of pro-p groups and assume that all our subgroups of pro-p groups will be closed. Let G be a pro-pgroup. For σ, τ in G, σ τ := στ σ −1 , and [σ, τ ] := σ τ ·τ −1 is the commutator of σ and τ . The closed subgroup of G generated by all of the commutators, will be denoted by [G, G]. Note that [DdSMS03] has a slighlt different convention for commutators. They define as a commutator [σ, τ ] what in our notation is [σ −1 , τ −1 ]. However, this will not effect the citation and use of results in [DdSMS03]. For a profinite group G, the Frattini subgroup Φ(G) of G is defined to be the intersection of all maximal normal subgroups of G. If G is a pro-p group, it can be shown that Φ(G) := Gp [G, G] [DdSMS03, Prop. 1.13], where Gp is the subgroup generated by the p-powers of the elements of G. Hence G/Φ(G) is a p-elementary abelian group of possibly infinite rank. We define the subgroups γi (G) and λi (G) of G to be the elements of the lower descending central series, resp. of the lower p-descending central series, of the pro-p 4 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI group G. That is, γ1 (G) = λ1 (G) = G, and γi+1 (G) := [γi (G), G], λi+1 (G) := λi (G)p [λi (G), G], for i ≥ 1. In this terminology, note that the Frattini subgroup Φ(G) is exactly λ2 (G). If G is finitely generated, the subgroups λi (G) make up a system of open neighborhoods of 1 in G. Finally, we denote by d(G) the minimal number of generators of G. It follows that d(G) = dim(G/Φ(G)) as an Fp -vector space. If d = d(G), we say that G is d-generated. If G is a finitely generated, then the rank rk(G) of the group G is rk(G) = sup {d(C)} = sup {d(C)|C is open} C≤G C≤G (see [DdSMS03, §3.2]). 2.2. Maximal pro-p Galois groups and their cohomology. Consider Fp as trivial G-module. The cohomology groups H k (G, Fp ) of G with coefficients in Fp are defined for all k ≥ 0. In particular, (2.1) H 0 (G, Fp ) = Fp and H 1 (G, Fp ) = Hom(G, Fp ). By Pontryagin duality it follows that (2.2) H 1 (G, Fp ) = G∨ = (G/Φ(G)) ∨  and d(G) = dimFp H 1 (G, Fp ) , where the symbol ∨ denotes the Pontryagin dual (see [NSW, Ch. III §9]). The cohomological dimension cd(G) of a (pro-)p group G is the least positive integer k such that H k+1 (G, Fp ) = 0, andL if such k does not exist, one sets cd(G) = ∞. The direct sum H • (G, Fp ) = k≥0 H k (G, Fp ), is equipped with the cup product H r (G, Fp ) × H s (G, Fp ) ∪ / H r+s (G, Fp ), which gives it a structure of a graded commutative Fp -algebra. For further facts on the cohomology of profinite groups we refer the reader to [NSW]. We say that a pro-p group G is a Bloch-Kato pro-p group if for every closed subgroups C of G the Fp -cohomology algebra H • (C, Fp ) is quadratic, i.e., it is generated by H 1 (C, Fp ) and the relations are generated as ideal by elements in H 2 (C, Fp ) (see [Qu13]). Given a field F , let F̄ s denote the separable closure of F , and let F (p) be the maximal p-extension of F , i.e., F (p) is the compositum of all finite Galois extensions K/F of p-power degree. Then GF := Gal(F̄ s /F ) is the absolute Galois group of F , and the maximal pro-p Galois group GF (p) of F is the maximal pro-p quotient of GF or, equivalently, GF (p) is the Galois group of the maximal p-extension F (p)/F . We then have the Galois correspondence, according to which the closed subgroups of GF (p) correspond to subextensions of F (p)/F and conversely. By the proof of the Bloch-Kato conjecture, obtained by M. Rost and V, Voevodsky (with C. Weibel’s patch), one knows that the maximal pro-p Galois group of a field containing the pth roots of unity is a Bloch-Kato pro-p group [We08, We09, Vo11]. Another important feature of maximal pro-p Galois groups is the following: if p is odd then GF (p) is torsion-free. This Artin-Schreier type result is due to E. Becker (see [Be74]). DETECTING FAST SOLVABILITY OF EQUATIONS 5 The study of maximal pro-p Galois groups is extremely important, since they are easier to handle than absolute Galois groups; yet they provide substantial information about absolute Galois groups and the structure of their base fields. 2.3. Important subextensions. Throughout this paper, fields are assumed to contain the pth roots of unity. √ Given a field F , let F (2) = F ( p F ), i.e., F (2) is the compositum of all the extensions √  F p a , with a ∈ Ḟ . For n ≥ 3, we define recursively the extensions F {n} /F and F (n) /F in the following way: • the field F {n} denotes the compositum of all the extensions p  √ ˙ ˙ F {n−1} ( p γ) , with γ ∈ F {n−1} r F {n−1} , where we put F (2) instead of F {2} • the field F (n) denotes the compositum of all the extensions p  √ ˙ ˙ r F (n−1) F (n−1) ( p γ) , with γ ∈ F (n−1) √ such that F (n−1) ( p γ)/F is Galois. Notice that all extensions F {n} /F and F (n) /F are Galois. Proposition 2.1. For any field F one has [ F (p) = F (n) . n>1 Proof. The inclusion F (p) ⊇ n F (n) is obvious. For the converse, let K/F be a finite Galois p-extension of degree |K : F | = pm , for some m ∈ N. Then, by the properties of finite p-groups, one has a chain S F = K0 ⊂ K1 ⊂ . . . ⊂ Km = K of fields such that Ki /F is Galois and |Ki : F | = pi for every i = 1, . . . , m. In particular, for every i the extension Ki+1 /Ki is cyclic of degree p, and Gal(Ki+1 /Ki ) is central in Gal(Ki+1 /F ). We claim that Ki ⊆ F (i+1) for every i. This is clear for i = 0 and i = 1. Assume Ki−1 ⊆ F (i) by induction. Then Ki /Ki−1 is Galois and cyclic of degree p, thus √ Ki = Ki−1 ( p α) with α ∈ F (i) . Consequently Ki ⊆ F (i+1) , and the statement of the Lemma follows.  Let Ḟ := F r {0}. Then, for every Galois p-extension K/F , K̇ is a GF (p)module. Moreover, since σ.γ p = (σ.γ)p for any γ ∈ Ḟ (p) and σ ∈ GF (p), one has that K̇/K̇ p is also a GF (p)-module, with K as above. We denote the module Ḟ (2) /(Ḟ (2) )p by J. The module J has been studied in [AGKM01] for p = 2, and in [MST] for p odd,- where it has been shown that J provides substantial information about the field F . We can generalize the construction of J in the following way. For every n ≥ 3 let ˙ F (n) p . Jn =  ˙ F (n) 6 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI We set J = J2 . Then each module Jn is a Fp -vector space and a GF (p)-module. (Note that the notation used here is different from the one in [AGKM01] and [MST].) The following lemma is a well known fact from elementary Galois theory. Lemma 2.2. Let K/F be a Galois p-extension of fields, and let a ∈ K̇ r K̇ p . Then √ p K( a)/F is Galois if, and only if, σ.a ∈ K̇ p a for every σ ∈ Gal(K/F ). It follows that (2.3) F (n+1) =F (n)  q p G (Jn ) for every n ≥ 2, where JnG denotes the submodule of Jn fixed by G = GF (p). 3. Rigid fields Given a field F , the quotient group Ḟ /Ḟ p is a p-elementary abelian group, so that we may consider it as Fp -vector space. Henceforth we will always assume that Ḟ /Ḟ p is not trivial. For an element a ∈ Ḟ , [a]F = aḞ p denotes the coset of Ḟ /Ḟ p to which a belongs. In particular, k.[a]F = [ak ]F for k ∈ Fp , and for a, b ∈ Ḟ , [a]F √ √ p p and [b]F are Fp -linearly independent if, and only if, F ( a) 6= F ( b). Moreover, let µp ⊆ F be the group of the roots of unity of order p. Then one may fix an isomorphism µp ∼ = Fp , so that by Kummer theory one has the isomorphism √ σ. p a p 1 . (3.1) φ : Ḟ /Ḟ −→H ˜ (GF (p), Fp ) , φ ([a]F ) (σ) = √ p a √ Definition. Let N denote the norm map N : F ( p a) → F . An element a ∈ Ḟ r Ḟ p √ is said to be p-rigid if b ∈ N (F ( p a)) implies that b ∈ [ak ]F for some k ≥ 0. The field F is called p-rigid if every element of Ḟ r Ḟ p is p-rigid. In [Wr92], R. Ware calls a field F hereditarily p-rigid if every p-extension of F is a p-rigid field. In this paper we shall call such fields heriditary p-rigid. Example 3.1. i. Let q be a power of a prime such that p | (q − 1). Let F = Fq ((X)), namely, F is the field of Laurent series on the indeterminate X with coefficients in the finite field Fq . Then F is p-rigid [Wr92, p. 727]. ii. Let ζ be a primitive pth root of unity and ℓ a prime different from p. Then F = Qℓ (ζ) is p-rigid. Indeed, by [NSW, Prop. 7.5.9] the maximal prop Galois group GF (p) is 2-generated and it has cohomological dimension cd(GF (p)) = 2. Hence GF (p) satisfies Corollary 3.21, and F is p-rigid. 3.1. Powerful pro-p groups. A pro-p group G is said to be powerful if  p G for p odd, [G, G] ⊆ G4 for p = 2, where [G, G] is the closed subgroup of G generated by the commutators of G, and Gp is the closed subgroup of G generated by the p-powers of the elements of G. DETECTING FAST SOLVABILITY OF EQUATIONS 7 Moreover, a finitely generated pro-p group G is called uniformly powerful, or simply uniform, if G is powerful, and |λi (G) : λi+1 (G)| = |G : Φ(G)| for all i ≥ 1. A finitely generated powerful group is uniform if and only if it is torsion-free (see [DdSMS03, Thm. 4.5]). Finally, a pro-p group G is called locally powerful if every finitely generated closed subgroup of G is powerful. In order to state the classification of torsion-free, finitely generated, locally powerful pro-p groups – which we shall use to describe explicitly the maximal pro-p groups of rigid fields in § 3.2 – we shall introduce the notion of oriented pro-p groups. Definition. A pro-p group G together with a (continuous) homomorphism θ : G → Z× p is called an oriented pro-p group, and θ is called the orientation of G. If one has that ghg −1 = hθ(g) for every h ∈ ker(θ) and every g ∈ G, then G is said to be θ-abelian. The above definition generalizes to all pro-p groups the notion of cyclotomic character of an absolute (and maximal pro-p) Galois group. Such homomorphism has been studied previously for maximal pro-p Galois groups in [Ef98] (where it is called “cyclotomic pair”), and in [Ko01] for absolute Galois groups. (See also [JW89] for the case p = 2.) Proposition 3.2 ([Qu13], Proposition 3.4). Let G be an oriented pro-p group with orientation θ. Then G is θ-abelian if and only if there exists a minimal set of generators {x◦ , xi |i ∈ I} for some set of indices I, such that G has a presentation D E θ(x )−1 (3.2) G = x◦ , xi [x◦ , xi ] = xi ◦ , [xi , xj ] = 1, i, j ∈ I . I.e., G ∼ = Zp ⋉ Z, with Z ∼ = ZIp , and the action of the first factor on Z is the multiplication by θ(x◦ ). Remark 3.3. Notice that the statement of [Qu13, Prop. 3.4] refers only to finitely generated pro-p groups, yet the proof does not use this fact, so that it holds also for infinitely generated pro-p groups. In fact, torsion-free, finitely generated, locally powerful pro-p groups and θabelian groups coincide. Theorem 3.4 ([Qu13], Thm. A). A finitely generated uniform pro-p group G is locally powerful if and only if there exists an orientation θ : G → Z× p such that G is θ-abelian. Actually, it is possible to extend the above result to infinitely generated pro-p groups. Proposition 3.5. A locally powerful torsion-free pro-p group G is θ-abelian for some orientation θ : G → Z× p. Proof. By Theorem 3.4, we are left to the case when G is infinitely generated. If G is abelian, then G is θ-abelian with θ ≡ 1. Hence, suppose G is non-abelian. Let C < G be any finitely generated subgroup. Thus C is θC -abelian, for some homomorphism θC . In particular, let HC = [C, C] be the commutator subgroup of λC C, and let ZC = ker(θC ). Then Z = CC (H), and HC = ZC , for some λC ∈ pZp . 8 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI Let H = [G, G] be the commutator subgroup of G, and let Z ≤ G be the subgroup generated by all the elements y ∈ G such that y λ ∈ H for some λ ∈ pZp . Then one has [ [ HC and Z = ZC , H= C<G C<G where ∗ denotes the pro-p closure inside G. Notice that all the HC and the ZC (and thus also H and Z) are abelian. In particular, G ) Z, since G is non-abelian, and G/Z ∼ = Zp . For every element x ∈ GrZ, one has [x, Z] = Z λx for some λx ∈ pZp and take x0 among all such x such that λx0 is minimal p-adic value. Define the homomorphism θ : G → Z× p such that ker(θ) = Z and θ(x0 ) = 1 + λx0 . Then θ|C = θC for every finitely generated large enough subgroup C < G, so that G is in fact θ-abelian.  Remark 3.6. i. Notice that, although the theory of powerful pro-p groups works effectively only for finitely generated groups, it extends nicely to the infinitely generated case when we assume local powerfulness. ii. It is possible to prove Proposition 3.5 using methods from Lie theory, since every uniformly powerful pro-p group G is associated to a Zp -Lie algebra log(G) (see [DdSMS03, §4.5] and [Qu13, §3.1]). In the case of a locally powerful group, such Zp -Lie algebra has a very simple shape, so that it is possible to “linearize” the proof. 3.2. The maximal pro-p Galois group of a rigid field. Throughout this subsection we shall denote the maximal pro-p Galois group GF (p) simply by G. Let a, b ∈ Ḟ . The cyclic algebra (a, b)F is the F -algebra generated by elements u, v subject to the relations up = a, v p = b and uv = ζp vu, where ζp is a pth primitive root of unity. From [Se79, Ch. XIV, §2, Proposition 5], one knows that [(a, b)F ] = 1 in the Brauer group Br(F ) if and only if χa ∪ χb = 0 in H 2 (G, Fp ), with χa = φ([a]F ) and χb = φ([b]F ) as in (3.1). (For the definition and the properties of the Brauer group of a field see [GS06, Ch. √ 2].) Moreover, it is well known that [(a, b)F ] = 1 if, and only if, b is a norm of F ( p a). Therefore, F is p-rigid if, and only if, the map (3.3) Λ2 (∪) : H 1 (G, Fp ) ∧ H 1 (G, Fp ) −→ H 2 (G, Fp ), induced by the cup product, is injective. The following theorem is due to P. Symonds and Th. Weigel. Theorem 3.7 ([SW00], Thm. 5.1.6). Let G be a finitely generated pro-p group. Then the map Λ2 (∪) : H 1 (G, Fp ) ∧ H 1 (G, Fp ) −→ H 2 (G, Fp ) is injective if, and only if, G is powerful. By (2.2), (3.1), and [MS03] this implies the following. Proposition 3.8. Assume that dimFp (Ḟ /Ḟ p ) is finite. Then F is rigid if and only if G is powerful. Moreover, F is hereditary p-rigid if and only if G is locally powerful. Remark 3.9. The hereditary p-rigidity of F implies the locally powerfulness of G for all fields by Proposition 3.8 and the definition of locally powerful groups. DETECTING FAST SOLVABILITY OF EQUATIONS 9 Furthermore, it is possible to deduce that in the case Ḟ /Ḟ p is finite, p-rigidity implies hereditary p-rigidity. Indeed, for a field F such that dimFp (Ḟ /Ḟ p ) < ∞, by [Qu13, Thm. B] one has that either GF (p) is locally powerful, or it contains a closed non-abelian free pro-p group. For a p-rigid field, GF (p) is powerful, and therefore necessarily it is locally powerful, since powerful pro-p groups contain no closed non-abelian free pro-p groups, and thus F is hereditary p-rigid. Remark 3.10. Ware provided the same description for the maximal pro-p Galois group GF (p) of a hereditary p-rigid field F , but with the further assumption that F contains also a primitive p2 th root of unity [Wr92, Thm. 2]. The third author already got rid of such assumption in [Qu13, Cor. 4.9]. Remark 3.11. Observe that one can prove directly for all fields F that if G = GF (p) is poweful then F is p-rigid. Indeed if we assume using a contradiction argument that G is powerful but F is not p-rigid, then by [Wr78, Lemma 4], G will have as a quotient the group Hp3 (the unique non-abelian group of order p3 and exponent p.) But this means that G/Gp is non-abelian and therefore G is not powerful. On the other hand, from the explicit form of GF (p) for each rigid field, we shall see (Corollary 3.17 and Theorem 4.10) that G/Gp is abelian and hence G is powerful. Thus F is p-rigid if and only if G is powerful. 3.3. Rigidity implies hereditary rigidity. As above, let G = GF (p). Let Brp (F ) denote the subgroup of Br(F ) consisting of elements of order p. From Merkuryev and Suslin’s work, an element of Brp (F ) is a product of cyclic algebras, i.e., one has the following commutative diagram: Ḟ /Ḟ p ∧ Ḟ /Ḟ p / / Brp (F ) φ∧φ  H 1 (G, Fp ) ∧ H 1 (G, Fp ) Λ2 (∪)  / / H 2 (G, Fp ) where the vertical arrows are isomorphisms, and φ is the Kummer isomorphism as in (3.1). Therefore Brp (F ) is a quotient of Ḟ /Ḟ p ∧ Ḟ /Ḟ p . (In particular, if F is p-rigid, also the horizontal arrows are isomorphisms.) Hence, the following hold in Brp (F ) : (3.4) (3.5) (3.6) −1 [(b, a)F ] = [(a, b)F ] [(ab, c)F ] = [(a, c)F ] · [(b, c)F ]     k (a , b)F = [(a, b)F ]k = (a, bk )F for every a, b, c ∈ Ḟ and k ∈ Fp . √ Let E/F be a cyclic extension of degree p, namely, E = F ( p a) with a ∈ Ḟ r Ḟ p . Let ǫ : Ḟ /Ḟ p −→ Ė/Ė p be the homomorphism induced by the inclusion F ֒→ E. Lemma 3.12. Let F be p-rigid. For E/F as above, one has   √ Ė/Ė p = [ p a]F ⊕ ǫ Ḟ /Ḟ p as Fp -vector space. 10 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI Proof. By [MS03, Thm. 1], one has that J = X ⊕ Z as G-module, where X is an irreducible G-module, and Z is a trivial G-module. Obviously, one has the following inclusions:   √ (3.7) [ p a]F ⊆ X, ǫ Ḟ /Ḟ p ⊆ J G , Z ⊆ J G . Fix a primitive pth root ζp . If ζp is a norm of E/F , then by [MS03, Cor. 1] one has dim(X) = 1, so that J G = J, and by [MS03, Lemma 2] the claim follows. Otherwise, by [MS03, Cor. 1] one has dim(X) = 2, so that necessarily √ X = [ p a]F , [ζp ]F , √ for [ζp ]F = (σ − 1)[ p a]F , with σ a suitable generator of Gal(E/F ), and by [MS03, Lemma 2] one has J G = ǫ(Ḟ /Ḟ p ), so that by (3.7) the claim follows.  Lemma 3.13. Let E/F be as above, and let Br(E/F ) ≤ Br(F ) be the kernel of the morphism Br(F ) −→ Br(E), [(b, c)F ] 7−→ [(b, c)F ⊗F E] . Then [(b, c)F ] ∈ Br(E/F ) if, and only if, [(b, c)F ] = [(a, d)F ] for some d ∈ Ḟ . Proof. Let Ḡ ∼ = Z/p.Z be the Galois group of E/F , and fix a primitive pth root ζp . It is well known that (3.8) Br(E/F ) ∼ = H 2 (Ḡ, Ė) and H 2 (Ḡ, Ė) ∼ = Ḟ /NE/F (Ė). Namely, by the first isomorphism of (3.8), every element [A] of Br(E/F ) can be represented by a cross-product F -algebra A induced by a cocycle z : Ḡ×Ḡ → Ė, and by the second isomorphism of (3.8), the image of z is {1, d} with d ∈ Ḟ r NE/F (Ė), and A has a presentation such that A = (a, d)F .  √ Theorem 3.14. Let E = F ( p a) with a ∈ Ḟ r Ḟ p . If F is p-rigid, then so is E. Proof. In order to prove that E is p-rigid, we have to show that for α, β ∈ Ė, one has [(α, β)E ] = 1 in Br(E) if, and only if, [α]E , [β]E are Fp -linearly dependent in Ė/Ė p . Thus, suppose for contradiction that [α]E , [β]E are Fp -linearly independent but [(α, β)E ] = 1. By Lemma 3.12, and by (3.4), (3.5) and (3.6), we can reduce without √ loss of generality to the following to cases: either α, β ∈ Ḟ , or α = p a and β ∈ Ḟ . 1st case: Assume α, β ∈ Ḟ . Since [α]E , [β]E are Fp -linearly independent, so are [α]F , [β]F in Ḟ /Ḟ p . Thus, by p-rigidity of F , [(α, β)F ] 6= 1 in Br(F ). Since we are assuming that [(α, β)E ] = [(α, β)F ⊗F E] = 1 in Br(E), it follows that [(α, β)F ] ∈ Br(E/F ). Therefore, by Lemma 3.13, there exists b ∈ Ḟ such that [(α, β)F ] = [(a, b)F ]. Since Brp (F ) ∼ = Ḟ /Ḟ p ∧ Ḟ /Ḟ p , it follows that thus [α]F ∧ [β]F = [a]F ∧ [b]F [α]E ∧ [β]E = [a]F ∧ [b]E in Ḟ /Ḟ p ∧ Ḟ /Ḟ p in Ė/Ė p ∧ Ė/Ė p so that [α]E and [β]E are not linearly independent, as [a]E = 1, a contradiction. DETECTING FAST SOLVABILITY OF EQUATIONS 11 √ 2nd case: Assume α = p a and β ∈ Ḟ . Let C be the maximal pro-p Galois group of E. Then by [GS06, Prop. 7.5.5] one has the following commutative diagrams Ḟ /Ḟ p ǫ / Ė/Ė p res1G/C  / H 1 (C, Fp ) φE φF  H 1 (G, Fp ) Ė/Ė p NE/F / Ḟ /Ḟ p φF φE  H 1 (C, Fp ) cor1G/C  / H 1 (G, Fp ) where the vertical arrows are the Kummer isomorphisms, together with the morphism corE/F : Brp (E) −→ Brp (F ) induced by the corestriction cor2G/C : H 2 (C, Fp ) → H 2 (G, Fp ). Then by the projection formula [GS06, Prop. 3.4.10] one has   √  √ cor2G/C φE ( p a) ∪ res1G/C (φF (b)) = cor1G/C φE ( p a) ∪ φF (b), which implies    √ √ corE/F [( p a, β)E ] = (NE/F ( p a), β)F = [(a, β)F ] . √ Since [( p a, β)E ] = 1 in Br(E), it follows that [(a, β)F ] = 1 in Br(F ). Thus, by p-rigidity of F , [a]F , [β]F are Fp -linearly dependent in Ḟ /Ḟ p , i.e., [β]F = [ak ]F for some k ∈ Fp . Therefore [β]E is trivial in Ė/Ė p , a contradiction.  The following fact is an elementary consequence of the solvability of finite pgroups. Fact 3.15. Let K/F be a finite non-trivial p-extension with K ⊆ F (p). Then there exists a chain of extensions (3.9) F = K0 ⊂ K1 ⊂ . . . ⊂ Kr−1 ⊂ Kr = K for some r ≥ 1, such that |Ki+1 : Ki | = p for every i = 0, . . . , r − 1. This, together with Theorem 3.14, implies the following. Theorem 3.16. Every p-rigid field F is also hereditary p-rigid. As mentioned in the Introduction, the above theorem was proved in a different way by Engler and Koenigsmann in [EK98, Prop. 2.2] 3.4. Galois theoretical and cohomological characterizations for p-rigid fields. In addition to Theorem 3.16, and earlier results in this section, we have the following implications. F is p-rigid =⇒ F is heriditary p-rigid =⇒ G := GF (p) is locally powerful =⇒ G is θ abelian =⇒ G has presentation as in Proposition 3.2. So in other words, we obtain the next Corollary. Corollary 3.17. The field F is rigid if and only if there exists an orientation θ : GF (p) → Z× p such that GF (p) is θ-abelian, so that G has a presentation (3.10) GF (p) = σ, ρi , i ∈ I [σ, ρi ] = ρλi , [ρi , ρj ] = 1 ∀ i, j ∈ I for some set of indices I and λ ∈ p.Zp such that 1 + λ = θ(σ). 12 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI In fact if F is p-rigid, then the suitable orientation for GF (p) is the cyclotomic character of F – as one would expect, and as we shall see this again explicitly in Section 4.2. Also, in Section 4.2, we will obtain together with the results of previous section, self-contained field theoretic proof of this corollary. (Alternatively, one can also deduce this corollary using valuation theory in [EK98] .) Definition. We say that pro-p group G is solvable if it admits a normal series of closed subgroups such that each successive quotient is abelian. That is, we have a sequence of closed subgroups 1 = G0 ≤ G1 ≤ G2 ≤ · · · ≤ Gk−1 ≤ Gk = G such that each Gj is closed and normal in Gj+1 and Gj+1 /Gj is abelian for all j. Corollary 3.18. The field F is p-rigid if and only if the maximal pro-p Galois group GF (p) is solvable. Proof. If F is p-rigid, then by Corollary 3.17 GF (p) has a presentation as in (3.10), so that GF (p) is meta-abelian (i.e., its commutator is abelian), and thus solvable; in fact, the desired normal series is 1 = [[G, G], [G, G]] ≤ [G, G] ≤ G where G = GF (p). Conversely, if GF (p) is solvable, than it contains no closed non-abelian free pro-p subgroups. Hence, by [Qu13, Thm. B], GF (p) is θ-abelian for some orientation θ, and by Corollary 3.17, F is p-rigid.  As mentioned in the Introduction, Corollary 3.17 can be deduced also using valuations techniques, as in [EK98, § 1] and [Ef06, Ex. 22.1.6], whereas Corollary 3.18 is the double implication (ii)⇔(vi) in [EK98, Prop. 2.2]. Corollary 3.19. The field F is p-rigid if and only if d(GF (p)) (3.11) H • (GF (p), Fp ) ∼ = ^ k=1  H 1 (GF (p), Fp ) . Proof. Recall that GF (p) is a Bloch-Kato pro-p group, so that the whole Fp cohomology ring H • (GF (p), Fp ) depends on H 1 (GF (p), Fp ) and H 2 (GF (p), Fp ). That is, H • (GF (p), Fp ) has generators in degree 1 and relations in degree 2. If the isomorphism (3.11) holds then in particular the morphism (3.3) is injective, and F is p-rigid. Conversely, if F is p-rigid then the morphism (3.3) is an isomorphism, and H 1 (GF (p), Fp ) ∧ H 1 (GF (p), Fp ) ∼ / H 2 (GF (p), Fp ). Therefore the whole Fp -cohomology ring is isomorphic to the exterior algebra generated by H 1 (GF (p), Fp ).  Ware proved the same result in the case dim(Ḟ /Ḟ p ) < ∞, but with the further assumptions that F is hereditary p-rigid and that it contains a primitive p2 th root of unity [Wr92, Thm. 4 and Corollary]. Moreover, his proof requires computations involving the Hochschild-Serre spectral sequence. Remark 3.20. Clearly Corollaries 3.17 and 3.19 hold also for every p-extension K/F . DETECTING FAST SOLVABILITY OF EQUATIONS 13 Corollary 3.21. Given a field F , assume that dim(Ḟ /Ḟ p ) = d < ∞. Then F is p-rigid if and only if cd(GF (p)) = d. Proof. If F is p-rigid, then cd(GF (p)) = d(GF (p)) by Corollary 3.19, and d(GF (p)) = d by (2.2). Conversely, if cd(GF (p)) = d(G) = d, then one has the isomorphism (3.11), since a non-trivial relation in H 1 (GF (p), Fp ) ∧ H 1 (GF (p), Fp ) would imply that H d (GF (p), Fp ) = SpanFp {χ1 ∪ · · · ∪ χd } = 0, with {χ1 , . . . , χd } a basis for H 1 (GF (p), Fp ), a contradiction (see [Qu13, Prop. 4.3] for more details).  Corollary 3.22. Given a field F , assume that dim(Ḟ /Ḟ p ) = d < ∞. Then F is p-rigid if, and only if, dim(K̇/K̇ p ) = d for every finite p-extension K/F . Proof. Suppose that dim(K̇/K̇ p ) = d for every finite p-extension K/F . By (2.2) and (3.1), this implies that d(C) = d for every open subgroup C ≤ G. Therefore the rank of G is finite, and G contains no closed non-abelian free pro-p subgroups. Thus, by [Qu13, Thm. B], GF (p) is powerful, and F is p-rigid; also see [EM13]. Conversely, if F is p-rigid, then GF (p) is uniformly powerful (and finitely generated by hypothesis), and by [DdSMS03, Prop. 4.4] one has d(C) = d(GF (p)) for every open subgroup C ≤ GF (p), i.e., dim(K̇/K̇ p ) = d for every finite p-extension K/F .  Remark 3.23. A pro-p group G has constant generating number on open subgroups if (3.12) d(C) = d(G) for all open subgroups C ≤ G. By Corollary 3.22, a maximal pro-p Galois group has property (3.12) if, and only if, F is p-rigid. The problem to classify all profinite groups with property (3.12) was raised by K. Iwasawa (see [KS11, §1]). Thus, Corollary 3.22 classifies all such groups in the category of maximal pro-p Galois groups (and hence also in the category of pro-p absolute Galois group). Actually, [Qu13, Thms. A and B] gives implicitly the same classification for the wider category of Bloch-Kato pro-p groups. A similar classification has been proven in [KS11] for the category of p-adic analytic pro-p groups. It is interesting to remark that the groups listed in [KS11, Thm. 1.1.(1)-(2)] have a presentation as in (3.10), whereas the groups listed in [KS11, Thm. 1.1.(3)] cannot be realized as maximal pro-p Galois groups, for they have non-trivial torsion. 4. New characterization for p-rigid fields 4.1. Proof of Theorem A. Let G be the maximal pro-p Galois group GF (p), and recall from §2.3 the definition of the modules Jn . Moreover, let G{n} and G(n) denote the maximal pro-p Galois group of F {n} , resp. of F (n) . Then it is clear that   G{n} , Gal F {n+1} /F {n} = Φ G{n} i p h    G{n} , G{n} , and G{n+1} = Φ G{n} = G{n} 14 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI whereas by (2.2) and (3.1) one has Jn ∼ = H 1 (G(n) , Fp ) = (G(n) )∨ , so that G  G(n) ∨  , = (Jn )G ∼ = H 1 G(n) , Fp [G, G(n) ] i.e., the G-invariant elements of Jn are dual to the G-coinvariant elements of G(n) , which implies that   G(n) p  , Gal F (n+1) /F {n} = G(n) G, G(n) i p h i  h  G, G(n) = λn+1 (G). and G(n+1) = Φ G(n) G, G(n) = G(n) Remark 4.1. i. The G-module J can be defined in a purely cohomological manner without involving the field F , since by Kummer theory one has the isomorphism J∼ = H 1 (Φ(G), Fp ) as G-modules. ii. Theorem A can be stated in the following way: F is rigid if, and only if, G{n} = G(n) for all n ≥ 2 or, equivalently, if, and only if, J2G = J2 . Proposition 4.2. If F is a p-rigid field then F {n} = F (n) for all n ≥ 2. Proof. By Corollary 3.17, the maximal pro-p Galois group G is a locally powerful group, with a presentation as in (3.10). Direct computations imply that λn (G) = n−1 Gp for all n ≥ 2. In particular, 2 G{3} = Φ(G)p [Φ(G), Φ(G)] = Gp = G(3) . Moreover, if we assume that G{n} = G(n) = λn (G), then λn+1 (G) ≤ G{n+1} = λn (G)p [λn (G), λn (G)] ≤ λn+1 (G), so that G{n+1} = λn+1 (G). Therefore, G(n) = G{n} = λn (G) and, by Remark 4.1, F {n} = F (n) for all n ≥ 2.  On the other hand, if F is not p-rigid, we have the opposite. Theorem 4.3. If F is not p-rigid, then F {3} ) F (3) . In order to prove the above theorem, we need two further lemmas. Lemma 4.4. Let E/F be a bicyclic extension of degree p2 , and let L = F (2) , i.e., √ √ p p E = F ( a, b) with a, b ∈ Ḟ r Ḟ p such that [a]F , [b]F are Fp -linearly independent in Ḟ /Ḟ p . Assume γ ∈ Ė. Then γ ∈ L̇p if, and only if, γ ∈ Ḟ · Ė p . Proof. Let γ = xδ p , with x ∈ Ḟ and δ ∈ Ė. Then it is clear that γ ∈ L̇p , for √ p L = F ( F ). On the other hand, assume that γ ∈ L̇p . Then, either γ is a p-power in E, or it √ becomes a p-power via the extension L/E, i.e., p γ ∈ LrE. Therefore, by Kummer theory, γ is equivalent to an element x ∈ Ḟ modulo Ḟ p , namely, γ ∈ xḞ p . This proves the lemma.  √ p Lemma 4.5. Let E/F be a cyclic extension of degree p, i.e., E = F ( a) with a ∈ Ḟ r Ḟ p . Then √ p a∈ / Ḟ · Ė p DETECTING FAST SOLVABILITY OF EQUATIONS 15 Proof. Let α ∈ Ḟ Ė p . Then there exist x ∈ Ḟ , γ ∈ Ė such that α = xγ p . Thus NE/F (α) = NE/F (xγ p ) = xp NE/F (γ)p ∈ Ḟ p , √ √ / Ḟ p , it follows that p a ∈ / with NE/F the norm of E/F . Since NE/F ( p a) = a ∈ Ḟ Ė p .  Proof of Theorem 4.3. Since F is not p-rigid, there exist two elements a,√b ∈ Ḟ such that [a]F and [b]F are Fp -linearly independent, and a is a√norm of F ( p b)/F . √ Recall that the linear independence implies that F (√p a) 6= F ( p b), so that E/F is √ p a bicyclic extension of degree p2 , where E = F ( p a, b). Let Gal(E/F ) ∼ = Cp × Cp √ √ p hτ i p and F ( b) = E hσi . Then the lattice of be generated by σ, τ , with F ( a) = E the fields L ⊇ E ⊇ F is the following: L ②② ②② ② ②② ②② √ F ( p a) ❊❊ ❊❊ ❊ σ ❊❊❊ ❊ τ E❊ ❊❊ ❊❊σ ❊❊ ❊ F √ F ( p b) ② ②② ②②τ ② ② ②② √ √ p p a. Then Let δ ∈ F ( p b) such that NF ( √ b)/F (δ) = a, and let c = p−1 p p a) (δ) = δ · (τ.δ) · · · (τ NE/F ( √ .δ) = NF ( √ b)/F (δ) = a p−1 p a) (c) = c · (τ.c) · · · (τ and NE/F ( √ .c) = c · ζc · · · ζ p−1 c = cp , with ζ a primitive pth root of unity, so that   p a) (δ) NE/F ( √ δ a √ = p = 1. = NE/F ( p a) p a) (c) c NE/F ( √ c Therefore, by Hilbert’s Satz 90 there exists γ ∈ Ė such that (4.1) (τ − 1).γ = δ τ.γ = . γ c Suppose that δ/c ∈ L̇p . Then by Lemma 4.4 one has that δ/c ∈ Ḟ ·Ė p . In particular, √ √ p this implies that c = p a ∈ F ( b)× · Ė p , which is impossible by Lemma 4.5. Hence √ δ/c ∈ / L̇p . Thus, by (4.1) and by Lemma 2.2 the extension L( p γ)/F is not Galois and γ 1/p is not in F (3) .  Now Proposition 4.2 and Theorem 4.3 imply Theorem A, Remark 4.6. By the proof of Proposition 4.2 it follows that F is p-rigid then G(n) = n−1 λn (G) = Gp for all n > 1. 16 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI 4.2. Recovering GF (p) and F (p) from small Galois groups. As in Section 4.1, let G be the maximal pro-p Galois group GF (p) of the field F . For h > 0, let µph ⊆ F (p) be the group of ph roots of unity. We also set µp∞ to be the group of all roots of unity of order pm for some m ≥ 0. Finally we set k ∈ N ∪ {∞} to be the maximum of all h ∈ N ∪ {∞} such that µph ⊆ F . For a field F which is p-rigid, let E/F be a Galois extension of degree p. Therefore E = F (b1/p ) for some b ∈ Ḟ \Ḟ p . Then by Kummer theory, we may choose a set of representatives {bi : i ∈ J } ⊆ Ḟ of Ḟ \Ḟ p with b = bj for some j ∈ J . Thus Lemma 3.12 implies that Dp E (4.2) Ė/Ė p = [ p bj ]E , [bi ]E . i6=j Assume now that k < ∞. Then we may pick a set of representatives A = {ζpk , ai , i ∈ I} ⊆ Ḟ , where ζpk is a fixed primitive pk th root of unity, so that Ā = {[ζpk ]F , [ai ]F , i ∈ I} is a Fp -basis for Ḟ /Ḟ p . If k = ∞, then we still consider a basis Ā for Ḟ /Ḟ p , where the symbol [ζpk ]F in this case is meant as an empty symbol to be ignored. Also in this case [ζpk+n ]E , with n ∈ N and E/F a p-extension, is also an empty symbol. We assume that our system of roots of unity ζpl for l ≥ 1 in F (p) is chosen such that (ζpl+1 )p = ζpl for all l ≥ 1. Let J be a finite subset of I. Set J = {1, · · · , t} and let 1/p 1/p K = F (a1 , · · · at , ζpk+1 ). Then we have a series of Galois extensions F ⊂ K1 ⊂ K2 · · · Kt ⊂ Kt+1 = K ⊆ F (2) , 1/p where K1 = F (ζpk+1 ), and Ki+1 = Ki (ai ) for 1 ≤ i ≤ t. Then by the above arugument and induction one has (4.3) 1/p K̇/K̇ p = h[ζpk+1 , [aj ]K , j = 1, 2, · · · t, [f ]K , f ∈ Ḟ i Assuming this observation we shall prove the following theorem. Theorem 4.7. If F is a p-rigid field, then i E D h Ḟ (n) 1/pn−1 p = [ζpk+n−1 ]F (n) , ai  ,i ∈ I F (n) Ḟ (n) for every n ≥ 1. Proof. Let Ā = {[ζpk ]F , [ai ]F , i ∈ I} be an Fp basis for Ḟ /(Ḟ )p as above. We observe that for n = 1 our statement is clear because F (1) = F . In order to ˙ /(F (2) ˙ )p see that our statement is also true for n = 2 consider any [α]F (2) ∈ F (2) ˙ . Then there exists a finite subset J ⊂ I such that α ∈ K = with α in F (2) 1/p F (ζpk+1 , aj , j ∈ J ). (Again, we ignore ζpk+1 if k = ∞.) Now we see that [α]K 1/p can be expressed as a product of powers of [ζpk+1 ]K , [aj ]K and a finite number of elements [fl ]K , l = 1, · · · n, fl ∈ Ḟ . Passing to F (2) , all elements [fj ][F (2) ] become [1]F (2) . Therefore ˙ /(F (2) ˙ )p = [ζ k+1 ] (2) , [ √ p ai ]F (2) , i ∈ I (4.4) F (2) p F DETECTING FAST SOLVABILITY OF EQUATIONS 17 This proves over statement for n = 2. Now going from n to n + 1 is just like going from n = 1 to n = 2 done above taking into account that 1/pn F (n+1) = F (n) (ζpk+n , ai , i ∈ I). The last equality follows by induction hypothesis on n and by observing that 1/pn F (n) (ai , i ∈ I) is Galois over F for each i ∈ I as ζpk+n−1 , and hence also ζpn belong to F (n) . Hence we proved our statement for all n.  Remark 4.8. In fact taking into account our convention about the symbol [ζpk+n−1 ]F (n) when k is ∞, one can show in a similar but slightly more complicated way as in the proof above that n−1 {[ζpk+n−1 ]F (n) , [ai 1/p ]F (n) , i ∈ I} ˙ /(F (n) ˙ )p over F for all n ∈ N . is a basis of F (n) p Corollary 4.9. Assume that F is a p-rigid field. Then we have the following. (a) For all n ≥ 1, 1/pn−1 F (n) = F (ζpk+n−1 , ai (b) F (p) = [ 1/pn F (ζpk+n , ai n≥1 , i ∈ I) , i ∈ I). Proof. (a) We use Theorem 4.7, its proof and induction on n. The statement is true for n = 1 because ζpk , ai , i ∈ I all belong to F . Now assume that our statement is 1/pn true for n. Using Theorem 4.7 and the fact that F (n) (ai )/F is Galois for each i ∈ I, we conclude that 1/pn F (n+1) = F (ζpk+n , ai , i ∈ I). This completes the induction step and we are done. (b) This follows from the fact that [ F (p) = F (n) . n≥1 (see Proposition 2.1.)  [n] Now we shall determine all Galois groups G := Gal(F (n) /F ), for all n ≥ 1. Theorem 4.10. Suppose F is a p-rigid field. Then we have the following. (a) ( Q  n−1 Z ⋊ Z/pn−1 Z if k < ∞ [n] I Z/p G = Q n−1 Z if k = ∞ I Z/p (b) (Q Zp ) ⋊ Zp ( G = Gal(F (p)/F ) = Q I Z I p if k < ∞ if k = ∞ Moreover when k < ∞ there exists a generator σ of the outer factor Z/pn−1 Z in of the outer factor Zp in (b) such that for Q each τ from the inner factor Q (a) and n−1 Z/p Z in (a) and each τ from the inner factor I Zp in (b) we have I k στ σ −1 = τ p +1 . 18 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI Proof. If k < ∞, consider F (n) as the 2nd step extension of F : F ⊂ F (ζpk+n−1 ) ⊂ F (n) . Then there exists σ ∈ G[n] such that k +1 σ(ζpk+n−1 ) = ζppk+n−1 and σ restricts to identity in Gal(F (n) /F (ζpk+n−1 ). By standard Kummer theory (see Chapter 6, sections 8 and 9 in [Lan02], [AT09] Chapter 6, Section 2, and also for relevant similar calculations in [Wr92], proof of Theorem 2.), we can deduce that such σ exists and that G[n] = Gal(F (n) /F (ζpk+n−1 )) ⋊ hσi Y ∼ Z/pn−1 Z ⋊ Z/pn−1 Z if k < ∞. = I pk +1 −1 with the action στ σ = τ for all τ ∈ Gal(F (n) /F (ζpk+n−1 )). If k = ∞ then direct application of Kummer theory shows that Y G[n] = Z/pn−1 Z. I This proves (a), and (b) follows from that fact that F (p) = ∪n≥1 F (n) . Indeed, then G = lim G[n] , which has precisely the description in (b). ←−  If k < ∞, then it is well known that the Galois group of the extension F (µp∞ )/F is pro-p-cyclic, i.e., Gal(F (µp∞ )/F ) ∼ = Zp [Wr92, Lemma 1].QAs we see from our proof of the above theorem (part b), the outer factor Qof G = I Zp ⋊ Zp is isomorGal(F (p)/F (µp∞ )) ∼ phic with Gal(F (µp∞ )), andQ = I Zp . We can pick generators ρi , i ∈ I of the pro p-group I Zp as elements of Gal(F (p)/F (µp∞ )) such that 1/pn ρi (ai and 1/pn 1/pn ) = ζpn ai for all i ∈ I, and n ≥ 1, 1/pn ) = aj for all j ∈ I, j 6= iand n ≥ 1 This isomorphism Gal(F (µp∞ )) ∼ = Zp is induced by the cyclotomic character ρi (aj (4.5) θF : G −→ AutF (µp∞ ), ∼ Z× . where AutF (µp∞ ) is the image of θF in Aut(µp∞ ) = p From the above theorem we further see that we have a presentation of G by generators and relations as follows: D E k (4.6) G = σ, ρi , i ∈ I [σ, ρi ] = ρpi , [ρi , ρj ] = 1 ∀ i, j ∈ I , Q Q If k = ∞ then we can omit σ and G = I Zp = I hρi i. Thus we recover Corollary 3.17 and our orientation in θ in Corollary 3.17 can be chosen as the cyclotomic character θ : G → Z× p. In the above theorem, we determined G[n] quotients of GF (p) if F is p-rigid. If k < ∞ the described action is trivial iff n ≤ pk + 1. Thus we obtain the following interesting corollary. DETECTING FAST SOLVABILITY OF EQUATIONS 19 Corollary 4.11. Suppose that F is p-rigid field and k < ∞. Then G[n] is abelian iff n ≤ pk + 1. In Corollary 4.9 we determined the structure of F (p) for F a p-rigid field. It is the simplest possible structure F (p) can have. Using this structure, we determine in Theorem 4.10, and the discussion after it, that if d(G) ≥ 1, then GF (p) fits in the exact sequence 1 → A → GF (p) → Zp → 1 where A is a topological product of copies of Zp . Therefore, if we assume that [ 1/pn F (p) = F (ζpk+n , ai , i ∈ I) n≥1 for some I using [Wr92] Theorem 1(b), we obtain the following refinement of Corollary 4.9. Corollary 4.12. Let F be a field. Then F is p-rigid if and only if [ 1/pn F (p) = F (ζpk+n , ai , i ∈ I). n≥1 Remark 4.13. Note that our proofs were done using purely Galois field theoretic methods. However, some of these arguments can be obtained by using the theory of uniform pro-p groups. (See beginning of Section 3.1 for the definition of uniform pro-p groups and recall from Section 4.1 that λn (G) = G(n) .) Although this theory is worked out in [DdSMS03] only for finitely generated pro-p groups, the techniques and methods and can also be extended to our groups, i.e., groups of the form G = GF (p). In fact, because the structure of G as described in Theorem 4.10 is very simple, these results can be proved in a straightforward manner. Here we will reformulate some of these results which are inspired by the theory of uniform pro-p groups. First of all, from Theorem 4.7 and Theorem 4.10 we see that if G is finitely generated then G is a uniform pro-p group. Observe that G(2) = λ2 (G) = Gp . This follows from the fact that the commutators in G are pth powers. In fact, by n−1 induction on n, we see that G(n) = Gp for all n ≥ 2. Thus we see again slightly differently the validity of Remark 4.6. The following fact is a consequence of the group structure of G, and in fact in the case of finitely generated pro-p groups, it holds for every uniform pro-p group. We omit a straightforward direct proof. n Fact 4.14. The pn th power map G → Gp induces an isomorphism of (finite) pgroups pn G/Gp = G/G(2) / Gpn /Gpn+1 = G(n+1) /G(n+2) . for every n > 1. By duality the above map induces the following commutative diagram H 1 G(n) , Fp ≀  Ḟ (n) /(Ḟ (n) )p o (pn−1 )∨ / H 1 (G, Fp ) ≀ ψn Ḟ /Ḟ p 20 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI where the upper arrow is the dual of the pn th power map – and therefore (pn−1 )∨ is an isomorphism – and the vertical arrows are the Kummer isomorphisms. Consequently also Ḟ /Ḟ p and Ḟ (n) /(Ḟ (n) )p are isomorphic as Fp -vector spaces. In particular, i h    1/pn−1 ψn [ζpk ]F = ζpk+n−1 F (n) and ψn ([ai ]F ) = ai F (n) for every n > 1 and i ∈ I. This last conclusion is consistent with Theorem 4.7 and Remark 4.8. From Theorem A is possible now to sort out the following new characterization of p-rigidity which restricts to Galois groups of finite exponent. Corollary 4.15. The field F is p-rigid if and only if one has      . Gal F (2) /F {3} ⊆ Z Gal F {3} /F Proof. Recall first that   (4.7) Gal F {3} /F = G G{3} and   G(2) Gal F (2) /F {3} = {3} . G Assume that F is p-rigid. Then by Theorem A one has F {3} = F (3) . By the construction of F (3) , we see that Gal(F (2) /F (3) ) = Gal(F (2) /F {3} ) is the central subgroup of Gal(F {3} /F ). Conversely, assume that Gal(F {3} /F (2) ) is central in Gal(F {3} /F ). By (4.7), this implies that the commutator subgroup [G, G(2) ] is contained in G{3} . Since i p p h     G, G(2) , and G(3) = G(2) G{3} = Φ G(2) ≥ G(2) it follows that G{3} contains G(3) , and thus G{3} = G(3) . Therefore F is p-rigid by Theorem A.  We proved the each p-rigid field is hereditary p-rigid. In particular, if F is prigid, then for each finite extension K/F , K ⊂ F (p) is again p-rigid. Then there is a natural question of whether F is p-rigid in the above situation when we assume that K is p-rigid. If Ḟ /Ḟ p is finite, the answer is yes as we will show below, and the proof is a quite remarkable use of Serre’s theorem ([Se65]) on cohomological dimension of open subgroups of pro-p groups, a consequence of Bloch-Kato conjecture on cohomological dimensions, and an elementary observation on the growth of p-power classes. Theorem 4.16. Suppose that F is any field such that G = GF (p) is finitely generated pro-p group. If there exists a finite extension K/F , K ⊆ F (p), such that K is p-rigid, then so is F . Proof. Because G is finitely generated, we see that the minimal number of generators of G is equal to d := d(G) = dimFp H 1 (G, Fp ) = dimFp Ḟ /Ḟ p < ∞. In particular, Ḟ /(Ḟ )p is a finite group. Since K/F is a finite extension in F (p), from basic Galois theory and theory of p-groups we see that there is chain of extensions F = K0 ⊂ K1 ⊂ · · · ⊂ Ks = K DETECTING FAST SOLVABILITY OF EQUATIONS 21 such that [Ki+1 : Ki ] = p for each i = 0, 1, · · · , s − 1. Thus by Kummer theory each 1/p Ki+1 is of the form Ki+1 = Ki (ci ) for some ci ∈ K̇. Now observe by induction on i that p dimFp Ḟ /Ḟ p ≤ dimFp K̇i /K̇i ≤ dimFp K̇/K̇ p . Indeed, by Kummer theory we have a natural embedding p ˙ /Ki+1 ˙ p ψi : (K̇i /K̇i )/h[ci ]Ki i → Ki+1 p where [ci ]Ki is the element of K̇i /K̇i corresponding to ci and h[ci ]Ki i is the subp group of K̇i /K̇i generated by [ci ]Ki . Hence p ˙ /Ki+1 ˙ p ). dimFp K̇i /K̇i ≤ 1 + dimFp (Ki+1 1/p However, the “lost of [ci ]Ki ” is compensated by [ci ]Ki . Indeed in the group ˙ /Ki+1 ˙ p , the element [c1/p ]Ki is independent from the Bi := image ofψi . This Ki+1 i means that 1/p [ci ]Ki ∩ Bi = {[1]Ki+1 }. 1/p p / K̇i , but the set of all norms NKi+1/Ki of elements in Indeed NKi+1/Ki (ci ) = ci ∈ Bi , NKi+1/Ki (Bi ) = {[1]Ki+1 }. Because we assume that K is p-rigid we see that e := dimFp K̇/K̇ p = cd GK (p). But since by [Be74], Satz 3 we know that GF (p) is torsion free we can conclude from [Se65] théorème that cd GK (p) = cd GF (p). Hence we conclude that d ≤ e = cd GF (p). On the other hand, from the Bloch-Kato conjecture (now Rost-Voevodsky theorem) one can conclude that (see [CEM12]) e := cd GF (p) ≤ d. Hence e = d and from Corollary 3.21 we conclude that F is p-rigid.  4.3. Fast solvability of algebraic equations: Recall from the Introduction that √ a non-nested root over a field F is an element α ∈ F̄ s such that α = n a for a ∈ F . For example, given elements ai , bi ∈ Ḟ , the expression q p p n a0 + a1 n 1 b 1 + . . . + ar n r b r , is a nested root, if n and some ni are both larger than 1. Definition. A polynomial f ∈ F [X] is said to be fast-solvable if it is solvable by radicals (in the sense of Galois) and its splitting field over F is contained in a field L generated by non-nested roots, i.e., √ √ L = F ( n1 a1 , . . . , nr ar ) , ai ∈ Ḟ , ni > 1. Therefore, by Corollary 4.12 every irreducible polynomial in F [X] with splitting field of p-power degree is fast-solvable for F a p-rigid field. On the other hand, observe that Ferrari’s formula for a solution of a quartic equation makes use of nested roots. This suggests that a general quartic polynomial is not fast-solvable in spite of the name of the author of the formula. Following the suggestion of 22 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI the referee we leave the reader a non-trivial problem of showing that there is no “Porsche formula” which provides a fast solution for a general quartic equation. 4.4. Analytic pro-p group and dimension subgroups. A p-adic analytic prop group is a p-adic analytic manifold which is also a group such that the group operations are given by analytic functions (see [DdSMS03, Ch. 8]). Analytic pro-p groups were first introduced and studied in depth by M. Lazard [La65], and are now an object of research, both in group theory and number theory (see [dSMS00]). Lazard found a beautiful group theoretic characterization of p-adic analytic prop group. This is the main result of the book [DdSMS03]. One variant of it is the following theorem. Theorem 4.17. [DdSMS03, Chapter 8] The following statements are equivalent for a topological group G. (1) G is a compact p-adic analytic group. (2) G contains an open normal uniform pro-p group of finite index (3) G is a profinite group containing an open subgroup which is a pro-p group of finite rank. Using this result and Theorem 4.16 we obtain the next theorem. Theorem 4.18. Assume that dimFp Ḟ /(Ḟ )p < ∞. Then F is p-rigid if and only if GF (p) is a p-adic analytic pro-p group. Proof. Assume first that dimFp Ḟ /(Ḟ )p < ∞ and F is p-rigid. Then as we pointed out in Remark 4.13, G itself is uniform and hence by previous result G is p-adic analytic. Assume now that dimFp Ḟ /(Ḟ )p < ∞ and GF (p) is p-adic analytic. Then there exists an open normal uniform subgroup H of GF (p). Let K be the fixed field of H. Then H = GK (p). Because H is uniform, it is in particular powerful and by Proposition 3.8 we see that K is p-rigid. Now by Theorem 4.16 we see that F is p-rigid as well.  For a (not necessarily pro-p) group G, its dimension subgroups Dn = Dn (G) are defined as follows: D1 = G, and for n > 1 Y p [Di , Dj ], Dn = D⌈n/p⌉ i+j=n where ⌈n/p⌉ is the least integer k such that pk ≥ n. Dimension subgroups define the fastest descending series of G such that [Di , Dj ] ≤ Di+j and Dip ≤ Dpi , for any i, j ∈ N∗ . Moreover, Dn is the kernel of all the natural homomorphisms of G into the unit group of κ[G]/I n , i.e., Dn ∼ = 1 + I n , where κ is any field of characteristic p, and I is the augmentation ideal of κ[G] [DdSMS03, §11.1]. The following formula, due to Lazard, provides an explicit description for Dn (see [DdSMS03, Theorem 11.2]): Y h (4.8) Dn (G) = γi (G)p . iph ≥n It is worth questioning how the dimension subgroups look when G is the maximal pro-p Galois group GF (p) of a p-rigid field F . This can be addressed using the following theorem. DETECTING FAST SOLVABILITY OF EQUATIONS 23 Theorem 4.19 ([DdSMS03], Thm. 11.4). Let G be a finitely generated pro-p group. Then G has finite rank if and only if Dn (G) = Dn+1 (G) for some n. Thus, by Corollary 3.22, the above theorem also holds for finitely generated GF (p) with F a p-rigid field. However, in our calculation below we can assume that GF (p) is any Galois group of the maximal p-extension of a p-rigid field which is not necessarily finitely generated. Let G = GF (p) for such a field and k ∈ N∪{∞} and θF be as above, and set N = ker(θF ). Thus N ∼ = ZIp as pro-p subgroups – in particular, if k = ∞ then N = G. Then by (4.6) one has k k(i−1) [G, G] = N p and γi (G) = N p , ∞ for i > 1. (We implicitly set p = 0. Thus in the case k = ∞, all commutators are trivial and the calculation below became very simple but still giving us the same result formally as below independent of whether k is finite or infinite.) Assume pℓ−1 < n ≤ pℓ , with ℓ ≥ 1, so that ℓ = ⌈logp (n)⌉, i.e., ℓ is the least integer such that ℓ ≥ logp (n). Hence, by Lazard’s formula (4.8), one has Y Y ℓ h ℓ k(i−1)+h (4.9) Dn (G) = γ1 (G)p γi (G)p = Gp Np , iph ≥n iph ≥n where i ≥ 2. We shall show that for every i, h such that i ≥ 2 and iph ≥ n, one has the inequality (4.10) k(i−1)+h ℓ k(i − 1) + h ≥ ℓ, ℓ so that N p ≤ Gp and Dn (G) = Gp . If h ≥ ℓ, then (4.10) follows immediately. Otherwise, notice that i > pℓ−h−1 ≥ 1, as iph ≥ n > pℓ−1 , which implies   (4.11) k(i − 1) > k p(ℓ−h)−1 − 1 . Therefore, for ℓ − h ≥ 2, the inequality (4.11) implies k(i − 1) ≥ ℓ − h, and thus (4.10), whereas for ℓ − h = 1 (4.10) follows from the fact that i ≥ 2. Altogether, this shows that ℓ Dn (G) = Gp , with pℓ−1 < n ≤ pℓ ,  Dn (G) ∼ (Z/pZ)I for n a p-power and = 1 otherwise. Dn+1 (G) Acknowledgements We thank A. Adem, D. Karagueuzian, and I. Efrat for working with the second author over the years on related topics which strongly influenced the way we think about rigidity and its unique place in Galois theory. Moreover, we thank E. Aljadeff, D. Neftin, J. Sonn and N.D. Tan for their interest and helpful suggestions on this paper. Also the second author is grateful to J. Koenigsmann for calling his attention to Koenigsmann’s paper with A. Engler quoted and used in our paper. We are grateful to Leslie Hallock for her passion for a proper and elegant use of English language and for her kind but forceful advice related to its use in our paper. We are also grateful to the referee for his/her encouragement and for providing us a number of valuable suggestions to improve the exposition. Last but not least, the 24 S. K. CHEBOLU, J. MINÁČ, AND C. QUADRELLI second and third authors are very grateful to Th.S. Weigel who introduced them to each other. References [AGKM01] A. Adem, W. Gao, D. Karaguezian, J. Mináč, Field theory and the cohomology of some Galois groups. J. Algebra, 235 (2001), 608-635. [AEJ87] Arason, R. Elman, B. Jacob. Rigid elements, valuations, and realizations of Witt rings. J. Algebra 110 (1987), no. 2, 449-467. [AT09] E. Artin and J. Tate. Class field theory, AMS Chelsea Publication, 2009. [Be74] E. Becker. Euklidische Körper und euklidische Hüllen von Körpern. Collection of articles dedicated to Helmut Hasse on his seventy-fifth birthday, II. J. Reine Angew. Math. 268/269 (1974), 41-52. [Ca1545] G. Cardano. Artis magnae, sive de regulis algebraicis liber unus. Ticinum Pavia, MI, 1545. [CEM12] S.K. Chebolu, I. Efrat, J. Mináč. Quotients of absolute Galois groups which determine the entire Galois cohomology. Math. Ann. 352 (2012), no. 1, 205-221. [dSMS00] M.P.F. du Sautoy, A. Mann, A. Shalev (eds.). New horizons in pro-p groups. Progr. Math., 184, Birkhäuser Boston, Boston, MA, 2000. [DdSMS03] J.D. Dixon, M.P.F. du Sautoy, A. Mann, D. Segal. Analytic Pro-p Groups, 2nd edition. Cambridge studies in advanced mathematics 61, Cambridge University Press, Cambridge, second edition, First paperback edition 2003. [Ef95] I. Efrat. Abelian subgroups of pro-2 Galois groups. Proc. Amer. Math. Soc. 123 (1995), no. 4, 1031-1035. [Ef98] I. Efrat. Small maximal pro-p Galois groups. Manuscripta Math. 95 (1998), 237-249. [Ef99] I. Efrat. Construction of valuations from K-theory. Math. Res. Lett. 6 (1999), no. 3-4, 335-343. [Ef06] I. Efrat. Valuations, orderings, and Milnor K-theory. Mathematical surveys and monographs 124, American Mathematical Society, Providence, RI, 2006. [EM11] I. Efrat, J. Mináč. On the descending central sequence of absolute Galois groups. Amer. J. Math., 133 (2011), n. 6: 1503-1532. [EM12] I. Efrat, J. Mináč. Small Galois groups that encode valuations. Acta Arith. 156 (2012), no. 1, 7-17. [EM13] I. Efrat, J. Mináč. Galois groups and cohomological functors. Preprint, available at arXiv:1103.1508. [EL72] R. Elman, T.Y. Lam. Quadratic forms over formally real fields and pythagorean fields. Amer. J. Math. 94 (1972), 1155-1194. [EK98] A.J. Engler, J. Koenigsmann, Abelian subgroups of pro-p Galois groups. Trans. Amer. Math. Soc. 350 (1998), n. 6, 2473-2485. [GLMS03] W. Gao, D.B. Leep, J. Mináč, T.L. Smith, Galois groups over nonrigid fields. Valuation theory and its applications, Vol. II (Saskatoon, SK, 1999), 61-77, Fields Inst. Commun., 33, Amer. Math. Soc., Providence, RI, 2003. [GS06] P. Gille, T. Szamuely. Central simple algebras and Galois cohomology. Cambridge Studies in Advanced Mathematics, 101. Cambridge University Press, Cambridge, 2006. [HJ95] Y.S. Hwang, B. Jacob. Brauer group analogues of results relating the Witt ring to valuations and Galois theory. Can. J. Math. 43 (1995), no. 3, 527-543. [Ja81] B. Jacob, On the structure of Pythagorean fields. J. Algebra 68 (1981), no. 2, 247-267. [JW89] B. Jacob, R. Ware. A recursive description of the maximal pro-2 Galois group via Witt rings. Math. Z. 200 (1989), no. 3, 379-396. [KS11] B. Klopsch, I. Snopce. Pro-p groups with constant generating number of open subgroups. J. Algebra 331 (2011), 263-270. [Ko95] J. Koenigsmann. From p-rigid elements to valuations (with a Galois-characterization of p-adic fields). J. Reine Angew. Math. 465 (1995), 165-182. [Ko01] J. Koenigsmann. Solvable absolute Galois groups are metabelian. Invent. Math. 144 (2001), no. 1, 1-22. DETECTING FAST SOLVABILITY OF EQUATIONS [Ko03] [Lan02] [La65] [LS02] [MSp96] [MS03] [MST] [NSW] [Qu13] [Se65] [Se79] [SW00] [Sz77] [Vo11] [Wr78] [Wr81] [Wr92] [We08] [We09] 25 J. Koenigsmann. Encoding valuations in absolute Galois groups. Valuation theory and its applications, Vol. II (Saskatoon, SK, 1999), 107-132, Fields Inst. Commun., 33, Amer. Math. Soc., Providence, RI, 2003. S. Lang, Algebra, Springer, Revised 3rd edition, 2002. M. Lazard. Groupes analytiques p-adiques. Publ. Math. Inst. Hautes Études Sci. 26 (1965), 389-603. D.B. Leep, T.L. Smith, Multiquadratic extensions, rigid fields and pythagorean fields. Bull. London Math. Soc. 34 (2002), 140-148. J. Mináč, M. Spira. Witt rings and Galois groups. Ann. of Math. (2) 144 (1996), no. 1, 35-60. J. Mináč, J. Swallow. Galois module structure of pth power classes of extensions of degree p. Israel J. Math. 138 (2003), 29-42. J. Mináč, J. Swallow, A. Topaz. Galois module structure of (ℓn )th classes of fields. Preprint, available at arXiv:1204.6611, to appear in Bull. London Math. Soc. J. Neukirch, A. Schmidt, K. Wingberg. Cohomology of Number Fields. Grundlehren der mathematischen Wissenschaften 323, Springer, Berlin Heidelberg, 2000. C. Quadrelli, Bloch-Kato pro-p groups and locally powerful groups. Forum Math., to appear. J. P. Serre Sur la dimension cohomologique des groupes profinis. (French) Topology 3, 1965 413-420. J.P. Serre. Local Fields, Graduate Texts in Mathematics, 67. Springer-Verlag, New York-Berlin, 1979. P. Symonds, Th. Weigel. Cohomology of p-adic analytic groups. in New horizons in pro-p groups, Progr. Math., 184, Birkhäuser Boston, Boston, MA, (2000), 349-410. K. Szymiczek. Quadratic forms over fields. Dissertationes Math. (Rozprawy Mat.) 152 (1977).  V. Voevodsky. On motivic cohomology with Z/l-coefficients. Ann. of Math. (2) 174 (2011), no. 1, 401-438. R. Ware, When Witt rings are group rings? II. Pacific J. Math. 76 (1978), no. 2, 541-564. R. Ware, Valuation rings and rigid elements in fields. Canad. J. Math. 33 (1981), no. 6, 1338-1355. R. Ware, Galois groups of maximal p-extensions. Trans. Amer. Math. Soc. 33 (1992), no. 2, 721-728. C. Weibel. The proof of the Bloch-Kato Conjecture. ICTP Lecture Notes Series 23 (2008), 1-28. C. Weibel. The norm residue isomorphism theorem. J. Topol. 2 (2009), no. 2, 346-372. Department of Mathematics, Illinois State University, Campus box 4520, 61790 Normal IL, USA E-mail address: [email protected] Department of Mathematics, University of Western Ontario, Middlesex College, N6A5B7 London ON, Canada E-mail address: [email protected] Dipartimento di Matematica, Università di Milano-Bicocca, Ed. U5, Via R.Cozzi 53, 20125 Milano, Italy E-mail address: [email protected]
0math.AC
MANUSCRIPT Regression estimator for the tail index László Németha and András Zemplénib arXiv:1708.04815v2 [stat.ME] 7 Dec 2017 a,b Eötvös Loránd University, Institute of Mathematics, Department of Probability and Statistics, Budapest, Hungary. ARTICLE HISTORY Compiled December 8, 2017 ABSTRACT Estimating the tail index parameter is one of the primal objectives in extreme value theory. For heavy-tailed distributions the Hill estimator is the most popular way to estimate the tail index parameter. Improving the Hill estimator was aimed by recent works with different methods, for example by using bootstrap, or KolmogorovSmirnov metric. These methods are asymptotically consistent, but for tail index ξ > 1 and smaller sample sizes the estimation fails to approach the theoretical value for realistic sample sizes. In this paper, we introduce a new empirical method, which can estimate high tail index parameters well and might also be useful for relatively small sample sizes. MSC code: 62G32, 62F40, 60G70. KEYWORDS Tail index; bootstrap; Hill estimation 1. Introduction In probability theory and statistics there are many applications, where it is essential to know the high quantiles of a distribution, for example solvency margin calculations for insurances or estimating the highest possible loss caused by a natural disaster within a given time period. Extreme value theory provides tools to solve these types of problems. In the 1920’s Fisher and Tippet (1928) described the limit behaviour of the maximum of i.i.d. samples. Their theorem is the basis of every research in extreme value theory. Later another approach emerged, where the extremal model is based on the values over a high threshold. Its theoretical background was developed by Balkema and de Haan (1974) and Pickands (1975), the statistical applications by Davison and Smith (1990), among others – summarized by Leadbetter (1991). Both approaches depend on the tail behaviour of the underlying distribution, which can be measured by the tail index. Hill (1975) constructed an estimator for the tail index, using the largest values of the ordered sample. This estimator is still popular, however finding the optimal number of sample elements to be used remains a challenge. Numerous methods were developed to find the best threshold, for example the double bootstrap method by Danielsson et al. (2001), improved by Qi (2008) or a model based on Kolmogorov-Smirnov distance by Danielsson et al. (2016). The Hill estimator CONTACT L. Németh. Email: [email protected], [email protected] is asymptotically consistent for both threshold selection methods, however simulations show that for some sample distributions we need more than 10 000 observations for a reasonably accurate estimation. Our new method skips the direct threshold selection for the initial sample and calculates the tail index estimation via the tail indices of simulated subsamples. In this way it results in acceptable estimators for smaller samples, like n ∈ (500, 2000) too. 1.1. Mathematical overview Let X1 , X2 , . . . , Xn , . . . be an independent and identically distributed (i.i.d) sample from a distribution function F , and Mn = max(X1 , X2 , . . . , Xn ). If there exist sequences an > 0 and bn ∈ R, such that  Mn − bn P <x an  → G(x) if n → ∞ for a nondegenerate distribution function G, then one can say that F is in the maximum domain of attraction of G. The Fisher-Tippet theorem claims that G belongs to a parametric family (with location, scale and shape parameter) called generalized extreme value distribution. For every distribution G exist a > 0 and b, such that G∗ (x) = G(ax + b) for every x, where G∗ is the standardized extreme value distribution: G∗ξ (x) = ( 1 exp{−(1 + ξx)− ξ }, if ξ 6= 0, exp{−e−x }, if ξ = 0, (1) where 1 + ξx > 0 holds. The ξ parameter is called the tail index of the distribution. In case of a generalized extreme value distribution the tail index parameter is the shape parameter, which is invariant of standardizing the distribution. Another approach to the investigation of the tail behaviour is the peaks over threshold (POT) model of Balkema and de Haan (1974) and Pickands (1975) where the extremal model is based on the values over a threshold u. Let xF be the right endpoint of the distribution F (finite or infinite). If the distribution of the standardized excesses over the threshold has a limit, that must be the generalized Pareto distribution:  X −u < x|X > u P σu  → Fξ (x), if u → xF , where Fξ (x) = ( 1 6 0, 1 − (1 + ξx)− ξ , if ξ = x 1−e , if ξ = 0. (2) For the given initial distribution F , the two model result in the same parameter ξ in equations (1) and (2). A function ℓ(x) is called slowly varying if limt→∞ ℓ(tx)/ℓ(t) = 1 for all x > 0. For tail index parameter ξ > 0 the previous limit theorems are true if 2 1 1 − F (x) = x− ξ ℓ(x), for x > 0. Finding a proper function ℓ(x) and calculating the parameters of the limiting distribution is only applicable for special known distributions. In general case finding ℓ(x) is unrealistic, therefore one can use estimators to approximate ξ. 2. Methods for defining the threshold in Hill estimator For tail index ξ > 0 Hill (1975) proposed an estimator as follows: let X1 , X2 , . . . , Xn be a sample from a distribution function F and X1∗ ≤ X2∗ ≤ · · · ≤ Xn∗ the ordered statistic. The Hill estimator for the tail index is k 1X ∗ ∗ ξ̂ = . log Xn−i+1 − log Xn−k k i=1 Similarly to the POT model, the Hill estimator also uses the largest values of the sample. The threshold is defined as the (k + 1)th highest observation. The Hill estimator strongly depends on the choice for k. It is important to mention that ξˆ is a consistent estimator for the tail index only if k → ∞ and k/n → 0 as n → ∞. If one uses a too small k, the estimator has large variance, however for too large k, the estimator is likely to be biased. Therefore proposing a method for choosing the optimal k for the Hill estimator has been in the focus of research by Hall (1982) and others since its invention . 2.1. Double bootstrap One of the most accurate estimators, the double bootstrap method was introduced by Danielsson et al. (2001), improved by Qi (2008). In this case, we can find a proposed k by minimizing the asymptotic mean square error. Let M (i) k 1X ∗ ∗ (log Xn−j+1 − log Xn−k )i . (n, k) = k j=1 One can see, that ξ̂ = M (1) (n, k) is the Hill estimation. Instead of M (1) (n, k), the method optimizes k for the mean square error of M (n, k) = M (2) (n, k)−2(M (1) (n, k))2 . Let k1 be the optimal threshold index for M (1) (n, k), and k2 for M (n, k). The k2 ∼ k1  1 1− ρ 1/(1−2ρ) (3) statement is proven by Danielsson et al. (2001), where ρ is a regularity parameter, which can be estimated in a consistent way. This statement allows to estimate k2 instead of k1 by following the next steps. • Choose ǫ ∈ (0, 1/2), and set m1 = [n1−ǫ ] to ensure consistency if n → ∞. Estimate E(M (m1 , r)2 |X1 , X2 , . . . , Xn ) by drawing m1 size bootstrap samples 3 from the empirical distribution function Fn and minimize it in r. Denote the minimum by r1 . • Set m2 = [m21 /n] and minimize E(M (m2 , r)2 |X1 , X2 , . . . , Xn ) the same way as in the first step, let the minimum be r2 . • Estimate the regularity parameter ρ, which is important for further calculations, by ρ̂ = log(r1 )/(−2 log(m1 ) + 2 log(r1 )). • Now one can estimate the optimal k using the approximation (3) by   r12 1 1/(2ρ̂−1) k̂ = . 1− r2 ρ̂ The Hill estimator based on the double bootstrap method provides appropriate tail index estimation, but usually results in a long computation time. For smaller sample sizes the acceptable range is limited to ξ > 0.5. 2.2. Kolmogorov-Smirnov distance metric Another approach is to minimize the distance between the tail of the empirical distribution function and the fitted Pareto distribution with the estimated tail index parameter. One can use the Kolmogorov-Smirnov distance for the quantiles as metric as proposed by Danielsson et al. (2016). Assume that 1 1 F (x) = 1 − Cx− ξ + o(x− ξ ). The quantile function can be approximated by x=  P (X > x) C −ξ . The probability P (X > x) can be replaced by j/n, and ξ is estimated by the Hill estimator for some k, moreover C can be estimated by nk (Xn−k+1 )1/ξ . Using these substitutions one gets an estimation for the quantiles as a function of j and k. q(j, k) =  k (Xn−k+1 )1/ξ̂ j ξ̂ . The optimal k for the Hill estimator is chosen as the k, which minimizes the distance between the empirical and the calculated quantiles   k̂ = arg min sup |xn−j − q(j, k)| , k j∈1,...,T where T sets the fitting threshold (we call it KS threshold). The advantages of this method are that it is easy to program and its computation time is short. As Danielsson et al. (2016) mentioned, it is the best performing known method if 0 < ξ < 0.5 and also works well for small sample sizes. However, for distributions with tail index ξ > 0.5 this technique results in highly biased estimation. Generally it can be said, that there are good methods for finding an appropriate k if the tail index parameter is 0 < ξ < 0.5, which contains distributions with finite 4 variance. However, these methods usually fail to perform well for the case ξ > 0.5 (these are distributions with infinite variance). The Kolmogorov-Smirnov method was introduced and analized by simulations in Danielsson et al. (2016), but no theoretical background is available for this method. The Theorem 2.2 states that under some conditions the Kolmogorov-Smirnov technique results in unbiased estimation for the tail index. For the proof we need the following lemma: Q Lemma 2.1. If k → ∞, then k1 log( kj=1 kj ) → 1. Proof. For k → ∞ by using the Stirling formula we have 1 log k Y  k k = j j=1   kk 1 = ∼ log √ k k 2πk kek  k    √ 1 1 e k = = log √ log(e ) − log( 2πk) k k 2πk √ 1 = 1 − log( 2πk) → 1. k 1 log k  kk k!  Theorem 2.2. The Hill estimatior results in asymptotically unbiased estimation for the tail index using the Kolmogorov-Smirnov k-selection technique as k → ∞. Proof. Let X1 , X2 , . . . , Xn be our sample, and be X1∗ , X2∗ , . . . , Xn∗ the ordered sample. Let qn (j, k) =  k (Xn−k+1 )1/ξ j ξ (4) ∗ be our unbiased quantile estimator for E(Xn−j+1 ), similar as one can see Danielsson et al. (2016). For the right n → ∞, k(n) → ∞ sequences the distribution will be identical to a Pareto distribution (POT model). Therefore Glivenko-Cantelli type theorems for quantiles provides that the q estimator is consistent, for every ε > 0 there is an M such that if n > M then the Kolmogorov-Smirnov distance will be less than ε. Choose k which minimizes the Kolmogorov-Smirnov distance of q estimator and Xj∗ 5 samples and let ξ̂ be the Hill estimation using k if n > M .   X k 1 ∗ ∗ ˆ (log(Xn−j+1 ) − log(Xn−k )) E ξ) = E k j=1 = 1 log k Y k  ∗ E(Xn−j+1 ) j=1 ∗ )) − log(E(Xn−k ∼ k Y  1 qn (j, k) − log(qn (k + 1, k)) log k = ξ log k = = approximation by using (4) j=1 j=1 1 k ∗ (Xn−k+1 ) ξ j  − ξ · log  1 k ∗ (Xn−k+1 )ξ k+1     k k Y 1 k k 1X ∗ ∗ ξ log(Xn−k+1 ) − ξ log( )+ ) + log((Xn−k+1 ) ) log( j ξ k+1 ξ k  1 k k X = ξ· Y k j=1 ∗ log(Xn−k+1 ) j=1  j=1 1 log( k k Y j=1 − ∗ log(Xn−k+1 ) ξ + k     k Y k k ) − ξ log( ) log( j k+1 j=1    k k ) − ξ log( ) →ξ+0 j k+1 However k → ∞ is not an evident condition and even if it is realized we cannot say anything about the speed of convergence. This could lead to biased tail index estimation using Kolmogorov-Smirnov method, especially if ξ has high value. 3. Estimator for heavy-tailed distributions The method based on Kolmogorov-Smirnov metric is asymptotically unbiased. According to Danielsson et al. (2016) the method provides acceptable results for small sample sizes if ξ < 0.5, but for tail index ξ > 0.5 usually samples of more than 10 000 elements are necessary to estimate ξ properly. However, in most real-life applications such a large sample size is not available, therefore in cases of distributions with infinite variance the Kolmogorov-Smirnov metric-based estimator has significant bias. Independent data in size 500 from distributions with different tail index parameter ξ were simulated to detect the magnitude of the bias. The estimations were calculated 30 000 times for each ξ. This experiment showed that the distribution of the estimator is not normal, but in spite of the different initial distributions for each ξ, we received similar empirical distributions for the estimators, which could be approximated by a generalized extreme value distribution, as one can see in Figure 1. Although the GEV fitting is the best among known distributions, the goodness of fit tests still reject it. Therefore it would be beneficial characterizing the bootstrap distribution more precisely. We estimated the parameters of the GEV distribution using maximum likelihood method, which is a consistent estimator, although sometimes requires high sample size for proper estimation. 6 However, based on the simulations, one can detect a linear relation between the parameters of the best fitting GEV distribution and the theoretical tail index parameter ξ in the interval (0.5, 4) (see Figure 2). For ξ < 0.5 the mean of the estimations using the Kolmogorov-Smirnov method was acceptable. For higher index values a linear transformation can be used on the parameters of the fitted GEV distribution to estimate the tail index. When ξ > 4 the Kolmogorov-Smirnov method could not return reasonable results, so the correction could not help. Alternatively, the average of estimations and the theoretical tail index parameter are also in linear connection according to simulations. After recalculating the mean values and GEV parameters for sample sizes of 2000, 8000 and 10 000 with 10 000, 2000 and 1000 simulations we experienced that the values were similar as one can see in Table 1. Due to the long calculation time no simulations were run for higher (more than 10 000) sample sizes, especially that the asymptotic behaviour of other methods are already realized for these sample sizes. With these experiments we can state that in ξ ∈ (0.5, 4) the distribution of the KolmogorovSmirnov estimation does not depend on the sample size if 500 < n < 8000. Deviation were detected only on ξ ≥ 3, n = 8000 case. These results allow to use linear regression between the estimated GEV parameters and the theoretical tail index parameter. Table 1. The mean and the parameters of the fitted GEV distribution for Kolmogorov-Smirnov estimations ξ = 0.5, ξ = 1, ξ = 2, ξ = 3, ξ = 4, n=500 n=2000 n=8000 n=10000 n=500 n=2000 n=8000 n=10000 n=500 n=2000 n=8000 n=10000 n=500 n=2000 n=8000 n=10000 n=500 n=2000 n=8000 n=10000 mean location scale shape 0.448 0.446 0.454 0.448 0.85 0.855 0.859 0.856 1.628 1.634 1.617 1.59 2.392 2.36 2.408 2.441 2.962 3.137 3.149 3.09 0.378 0.378 0.383 0.382 0.701 0.709 0.724 0.713 1.334 1.356 1.336 1.316 1.978 1.963 2.055 2.09 2.478 2.59 2.637 2.573 0.113 0.112 0.116 0.116 0.274 0.274 0.27 0.276 0.605 0.601 0.602 0.594 0.935 0.903 0.911 0.903 1.159 1.232 1.225 1.2 0.043 0.032 0.045 -0.001 -0.03 -0.039 -0.078 -0.062 -0.094 -0.115 -0.108 -0.118 -0.141 -0.137 -0.22 -0.217 -0.177 -0.128 -0.163 -0.141 Based on the observations above we constructed an algorithm that can estimate the tail index on the interval ξ ∈ (0.5, 4) for sample sizes between 500 and 10 000. The connection stands for even smaller samples, however the proper behavior of the bootstrap simulations require this sample size. For smaller sample the information about the extremes is minimal and even using bootstrap resampling results in estimates with high variance. The sample size has no significant effect on the estimation, when modeling is done separately for the samples. If one constructs a model with the mean 7 Figure 1. Empirical density functions of Kolmogorov-Smirnov estimations for tail index ξ = 1 based on 1000 size samples using 5000 simulations and density function of the fitted GEV distribution (parameters: ξ = −0.04, µ = 0.704, σ = 0.273) using all of the data Figure 2. Linear regression for mean and EVD parameters. Average Kolmogorov-Smirnov estimations were calculated using 500 size Frechet samples and 30000 simulations of the Hill estimators, the location parameter of the fitted GEV and the sample size, then the size becomes marginally significant with a negligible coefficient (p = 0.017, coef= −0.0000046) which has noticeable effect only over 100 000 observations. 3.1. Algorithm Let X1 , X2 , . . . , Xn be independent and identically distributed observations. (1) As we investigate the extremal behaviour of the data, we apply the m out of n bootstrap method to resample from the observations. According to Bickel et al. (1997), see also Bickel and Sakov (2008) in case of extreme-value inference it is important to set m as m → ∞ and m/n → 0 as n → ∞. One way to ensure this property is if we chose m = nǫ , where ǫ ∈ (0.5, 1) can be arbitrary. (2) Calculate ξ1 , ξ2 , . . . , ξM tail index estimations from the M bootstrap samples 8 using the Kolmogorov-Smirnov method (2.2) for Hill estimator, where the bootP strap sample size is m. Let ξ ∗ = ( M j=1 ξj )/M be the average of KolmogorovSmirnov estimations. (3) Fit a generalized extreme value distribution to the estimated values. Our experience is that the tail index of the initial distribution is in linear relation with all of the extreme value parameters. The covariance matrix of the best fitted GEV distribution parameters has the eigenvalues 0.666, 0.0005, 0.00006, which means that there is only one significant factor. The eigenvector of the largest eigenvalue is (0.89, 0.45, −0.09), so the location and scale parameters have higher impact. If we apply a linear regression with these parameters only, the location parameter has significant coefficient (p = 0.0003). Therefore we suggest to use the location parameter µ for estimation. (4) Let ξ̂ = −0.119+1.603·µ. These values were calculated from the linear regression of the previous step. (5) Alternatively, we could have used the estimator ξ̂ ∗ = −0.1181+ 1.3301·ξ ∗ , where ξ ∗ is the mean of the bootstrap samples. 3.2. Simulations To examine the properties of the fitting regression estimator, we simulated data from Pareto, Frechet, Student and symmetric stable distributions with the same theoretical tail index parameter for samples of size 500, 1000 and 4000. We compared the average of the calculated values by using our new regression method to the theoretical parameter between ξ = 0.2 and ξ = 5. Subsequently we calculated the average absolute error from the theoretical ξ. For the different sample sizes we set the bootstrap subsample size to 60, 100 or 300, respectively. We set a suitable KS threshold (15, 30, 120) in each case, however our previous experiences shows that if the KS threshold is higher than the 5% of the bootstrap sample its significance is negligible because the biggest deviance is experienceable on highest quantiles. One may conclude by Table 2, 3 and 4 that in the interval ξ ∈ (0.5, 4) the estimates are near to the theoretical value. We can see that the mean of error for smaller tail indices reduces by using higher sample sizes, while the estimator gets biased for larger tail index. For n = 500 the estimation is still acceptable for ξ = 5. The only exception is the symmetric stable case for ξ = 0.5, but this is practically the normal distribution, which is not in the maximum domain of attraction of the Frechet distribution, so we did not expect this extreme value model to work well. Table 2. Average tail index estimations from 500 size samples, by using 500 simulations, while the bootstrap sample size is m = 60. The KS threshold is set to 15. For every distribution we calculated the absolute error from the theoretical parameter ξ ξ 0.2 0.33 0.5 1 2 3 4 5 GPD error Frechet error Student error Stable error 0.44 0.24 0.13 0.07 0.41 0.21 0.52 0.19 0.29 0.05 0.48 0.15 0.63 0.13 0.48 0.05 0.58 0.09 0.32 0.18 1.02 0.11 0.99 0.1 0.98 0.1 0.99 0.11 1.93 0.22 1.96 0.22 1.87 0.23 1.98 0.22 2.86 0.33 2.92 0.33 2.79 0.35 2.96 0.33 3.83 0.43 3.89 0.45 3.77 0.47 3.94 0.45 4.77 0.52 4.8 0.53 4.72 0.59 4.91 0.54 9 Table 3. Average tail index estimations from 1000 size samples, by using 200 simulations, while the bootstrap sample size is 100. The KS threshold is set to 30. For every distribution we calculated the absolute error from the theoretical parameter ξ ξ GPD error Frechet error Student error Stable error 0.2 0.41 0.21 0.14 0.06 0.37 0.17 0.33 0.49 0.16 0.3 0.04 0.45 0.12 0.5 0.6 0.1 0.48 0.05 0.55 0.06 0.28 0.22 1 1.01 0.09 0.99 0.09 0.97 0.09 0.97 0.09 2 1.95 0.18 1.97 0.19 1.91 0.21 1.97 0.2 3 2.92 0.27 2.95 0.29 2.89 0.29 2.95 0.29 4 3.91 0.36 3.93 0.4 3.81 0.41 3.93 0.39 5 4.84 0.41 4.74 0.47 4.83 0.47 4.88 0.47 Table 4. Average tail index estimations from 4000 size samples, by using 200 simulations, while the bootstrap sample size is 300. The KS threshold is set to 120. For every distribution we calculated the absolute error from the theoretical parameter ξ ξ GPD error Frechet error Student error Stable error 0.2 0.36 0.16 0.15 0.05 0.31 0.11 0.33 0.43 0.1 0.3 0.03 0.39 0.05 0.5 0.55 0.06 0.48 0.04 0.51 0.03 0.22 0.28 1 0.99 0.09 1 0.08 0.99 0.09 0.99 0.08 2 1.98 0.18 2 0.17 1.97 0.19 1.99 0.16 3 2.98 0.26 3.02 0.25 2.96 0.27 2.98 0.26 4 3.97 0.34 3.96 0.29 3.97 0.33 3.91 0.31 5 4.53 0.52 4.11 0.9 4.85 0.39 4.7 0.42 3.3. Comparison of the methods As we mentioned the Kolmogorov-Smirnov method (2.2) was developed to estimate tail index parameter in ξ ∈ (0, 0.5) interval. The double bootstrap (2.1) method can be used for estimating larger values, but it has long computational time. However our new algorithm works well for larger values than the Kolmogorov-Smirnov method and it is faster than the double bootstrap. In this section we compare the methods for different ξ by using samples of size 1000, and present the results in Table 5,6, 7 and 8. For every distribution we can see, that the double bootstrap and the regression estimators (3.1) have better properties: lower mean square error than the KolmogorovSmirnov method for ξ > 0.5, but if ξ < 0.5 the Kolmogorov-Smirnov method starts to perform better. We can conclude that the double bootstrap and regression methods have similar accuracy, but our new method has lower computational time and the estimations can usually be approximated by the normal distribution (see Figure 3). In the ξ ∈ (0.5, 4) region the regression estimators have similar errors for the investigated distributions, which means it does not depend on the distribution of the sample, unlike the double bootstrap method. 10 Table 5. Comparing the methods for Frechet distribution using 200 simulations from samples of size 1000. In double bootstrap method we used ǫ = 0.15 for determining the bootstrap sample size ratio and simulated 500 times in every bootstrap simulation. For fitting and mean regression the subsample size is 100 and the KS threshold is set to 30. For every method we calculated the mean absolute error from the theoretical parameter ξ ξ Double bootstrap error Kolmogorov-Smirnov error Regression fitting error Mean regression error 0.2 0.21 0.02 0.18 0.04 0.14 0.06 0.16 0.04 0.33 0.35 0.04 0.3 0.08 0.3 0.04 0.31 0.03 0.5 0.53 0.05 0.44 0.13 0.48 0.05 0.5 0.04 1 1.06 0.1 0.82 0.29 0.99 0.09 1.02 0.09 2 2.11 0.21 1.61 0.58 1.97 0.19 2 0.18 3 3.17 0.31 2.35 0.88 2.95 0.29 2.97 0.27 4 4.23 0.41 2.57 1.44 3.93 0.4 3.91 0.35 5 5.29 0.52 1.65 3.35 4.74 0.46 4.59 0.48 Table 6. Comparing the methods for Student distribution using 200 simulations from samples of size 1000. In double bootstrap method we used ǫ = 0.15 for determining the bootstrap sample size ratio and simulated 500 time in every bootstrap simulation. For fitting and mean regression the subsample size is 100 and the KS threshold is set to 30. For every method we calculated the absolute error from the theoretical parameter ξ ξ Double bootstrap error Kolmogorov-Smirnov error Regression fitting error Mean regression error 0.2 0.26 0.1 0.25 0.06 0.37 0.17 0.36 0.16 0.33 0.38 0.11 0.33 0.07 0.45 0.11 0.45 0.12 0.5 0.55 0.1 0.47 0.13 0.55 0.06 0.57 0.08 1 1.02 0.11 0.83 0.31 0.97 0.09 1 0.09 2 2.03 0.14 1.57 0.6 1.91 0.21 1.96 0.19 3 3.06 0.2 2.41 0.91 2.89 0.29 2.97 0.27 4 4.05 0.25 3 1.19 3.81 0.41 3.88 0.37 5 5.13 0.32 3.05 1.95 4.83 0.47 4.81 0.43 Table 7. Comparing the methods for symmetric stable distribution using 200 simulations from samples of size 1000. In double bootstrap method we used ǫ = 0.15 for determining the bootstrap sample size ratio and simulated 500 times in every bootstrap simulation. For fitting and mean regression the subsample size is 100 and the KS threshold is set to 30. For every method we calculated the mean absolute error from the theoretical parameter ξ ξ Double bootstrap error Kolmogorov-Smirnov error Regression fitting error Mean regression error 0.5 0.12 0.38 0.17 0.33 0.28 0.22 0.27 0.23 1 1.02 0.11 0.84 0.28 0.97 0.09 1.01 0.09 11 2 2.13 0.27 1.6 0.58 1.97 0.2 2.03 0.19 3 3.2 0.4 2.36 0.9 2.95 0.29 3.02 0.28 4 4.29 0.49 3.12 1.18 3.93 0.39 3.99 0.35 5 5.37 0.62 2.63 2.37 4.88 0.47 4.86 0.41 Table 8. Comparing the methods for Pareto distribution using 200 simulations from samples of size 1000. In double bootstrap method we used ǫ = 0.15 for determining the bootstrap sample size ratio and simulated 500 times in every bootstrap simulation. For fitting and mean regression the subsample size is 100 and the KS threshold is set to 30. For every method we calculated the mean absolute error from the theoretical parameter ξ ξ Double bootstrap error Kolmogorov-Smirnov error Regression fitting error Mean regression error 0.2 0.34 0.7 0.28 0.08 0.41 0.21 0.41 0.21 0.33 0.44 0.15 0.36 0.09 0.49 0.16 0.49 0.16 0.5 0.59 0.15 0.48 0.13 0.6 0.1 0.62 0.12 1 1.07 0.12 0.85 0.28 1.01 0.09 1.04 0.09 2 2.05 0.14 1.61 0.61 1.95 0.18 1.99 0.17 3 3.06 0.16 2.36 0.88 2.92 0.27 2.95 0.25 4 4.05 0.19 2.77 1.31 3.91 0.36 3.9 0.33 5 5.04 0.21 2.28 2.72 4.84 0.41 4.7 0.41 Figure 3. QQ plots for case ξ = 2 with regression estimation and double bootstrap to sample sizes of 500 and 1000. We have got p-values of 0.32 and 0.05 by the Anderson-Darling test for regression estimation, but for double bootstrap both p-values were less than 0.0001. The results of simulations in Table 5,6, 7 and 8 let us provide a model selection method for estimating the tail index. One can choose the best method for the sample by following the next steps: (1) Estimate the tail index using the Kolmogorov-Smirnov method (2.2). If the estimated ξˆ value is less than 0.5, the Kolmogorov-Smirnov method is the best among the investigated aproaches, thus the estimation is acceptable. (2) If 0.5 < ξ̂ < 0.85, then it is likely that for the true tail index 0.5 < ξ < 1 holds, thus the regression estimation (3.1) gives the best estimation. (3) If 0.85 < ξ̂, then the behavior of the methods depends on the initial distribution. 12 Fit GPD, Student, Stable and Frechet distributions for the sample. (4) If the best fitting distribution is GPD or Student, use the double bootstrap method (2.1). (5) If the best fitting distribution is Stable or Student, use the regression method. 3.4. Applications to real data The Danish fire losses is a well known data set, which is suitable for testing extreme value models. Previous discussions were published e.g. by Resnick (1997), Del Castillo and Padilla (2016) . The dataset contains 2167 fire losses, which occurred between 1980 and 1990. For this amount of data we considered bootstrap subsample sizes in the interval (50, 300). We calculated the tail index of this dataset with 10 000 bootstrap samples for different subsample sizes. The results can be seen in Table 9. Table 9. Estimated tail index for Danish fire losses data with different subsample sizes Subsample size 50 100 150 200 300 Regression fitting method 0.689 0.687 0.644 0.604 0.555 Mean regression method 0.702 0.68 0.646 0.621 0.598 For comparison, we calculated the tail index by using other methods. To be more exact we fitted a generalized extreme value model for the maxima of 60 losses and Pareto distribution over the threshold u = 30. The chosen values satisfies the ”not too high, not too low” rule, which is required for the extreme value modeling. Moreover, we estimated the tail index parameter with the Hill estimation by using double bootstrap and Kolmogorov-Smirnov methods. The results can be seen in Table 10. Beside that Figure 4 presents the Hill estimation using different k as threshold of ordered statistics. Table 10. Comparing methods for Danish fire losses data Method Fitted GEV Fitted GPD Kolmogorov-Smirnov Double bootstrap Tail index (ξ) 0.507 0.659 0.61 0.707 As one can see, our estimators are between the Kolmogorov-Smirnov and the double bootstrap methods. Using higher subsample size results in lower values. In theory the subsample ratio has to tend to 0, therefore the estimations from smaller subsample sizes must be closer to the real parameter. One can see, that the estimation is near to the result of the double bootstrap. This observation corresponds to the fact that for ξ > 0.5 the double bootstrap method is more accurate than the one based on the Kolmogorov-Smirnov distance. With the result of regression fitting method using subsamples of size 150, we estimated the quantiles of the generalized Pareto distribution with shape parameter ξ = 0.644. By setting the above value for the shape and 0 as the location parameter, the maximum likelihood estimation for scale is 0.95. 13 Figure 4. Hill estimation for the tail index parameter of Danish fire losses dataset, using different k values for estimation. Table 11 contains the calculated quantiles of the GPD(0, 0.95, 0.644). Moreover we calculated the empirical distribution function for the quantile values. One can see, that the high quantile estimators are close to the observed quantiles of the fire loss data. Table 11. Quantiles of generalized Pareto(0,0.95,0.644), empirical distribution for Danish fire losses data at the estimated points, together with the empirical quantiles Quantile 0.95 0.99 0.999 estimated Pareto (emp. dist.) 8.68 (0.943) 27.156 (0.99) 124.66 (0.9986) Empirical quantiles 9.97 26.04 131.55 4. Conclusion Our new regression method (3.1) provides an opportunity to estimate the tail index for heavy-tailed distributions. We have shown its merits by the parameter estimation of known distributions, and presented that our method is also useful for real life data. The computation time is less than using the double bootstrap method. However as our algorithm also applies bootstrap techniques, one can use less bootstrap samples to lower the computation time further if needed – at the expense of the estimations’ accuracy, or conversely. Our simulations showed in consort of Danielsson et al. (2016) that the best estimation is based on the Kolmogorov-Smirnov distance (2.2), if the ξ parameter is less than 0.5. For 0.5 < ξ < 1 the regression estimation can result the best estimation. However, for higher tail index the methods have a slight dependence of the initial distribution. If the distribution is close to GPD or Student, then the double bootstrap method (2.1) could result more accurate estimation. In contrast, if the distribution 14 is stable or Frechet we recommend to use the regression estimation. Therefore a fast Hill estimation using the Kolmogorov-Smirnov method and fitting distributions for the sample can help to choose the best method for estimating the tail index. This model selection algorithm could be extended by comparing more methods or by more fitted distributions. Our regression estimation has two types, using the mean of the bootstrap samples or using the location parameter of the best fitted GEV distribution. Our experiments did not indicate which one is the more precise, therefore we suggest using both in a real life analysis. Further calculations could find the answer for this question. References Balkema, A. and de Haan, L., 1974. Residual life time at great age, Annals of Probability, 2, 792-804. Bickel, P. J., Götze, F. and van Zwet, W. R., 1997. Resampling fewer than n observations:gains, losses and remedies on losses, Statistica Sinica, 7, 1-31. Bickel, P. J. and Sakov, A., 2008. On the choice of m in the m out of n bootstrap and confidence bounds for extrema, Statistica Sinica, 18, 967-985. Danielsson, J., Ergun, L. M., De Haan, L. and de Vries, C. G., 2016. Tail Index Estimation: Quantile Driven Threshold Selection, Available at SSRN: https://ssrn.com/abstract=2717478. Danielsson, J., de Haan, L., Peng, L. and de Vries, C. G., 2001. Using a bootstrap method to choose the sample fraction in tail index estimation, Journal of Multivariate Analysis, 76, 226-248. Davison, A. C. and Smith, R. L., 1990. Models for exceedances over high thresholds, Journal of the Royal Statistical Society. Series B (Methodological), 52, 393-442. Del Castillo, J. and Padilla, M., 2016. Modeling extreme values by the residual coefficient of variation, SORT–Statistics and operations research transactions, 40, 303-320. Fisher, R. A. and Tippett, L. H. C., 1928. Limiting forms of the frequency distribution of the largest or smallest member of a sample, Mathematical Proceedings of the Cambridge Philosophical Society, 24, 180-190. Hill, B. M., 1975. A simple general approach to inference about the tail index, Annals of Statistics, 3, 1163-1174. Hall P., 1982. On some simple estimates of an exponent of regular variation, Journal of the Royal Statistical Society. Series B (Methodological), 44, 37-42 Leadbetter, M. R., 1991. On a basis for ’Peaks over Threshold’ modeling, Statistics & Probability Letters, 12, 357-362. Pickands, J., 1975. Statistical inference using extreme order statistics, Annals of Statistics, 3, 119-131. Resnick, S. I., 1997). Discussion Of The Danish Data On Large Fire Insurance Losses, Astin Bulletin 27, 139-151. Qi, Y., 2008. Bootstrap and empirical likelihood methods in extremes, Springer, 11, 81-97. 15
10math.ST
COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS arXiv:1402.5652v3 [math.GR] 16 Jun 2016 ADRIEN LE BOUDEC Abstract. We establish compact presentability, i.e. the locally compact version of finite presentability, for an infinite family of tree almost automorphism groups. Examples covered by our results include Neretin’s group of spheromorphisms, as well as the topologically simple group containing the profinite completion of the Grigorchuk group constructed by Barnea, Ershov and Weigel. We additionally obtain an upper bound on the Dehn function of these groups in terms of the Dehn function of an embedded Higman-Thompson group. This, combined with a result of Guba, implies that the Dehn function of the Neretin group of the regular trivalent tree is polynomially bounded. Contents 1. 2. 3. 4. 5. 6. 7. Introduction Tree almost automorphisms Higman-Thompson groups The almost automorphism groups AAutD (Td,k ) Presentation of AAutD (Td,k ) Compact presentability of Schlichting completions Almost automorphism groups associated with regular branch groups References 1 6 7 10 13 18 22 28 1. Introduction Almost automorphism groups. If T is a locally finite tree, then its automorphism group Aut(T ), endowed with its natural locally compact and totally disconnected topology, acts continuously and properly on T . Almost automorphisms of the tree T (sometimes called spheromorphisms) do not act on T , but on its boundary ∂∞ T . Roughly speaking, an almost automorphism of T is a transformation induced in the boundary by a piecewise tree automorphism. Almost automorphisms form a topological group AAut(T ) containing the automorphism group Aut(T ) as an open subgroup. In the case where T is a non-rooted regular tree of degree d+1 ≥ 3, the group Nd of almost automorphisms of T was introduced by Neretin in connection with his work in representation theory [Ner92]. Neretin proved that, from the Date: June 16, 2016. 1 2 ADRIEN LE BOUDEC point of view of representation theory, the group Nd can be seen as a p-adic analogue of the diffeomorphism group of the circle. Inspired by a simplicity result for the diffeomorphism group of the circle Diff + (S1 ) [Her71], Kapoudjian later proved that the group Nd is abstractly simple [Kap99]. Recently, Bader, Caprace, Gelander and Mozes proved that Nd does not have any lattice [BCGM12]. This result is remarkable for the reason that all the familiar examples of simple locally compact groups (which are unimodular), e.g. real or p-adic Lie-groups, or the group of type preserving automorphisms of a locally finite regular tree, are known to have lattices. Actually Nd turned out to be the first example of a locally compact simple group without lattices. In this paper we investigate a family of groups which appear as generalizations of Neretin’s group. Here we give an outline of their construction (see Section 4 for precise definitions). Every finite permutation subgroup D ≤ Sym(d) is known to give rise to a closed subgroup of the automorphism group Aut(Td ) of the rooted d-regular tree Td , by considering the infinitely iterated permutational wreath product W (D) = (. . . ≀ D) ≀ D. Elements of W (D) are rooted automorphisms whose local action is prescribed by D. We now consider the quasi-regular rooted tree Td,k , in which the root has degree k and other vertices have degree d + 1. Roughly, the almost automorphism groups AAutD (Td,k ) we are interested in, are homeomorphisms of ∂∞ Td,k that are piecewise tree automorphisms whose local action is prescribed by D. This family of groups generalizes Neretin’s groups because when D is the full permutation group Sym(d), the group W (D) is the full automorphism group of Td and we can check that AAutD (Td,2 ) ≃ Nd . These groups appear in [CM11], where a careful study of the abstract commensurator group of self-replicating profinite wreath branch groups is carried out (we refer to [BEW11] for an introduction to abstract commensurators of profinite groups). Let Wk (D) be the closed subgroup of Aut(Td,k ) fixing pointwise the first level of Td,k and acting by an element of W (D) in each subtree rooted at level one. Under the additional assumption that D ≤ Sym(d) is transitive and is equal to its normaliser in Sym(d), the group AAutD (Td,k ) turns out to be isomorphic to the abstract commensurator group of Wk (D). In particular Neretin’s group Nd is the abstract commensurator group of W2 (Sym(d)), or equivalently the group of germs of automorphisms of Aut(T ) in the language of [CM11]. The result that the groups AAutD (Td,k ) are compactly presented is motivated by their connections with Thompson groups and their generalizations. Recall that Higman [Hig74] constructed an infinite family of finitely presented infinite simple groups Vd,k (sometimes denoted Gd,k ), generalizing the group V introduced by R. Thompson. When D ≤ Sym(d) is the trivial group then AAutD (Td,k ) is nothing else than Vd,k (see Section 3 for details). One of the reasons why combinatorial group theorists became interested in Thompson groups is because of the combination of simplicity and finiteness properties. Indeed Thompson groups T and V turned out to be the first known examples of finitely presented infinite simple groups (see [CFP96]). While simplicity results for AAutD (Td,k ) have recently been obtained in [CM11], here we settle COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 3 in the positive the question whether these groups satisfy the locally compact version of being finitely presented, i.e. being compactly presented. Compact presentability. Recall that a locally compact group is said to be compactly generated if there exists a compact subset S so that the group generated by S is the whole group G. Less known than the notion of compact generation is the notion of compact presentation. A locally compact group G is said to be compactly presented if it admits a compact generating subset S such that G has a presentation, as an abstract group, with S as set of generators and relators of bounded length (but possibly infinitely many relators). When the group G is discrete, this amounts to saying that G is finitely presented; and as in the discrete case, for a locally compact group, being compactly presented does not depend on the choice of the compact generating set S. Compact presentability can be interpreted in terms of coarse simple connectedness of the Cayley graph of the group with respect to some compact generating subset. In particular, among compactly generated locally compact groups, being compactly presented is preserved by quasi-isometries. For a proof of this result, see for instance [CH15, Chapter 8]. Our first result is the following: Theorem 1.1. For any k ≥ 1, d ≥ 2, and any subgroup D ≤ Sym(d), the group AAutD (Td,k ) is compactly presented. The group AAutD (Td,k ) always contain a dense copy of the Higman-Thompson finitely presented group Vd,k . Here we insist on the fact that for a locally compact group, although having a dense finitely generated subgroup is a sufficient condition for being compactly generated, the analogue result does not hold for compact presentation, i.e. having a dense finitely presented subgroup does not imply compact presentation of the ambient group. For example, for any nonArchimedean local field K, the group K2 ⋊ SL2 (K) has a central extension with non-compactly generated kernel, and is therefore not compactly presented (see for instance [CH15, Proposition 8.A.26]). However the reader can check that this group admits dense finitely generated free subgroups. We also emphasize the fact that, for the case of Neretin’s group, Theorem 1.1 cannot be obtained by proving finite presentation of a discrete cocompact subgroup because these do not exist [BCGM12]. However we note that it seems to be unknown whether Neretin’s group Nd is quasi-isometric to a finitely generated group. As a by-product of Theorem 1.1 and the main result of [BCGM12], we also obtain that locally compact simple groups without lattices also exist in the realm of compactly presented groups. Dehn function. Having obtained compact presentability of a locally compact group G naturally leads to the study of an invariant of G, having both geometric and combinatorial flavors, called the Dehn function of G. From the geometric point of view, the Dehn function δG (n) is the supremum of areas of loops in G of length at most n. In other words, it is the best isoperimetric function, where isoperimetric function can be understood as for simply connected Riemannian manifolds. 4 ADRIEN LE BOUDEC From the combinatorial perspective, the Dehn function is a quantified version of compact presentability: δG (n) is the supremum over all relations w of length at most n in the group, of the minimal number of relators needed to convert w to the trivial word. First recall that for any two functions f, g : N → N, we say that f is asymptotically bounded by g, denoted f 4 g, if for some constant c we have f (n) ≤ cg(cn) + cn + c for every n ≥ 0; and f, g have the same ≈-asymptotic behavior, denoted by f ≈ g, if f 4 g and g 4 f . If G is compactly presented and if S is a compact generating set, then there is k ≥ 1 such that the group G is presented by hS | Rk i, where Rk is set of relations in G of length at most k. The area a(w) of a relation w, i.e. a word in the letters of S which represents the identity in G, is the smallest integer m so that w can be written in the free group FS as a product of m conjugates of relators of Rk . Now define the Dehn function of G by δG (n) = sup {a(w) : w relation of length at most n} . This function depends on the choice of S and k, but its ≈-asymptotic behavior does not, and is actually a quasi-isometry invariant of G. Our second result is the following upper bound on the Dehn function of almost automorphism groups: Theorem 1.2. For any k ≥ 1, d ≥ 2, and any subgroup D ≤ Sym(d), the Dehn function of AAutD (Td,k ) is asymptotically bounded by that of Vd,k . On the other hand, the Dehn function of AAutD (Td,k ) is not linear because having a linear Dehn function characterizes Gromov-hyperbolic groups among compactly presented groups, and the group AAutD (Td,k ) is easily seen not to be Gromov-hyperbolic. So by a general argument (see for example [Bow95]), the Dehn function of AAutD (Td,k ) has a quadratic lower bound. In the case d = 2, all the groups V2,k turn out to be isomorphic to Thompson group V . While the Dehn function of Thompson group F has been proved to be quadratic [Gub06], it is not known whether the Dehn function of V is quadratic or not. However, using a result of Guba [Gub00] who showed the upper bound δV 4 n11 , we obtain: Corollary 1.3. Neretin’s group N2 has a polynomially bounded Dehn function (4 n11 ). We believe that the result of Guba can be extended to the family of groups Vd,k , i.e. that every group Vd,k satisfies a polynomial isoperimetric inequality. By Theorem 1.2 this would imply that the Dehn function of AAutD (Td,k ) is polynomially bounded for arbitrary k ≥ 1, d ≥ 2 and D ≤ Sym(d). Almost automorphism groups associated with closed regular branch groups. The notions of self-similarity and branching appear naturally in the theory of groups acting on rooted trees. Basic definitions are recalled at the beginning of Section 7, and we refer the reader to the surveys [Nek05, BGŠ03] for more on self-similar and branch groups. To any self-similar group G ≤ Aut(Td ) we naturally associate a subgroup AAutG (Td ) ≤ AAut(Td ), consisting of almost automorphisms acting locally COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 5 like an element of G. The group AAutG (Td ) always contains the HigmanThompson group Vd and is generated by Vd together with an embedded copy of G. See Section 7 for more details. It is worth noting that the definition of the group AAutG (Td ) makes sense when G ≤ Aut(Td ) is an abstract subgroup. In particular we make a priori neither topological (e.g. closed) nor finiteness (e.g. finitely generated) assumption on G. The first example of such a group was studied by Röver in the case when G is the first Grigorchuk group. He proved that AAutG (Td ) is finitely presented and simple [Röv99]. The case of a general self-similar group was then studied by Nekrashevych, who proved that these groups enjoy properties rather similar to the properties of the Higman-Thompson groups (see [Nek04, Nek]). Later Barnea, Ershov and Weigel [BEW11] made use of Röver’s simplicity result to prove that the profinite completion of the Grigorchuk group, which coincides with its topological closure in Aut(T2 ), embeds as an open subgroup in a topologically simple group, namely the group of almost automorphisms acting locally like an element of the closure of the Grigorchuk group. Here we are interested in almost automorphism groups associated with closed regular branch groups. These can also be seen as generalizations of Neretin’s group. It turns out that in this setting, AAutG (Td ) is naturally a totally disconnected locally compact (t.d.l.c. for short) group, admitting G as a compact open subgroup. Under some more assumptions on G, we prove: Theorem 1.4. Let G ≤ Aut(Td ) be the closure of some finitely generated, contracting regular branch group, branching over a congruence subgroup. Then AAutG (Td ) is a t.d.l.c. compactly presented group. Examples of groups covered by Theorem 1.4 include the aforementioned topologically simple group constructed in [BEW11], as well as other groups described in Section 7. As an application, we obtain that the profinite completion of the Grigorchuk group embeds as an open subgroup in a topologically simple compactly presented group. Note that any group G appearing in Theorem 1.4 can be explicitly described in terms of the notions of patterns and finitely constrained groups, an introduction of which can be found in [Šun07]: G is the finitely constrained group defined by allowing all patterns of a fixed size appearing in the group of which it is the closure. See also the end of Section 7. The proof of Theorem 1.4 will consist in two steps, and we believe that each one is of independent interest. The first will be to establish a general result on compact presentability of the so-called Schlichting completions (see Section 6), and the second will be to identify our group with the Schlichting completion of one of its dense subgroup (see Theorem 7.10). Organization. We start by providing a brief introduction to almost automorphisms of trees and Higman-Thompson groups in the next two sections. In Section 4 we define the groups AAutD (Td,k ) and their topology, and establish some preliminary results. Section 5 contains the proofs of Theorem 1.1 and Theorem 1.2. In Section 6, we prove a general statement on compact presentability of Schlichting completions, namely Theorem 6.1, and the proof of Theorem 1.4 is given in Section 7. 6 ADRIEN LE BOUDEC Acknowledgments. I thank Yves de Cornulier for stimulating interactions, for his careful reading of the paper and his valuable comments. I am also very grateful to Pierre-Emmanuel Caprace for helpful discussions which gave rise to this work, to Laurent Bartholdi for useful discussions about branch groups, and to Pierre de la Harpe for his remarks and corrections. 2. Tree almost automorphisms 2.1. The quasi-regular rooted tree Td,k and its boundary. Let A and B be finite sets of cardinality respectively k ≥ 1 and d ≥ 2. Consider the set of finite words {∅} ∪ {ab1 · · · bn : a ∈ A, bi ∈ B} over the alphabet X = A ∪ B being either empty or beginning by an element of A. This set is naturally the vertex set of a rooted tree, where the root is the empty word ∅ and two vertices are adjacent if they are of the form v and vx, x ∈ X. We will denote this tree by Td,k . In the case when k = d it will be denoted by Td . For any v the subtree of T vertex v, we will also denote by Td,k d,k spanned by vertices having v as a prefix. The distance between a vertex and the root will be called its level, and the number of its neighbours will be called its degree. If v is a vertex of level n ≥ 0, then its neighbours of level n + 1 are called the descendants of v. By construction, the root of Td,k has degree k, and a vertex of level n ≥ 1 has degree d + 1: it has one distinguished neighbour pointing toward the root, and d descendants. See Figure 1 for the case k = 2, d = 3. The boundary ∂∞ Td,k of the tree Td,k is defined as the set of infinite words ab1 · · · bn · · · , i.e. infinite geodesic rays in Td,k started at the root. We define ′ the distance between two such words ξ, ξ ′ by d(ξ, ξ ′ ) = d−|ξ∧ξ | , where |ξ ∧ ξ ′ | is the length of the longest common prefix of ξ and ξ ′ . Equipped with this distance, the boundary at infinity ∂∞ Td,k turns out to be homeomorphic to the Cantor set. From now and for the rest of the paper, we fix an embedding of Td,k in the oriented plane. This embedding induces a canonical way of ordering, say from left to right, the descendants of any vertex. In particular we obtain a total ordering on the boundary at infinity ∂∞ Td,k , defined by declaring that ξ ≤ ξ ′ if the first letter of ξ following the longest common prefix of ξ and ξ ′ , is smaller than the one of ξ ′ . ∅ a1 a1 b1 a1 b2 a2 a1 b3 a2 b1 a2 b2 Figure 1. A picture of the tree T3,2 . a2 b3 COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 7 2.2. The group AAut(Td,k ) of almost automorphisms of Td,k . Recall that the group Aut(Td,k ) of automorphisms of the rooted tree Td,k is defined as the group of bijections of the set of vertices fixing the root and preserving the edges. In particular every automorphism of Td,k induces a homeomorphism of ∂∞ Td,k . We now introduce a larger subgroup of the homeomorphism group of ∂∞ Td,k , namely the group of homeomorphisms of ∂∞ Td,k which are piecewise tree automorphisms. Definition 2.1. A finite subtree T of Td,k is a rooted complete subtree if it contains the root as a vertex of degree k and if any other vertex which is not a leaf has degree d + 1. If T is a finite rooted complete subtree of Td,k then its complement is a forest composed of finitely many copies of the rooted d-regular tree Td . If T, T ′ are subtrees of Td,k , a map ψ : Td,k \ T → Td,k \ T ′ will be called a forest isomorphism if it maps each connected component of Td,k \ T onto a connected component of Td,k \ T ′ , and induces a tree isomorphism on each of these connected components. Note that such a forest isomorphism naturally induces a homeomorphism of ∂∞ Td,k . Definition 2.2. The group AAut(Td,k ) is defined as the set of equivalence classes of triples (ψ, T, T ′ ), where T, T ′ are finite rooted complete subtrees such that |∂T | = |∂T ′ | and ψ : Td,k \T → Td,k \T ′ is a forest isomorphism, where two triples are said to be equivalent if they give rise to the same homeomorphism of ∂∞ Td,k . The multiplication in AAut(Td,k ) is inherited from the composition in Homeo(∂∞ Td,k ). We mention the following result, whose proof is easy and left to the reader, which gives an alternative definition of the group of almost automorphisms AAut(Td,k ). Lemma 2.3. Let T1 , T1′ , T2 , T2′ be finite complete rooted subtrees of Td,k . Then two triples (ψ1 , T1 , T1′ ), (ψ2 , T2 , T2′ ) are equivalent if and only if there exist finite rooted complete subtrees T, T ′ so that T (resp. T ′ ) contains both T1 and T2 (resp. T1′ and T2′ ) and ψ1 , ψ2 : Td,k \ T → Td,k \ T ′ are equal. Remark 2.4. By the previous lemma, when considering a triple (ψ, T, T ′ ) representing an element of AAut(Td,k ), we can always assume that T and T ′ both contain a given finite subtree of Td,k . Note that since the only automorphism of Td,k inducing the trivial homeomorphism on ∂∞ Td,k is the identity, the group AAut(Td,k ) contains a copy of the group Aut(Td,k ) of automorphisms of the tree Td,k . 3. Higman-Thompson groups 3.1. Introduction. R. Thompson introduced in 1965 three groups F ≤ T ≤ V , an introduction to which can be found in [CFP96], while constructing a finitely generated group with unsolvable word problem. The groups T and V turned out to be the first examples of finitely presented infinite simple groups. Higman then generalized Thompson group V to an infinite family of groups (which were originally denoted by Gd,k , but we will use the notation Vd,k to 8 ADRIEN LE BOUDEC keep in mind the analogy with Thompson group V , which is nothing else than V2,1 ). K. Brown later generalized Higman’s construction to an infinite family of groups Fd,k ≤ Td,k ≤ Vd,k such that F2,1 ≃ F and T2,1 ≃ T . These groups were originally defined as automorphism groups of certain free algebras. We refer the reader to [Bro87] for an introduction from this point of view. The definition of the groups Vd,k we give below is in terms of homeomorphism groups of the boundary of the quasi-regular rooted tree Td,k . From this point of view, elements of these groups can be represented either as homeomorphisms of ∂∞ Td,k or by combinatorial diagrams, and we will use the interplay between these two representations. 3.2. Higman-Thompson groups Vd,k as subgroups of AAut(Td,k ). The definition that we adopt here for Higman-Thompson groups Vd,k is borrowed from [CM11]. Note that when k = d the group Vd,d will be denoted by Vd for simplicity. Definition 3.1. An element of AAut(Td,k ) is called locally order-preserving if it can be represented by a triple (ψ, T, T ′ ) such that T, T ′ are complete rooted subtrees of Td,k and ψ : Td,k \T → Td,k \T ′ preserves the order of the boundary at infinity on each connected component. It follows from the order-preserving condition that such a forest isomorphism ψ is uniquely determined by the induced bijection between the leaves of T and the leaves of T ′ . Locally order-preserving almost automorphisms are easily checked to form a subgroup of AAut(Td,k ). Definition 3.2. The Higman-Thompson group Vd,k is defined as the subgroup of AAut(Td,k ) of locally order-preserving elements. Every locally order-preserving v ∈ Vd,k has a unique representative (ψ, T, T ′ ) so that T, T ′ are complete rooted subtrees of Td,k and T is minimal for the inclusion. Then T ′ is also minimal and (ψ, T, T ′ ) will be called the canonical representative of v. This notion coincides with the classical notion of reduced tree pair diagrams commonly used to study Thompson groups. The tree T will be called the domain tree of v and T ′ the range tree. When considering a triple representing a locally order-preserving element, we will without further mention assume that this is the canonical representative. The following finiteness result is due to Higman [Hig74] (see also [Bro87]). Theorem 3.3. Higman-Thompson groups Vd,k are finitely presented. This result will be used in Section 5, where we will enlarge a finite presentation of Vd,k to obtain a compact presentation of the group AAutD (Td,k ). 3.3. Saturated subsets. We now introduce a notion of saturated subsets inside the group Vd,k , needed in Section 5. We would like to point out that this notion is not necessary if one just wants to prove Theorem 1.1. However it will be used in the proof of Theorem 1.2 to perform the cost estimates carefully. COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 9 Definition 3.4. A subset Σ ≤ Vd,k is said to be saturated if for every σ = (ψ, T, T ′ ) ∈ Σ and every u ∈ Aut(Td,k ), all the elements of Vd,k having a canonical representative of the form (ψ ′ , u(T ), T ′ ) belong to Σ. Lemma 3.5. Every finite subset Σ ≤ Vd,k is contained in a finite saturated subset. Proof. Let Ω be the subset of Vd,k consisting of elements of the form (ψ, u(T ), T ′ ), where u ∈ Aut(Td,k ) and T is the domain tree of the canonical representative of some element of Σ. Clearly Ω contains Σ and is saturated. Since Σ is finite, the number of such trees T is finite, and so is the set of u(T ), u ∈ Aut(Td,k ). The result then follows from the observation that, if T is a fixed finite complete rooted subtree of Td,k , then there are only finitely many elements of Vd,k having a canonical representative of the form (ψ, T, T ′ ).  3.4. A lower bound for the word metric in Vd,k . Here we give a lower bound for the word metric in the group Vd,k in terms of a combinatorial data contained in the diagrams (ψ, T, T ′ ) representing elements of Vd,k . Recall that a d-caret (or caret for short) in Td,k is a subtree spanned by a vertex of level n ≥ 1 and its d neighbours of level n + 1. We insist on the fact that we do not consider the subtree of Td,k spanned by the root and its k neighbours as a caret. If T is a finite complete rooted subtree of Td,k with κ carets, then the number of leaves of T is (d − 1)κ + k. In particular if v ∈ Vd,k has canonical representative (ψ, T, T ′ ), then T, T ′ have the same number of leaves, and consequently they also have the same number of carets. By abuse we will call it the number of carets of v and denote it by κ(v). Metric properties of Higman-Thompson groups of type F and T can be essentially understood in terms of the number of carets of tree diagrams, the latter being quasi-isometric to the word-length associated to some finite generating set. The use of this point of view shed light on some interesting large scale geometric properties of these groups (see [Bur99, BCS01, BCST09]). However metric properties of Higman-Thompson groups of type V are far less well understood, as it follows from the work of Birget [Bir04] that the number of carets is no longer quasi-isometric the the word-length in Thompson group V. Nevertheless, the following lemma gives a lower bound for the word metric in Vd,k in terms of the number of carets. Note that the same result appears in [Bir04] for the case of Thompson group V . Proposition 3.6. For any finite generating set Σ of Vd,k , there exists a constant CΣ > 0 such that for any v ∈ Vd,k , we have κ(v) ≤ CΣ |v|Σ . Proof. Define CΣ = maxσ∈Σ κ(σ). Now remark that when multiplying, say on the right, an element v ∈ Vd,k by an element σ ∈ Σ, we obtain an element vσ having a canonical representative with trees having at most κ(v) + CΣ carets. This is because when expanding the domain tree of v to get a common expansion with the range tree of σ, we have to add at most CΣ carets. So it follows from a straightforward induction that every element of length at most n with respect to the word metric associated to Σ has a canonical representative with at most CΣ n carets, and the proof is complete.  10 ADRIEN LE BOUDEC 4. The almost automorphism groups AAutD (Td,k ) Almost automorphisms of Td,k are homeomorphisms of the boundary ∂∞ Td,k which are piecewise tree automorphisms. In this section we introduce a family of subgroups of AAut(Td,k ) consisting of almost automorphisms which are piecewise tree automorphisms of a given type. 4.1. Almost automorphisms of type W (D). Let D ≤ Sym(d) be a subgroup of the symmetric group on d elements. Define recursively D1 = D, seen as the subgroup of the automorphism group of the rooted d-regular tree Td acting on level one; and Dn+1 = D ≀ Dn for every n ≥ 1, where the permutational wreath product is associated with the natural action of Dn on the set of vertices of level n of Td . We now let W (D) be the closed subgroup generated by the family (Dn ). For any k ≥ 1 we let Wk (D) be the subgroup of Aut(Td,k ) fixing pointwise the first level and acting by an element of W (D) in each subtree rooted at level one. The group Wk (D) is naturally isomorphic to the product of k copies of the group W (D). Definition 4.1. An almost automorphism of Td,k is said to be piecewise of type W (D) if it can be represented by a triple (ψ, T, T ′ ) such that T, T ′ are finite rooted complete subtrees of Td,k and ψ : Td,k \ T → Td,k \ T ′ belongs to W (D) on each connected component, after the natural identification of each connected component of Td,k \ T and Td,k \ T ′ with Td . We observe that by construction of W (D), if a triple (ψ1 , T1 , T1′ ) is such that ψ1 : Td,k \ T1 → Td,k \ T1′ belongs to W (D) on each connected component, then for any equivalent triple (ψ2 , T2 , T2′ ) such that T2 (resp. T2′ ) contains T1 (resp. T1′ ), then ψ2 : Td,k \ T2 → Td,k \ T2′ belongs to W (D) on each connected component. Proposition 4.2. The set of almost automorphisms AAutD (Td,k ) which are piecewise of type W (D) is a subgroup of AAut(Td,k ). Proof. The only non-trivial fact that one needs to check is that AAutD (Td,k ) is closed under multiplication, but this follows from the previous observation and from the fact that W (D) is a subgroup of Aut(Td ).  If D is the full permutation group Sym(d) then W (D) = Aut(Td ) and AAutD (Td,k ) = AAut(Td,k ). At the opposite extreme, if D is the trivial group then being piecewise trivial means being locally order-preserving and AAutD (Td,k ) = Vd,k . It is straightforward from the definition that if D ′ contains D then AAutD′ (Td,k ) contains AAutD (Td,k ). In particular we note that for every subgroup D ≤ Sym(d), the group AAutD (Td,k ) always contains Vd,k . 4.2. Topology on AAutD (Td,k ). By definition the group AAutD (Td,k ) also contains a copy of the tree automorphism group Wk (D). The latter comes equipped with a natural group topology, which is totally disconnected and compact, defined by saying that the pointwise level stabilizers form a basis of neighbourhoods of the identity. We would like to extend this topology to the group AAutD (Td,k ), i.e. define a group topology on AAutD (Td,k ) for which the subgroup Wk (D) is an open subgroup. For this, let us first recall the following well-known lemma, a proof of which can be consulted in [Bou71, Chapter 3]. COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 11 Lemma 4.3. Let G be a group and let F be a family of subgroups of G which is filtering, i.e. so that the intersection of any two elements of F contains an element of F. Assume moreover that for every g ∈ G and every U ∈ F, there exists V ∈ F so that V ⊂ gU g−1 . Then there exists a (unique) group topology on G for which F is a base of neighbourhoods of the identity. Now let F be the family of open subgroups of Wk (D), which is a base of neighbourhoods of the identity in Wk (D). By combining Lemma 4.6 together with Proposition 4.7 below, we see that the assumption of Lemma 4.3 is satisfied in G = AAutD (Td,k ), so we deduce: Proposition 4.4. There exists a group topology on AAutD (Td,k ) making the inclusion Wk (D) ֒→ AAutD (Td,k ) continuous and open. In particular AAutD (Td,k ) is a t.d.l.c. group (which is discrete if and only if Wk (D) is trivial, if and only if D is trivial). Remark 4.5. 1) It is interesting to point out that whereas the topology on Aut(Td,k ) coincides with the compact-open topology induced from Homeo(∂∞ Td,k ), this is no longer true for the group AAut(Td,k ). Indeed, the inclusion AAut(Td,k ) ֒→ Homeo(∂∞ Td,k ) is continuous but has a non-closed image. In other words, the topology on AAut(Td,k ) is strictly finer than the compact-open topology. Actually the image of AAut(Td,k ) ֒→ Homeo(∂∞ Td,k ) is even dense, because one can check that the group Vd,k is a dense subgroup of the homeomorphism group of ∂∞ Td,k with respect to the compact-open topology. 2) We also insist on the fact that for any permutation group D, the inclusion AAutD (Td,k ) ֒→ AAut(Td,k ) is always continuous, but its image is never closed unless D is the full permutation group Sym(d). Indeed, AAutD (Td,k ) contains the subgroup Vd,k which is dense in AAut(Td,k ) by Remark 4.8, and therefore AAutD (Td,k ) is never closed inside AAut(Td,k ) unless it is the whole group. 4.3. Preliminaries. In this section we establish preliminary results about the groups AAutD (Td,k ). Recall that D ≤ Sym(d) is a finite permutation group, and we define recursively a family of finite subgroups of Aut(Td ) by D1 = D and Dn+1 = D ≀ Dn for every n ≥ 1, where the permutational wreath product is associated with the natural action of Dn on the dn vertices of level n of Td . We denote by D∞ the subgroup generated by the family (Dn ) (which also coincides with the increasing union of the family (Dn )) and by W (D) the closure of D∞ in Aut(Td ). For n ∈ {1, . . . , ∞} we will also denote by Dnk the subgroup of Wk (D) fixing pointwise the first level of Td,k and acting by an element of Dn on each subtree rooted at the first level. Note that these (i) (k) (1) groups have a natural decomposition Dnk = Dn × . . . × Dn , where Dn is the subgroup of elements acting only on the ith subtree rooted at level one. If σ = (ψ, T, T ′ ) ∈ Vd,k , we let Wk (D)σ be the subgroup of Wk (D) consisting of automorphisms which are the identity on the subtree T . Note that Wk (D)σ always contains some neighbourhood of the identity, and is consequently an open subgroup of Wk (D). 12 ADRIEN LE BOUDEC Lemma 4.6. For every σ ∈ Vd,k , we have the inclusion σ Wk (D)σ σ −1 ⊂ Wk (D). In particular Wk (D) is commensurated by Vd,k . Proof. If σ = (ψ, T, T ′ ) and u ∈ Wk (D)σ , the reader will easily check that the element σuσ −1 ∈ AAutD (Td,k ) is represented by a triple (ψ ′ , T ′ , T ′ ), where ψ ′ permutes trivially the connected components of Td,k \ T ′ . Now if we consider the tree automorphism u′ ∈ Wk (D) being the identity on T ′ and acting on Td,k \ T ′ like ψ ′ , it is clear that u′ is represented by the triple (ψ ′ , T ′ , T ′ ), and therefore σuσ −1 = u′ ∈ Wk (D).  The next result yields a decomposition of the group AAutD (Td,k ) in terms of the two subgroups Wk (D) and Vd,k . It will be essential for proving Theorem 1.1 and Theorem 1.2. Proposition 4.7. For any g ∈ AAutD (Td,k ) there exists (u, v) ∈ Wk (D)×Vd,k such that g = uv. Proof. Let (ψ, T, T ′ ) be a triple representing g ∈ AAutD (Td,k ). Let us consider the element v ∈ AAutD (Td,k ) represented by the triple (ξ, T, T ′ ) where ξ is defined by declaring that each tree of the forest Td,k \ T is globally sent onto its image by ψ, but so that ξ is order-preserving on each connected component of Td,k \T . Clearly we have v ∈ Vd,k . Now the discrepancy between g and v can be filled by performing the rooted tree automorphism induced by g on each subtree rooted at a leaf of T ′ . But all of these can be achieved at the same time by an element of Wk (D), namely the automorphism being the identity on T ′ and acting as the desired rooted tree automorphism on each connected component of Td,k \ T ′ .  Remark 4.8. Actually in Proposition 4.7, Wk (D) can be replaced by the pointwise stabilizer of the nth level of Td,k in Wk (D), for every n ≥ 1, the proof being the same. It yields in particular that Vd,k is a dense subgroup of AAutD (Td,k ). Now given g ∈ AAutD (Td,k ), there is not a unique (u, v) ∈ Wk (D) × Vd,k such that g = uv because the two subgroups Wk (D) and Vd,k have a nontrivial intersection (as soon as D is non-trivial). The measure of how this decomposition fails to be unique naturally leads to the study of the intersection of these two subgroups. Lemma 4.9. The intersection between Vd,k and Wk (D) in AAutD (Td,k ) is k . D∞ k ⊂ Proof. Dnk lies inside Vd,k and Wk (D) for any n ≥ 1, so the inclusion D∞ Vd,k ∩ Wk (D) is clear. To prove the reverse inclusion, let g be an element of Vd,k ∩ Wk (D). Such an element g is an automorphism of Td,k and therefore does act on the tree fixing setwise each level, so it is enough to prove that k acting like g on T . Since g ∈ W (D), for there exists an element of D∞ d,k k every n ≥ 1 there exists gn ∈ Dnk acting like g on the first n levels of Td,k . But now since g ∈ Vd,k , it is eventually order-preserving and therefore g = gn for n large enough, which completes the proof.  COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS b d+1 b 1 ······ b b j d ψ 13 b j b ······ b b 1 d+1 d Figure 2. The diagram of δ1,j when k = 2. The end of this section is devoted to establishing Lemma 4.10, which will be applied in the proof of Lemma 5.3 in Section 5. Recall that (a1 , . . . ak ) are the ordered vertices of level one of Td,k , and (i) ai that Td,k is the full subtree of Td,k rooted at ai . Recall also that D∞ are ai the automorphisms of Td,k acting by an element of D∞ on Td,k , and acting ai . Finally recall that we denote by (ai b1 , . . . , ai bd ) the trivially outside Td,k ai ordered neighbours of ai in Td,k . In what follows, by convention indexes will be taken modulo k (for example ak+1 will denote the vertex a1 ). For every i = 1 . . . k and j = 1 . . . d, we define an element δi,j = (ψ, T, T ′ ) ∈ Vd,k by the following manner: • T is the smallest finite complete rooted subtree containing the d descendants of ai ; • T ′ is the smallest finite complete rooted subtree containing the d descendants of ai+1 ; • ψ is defined by the formulas – ψ(aℓ ) = aℓ for every ℓ ∈ / {i, i + 1}; – ψ(ai+1 ) = ai+1 bj ; – ψ(ai bℓ ) = ai+1 bℓ for every ℓ 6= j; – ψ(ai bj) = ai . For example the diagram of δ1,j is represented in Figure 2 in the case k = 2. We denote by ∆ the set of δi,j , for i = 1 . . . k, j = 1 . . . d. (i) Lemma 4.10. Let i = 1 . . . k, j = 1 . . . d, and let n ≥ 1. Assume that u ∈ D∞ ab acts trivially outside Td,ki j , and u has at most n + 1 carets. Then the element (i) −1 δi,j uδi,j belongs to D∞ and has at most n carets. ab Proof. This is a direct consequence of the fact that δi,j maps the subtree Td,ki j ab ai onto the the subtree Td,k , and is order-preserving on Td,ki j .  5. Presentation of AAutD (Td,k ) In this section we write down an explicit presentation of the group AAutD (Td,k ) for any k ≥ 1, d ≥ 2 and D ≤ Sym(d), and prove Theorem 1.1 and Theorem 1.2. Let Σ denote a finite generating set of the group Vd,k , which is supposed to contain ∆ (recall that ∆ has been defined at the end of Section 4). Enlarging 14 ADRIEN LE BOUDEC Σ if necessary, we can also assume that Σ is saturated by Lemma 3.5. This implies the following: Lemma 5.1. We have the inclusion Σ Wk (D) ⊂ Wk (D) Σ. Proof. It follows from the proof of Proposition 4.7 that any σ1 u1 ∈ Σ Wk (D) can be written u2 σ2 with u2 ∈ Wk (D) and σ2 ∈ Vd,k being of the form (ψ, u−1 (T ), T ′ ), where T is the domain tree of σ. Since Σ is saturated, σ2 belongs to Σ and therefore σ1 u1 ∈ Wk (D) Σ.  According to Proposition 4.7, the set S = Σ ∪ Wk (D) is a generating set of AAutD (Td,k ). The strategy to prove Theorem 1.1 will be to list some particular relations between the elements of S satisfied in the group AAutD (Td,k ), and then to prove that they generate all the relations in AAutD (Td,k ). (RΣ ) According to Theorem 3.3 there exists a finite set of words RΣ ≤ Σ∗ so that hΣ | RΣ i is a presentation of Vd,k . (RD ) We let RD be the set of words of the form u1 u2 u−1 3 , ui ∈ Wk (D), whenever the relation u1 u2 = u3 is satisfied in the group Wk (D). (R1 ) The set of relations R1 will correspond to commensurating relations in AAutD (Td,k ). Recall that if σ ∈ Vd,k and u ∈ Wk (D)σ then σuσ −1 ∈ Wk (D) by Lemma 4.6. We let R1 be the set of words of the form σu1 σ −1 u−1 2 , where σ ∈ Σ, u1 ∈ Wk (D)σ , u2 ∈ Wk (D), whenever the relation σu1 σ −1 = u2 holds in AAutD (Td,k ). (R2 ) We add relations corresponding to the fact that the subgroup D1k of AAutD (Td,k ) lies in the intersection of Vd,k and Wk (D). More precisely, (i) for every i ∈ {1, . . . , k} and every u ∈ D1 , we choose a word wu ∈ Σ∗ so that u = wu in AAutD (Td,k ). We denote by R2 the set of words uwu−1 , and by ri the maximum word length of the words wu when u (i) ranges over D1 . (R3 ) By Lemma 5.1, for every σ1 ∈ Σ and u1 ∈ Wk (D) we can pick some u2 ∈ Wk (D) and σ2 ∈ Σ so that σ1 u1 = u2 σ2 in AAutD (Td,k ). We denote by R3 the set of words σ1 u1 σ2−1 u−1 2 . Denote by R = RΣ ∪ RD ∪i Ri the union of all these relations. Note that elements of R have bounded length with respect to the compact generating set S = Σ ∪ Wk (D) of AAutD (Td,k ). We let G be the group defined by the presentation hS | Ri, that is we have a short exact sequence 1 → R = hhRii → FS → G → 1, where FS is the free group over the set S and hhRii is the normal subgroup generated by R. Denote by a : FS → [0, +∞] the corresponding area function, which by definition associates to w ∈ R the least integer n so that w is a product of at most n conjugates of elements of R, and a(w) = +∞ if w ∈ / R. We also define the associated cost function c : FS × FS → [0, +∞] by c(w1 , w2 ) = a(w1−1 w2 ). This function estimates the cost of converting w1 to w2 , or the cost of going from w1 to w2 , in the sense that c(w1 , w2 ) is the distance in FS between w1 and w2 with respect to the word metric associated COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 15 to the union of conjugates of R. In particular the cost function is symmetric and satisfies the triangular inequality c(w1 , w3 ) ≤ c(w1 , w2 ) + c(w2 , w3 ) for every w1 , w2 , w3 ∈ FS . This, combined with the bi-invariance of the cost function, yields the following inequality, which will be used repeatedly: for every ℓ ≥ 1 and every w1 , . . . , wℓ , w1′ , . . . , wℓ′ ∈ FS , we have: c(w1 . . . wℓ , w1′ . . . wℓ′ ) ≤ ℓ X c(wi , wi′ ). i=1 Two words w1 , w2 ∈ FS are said to be homotopic if they represent the same element of G, i.e. if c(w1 , w2 ) < +∞. We are now able to state the main theorem of this section, which implies both Theorem 1.1 and Theorem 1.2. Theorem 5.2. The natural map G → AAutD (Td,k ) is an isomorphism. Furthermore, the Dehn function of the presentation hS | Ri is asymptotically bounded by that of Vd,k . It is clear that the map from G to AAutD (Td,k ) is a well defined morphism because relations RΣ , RD , (Ri ) are satisfied in AAutD (Td,k ), and it is onto because S generates the group AAutD (Td,k ). So proving the first claim comes down to proving that this morphism is injective, i.e. any word in FS representing the identity in the group AAutD (Td,k ) already represents the trivial element in the group G. This will be achieved, as well as the proof of the upper bound on the Dehn function, in Proposition 5.6, using both geometric and combinatorial arguments. The goal of Proposition 5.4 is to prove that relations in the group AAutD (Td,k ) coming from the fact that the subgroups Wk (D) and Vd,k intersect non-trivially, are already satisfied in the group G, and to obtain a precise estimate of their cost. The following is the main technical lemma towards Proposition 5.4. Lemma 5.3. Fix i ∈ {1, . . . , k}, and let Ci = 2d + max(2, ri ) (recall that ri has been defined with the set of relators R2 ). Then for every n ≥ 0 and every (i) u ∈ D∞ having at most n carets, there exists a word w ∈ Σ∗ of length at most Ci n so that the relation u = w holds in G and has cost at most Ci n. Proof. We use induction on n. The result is trivially true for n = 0 because (i) the only element of D∞ with zero carets is the identity, and is true for n = 1 thanks to the set of relators R2 . (i) The idea of the proof of the induction step is the following. Given u ∈ D∞ (i) with at most n + 1 carets, we begin by multiplying it by an element of D1 ai in order to ensure that it acts trivially on the first level of Td,k . The resulting automorphism has a natural decomposition into a product of d elements of (i) ai bd ai b1 , with a nice con, . . . , Td,k D∞ , coming from its action on the subtrees Td,k trol on the number of carets of each element of this product. We then apply the induction hypothesis to each of these elements, after having reduced their number of carets by conjugating by an element of ∆, which has the effect of increasing by 1 the level of the subtree on which they act. 16 ADRIEN LE BOUDEC (i) Henceforth we assume that u ∈ D∞ is an element having at most n + 1 (i) carets, with n ≥ 1. If we let ū denote the element of D1 acting like u on the ai first level of Td,k , it is clear that u′ = uū−1 stabilizes pointwise the first level ai of Td,k . Using relators from R2 , we pick a word wū ∈ Σ∗ so that the relation ū = wū holds in G and has cost at most one. Now in the group AAutD (Td,k ), since u′ acts trivially on the first level of (i) ai Td,k , it has a natural decomposition u′ = u1 . . . ud , where each uℓ ∈ D∞ ai bℓ . In the rest of the proof, we implicitly acts trivially outside the subtree Td,k assume that we only consider integers ℓ ∈ {1, . . . , d} such that uℓ is non-trivial. Note that each uℓ has at most n + 1 carets and that X κ(uℓ ) ≤ κ(u) + d − 1 ≤ n + d, ℓ ai because the caret corresponding to the root of Td,k can appear d times in this sum, whereas it is counted only once in κ(u). Note also that thanks to the set of relators RD , the relation u′ = u1 . . . ud also holds in the group G and has cost at most d. Remark that by construction of the set ∆, every element of Wk (D) acting trivially on the second level of Td,k lies inside Wk (D)δ for every δ ∈ ∆ (see Subsection 4.3 for the definition of Wk (D)δ ). In particular if ℓ ∈ {1, . . . , d} and if δℓ = δi,ℓ , we have uℓ ∈ Wk (D)δℓ and thanks to R1 , the word δℓ uℓ δℓ−1 (i) represents in the group G an element u˜ℓ ∈ D∞ with at most κ(uℓ ) − 1 carets according to Lemma 4.10. Note in particular that X (1) κ(u˜ℓ ) ≤ X (κ(uℓ ) − 1) ≤ ℓ ℓ X κ(uℓ ) − d ≤ n. ℓ Now since κ(u˜ℓ ) ≤ κ(uℓ ) − 1 ≤ n for every ℓ ∈ {1, . . . , d}, we may apply the induction hypotheses to u˜ℓ , and we obtain a word w̃ℓ of length at most Ci κ(u˜ℓ ) so that u˜ℓ = w̃ℓ in G and c(u˜ℓ , w̃ℓ ) ≤ Ci κ(u˜ℓ ). If we denote by wℓ = δℓ−1 w̃ℓ δℓ , then the relation uℓ = wℓ holds in the group G and has cost c(uℓ , wℓ ) ≤ c(uℓ , δℓ−1 u˜ℓ δℓ ) + c(δℓ−1 u˜ℓ δℓ , wℓ ) ≤ 1 + Ci κ(u˜ℓ ). We now want to put all these pieces together and conclude the proof of the induction step. Consider the word w = w1 . . . wd wū ∈ Σ∗ . Its length is easily seen to satisfy |w|Σ ≤ d X |wℓ |Σ +|wū |Σ ≤ ℓ=1 d X (2+|w̃ℓ |Σ )+ri ≤ Ci ℓ=1 d X κ(u˜ℓ )+2d+ri ≤ Ci (n+1), ℓ=1 because ℓ κ(u˜ℓ ) ≤ n according to (1), and Ci ≥ 2d + ri . Furthermore, we claim that the relation u = w is satisfied in G and has cost at most Ci (n + 1). Indeed, by triangular inequality we have P c(u, w) ≤ c(u, u′ ū) + c(u′ ū, w1 . . . wd wū ) ≤ c(u, u′ ū) + c(u′ , w1 . . . wd ) + c(ū, wū ). COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 17 Now c(u, u′ ū) and c(ū, wū ) are at most 1, and by using triangular inequality again we obtain c(u, w) ≤ 2 + c(u′ , u1 . . . ud ) + c(u1 . . . ud , w1 . . . wd ) ≤2+d+ X c(uℓ , wℓ ) ≤2+d+ X (1 + Ci κ(u˜ℓ )) ≤ 2 + 2d + Ci X κ(u˜ℓ ) ≤ 2 + 2d + Ci n ≤ Ci (n + 1), so the proof of the induction step is complete.  k , Proposition 5.4. There exists a constant C > 0 such that for every u ∈ D∞ ∗ there exists a word w ∈ Σ of length at most Cκ(u) so that the relation u = w holds in G and has cost at most k + κ(u). Proof. Let C = maxi Ci , where the constant Ci is defined in Lemma 5.3. Any k can be written u = u . . . u in AAut (T ), with u ∈ D (i) and u ∈ D∞ ∞ 1 D d,k i k κ(u) = κ(u1 ) + · · · + κ(uk ). Applying Lemma 5.3 to ui , we get a word wi of length at most Ci κ(ui ) so that the relation ui = wi holds in G and has cost at most κ(ui ). Let w = w1 . . . wk . Then |w|Σ ≤ k X i=1 |wi |Σ ≤ k X Ci κ(ui ) ≤ C i=1 k X κ(ui ) = Cκ(u). i=1 Moreover the relation u = u1 . . . uk holds in G thanks to the set of relators RD . Consequently in G we have u = w at a total cost of at most c(u, u1 . . . uk ) + c(u1 . . . uk , w) ≤ k + ≤k+ k X i=1 k X c(ui , wi ) κ(ui ) = k + κ(u). i=1  The next lemma will reduce the estimate of the area function to its estimate for words of the special form Wk (D)Σ∗ . Lemma 5.5. There exists a constant c1 > 0 such that for any n and any word w ∈ S ∗ of length at most n, there exists a word w′ = uσ1 . . . σj of length at most n, where u ∈ Wk (D), σ1 , . . . , σj ∈ Σ, so that w′ is homotopic to w and c(w, w′ ) ≤ c1 n log(n). Proof. For any word w ∈ S ∗ , define τ (w) = inf c(w, w′ ) : w′ ∈ Wk (D)Σ∗ and w′ is homotopic to w , and  f (n) = sup {τ (w) : w ∈ S ∗ has length at most n} . Note that both τ and f take finite values thanks to relators from R3 and RD . We want to prove that f (n) ≤ c1 n log(n) for some constant c1 . 18 ADRIEN LE BOUDEC We use an algorithmic strategy. Given a word w, we first divide it into two subwords, then apply the algorithm to each of them and finally merge the results. More precisely, let us consider a word w of length 2n+1 , and divide it into two subwords w1 , w2 of length 2n . By definition of the function f , there exists words w1′ , w2′ ∈ Wk (D)Σ∗ such that c(w1 , w1′ ), c(w2 , w2′ ) ≤ f (2n ). Now in the word w̄ = w1′ w2′ ∈ Wk (D)Σ∗ Wk (D)Σ∗ we can move the Wk (D) part of w2′ to the left by applying at most 2n − 1 relators of R3 , and merge it with the Wk (D) part of w1′ with cost 1 thanks to the set of relators RD . We therefore get a word w′ ∈ Wk (D)Σ∗ homotopic to w and so that c(w, w′ ) ≤ 2f (2n ) + (2n − 1) + 1, which implies that τ (w) ≤ 2f (2n ) + 2n . By definition of f , we obtain f (2n+1 ) ≤ 2f (2n ) + 2n , from which we easily get the inequality f (2n ) ≤ n2n−1 . The result then follows from this inequality together with the fact that f is non-decreasing.  Proposition 5.6. There exists a constant c > 0 such that if w ∈ FS has length at most n and represents the identity in AAutD (Td,k ), then w already represents the identity in G and has area a(w) ≤ cn log(n) + δ(cn), where δ is the Dehn function of the presentation hΣ, RΣ i of Vd,k . Proof. We first apply Lemma 5.5 to the word w, and obtain a word w′ = uσ1 . . . σj of length at most n so that c(w, w′ ) ≤ c1 n log(n). Since w is trivial in AAutD (Td,k ), so is w′ , and therefore the element u−1 belongs to Wk (D)∩Vd,k = k . Moreover this element has length at most n in the group V D∞ d,k because ′ the word w has length at most n. According to Proposition 3.6, we have κ(u−1 ) ≤ CΣ n. Applying Proposition 5.4 to u−1 yields a word w′′ ∈ Σ∗ of length at most Cκ(u−1 ) ≤ CCΣ n so that the relation u−1 = w′′ holds in G and has cost at most k + CΣ n. Therefore we obtain that a(w) ≤c(w, w′ ) + c(u−1 , w′′ ) + c(w′′ , σ1 . . . σj ) ≤c1 n log(n) + (k + CΣ n) + δ (CCΣ n + n) , because w′′ and σ1 . . . σj represent the same element in Vd,k and w′′ (σ1 . . . σj )−1 has length at most CCΣ n + n, so c(w′′ , σ1 . . . σj ) is at most δ(CCΣ n + n) by definition of the Dehn function. Therefore a(w) ≤ cn log(n) + δ(cn) for some constant c depending only on Σ, and the proof is complete.  In particular we deduce from Proposition 5.6 that the Dehn function of AAutD (Td,k ) is 4 n log n + δVd,k . But now the group Vd,k is not Gromovhyperbolic since it has a Z2 subgroup, so its Dehn function is not linear and consequently at least quadratic [Bow95]. Therefore n log n 4 δVd,k , and the Dehn function of AAutD (Td,k ) is thus asymptotically bounded by δVd,k . 6. Compact presentability of Schlichting completions If Γ is a group with a commensurated subgroup Λ, the Schlichting completion process builds a t.d.l.c. group Γ//Λ and a morphism Γ → Γ//Λ, so that the image of Γ is dense and the closure of the image of Λ is compact open. It was formally introduced in [Tza03], following an idea appearing in [Sch80]. COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 19 We would like to point out that Schlichting completions are sometimes called relative profinite completions [SW13, EW13], but we choose not to use this terminology in order to avoid confusion with the notion of localised profinite completion appearing in [Rei]. Although we will not use this terminology, we also note that a group together with a commensurated subgroup is sometimes called a Hecke pair. The main theorem of this section is a general result about compact presentability of Schlichting completions: Theorem 6.1. Let Γ be a finitely presented group and let Λ be a finitely generated commensurated subgroup. Then the t.d.l.c. group Γ//Λ is compactly presented. Before going into the proof, let us mention the following result which can derived from Theorem 6.1. As mentioned above, the notion of Schlichting completion is different but closely related to the notion of profinite completion of a group localised at a subgroup [Rei]. More precisely, it is proved in [Rei, Corollary 3, (vii)] that the Schlichting completion Γ//Λ is the quotient of the profinite completion of Γ localised at Λ by a compact normal subgroup. Now since a locally compact group is compactly presented if and only if one of its quotients by a compact normal subgroup is, we obtain: Corollary 6.2. If Γ is a finitely presented group with a finitely generated commensurated subgroup Λ, then the profinite completion of Γ localised at Λ is compactly presented. 6.1. From commensurated subgroups to t.d.l.c. groups. We start by recalling the definition of the process of Schlichting completion. Let Γ be a group and let Λ be a subgroup of Γ. The left action of Γ on the coset space Γ/Λ yields a homomorphism Γ → Sym(Γ/Λ), whose kernel is the normal core of Λ, i.e. the largest normal subgroup of Γ contained in Λ (or equivalently, the intersection of all conjugates of Λ). The Schlichting completion of Γ with respect to Λ, denoted Γ//Λ, is by definition the closure of the image of Γ in Sym(Γ/Λ), the latter group being equipped with the topology of pointwise convergence. Recall that Λ is said to be commensurated by a subset K of Γ if for every k ∈ K, the subgroup kΛk−1 ∩ Λ has finite index in both Λ and kΛk−1 . We say that Λ is a commensurated subgroup if it is commensurated by the entire group Γ. It can be checked that if this holds, then the closure of the image of Λ in Γ//Λ is a compact open subgroup. In particular Γ//Λ is a t.d.l.c. group. Note that by construction the image of Γ in Γ//Λ is a dense subgroup. From now Λ will be a commensurated subgroup of a group Γ. We point out that although the map Γ → Γ//Λ is generally not injective, for the sake of simplicity we still use the notation Λ and Γ for their images in the group Γ//Λ. The next two lemmas are straightforward, we provide proofs for completeness. Lemma 6.3. We have Γ//Λ = Λ · Γ. 20 ADRIEN LE BOUDEC Proof. Since Λ is an open subgroup of Γ//Λ, Λg is an open neighbourhood of g for any g ∈ Γ//Λ. Therefore the dense subgroup Γ intersects Λg, meaning  that there exist γ ∈ Γ and λ ∈ Λ so that λg = γ, i.e. g = λ−1 γ. Lemma 6.4. The subgroups Λ and Γ intersect along Λ. Proof. The subgroup Λ stabilizes the coset Λ in Sym(Γ/Λ), so every element of Λ must stabilizes this coset as well by definition of the topology. Therefore Λ ∩ Γ ⊂ Λ. The reverse inclusion is clear.  The following result is a useful tool to identify some t.d.l.c. group G with the Schlichting completion of one of its dense subgroups. It is due to Shalom and Willis [SW13, Lemmas 3.5-3.6]. Proposition 6.5. Let G be a topological group with a compact open subgroup U . If Γ is a dense subgroup of G, then Γ ∩ U is commensurated in Γ and the embedding of Γ in G induces an isomorphism of topological groups ϕ : Γ//(Γ ∩ U ) → G/KU , where KU is the normal core of U . In particular if U contains no non-trivial normal subgroup of G, then ϕ is an isomorphism between Γ//(Γ ∩ U ) and G. Example 6.6. Elder and Willis [EW13] considered the Schlichting completion Gm,n of the Baumslag-Solitar group BS(m, n) = t, x | txm t−1 = xn with respect to the commensurated subgroup hxi. Theorem 6.1 can be applied and yields that Gm,n is compactly presented. However in this case this can be seen more directly because Gm,n coincides with the closure of BS(m, n) in the automorphism group of its Bass-Serre tree, and therefore Gm,n acts on a locally finite tree with compact vertex stabilizers. It follows that Gm,n is Gromov-hyperbolic, and consequently automatically compactly presented. The next example shows that the almost automorphism group AAutD (Td,k ) is a Schlichting completion of the Higman-Thompson group Vd,k . In particular Neretin’s group is the Schlichting completion of Vd,2 with respect to an infinite locally finite subgroup, a point of view which does not seem to appear in the literature. This will be generalized in Theorem 7.10. Example 6.7. We use the notation introduced at the beginning of Section 4.3. Let us consider the t.d.l.c. group AAutD (Td,k ) and its compact open subgroup Wk (D), which is easily seen not to contain any non-trivial normal subgroup of AAutD (Td,k ). The Higman-Thompson group Vd,k is a dense subgroup ink by Lemma 4.9. So it follows from Proposition tersecting Wk (D) along D∞ 6.5 that the group AAutD (Td,k ) is isomorphic to the Schlichting completion k . Vd,k //D∞ However, note that compact presentability of AAutD (Td,k ) cannot be obk is not finitely generated. tained by applying Theorem 6.1 because D∞ 6.2. Presentation of Γ//Λ. We will now prove the main result of this section, namely Theorem 6.1, which will follow from Proposition 6.9. From now Γ is a finitely presented group and Λ a finitely generated commensurated subgroup. Recall that by abuse of notation, we still denote by Γ and Λ their images in the group Γ//Λ. We let S = {s1 , . . . , sn , . . . , sm } COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 21 be a finite generating set of Γ such that the elements s1 , . . . , sn generate Λ. It follows from Lemma 6.3 that S ∪ Λ is a compact generating set of Γ//Λ. To prove that the group Γ//Λ is compactly presented, we will consider a set R = R1 ∪ R2 ∪ R3 ∪ R4 of relations of bounded length in Γ//Λ, and prove that it is a set of defining relations, i.e. that relations of R generate all the relations in Γ//Λ. We let R1 be a set of words so that hS | R1 i is a finite presentation of Γ. Let us also consider relations corresponding to the inclusion Λ ≤ Λ in the group Γ//Λ. That is, for every i ∈ {1, . . . , n}, we let s¯i ∈ Λ be such that si = s¯i in Γ//Λ, and denote by R2 the set of words si s¯i −1 . We denote by R3 the set of relations of theDform u1 u2 = u3 , uiE∈ Λ. Now let us define the abstract group G1 = S ∪ Λ | R1 , R2 , R3 . Note that by construction there is a homomorphism G1 → Γ//Λ. Proposition 6.8. Let w be a word in the elements of S and u ∈ Λ. If the word u−1 w represents the identity in Γ//Λ, then it already represents the identity in G1 . Proof. The fact that u−1 w represents the identity in Γ//Λ means that the element represented by w lies in Γ ∩ Λ, which is reduced to Λ according to Lemma 6.4. Therefore there exists a word wΛ in the letters s1 , . . . , sn , so that w = wΛ in Γ//Λ. But thanks to R1 , the relation w = wΛ is also satisfied in G1 . Now for each letter of wΛ we can apply a relation from R2 to obtain a word wΛ in the letters s¯1 , . . . , s¯n , so that w = wΛ in G1 . Consequently the relation wΛ = u holds in Γ//Λ, and thanks to R3 this relation also holds in G1 , meaning that w = u in G1 .  We finally consider a last family of relations in Γ//Λ. According to Lemma 6.3, for every i ∈ {1, . . . , m} and u ∈ Λ, we can pick some u′ ∈ Λ and some word w ∈ S ∗ so that si u = u′ w in Γ//Λ. We denote by R4 the set of corresponding relations. E D Now let us define the abstract group G2 = S ∪ Λ | R1 , R2 , R3 , R4 . Note that the group G2 is a quotient of G1 . Proposition 6.9. The natural homomorphism G2 → Γ//Λ is an isomorphism. Proof. It is clear that this morphism is onto because S ∪ Λ is a generating set of Γ//Λ. So we only have to prove that it is injective. For this, let us consider a word w in the elements of S ∪ Λ representing the identity in Γ//Λ. We want to prove that w represents the identity in G2 . Applying successively relators from R4 , we can move each occurrence of an element of Λ in w to the left, and obtain a word w′ of the form w′ = u1 · · · uk si1 · · · siℓ , with ui ∈ Λ, sj ∈ S, so that w = w′ in G2 . Now thanks to R3 , the word w′ can be transformed into a word w′′ of the form w′′ = usi1 · · · siℓ , u ∈ Λ. But now since w represents the identity in Γ//Λ, the same holds for w′′ . Therefore by Proposition 6.8, the word w′′ represents the identity in G1 , and a fortiori it also represents the identity in G2 , the latter being a quotient of G1 . It follows that the word w represents the identity in G2 , and the proof is complete.  22 ADRIEN LE BOUDEC Remark 6.10. Here we do not try to get an estimate on the Dehn function of Γ//Λ, because a careful reading of the proof reveals that the best we could hope in this level of generality is to obtain that the Dehn function of Γ//Λ is bounded by the Dehn function of Γ. However this would be far from being sharp, as for example the Baumslag-Solitar group BS(1, n) has an exponential Dehn function for n ≥ 2 (see for instance [GH01]), whereas its Schlichting completion Qn ⋊n Z is Gromov-hyperbolic, and therefore has a linear Dehn function. 7. Almost automorphism groups associated with regular branch groups Almost automorphisms of Td are homeomorphisms of the boundary ∂∞ Td which locally coincide with a tree automorphism. It seems natural to extend this definition by considering a subgroup G ≤ Aut(Td ), and homeomorphisms of ∂∞ Td which locally coincide with an element of G. In other words, we want to define homeomorphisms of ∂∞ Td which are piecewise in G. It turns out that the notion naturally appearing for G is self-similarity, whose definition is recalled below. Note that we restrict ourselves to the case k = d for simplicity, but the results could naturally be extended to almost automorphism subgroups of AAut(Td,k ). 7.1. Preliminary material. This section is devoted to reviewing basic definitions and facts about self-similar and branch groups, and establishing some preliminary results. We refer the reader to [Nek05, BGŠ03] for more on selfsimilar and branch groups. Recall that vertices of Td are labeled by words over a finite alphabet X of cardinality d, and we freely identify a vertex with the word associated to it. If G is a subgroup of the automorphism group Aut(Td ) and if n ≥ 0, we will denote by Gn the nth level stabilizer of G, that is the subgroup of G fixing pointwise the nth level of Td . Note that Gn is always a finite index subgroup of G, but the converse is far from true because there may exist some finite index subgroup of G not containing any level stabilizer. This motivates the following definition. Definition 7.1. A finite index subgroup of G is a congruence subgroup if it contains some level stabilizer. If g ∈ Aut(Td ) is an automorphism and v ∈ X ∗ is a vertex of Td , the section of g at v is the unique automorphism gv of Td defined by the formula g(vw) = g(v)gv (w) for every w ∈ X ∗ . Definition 7.2. A subgroup G ≤ Aut(Td ) is self-similar if every section of every element of G is an element of G. Self-similar groups appear naturally when studying holomorphic dynamics and fractal geometry. The study of self-similar groups is also motivated by the COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 23 fact that this class contains examples of groups exhibiting some exotic behavior. Among self-similar groups is a class of groups which is better understood, namely contracting self-similar groups. Definition 7.3. A self-similar group G is said to be contracting if there exists a finite subset N ≤ G such that for every g ∈ G, there exists k ≥ 1 so that all the sections of g of level at least k belong to N . Here we are interested in a particular class of self-similar groups, namely regular branch groups, whose definition is recalled below. Definition 7.4. Let G ≤ Aut(Td ) be a self-similar group. By definition, G comes equipped with an injective homomorphism ψ : G → G ≀ Sym(d) (sometimes called the wreath recursion). We say that G is regular branch over its finite index subgroup K if ψ(K) contains K × . . . × K as a subgroup of finite index. Remark 7.5. We note that being regular branch is stable by taking the topological closure in Aut(Td ). More precisely, if G is regular branch over K then the closure of G is regular branch over the closure of K. Note also that if K contains some level stabilizer of G then its closure contains the stabilizer of the same level in the closure of G, so being regular branch over a congruence subgroup is also stable by taking the topological closure. The most popular example of a self-similar group is the Grigorchuk group of intermediate growth introduced in [Gri80]. It is a regular branch group, branching over a subgroup containing its stabilizer of level 3. Other examples are the Gupta-Sidki group as well as the Fabrykowski-Gupta group, which are regular branch over their commutator subgroup, the latter containing their level 2 stabilizer. For the definitions and properties of these groups we refer the reader to Sections 6 and 8 of [BG02]. In view of Theorem 1.4, we note that all these examples are contracting. In the following standard lemma, a proof of which can be consulted in [Šun07, Lemma 10], the isomorphism is obtained via the wreath recursion, which is usually omitted. Lemma 7.6. Let H ≤ Aut(Td ) be a regular branch group, branching over a subgroup containing the level stabilizer Hs . Then for every n ≥ s, the level stabilizer Hn+1 is isomorphic to Hn × . . . × Hn . If H is a subgroup of the automorphism group Aut(Td ), it is in general very hard to describe its topological closure in Aut(Td ). In the case of the Grigorchuk group, the closure has been described by Grigorchuk in [Gri05]. We will use a generalization of this result due to Sunic, which is the following: Proposition 7.7. Let H ≤ Aut(Td ) be a regular branch group, branching over a subgroup containing the level stabilizer Hs , and let G be the topological closure of H in Aut(Td ). Then an element γ ∈ Aut(Td ) belongs to G if and only if for every section γv of γ, there exists an element of H ≤ Aut(Td ) acting like γv up to and including level s + 1. Proof. The statement is a reformulation of the implication (ii) ⇒ (i) of Theorem 3 of [Šun07]. Note that the author requires level transitivity in the 24 ADRIEN LE BOUDEC definition of a regular branch group, but the proof given there does not use this assumption.  This description of the closure of a regular branch group allows us to deduce the following result, which does not seem to appear in the literature, and which may be of independent interest. Proposition 7.8. Let H ≤ Aut(Td ) be a regular branch group, branching over a congruence subgroup, and let G be the topological closure of H in Aut(Td ). Then the intersection in Aut(Td ) between G and H ≀ Sym(d) is equal to H. Proof. The inclusion H ⊂ G ∩ (H ≀ Sym(d)) is clear because H ⊂ G is always true and H ⊂ H ≀ Sym(d) is satisfied by self-similarity. To prove that equality holds, we prove that H and G ∩ (H ≀ Sym(d)) have the same index in the group H ≀ Sym(d). Assume that H is branching over a subgroup containing Hs . By multiplicativity of the index, we have [H ≀ Sym(d) : Hs+1 ] = [H ≀ Sym(d) : H] × [H : Hs+1 ] , that is [H ≀ Sym(d) : Hs+1 ] . [H : Hs+1 ] Now the number of possibilities for the action of an element of H ≀ Sym(d) on the first level is |Sym(d)| = d!. Moreover the first level stabilizer of H ≀ Sym(d) is H × . . . × H, so [H ≀ Sym(d) : H] = (2) [H ≀ Sym(d) : Hs+1 ] = d! [H × . . . × H : Hs+1 ] . Furthermore we can apply Lemma 7.6 to obtain that Hs+1 is equal to Hs × . . . × Hs , which yields [H × . . . × H : Hs+1 ] = [H × . . . × H : Hs × . . . × Hs ] = [H : Hs ]d . Going back to (2), we obtain [H ≀ Sym(d) : H] = d! [H : Hs ]d . [H : Hs+1 ] Let us now compute the index of G ∩ (H ≀ Sym(d)) in H ≀ Sym(d). According to Proposition 7.7, an element γ ∈ Aut(Td ) belongs to G if and only if for every section γv of γ, there exists an element of H acting like γv up to level s + 1. Since elements of H ≀ Sym(d) have all their sections of level at least 1 in H, it follows that an element γ ∈ H ≀ Sym(d) belongs to G if and only if there exists an element of H acting like γ up to level s + 1. It follows that the index of G ∩ (H ≀ Sym(d)) in H ≀ Sym(d) is the number of possibilities for the action on level s + 1 for H ≀ Sym(d), divided by the number of possibilities for the action on level s + 1 for H. The latter being [H : Hs+1 ] and the former being d! [H : Hs ]d , we have d! [H : Hs ]d . [H ≀ Sym(d) : G ∩ (H ≀ Sym(d))] = [H : Hs+1 ]  COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 25 7.2. Definition of the groups. Let G ≤ Aut(Td ) be a self-similar group. We will say that an almost automorphism of Td is piecewise of type G if it can be represented by a triple (ψ, T, T ′ ) such that T, T ′ are finite rooted complete subtrees of Td and ψ : Td \ T → Td \ T ′ belongs to G on each connected component, after the natural identification of each connected component of Td \ T and Td \ T ′ with Td . We observe that by self-similarity, if a triple (ψ1 , T1 , T1′ ) is such that ψ1 : Td \ T1 → Td \ T1′ belongs to G on each connected component, then for any equivalent triple (ψ2 , T2 , T2′ ) such that T2 (resp. T2′ ) contains T1 (resp. T1′ ), then ψ2 : Td \ T2 → Td \ T2′ belongs to G on each connected component. It follows from this observation that the set of almost automorphisms which are piecewise of type G is a subgroup of AAut(Td ), which will be denoted by AAutG (Td ). Note that AAutG (Td ) obviously contains the group G. It is worth pointing out that the definition of the group requires neither topological (e.g. closed) nor finiteness (e.g. finitely generated) assumption on G. Following [Nek], we let L(G) ≤ Aut(Td ) be the embedded copy of G acting on the subtree hanging below the first vertex of level 1, and being the identity elsewhere. Since the Higman-Thompson group Vd acts transitively on the set of proper balls of ∂∞ Td , it is not hard to see that the group AAutG (Td ) is generated by Vd together with L(G). See Lemma 5.12 in [Nek] for details. In particular if G is a finitely generated self-similar group, then AAutG (Td ) is finitely generated as well. The first example of such a group was considered by Röver when G is the first Grigorchuk group. He proved that AAutG (Td ) is finitely presented and simple [Röv99]. Then Nekrashevych [Nek04] introduced the group AAutG (Td ) for an arbitrary self-similar group G and generalized both simplicity and finiteness results (see Theorem 4.7 in [Nek] and Theorem 7.15 cited below). Remark 7.9. It is worth noting that AAutG (Td ) is always a dense subgroup of AAut(Td ), since it contains the subgroup Vd which is already dense. In particular if N is a non-trivial normal subgroup of AAutG (Td ), then the closure of N in AAut(Td ) is normalized by the closure of AAutG (Td ), which is AAut(Td ). By simplicity of the latter, the closure of N has to be equal to AAut(Td ). This proves that any non-trivial normal subgroup of AAutG (Td ) is dense in AAut(Td ). In particular G can not contain any non-trivial normal subgroup of AAutG (Td ). 7.3. Almost automorphism groups arising as Schlichting completions. The main result of this section is the following. Theorem 7.10. Let H ≤ Aut(Td ) be a regular branch group, branching over a congruence subgroup, and let G be the topological closure of H in Aut(Td ). Then the inclusion of AAutH (Td ) in AAutG (Td ) induces an isomorphism of topological groups between AAutH (Td )//H and AAutG (Td ). For example this brings a new perspective to the topologically simple group constructed in [BEW11]: this is the Schlichting completion of Röver’s group [Röv99] with respect to the Grigorchuk group. 26 ADRIEN LE BOUDEC Theorem 7.10 will be proved at the end of this section. We begin by showing how to endow the group AAutG (Td ) with a natural topology when G is a closed regular branch group. We will need the following: Proposition 7.11. Any regular branch group G ≤ Aut(Td ) is commensurated in AAutG (Td ). Proof. Since AAutG (Td ) is generated by Vd and L(G), it is enough to prove that these two subgroups commensurate G. Let us first prove that Vd commensurates G. Henceforth we assume that K is a subgroup of G over which G is branching. For every finite rooted complete subtree T of Td , we denote by KT the subgroup of Aut(Td ) fixing pointwise T and acting by an element of K on each subtree hanging below a leaf of T . Since G is regular branch over K, KT is a finite index subgroup of G for every finite rooted complete subtree T . Now if σ ∈ Vd and if T, T ′ are respectively the domain and range tree of the canonical representative triple of σ, we easily check that σKT σ −1 = KT ′ . So conjugation by σ sends a finite index subgroup of G to another finite index subgroup of G, which exactly means that σ commensurates G. Now let us prove that L(G) commensurates G. It is classic that since K is a finite index subgroup of G, there exists a finite index subgroup N of K that is normal in G. Therefore ψ(G) contains N × . . . × N as a finite index subgroup, and the latter is normalized by L(G) because N is normal in G. This proves an even stronger result than commensuration, namely the existence of a finite index subgroup of G which is normalized by L(G).  Now assume that G ≤ Aut(Td ) is a closed regular branch group. Examples of such groups include the topological closure of any of the finitely generated regular branch groups mentioned earlier. In this context, the group G comes equipped with a profinite topology, inherited from the profinite topology of Aut(Td ). The fact that G is commensurated in AAutG (Td ) together with Lemma 4.3 allows us to extend the topology of G to the larger group AAutG (Td ): Proposition 7.12. Assume that G ≤ Aut(Td ) is a closed regular branch group. Then there exists a (unique) group topology on AAutG (Td ) turning G into a compact open subgroup. In particular AAutG (Td ) is a t.d.l.c. compactly generated group. We now prove some preliminary results which will be used in the proof of Theorem 7.10. Until the end of this section, H ≤ Aut(Td ) is a regular branch group, branching over a congruence subgroup, and G is the topological closure of H in Aut(Td ). Proposition 7.13. AAutH (Td ) is a dense subgroup of AAutG (Td ). Proof. We let L be a congruence subgroup of G over which G is branching, and we denote by K the closure of L in Aut(Td ). For every finite rooted complete subtree T of Td , we still denote by KT the subgroup of Aut(Td ) fixing pointwise COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS 27 T and acting by an element of K on each subtree hanging below a leaf of T . Note that since L contains some level stabilizer of H, the subgroup K contains some level stabilizer of G and is therefore an open subgroup of G. It follows that (KT ) forms a basis of neighbourhoods of the identity in G, when T ranges over all finite rooted complete subtrees. By definition of the topology, it is also a basis of neighbourhoods of the identity in AAutG (Td ). Let g be an element of G. By definition there exists a sequence (hn ) of elements of H converging to g. Since L has finite index in H, we may assume that all the elements hn lie in the same left coset of L, that is, that there exists h ∈ H such that hn ∈ hL for every n. From this we deduce that g ∈ hK. Now let γ be an element of AAutG (Td ). We will prove that AAutH (Td ) intersects every neighbourhood of γ. Let (ψ, T, T ′ ) be a triple representing γ such that ψ : Td \ T → Td \ T ′ belongs to G on each connected component of Td \ T . This means that for every leaf v of T , there exists an element gv ∈ G so that ψ sends the subtree hanging below the leaf v to a subtree hanging below a leaf of T ′ via the element gv . According to the above remark, there exists some element hv ∈ H such that h−1 v gv ∈ K. Now let us consider the almost automorphism γ̂ represented by the triple (ψ̂, T, T ′ ), where ψ̂ induces the same bijection between the leaves of T and the leaves of T ′ , but does not act on the subtree hanging below the leaf v by gv but by the element hv . By construction, we have γ̂ ∈ AAutH (Td ) and γ̂ −1 γ ∈ KT . Since on the one hand we can choose T to be as large as we want, and on the other hand (KT ) is a basis of neighbourhoods of the identity, we obtain that AAutH (Td ) intersects every neighbourhood of γ.  Proposition 7.14. The intersection in AAutG (Td ) between G and AAutH (Td ) is equal to H. Proof. The inclusion H ⊂ G ∩ AAutH (Td ) being clear, we only have to prove the reverse inclusion. First note that the intersection between Aut(Td ) and AAutH (Td ) is the increasing union for n ≥ 0 of the subgroups H ≀ Autn , where Autn is the subgroup of Aut(Td ) consisting of elements whose sections of level n are trivial; and the permutational wreath product is associated to the action of Autn on the vertices of level n. In particular G ∩ AAutH (Td ) = [ G ∩ (H ≀ Autn ). n≥0 Let us prove by induction on n ≥ 0 that G ∩ (H ≀ Autn ) is reduced to H. This is true for n = 0 by definition, and true for n = 1 according to Proposition 7.8. Assume that this is true for some n ≥ 1, and let γ ∈ G ∩ (H ≀ Autn+1 ). Then every section of level 1 of γ lies in H ∩ (H ≀ Autn ), which is reduced to H by induction hypotheses. Therefore γ ∈ G ∩ (H ≀ Sym(d)), which is also equal to H by Proposition 7.8. So we have proved the induction step, namely G ∩ (H ≀ Autn+1 ) = G, and consequently G ∩ AAutH (Td ) = H.  We are now ready to prove the main result of this section. Proof of Theorem 7.10. The group AAutG (Td ) admits AAutH (Td ) as a dense subgroup by Proposition 7.13, and the latter intersects the compact open subgroup G along H according to Proposition 7.14. Moreover Remark 7.9 28 ADRIEN LE BOUDEC prevents G from containing any non-trivial normal subgroup of AAutG (Td ), so the conclusion follows from Proposition 6.5.  7.4. Proof of Theorem 1.4. We conclude by proving Theorem 1.4. The only missing argument is a recent result of Nekrashevych, generalizing the previous example of Röver [Röv99]. Theorem 7.15 ([Nek], Theorem 5.9). If H ≤ Aut(Td ) is a finitely generated, contracting self-similar group, then AAutH (Td ) is finitely presented. Proof of Theorem 1.4. Let H be a finitely generated, contracting regular branch group, branching over a congruence subgroup, having G for topological closure in Aut(Td ). Then by Theorem 7.10 AAutG (Td ) is isomorphic to the Schlichting completion AAutH (Td )//H. Now according to Theorem 7.15 the group AAutH (Td ) is finitely presented, and H is finitely generated by assumption, so the conclusion follows from Theorem 6.1.  We make a brief comment on the fact that any group G appearing in Theorem 1.4 can be explicitly described in terms of the group of which it is the topological closure. Indeed, if H is a finitely generated, contracting regular branch group, branching over a subgroup containing Hs , having G for topological closure in Aut(Td ); then Proposition 7.7 yields that elements of G are exactly the automorphisms having all their sections acting like an element of H up to level s + 1. One can rephrase this in terms of patterns and finitely constrained groups (see [Šun07]), by saying that G is the finitely constrained group defined by allowing all the patterns of size s + 1 appearing in H. References [BCGM12] U. Bader, P.E. Caprace, T. Gelander, and S. Mozes, Simple groups without lattices, Bull. Lond. Math. Soc. 44 (2012), no. 1, 55–67. [BCS01] J. Burillo, S. Cleary, and M. Stein, Metrics and embeddings of generalizations of Thompson’s group F , Trans. Amer. Math. Soc. 353 (2001), no. 4, 1677–1689. [BCST09] J. Burillo, S. Cleary, M. Stein, and J. Taback, Combinatorial and metric properties of Thompson’s group T , Trans. Amer. Math. Soc. 361 (2009), no. 2, 631–652. [BEW11] Y. Barnea, M.l Ershov, and T. Weigel, Abstract commensurators of profinite groups, Trans. Amer. Math. Soc. 363 (2011), no. 10, 5381–5417. [BG02] L. Bartholdi and R. Grigorchuk, On parabolic subgroups and Hecke algebras of some fractal groups, Serdica Math. J. 28 (2002), no. 1, 47–90. [BGŠ03] L. Bartholdi, R. Grigorchuk, and Z. Šuniḱ, Branch groups, Handbook of algebra, Vol. 3, North-Holland, Amsterdam, 2003, pp. 989–1112. [Bir04] J.C. Birget, The groups of Richard Thompson and complexity, Internat. J. Algebra Comput. 14 (2004), no. 5-6, 569–626, International Conference on Semigroups and Groups in honor of the 65th birthday of Prof. John Rhodes. [Bou71] N. Bourbaki, Éléments de mathématique. Topologie générale. Chapitres 1 à 4, Hermann, Paris, 1971. [Bow95] B. Bowditch, A short proof that a subquadratic isoperimetric inequality implies a linear one, Michigan Math. J. 42 (1995), no. 1, 103–107. [Bro87] K. Brown, Finiteness properties of groups, Proceedings of the Northwestern conference on cohomology of groups (Evanston, Ill., 1985), vol. 44, 1987, pp. 45–75. [Bur99] J. Burillo, Quasi-isometrically embedded subgroups of Thompson’s group F , J. Algebra 212 (1999), no. 1, 65–78. COMPACT PRESENTABILITY OF TREE ALMOST AUTOMORPHISM GROUPS [CFP96] [CH15] [CM11] [EW13] [GH01] [Gri80] [Gri05] [Gub00] [Gub06] [Her71] [Hig74] [Kap99] [Nek] [Nek04] [Nek05] [Ner92] [Rei] [Röv99] [Röv02] [Sch80] [Šun07] [SW13] [Tza03] 29 J. W. Cannon, W. J. Floyd, and W. R. Parry, Introductory notes on Richard Thompson’s groups, Enseign. Math. (2) 42 (1996), no. 3-4, 215–256. Y. Cornulier and P. de la Harpe, Metric geometry of locally compact groups, Book in preparation, arXiv:1403.3796v3, 2015. P.E. Caprace and T. de Medts, Simple locally compact groups acting on trees and their germs of automorphisms, Transform. Groups 16 (2011), no. 2, 375–411. M. Elder and G. Willis, Totally disconnected groups from Baumslag-Solitar groups, arXiv:1301.4775v3 (2013). J. Groves and S. Hermiller, Isoperimetric inequalities for soluble groups, Geom. Dedicata 88 (2001), no. 1-3, 239–254. R. Grigorchuk, On Burnside’s problem on periodic groups, Funktsional. Anal. i Prilozhen. 14 (1980), no. 1, 53–54. , Solved and unsolved problems around one group, Infinite groups: geometric, combinatorial and dynamical aspects, Progr. Math., vol. 248, Birkhäuser, Basel, 2005, pp. 117–218. V. S. Guba, Polynomial isoperimetric inequalities for Richard Thompson’s groups F , T , and V , Algorithmic problems in groups and semigroups (Lincoln, NE, 1998), Trends Math., Birkhäuser Boston, Boston, MA, 2000, pp. 91–120. , The Dehn function of Richard Thompson’s group F is quadratic, Invent. Math. 163 (2006), no. 2, 313–342. M. Herman, Simplicité du groupe des difféomorphismes de classe C ∞ , isotopes à l’identité, du tore de dimension n, C. R. Acad. Sci. Paris Sér. A-B 273 (1971), A232–A234. G. Higman, Finitely presented infinite simple groups, Department of Pure Mathematics, Department of Mathematics, I.A.S. Australian National University, Canberra, 1974, Notes on Pure Mathematics, No. 8 (1974). C. Kapoudjian, Simplicity of Neretin’s group of spheromorphisms, Ann. Inst. Fourier (Grenoble) 49 (1999), no. 4, 1225–1240. V. Nekrashevych, Finitely presented groups associated with expanding maps, arXiv:1312.5654v1. , Cuntz-Pimsner algebras of group actions, J. Operator Theory 52 (2004), no. 2, 223–249. , Self-similar groups, Mathematical Surveys and Monographs, vol. 117, American Mathematical Society, Providence, RI, 2005. Yu. A. Neretin, Combinatorial analogues of the group of diffeomorphisms of the circle, Izv. Ross. Akad. Nauk Ser. Mat. 56 (1992), no. 5, 1072–1085. C. Reid, The profinite completion of a group localised at a subgroup, arXiv:1208.3554v2. C. Röver, Constructing finitely presented simple groups that contain Grigorchuk groups, J. Algebra 220 (1999), no. 1, 284–313. , Abstract commensurators of groups acting on rooted trees, Proceedings of the Conference on Geometric and Combinatorial Group Theory, Part I (Haifa, 2000), vol. 94, 2002, pp. 45–61. G. Schlichting, Operationen mit periodischen Stabilisatoren, Arch. Math. (Basel) 34 (1980), no. 2, 97–99. Z. Šunić, Hausdorff dimension in a family of self-similar groups, Geom. Dedicata 124 (2007), 213–236. Y. Shalom and G. Willis, Commensurated subgroups of arithmetic groups, totally disconnected groups and adelic rigidity, Geom. Funct. Anal. 23 (2013), no. 5, 1631–1683. K. Tzanev, Hecke C ∗ -algebras and amenability, J. Operator Theory 50 (2003), no. 1, 169–178. Laboratoire de Mathématiques, bâtiment 425, Université Paris-Sud 11, 91405 Orsay, France E-mail address: [email protected]
4math.GR
A Discontinuity Adjustment arXiv:1702.01081v1 [math.ST] 3 Feb 2017 for Subdistribution Function Confidence Bands Applied to Right-Censored Competing Risks Data Dennis Dobler Ulm University, Institute of Statistics, Helmholtzstr. 20, 89081 Ulm, Germany email: [email protected] February 6, 2017 Summary The wild bootstrap is the resampling method of choice in survival analytic applications. Theoretic justifications rely on the assumption of existing intensity functions which is equivalent to an exclusion of ties among the event times. However, such ties are omnipresent in practical studies. It turns out that the wild bootstrap should only be applied in a modified manner that corrects for altered limit variances and emerging dependencies. This again ensures the asymptotic exactness of inferential procedures. An analogous necessity is the use of the Greenwood-type variance estimator for Nelson-Aalen estimators which is particularly preferred in tied data regimes. All theoretic arguments are transferred to bootstrapping Aalen-Johansen estimators for cumulative incidence functions in competing risks. An extensive simulation study as well as an application to real competing risks data of male intensive care unit patients suffering from pneumonia illustrate the practicability of the proposed technique. Keywords: Aalen-Johansen estimator; Counting process; Discontinuous cumulative hazard functions; Discontinuous cumulative incidence functions; Greenwood-type variance estimator; NelsonAalen estimator; Survival analysis; Tied event times; Wild bootstrap. 1 Introduction In survival analysis, the wild bootstrap is a frequently utilized resampling technique; cf. Lin (1997), Martinussen and Scheike (2006), Beyersmann et al. (2013). Typically, large sample properties are verified by relying on the assumption of existing transition intensities. In the context of a survival time T this implies the existence of a function αptq “ lim ∆tÓ0 1 P pT P rt, t ` ∆ts | T ě tq ∆t or, similarly, the existence of a Lebesgue density of the distribution P T . Without any doubt, this assumption is too strict in practical applications where events are usually recorded on a discrete time lattice, e.g. on a daily basis. For estimating unknown limit variances of Nelson-Aalen estimators it is well-known (e.g. Andersen et al. 1993) that Greenwood-type estimators should be utilized in the presence of ties. Allignol et al. (2010) even found a general preference (also under left-truncation) for this kind of estimator. From now on, we assume that there are discrete components in the event time distribution and that the event, if observed, can be classified to one out of k different causes, i.e. competing risks. Suppose that n P N i.i.d. individuals participate in our study, but that their observability may be independently right-censored by i.i.d. censoring variables. Based on these observations, all available collected information is contained in the counting and at risk processes, Nji ptq “ 1t“ individual i is observed to fail in r0, ts due to risk j” u and Yi ptq “ 1t“ individual i is under observation at time t ´ ” u respectively, with j “ 1, . . . , k and i “ 1, . . . , n. This notation may be used to extend the arguments below to also incorporate independent left-truncation in the sense of Andersen et al. (1993), Chapter III. Define H1uc ptq “ EpN11 ptqq and H̄ptq “ EpY1 ptqq. Now, the sum N1 ptq “ řn i“1 N1i ptq has the compensator Λ1 ptq “ n ÿ i“1 żt Λ1i ptq “ Y puqdA1 puq “ 0 n żt ÿ Yi puqdA1 puq, i“1 0 şt where A1 ptq “ 0 H̄puq´1 dH1uc puq is the cumulative hazard function for a type 1 event. Therefore, pM1 ptq “ N1 ptq ´ Λ1 ptqqt is a square-integrable martingale. The Nelson-Aalen estimator for A1 ptq ş p1 ptq “ t Y ´1 dN1 , where we let 0{0 “ 0. The limit is defined as the counting process integral A 0 ? p1 ´A1 q is determined by the predictable covariance function of the normalized process W1 “ npA and optional variation processes of the square-integrable martingales M1i : t ÞÑ N1i ptq ´ Λ1i ptq. 1 In the possibly discontinuous case, these are given by żt ∆Λ1i puqdΛ1i puq żt żt rM1i sptq “ N1i ptq ´ 2 ∆Λ1i puqdN1i puq ` ∆Λ1i puqdΛ1i puq, xM1i yptq “ Λ1i ptq ´ 0 and 0 0 respectively, cf. Andersen et al. (1993), Section II.4. First, we would like to heuristically discuss again why Greenwood-type variances estimators are a good choice if ties in theşevent times are post sible. This is as well seen with the help of covariation processes: Let A˚1 : t ÞÑ 0 JpuqA1 pduq{Y puq p1 , where Jpuq “ 1tY puq ą 0u. By the denote the compensator of the Nelson-Aalen estimator A usual martingale theory, we have the optional covariation process ” ? ˚ p r npA1 ´ A1 qsptq “ n ż¨ 0 JdM1 ı ptq “ n Y żt 0 n żt ÿ J J drM1 s “ n drM1i s, 2 Y Y2 i“1 0 where the last equality follows from the orthogonality of all involved single martingales. Inserting the above representation for the optional variation process yields n ÿ ? ˚ p r npA1 ´ A1 qsptq “ n n żt n żt ÿ ÿ J J J dN1i ´ 2n ∆Λ1i dN1i ` n ∆Λ1i dΛ1i 2 2 Y Y Y2 i“1 0 i“1 0 i“1 0 żt żt żt J J J dN1 ´ 2n ∆A1 dN1 ` n ∆A1 dA1 . “n 2 2 0 Y 0 Y 0 Y żt In a last step, we replace the unknown increments of the cumulative hazard function ∆A1 puq with p1 puq “ Y puq´1 ∆N1 puq and obtain the Greenwood-type variance Nelson-Aalen increments ∆A estimator żt p12 ptq σ “n 0 J dN1 ´ 2n Y2 żt 0 J ∆N1 dN1 ` n Y2 Y żt 0 J ∆N1 dN1 “n Y Y Y żt 0 Y ´ ∆N1 dN1 . Y3 One could as well proceed similarly by starting with the predictable variation process instead. Now, for the large sample properties, let K ą 0 be a terminal time such that A1 pKq ă 8. A simple application of Glivenko-Cantelli theorems in combination with the continuous mapping şt theorem show that this Greenwood-type estimator is uniformly consistent for σ12 ptq “ 0 p1 ´ ∆A1 puqqH̄puq´1 dA1 puq on r0, Ks. In fact, this limit is the asymptotic variance of the normalized Nelson-Aalen estimator in the general set up where ties are possible; see e.g. van der Vaart and Wellner (1996), Example 3.9.19, for such a result in the classical survival set up and Appendix A for a detailed calculation for the present competing risks situation. The subtraction of ∆A1 in the limit variance is crucially different from the continuous case in which the limit variance func2 şt tion reduces to σ̃12 : t ÞÑ 0 H̄ ´1 dA1 . It is precisely this difference which is the cause for the inconsistency of the usual wild bootstrap procedure applied to Nelson-Aalen estimators and, as a consequence, also when applied to Aalen-Johansen estimators of cumulative incidence functions. The present article is organized as follows: In Section 2, we first discuss the implications of the usual wild bootstrap procedure, propose a discontinuity adjustment for the wild bootstrap, and finally present a conditional central limit theorem for this new technique. In the following Section 3, we show that the Nelson-Aalen estimators for different competing risks are in general asymptotically dependent. Therefore, we present in a next step an extension of the first proposal for the wild bootstrap adjustment that guarantees the correct limit dependence structure between the components for different risks. This technique has some direct implications on resampling the Aalen-Johansen estimator for cumulative incidence functions as these depend on all cause-specific hazard functions and, therefore, also on their dependencies. We present conditional central limit theorems corresponding to this set-up in Section 4, where also variance estimators for these AalenJohansen estimators and time-simultaneous confidence bands for cumulative incidence functions are deduced. The performance of these bands in terms of coverage probabilities is analyzed in a simulation study in Section 5 and there it is compared to the behaviour of confidence bands based on the usual, unadjusted wild bootstrap. In this connection, we consider different variations of discretization coarseness and discretization probabilities. All considered resampling techniques are applied to a real data example with competing risks in Section 6, where confidence bands for the probability of an alive discharge of male patients with pneumonia from intensive care units are constructed. We conclude with a small discussion in Section 7. All proofs and various detailed derivations are presented in Appendices A–E. 2 Proposed Wild Bootstrap Adjustment for a Univariate NelsonAalen Estimator The wild bootstrap is typically applied in the following way (see e.g. Lin 1997, Martinussen and Scheike 2006, Beyersmann et al. 2013 or Bluhmki et al. 2016 for resampling more general counting process-based Nelson-Aalen estimators): First, the (independent) martingale increments dM1i puq ? p in the martingale representation of npA 1 ´ A1 q are replaced by independently weighted counting process increments, i.e., by ξi dN1i puq. Here, the wild bootstrap weights ξi are i.i.d. with zero mean and variance 1. Bluhmki et al. (2016) argued that the resulting wild bootstrapped Nelson-Aalen estimator given by żt n ? ÿ dN1i x W̃1 ptq “ n ξi Y 0 i“1 3 constitutes a square-integrable martingale with predictable and optional variation processes żt dN1 p2 “ σ̃1 ptq 2 0 Y żt n ÿ dN1i p x 2 p12 ptq. t ÞÝÑ rW̃1 sptq “ n ξi “ σ̃ 2 0 Y i“1 x yptq “ n t ÞÝÑ xW̃ 1 and When utilized as variance estimators, both variation processes in the previous display are uniformly consistent for σ̃ 2 . Unfortunately, this is even true in the discontinuous case where σ 2 ‰ σ̃ 2 . Therefore, the wild bootstrap procedure, as it is presently applied in the literature, fails to be consistent for the correct limit distribution of the Nelson-Aalen estimator whenever ties are an inevitable phenomenon in the analyzed data set. This is exactly the reason why this wild bootstrap approach consistently overestimates the true variance in case of ties. This phenomenon does not vanish as n Ñ 8 and it is stronger pronounced for coarser lattices of discrete event times; see the simulation study in Section 5. This problem occurs while resampling Aalen-Johansen estimators for cumulative incidence functions in competing risks data and it occurs as well while resampling general Nelson-Aalen estimators if ties are present. This non-trivial problem calls for a general solution. In the present article, we exemplify the subsequent solution in the right-censored competing risks set-up. Extensions and modifications to wild bootstrap versions of more general Nelson-Aalen estimators or of Aalen-Johansen estimators in general Markovian situations may be obtained in a similar manner, but the limit variances will be much more complicated. The crucial defect in the wild bootstrap resampling scheme described above is that the martingale increments dM1i puq should not be replaced by ξi dN1i puq but rather by something which – considered again as a martingale – reproduces the correct covariance structure. Therefore, we replace d dM1i puq by ξi Y puq ´ ∆N1 puq dN1i puq, Y puq which results in the following wild bootstrap resampling version of the normalized Nelson-Aalen estimator: żtd n ? ÿ Y puq ´ ∆N1 puq dN1i puq x1 ptq “ n ξi W . Y puq Y puq 0 i“1 x1 ptqqtPr0,Ks is a martingale with In a way similar to Bluhmki et al. (2016), one can show that pW respect to the filtration pFt qtPr0,Ks given by Ft “ σpξi N1i puq, N1i pvq, Yi pvq : u P r0, ts, v P r0, Ks, i “ 1, . . . , nq. 4 Analogously, it is easy to see that its predictable and optional variation processes are given by żt Y puq ´ ∆N1 puq dN1 puq Y 3 puq 0 żt n ÿ Y puq ´ ∆N1 puq 2 2 p x p1 : t ÞÝÑ rW1 sptq “n ξi dN1i puq. and σ Y 3 puq 0 i“1 p12 σ x1 yptq “n : t ÞÝÑ xW p12 is uniformly consistent for σ12 . AsIt is well-known that the Greenwood-type variance estimator σ suming the existence of the fourth moments of ξi , a simple application of Chebyshev’s inequality shows the (conditional) consistency of the second estimator; the uniformity in the conditional convergence in probability follows from a Pólya-type argument. The conditional weak convergence of the finite-dimensional marginal distributions of the wild bootstrapped Nelson-Aalen process follows easily by an application of Theorem A.1 in Beyersmann et al. (2013). This also shows that the proposed wild bootstrap approach succeeds in maintaining the correct asymptotic covariance function which had been our aim in the first place. Denote by D1 “ tt P r0, Ks : ∆A1 ptq ą 0u the subset of time points for which ties among the type 1 events are possible. Similarly, we define D2 , . . . , Dk for the other risks. Throughout the article, we assume the following technical condition in order to conclude the conditional tightness of the wild bootstrapped Nelson-Aalen process. Condition 2.1. D “ Ťk j“1 Dj has a finite cardinality. In practical applications, this assumption is naturally satisfied: A finite end-of-study time and measurements on a daily or weekly basis result in a finite lattice. A proof of conditional tightness finally yields the following conditional central limit theorem for the Nelson-Aalen process: Theorem 2.2. Assume Condition 2.1. Given F0 and as n Ñ 8, we have the following conditional weak convergence d x1 ÝÑ W U1 „ Gaussp0, σ12 q in outer probability on the càdlàg function space Dr0, Ks equipped with the supremum distance topology, where U1 is a Gaussian zero-mean martingale with variance function t ÞÑ σ12 ptq. That is, the modified wild bootstrap succeeds in reproducing the same limit process of the Nelson-Aalen process, in particular, if ties are present. The proof is given in Appendix B. When resampling a functional of a multivariate NelsonAalen estimator such as the Aalen-Johansen estimator, it is mandatory to take the covariance structure between all cause-specific Nelson-Aalen estimators into account. In order to reflect this in the 5 resampling scheme, a further adjustment needs to be done as shown in the following section. We conclude this section with an application of the present approach to the Kaplan-Meier estimator. Remark 2.3. Consider the case of only one risk, i.e. k “ 1 and W “ W1 . The Kaplan-Meier estimator for the survival function Sptq “ P pT ą tq is p “ Sptq ź p p1 ´ Apduqq, t P r0, Ks. 0ďuďt It exhibits the martingale representation ? p ´ Sptqq “ Sptq WS ptq “ npSptq żt 0 W pduq ` op p1q. 1 ´ ∆Apuq Thus, the discontinuity-adjusted wild bootstrapped normalized Kaplan-Meier estimator is ż¨ xS “ Sp W 0 x pduq W p 1 ´ ∆Apuq and Theorem 2.2 in combination with the continuous mapping theorem yields the correct limit process distribution, i.e. a zero-mean Gaussian process with covariance function given by żt ps, tq ÞÑ SpsqSptq 0 dApuq ; p1 ´ ∆ApuqqH̄puq cf. e.g. Example 3.9.31 in van der Vaart and Wellner (1996). 3 Extension to the Joint Convergence of Multiple Nelson-Aalen Estimators in Competing Risks Models We now extend the above martingale notation to all k P N competing risks, i.e. to M1i , . . . , Mki , i “ 1, . . . , n. For analyses involving two different cumulative cause-specific hazard functions in a competing risks set-up, it is also important to take the asymptotic covariance structure of both Nelson-Aalen estimators into account. In the absolutely continuous case, this asymptotic covariance function vanishes as all Nelson-Aalen estimators are asymptotically independent; cf. Andersen et al. (1993), Theorem IV.1.2. In the presence of ties, however, the situation is quite 6 different: Here we have for the martingales M1i and M2i of Section 1 that żt Yi puq∆A1 puqdA2 puq, xM1i , M2i yptq “ ´ ż0t 0 0 0 Yi puq∆A1 puqdA2 puq, Yi puq∆A2 puqdM1i puq ` Yi puq∆A1 puqdM2i puq ´ rM1i , M2i sptq “ ´ żt żt ? p cf. the derivations in Section II.4 in Andersen et al. (1993). Define Wj “ npA j ´ Aj q, j “ 1, . . . , k. The above variation processes are strong evidence that the normalized Nelson-Aalen estimators W1 , W2 , . . . , Wk are not asymptotically independent anymore in the presence of ties. This is indeed the case: Theorem 3.1. As n Ñ 8, we have on the product càdlàg function space Dk r0, Ks, equipped with the max-sup-norm, that d pW1 , W2 , . . . , Wk q ÝÑ pU1 , U2 , . . . , Uk q, where U1 , U2 , . . . , Uk are zero-mean Gaussian martingales with variance functions żt t ÞÑ σj2 ptq “ 0 1 ´ ∆Aj puq dAj puq, H̄puq j “ 1, 2, . . . , k and covariance functions (for j ‰ `) ż s^t ps, tq ÞÑ covpUj psq, U` ptqq “ ´ 0 ∆A` puq dAj puq “: σj` ps ^ tq. H̄puq See Appendix C for a derivation of this asymptotic covariance function. In order to account for this dependence structure in a joint convergence consideration, the wild bootstrap of the previous section needs to be adjusted once more. Therefore, let ξj`i , j, ` “ 1, . . . , k, i “ 1, . . . , n, be i.i.d. 2 random variablesřwith Epξ111 q “ 0 and Epξ111 q “ 1, which are also independent of the data. k Denote by N “ j“1 Nj the number of all kinds of events. Then, the single components of the wild bootstrap version of the multivariate Nelson-Aalen estimator pW1 , . . . , Wk q are given by n ? ÿ x Wj ptq “ n ξjji żtd Y puq ´ ∆N puq dNji puq Y puq Y puq 0 i“1 d żt żtd k n n ”? ÿ 1 ÿ ∆Nj puq dN`i puq ? ÿ ∆N` puq dNji puq ı `? signp` ´ jq n ξj`i ` n ξ`ji , Y puq Y puq Y puq Y puq 2 `“1 0 0 i“1 i“1 7 where signpxq “ 1tx ą 0u ´ 1tx ă 0u is the signum function. This signum function is important in order to insure the required negative covariance between all components. The following large sample properties hold: Theorem 3.2. Assume Condition 2.1. Given F0 and as n Ñ 8, we have the following conditional weak convergence on the product càdlàg function space Dk r0, Ks, equipped with the max-supnorm: d x1 , W x2 , . . . , W xk q ÝÑ pW pU1 , U2 , . . . , Uk q in outer probability, where pU1 , U2 , . . . , Uk q is the same Gaussian martingale as in Theorem 3.1. The proof is given in Appendix D. Note that, if we are interested in just a single univariate Nelson-Aalen estimator, the present approach yields the same limit distribution as the wild bootstrap technique proposed in Section 2. Hence, it does – asymptotically – not matter which of both techniques is applied to the univariate Nelson-Aalen estimator. Variance and covariance estimators (also for the wild bootstrap versions) are again motivated by the predictable and optional covariation processes of the involved martingales. The resulting estimators turn out to be same as those obtained by the plug-in method: żt Y puq ´ ∆Nj puq dNj puq, j “ 1, . . . , k, Y 3 puq 0 żt ∆Nj puq pj` ptq “ ´n σ dN` puq, j, ` “ 1, . . . , k; j ‰ `, 3 0 Y puq pj2 ptq σ “n are the usual Greenwood-type (co)variance estimators and n ÿ ż¨ Y puq ´ ∆Nj puq dNji puq Y 3 puq 0 i“1 ż ż¨ n n ı ÿ n ÿ ” ÿ 2 ¨ ∆Nj puq ∆N` puq 2 ξj`i dN puq ` ξ dN puq , ` `i ji `ji 3 3 2 `‰j i“1 0 Y puq 0 Y puq i“1 ż ż¨ n n ı ÿ ∆N` puq n ” ÿ 2 ¨ ∆Nj puq 2 p pj` p¨q “ ´ σ ξj`i dN puq ` ξ dN puq , `i ji `ji 3 3 2 i“1 0 Y puq 0 Y puq i“1 p pj2 p¨q “ n σ 2 ξjji j “ 1, . . . , k, j, ` “ 1, . . . , k; j ‰ `, are the optional process-type (co)variance estimators motivated from the wild bootstrap martingale properties. Assume that all ξ111 have finite fourth moments. By applications of Glivenko-Cantelli theorems in combination with the continuous mapping theorem, the Greenwood-type (co)variance pj and σ pj` are shown to be uniformly consistent for σj2 and σj` , respectively. For the wild estimators σ 8 bootstrap-type (co)variance estimators, we can parallel the arguments in the proof of Theorem 2.2, 4 after first assuming the existence of fourth moments Epξ111 q ă 8: In points of continuity of all cumulative hazard functions, i.e. on r0, KszD, Rebolledo’s martingale central limit theorem applies and it also implies the uniform consistency of the optional variation process increments. p pj2 and pj2 by σ In points of discontinuity, which are finitely many by assumption, we approximate σ apply the conditional Chebyshev inequality (given F0 ) in order to show the negligibility of the p pj2 in probability. The last argument can be repeated for the covariance estimators. pj2 ´ σ differences σ A final application of the continuous mapping theorem yields p p pj2 , σ pj2 ÝÑ σj σ p p pj` , σ pj` ÝÑ σj` σ and uniformly on r0, Ks in (conditional outer) probability, for all j ‰ ` as n Ñ 8. 4 Extension to Aalen-Johansen Estimators for Cumulative Incidence Functions in Competing Risks Denote the cumulative incidence functions by Fj ptq, j “ 1, . . . , k, which specify the probabilities to die due to cause j during the time interval r0, ts. For ease of presentation, we consider the situation of k “ 2 competing risks which is achieved by aggregating all but the first risk to be the second competing risk. The general results are obtained by replacing U2 , A2 , and F2 in the representations below by U ´ U1 , A ´ A1 , and 1 ´ S ´ F1 , respectively. Here, A denotes the allcause cumulative hazard function. Utilizing the functional delta-method in combination with the weak convergence results for the Nelson-Aalen estimator, we as well obtain a weak convergence şt p p p1 puq for the cumulative incidence theorem for the Aalen-Johansen estimator F1 ptq “ 0 Spu´qdA şt function F1 ptq “ 0 Spu´qdA1 puq: Theorem 4.1. As n Ñ 8, WF1 ? d “ npFp1 ´ F1 q ÝÑ UF1 “ ż¨ 0 1 ´ F2 pu´q ´ F1 p¨q dU1 puq ` 1 ´ ∆Apuq ż¨ 0 F1 pu´q ´ F1 p¨q dU2 puq, 1 ´ ∆Apuq where UF1 is a zero-mean Gaussian process with covariance function ż s^t σF2 1 : ps, tq ÞÑ p1 ´ F2 puq ´ F1 psqqp1 ´ F2 puq ´ F1 ptqq 1 ´ ∆A1 puq dA1 puq p1 ´ ∆Apuqq2 H̄puq 0 ż s^t pF1 puq ´ F1 psqqpF1 puq ´ F1 ptqq 1 ´ ∆A2 puq ` dA2 puq p1 ´ ∆Apuqq2 H̄puq 0 9 ż s^t ´ 0 ż s^t ´ 0 p1 ´ F2 puq ´ F1 psqqpF1 puq ´ F1 ptqq ∆A1 puq dA2 puq p1 ´ ∆Apuqq2 H̄puq p1 ´ F2 puq ´ F1 ptqqpF1 puq ´ F1 psqq ∆A2 puq dA1 puq. p1 ´ ∆Apuqq2 H̄puq For the application of the functional delta-method, note that the Aalen-Johansen estimator in the present competing risks framework is a combination of the Wilcoxon and the product integral functional applied to the multivariate Nelson-Aalen estimator. Both of these functionals are Hadamard-differentiable as shown for example in Section 3.9 of van der Vaart and Wellner (1996). A derivation of the above asymptotic covariance function is presented in Appendix E. ? Now, an appropriate wild bootstrap version of npFp1 ´ F1 q is given by ż¨ xF1 ptq “ W 0 ż¨ p 1 ´ Fp2 pu´q ´ Fp1 p¨q x F1 pu´q ´ Fp1 p¨q x dW1 puq ` dW2 puq, p p 1 ´ ∆Apuq 1 ´ ∆Apuq 0 x1 and W x2 are again the wild bootstrap versions of the Nelson-Aalen estimator as presented where W in Section 3. Using similar martingale arguments as in Appendix B, we obtain the following conditional central limit theorem for the wild bootstrap version of the Aalen-Johansen estimator: Theorem 4.2. Assume Condition 2.1. Given F0 and as n Ñ 8, we have the following weak convergence on the càdlàg function space Dr0, Ks, equipped with the sup-norm: d xF1 ÝÑ W UF1 in probability, where UF1 is the same Gaussian process as in Theorem 4.1. Remark 4.3 (The weird bootstrap). Note that the very same proofs may be applied to verify that the above conditional central limit theorems hold for the weird bootstrap as well. This resampling scheme corresponds to choosing ξj`i ` 1 „ BinpY pXi q, maxp1, Y pXi qq´1 q, where Xi is the censoring or event time of individual i, whichever comes first. This is a particular choice of the data-dependent multiplier bootstrap of Dobler et al. (2015). In their article, heuristic arguments for the second order correctness under absolute continuity of the data have shown that centered unit Poisson variates and weird bootstrap multipliers perform favorably in comparison to standard normal wild bootstrap weights. In order to also check the preference of either of the first two resampling procedures in the present set-up, where ties are allowed, we included the weird bootstrap yielding competing inference methods into the subsequent simulation study. 10 Estimators for σF2 1 and its wild bootstrap variant are obtained similarly as such estimators for the Nelson-Aalen (co)variances, i.e. via plug-in: ż s^t pF2 1 σ : ps, tq ÞÑ 0 p1 ´ Fp2 pu´q ´ Fp1 psqqp1 ´ Fp2 pu´q ´ Fp1 ptqq 2 dp σ1 puq 2 p p1 ´ ∆Apuqq ż s^t p pF1 pu´q ´ Fp1 psqqpFp1 pu´q ´ Fp1 ptqq 2 ` dp σ2 puq 2 p p1 ´ ∆Apuqq 0 ż s^t p1 ´ Fp2 pu´q ´ Fp1 psqqpFp1 pu´q ´ Fp1 ptqq ` dp σ12 puq 2 p p1 ´ ∆Apuqq 0 ż s^t p1 ´ Fp2 pu´q ´ Fp1 ptqqpFp1 pu´q ´ Fp1 psqq σ21 puq. dp ` 2 p p1 ´ ∆Apuqq 0 p pF2 1 is obtained by replacing all estimators σ pj and σ pj` , j ‰ `, by their wild bootstrap Similarly, σ p p pj` , respectively. Their uniform (conditional) consistencies for σF2 1 on r0, Ks pj and σ counterparts σ follow immediately by the uniform consistency of the Nelson-Aalen (co)variance estimators and the continuous mapping theorem. Remark 4.4 (Deduced confidence bands). Following the lines of Beyersmann et al. (2013), timesimultaneous confidence bands for F1 can be deduced. In particular, let φpsq “ logp´ logp1 ´ sqq be a transformation applied to F1 in order to ensure band boundaries between 0 and 1 and let g1 psq “ logp1 ´ Fp1 psqq{p ρpsq and g2 psq “ logp1 ´ Fp1 psqq{p1 ` ρp2 psqq be weight functions leading to the usual equal precision and Hall-Wellner bands, respectively; see Andersen et al. (1993). pF2 1 psq{p1 ´ Fp1 psqq2 . Let gp1 and gp2 be their wild bootstrap counterparts, i.e. the Here ρp2 psq “ σ p pF2 1 are replaced by σ pF2 1 . The confidence bands for F1 are then derived from variance estimates σ ? the asymptotics of the supremum distance Z1j “ supuPrt1 ,t2 s | ngj puqpφpFp1 puqq ´ φpF1 puqqq| and xF1 puq|, where rt1 , t2 s Ă r0, Ks its wild bootstrap counterpart Zp1j “ supuPrt ,t s |p gj puqφ1 pFp1 puqqW 1 2 and j P t1, 2u. Let q0.95,j be the conditional 95% quantile of Zp1j given the data. The resulting ´1{2 asymptotic 95% confidence bands are 1 ´ p1 ´ Fp1 psqqexpp˘n q0.95,j {gj psqq , s P rt1 , t2 s, j “ 1, 2. 5 Small Sample Behaviour We empirically assess the difference between the common wild bootstrap approach and the adjusted wild bootstrap proposed in this article via simulation studies. We simulated the wild bootstrap procedures based on standard normal and centered unit Poisson multipliers as well as the 11 weird bootstrap of Remark 4.3. These methods are compared in terms of the simulated coverage probabilities of the confidence bands described in Remark 4.4. We consider a simulation set-up motivated by Dobler and Pauly (2014), i.e. we chose the cause-specific hazard rates α1 ptq “ expp´tq and α2 ptq “ 1 ´ expp´tq which yield the cumulative function of the first risk F1 ptq “ 0.5p1 ´ expp´2tqq. In order to allow for tied data, we pre-specify different discretization lattices and round different proportions of the population to the nearest discretization point. In particular, we choose the discretization lattices to be t0, k1 , k2 , . . . u, where k P t5, 10, 20u, and the discretization probabilities to be p P t0, 0.25, 0.5, 0.75, 1u. The resulting theoretic cumulative incidence functions F1p,k ptq “ pF1 ´ rkt ´ 0.5s k ` 0.5 ¯ ` p1 ´ pqF1 ptq k are presented in Figure 1, with the exception of the continuous function F1 . Here rss denotes the integer closest to s P R. For simulating data, which have the desired cumulative incidence function F1p,k , it is mandatory to first round the event times Ti , and then generate the event types εi in a second step, according to the formula ˇ rT ks ¯ F pu ` 1 q ´ F pmaxpu ´ 1 , 0qq 1 1 ˇ i 2k 2k “u “ , P εi “ 1ˇ 1 1 k Spmaxpu ´ 2k , 0qq ´ Spu ` 2k q ´ where S : t ÞÑ expp´tq denotes the survival function of the continuous random variables Ti . Censoring is introduced by i.i.d. standard exponentially distributed random variables. If the ith survival time is discretized, then we discretize the ith censoring time as well. Finally, we take the minimum out of each such pair and mark an individual as censored whenever the (discretized) censoring time precedes the (discretized) survival time. The sample size increases from n “ 50 to n “ 250 in steps of 25. We choose the time interval, along which asymptotic 95% confidence bands shall be constructed, to be r0.25, 0.75s. The simulations have been conducted using R version 3.2.3 (R Development Core Team, 2016) using 10,000 outer Monte Carlo iterations and 999 wild bootstrap replicates. Tables 1 to 6 contain the simulated coverage probabilities of equal precision and Hall-Wellner bands for simulation set-ups with a discrete component in the cumulative incidence function, i.e. p ą 0. The columns of simulation results corresponding to the common wild / weird bootstrap procedures are entitled old, whereas the columns showing the results of the respective adjusted wild / weird bootstrap are entitled new. At first, we start with a discussion on the choice of multipliers. For equal precision bands and in almost all set-ups, there is a pronounced superiority of the wild bootstrap with centered unit Poisson multipliers and the weird bootstrap over the respective coverage probabilities of the bands based on standard normal weights. This is true for the common resampling procedures as well as for the proposed adjusted bootstraps. For Hall-Wellner bands, this superiority is not as much pronounced and sometimes even the confidence bands based on standard normal multipliers yield 12 the most accurate coverage probabilities. But in cases, where this is so, the deviance is only very small. The phenomenon, that standard normal multipliers yield a worse performance than those with skewness equal to one, is in line with the findings in a revised version of Dobler et al. (2015) where also heuristic theoretic arguments for a second-order correctness of both superior resampling procedures are provided. As there is, all in all, not much of a difference between the simulated coverage probabilities of the centered unit Poisson wild bootstrap and the weird bootstrap, we only focus on the results of the Poisson choice. In general, the equal precision bands are more accurate than the Hall-Wellner bands. Here, the discretization-adjusted wild bootstrap almost always yielded coverage probabilities closer to the nominal level in comparison to the unadjusted wild bootstrap. The deviances between these coverage probabilities of each of those two resampling procedures appears to be larger the higher the discretization probability p and the coarser the discretization lattice is. For instance, this difference even amounts to 4.03 percentage points in case of the Hall-Wellner bands, n “ 50, and p “ 1 and to 3.83 percentage points in case of equal precision bands and the same p and n. In case of k P t5, 10u, the coverage probabilities of the common wild bootstrap do not appear to converge at all towards 95% as the sample size increases. Instead, the simulated probabilities fluctuate around 93% or even 92%. On the other hand, the discretization-adjusted equal precision wild bootstrap bands yield much better coverage probabilities which are greater than 94% or at least in the high 93%-region for larger sample sizes. In contrast to the unadjusted procedure, we observe for small samples and for the adjusted confidence bands coverage probabilities closer to the nominal level for higher discretization probabilities p. This is only reasonable, as p “ 100% corresponds to a multivariate, but not an infinite-dimensional statistical problem. We do not see this tendency for the unadjusted procedure in case of k P t5, 10u, which again stresses that it is not suitable for these kinds of tied data regimes. Finally, Table 7 shows the corresponding results for the scenario in which the continuous F1 is the true cumulative incidence function and the usual wild bootstrap technique yields asymptotically exact inference procedures. However, it is surprising to see that even here the adjusted wild bootstrap yields more accurate confidence bands in comparison to the unadjusted procedure. Therefore, there is apparently no loss at all in utilizing the discretization adjustment – with or without ties in the data. All in all, we conclude that the proposed discontinuity adjustment should always be applied in order to greatly improve the coverage probabilities of confidence bands for F1p,k . The present simulation results show this improvement, which amounts to up to two or three percentage points for smaller samples, in many conducted simulation scenarios. As the standard normal variatebased wild bootstrap disappoints in general, our final advice is to combine the present discontinuity adjustment with the wild bootstrap based on the Poisson-distributed random variables or the weird bootstrap. Additionally, equal precision bands should be preferred to Hall-Wellner confidence bands due to the slight but frequent difference in coverage probabilities. 13 Figure 1: Cumulative incidents functions F1p,k underlying the present simulations. 14 set-ups p n 50 75 100 125 25% 150 175 200 225 250 50 75 100 125 50% 150 175 200 225 250 50 75 100 125 75% 150 175 200 225 250 50 75 100 125 100% 150 175 200 225 250 N p0, 1q old new 87.31 88.47 89.48 90.39 90.64 91.26 91.21 91.96 91.12 91.66 91.69 92.14 91.99 92.46 92.51 92.98 92.48 92.88 87.41 89.31 89.35 90.99 90.01 91.53 90.56 91.92 90.59 91.93 91.21 92.22 91.22 92.28 91.44 92.61 91.72 92.82 87.23 90.60 90.09 92.56 90.58 92.86 90.83 93.03 90.84 93.11 90.83 93.13 90.91 93.11 91.15 93.43 91.76 93.76 87.71 91.98 88.79 92.70 89.89 93.25 89.76 93.14 89.64 93.21 90.10 93.24 90.27 93.55 90.01 93.07 89.71 93.18 P oip1q ´ 1 old new 89.44 90.61 91.55 92.24 92.32 92.96 92.36 93.07 92.48 92.98 93.10 93.21 93.31 93.80 93.29 93.67 93.65 93.91 89.09 91.28 91.28 92.71 92.39 93.64 92.95 93.90 92.44 93.38 92.58 93.49 92.30 93.31 92.70 93.73 93.13 94.27 89.12 91.56 90.96 93.22 92.13 94.23 92.13 94.26 91.96 93.94 91.66 93.87 92.45 94.46 92.52 94.49 92.38 94.36 89.08 92.91 90.26 93.74 90.90 94.06 90.92 93.88 90.84 93.97 90.52 93.52 91.06 94.00 91.30 94.19 90.92 93.89 weird old new 88.93 90.36 91.13 92.01 92.21 92.64 93.43 93.76 93.37 93.75 93.20 93.63 93.63 94.05 93.58 94.03 93.41 93.84 89.76 91.29 91.03 92.59 91.88 93.29 92.29 93.43 93.04 94.05 92.66 93.73 93.16 94.19 93.25 94.16 93.07 94.05 89.47 92.11 91.29 93.77 91.59 93.83 91.75 94.08 92.29 94.35 92.25 94.03 92.50 94.49 92.22 94.12 92.73 94.53 89.56 93.19 90.21 93.64 90.47 93.84 90.44 93.64 91.00 93.87 91.25 93.99 91.09 94.12 91.08 94.26 90.76 93.86 Table 1: Simulated coverage probabilities of equal precision bands in per cent where k “ 5 15 set-ups p n 50 75 100 125 25% 150 175 200 225 250 50 75 100 125 50% 150 175 200 225 250 50 75 100 125 75% 150 175 200 225 250 50 75 100 125 100% 150 175 200 225 250 N p0, 1q old new 87.72 88.64 89.22 90.16 90.68 91.22 91.13 91.61 91.63 92.16 91.79 92.06 91.93 92.37 92.40 92.77 92.17 92.61 87.15 88.59 89.78 90.80 90.24 91.32 91.17 92.11 91.63 92.52 92.65 93.29 92.21 92.87 92.20 92.98 92.96 93.52 87.63 89.82 89.52 91.46 90.30 91.90 91.44 92.88 91.49 92.76 91.50 92.76 92.00 93.08 92.20 93.12 92.49 93.78 88.28 91.10 89.81 92.2 90.54 92.66 91.12 93.19 91.41 93.44 91.60 93.59 91.49 93.46 92.32 93.98 91.81 93.81 P oip1q ´ 1 old new 89.37 90.69 91.86 92.55 92.43 93.07 93.05 93.50 93.5 93.77 93.87 94.19 93.84 93.94 93.54 93.89 94.03 94.26 89.20 90.73 91.46 92.47 92.58 93.25 92.99 93.70 93.25 93.98 92.67 93.34 93.36 94.03 94.07 94.80 93.71 94.23 89.19 91.41 91.97 93.42 92.45 93.76 92.93 94.03 93.20 94.50 92.98 94.18 93.92 94.94 93.57 94.56 93.51 94.55 90.21 92.75 91.70 93.90 92.10 93.98 92.58 94.36 92.83 94.61 92.84 94.57 93.03 94.76 92.92 94.70 92.79 94.58 weird old new 89.87 90.84 91.75 92.35 93.06 93.31 93.42 93.79 93.48 93.79 93.75 93.93 93.70 93.88 93.73 93.97 94.24 94.56 89.18 90.50 91.18 92.22 92.53 93.47 93.06 93.76 93.17 93.95 93.06 93.71 93.51 94.23 93.09 93.96 93.37 93.93 88.95 90.91 91.36 92.96 92.52 93.95 92.83 94.14 93.22 94.23 93.66 94.63 93.75 94.85 93.17 94.13 93.69 94.81 90.31 92.68 91.77 93.57 92.09 93.96 92.74 94.47 92.77 94.77 92.84 94.79 93.25 94.97 93.38 94.95 92.98 94.73 Table 2: Simulated coverage probabilities of equal precision bands in per cent where k “ 10 16 set-ups p n 50 75 100 125 25% 150 175 200 225 250 50 75 100 125 50% 150 175 200 225 250 50 75 100 125 75% 150 175 200 225 250 50 75 100 125 100% 150 175 200 225 250 N p0, 1q old new 87.21 88.03 89.75 90.33 91.01 91.61 92.09 92.29 91.87 92.39 92.44 92.71 92.76 93.03 93.23 93.44 92.84 93.11 88.02 89.22 89.88 90.74 90.95 91.69 91.98 92.46 91.90 92.54 92.95 93.40 92.79 93.11 92.78 93.25 93.01 93.28 88.42 89.91 90.28 91.50 91.43 92.45 91.41 92.30 92.73 93.31 92.44 93.14 93.04 93.84 93.32 93.94 93.03 93.59 88.87 90.73 90.95 92.58 91.98 93.28 92.91 93.94 92.82 93.88 93.16 94.25 93.53 94.51 94.06 94.76 93.12 94.31 P oip1q ´ 1 old new 89.93 90.94 92.18 92.50 93.12 93.52 93.99 94.18 93.63 93.78 94.03 94.40 94.18 94.35 94.46 94.77 93.88 94.10 89.57 90.86 92.37 93.28 93.19 93.74 93.44 93.83 93.60 94.01 94.00 94.42 94.05 94.39 94.16 94.53 93.92 94.30 90.81 92.12 92.73 93.94 93.30 94.21 93.84 94.58 94.01 94.77 94.44 95.04 94.13 94.65 94.41 94.95 94.27 94.85 91.04 92.79 93.21 94.28 93.74 95.01 93.69 94.88 94.18 95.10 94.88 95.59 94.38 95.30 94.63 95.59 94.95 95.79 weird old new 90.15 90.69 91.78 92.38 92.71 93.08 93.34 93.67 93.69 93.85 94.19 94.35 93.76 94.07 94.02 94.23 94.16 94.41 89.59 90.81 92.34 93.00 93.02 93.71 93.91 94.2 93.97 94.27 94.11 94.45 93.68 94.00 94.28 94.67 93.77 94.03 90.51 91.96 92.85 93.67 93.02 93.85 93.57 94.08 93.54 94.25 94.09 94.82 94.02 94.58 94.08 94.69 94.29 94.77 91.16 92.69 93.02 94.24 93.74 94.67 94.13 95.13 94.58 95.49 94.85 95.74 94.59 95.29 94.69 95.39 94.79 95.60 Table 3: Simulated coverage probabilities of equal precision bands in per cent where k “ 20 17 set-ups p n 50 75 100 125 25% 150 175 200 225 250 50 75 100 125 50% 150 175 200 225 250 50 75 100 125 75% 150 175 200 225 250 50 75 100 125 100% 150 175 200 225 250 N p0, 1q old new 88.65 89.93 89.82 90.60 90.51 91.11 90.92 91.69 91.41 91.70 91.79 92.17 92.24 92.67 92.22 92.70 92.38 93.03 87.72 90.36 89.17 91.06 89.86 91.62 90.86 92.28 90.99 92.28 91.41 92.67 91.77 92.99 91.70 92.87 91.44 92.84 87.35 90.83 89.97 92.41 89.89 92.60 90.52 92.98 90.61 93.03 91.03 93.41 91.29 93.53 91.63 93.76 91.44 93.55 88.99 92.88 90.32 93.74 90.59 94.04 91.27 94.59 91.63 94.59 91.53 94.56 91.78 94.65 91.94 94.92 92.40 94.92 P oip1q ´ 1 old new 89.33 90.79 90.59 91.54 90.93 91.82 91.11 91.82 91.53 92.20 92.75 93.17 92.18 92.59 92.75 93.20 92.53 93.05 88.52 90.87 89.54 91.43 90.26 91.87 91.27 92.69 91.34 92.77 91.76 92.84 92.20 93.57 91.72 92.95 92.00 93.20 88.74 92.14 90.57 93.39 90.32 93.29 90.95 93.38 91.15 93.80 91.54 93.95 90.98 93.49 91.70 93.52 91.55 93.78 89.60 93.67 90.71 94.31 91.17 94.37 91.79 94.81 91.42 94.50 91.95 94.80 91.82 94.68 91.87 94.81 91.86 94.76 weird old new 88.85 90.18 90.39 91.32 91.13 91.88 91.07 91.92 92.21 92.74 92.65 93.16 92.26 92.73 92.64 93.14 92.44 92.68 88.77 91.14 89.92 91.87 90.60 92.18 91.00 92.39 91.15 92.57 91.12 92.42 91.78 92.86 91.94 93.14 91.65 93.04 88.32 91.82 90.09 93.16 90.19 93.01 91.03 93.55 91.16 93.67 90.88 93.37 91.30 93.41 91.11 93.61 91.95 94.24 89.68 93.41 90.23 93.99 90.60 94.14 91.56 94.55 91.20 94.60 90.97 94.22 91.76 94.68 91.59 94.56 91.35 94.46 Table 4: Simulated coverage probabilities of Hall-Wellner bands in per cent where k “ 5 18 set-ups p n 50 75 100 125 25% 150 175 200 225 250 50 75 100 125 50% 150 175 200 225 250 50 75 100 125 75% 150 175 200 225 250 50 75 100 125 100% 150 175 200 225 250 N p0, 1q old new 87.21 88.70 89.23 90.08 90.54 90.86 91.49 91.96 92.52 92.80 92.61 92.88 92.25 92.76 92.92 93.41 92.37 92.78 87.32 89.05 89.94 91.20 91.24 92.37 91.05 92.16 91.99 92.82 92.37 93.10 92.24 92.79 92.29 93.22 92.05 92.73 88.15 90.60 90.41 92.20 91.25 92.74 91.76 93.21 91.67 92.85 92.30 93.57 92.25 93.46 92.40 93.63 92.70 93.79 88.99 92.00 91.10 93.57 90.84 93.12 92.06 93.80 91.95 93.89 92.41 94.23 92.34 94.21 92.73 94.31 93.32 94.90 P oip1q ´ 1 old new 89.27 90.49 90.91 91.57 91.86 92.55 92.45 92.86 92.31 92.94 92.86 93.06 92.66 92.88 93.02 93.32 92.90 93.29 88.85 90.49 91.08 92.27 91.08 92.32 91.61 92.49 91.92 92.79 92.53 93.21 92.42 93.37 92.75 93.44 92.70 93.38 88.32 91.01 91.34 92.98 90.97 92.66 91.99 93.34 91.73 93.04 92.50 93.75 92.11 93.50 92.43 93.88 92.38 93.66 89.50 92.73 91.14 93.59 92.10 94.27 92.06 94.18 92.56 94.65 92.87 94.70 93.11 94.88 93.25 94.85 92.74 94.41 weird old new 89.00 90.36 90.65 91.51 91.40 91.89 91.59 92.25 92.18 92.65 92.71 93.23 92.80 93.20 93.00 93.38 93.19 93.46 89.17 90.77 90.65 91.81 91.51 92.59 91.88 92.77 92.00 93.01 92.66 93.38 92.59 93.25 92.87 93.64 92.05 92.74 89.49 91.71 90.39 92.28 91.19 93.00 91.57 93.09 91.90 93.31 92.08 93.34 92.05 93.46 92.89 94.09 92.56 93.67 89.59 92.83 90.91 93.76 91.66 93.77 92.25 94.27 92.60 94.59 92.27 94.35 92.99 94.88 93.06 94.89 92.90 94.61 Table 5: Simulated coverage probabilities of Hall-Wellner bands in per cent where k “ 10 19 set-ups p n 50 75 100 125 25% 150 175 200 225 250 50 75 100 125 50% 150 175 200 225 250 50 75 100 125 75% 150 175 200 225 250 50 75 100 125 100% 150 175 200 225 250 N p0, 1q old new 88.39 89.53 90.39 90.99 91.39 91.89 91.69 92.17 92.07 92.51 92.24 92.55 93.01 93.27 93.11 93.32 92.88 93.03 88.77 90.02 90.43 91.37 91.74 92.45 92.12 92.82 92.12 92.59 92.43 93.00 92.94 93.22 92.67 93.01 93.41 93.58 89.17 90.83 90.99 92.23 91.15 92.12 92.21 93.15 92.64 93.39 92.50 93.21 92.73 93.39 92.91 93.51 93.34 94.01 90.11 92.25 91.22 92.70 92.01 93.62 92.39 93.45 92.77 94.10 93.22 94.35 93.88 94.73 93.74 94.62 93.61 94.56 P oip1q ´ 1 old new 89.93 91.16 90.67 91.39 91.75 92.26 92.54 93.03 92.57 92.83 92.76 92.97 92.58 93.04 92.99 93.25 93.60 93.69 89.28 90.66 91.27 92.29 91.99 92.74 92.49 93.11 93.05 93.60 92.96 93.25 93.08 93.50 93.20 93.92 93.03 93.47 89.70 91.53 91.29 92.41 92.36 93.24 92.57 93.44 93.08 93.98 93.25 93.91 93.34 94.15 93.18 93.96 93.84 94.39 90.74 92.78 92.57 94.08 93.09 94.37 93.28 94.64 93.47 94.59 93.66 94.84 93.79 94.78 94.25 95.07 93.94 94.95 weird old new 89.14 90.05 90.74 91.52 91.92 92.30 92.52 92.90 92.92 93.28 92.8 93.07 92.96 93.21 93.16 93.42 93.05 93.31 89.53 90.89 90.87 91.92 91.94 92.62 92.08 92.61 92.56 93.18 93.00 93.45 92.69 93.28 93.51 93.90 92.74 93.25 89.65 91.36 91.21 92.32 92.26 93.37 92.49 93.50 92.68 93.46 92.67 93.44 93.10 93.78 93.61 94.11 92.92 93.67 90.52 92.90 91.94 93.44 92.49 93.84 93.59 94.56 93.28 94.41 94.00 94.93 93.90 94.84 93.69 94.70 94.17 95.12 Table 6: Simulated coverage probabilities of Hall-Wellner bands in per cent where k “ 20 20 n 50 75 100 125 150 175 200 225 250 N p0, 1q old new 87.61 88.64 90.15 90.75 90.78 91.31 91.72 92.07 92.29 92.54 92.27 92.53 92.67 92.85 92.98 93.05 92.78 92.99 Hall-Wellner P oip1q ´ 1 old new 88.80 90.03 90.71 91.46 91.13 91.58 92.02 92.31 92.60 92.85 92.48 92.83 92.89 93.02 92.60 92.71 92.93 93.14 weird old new 88.72 89.75 90.74 91.48 91.77 92.23 91.58 92.23 92.90 93.21 92.86 93.17 93.18 93.34 93.26 93.68 93.14 93.32 N p0, 1q old new 87.08 88.06 89.36 90.21 90.74 91.24 91.35 91.77 91.33 91.52 92.45 92.64 92.87 93.04 92.69 92.93 93.20 93.43 Equal Precision P oip1q ´ 1 old new 89.55 90.36 91.79 92.33 93.20 93.43 92.96 93.37 93.64 93.85 93.91 94.14 93.68 93.80 93.85 94.12 93.68 93.81 weird old new 89.43 90.48 91.62 92.14 92.43 92.72 93.19 93.54 93.51 93.76 94.06 94.39 93.47 93.83 94.16 94.22 94.25 94.30 Table 7: Simulated coverage probabilities of confidence bands for F1 in per cent where p “ 0 6 Real Data Example We applied the present discretization adjustment to the sir.adm data-set of the R package mvna. It consists of competing risks data of patients who are in an intensive care unit (ICU), where the event of primary interest, “alive discharge out of ICU”, competes against the secondary event “death in ICU”. For seeing the difference between the common and the new approach more clearly, we analyzed the subset of all male patients suffering from pneumonia. Out of these n “ 63 individuals, five have been right-censored and 41 out of all 44 type 1 events fell into the time interval r5, 55s, which we chose for confidence band construction. Due to the worse performance of the wild bootstrap based on standard normal multipliers as seen in Section 5, we derived these bands by only using centered unit Poisson variates. In order to minimize the computational error in the quantile-finding process, 99,999 wild bootstrap iterations have been conducted. The confidence bands resulting from the weird bootstrap almost coincide with those just described. Therefore, they are not shown. The resulting confidence bands are presented in Figure 2. For both kinds of bands, (equal precision bands in the upper panel, Hall-Wellner bands in the lower panel), we see that the discretization adjustment leads to a widening in comparison to the unadjusted bands. This is in line with the results of the simulation study in Section 5, where the unadjusted bands appeared to be the most liberal, i.e. the smallest. In particular, the adjusted equal precision bands cover an additional area of 2.1 percentage points at the terminal time point t “ 55, whereas this deviance even amounts to 3.3 percentage points for the Hall-Wellner bands. This might not appear to be much at a first glance at the plots in Figure 2. But in fact, it may be the cause for a formidable improvement of the bands’ coverage probability: The simulation results of Section 5 for k “ 20, discretization probability p “ 100%, and sample sizes n P t50, 75u suggest that the adjusted wild bootstrap procedure 21 might improve the coverage probabilities of both kinds of bands by approximately two percentage points. With a view towards the liberal behaviour of the unadjusted bands, these enhancements of the coverage probabilities are highly worthwhile. Figure 2: Asymptotic 95% equal precision (upper) and Hall-Wellner bands (lower panel) for the cumulative incidence function of the competing risk “alive discharge out of ICU” for male patients suffering from pneumonia. 22 7 Discussion and Future Research In this article, we analyzed a discontinuity adjustment of the common wild bootstrap applied to right-censored competing risks data. This adjustment is absolutely necessary, as ties in the data introduce an asymptotic dependence between multiple cause-specific Nelson-Aalen estimators. The common wild bootstrap fails in reproducing this effect since it establishes independence for all sample sizes. The problem is even more involved for Aalen-Johansen estimators of cumulative incidence functions, which are non-linear functionals of all cause-specific hazards. Simulation results reported the striking liberality of the unadjusted bands which also fail to keep the nominal level asymptotically. Instead, the discretization-adjusted wild bootstrap greatly improves the coverage probability. This effect is more pronounced the more discrete the event times are. But even in the absolutely continuous case, the suggested procedure appears to perform preferably. Therefore, we advise to always use the adjustment when right-censored competing risks data shall be analyzed. The real data example reveals that the discontinuity adjustment does only lead to slight widening of the common wild bootstrap-based bands which is already enough to improve the coverage accuracy greatly. The presented wild bootstrap approach may be extended to more general Markovian multi-state models since the martingale arguments of Appendix B still apply. A still open question is, whether the common wild bootstrap also fails in case of tied survival data which are assumed to follow the Cox proportional hazards model (Cox, 1972). See Lin et al. (1993) for the wild bootstrap applied to absolutely continuous survival data following the Cox model. And if it fails, does the method proposed in this article require further modification? Acknowledgements The author likes to thank Markus Pauly for helpful discussions. He also appreciates the support by the German Research Foundation (DFG). A Detailed Derivation of the Asymptotic Variance of the NelsonAalen Estimator Define H uc ptq “ řk ENj1 ptq as the probability that an uncensored event due to any cause occurs ? p d ´ Aq ÝÑ until time t. According to van der Vaart and Wellner (1996), p. 383f, we have npA ş¨ uc ş t M pduq{H̄puq, where M uc ptq “ Guc ptq ´ 0 ḠpuqdApuq is a zero-mean Gaussian martingale. 0 j“1 23 Its variance function is determined by EGuc psqGuc ptq “ H uc ps ^ tq ´ H uc psqH uc ptq, E ḠpsqḠptq “ H̄ps _ tq ´ H̄psqH̄ptq, EGuc psqḠptq “ pH uc psq ´ H uc pt´qq1tt ď su ´ H uc psqH̄ptq. şt Note that Aptq “ 0 H uc pduq{H̄puq. Thus, for s ď t, the covariance function of M uc at ps, tq is EpM uc psqM uc ptqq żsżt H̄pu _ vq ´ H̄puqH̄pvq dH uc pvqdH uc puq “ H psq ´ H psqH ptq ` H̄puq H̄pvq 0 0 żt dH uc puq ´ rpH uc psq ´ H uc pu´qq1tu ď su ´ H uc psqH̄puqs H̄puq ż0s dH uc pvq ´ rpH uc ptq ´ H uc pv´qq1tv ď tu ´ H uc ptqH̄pvqs H̄pvq 0 żsżu” żsżt” ı ı 1 1 uc uc uc uc uc ´ 1 dH pvqdH puq ` ´ 1 dH uc pvqdH uc puq “ H psq ´ H psqH ptq ` H̄puq H̄pvq 0 0 ż0 s u ´ pH uc psq ` H uc ptqqApsq ` 2 H uc pu´qdApuq ` 2H uc psqH uc ptq ż s0 żs ” 1 ı uc uc uc uc uc uc “ H psq ` H psqH ptq ` pH ptq ´ H puqq ´ 1 dH puq ` pApuq ´ H uc puqqdH uc puq H̄puq 0 ż0 s ´ pH uc psq ` H uc ptqqApsq ` 2 H uc pu´qdApuq 0 żs żs uc uc uc uc uc uc uc H uc puqdH uc puq H puqdApuq ` “ H psq ` H psqH ptq ` H ptqApsq ´ H ptqH psq ´ 0 0 żs żs uc uc uc uc ` pApuq ´ H puqqdH puq ´ pH psq ` H ptqqApsq ` 2 H uc pu´qdApuq 0 0 żs żs żs uc uc uc uc “ H psq ´ H psqApsq ´ H puqdApuq ` ApuqdH puq ` 2 H uc pu´qdApuq 0 0 0 żs żs “ H uc psq ´ H uc puqdApuq ` H uc pu´qdApuq 0 0 żs żs żs uc “ H̄puqdApuq ´ ∆H puqdApuq “ H̄puqp1 ´ ∆ApuqqdApuq uc 0 uc uc 0 0 24 We conclude, as in van der Vaart and Wellner (1996), that ? d p ´ Aq ÝÑ npA ż¨ 0 ´ ż ¨ 1 ´ ∆Apuq ¯ 1 uc dM puq „ Gauss 0, dApuq , H̄puq H̄puq 0 where Gauss again indicates that the limit process is a Gaussian martingale. The very same calculations hold true if each H uc is replaced with H1uc for the subdistribution function of an uncensored type 1 event. Therefore, we have for Nelson-Aalen estimators for causespecific cumulative hazard functions that ? d p1 ´ A1 q ÝÑ npA ż¨ 0 B ¯ ´ 1 2 p¨q . puq „ Gauss 0, σ dMuc 1 1 H̄puq Consistency of the Wild Bootstrap for the Univariate NelsonAalen Estimator Proof. Without loss of generality, assume that 0, K P D1 for simplifying notation. Write D1 “ td0 , d1 , . . . , dJ u with the natural ordering dj ă dj`1 for all j “ 1, . . . , J. Then r0, KszD1 “ J Ť pdj´1 , dj q. As argued in Bluhmki et al. (2016), it is now straightforward to show that each j“1 x1 ptq ´ W x1 pdj´1 qqt on each interval rdj´1 , dj q, j “ 1, . . . , J, defines a square-integrable process pW martingale. Since such martingales can be extended to the right boundary of the time interval, x1 pdj q ´ W x1 pdj´1 q :“ limtÒd W x1 ptq ´ W x1 pdj´1 q, and this we may define the boundary values W j procedure introduces square-integrable martingales on the whole rdj´1 , dj s. x1 ptq ´ First, we notice that the conditional weak convergence in probability of the processes pW x1 pdj´1 qqt on each interval rdj´1 , dj s, j “ 1, . . . , J, is already implied by exactly the same ReW bolledo’s martingale central limit theorem arguments as in Bluhmki et al. (2016). Denote the limit Gaussian martingale processes as pŨ1j ptqqtPrdj´1 ,dj s , j “ 1, . . . , J. Due to the martingale extension above, Rebolledo’s limit theorem implies the almost sure continuity of Ũ1j on each time interval. Furthermore, these are zero-mean processes with variance function t ÞÑ σ12 ptq ´ σ12 pdj´1 q. Due to the continuity of the limit processes Ũ1j on the intervals rdj´1 , dj s, we are able to switch from the Skorohod topology to the more convenient sup-norm metrization; see the discussion in Section II.8 in Andersen et al. (1993). At each t “ dj , the weak conditional convergence 25 x1 pdj q holds in probability by the already argued convergence of all finitein distribution of ∆W dimensional conditional distributions. Therefore, the independence of the (bootstrapped) NelsonAalen increments imply that, as n Ñ 8, the conditional distribution of ´ ¯ x x x x x x x ∆W1 pd0 q, W1 pt0 q´W1 pd0 q, ∆W1 pd1 q, . . . , W1 ptJ´1 q´W1 pdJ´1 q, ∆W1 pdJ q t0 Prd0 ,d1 s,...,tJ´1 PrdJ´1 ,dJ s given F0 converges weakly in probability to the distribution of pŨ1 pd0 q, Ũ11 pt1 q, Ũ1 pd1 q, . . . , Ũ1J ptJ q, Ũ1 pdJ qqt1 Prd0 ,d1 s,...,tJ PrdJ´1 ,dJ s on the product Space R ˆ Drd0 , d1 s ˆ R ˆ ¨ ¨ ¨ ˆ DrdJ´1 , dJ s ˆ R equipped with the sup-max-norm. Here, all components are independent, and the normally distributed random variables Ũ1 pdj q have mean zero and variance ∆σ12 pdj q, j “ 1, . . . , J. Applying the functional, which is continuous with respect to the max-sup-norm, ψ : R ˆ Drd0 , d1 s ˆ R ˆ ¨ ¨ ¨ ˆ DrdJ´1 , dJ s ˆ R ÝÑ Drd0 , d1 s ˆ ¨ ¨ ¨ ˆ DrdJ´1 , dJ s ˆ R, ´ px0 , y1 pt1 q, x1 , . . . , yJ ptJ q, xJ qt1 ,...,tJ ÞÝÑ x0 ` y1 pt1 q, x0 ` y1 pd1 q ` x1 ` y2 pt2 q, . . . , x0 ` J´1 ÿ pyj pdj q ` xj q ` yJ ptJ q, x0 ` j“1 J ÿ ¯ pyj pdj q ` xj q j“1 t1 ,...,tJ to the previous limit theorem, the continuous mapping theorem implies that: Given F0 and as n Ñ 8, the conditional distribution of ´ ¯ x x x W1 pt1 q, . . . , W1 ptJ q, W1 pdJ q t1 Prd0 ,d1 s,...,tJ PrdJ´1 ,dJ s converges weakly (on the product-function space Drd0 , d1 s ˆ ¨ ¨ ¨ ˆ DrdJ´1 , dJ s ˆ R equipped with the max-sup-norm) in probability to the distribution of ´ ¯ U1 pt1 q, . . . , U1 ptJ q, U1 pdJ q . t1 Prd0 ,d1 s,...,tJ PrdJ´1 ,dJ s Here the right boundary values are again considered as the left-hand limits given by the martingale 26 extension theorem. The process pU1 ptqqtPr0,Ks is a zero-mean Gaussian martingale with variance function t ÞÑ σ12 ptq with, in general, discontinuous sample paths. Finally, we apply the continuous functional φ : Drd0 , d1 s ˆ ¨ ¨ ¨ ˆ DrdJ´1 , dJ s ˆ R ÝÑ Dr0, Ks, J ´ÿ ¯ py1 pt1 q, . . . , yJ ptJ q, xJ qt1 ,...,tJ ÞÝÑ yj ptq ¨ 1rdj´1 ,dj q ptq ` xJ ¨ 1tKu ptq tPr0,Ks j“1 x1 ptqqtPr0,Ks in probability. in order to obtain the desired conditional weak convergence for pW C Derivation of the Asymptotic Covariance of Multiple NelsonAalen Estimators for Cumulative Cause-Specific Hazards Consider the situation of two competing risks. In order to derive the asymptotic covariance of two cause-specific Nelson-Aalen estimators, we first note that, as n Ñ 8, 2 ÿ ? ? d p pj ´ Aj q ÝÑ npA ´ Aq “ npA U1 ` U2 “ U j“1 by the continuous mapping theorem. The covariance function of U is given by ż s^t 2 covpU psq, U ptqq “ σ ps ^ tq “ 0 1 ´ ∆Apuq dApuq H̄puq but on the other hand covpU psq, U ptqq “ 2 ÿ covpUj psq, Uj ptqq ` covpU1 psq, U2 ptqq ` covpU1 ptq, U2 psqq. j“1 Solving for the unknown covariances on the right-hand side of the previous display, we obtain 2 ż s^t ÿ 1 ´ ∆Apuq 1 ´ ∆Aj puq covpU1 psq, U2 ptqq ` covpU1 ptq, U2 psqq “ dApuq ´ dAj puq H̄puq H̄puq 0 j“1 0 ż s^t ż s^t ∆A1 puq ∆A2 puq “´ dA2 puq ´ dA1 puq H̄puq H̄puq 0 0 ż s^t 27 Due to symmetry and inductively, it follows that ż s^t σj` ps ^ tq “ covpUj psq, U` ptqq “ ´ 0 ∆Aj puq dA` puq H̄puq for j ‰ `, j, ` “ 1, . . . , k, even in the situation of k P N competing risks. D Consistency of the Discretization-Adjusted Wild Bootstrap for the Multivariate Nelson-Aalen Estimator The proof of tightness follows along the same lines as that of Theorem 2.2. It only remains to calculate the finite-dimensional marginal limit distributions. These are calculated with the help of Theorem A.1 in Beyersmann et al. (2013): Therefore, we abbreviate xj ptq “ W n ÿ ξjji Zn,jji ` i“1 k ÿ signp` ´ jq n ÿ ξj`i Z̃n,j`i ` i“1 `“1 k ÿ signp` ´ jq n ÿ ξ`ji Z̃n,`ji . i“1 `“1 Further, consider arbitrary points of time 0 ď t1 ď ¨ ¨ ¨ ď tm ď K and the vector x1 pt1 q, . . . , W x1 ptm q, W x2 pt1 q, . . . , W x2 ptm q . . . , W xk pt1 q, . . . , W xk ptm qq. pW x1 pt1 q, W x1 pt2 qq and pW x1 pt1 q, W x2 pt2 qq Due to analogy, it is enough to calculate the entries corresponding to pW of the limit of the matrix n ” ´ ı ÿ ÿ ÿ p :“ 1tj “ j̃u Γ Zn,jji pta qZn,jji ptb q ` Z̃n,j`i pta qZ̃n,j`i ptb q ` Z̃n,`ji pta qZ̃n,`ji ptb q i“1 n ” ÿ ´ 1tj ‰ j̃u `‰j `‰j ı¯ Z̃n,j j̃i pta qZ̃n,j j̃i ptb q ` Z̃n,j̃ji pta qZ̃n,j̃ji ptb q . a,b“1,...,m; j,j̃“1,...,k i“1 We start by calculating the entry for a “ 1, b “ 2, j “ j̃ “ 1, that is, n ” ÿ Zn,11i pt1 qZn,11i pt2 q ` i“1 “n k ÿ Z̃n,1`i pt1 qZ̃n,1`i pt2 q ` `“2 n ż t1 ÿ i“1 0 k ÿ ı Z̃n,`1i pt1 qZ̃n,`1i pt2 q `“2 k ÿ n ż t1 n ż t1 ” ÿ ÿ ∆N1 puq dN`i puq ∆N` puq dN1i puq ı Y puq ´ ∆N puq dN1i puq 1 ` n ` n Y puq Y 2 puq 2 `“2 i“1 0 Y puq Y 2 puq Y puq Y 2 puq i“1 0 28 ż t1 “n 0 ż t1 “n 0 ż t1 ż t1 k Y puq ´ ∆N puq dN1 puq 1 ÿ ” ∆N` puq dN1 puq ı ∆N1 puq dN` puq ` ` n n Y 2 puq Y puq 2 `“2 Y 2 puq Y puq Y 2 puq Y puq 0 0 Y puq ´ ∆N1 puq dN1 puq . Y 2 puq Y puq Here, the last equality follows from ∆N1 dN` “ ∆N` dN1 for all `. By the Glivenko-Cantelli theorem in combination with the continuous mapping theorem, it follows that the quantity in the previous display converges to σ12 pt1 q in probability as n Ñ 8. p for a “ 1, b “ 2, j “ j̃ “ 2: Now, consider the entry of Γ ż t1 ż t1 n ” ı ÿ 1” ∆N1 puq dN2 puq ∆N2 puq dN1 puq ı Z̃n,12i pt1 qZ̃n,12i pt2 q ` Z̃n,21i pt1 qZ̃n,21i pt2 q “ ´ n ` n . ´ 2 Y 2 puq Y puq Y 2 puq Y puq 0 0 i“1 By the same arguments as before, this is a consistent estimator for σ12 pt1 q as n Ñ 8. E Derivation of the Asymptotic Covariance Function of an AalenJohansen Estimator in the Competing Risks Set-Up . In order to derive the the covariance function of ż¨ ż¨ 1 ´ F2 pu´q ´ F1 p¨q F1 pu´q ´ F1 p¨q dU1 puq ` dU2 puq, 1 ´ ∆Apuq 1 ´ ∆Apuq 0 0 at any ps, tq P r0, Ks2 , we exemplarily calculate the covariance function of the first integral and the covariance function between both integrals. Hence, as the covariance function ps, tq ÞÑ σ12 ps ^ tq of U1 only increases along the diagonal, żt ´ ż s 1 ´ F pu´q ´ F psq ¯ 1 ´ F2 pu´q ´ F1 ptq 2 1 dU1 puq, dU1 puq cov 1 ´ ∆Apuq 1 ´ ∆Apuq 0 0 ż s^t p1 ´ F2 pu´q ´ F1 psqqp1 ´ F2 pu´q ´ F1 ptqq 2 “ dσ1 puq p1 ´ ∆Apuqq2 0 ż s^t p1 ´ F2 pu´q ´ F1 psqqp1 ´ F2 pu´q ´ F1 ptqq 1 ´ ∆A1 puq “ dA1 puq. p1 ´ ∆Apuqq2 H̄puq 0 29 Furthermore, we similarly have for the covariance between both integrals that żt ´ ż s 1 ´ F pu´q ´ F psq ¯ F1 pu´q ´ F1 ptq 2 1 cov dU1 puq, dU2 puq 1 ´ ∆Apuq 1 ´ ∆Apuq 0 0 ż s^t p1 ´ F2 pu´q ´ F1 psqqpF1 pu´q ´ F1 ptqq “ dσ12 puq p1 ´ ∆Apuqq2 0 ż s^t p1 ´ F2 pu´q ´ F1 psqqpF1 pu´q ´ F1 ptqq ∆A1 puq dA2 puq. “´ p1 ´ ∆Apuqq2 H̄puq 0 Finally, including also the remaining two analogous terms, we obtain the following asymptotic covariance function of the Aalen-Johansen estimator for the first cumulative incidence function as the sum of all four covariance functions: ż s^t ps, tq ÞÑ p1 ´ F2 pu´q ´ F1 psqqp1 ´ F2 pu´q ´ F1 ptqq 1 ´ ∆A1 puq dA1 puq p1 ´ ∆Apuqq2 H̄puq 0 ż s^t pF1 pu´q ´ F1 psqqpF1 pu´q ´ F1 ptqq 1 ´ ∆A2 puq ` dA2 puq p1 ´ ∆Apuqq2 H̄puq 0 ż s^t p1 ´ F2 pu´q ´ F1 psqqpF1 pu´q ´ F1 ptqq ∆A1 puq ´ dA2 puq p1 ´ ∆Apuqq2 H̄puq 0 ż s^t p1 ´ F2 pu´q ´ F1 ptqqpF1 pu´q ´ F1 psqq ∆A2 puq dA1 puq. ´ p1 ´ ∆Apuqq2 H̄puq 0 References A. Allignol, M. Schumacher, and J. Beyersmann. A note on variance estimation of the AalenJohansen estimator of the cumulative incidence function in competing risks, with a view towards left-truncated data. Biom. J., 52(1):126–137, 2010. P. K. Andersen, Ø. Borgan, R. D. Gill, and N. Keiding. Statistical Models Based on Counting Processes. Springer, New York, 1993. J. Beyersmann, M. Pauly, and S. Di Termini. Weak Convergence of the Wild Bootstrap for the Aalen-Johansen Estimator of the Cumulative Incidence Function of a Competing Risk. Scandinavian Journal of Statistics, 40(3), 2013. T. Bluhmki, D. Dobler, J. Beyersmann, and M. Pauly. The Wild Bootstrap for Multivariate NelsonAalen Estimators. Submitted article. arXiv preprint:1602.02071v2, 2016. D. R. Cox. Regression Models and Life-Tables. Journal of the Royal Statistical Society, Series B (Methodological), 34(2):187–220, 1972. 30 D. Dobler and M. Pauly. Bootstrapping Aalen-Johansen processes for competing risks: Handicaps, solutions, and limitations. Electronic Journal of Statistics, 8(2):2779–2803, 2014. D. Dobler, J. Beyersmann, and M Pauly. Non-strange weird resampling for complex survival data. Preprint arXiv:1507.02838, 2015. D. Y. Lin. Non-parametric inference for cumulative incidence functions in competing risks studies. Statistics and Medicine, 16:901–910, 1997. D. Y. Lin, L. J. Wei, and Z. Ying. Checking the Cox model with cumulative sums of martingalebased residuals. Biometrika, 80(3):557–572, 1993. T. Martinussen and T. H. Scheike. Dynamic regression models for survival data. Statistics for Biology and Health. Springer, New York, 2006. R Development Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2016. URL http://www.R-project.org. A. W. van der Vaart and J. Wellner. Weak Convergence and Empirical Processes. Springer, New York, 1996. 31
10math.ST
arXiv:1512.08675v1 [math.RA] 29 Dec 2015 CHIEF FACTORS OF LIE ALGEBRAS DAVID A. TOWERS Abstract. In group theory the chief factors allow a group to be studied by its representation theory on particularly natural irreducible modules. It is to be expected, therefore, that they will play an important role in the study of Lie algebras. In this article we survey a few of their properties. 1. Introduction Throughout L will denote a finite-dimensional Lie algebra over a field F . We call a subalgebra I a subideal of a Lie algebra L if there is a chain of subalgebras I = I0 < I1 < . . . < In = L, where Ij is an ideal of Ij+1 for each 0 ≤ j ≤ n − 1. Put L1 = L, Lk+1 = [Lk , L] for k ≥ 1. These are the terms of the lower central series for L. We say that L has nilpotency class n if Ln 6= 0 but Ln+1 = 0. Let U be a subalgebra of L. If F has characteristic p > 0 we call U nilregular if the nilradical of U , N (U ), has nilpotency class less than p − 1. If F has characteristic zero we regard every subalgebra of L as being nilregular. We say that U is characteristic in L if it is invariant under all derivations of L. Nilregular ideals of L have the property that their nilradicals are characteristic in L. Details of the results in this section can be found in [12]. Theorem 1.1. (i) If I is a nilregular ideal of L then N (I) ⊆ N (L). (ii) If I is a nilregular subideal of L and every subideal of L containing I is nilregular, then N (I) ⊆ N (L). This result was proved by Schenkman ([6]) for fields of characteristic zero; in characteristic p it follows from a more recent result of Maksimenko ([4]). Similarly, we will call the subalgebra U solregular if the underlying field F has characteristic zero, or if it has characteristic p and the (solvable) radical of U , R(U ), has derived length less than log2 p. Then we have the following corresponding theorem, which uses a result of Petravchuk ([5]). Theorem 1.2. (i) If I is a solregular ideal of L then R(I) ⊆ R(L). (ii) If I is a solregular subideal of L and every subideal of L containing I is solregular, then R(I) ⊆ R(L). These enable us to determine what the minimal ideals of L look like. Theorem 1.3. Let L be a Lie algebra over a field F , and let I be a minimal non-abelian ideal of L. Then either Key words and phrases. L-Algebras, L-Equivalence, c-factor, m-factor, cc´-type. 2010 Mathematics Subject Classification. 17B05, 17B20, 17B30, 17B50. 1 2 DAVID A. TOWERS (i) I is simple or (ii) F has characteristic p, N (I) has nilpotency class greater than or equal to p − 1, and R(I) has derived length greater than or equal to log2 p. As a result of the above we will call the subalgebra U regular if it is either nilregular or solregular; otherwise we say that it is irregular. Then we have the following corollary. Corollary 1.4. Let L be a Lie algebra over a field F . Then every minimal ideal of L is abelian, simple or irregular. Block’s Theorem on differentiably simple rings (see [2]) describes the irregular minimal ideals as follows. Theorem 1.5. Let L be a Lie algebra over a field of characteristic p > 0 and let I be an irregular minimal ideal of L. Then I ∼ = S ⊗ On , where S is simple and On is the truncated polynomial algebra in n indeterminates. Moreover, N (I) has nilpotency class p − 1 and R(I) has derived length ⌈log2 p⌉. 2. Primitive Lie algebras Next we introduce the concept of a primitive Lie algebra. Details of the results in this section can be found in [10]. A word of warning - this terminology has been used for a different concept elsewhere. If U is a subalgebra of L we define UL , the core (with respect to L) of U to be the largest ideal of L contained in U . We say that U is core-free in L if UL = 0. We shall call L primitive if it has a core-free maximal subalgebra. The centraliser of U in L is CL (U ) = {x ∈ L : [x, U ] = 0}. There are three types of primitive Lie algebra: 1. primitive of type 1 if it has a unique minimal ideal that is abelian; 2. primitive of type 2 if it has a unique minimal ideal that is non-abelian; and 3. primitive of type 3 if it has precisely two distinct minimal ideals each of which is non-abelian. Of course, primitive Lie algebras of types 2 and 3 are semisimple, and those of types 1 and 2 are monolithic. (A Lie algebra L is called monolithic if it has a unique minimal ideal W , the monolith of L.) Example 2.1. Examples of each type are easy to find. 1. Clearly every primitive solvable Lie algebra is of type 1. 2. Every simple Lie algebra is primitive of type 2. 3. If S is a simple Lie algebra then L = S ⊕ S is primitive of type 3 with core-free maximal subalgebra D = {s + s : s ∈ S}, the diagonal subalgebra of L. Let M be a maximal subalgebra of L. Then M/ML is a core-free maximal subalgebra of L/ML . We say that M is 1. a maximal subalgebra of type 1 if L/ML is primitive of type 1; 2. a maximal subalgebra of type 2 if L/ML is primitive of type 2; and 3. a maximal subalgebra of type 3 if L/ML is primitive of type 3. We say that an ideal A is complemented in L if there is a subalgebra U of L such that L = A + U and A ∩ U = 0. For primitive solvable Lie algebras we have the following analogue of Galois’ Theorem for groups. CHIEF FACTORS OF LIE ALGEBRAS 3 Theorem 2.2. 1. If L is a solvable primitive Lie algebra then all core-free maximal subalgebras are conjugate. 2. If A is a self-centralising minimal ideal of a solvable Lie algebra L, then L is primitive, A is complemented in L, and all complements are conjugate. The Frattini ideal of L, φ(L), is the core of intersection of the maximal subalgebras of L. We say that L is φ-free if φ(L) = 0. Then we have the following characterisation of primitive Lie algebras of type 1. Theorem 2.3. Let L be a Lie algebra over a field F . 1. L is primitive of type 1 if and only if L is monolithic, with abelian monolith W , and φ-free. 2. If F has characteristic zero, then L is primitive of type 1 if and only if L = W ⋉ (C ⊕ S) (semi-direct sum), where W is the abelian monolith of L, C is an abelian subalgebra of L, every element of which acts semisimply on W , and S is a Levi subalgebra of L. 3. If L is solvable, then L is primitive if and only if it has a self-centralising minimal ideal A. For type 2 we have Theorem 2.4. 1. L is primitive of type 2 if and only if L ∼ = U + (S ⊗ On ), where S ⊗ On is an ideal of L and S is simple. 2. If F has characteristic zero, then L is primitive of type 2 if and only if L is simple. 3. L is primitive of type 2 if and only if there is a primitive Lie algebra X of type 3 such that L ∼ = X/B for a minimal ideal B of L. For type 3 we have Theorem 2.5. 1. L is primitive of type 3 if and only if L has two distinct minimal ideals B1 and B2 with a common complement and such that the factor algebras L/Bi are primitive of type 2 for i = 1, 2. Moreover, B1 and B2 are both isomorphic to S ⊗ On , where S is simple. 2. If F has characteristic zero, then L is primitive of type 3 if and only if L = S ⊕ S, where S is simple. 3. Chief factors The factor algebra A/B is called a chief factor of L if B is an ideal of L and A/B is a minimal ideal of L/B. So chief factors are as described in Corollary 1.4 and Theorem 1.5. We can identify different types of chief factor; details for this section can be found in [10]. A chief factor A/B is called Frattini if A/B ⊆ φ (L/B) . This concept was first introduced in [8]. If there is a subalgebra, M such that L = A + M and B ⊆ A ∩ M, we say that A/B is a supplemented chief factor of L, and that M is a supplement of A/B in L. Also, if A/B is a non-Frattini chief factor of L, then A/B is supplemented by a maximal subalgebra M of L. If A/B is a chief factor of L supplemented by a subalgebra M of L, and A ∩ M = B then we say that A/B is complemented chief factor of L, and M is a complement of A/B in L. When L is solvable, it is easy to see that a chief 4 DAVID A. TOWERS factor is Frattini if and only if it is not complemented. Then we have the following generalisation of the Jordan-Hölder Theorem. Theorem 3.1. Let 0 < A1 < . . . < An = L (1) 0 < B1 < . . . < Bn = L (2) be chief series for the Lie algebra L. Then there is a bijection between the chief factors of these two series such that corresponding factors are isomorphic as Lmodules and such that the Frattini chief factors in the two series correspond. The number of Frattini chief factors or of chief factors which are complemented by a maximal subalgebra of a finite-dimensional Lie algebra L is the same in every chief series for L. However, this is not the case for the number of chief factors which are simply complemented in L; in [11] we determine the possible variation in that number. Note that if L is a primitive Lie algebra of type 3, its two minimal ideals are not L-isomorphic, so we introduce the following concept. We say that two chief factors of L are L-connected if either they are L-isomorphic, or there exists an epimorphic image L of L which is primitive of type 3 and whose minimal ideals are L-isomorphic, respectively, to the given factors. (It is clear that, if two chief factors of L are L-connected and are not L-isomorphic, then they are nonabelian and there is a single epimorphic image of L which is primitive of type 3 and which connects them.) Then, as we would hope, Theorem 3.2. The relation ‘is L-connected to’ is an equivalence relation on the set of chief factors. Let A/B be a supplemented chief factor of L and put J = {ML : M is a maximal subalgebra of L supplementing a chief factor L-connected to A/B}. Let R = ∩{N : N ∈ J } and C = A + CL (A/B). Then we call C/R the crown of L associated with A/B. This object gives much information about the supplemented chief factors of L. Theorem 3.3. Let C/R be the crown associated with the supplemented chief factor A/B of L. Then C/R = Soc(L/R). Furthermore (i) every minimal ideal of L/R is a supplemented chief factor of L which is L-connected to A/B, and (ii) no supplemented chief factor of L above C or below R is L-connected to A/B. In other words, there are r ideals A1 , . . . , Ar of L such that C/R = A1 /R ⊕ . . . ⊕ Ar /R where Ai /R is a supplemented chief factor of L which is L-connected to A/B for i = 1, . . . , r and r is the number of supplemented chief factors of L which are L-connected to A/B in each chief series for L. Moreover, φ(L/R) = 0. Corollary 3.4. Two supplemented chief factors of L define the same crown if and only if they are L-connected. CHIEF FACTORS OF LIE ALGEBRAS 5 Theorem 3.5. Let L be a solvable Lie algebra, and let C/R = C̄ be the crown associated with a supplemented chief factor of L. Then C̄ is complemented in L̄, and any two complements are conjugate by an automorphism of the form 1 + ad a for some a ∈ C̄. Finally, in [1], Barnes determined for a solvable Lie algebra which irreducible L-modules A have the property that H 1 (L, A) = 0. Theorem 3.6. Let L be a solvable Lie algebra and let A be an irreducible L-module. Then H 1 (L, A) = 0 if and only if L has no complemented chief factor isomrphic to A. 4. Covering and Avoidance The subalgebra U avoids the factor algebra Ai /Ai−1 if U ∩ Ai = U ∩ Ai−1 ; likewise, U covers Ai /Ai−1 if U +Ai = U +Ai−1 . We say that U has the covering and avoidance property of L if U either covers or avoids every chief factor of L. We also say that U is a CAP -subalgebra of L. Then these subalgebras give characterisations of solvable and supersolvable Lie algebras; details can be found in [9]. There are a number of ways in which CAP -subalgebras arise. For a subalgebra B of L we denote by [B : L] the set of all subalgebras S of L with B ⊆ S ⊆ L, and by [B : L]max the set of maximal subalgebras in [B : L]; that is, the set of maximal subalgebras of L containing B. We define the set I by i ∈ I if and only if Ai /Ai−1 is not a Frattini chief factor of L. For each i ∈ I put Mi = {M ∈ [Ai−1 , L]max : Ai 6⊆ M }. Then U is a prefrattini subalgebra of L if \ U= Mi for some Mi ∈ Mi . i∈I It was shown in [8] that, when L is solvable, this definition does not depend on the choice of chief series, and that the prefrattini subalgebras of L cover the Frattini chief factors and avoid the rest; that is, they are CAP -subalgebras of L. Further examples were given by Stitzinger in [7], where he proved the following result (see [7] for definitions of the terminology used). Theorem 4.1. ([7, Theorem 2] Let F be a saturated formation of solvable Lie algebras, and let U be an F -normaliser of L. Then U covers every F -central chief factor of L and avoids every F -eccentric chief factor of L. The chief factor Ai /Ai−1 is called central if [L, Ai ] ⊆ Ai−1 and eccentric otherwise. A particular case of the above result is the following theorem, due to Hallahan and Overbeck. Theorem 4.2. ([3, Theorem 1]) Let L be a metanilpotent Lie algebra. Then C is a Cartan subalgebra of L if and only if it covers the central chief factors and avoids the eccentric ones. A subalgebra U of L will be called ideally embedded in L if IL (U ) contains a Cartan subalgebra of L, where IL (U ) = {x ∈ L : [x, U ] ⊆ U } is the idealiser of U in L . Clearly, any subalgebra containing a Cartan subalgebra of L and any ideal of L is ideally embedded in L. Then we have the following extension of Theorem 4.2. 6 DAVID A. TOWERS Theorem 4.3. Let L be a metanilpotent Lie algebra and let U be ideally embedded in L. Then U is a CAP -subalgebra of L. Corollary 4.4. Let L be any solvable Lie algebra and let U be an ideally embedded subalgebra of L with K = N2 (L) ⊆ U . Then U is a CAP -subalgebra of L. Another set of examples of CAP -subalgebras, which don’t require L to be solvable, is given by the next result. Theorem 4.5. Let L be any Lie algebra, let U be a supplement to an ideal B in L, and suppose that B k ⊆ U for some k ∈ N. Then U is a CAP -subalgebra of L. We can calculate the dimension of CAP -subalgebras in terms of the chief factors that they cover. Lemma 4.6. Let U be a CAP -subalgebra of L, let 0 = A0 < A1 < . . . < An = L be a chiefPseries for L and let I = {i : 1 ≤ i ≤ n, U covers Ai /Ai−1 }. Then dim U = i∈I (dim Ai − dim Ai−1 ). We have the following characterisations of solvable and supersolvable Lie algebras. Theorem 4.7. Every one-dimensional subalgebra of L is a CAP -subalgebra of L if and only if L is supersolvable. Theorem 4.8. Let L be a Lie algebra over any field F . Then L is solvable if and only if all of its maximal subalgebras are CAP -subalgebras. Theorem 4.9. Let L be a Lie algebra over a field F which has characteristic zero, or is algebraically closed field and of characteristic greater than 5. Then L is solvable if and only if there is a maximal subalgebra M of L such that M is a solvable CAP -subalgebra of L. References [1] D.W. Barnes, ‘First cohomology groups of soluble Lie algebras’, J. Algebra 46 (1977), 292– 297. [2] R.E. Block, ‘Differentiably simple algebras’, Bull. Amer. Math, Soc. 74 (1968), 433 – 459. [3] Hallahan, C.B. and Overbeck, J., ‘Cartan subalgebras of meta-nilpotent Lie algebras’, Math. Zeit. 116 (1970), 215–217. [4] D.V. Maksimenko, ‘On action of outer derivations on nilpotent ideals of Lie algebras’, Algebra Discrete Math. 1 (2009), 74–82. [5] A.P. Petravchuk, ‘On behavior of solvable ideals of Lie algebras under outer derivations’, Comm. Alg. 38 (2010), 2311–2316. [6] E. Schenkman, ‘A theory of subinvariant Lie algebras’, Amer. J. Math. 73 (1951), 453–474. [7] Stitzinger, E.L., ‘Covering avoidance for saturated formations of solvable Lie algebras’, Math. Zeit. 106 (1972), 237–249. [8] D.A. Towers, ‘Complements of intervals and prefrattini subalgebras of solvable Lie algebras’, Proc. Amer. Math. Soc. 141 (2013), 1893–1901. [9] D.A. Towers, ‘Subalgebras that cover or avoid chief factors of Lie algebras’, Proc. Amer. Math. Soc. 143 (2015), 3377–3385. [10] D.A. Towers, ‘Maximal subalgebras and chief factors of Lie algebras’, J. Pure Appl. Algebra 220 (2016), 482–493. [11] D.A. Towers and Z. Ciloglu, ‘On complemented non-abelian chief factors of a Lie algebra’, arXiv:1509.07282 . [12] D.A. Towers, ‘The generalised nilradical of a Lie algebra’, arXiv:1512.01018. Lancaster University, Department of Mathematics and Statistics, LA1 4YF Lancaster, ENGLAND E-mail address: [email protected]
4math.GR
Logical Methods in Computer Science Vol. 8 (1:26) 2012, pp. 1–63 www.lmcs-online.org Submitted Published Sep. 7, 2011 Mar. 23, 2012 STATIC ANALYSIS OF RUN-TIME ERRORS IN EMBEDDED REAL-TIME PARALLEL C PROGRAMS ∗ ANTOINE MINÉ CNRS & École Normale Supérieure, 45 rue d’Ulm, 75005 Paris, France e-mail address: [email protected] Abstract. We present a static analysis by Abstract Interpretation to check for run-time errors in parallel and multi-threaded C programs. Following our work on Astrée, we focus on embedded critical programs without recursion nor dynamic memory allocation, but extend the analysis to a static set of threads communicating implicitly through a shared memory and explicitly using a finite set of mutual exclusion locks, and scheduled according to a real-time scheduling policy and fixed priorities. Our method is thread-modular. It is based on a slightly modified non-parallel analysis that, when analyzing a thread, applies and enriches an abstract set of thread interferences. An iterator then re-analyzes each thread in turn until interferences stabilize. We prove the soundness of our method with respect to the sequential consistency semantics, but also with respect to a reasonable weakly consistent memory semantics. We also show how to take into account mutual exclusion and thread priorities through a partitioning over an abstraction of the scheduler state. We present preliminary experimental results analyzing an industrial program with our prototype, Thésée, and demonstrate the scalability of our approach. 1. Introduction Ensuring the safety of critical embedded software is important as a single “bug” can have catastrophic consequences. Previous work on the Astrée analyzer [8] demonstrated that static analysis by Abstract Interpretation could help, when specializing an analyzer to a class of properties and programs — namely in that case, the absence of run-time errors (such as arithmetic and memory errors) on synchronous control / command embedded avionic C software. In this article, we describe ongoing work to achieve similar results for multithreaded and parallel embedded C software. Such an extension is demanded by the current trend in critical embedded systems to switch from large numbers of single-program processors communicating through a common bus to single-processor multi-threaded applications 1998 ACM Subject Classification: D.2.4, F.3.1, F.3.2. Key words and phrases: Abstract interpretation, parallel programs, run-time errors, static analysis. ∗ This article is an extended version of our article [47] published in the Proceedings of the 20th European Symposium on Programming (ESOP’11). This work was partially supported by the INRIA project “Abstraction” common to CNRS and ENS in France, and by the project ANR-11-INSE-014 from the French Agence nationale de la recherche. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-8 (1:26) 2012 CC Antoine Miné Creative Commons 2 ANTOINE MINÉ communicating through a shared memory — for instance, in the context of Integrated Modular Avionics [60]. Analyzing each thread independently with a tool such as Astrée would not be sound and could miss bugs that only appear when threads interact. In this article, we focus on detecting the same kinds of run-time errors as Astrée does, while taking thread communications into account in a sound way, including accesses to the shared memory and synchronization primitives. In particular, we correctly handle the effect of concurrent threads accessing a common variable without enforcing mutual exclusion by synchronization primitives, and we report such accesses — these will be called data-races in the rest of the article. However, we ignore other concurrency hazards such as dead-locks, live-locks, and priority inversions, which are considered to be orthogonal issues. Our method is based on Abstract Interpretation [13], a general theory of the approximation of semantics which allows designing static analyzers that are fully automatic and sound by construction — i.e., consider a superset of all program behaviors. Such analyzers cannot miss any bug in the class of errors they analyze. However, they can cause spurious alarms due to over-approximations, an unfortunate effect we wish to minimize while keeping the analysis efficient. To achieve scalability, our method is thread-modular and performs a rely-guarantee reasoning, where rely and guarantee conditions are inferred automatically. At its core, it performs a sequential analysis of each thread considering an abstraction of the effects of the other threads, called interferences. Each sequential analysis also collects a new set of interferences generated by the analyzed thread. It then serves as input when analyzing the other threads. Starting from an empty set of interferences, threads are re-analyzed in sequence until a fixpoint of interferences is reached for all threads. Using this scheme, few modifications are required to a sequential analyzer in order to analyze multi-threaded programs. Practical experiments suggest that few thread re-analyses are required in practice, resulting in a scalable analysis. The interferences are considered in a flow-insensitive and non-relational way: they store, for each variable, an abstraction of the set of all values it can hold at any program point of a given thread. Our method is however quite generic in the way individual threads are analyzed. They can be analyzed in a fully or partially flow-sensitive, context-sensitive, path-sensitive, and relational way (as is the case in our prototype). As we target embedded software, we can safely assume that there is no recursion, dynamic allocation of memory, nor dynamic creation of threads nor locks, which makes the analysis easier. In return, we handle two subtle points. Firstly, we consider a weakly consistent memory model: memory accesses not protected by mutual exclusion (i.e., data-races) may cause behaviors that are not the result of any thread interleaving to appear. The reason is that arbitrary observation by concurrent threads can expose compiler and processor optimizations (such as instruction reordering) that are designed to be transparent on non-parallel programs only. We prove that our semantics is invariant by large classes of widespread program transformations, so that an analysis of the original program is also sound with respect to reasonably compiled and optimized versions. Secondly, we show how to take into account the effect of a real-time scheduler that schedules the threads on a single processor following strict, fixed priorities. According to this scheduling algorithm, which is quite common in the realm of embedded real-time software — e.g., in the real-time thread extension of the POSIX standard [34], or in the ARINC 653 avionic operating system standard [3] — only the unblocked thread of highest priority may run. This ensures STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 3 some lock-less mutual exclusion properties that are actually exploited in real-time embedded programs and relied on for their correctness (this includes the industrial application our prototype currently targets). We show how our analysis can take these properties into account, but we also present an analysis that assumes less properties on the scheduler and is thus sound for true multi-processors and non-real-time schedulers. We handle synchronization properties (enforced by either locks or priorities) through a partitioning with respect to an abstraction of the global scheduling state. The partitioning recovers some kind of inter-thread flow-sensitivity that would otherwise be completely abstracted away by the interference abstraction. The approach presented in this article has been implemented and used at the core of a prototype analyzer named Thésée. It leverages the static analysis techniques developed in Astrée [8] for single-threaded programs, and adds the support for multiple threads. We used Thésée to analyze in 27 h a large (1.7 M lines) multi-threaded industrial embedded C avionic application, which illustrates the scalability of our approach. Organisation. Our article is organized as follows. First, Sec. 2 presents a classic nonparallel semantics and its static analysis. Then, Sec. 3 extends them to several threads in a shared memory and discusses weakly consistent memory issues. A model of the scheduler and support for locks and priorities are introduced in Sec. 4. Our prototype analyzer, Thésée, is presented in Sec. 5, as well as some experimental results. Finally, Sec. 6 discusses related work, and Sec. 7 concludes and envisions future work. This article defines many semantics. They are summarized in Fig. 1, using ⊆ to denote the “is less abstract than” relation. We alternate between two kinds of concrete semantics: semantics based on control paths (Pπ , P∗ , PH ), that can model precisely thread interleavings and are also useful to characterize weakly consistent memory models (P0∗ , P0H ), and semantics by structural induction on the syntax (P, PI , PC ), that give rise to effective abstract interpreters (P] , P]I , P]C ). Each semantics is presented in its subsection and adds some features to the previous ones, so that the final abstract analysis P]C presented in Sec. 4.5 should hopefully not appear as too complex nor artificial, but rather as the logical conclusion of a step-by-step construction. Our analysis has been mentioned first, briefly and informally, in [7, § VI]. We offer here a formal, rigorous treatment by presenting all the semantics fully formally, albeit on an idealised language, and by studying their relationship. The present article is an extended version of [47] and includes a more comprehensive description of the semantics as well as the proof of all theorems, that were omitted in the conference proceedings due to lack of space. Notations. In this article, we use the theory of complete lattices, denoting their partial order, join, and least element respectively as v, t, and ⊥, possibly with some subscript to indicate which lattice is considered. All the lattices we use are actually constructed by taking the Cartesian product of one or several powerset lattices — i.e., P(S) for some set S — v, t, and ⊥ are then respectively the set inclusion ⊆, the set union ∪, and the empty set ∅, applied independently to each component. Given a monotonic operator F in a complete lattice, we denote by lfp F its least fixpoint — i.e., F (lfp F ) = lfp F and ∀X : F (X) = X =⇒ lfp F v X — which exists according to Tarski [59, 14]. We denote t by A → B the set of functions from a set A to a set B, and by A −→ B the set of 4 ANTOINE MINÉ non-parallel semantics z { ⊆ P / P] (§2.2) (§2.3) parallel semantics z ⊆ = Pπ (§2.4) O ⊆ PC ; (§4.4) ⊆ ⊆ / Y F ⊆ PH (§4.2) O ⊆ P0∗ (§3.4) P∗ (§3.1) ⊆ PI (§3.2) ; O { P]I (§3.3) non-scheduled path-based semantics ⊆ ⊆ non-scheduled structured semantics / P]C (§4.5) P0H (§4.3) scheduled structured semantics scheduled path-based semantics Figure 1: Semantics defined in the article. complete t−morphisms from a complete lattice A to a complete lattice B, i.e., such that F F (tA X) = B { F (x) | x ∈ X } for any finite or infinite set X ⊆ A. Additionally, such a function is monotonic. We use the theory of Abstract Interpretation by Cousot and Cousot and, more precisely, its concretization-based (γ) formalization [16]. We use widenings (O) to ensure termination [17]. The abstract version of a domain, operator, or function is denoted with a ] superscript. We use the lambda notation λx : f (x) to denote functions. If f is a function, then f [x 7→ v] is the function with the same domain as f that maps x to v, and all other elements y 6= x to f (y). Likewise, f [∀x ∈ X : x 7→ g(x)] denotes the function that maps any x ∈ X to g(x), and other elements y ∈ / X to f (y). Boldface fonts are used for syntactic elements, such as “while” in Fig. 2. Pairs and tuples are bracketed by parentheses, as in X = (A, B, C), and can be deconstructed (matched) with the notation “let (A, −, C) = X in · · · ” where the “−” symbol denotes irrelevant tuple elements. The notation “let ∀x ∈ X : yx = · · · in · · · ” is used to bind a collection of variables (yx )x∈X at once. Semantic functions are denoted with double brackets, as in XJ y K, where y is an (optional) syntactic object, and X denotes the kind of objects (S for statements, E for expressions, P for programs, Π for control paths). The kind of semantics considered (parallel, non-parallel, abstract, etc.) is denoted by subscripts and superscripts over X, as exemplified in Fig. 1. Finally, we use finite words over arbitrary sets, using  and · to denote, respectively, the empty word and word concatenation. The concatenation · is def naturally extended to sets of words: A · B = { a · b | a ∈ A, b ∈ B }. 2. Non-parallel Programs This section recalls a classic static analysis by Abstract Interpretation of the run-time errors of non-parallel programs, as performed for instance by Astrée [8]. The formalization introduced here will be extended later to parallel programs, and it will be apparent that an analyzer for parallel programs can be constructed by extending an analyzer for non-parallel programs with few changes. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS stat ::= | | | X ← expr if expr ./ 0 then stat while expr ./ 0 do stat stat; stat (assignment into X ∈ V) (conditional) (loop) (sequence) expr ::= | | | X [c1 , c2 ] −` expr expr ` expr (variable X ∈ V) (constant interval, c1 , c2 ∈ R ∪ {±∞}) (unary operation, ` ∈ L) (binary operation, ` ∈ L) ./  ::= = | = 6 |<|>|≤|≥ ::= +| − | × | / 5 Figure 2: Syntax of programs. 2.1. Syntax. For the sake of exposition, we reason on a vastly simplified programming language. However, the results extend naturally to a realistic language, such as the subset of C excluding recursion and dynamic memory allocation considered in our practical experiments (Sec. 5). We assume a fixed, finite set of variable names V. A program is a single structured statement, denoted body ∈ stat. The syntax of statements stat and of expressions expr is depicted in Fig. 2. Constants are actually constant intervals [c1 , c2 ], which return a new arbitrary value between c1 and c2 every time the expression is evaluated. This allows modeling non-deterministic expressions, such as inputs from the environment, or stubs for expressions that need not be handled precisely, e.g., sin(x) could be replaced with [−1, 1]. Each unary and binary operator ` is tagged with a syntactic location ` ∈ L and we denote by L the finite set of all syntactic locations. The output of an analyzer will be the set of locations ` with errors — or rather, a superset of them, due to approximations. For the sake of simplicity, we do not handle procedures. These are handled by inlining in our prototype. We also focus on a single data-type (real numbers in R) and numeric expressions, which are sufficient to provide interesting properties to express, e.g., variable bounds, although in the following we will only discuss proving the absence of division by zero. Handling of realistic data-types (machine integers, floats arrays, structures, pointers, etc.) and more complex properties (such as the absence of numeric and pointer overflow) as done in our prototype is orthogonal, and existing methods apply directly — for instance [7]. 2.2. Concrete Structured Semantics P. As usual in Abstract Interpretation, we start by providing a concrete semantics, that is, the most precise mathematical expression of program semantics we consider. It should be able to express the properties of interest to us, i.e., which run-time errors can occur — only divisions by zero for the simplified language of Fig. 2. For this, it is sufficient that our concrete semantics tracks numerical invariants. As this problem is undecidable, it will be abstracted in the next section to obtain a sound static analysis. def A program environment ρ ∈ E maps each variable to a value, i.e., E = V → R. The semantics EJ e K of an expression e ∈ expr takes as input a single environment ρ, and outputs a set of values, in P(R), and a set of locations of run-time errors, in P(L). It is defined by structural induction in Fig. 3. Note that an expression can evaluate to one value, several 6 ANTOINE MINÉ EJ e K : E → (P(R) × P(L)) def EJ X Kρ = ({ ρ(X) }, ∅) def EJ [c1 , c2 ] Kρ = ({ c ∈ R | c1 ≤ c ≤ c2 }, ∅) def EJ −` e Kρ = let (V, Ω) = EJ e K ρ in ({ −x | x ∈ V }, Ω) def EJ e1 ` e2 Kρ = let (V1 , Ω1 ) = EJ e1 K ρ in let (V2 , Ω2 ) = EJ e2 K ρ in ({ x1  x2 | x1 ∈ V1 , x2 ∈ V2 ,  = 6 / ∨ x2 6= 0 }, Ω1 ∪ Ω2 ∪ { ` |  = / ∧ 0 ∈ V2 }) where  ∈ { +, −, ×, / } Figure 3: Concrete semantics of expressions. values (due to non-determinism in [c1 , c2 ]) or no value at all (in the case of a division by zero). To define the semantics of statements, we consider as semantic domain the complete lattice: def D = P(E) × P(L) (2.1) def with partial order v defined as the pairwise set inclusion: (A, B) v (A0 , B 0 ) ⇐⇒ A ⊆ A0 ∧ B ⊆ B 0 . We denote by t the associated join, i.e., pairwise set union. The structured semantics SJ s K of a statement s is a morphism in D that, given a set of environments R and errors Ω before a statement s, returns the reachable environments after s, as well as Ω enriched with the errors encountered during the execution of s. It is defined by structural induction in Fig. 4. We introduce the new statements e ./ 0? (where ./ ∈ { =, 6=, <, >, ≤, ≥ } is a comparison operator) which we call “guards.” These statements do not appear standalone in programs, but are useful to factor the semantic definition of conditionals and loops (they are similar to the guards used in Dijkstra’s Guarded Commands [25]). Guards will also prove useful to define control paths in Sec. 2.4. Guards filter their argument and keep only those environments where the expression e evaluates to a set containing a value v satisfying v ./ 0. The symbol 6./ denotes the negation of ./, i.e., the negation of =, 6=, <, >, ≤, ≥ is, respectively, 6=, =, ≥, ≤, >, <. Finally, the semantics of loops computes a loop invariant using the least fixpoint operator lfp. The fact that such fixpoints exist, and the related fact that the semantic functions are complete t−morphisms, i.e., SJ s K(ti∈I Xi ) = ti∈I SJ s KXi , is stated in the following theorem: Theorem 2.1. ∀s ∈ stat : SJ s K is well defined and a complete t−morphism. Proof. In Appendix A.1. We can now define the concrete structured semantics of the program as follows: def P = Ω, where (−, Ω) = SJ body K(E0 , ∅) (2.2) where E0 ⊆ E is a set of initial environments. We can choose, for instance, E0 = E or def E0 = { λX ∈ V : 0 }. Note that all run-time errors are collected while traversing the program structure; they are never discarded and all of them eventually reach the end of body, and so, appear in P, even if SJ body K(E0 , ∅) outputs an empty set of environments. Our STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 7 t SJ s K : D −→ D def SJ X ← e K(R, Ω) = (∅, Ω) t def SJ e ./ 0? K(R, Ω) = (∅, Ω) t F F def ρ∈R ρ∈R let (V, Ω0 ) = EJ e K ρ in ({ ρ[X 7→ v] | v ∈ V }, Ω0 ) let (V, Ω0 ) = EJ e K ρ in ({ ρ | ∃v ∈ V : v ./ 0 }, Ω0 ) SJ s1 ; s2 K(R, Ω) = (SJ s2 K ◦ SJ s1 K)(R, Ω) def SJ if e ./ 0 then s K(R, Ω) = (SJ s K ◦ SJ e ./ 0? K)(R, Ω) t SJ e 6./ 0? K(R, Ω) def SJ while e ./ 0 do s K(R, Ω) = SJ e 6./ 0? K (lfp λX : (R, Ω) t (SJ s K ◦ SJ e ./ 0? K)X) where ./ ∈ {=, 6=, <, >, ≤, ≥} Figure 4: Structured concrete semantics of statements. program semantics thus observes the set of run-time errors that can appear in any execution starting at the beginning of body in an initial environment. This includes errors occurring in executions that loop forever (such as infinite reactive loops in control / command software) or that halt before the end of body. 2.3. Abstract Structured Semantics P] . The semantics P is not computable as it involves least fixpoints in an infinite-height domain D, and not all elements in D are representable in a computer as D is uncountable. Even if we restricted variable values to a more realistic, large but finite, subset — such as machine integers or floats — naive computation in D would be unpractical. An effective analysis will instead compute an abstract semantics over-approximating the concrete one. The abstract semantics is parametrized by the choice of an abstract domain of environments obeying the signature presented in Fig. 5. It comprises a set E ] of computerrepresentable abstract environments, with a partial order ⊆]E (denoting abstract entailment) and an abstract environment E0] ∈ E ] representing initial environments. Each abstract environment represents a set of concrete environments through a monotonic concretization function γE : E ] → P(E). We also require an effective abstract version ∪]E of the set union ∪, as well as effective abstract versions S] J s K of the semantic operators SJ s K for assignment and guard statements. Only environment sets are abstracted, while error sets are repredef sented explicitly, so that the actual abstract semantic domain for S] J s K is D] = E ] × P(L), with concretization γ defined in Fig. 5. Figure 5 also presents the soundness conditions that state that an abstract operator outputs a superset of the environments and error locations returned by its concrete version. Finally, when E ] has infinite strictly increasing chains, we require a widening operator OE , i.e., a sound abstraction of the join ∪ with a termination guarantee to ensure the convergence of abstract fixpoint computations in finite time. There exist many abstract domains E ] , for instance the interval domain [13], where an abstract environment in E ] associates an interval to each variable, the octagon domain [46], where an abstract environment in E ] is a conjunction of constraints of the form ±X ± Y ≤ c with X, Y ∈ V, c ∈ R, or the polyhedra domain [21], where an abstract environment in E ] is a convex, closed (possibly unbounded) polyhedron. In the following, we will refer to assignments and guards collectively as primitive statements. Their abstract semantics S] J s K in D] depends on the choice of abstract domain; we assume it is provided as part of the abstract domain definition and do not discuss it. 8 ANTOINE MINÉ E] (set of abstract environments) γE : E] → P(E) (concretization) ⊥]E ∈ E ] s.t. γE (⊥]E ) = ∅ (empty abstract environment) E0] ∈ E ] s.t. γE (E0] ) ⊇ E0 (initial abstract environment) ⊆]E : (E ] × E ] ) → { true, false } s.t. X ] ⊆]E Y ] =⇒ γE (X ] ) ⊆ γE (Y ] ) (abstract entailment) ∪]E : (E ] × E ] ) → E ] s.t. γE (X ] ∪]E Y ] ) ⊇ γE (X ] ) ∪ γE (Y ] ) (abstract join) OE : (E ] × E ] ) → E ] (widening) s.t. γE (X ] OE Y ] ) ⊇ γE (X ] ) ∪ γE (Y ] ) ] ] and ∀(Yi] )i∈N : the sequence X0] = Y0] , Xi+1 = Xi] OE Yi+1 ] ] reaches a fixpoint Xk = Xk+1 for some k ∈ N def D] = E ] × P(L) γ: (abstraction of D) D] →D def s.t. γ(R] , Ω) = (γE (R] ), Ω) (concretization for D] ) S] J s K : D ] → D ] s.t. ∀s ∈ { X ← e, e ./ 0? } : (SJ s K ◦ γ)(R] , Ω) v (γ ◦ S] J s K)(R] , Ω) Figure 5: Abstract domain signature, and soundness and termination conditions. By contrast, the semantics of non-primitive statements can be derived in a generic way, as presented in Fig. 6. Note the similarity between these definitions and the concrete semantics of Fig. 4, except for the semantics of loops that uses additionally a widening operator O derived from OE . The termination guarantee of the widening ensures that, def given any (not necessarily monotonic) function F ] : D] → D] , the sequence X0] = (⊥]E , ∅), def ] ] Xi+1 = Xi] O F ] (Xi] ) reaches a fixpoint Xk] = Xk+1 in finite time k ∈ N. We denote this ] ] ] ] limit by lim λX : X O F (X ). Note that, due to widening, the semantics of a loop is generally not a join morphism, and even not monotonic [17], even if the semantics of the loop body is. Hence, there would be little benefit in imposing that the semantics of primitive statements provided with D] is monotonic, and we do not impose it in Fig. 5. Note also that lim F ] may not be the least fixpoint of F ] (in fact, such a least fixpoint may not even exist). The abstract semantics of a program can then be defined, similarly to (2.2), as: def P] = Ω, where (−, Ω) = S] J body K(E0] , ∅) . The following theorem states the soundness of the abstract semantics: Theorem 2.2. P ⊆ P] . Proof. In Appendix A.2. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS S] J s K : D ] → D ] 9 def S] J s1 ; s2 K(R] , Ω) = (S] J s2 K ◦ S] J s1 K)(R] , Ω) def S] J if e ./ 0 then s K(R] , Ω) = (S] J s K ◦ S] J e ./ 0? K)(R] , Ω) ∪] S] J e 6./ 0? K(R] , Ω) def S] J while e ./ 0 do s K(R] , Ω) = S] J e 6./ 0? K(lim λX ] : X ] O ((R] , Ω) ∪] (S] J s K ◦ S] J e ./ 0? K)X ] )) where: def (R1] , Ω1 ) ∪] (R2] , Ω2 ) = (R1] ∪]E R2] , Ω1 ∪ Ω2 ) def (R1] , Ω1 ) O (R2] , Ω2 ) = (R1] OE R2] , Ω1 ∪ Ω2 ) Figure 6: Derived abstract functions for non-primitive statements. The resulting analysis is flow-sensitive. It is relational whenever E ] is — e.g., with octagons [46]. The iterator follows, in the terminology of [10], a recursive iteration strategy. The advantage of this strategy is its efficient use of memory: few abstract elements need to be kept in memory during the analysis. Indeed, apart from the current abstract environment, a clever implementation of Fig. 6 exploiting tail recursion would only need to keep one extra environment per if e ./ 0 then s statement — to remember the (R] , Ω) argument while evaluating s — and two environments per while e ./ 0 do s statement — one for (R] , Ω) and one for the accumulator X ] — in the call stack of the abstract interpreter function S] . Thus, the maximum memory consumption is a function of the maximum nesting of conditionals and loops in the analyzed program, which is generally low. This efficiency is key to analyze large programs, as demonstrated by Astrée [8]. 2.4. Concrete Path-Based Semantics Pπ . The structured semantics of Sec. 2.2 is defined as an interpretation of the program by induction on its syntactic structure, which can be conveniently transformed into a static analyzer, as shown in Sec. 2.3. Unfortunately, the execution of a parallel program does not follow such a simple syntactic structure; it is rather defined as an interleaving of control paths from distinct threads (Sec. 3.1). Before considering parallel programs, we start by proposing in this section an alternate concrete semantics of non-parallel programs based on control paths. While its definition is different from the structured semantics of Sec. 2.2, its output is equivalent. A control path p is any finite sequence of primitive statements, among X ← e, e ./ 0?. We denote by Π the set of all control paths. Given a statement s, the set of control paths it spawns π(s) ⊆ Π is defined by structural induction as follows: def π(X ← e) = { X ← e } def π(s1 ; s2 ) = π(s1 ) · π(s2 ) def π(if e ./ 0 then s) = ({ e ./ 0? } · π(s)) ∪ { e 6./ 0? } def π(while e ./ 0 do s) = (lfp λX : {} ∪ (X · { e ./ 0? } · π(s))) · { e 6./ 0? } (2.3) where  denotes then empty path, and · denotes path concatenation, naturally extended to sets of paths. A primitive statement spawns a singleton path of length one, while a conditional spawns two sets of paths — one set where the then branch is taken, and one where it is not taken — and loops spawn an infinite number of paths — corresponding to all 10 ANTOINE MINÉ possible unrollings. Although π(s) is infinite whenever s contains a loop, it is possible that many control paths in π(s) are actually infeasible, i.e., have no corresponding execution. In particular, even if a loop s is always bounded, π(s) contains unrollings of arbitrary length. t We can now define the semantics ΠJ P K ∈ D −→ D of a set of paths P ⊆ Π as follows, reusing the semantics of primitive statements from Fig. 4 and the pairwise join t on sets of environments and errors: G def ΠJ P K (R, Ω) = { (SJ sn K ◦ · · · ◦ SJ s1 K)(R, Ω) | s1 · . . . · sn ∈ P } . (2.4) The path-based semantics of a program is then: def Pπ = Ω, where (−, Ω) = ΠJ π(body) K(E0 , ∅) . (2.5) 1 Note that this semantics is similar to the standard meet over all paths solution of data-flow problems — see, e.g., [48, § 2] — but for concrete executions in the infinite-height lattice D. The meet over all paths and maximum fixpoint solutions of data-flow problems are equal for distributive frameworks; similarly, our structured and path-based concrete semantics (based on complete t−morphisms) are equal: Theorem 2.3. ∀s ∈ stat : ΠJ π(s) K = SJ s K. Proof. In Appendix A.3. An immediate consequence of this theorem is that P = Pπ , hence the two semantics compute, in different ways, the same set of errors. 3. Parallel Programs in a Shared Memory In this section, we consider several threads that communicate through a shared memory, without any synchronization primitive yet — they will be introduced in Sec. 4. We also discuss here the memory consistency model, and its effect on the semantics and the static analysis. A program has now a fixed, finite set T of threads. To each thread t ∈ T is associated a statement body body t ∈ stat. All the variables in V are shared and can be accessed by all threads. 3.1. Concrete Interleaving Semantics P∗ . The simplest and most natural model of parallel program execution considers all possible interleavings of control paths from all threads. These correspond to sequentially consistent executions, as coined by Lamport [39]. A parallel control path p is a finite sequence of pairs (s, t), where s is a primitive statement (assignment or guard) and t ∈ T is a thread that executes it. We denote by Π∗ t the set of all parallel control paths. The semantics Π∗ J P K ∈ D −→ D of a set of parallel control paths P ⊆ Π∗ is defined as in the case of regular control paths (2.4), ignoring thread identifiers: G def Π∗ J P K (R, Ω) = { (SJ sn K ◦ · · · ◦ SJ s1 K)(R, Ω) | (s1 , −) · . . . · (sn , −) ∈ P } . (3.1) 1The lattices used in data-flow analysis and in abstract interpretation are dual: the former use a meet to join paths — hence the expression “meet over all paths” — while we employ a join t. Likewise, the greatest fixpoint solution of a data-flow analysis corresponds to our least fixpoint. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 11 We now denote by π∗ ⊆ Π∗ the set of parallel control paths spawned by the whole program. It is defined as: def π∗ = { p ∈ Π∗ | ∀t ∈ T : proj t (p) ∈ π(body t ) } (3.2) where the set π(body t ) of regular control paths of a thread is defined in (2.3), and proj t (p) extracts the maximal sub-path of p on thread t as follows: def proj t ((s1 , t1 ) · . . . · (sn , tn )) = si1 · . . . · sim such that ∀j : 1 ≤ ij < ij+1 ≤ n ∧ tij = t ∧ ∀k : (k < i1 ∨ k > im ∨ ij < k < ij+1 ) =⇒ tk 6= t . The semantics P∗ of a parallel program becomes, similarly to (2.5): def P∗ = Ω, where (−, Ω) = Π∗ J π∗ K(E0 , ∅) (3.3) i.e., we collect the errors that can appear in any interleaved execution of all the threads, starting in an initial environment. Because we interleave primitive statements, a thread can only interrupt another one between two primitive statements, and not in the middle of a primitive statement. For instance, in a statement such as X ← Y + Y , no thread can interrupt the current one and change the value of Y between the evaluation of the first and the second Y sub-expression, while it can if the assignment is split into X ← Y ; X ← X + Y . Primitive statements are thus atomic in P∗ . By contrast, we will present a semantics where primitive statements are not atomic in Sec. 3.4. 3.2. Concrete Interference Semantics PI . Because it reasons on infinite sets of paths, the concrete interleaving semantics from the previous section is not easily amenable to abstraction. In particular, replacing the concrete domain D in P∗ with an abstract one D] (as defined in Sec. 2.3) is not sufficient to obtain an effective and efficient static analyzer as we still have a large or infinite number of paths to analyze separately and join. By contrast, we propose here a (more abstract) concrete semantics that can be expressed by induction on the syntax. It will lead naturally, after further abstraction in Sec. 3.3, to an effective static analysis. 3.2.1. Thread semantics. We start by enriching the non-parallel structured semantics of Sec. 2.2 with a notion of interference. We call interference a triple (t, X, v) ∈ I, where def I = T × V × R, indicating that the thread t can set the variable X to the value v. However, it does not say at which program point the assignment is performed, so, it is a flow-insensitive information. The new semantics of an expression e, denoted EI J e K, takes as argument the current thread t ∈ T and an interference set I ⊆ I in addition to an environment ρ ∈ E. It is defined in Fig. 7. The main change with respect to the interference-free semantics EJ e K of Fig. 3 is that, when fetching a variable X ∈ V, each interference (t0 , v, X) ∈ I on X from any other thread t0 6= t is applied. The semantics of constants and operators is not changed, apart from propagating t and I recursively. Note that the choice of evaluating EI J X K(t, ρ, I) to ρ(X) or to some interference in I, as well as the choice of the interference in I, is non-deterministic. Thus, distinct occurrences of the same variable in an expression may evaluate, in the same environment, to different values. 12 ANTOINE MINÉ EI J e K : (T × E × P(I)) → (P(R) × P(L)) def EI J X K(t, ρ, I) = ({ ρ(X) } ∪ { v | ∃t0 6= t : (t0 , X, v) ∈ I }, ∅) def EI J [c1 , c2 ] K(t, ρ, I) = ({ c ∈ R | c1 ≤ c ≤ c2 }, ∅) def EI J −` e K(t, ρ, I) = let (V, Ω) = EI J e K (t, ρ, I) in ({ −x | x ∈ V }, Ω) def EI J e1 ` e2 K(t, ρ, I) = let (V1 , Ω1 ) = EI J e1 K (t, ρ, I) in let (V2 , Ω2 ) = EI J e2 K (t, ρ, I) in ({ x1  x2 | x1 ∈ V1 , x2 ∈ V2 ,  = 6 / ∨ x2 6= 0 }, Ω1 ∪ Ω2 ∪ { ` |  = / ∧ 0 ∈ V2 }) where  ∈ { +, −, ×, / } Figure 7: Concrete semantics of expressions with interference. t I SI J s, t K : DI −→ DI def SI J X ← e, t K(R, F Ω, I) = 0 (∅, Ω, I) tI I let (V, Ω ) = EI J e K (t, ρ, I) in ρ∈R ({ ρ[X 7→ v] | v ∈ V }, Ω0 , { (t, X, v) | v ∈ V }) def SI J e ./ 0?, t K(R, F Ω, I) = 0 (∅, Ω, I) tI I let (V, Ω ) = EI J e K (t, ρ, I) in ρ∈R ({ ρ | ∃v ∈ V : v ./ 0 }, Ω0 , ∅) def SI J if e ./ 0 then s, t K(R, Ω, I) = (SI J s, t K ◦ SI J e ./ 0?, t K)(R, Ω, I) tI SI J e 6./ 0?, t K(R, Ω, I) def SI J while e ./ 0 do s, t K(R, Ω, I) = SI J e 6./ 0?, t K(lfp λX : (R, Ω, I) tI (SI J s, t K ◦ SI J e ./ 0?, t K)X) def SI J s1 ; s2 , t K(R, Ω, I) = (SI J s2 , t K ◦ SI J s1 , t K)(R, Ω, I) Figure 8: Concrete semantics of statements with interference. The semantics of a statement s executed by a thread t ∈ T is denoted SI J s, t K. It is presented in Fig. 8. This semantics is enriched with interferences and is thus a complete tI −morphism in the complete lattice: def DI = P(E) × P(L) × P(I) where the join tI is the pairwise set union. The main point of note is the semantics of assignments X ← e. It both uses its interference set argument, passing it to EI J e K, and enriches it with the interferences generated on the assigned variable X. The semantics of guards simply uses the interference set, while the semantics of conditionals, loops, and sequences is identical to the non-interference one from Fig. 4. The structured semantics of a thread t with interferences I is then SI J body t , t K(E0 , ∅, I). 3.2.2. Program semantics. The semantics SI J body t , t K still only analyzes the effect of a single thread t. It assumes a priori knowledge of the other threads, through I, and contributes to this knowledge, by enriching I. To solve this dependency and take into account STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 13 multiple threads, we iterate the analysis of all threads until interferences stabilize. Thus, the semantics of a multi-threaded program is: def def PI = Ω, where F (Ω, −) = lfp λ(Ω, I) : t∈T let (−, Ω0 , I 0 ) = SI J body t , t K (E0 , Ω, I) in (Ω0 , I 0 ) (3.4) where the join t is the componentwise set union in the complete lattice P(L) × P(I). 3.2.3. Soundness and completeness. Before linking our interference semantics PI (by structural induction) to the interleaving semantics P∗ of Sec. 3.1 (which is path-based), we remark that we can restate the structured interference semantics SI J body t , t K of a single thread t in a path-based form, as we did in Sec. 2.4 for non-parallel programs. Indeed, we can replace S tI with SI in (2.4) and derive a path-based semantics with interference ΠI J P, t K ∈ DI −→ DI of a set of (non-parallel) control paths P ⊆ Π in a thread t as follows: def F ΠI J P, t K (R, Ω, I) = I { (SI J sn , t K ◦ · · · ◦ SI J s1 , t K)(R, Ω, I) | s1 · . . . · sn ∈ P } . (3.5) These two forms are equivalent, and Thm. 2.3 naturally becomes: Theorem 3.1. ∀t ∈ T , s ∈ stat : ΠI J π(s), t K = SI J s, t K. Proof. In Appendix A.4. The following theorem then states that the semantics PI computed with an interference fixpoint is indeed sound with respect to the interleaving semantics P∗ that interleaves paths from all threads: Theorem 3.2. P∗ ⊆ PI . Proof. In Appendix A.5. The equality does not hold in general. Consider, for instance, the program fragment in Fig. 9(a) inspired from Dekker’s mutual exclusion algorithm [24]. According to the interleaving semantics, both threads can never be in their critical section simultaneously. The interference semantics, however, does not ensure mutual exclusion. Indeed, it computes the following set of interferences: { (t1 , flag1, 1), (t2 , flag2, 1) }. Thus, in thread t1 , flag2 evaluates to {0, 1}. The value 0 comes from the initial state E0 and the value 1 comes from the interference (t2 , flag2, 1). Likewise, flag1 evaluates to {0, 1} in thread t2 . Thus, both conditions flag1 = 0 and flag2 = 0 can be simultaneously true. This imprecision is due to the flow-insensitive treatment of interferences. We now present a second example of incompleteness where the loss of precision is amplified by the interference fixpoint. Consider the program in Fig. 9(b) where two threads increment the same zero-initialized variable x. According to the interleaving semantics, either the value 1 or 2 is stored into y. However, in the interference semantics, the interference fixpoint builds a growing set of interferences, up to { (t, x, i) | t ∈ {t1 , t2 }, i ≥ 1 }, as each thread increments the possible values written by the other thread. Note that the program features no loop and x can thus be incremented only finitely many times (twice), but the interference abstraction is flow-insensitive and forgets how many times an action can be performed. As a consequence, any positive value can be stored into y, instead of only 1 or 2. Our interference semantics is based on a decomposition of the invariant properties of parallel programs into a local invariant at each thread program point and a global interference invariant. This idea is not new, and complete methods to do so have already been 14 ANTOINE MINÉ E0 : flag1 = flag2 = 0 thread t1 flag1 ← 1; if flag2 = 0 then critical section thread t2 flag2 ← 1; if flag1 = 0 then critical section (a) Mutual exclusion algorithm. E0 : x = y = 0 thread t1 x ← x + 1; y←x thread t2 x←x+1 (b) Parallel incrementation. Figure 9: Incompleteness examples for the concrete interference semantics. proposed. Such methods date back to the works of Owicki, Gries, and Lamport [49, 37, 40] and have been formalized in the framework of Abstract Interpretation by Cousot and Cousot [15]. We would say informally that our interference semantics is an incomplete abstraction of such complete methods, where interferences are abstracted in a flow-insensitive and nonrelational way. Our choice to abstract away these information is a deliberate move that eases considerably the construction of an effective and efficient static analyzer, as shown in Sec. 3.3. Another strong incentive is that the interference semantics is compatible with the use of weakly consistent memory models, as shown in Sec. 3.4. Note finally that Sec. 4.4 will present a method to recover a weak form of flow-sensitivity (i.e., mutual exclusion) on interferences, without loosing the efficiency nor the correctness with respect to weak memory models. 3.3. Abstract Interference Semantics P]I . The concrete interference semantics PI introduced in the previous section is defined by structural induction. It can thus be easily abstracted to provide an effective, always-terminating, and sound static analysis. We assume, as in Sec. 2.3, the existence of an abstract domain E ] abstracting sets of environments — see Fig. 5. Additionally, we assume the existence of an abstract domain N ] that abstracts sets of reals, which will be useful to abstract interferences. Its signature is presented in Fig. 10. It is equipped with a concretization γN : N ] → P(R), a least element ⊥]N , an abstract join ∪]N and, if it has strictly increasing infinite chains, a widening ON . We also require two additional functions that will be necessary to communicate information between E ] and N ] . Firstly, a function get(X, R] ) that extracts from an abstract environment R] ∈ E ] the set of values a variable X ∈ V can take, and abstracts this set in N ] . Secondly, a function as-expr (V ] ) able to synthesize a (constant) expression approximating any non-empty abstract value V ] ∈ N ] \ {⊥]N }. This provides a simple way to use an abstract value from N ] in functions on abstract environments in E ] . For instance, S] J X ← as-expr (V ] ) K(R] , Ω) non-deterministically sets the variable X in the environments γE (R] ) to any value in γN (V ] ). Any non-relational domain on a single variable can be used as N ] . One useful example is the interval domain [13]. In this case, an element in N ] is either ⊥]N , or a pair consisting of a lower and an upper bound. The function as-expr is then straightforward because intervals can be directly and exactly represented in the syntax of expressions. Moreover, the function get consists in extracting the range of a variable from an abstract environment R] ∈ E ] , an operation which is generally available in the implementations of numerical abstract domains, e.g., in the Apron library [36]. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS N] γN : 15 (abstract sets of reals) N] → P(R) (concretization function) ⊥]N ∈ N ] s.t. γN (⊥]N ) = ∅ (abstract empty set) ∪]N : (N ] × N ] ) → N ] s.t. γN (V ] ∪]N W ] ) ⊇ γN (V ] ) ∪ γN (W ] ) (abstract join) ON : (N ] × N ] ) → N ] (widening) s.t. γN (V ] ON W ] ) ⊇ γN (V ] ) ∪ γN (W ] ) ] ] and ∀(Wi] )i∈N : the sequence V0] = W0] , Vi+1 = Vi] ON Wi+1 ] reaches a fixpoint Vk] = Vk+1 for some k ∈ N get : (V × E ] ) → N ] s.t. γN (get(X, R] )) ⊇ { ρ(X) | ρ ∈ γE (R] ) } (variable extraction) (conversion to expression) as-expr : (N ] \ {⊥]N }) → expr ] ] s.t. ∀ρ : let (V, −) = EJ as-expr (V ) K ρ in V ⊇ γN (V ) Figure 10: Signature, soundness and termination conditions for a domain N ] abstracting sets of reals. def I ] = (T × V) → N ] γI : I ] → P(I) def s.t. γI (I ] ) = { (t, X, v) | t ∈ T , X ∈ V, v ∈ γN (I ] (t, X)) } def ⊥]I = λ(t, X) : ⊥]N def I1] ∪]I I2] = λ(t, X) : I1] (t, X) ∪]N I2] (t, X) def I1] OI I2] = λ(t, X) : I1] (t, X) ON I2] (t, X) Figure 11: Abstract domain I ] of interferences, derived from N ] . We now show how, given these domains, we can construct an abstraction P]I of PI . We first construct, using N ] , an abstraction I ] of interference sets from P(I), as presented in Fig. 11. It is simply a partitioning of abstract sets of real values with respect to threads def and variables: I ] = (T × V) → N ] , together with pointwise concretization γI , join ∪]I , and widening OI . Note that I ] is not isomorphic to a non-relational domain on a set T × V of variables. Indeed, the former abstracts (T × V) → P(R) ' P(T × V × R) = P(I), while the latter would abstract P((T × V) → R). In particular, the former can express abstract states where the value set of some but not all variables is empty, while ⊥]N elements in the later coalesce to a single element representing ∅. We then construct an abstraction DI] of the semantic domain DI , as presented in Fig. 12. An element of DI] is a triple (R] , Ω, I ] ) composed of an abstraction R] ∈ E ] of environments, a set Ω ⊆ L of errors, and an abstraction I ] ∈ I ] of interferences. The concretization γ, join ∪] , and widening O are defined pointwise. 16 ANTOINE MINÉ def DI] = E ] × P(L) × I ] γ : DI] → DI def s.t. γ(R] , Ω, I ] ) = (γE (R] ), Ω, γI (I ] )) def (R1] , Ω1 , I1] ) ∪] (R2] , Ω2 , I2] ) = (R1] ∪]E R2] , Ω1 ∪ Ω2 , I1] ∪]I I2] ) def (R1] , Ω1 , I1] ) O (R2] , Ω2 , I2] ) = (R1] OE R2] , Ω1 ∪ Ω2 , I1] OI I2] ) Figure 12: Abstract semantic domain DI] , derived from E ] and I ] . The abstract semantics S]I J s, t K of a statement s executed in a thread t ∈ T should be a function from DI] to DI] obeying the soundness condition: (SI J s, t K ◦ γ)(R] , Ω, I ] ) vI (γ ◦ S]I J s, t K)(R] , Ω, I ] ) i.e., the abstract function over-approximates the sets of environments, errors, and interferences. Such a function is defined in a generic way in Fig. 13. The semantics of assignments and guards with interference is defined based on their non-interference semantics S] J s K, provided as part of the abstract domain E ] . In both cases, the expression e to assign or test is first modified to take interferences into account, using the apply function. This function takes as arguments a thread t ∈ T , an abstract environment R] ∈ E ] , an abstract interference I ] ∈ I ] , and an expression e. It first collects, for each variable Y ∈ V, the relevant interferences VY] ∈ N ] from I ] , i.e., concerning the variable Y and threads t0 6= t. If the interference for Y is empty, ⊥]N , the occurrences of Y in e are kept unmodified. If it is not empty, then the occurrences of Y are replaced with a constant expression encompassing all the possible values that can be read from Y , from either the interferences or the environments γE (R] ). Additionally, the semantics of an assignment X ← e enriches I ] with new interferences corresponding to the values of X after the assignment. The semantics of non-primitive statements is identical to the interference-free case of Fig. 6. Finally, an abstraction of the interference fixpoint (3.4) is computed by iteration on abstract interferences, using the widening OI to ensure termination, which provides the abstract semantics P]I of our program: def def P]I = Ω, where (Ω, −) = lim λ(Ω, I ] ) : let ∀t ∈ T : (−, Ω0t , It] 0 ) = S]I J body t , t K (E0] , Ω, I ] ) in S S ( { Ω0t | t ∈ T }, I ] OI ]I { It] 0 | t ∈ T }) (3.6) where lim F ] denotes the limit of the iterates of F ] starting from (∅, ⊥]I ). The following theorem states the soundness of the analysis: Theorem 3.3. PI ⊆ P]I . Proof. In Appendix A.6. The obtained analysis remains flow-sensitive and can be relational within each thread, provided that E ] is relational. However, interferences are abstracted in a flow-insensitive and non-relational way. This was already the case for the concrete interferences in PI and it is not related to the choice of abstract domains. The analysis is expressed as an outer iteration that completely re-analyzes each thread until the abstract interferences stabilize. Thus, it can be implemented easily on top of an existing non-parallel analyzer. Compared STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS S]I J s, t K : DI] → DI] 17 def S]I J X ← e, t K(R] , Ω, I ] ) = let (R]0 , Ω0 ) = S] J X ← apply(t, R] , I ] , e) K (R] , Ω) in (R]0 , Ω0 , I ] [(t, X) 7→ I ] (t, X) ∪]N get(X, R]0 )]) def S]I J e ./ 0?, t K(R] , Ω, I ] ) = let (R]0 , Ω0 ) = S] J apply(t, R] , I ] , e) ./ 0? K (R] , Ω) in (R]0 , Ω0 , I ] ) def S]I J if e ./ 0 then s, t K(R] , Ω, I ] ) = (S]I J s, t K ◦ S]I J e ./ 0?, t K)(R] , Ω, I ] ) ∪] S]I J e 6./ 0?, t K(R] , Ω, I ] ) def S]I J while e ./ 0 do s, t K(R] , Ω, I ] ) = S]I J e 6./ 0?, t K(lim λX ] : X ] O ((R] , Ω, I ] ) ∪] (S]I J s, t K ◦ S]I J e ./ 0?, t K)X ] )) def S]I J s1 ; s2 , t K(R] , Ω, I ] ) = (S]I J s2 , t K ◦ S]I J s1 , t K)(R] , Ω, I ] ) where: def apply(t, R] , I ] , e) = let ∀Y ∈ V : VY] = ∪]N { I ] (t0 , Y ) | t0 6= t } in ( Y if VY] = ⊥]N in let ∀Y ∈ V : eY = as-expr (VY] ∪]N get(Y, R] )) if VY] 6= ⊥]N e[∀Y ∈ V : Y 7→ eY ] Figure 13: Abstract semantics of statements with interference. to a non-parallel program analysis, the cost is multiplied by the number of outer iterations required to stabilize interferences. Thankfully, our preliminary experimental results suggest that this number remains very low in practice — 5 for our benchmark in Sec. 5. In any case, the overall cost is not related to the (combinatorial) number of possible interleavings, but rather to the amount of abstract interferences I ] , i.e., of actual communications between the threads. It is thus always possible to speed up the convergence of interferences or, conversely, improve the precision at the expense of speed, by adapting the widening ON . In this article, we focus on analyzing systems composed of a fixed, finite number of threads. The finiteness of T is necessary for the computation of P]I in (3.6) to be effective. However, it is actually possible to relax this hypothesis and allow an unbounded number of instances of some threads to run in parallel. For this, it is sufficient to consider selfinterferences, i.e., replace the condition t0 6= t in the definition EI J X K(t, ρ, I) in Fig. 7 (for the concrete semantics) and apply(t, R] , I ] , e) in Fig. 13 (for the abstract semantics) with t0 6= t ∨ t ∈ T 0 , where T 0 ⊆ T denotes the subset of threads that can have several instances. The resulting analysis is necessarily uniform, i.e., it cannot distinguish different instances of the same thread nor express properties about the number of running instances — it is abstracted statically in a domain of two values: “one” (t ∈ / T 0 ) and “two or more” 0 (t ∈ T ). In order to analyze actual programs spawning an unbounded number of threads, a non-uniform analysis (such as performed by Feret [26] in the context of the π−calculus) may be necessary to achieve a sufficient precision, but this is not the purpose of the present article. 18 ANTOINE MINÉ 3.4. Weakly Consistent Memory Semantics P0∗ . We now review the various parallel semantics we proposed in the preceding sections and discuss their adequacy to describe actual models of parallel executions. It appears that our first semantics, the concrete interleaving semantics P∗ of Sec. 3.1, while simple, is not realistic. A first issue is that, as noted by Reynolds in [52], such a semantics requires choosing a level of granularity, i.e., some basic set of operations that are assumed to be atomic and cannot be interrupted by another thread. In our case, we assumed assignments and guards (i.e., primitive statements) to be atomic. In contrast, an actual system may schedule a thread within an assignment and cause, for instance, x to be 1 at the end of the program in Fig. 9(b) instead of the expected value 2. A second issue, noted by Lamport in [38], is that the latency of loads and stores in a shared memory may break the sequential consistency in true multiprocessor systems: threads running on different processors may not always agree on the value of a shared variable. For instance, in the mutual exclusion algorithm of Fig. 9(a), the thread t2 may still see the value 0 in flag1 even after the thread t1 has entered its critical section, causing t2 to also enter its critical section, as the effect of the assignment flag1 ← 1 is propagated asynchronously and takes some time to be acknowledged by t2 . Moreover, Lamport noted in [39] that reordering of independent loads and stores in one thread by the processor can also break sequential consistency — for instance performing the load from flag2 before the store into flag1, instead of after, in the thread t1 in Fig. 9(a). More recently, it has been observed by Manson et al. [43] that optimizations in modern compilers have the same ill-effect, even on mono-processor systems: program transformations that are perfectly safe on a thread considered in isolation (for instance, reordering the independent assignment flag1 ← 1 and test flag2 = 0 in t1 ) can cause non-sequentially-consistent behaviors to appear. In this section, we show that the interference semantics correctly handles these issues by proving that it is invariant under a “reasonable” class of program transformations. This is a consequence of its coarse, flow-insensitive and non-relational modeling of thread communications. Acceptable program transformations of a thread are defined with respect to the pathbased semantics Π of Sec. 2.4. A transformation of a thread t is acceptable if it gives rise to a set π 0 (t) ⊆ Π of control paths such that every path p0 ∈ π 0 (t) can be obtained from a path p ∈ π(body t ) by a sequence of elementary transformations described below in Def. 3.4. Elementary transformations are denoted q q 0 , where q and q 0 are sequences of primitive statements. This notation indicates that any occurrence of q in a path of a thread can be replaced with q 0 , whatever the context appearing before and after q. The transformations in Def. 3.4 try to account for widespread compiler and hardware optimizations, but are restricted to transformations that do not generate new errors nor new interferences.2 This ensures that an interference-based analysis of the original program is sound with respect to the transformed one, which is formalized below in Thm. 3.5. The elementary transformations of Def. 3.4 require some side-conditions to hold in order to be acceptable. They use the following notions. We say that a variable X ∈ V is fresh if it does not occur in any thread, and local if it occurs only in the currently transformed thread. We denote by s[e0 /e] the statement s where some, but not necessarily all, occurrences of the expression e may be changed into e0 . The set of variables appearing in the expression e is denoted var (e), while the set of variables modified by the statement s is 2The environments at the end of the thread after transformations may be different, but this does not pose a problem as environments are not observable in our semantics: P∗ ⊆ L (3.3). STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 19 lval (s). Thus, lval (X ← e) = {X} while lval (e ./ 0?) = ∅. The predicate nonblock (e) holds if evaluating the expression e cannot block the program — as would, e.g., an expression def with a definite run-time error, such as 1/0 — i.e., nonblock (e) ⇐⇒ ∀ρ ∈ E : Vρ 6= ∅ where (Vρ , −) = EJ e Kρ. We say that e is deterministic if, moreover, ∀ρ ∈ E : |Vρ | = 1. Finally, def noerror (e) holds if evaluating e is always error-free, i.e., noerror (e) ⇐⇒ ∀ρ ∈ E : Ωρ = ∅ where (−, Ωρ ) = EJ e Kρ. We are now ready to state our transformations: Definition 3.4 (Elementary path transformations). (1) Redundant store elimination: X ← e1 · X ← e2 X ← e2 , when X ∈ / var (e2 ) and nonblock (e1 ). (2) Identity store elimination: X ← X . (3) Reordering assignments: X1 ← e1 ·X2 ← e2 X2 ← e2 ·X1 ← e1 , when X1 ∈ / var (e2 ), X2 ∈ / var (e1 ), X1 6= X2 , and nonblock (e1 ). (4) Reordering guards: e1 ./ 0? · e2 ./0 0? e2 ./0 0? · e1 ./ 0?, when noerror (e2 ). (5) Reordering guards before assignments: X1 ← e1 · e2 ./ 0? e2 ./ 0? · X1 ← e1 , when X1 ∈ / var (e2 ) and either nonblock (e1 ) or noerror (e2 ). (6) Reordering assignments before guards: e1 ./ 0? · X2 ← e2 X2 ← e2 · e1 ./ 0?, when X2 ∈ / var (e1 ), X2 is local, and noerror (e2 ). (7) Assignment propagation: X ← e · s X ← e · s[e/X], when X ∈ / var (e), var (e) are local, and e is deterministic. (8) Sub-expression elimination: s1 · . . . · sn X ← e · s1 [X/e] · . . . · sn [X/e], when X is fresh, ∀i : var (e) ∩ lval (si ) = ∅, and noerror (e). (9) Expression simplification: s s[e0 /e], when ∀ρ ∈ E : EJ e Kρ w EJ e0 Kρ and var (e) and 3 0 var (e ) are local. These simple rules, used in combination, allow modeling large classes of classic program transformations as well as distributed memories. Store latency can be simulated using rules 7 and 3. Breaking a statement into several ones is possible with rules 7 and 8. As a consequence, the rules can expose preemption points within statements, which makes primitive statements no longer atomic. Global optimizations, such as constant propagation and folding, can be achieved using rules 7 and 9. Rules 1–6 allow peephole optimizations. Additionally, transformations that do not change the set of control paths, such as loop unrolling, are naturally supported. Given the set of transformed control paths π 0 (t) for each thread t ∈ T , the set of transformed parallel control paths π∗0 is defined, similarly to (3.2), as: def π∗0 = { p ∈ Π∗ | ∀t ∈ T : proj t (p) ∈ π 0 (t) } and the semantics P0∗ (3.7) of the parallel program is, similarly to (3.3): def P0∗ = Ω, where (−, Ω) = Π∗ J π∗0 K(E0 , ∅) . (3.8) Any original thread π(body t ) being a special case of transformed thread π 0 (t) (considering the identity transformation), we have P∗ ⊆ P0∗ . The following theorem extends Thm. 3.2 to transformed programs: Theorem 3.5. P0∗ ⊆ PI . 3The original expression simplification rule from [47] required a much stronger side-condition: E J e K I (t, ρ, I) w EI J e0 K(t, ρ, I) for all ρ and I, which actually implied that e and e0 were variable-free. We propose here a more permissive side-condition allowing local variables to appear in e and e0 . 20 ANTOINE MINÉ Proof. In Appendix A.7. An immediate consequence of Thms. 3.3 and 3.5 is the soundness of the abstract semantics P]I with respect to the concrete semantics of the transformed program P0∗ , i.e., P0∗ ⊆ P]I . Note that, in general, P0∗ 6= PI . The two semantics may coincide, as for instance in the program of Fig. 9(a). In that case: P∗ ( P0∗ = PI . However, in the case of Fig. 9(b), y can take any positive value according to the interference semantics PI (as explained in Sec. 3.2), while the interleaving semantics after program transformation P0∗ only allows the values 1 and 2; we have P∗ = P0∗ ( PI . Theorem 3.5 holds for our “reasonable” collection of program transformations, but may not hold when considering other, “unreasonable” ones. For instance, in Fig. 9(a), flag1 ← 1 should not be replaced by a misguided prefetching optimizer with flag1 ← 42; flag1 ← 1 in thread t1 . This would create a spurious interference causing the value 42 to be possibly seen by thread t2 . If there is no other reason for t2 to see the value 42, such as a previous or future assignment of 42 into flag1 by t1 , it would create an execution outside those considered by the interference semantics and invalidate Thm. 3.5. Such “out-of-thin-air” values are explicitly forbidden by the Java semantics as described by Manson et al. [43]. See also [55] for an in-depth discussion of out-of-thin-air values. Another example of invalid transformation is the reordering of assignments X1 ← e1 · X2 ← e2 X2 ← e2 · X1 ← e1 when e1 may block the program, e.g., due to a division by zero X1 ← 1/0. Indeed, the transformed program could expose errors in e2 that cannot occur in the original program because they are masked by the previous error in X1 ← e1 . This case is explicitly forbidden by the nonblock (e1 ) side condition in Def. 3.4.(3). The proof in Appendix A.7 contains more examples of transformations that become invalid when side-conditions are not respected. Definition 3.4 is not exhaustive. It could be extended with other “reasonable” transformations, and some restrictive side-conditions might be relaxed in future work without breaking Thm. 3.5. It is also possible to enrich Def. 3.4 with new transformations that do not respect Thm. 3.5 as is, and then adapt the interference semantics to retrieve a similar theorem. For instance, we could allow speculative stores of some special value, such as zero, which only requires adding an interference (t, X, 0) for each thread t and each variable X modified by t. As another example, we could consider some memory writes to be non-atomic, such as 64-bit writes on 32-bit computers, which requires adding interferences that expose partially assigned values. Finally, it would be tempting to, dually, reduce the number of allowed program transformations, and enforce a stronger memory consistency. For instance, we could replace Def. 3.4 with a model of an actual multiprocessor, such as the intel x86 architecture model proposed by Sewell et al. in [57], which is far less permissive and thus ensures many more properties. We would obtain a more precise interleaving semantics P0∗ , closer to the sequentially consistent one P∗ . However, this would not mechanically improve the result of our static analysis P]I , as it is actually an abstraction of the concrete interference semantics PI , itself an incomplete abstraction of P∗ . Our choice of an interference semantics was not initially motivated by the modeling of weakly consistent memories (although this is an important side effect), but rather by the construction of an effective and efficient static analyzer. Effectively translating a refinement of the memory model at the level of an interference-based analysis without sacrificing the efficiency remains a challenging future work. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 21 4. Multi-threaded Programs With a Real-Time Scheduler We now extend the language and semantics of the preceding section with explicit synchronization primitives. These can be used to enforce mutual exclusion and construct critical sections, avoiding the pitfalls of weakly consistent memories. We also extend the semantics with a real-time scheduler taking thread priorities into account, which provides an alternate way of implementing synchronization. 4.1. Priorities and Synchronization Primitives. We first describe the syntactic additions to our language and introduce informally the change in semantics. We denote by M a finite, fixed set of mutual exclusion locks, so-called mutexes. The original language of Fig. 2 is enriched with primitives to control mutexes and scheduling as follows: stat ::= lock(m) (mutex locking, m ∈ M) | unlock(m) (mutex unlocking, m ∈ M) (4.1) | X ← islocked(m) (mutex testing, X ∈ V, m ∈ M) | yield (thread pause) The primitives lock(m) and unlock(m) respectively acquire and release the mutex m ∈ M. The primitive X ← islocked(m) is used to test the status of the mutex m: it stores 1 into X if m is acquired by some thread, and 0 if it is free. The primitive yield is used to voluntarily relinquish the control to the scheduler. The definition of control paths def π(s) from (2.3) is extended by stating that π(s) = {s} for these statements, i.e., they are primitive statements. We also assume that threads have fixed, distinct priorities. As only the ordering of priorities is significant, we denote threads in T simply by integers ranging from 1 to |T |, being understood that thread t has a strictly higher priority than thread t0 when t > t0 . To keep our semantics simple, we assume that acquiring a mutex for a thread already owning it is a no-op, as well as releasing a mutex it does not hold. Our primitive mutexes can serve as the basis to implement more complex ones found in actual implementations. For instance, mutexes that generate a run-time error or return an error code when locked twice by the same thread can be implemented using an extra program variable for each mutex / thread pair that stores whether the thread has already locked that mutex. Likewise, recursive mutexes can be implemented by making these variables count the number of times each thread has locked each mutex. Finally, locking with a timeout can be modeled as a non-deterministic conditional that either locks the mutex, or yields and returns an error code. Our scheduling model is that of real-time processes, used noticeably in embedded systems. Example operating systems using this model include those obeying the ARINC 653 standard [3] (used in avionics), as well as the real-time extension of the POSIX threads standard [34]. Hard guarantees about the execution time of services, although an important feature of real-time systems, are not the purpose of this article as we abstract physical time away. We are interested in another feature: the strict interpretation of thread priorities when deciding which thread to schedule. More precisely: a thread that is not blocked waiting for some resource can never be preempted by a lower priority thread. This is unlike schedulers found in desktop computers (for instance, vanilla POSIX threads [34] without the real-time extension) where even lower priority threads always get to run, preempting 22 ANTOINE MINÉ low priority lock(m); Y ← 1; Z ← 1; T ← Y − Z; unlock(m) high priority X ← islocked(m); if X = 0 then Z ← 2; Y ← 2; yield Figure 14: Using priorities to ensure mutual exclusion. higher priority ones if necessary. Moreover, we consider in this section that only a single thread can execute at a given time — this was not required in Sec. 3. This is the case, for instance, when all the threads share a single processor. In this model, the unblocked thread with the highest priority is always the only one to run. All threads start unblocked and may block, either by locking a mutex that is already locked by another thread, or by yielding voluntarily, which allows lower priority threads to run. Yielding denotes blocking for a non-deterministic amount of time, which is useful to model timers of arbitrary duration and waiting for external resources. A lower priority thread can be preempted when unlocking a mutex if a higher priority thread is waiting for this mutex. It can also be preempted at any point by a yielding higher priority thread that wakes up non-deterministically. Thus, a preempted thread can be made to wait at an arbitrary program point, and not necessarily at a synchronization statement. The scheduling is dynamic and the number of possible thread interleavings authorized by the scheduler remains very large, despite being controlled by strict priorities. This scheduling model is precise enough to take into account fine mutual exclusion properties that would not hold if we considered arbitrary preemption or true parallel executions on concurrent processors. For instance, in Fig. 14, the high priority thread avoids a call to lock by testing with islocked whether the low priority thread acquired the lock and, if not, executes its critical section and modifies Y and Z, confident that the low priority thread cannot execute and enter its critical section before the high priority thread explicitly yields. 4.2. Concrete Scheduled Interleaving Semantics PH . We now refine the various semantics of Sec. 3 to take scheduling into account, starting with the concrete interleaving semantics P∗ of Sec. 3.1. In this case, it is sufficient to redefine the semantics of primitive statements. This new semantics will, in particular, exclude interleavings that do not respect mutual exclusion or priorities, and thus, we observe fewer behaviors. This is materialized by the dotted ⊆ arrow in Fig. 1 between P∗ and the refined semantics PH we are about to present.4 We define a domain of scheduler states H as follows: def H = (T → { ready, yield , wait(m) | m ∈ M }) × (T → P(M)) . (4.2) A scheduler state (b, l) ∈ H is a pair, where the function b associates to each thread whether it is ready (i.e., it is not blocked, and runs if no higher priority thread is also ready), yielding 4Note that Fig. 1 states that each concrete semantics without scheduler abstracts the corresponding concrete semantics with scheduler, but states nothing about abstract semantics. Abstract semantics are generally incomparable due to the use of non-monotonic abstractions and widenings. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 23 (i.e., it is blocked at a yield statement), or waiting for some mutex m (i.e., it is blocked at a lock(m) statement). The function l associates to each thread the set of all the mutexes it holds. A program state is now a pair ((b, l), ρ) composed of a scheduler state (b, l) ∈ H def and an environment ρ ∈ E. The semantic domain D = P(E) × P(L) from (2.1) is thus replaced with DH defined as: def DH = P(H × E) × P(L) (4.3) with the associated pairwise join tH . The semantics SH J s, t K of a primitive statement s executed by a thread t ∈ T is described in Fig. 15. It is decomposed into three steps: enabled t , S†H J s, t K, and sched , the first and the last steps being independent from the choice of statement s. Firstly, the function enabled t filters states to keep only those where the thread t can actually run, i.e., t is the highest priority thread which is ready. Secondly, the function S†H J s, t K handles the statement-specific semantics. For yield, lock, and unlock statements, this consists in updating the scheduler part of each state. For lock statements, the thread enters a wait state until the mutex is available. Actually acquiring the mutex is performed by the following sched step if the mutex is immediately available, and by a later sched step following the unlocking of the mutex by its owner thread otherwise. The islocked statement updates each environment according to its paired scheduler state. The other primitive statements, assignments and guards, are not related to scheduling; their semantics is defined by applying the regular, mono-threaded semantics SJ s K from Fig. 4 to the environment part, leaving the scheduler state unchanged. Thirdly, the function sched updates the scheduler state by waking up yielding threads non-deterministically, and giving any newly available mutex to the highest priority thread waiting for it, if any. tH The semantics ΠH J P K ∈ DH −→ DH of a set P ⊆ Π∗ of parallel control paths then becomes, similarly to (3.1): def ΠHFJ P K(R, Ω) = H { (SH J sn , tn K ◦ · · · ◦ SH J s1 , t1 K)(R, Ω) | (s1 , t1 ) · . . . · (sn , tn ) ∈ P } (4.4) and the semantics PH of the program is, similarly to (3.3): def PH = Ω, where (−, Ω) = ΠH J π∗ K({h0 } × E0 , ∅) (4.5) def where π∗ is the set of parallel control paths of the program, defined in (3.2), and h0 = (λt : ready, λt : ∅) denotes the initial scheduler state (all the threads are ready and hold no mutex). As in Sec. 3.1, many parallel control paths in π∗ are unfeasible, i.e., return an empty set of environments, some of which are now ruled out by the enabled t function because they do not obey the real-time scheduling policy or do not ensure the mutual exclusion enforced by locks. Nevertheless, errors from a feasible prefix of an unfeasible path are still taken into account. This includes, in particular, the errors that occur before a dead-lock. 4.3. Scheduled Weakly Consistent Memory Semantics P0H . As was the case for the interleaving semantics without a scheduler (Sec. 3.1), the scheduled interleaving semantics does not take into account the effect of a weakly consistent memory. Recall that a lack of memory consistency can be caused by the underlying hardware memory model of a multiprocessor, by compiler optimisations, or by non-atomic primitive statements. While we can disregard the hardware issues when considering mono-processor systems (i.e., everywhere in 24 ANTOINE MINÉ t H SH J s, t K : DH −→ DH SH J s, t K = sched ◦ S†H J s, t K ◦ enabled t def where: def enabled t (R, Ω) = ({ ((b, l), ρ) ∈ R | b(t) = ready ∧∀t0 > t : b(t0 ) 6= ready }, Ω) S†H J yield, t K(R, Ω) = ({ ((b[t 7→ yield ], l), ρ) | ((b, l), ρ) ∈ R }, Ω) def S†H J lock(m), t K(R, Ω) = ({ ((b[t 7→ wait(m)], l), ρ) | ((b, l), ρ) ∈ R }, Ω) def S†H J unlock(m), t K(R, Ω) = ({ ((b, l[t 7→ l(t) \ {m}]), ρ) | ((b, l), ρ) ∈ R }, Ω) def S†H J X ← islocked(m), t K(R, Ω) = ({ ((b, l), ρ[X 7→ 0]) | ((b, l), ρ) ∈ R, ∀t0 ∈ T : m ∈ / l(t0 ) } ∪ 0 { ((b, l), ρ[X 7→ 1]) | ((b, l), ρ) ∈ R, ∃t ∈ T : m ∈ l(t0 ) }, Ω) def for all other primitive statements s ∈ { X ← e, e ./ 0? } : def S†H J s, t K(R, Ω) = ({ ((b, l), ρ0 ) | ∃ρ : ((b, l), ρ) ∈ R, (R0 , −) = SJ s K({ρ}, Ω), ρ0 ∈ R0 }, Ω0 ) where (−, Ω0 ) = SJ s K({ ρ | (−, ρ) ∈ R }, Ω) def sched (R, Ω) = ({ ((b0 , l0 ), ρ) | ((b, l), ρ) ∈ R }, Ω) s.t. ∀t : if b(t) = wait(m) ∧ (m ∈ l(t) ∨ (∀t0 : m ∈ / l(t0 ) ∧ ∀t0 > t : b(t0 ) 6= wait(m))) 0 0 then b (t) = ready ∧ l (t) = l(t) ∪ {m} else l0 (t) = l(t) ∧ (b0 (t) = b(t) ∨ (b0 (t) = ready ∧ b(t) = yield )) Figure 15: Concrete semantics of primitive statements with a scheduler. Sec. 4 except Sec. 4.4.5) the other issues remain, and so, we must consider their interaction with the scheduler. Thus, we now briefly present a weakly consistent memory semantics for programs with a scheduler. The interference semantics designed in Secs. 4.4 and 4.5 will be sound with respect to this semantics. In addition to restricting the interleaving of threads, synchronization primitives also have an effect when considering weakly consistent memory semantics: they enforce some form of sequential consistency at a coarse granularity level. More precisely, the compiler and processor handle synchronization statements specially, introducing the necessary flushes into memory and register reloads, and refraining from optimizing across them. Recall that the weakly consistent semantics P0∗ of Sec. 3.4 is based on the interleaving semantics P∗ of Sec. 3.1 applied to transformed threads π 0 (t), which are obtained by transforming the paths in π(body t ) using elementary path transformations q q 0 from Def. 3.4. To take synchronization into account, we use the same definition of transformed threads π 0 (t), but restrict it to transformations q q 0 that do not contain any synchronization primitive. For instance, we forbid the application of sub-expression elimination (Def. 3.4.(8)) on the following path: lock(m) · Y ← e X ← e · lock(m) · Y ← X. However, if q and q 0 do not contain any synchronization primitive, and q q 0 , then it is 0 legal to replace q with q in a path containing synchronization primitives before and after q. For instance, the transformation lock(m) · Y ← e lock(m) · X ← e · Y ← X is STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS lock(m) W 25 unlock(m) W thread 1 thread 2 R lock(m) W R unlock(m) (a) Well synchronized communication. lock(m) W unlock(m) W W thread 1 thread 2 R R lock(m) W R unlock(m) (b) Weakly consistent communications. Figure 16: Well synchronized versus weakly consistent communications. acceptable. The scheduled weakly consistent memory semantics is then, based on (4.5): def P0H = Ω, where (−, Ω) = ΠH J π∗0 K({h0 } × E0 , ∅) (4.6) where π∗0 is defined, as before (3.7), as the interleavings of control paths from all π 0 (t), t ∈ T . 4.4. Concrete Scheduled Interference Semantics PC . We now provide a structured version PC of the scheduled interleaving semantics PH . Similarly to the interference abstraction PI from Sec. 3.2 of the non-scheduled interleaving semantics P∗ , it is based on a notion of interference, it is sound with respect to both the interleaving semantics PH and its weakly consistent version P0H , but it is not complete with respect to either of them. The main changes with respect to the interference abstraction PI are: a notion of scheduler configuration (recording some information about the state of mutexes), a partitioning of interferences and environments with respect to configurations, and a distinction between well synchronized thread communications and data-races. As our semantics is rather complex, we first present it graphically on examples before describing it in formal terms. 4.4.1. Interferences. In the non-scheduled semantics PI (Sec. 3.2), any interference (t, X, v), i.e., any write by a thread t of a value v into a variable X, could influence any read from the same variable X in another thread t0 6= t. While this is also a sound abstraction of the semantics with a scheduler, the precision can be improved by refining our notion of interference and exploiting mutual exclusion properties enforced by the scheduler. Good programming practice dictates that all read and write accesses to a given shared variable should be protected by a common mutex. This is exemplified in Fig. 16.(a) where 26 ANTOINE MINÉ W and R denote respectively a write to and a read from a variable X, and all reads and writes are protected by a mutex m. In this example, thread 1 writes twice to X while holding m. Thus, when thread 2 locks m and reads X, it can see the second value written by thread 1, but never the first one, which is necessarily overwritten before thread 2 acquires m. Likewise, after thread 2 locks m and overwrites X, while it still holds m it can only read back the value it has written and not any value written by thread 1. Thus, a single interference from thread 1 can effect thread 2, and at only one read position; we call this read / write pair a “well synchronized communication.” Well synchronized communications are flow-sensitive (the order of writes and reads matters), and so, differ significantly from the interferences of Sec. 3.2. In practice, we model such communications by recording at the point unlock(m) in thread 1 the current value of all the variables that are modified while m is locked, and import these values in the environments at the point lock(m) in thread 2. Accesses are not always protected by mutexes, though. Consider, for instance, the example in Fig. 16.(b), where X may additionally be modified by thread 1 and read by thread 2 outside the critical sections defined by mutex m. In addition to the well synchronized communication of Fig. 16.(a), which is omitted for clarity in Fig. 16.(b), we consider that a write from thread 1 effects a read from thread 2 if either operation is performed while m is not locked. These read / write pairs correspond to data-races, and neither the compiler nor the hardware is required to enforce memory consistency. We call these pairs “weakly consistent communications.” In practice, these are handled in a way similar to the interferences in Sec. 3.2: the values thread 1 can write into X are remembered in a flow-insensitive interference set, and the semantics of expressions is modified so that, when reading X in thread 2, either the thread’s value for X or a value from the interference set is used. We also remember the set of mutexes that threads hold during each read and each write, so that we can discard communications that cannot occur due to mutual exclusion. For instance, in Fig. 16.(b), there is no communication of any kind between the first write in thread 1 and the second read in thread 2. The example also shows that well synchronized and weakly consistent communications can mix freely: there is no weakly consistent communication between the second write in thread 1 and the second read in thread 2 due to mutual exclusion (both threads hold the mutex m); however, there is a well synchronized communication — shown in Fig. 16.(a). Figure 17 illustrates the communications in the case of several mutexes: m1 and m2. In Fig. 17.(a), weakly consistent communications only occur between write / read pairs when the involved threads have not locked a common mutex. For instance, the first write by thread 1 is tagged with the set of locked mutexes {m1}, and so, can only influence the first read by thread 2 (tagged with ∅) and not the following two (tagged respectively with {m1} and {m1, m2}). Likewise, the second write, tagged with {m1, m2}, only influences the first read. However, the third write, tagged with only {m2}, influences the two first reads (thread 2 does not hold the mutex m2 there). In Fig. 17.(b), well synchronized communications import, as before, at a lock of mutex m1 (resp. m2) in thread 2, the last value written by thread 1 before unlocking the same mutex m1 (resp. m2). The well synchronized communication in Fig. 17.(c) is more interesting. In that case, thread 1 unlocks m2 before m1, instead of after. As expected, when thread 2 locks m1, it imports the last (third) value written by thread 1, just before unlocking m1. We note, however, that the second write in thread 1 does not influence thread 2 while thread 2 holds mutex m1, as the value is always over-written by thread 1 before unlocking m1. We model this by importing, STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS lock(m1) unlock(m1) W thread 1 27 W W lock(m2) unlock(m2) thread 2 R R lock(m1) R lock(m2) (a) Weakly consistent communications. lock(m1) unlock(m1) W thread 1 W W lock(m2) unlock(m2) thread 2 R R lock(m1) R lock(m2) (b) Well synchronized communications. lock(m1) thread 1 W unlock(m1) W lock(m2) W unlock(m2) thread 2 R R lock(m1) R lock(m2) (c) Well synchronized communications. Figure 17: Well synchronized and weakly consistent communications with two locks. when locking a mutex m in thread 2, only the values written by thread 1 while it does not hold a common mutex (in addition to m) with thread 2. Thus, when locking m2 while 28 ANTOINE MINÉ still holding the mutex m1, thread 2 does not import the second value written by thread 1 because thread 1 also holds m1 during this write. 4.4.2. Interference partitioning. To differentiate between well synchronized and weakly consistent communications, and to avoid considering communications between parts of threads that are in mutual exclusion, we partition interferences with respect to a thread-local view of scheduler configurations. The (finite) set C of configurations is defined as: def C = P(M) × P(M) × { weak , sync(m) | m ∈ M } . (4.7) In a configuration (l, u, s) ∈ C, the first component l ⊆ M denotes the exact set of mutexes locked by the thread creating the interference, which is useful to decide which reads will be affected by the interference. The second component u ⊆ M denotes a set of mutexes that are known to be locked by no thread (either current or not). This information is inferred by the semantics of islocked statements and can be exploited to detect extra mutual exclusion properties that further limit the set of reads affected by an interference (as in the example in Fig. 14). The last component, s, allows distinguishing between weakly consistent and well synchronized communications: weak denotes an interference that generates weakly consistent communications, while sync(m) denotes an interference that generates well synchronized communications for critical sections protected by the mutex m. These two kinds of interferences are naturally called, respectively, weakly consistent and well synchronized interferences. The partitioned domain of interferences is then: def I = T ×C×V ×R (4.8) which enriches the definition of I from Sec. 3.2 with a scheduler configuration in C. The interference (t, c, X, v) ∈ I indicates that the thread t ∈ T can write the value v ∈ R into the variable X ∈ V and the scheduler is in the configuration c ∈ C at the time of the write. 4.4.3. Environment partitioning. When computing program states in our semantics, environments are also partitioned with respect to scheduler configurations in order to track some information on the current state of mutexes. Thus, our program states associate an environment ρ ∈ E and a configuration in (l, u, s) ∈ C, where the configuration (l, u, s) indicates the set of mutexes l held by the thread in that state, as well as the set of mutexes u that are known to be held by no thread; the s component is not used and always set by convention to weak . The semantic domain is now: def DC = P(C × E) × P(L) × P(I) (4.9) partially ordered by pointwise set inclusion. We denote by tC the associated pointwise join. While regular statements (such as assignments and tests) update the environment part of each state, synchronization primitives update the scheduler part of the state. The use of pairs of environments and scheduler configurations allows representing relationships between the value of a variable and the state of a mutex, which is important for the precise modeling of the islocked primitive in code similar to that of Fig. 14. For instance, after the statement X ← islocked(m), all states ((l, u, s), ρ) satisfy ρ(X) = 0 =⇒ m ∈ u. Thus, when the high thread enters the “then” branch of the subsequent X = 0 test, we know that m is not locked by any thread and we can disregard the interferences generated by the low thread while holding m. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 29 EC J e K : (T × C × E × P(I)) → (P(R) × P(L)) def EC J X K(t, c, ρ, I) = ({ ρ(X) } ∪ { v | ∃(t0 , c0 , X, v) ∈ I : t 6= t0 ∧ intf (c, c0 ) }, ∅) def EC J [c1 , c2 ] K(t, c, ρ, I) = ({ c ∈ R | c1 ≤ c ≤ c2 }, ∅) def EC J −` e K(t, c, ρ, I) = let (V, Ω) = EC J e K (t, c, ρ, I) in ({ −x | x ∈ V }, Ω) def EC J e1 ` e2 K(t, c, ρ, I) = let (V1 , Ω1 ) = EC J e1 K (t, c, ρ, I) in let (V2 , Ω2 ) = EC J e2 K (t, c, ρ, I) in ({ x1  x2 | x1 ∈ V1 , x2 ∈ V2 ,  = 6 / ∨ x2 6= 0 }, Ω1 ∪ Ω2 ∪ { ` |  = / ∧ 0 ∈ V2 }) where  ∈ { +, −, ×, / } where: def intf ((l, u, s), (l0 , u0 , s0 )) ⇐⇒ l ∩ l0 = u ∩ l0 = u0 ∩ l = ∅ ∧ s = s0 = weak Figure 18: Concrete scheduled semantics of expressions with interference. 4.4.4. Semantics. We now describe in details the semantics of expressions and statements. It is presented fully formally in Figs. 18 and 19. The semantics EC J e K(t, c, ρ, I) of an expression e is presented in Fig. 18. It is similar to the non-scheduled semantics EI J e K(t, ρ, I) of Fig. 7, except that it has an extra argument: the current configuration c ∈ C (4.7) of the thread evaluating the expression. The other arguments are: the thread t ∈ T evaluating the expression, the environment ρ ∈ E in which it is evaluated, and a set I ⊆ I (4.8) of interferences from the whole program. Interferences are applied when reading a variable EC J X K. Only weakly consistent interferences are handled in expressions — well synchronized interferences are handled in the semantics of synchronization primitives, presented below. Moreover, we consider only interferences with configurations that are not in mutual exclusion with the current configuration c. Mutual exclusion is enforced by the predicate intf , which states that, in two scheduler configurations (l, u, weak ) and (l0 , u0 , weak ) for distinct threads, no mutex can be locked by both threads (l ∩ l0 = ∅), and no thread can lock a mutex which is assumed to be free by the other one (l ∩ u0 = l0 ∩ u = ∅). The semantics of other expression constructs remains the same, passing recursively the arguments t, c, and I unused and unchanged. We now turn to the semantics SC J s, t K(R, Ω, I) of a statement s executed by a thread t, which is defined in Fig. 19. It takes as first argument a set R of states which are now pairs consisting of an environment ρ ∈ E and a scheduler configuration c ∈ C, i.e., R ⊆ C × E. The other arguments are, as in the non-scheduled semantics of Fig. 8, a set of run-time errors Ω ⊆ L to enrich, and a set of interferences I ⊆ I to use and enrich. The semantics of assignments and tests in Fig. 19 is similar to the non-scheduled case (Fig. 8). The scheduler configuration associated with each input environment is simply passed as argument to the expression semantics EC in order to select precisely which weakly relational interferences to apply (through intf ), but it is otherwise left unmodified in the output. Additionally, assignments X ← e generate weakly consistent interferences, which store in I the current thread t and the scheduler configuration c of its state, in addition to the modified variable X and its new value. 30 ANTOINE MINÉ t C SC J s, t K : DC −→ DC def SC J X ← e, t K(R, F Ω, I) = (∅, Ω, I) tC let (V, Ω0 ) = EC J e K (t, c, ρ, I) in C (c,ρ)∈R ({ (c, ρ[X 7→ v]) | v ∈ V }, Ω0 , { (t, c, X, v) | v ∈ V }) def SC J e ./ 0?, t K(R, Ω, F I) = (∅, Ω, I) tC let (V, Ω0 ) = EC J e K (t, c, ρ, I) in C (c,ρ)∈R ({ (c, ρ) | ∃v ∈ V : v ./ 0 }, Ω0 , ∅) def SC J if e ./ 0 then s, t K(R, Ω, I) = (SC J s, t K ◦ SC J e ./ 0?, t K)(R, Ω, I) tC SC J e 6./ 0?, t K(R, Ω, I) def SC J while e ./ 0 do s, t K(R, Ω, I) = SC J e 6./ 0?, t K(lfp λX : (R, Ω, I) tC (SC J s, t K ◦ SC J e ./ 0?, t K)X) def SC J s1 ; s2 , t K(R, Ω, I) = (SC J s2 , t K ◦ SC J s1 , t K)(R, Ω, I) def SC J lock(m), t K(R, Ω, I) = ({ ((l ∪ S {m}, ∅, s), ρ0 ) | ((l, −, s), ρ) ∈ R, ρ0 ∈ in(t, l, ∅, m, ρ, I) }, Ω, I ∪ { out(t, l, ∅, m0 , ρ, I) | ∃u : ((l, u, −), ρ) ∈ R ∧ m0 ∈ u }) def SC J unlock(m), t K(R, Ω, I) = ({ ((l \ {m}, S u, s), ρ) | ((l, u, s), ρ) ∈ R }, Ω, I ∪ { out(t, l \ {m}, u, m, ρ, I) | ((l, u, −), ρ) ∈ R }) def SC J yield, t K(R, Ω, I) = ({ ((l, ∅,S s), ρ) | ((l, −, s), ρ) ∈ R }, Ω, I ∪ { out(t, l, ∅, m0 , ρ, I) | ∃u : ((l, u, −), ρ) ∈ R ∧ m0 ∈ u }) def SC J X ← islocked(m), t K(R, Ω, I) = if no thread t0 > t locks m, then: ({ ((l, u ∪ {m}, s), ρ0 [X 7→ 0]) | ((l, u, s), ρ) ∈ R, ρ0 ∈ in(t, l, u, m, ρ, I) } ∪ { ((l, u \ {m}, s), ρ[X 7→ 1]) | ((l, u, s), ρ) ∈ R }, Ω, I ∪ { (t, c, X, v) | v ∈ {0, 1}, (c, −) ∈ R }) otherwise: SC J X ← [0, 1], t K(R, Ω, I) where: def in(t, l, u, m, ρ, I) = { ρ0 | ∀X ∈ V : ρ0 (X) = ρ(X) ∨ (∃t0 , l0 , u0 : (t0 , (l0 , u0 , sync(m)), X, ρ0 (X)) ∈ I ∧ t 6= t0 ∧ l ∩ l0 = l ∩ u0 = l0 ∩ u = ∅) } def out(t, l, u, m, ρ, I) = { (t, (l, u, sync(m)), X, ρ(X)) | ∃l0 : (t, (l0 , −, weak ), X, −) ∈ I ∧ m ∈ l0 } Figure 19: Concrete scheduled semantics of statements with interference. The semantics of non-primitive statements remains the same as in previous semantics by structural induction on the syntax of statements (e.g., Fig. 8). The main point of note is thus the semantics of synchronization primitives. It updates the scheduler configuration and takes care of well synchronized interferences. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 31 Let us explain first how the scheduler part (l, u, s) ∈ C of a state ((l, u, s), ρ) ∈ R is updated. Firstly, the set l of mutexes held by the current thread is updated by the primitives lock(m) and unlock(m) by respectively adding m to and removing m from l. Secondly, the set of mutexes u that are known to be free in the system is updated by X ← islocked(m). Generally, no information on the state of the mutex is known a priori. Each input state thus spawns two output states: one where m is free (u ∈ m), and one where m is not free (u ∈ / m). In the first state, X is set to 0 while, in the second state, it is set to 1. As a consequence, although the primitive cannot actually infer whether the mutex is free or not, it nevertheless keeps the relationship between the value of X and the fact that m is free. Inferring this relation is sufficient to analyze precisely the code in Fig. 14. It is important to note that the information in m ∈ u is transient as, when a context switch occurs, another thread t0 can run and lock m, thus invaliding the assumption by thread t that no thread has locked m. We distinguish two scenarios, depending on whether t0 has higher priority than t or not. When t0 < t, the thread t0 has lower priority and cannot preempt t at an arbitrary point due to the real-time nature of the scheduler. Instead, t0 must wait until t performs a blocking operation (i.e., calls a lock or yield primitive) to get the opportunity to lock m. This case is handled by having all our blocking primitives reset the u component to ∅. When t0 > t, the thread t0 can preempt t at arbitrary points, including just after the islocked primitive, and so, we can never safely assume that m ∈ u. If this scenario is possible, X ← islocked(m) is modeled as X ← [0, 1], without updating u. To decide which transfer function to use for islocked, we need to know the set of all mutexes than can be locked by each thread. It is quite easy to enrich our semantics to track this information but, as it is cumbersome, we did not include this in Fig. 19 — one way is to add a new component M : T → P(M) to the domain I of interferences, in which we remember the set of arguments m of each lock(m) encountered by each thread; then, we check that 6 ∃t0 > t : m ∈ M (t0 ) before applying the precise transfer function for X ← islocked(m) in thread t. We now discuss how synchronization primitives handle well synchronized interferences. We use two auxiliary functions, in(t, l, u, m, ρ, I) and out(t, l, u, m, ρ, I), that model respectively entering and exiting a critical section protected by a mutex m ∈ M in a thread t ∈ T . The arguments l, u ⊆ M reflect the scheduler configuration when the primitive is called, i.e., they are respectively the set of mutexes held by thread t and those assumed to be free in the system. The function out(t, l, u, m, ρ, I) collects a set of well synchronized interferences from an environment ρ ∈ E. These are constructed from the current value ρ(X) of the variables X that have been modified while the mutex m was held. Such information can be tracked precisely in the semantics by adding another component in C → P(V) to our program states R but, for the sake of simplicity, the semantics we present simply extracts this information from the interferences in I: we consider all the variables that have some weakly interference by thread t in a configuration where it holds m (m ∈ l). This may actually over-approximate the set of variables we seek as it includes variables that have been modified in previous critical sections protected by the same mutex m, but not in the current critical section.5 Given a variable X, the interference we store is then (t, (l, u, sync(m)), X, ρ(X)). The function in(t, l, u, m, ρ, I) applies well synchronized interferences from I to an environment ρ: it returns all the environments ρ0 that can be obtained 5Our prototype performs the same over-approximation for the sake of keeping the analysis simple, and we did not find any practical occurrence where this resulted in a loss of precision. We explain this by remaking that critical sections delimited by the same mutex tend to protect the same set of modified variables. 32 ANTOINE MINÉ from ρ by setting one or several variables to their interference value. It only considers well synchronized interferences with configuration sync(m) and from threads t0 6= t. Moreover, it uses a test similar to that of intf to avoid applying interferences that cannot occur due to mutual exclusion, by comparing the current state of mutexes (l and u) to their state when the interference was stored. The function pair in / out is actually used to implement two kinds of critical sections. A first kind stems from the use of lock(m) and unlock(m) statements, which naturally delimit a critical section protected by m. Additionally, whenever a mutex m is added to the u scheduler component by a primitive X ← islocked(m), we also enter a critical section protected by m. Thus, in is called for mutex m, and intf ensures that weakly synchronized interferences where m is locked are no longer applied. Such critical sections end when m leaves u, that is, whenever the thread executes a blocking primitive: lock or yield. These primitives call out for every mutex currently in u, and reset u to ∅ in the program state. Finally, we turn to the semantics PC of a program, which has the same fixpoint form as PI (3.4): def def PC =F Ω, where (Ω, −) = lfp λ(Ω, I) : 0 0 0 0 t∈T let (−, Ω , I ) = SC J body t , t K ({c0 } × E0 , Ω, I) in (Ω , I ) (4.10) def where the initial configuration is c0 = (∅, ∅, weak ) ∈ C. This semantics is sound with respect to that of Secs. 4.2–4.3: Theorem 4.1. PH ⊆ PC and P0H ⊆ PC . Proof. In Appendix A.8. 4.4.5. Multiprocessors and non-real-time systems. The only part of our semantics that exploits the fact that only one thread can execute at a given time is the semantics of X ← islocked(m). It assumes that, after the current thread has performed the test, the state of the mutex m cannot change until the current thread calls a blocking primitive (lock or yield) — unless some higher priority thread can also lock the mutex m. Thus, in order to obtain a semantics that is also sound for truly parallel or non-real-time systems, it is sufficient to interpret all statements X ← islocked(m) as X ← [0, 1]. While more general, this semantics is less precise when analyzing a system that is known to be mono-processor and real-time. For instance, this semantics cannot prove that the two threads in Fig. 14 are in mutual exclusion and that, as a result, T = 0 at the end of the program. It finds instead T ∈ { −1, 0, 1 }, which is less precise. As our target application (Sec. 5) is mono-processor and real-time, we will not discuss this more general but less precise semantics further. 4.4.6. Detecting data-races. In our semantics, data-races silently cause weakly consistent interferences but are otherwise not reported. It is easy to modify the semantics to output them. Write / write data-races can be directly extracted from the computed set of interferences I gathered by the least fixpoint in (4.10) as follows: { (t, t0 , X) ∈ T × T × V | ∃c, c0 : (t, c, X, −) ∈ I ∧ (t0 , c0 , X, −) ∈ I ∧ t 6= t0 ∧ intf (c, c0 ) } is a set where each element (t, t0 , X) indicates that threads t and t0 may both write into X at the same time. Read / write data-races cannot be similarly extracted from I as the STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 33 ECR J e K : (T × C × P(I)) → P(T × T × V) def ECR J X K(t, c, I) = { (t, t0 , X) | ∃c0 : (t0 , c0 , X, −) ∈ I ∧ t 6= t0 ∧ intf (c, c0 ) } def ECR J [c1 , c2 ] K(t, c, I) = ∅ def ECR J −` e K(t, c, I) = ECR J e K (t, c, I) def ECR J e1 ` e2 K(t, c, I) = ECR J e1 K (t, c, I) ∪ ECR J e2 K(t, c, I) where  ∈ { +, −, ×, / } Figure 20: Read / write data-race detection. E0 : X = Y = 5 thread t1 while 0 = 0 do lock(m); if X > 0 then X ← X − 1; Y ← Y − 1; unlock(m) thread t2 while 0 = 0 do lock(m); if X < 10 then X ← X + 1; Y ← Y + 1; unlock(m) Figure 21: Imprecisely analyzed program due to the lack of relational lock invariant. set of interferences does not remember which variables are read from, only which ones are written to. A simple solution is to instrument the semantics of expressions so that, during expression evaluation, it gathers the set of read variables that are affected by an interference. This is performed, for instance, by ECR presented in Fig. 20. This function has the same arguments as EC , except that no environment ρ is needed, and it outputs a set of data-races (t, t0 , X) instead of environments and errors. 4.4.7. Precision. The interference abstraction we use in PC is sound be not complete with respect to the interleaving-based semantics PH . In addition to the incompleteness already discussed in Sec. 3.2, some loss of precision comes from the handling of well synchronized accesses. A main limitation is that such accesses are handled in a non-relational way, hence PC cannot represent relations enforced at the boundary of critical sections but broken within, while PH can. For instance, in Fig. 14, we cannot prove that Y = Z holds outside critical sections, but only that Y, Z ∈ {1, 2}. This shows in particular that even programs without data-races have behaviors in PC outside the sequentially consistent ones. However, we can prove that the assignment into T is free from interference, and so, that T = 0. By contrast, the interference semantics PI of Sec. 3.2 ignores synchronization and would output T ∈ { −1, 0, 1 }, which is less precise. Figure 21 presents another example where the lack of relational interference results in a loss of precision. This example implements an abstract producer / consumer system, where a variable X counts the number of resources, thread t1 consumes resources (X ← X − 1) if available (X > 0), and thread t2 generates resources (X ← X + 1) if there is still room for resources (X < 10). Our interference semantics can prove that X is always bounded in [0, 10]. However, it cannot provide an upper bound on the variable Y . Actually, Y is also 34 ANTOINE MINÉ E0 : X = Y = 0 high thread X ← 1; A ← 1/(Y − 1); yield low thread B ← 1/X; Y ←1 Figure 22: Imprecisely analyzed program due to the lack of inter-thread flow-sensitivity. def I ] = (T × C × V) → N ] γI : I ] → P(I) def s.t. γI (I ] ) = { (t, c, X, v) | t ∈ T , c ∈ C, X ∈ V, v ∈ γN (I ] (t, c, X)) } def ⊥]I = λ(t, c, X) : ⊥]N def I1] ∪]I I2] = λ(t, c, X) : I1] (t, c, X) ∪]N I2] (t, c, X) def I1] OI I2] = λ(t, c, X) : I1] (t, c, X) ON I2] (t, c, X) Figure 23: Abstract domain of scheduled interferences I ] , derived from N ] . bounded by [0, 10] as it mirrors X. Proving this would require inferring a relational lock invariant: X = Y . Finally, Fig. 22 presents an example where the lack of inter-thread flow sensitivity results in a loss of precision. In this example, the high priority thread always executes first, until it reaches yield, at which point it allows the lower priority thread to execute. To prove that the expression 1/(Y − 1) does not perform an error, it is necessary to prove that it is executed before the low thread stores 1 into Y . Likewise, to prove that the expression 1/X does not perform an error in the low thread, it is necessary to prove that it is executed after the high thread stores 1 into X. With respect to flow sensitivity, our semantics is only able to express that an event is performed before another one within the same thread (intra-thread flow sensitivity) and that a thread communication between a pair of locations cannot occur (mutual exclusion), but it is not able to express that an event in a thread is performed before another one in another thread (inter-thread flow sensitivity). 4.5. Abstract Scheduled Interference Semantics P]C . We now abstract the interference semantics with scheduler PC from the preceding section in order to construct an effective static analyzer. We reuse the ideas from the abstraction P]I of PI in Sec. 3.3. The main difference is that we track precisely scheduler configurations in C (4.7), and we partition abstract environments and interferences with respect to them. As in Sec. 3.3, we assume that an abstract domain E ] of environment sets P(E) is given (with signature in Fig. 5), as well as an abstract domain N ] of real sets P(R) (with signature in Fig. 10). The abstract domain of interferences I ] , abstracting I (4.8), is obtained by partitioning N ] with respect to T and V, similarly to the interference domain of Fig. 11, but also C, as shown in Fig. 23. As V, T , and C are all finite, a map from T × C × V to N ] can indeed be represented in memory, and the join ∪]I and widening OI can be computed pointwise. Moreover, abstract environments E ] are also partitioned with respect STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 35 def DC] = (C → E ] ) × P(L) × I ] γ : DC] → DC def s.t. γ(R] , Ω, I ] ) = ({ (c, ρ) | c ∈ C, ρ ∈ γE (R] (c)) }, Ω, γI (I ] )) def (R1] , Ω1 , I1] ) ∪] (R2] , Ω2 , I2] ) = (λc : R1] (c) ∪]E R2] (c), Ω1 ∪ Ω2 , I1] ∪]I I2] ) def (R1] , Ω1 , I1] ) O (R2] , Ω2 , I2] ) = (λc : R1] (c) OE R2] (c), Ω1 ∪ Ω2 , I1] OI I2] ) Figure 24: Abstract domain of statements DC] , derived from E ] and I ] . S]C J s, t K : DC] → DC] def S]C J X ← e, t K(R] , Ω, I ] ) = let ∀c ∈ C : (Rc] , Ωc ) = S] J X ← apply(t, c, R] , I ] , e) K (R] (c), Ω) in S (λc : Rc] , c∈C Ωc , I ] [∀c ∈ C : (t, c, X) 7→ I ] (t, c, X) ∪]N get(X, Rc] )]) def S]C J e ./ 0?, t K(R] , Ω, I ] ) = let ∀c ∈ C : (Rc] , Ωc ) = S] J apply(t, c, R] , I ] , e) ./ 0? K (R] (c), Ω) in S (λc : Rc] , c∈C Ωc , I ] ) def S]C J if e ./ 0 then s, t K(R] , Ω, I ] ) = (S]C J s, t K ◦ S]C J e ./ 0?, t K)(R] , Ω, I ] ) ∪] S]C J e 6./ 0?, t K(R] , Ω, I ] ) def S]C J while e ./ 0 do s, t K(R] , Ω, I ] ) = S]C J e 6./ 0?, t K(lim λX ] : X ] O ((R] , Ω, I ] ) ∪] (S]C J s, t K ◦ S]C J e ./ 0?, t K)X ] )) def S]C J s1 ; s2 , t K(R] , Ω, I ] ) = (S]C J s2 , t K ◦ S]C J s1 , t K)(R] , Ω, I ] ) where: def apply(t, c, R] , I ] , e) = let ∀Y ∈ V : VY] = ∪]N { I ] (t0 , c0 , Y ) | t0 6= t ∧ intf (c, c0 ) } in ( Y if VY] = ⊥]N let ∀Y ∈ V : eY = in as-expr (VY] ∪]N get(Y, R] (c))) if VY] 6= ⊥]N e[∀Y ∈ V : Y 7→ eY ] Figure 25: Abstract scheduled semantics of statements with interference. to C. Hence, the abstract semantic domain DC] abstracting DC (4.9) becomes: def DC] = (C → E ] ) × P(L) × I ] . (4.11) It is presented in Fig. 24. Sound abstract transfer functions S]C , derived from those in E ] (S] ), are presented in Figs. 25–26. Assignments and tests in Fig. 25 are very similar to the non-scheduled case S]I (Fig. 13) with two differences. Firstly, S] is applied pointwise to each abstract environment R] (c) ∈ E ] , c ∈ C. New interferences due to assignments are also considered pointwise. Secondly, the apply function now takes as extra argument a configuration c, and then only considers interferences from configurations c0 not in mutual exclusion with c. This is defined through 36 ANTOINE MINÉ def S]C J lock(m), t K(R] , Ω, I ] ) = S (λ(l, u, s) : ]E { in ] (t, l0 , ∅, m, R] (l0 , u0 , s), I ] ) | l = l0 ∪ {m} ∧ u = ∅ ∧ u0 ⊆ M ∧ s = weak }, S ] ] Ω, I ] ∪I I { out ] (t, l, ∅, m0 , R] (l, u, s), I ] ) | l, u ⊆ M ∧ m0 ∈ u ∧ s = weak }) def S]C J unlock(m), t K(R] , Ω, I ] ) = S (λ(l, u, s) : ]E { R] (l0 , u0 , s) | l = l0 \ {m} ∧ u = u0 ∧ s = weak }, S Ω, I ] ∪]I ]I { out ] (t, l \ {m}, u, m, R] (l, u, s), I ] ) | l, u ⊆ M ∧ s = weak }) def S]C J yield, t K(R] , Ω, I ] ) = S (λ(l, u, s) : ]E { R] (l0 , u0 , s) | l = l0 ∧ u = ∅ ∧ u0 ⊆ M ∧ s = weak }, S Ω, I ] ∪]I ]I { out ] (t, l, ∅, m0 , R] (l, u, s), I ] ) | l, u ⊆ M ∧ m0 ∈ u ∧ s = weak }) def S]C J X ← islocked(m), t K(R] , Ω, I ] ) = let (R]0 , −, I ]0 ) = S]C J X ← [0, 1], t K (R] , Ω, I ] ) in if no thread t0 > t locks m, then: S (V ] , −) = (λ(l, u, s) : ]E { let ( S] J X ← 0 K(in ] (t, l0 , u0 , m, R] (l0 , u0 , s), I ] ), ∅) S] J X ← 1 K(R] (l0 , u0 , s), ∅) in V ] | l = l0 ∧ u \ {m} = u0 \ {m} ∧ s = weak }, ]0 Ω, I ) otherwise: (R]0 , Ω, I ]0 ) if m ∈ u if m ∈ /u where: def in ] (t, l, u, m, V ] , I ] ) = S V ] ∪]E ]E { let X ] = I ] (t0 , (l0 , u0 , sync(m)), X) in let (V ]0 , −) = S] J X ← as-expr (X ] ) K (V ] , ∅) in V ]0 | X ∈ V ∧ t 6= t0 ∧ l ∩ l0 = l ∩ u0 = l0 ∩ u = ∅ } def out ] (t, l, u, m,  V ], I ]) = ]  get(X, V ) λ(t0 , c, X) :   ] ⊥N if t = t0 ∧ c = (l, u, sync(m)), ∃c0 = (l0 , −, weak ) : m ∈ l0 ∧ I ] (t, c0 , X) 6= ⊥]N otherwise Figure 26: Abstract scheduled semantics with interference of synchronization primitives. the same function intf we used in the concrete semantics (Fig. 18). The semantics of nonprimitive statements is the same as for previous semantics, by structural induction on the syntax of statements. The semantics of synchronization primitives is presented in Fig. 26. It uses the functions in ] and out ] which abstract, respectively, the functions in and out presented in Fig. 19. As their concrete versions, in ] and out ] take as arguments a current thread t ∈ T , a mutex m ∈ M protecting a critical section, and sets of mutexes l, u ⊆ M describing the current STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 37 scheduling configuration. Moreover, they take as arguments an abstract set of interferences I ] ∈ I ] instead of a concrete set, and an abstract set of environments V ] ∈ E ] instead of a single concrete one. The function out ] uses get (Fig. 10) to extract abstract sets of variable values from abstract environments and construct new abstract well synchronized interferences. The function in ] applies these interferences to an abstract environment by converting them to an expression (using as-expr ) and updating the value of variables (using an assignment in S] ). Additionally, the semantics of synchronization primitives models updating the scheduler configuration from c0 = (l0 , u0 , weak ) to c = (l, u, weak ) by moving abstract environments from R] (c0 ) into R] (c); when partitions are collapsed, all the abstract environments mapped to the same configuration c are merged into R] (c) using ∪]E . Finally, the abstract analysis P]C computes a fixpoint with widening over abstract interferences, which is similar to (3.6): def def P]C = Ω, where (Ω, −) = lim λ(Ω, I ] ) : let ∀t ∈ T : (−, Ω0t , It] 0 ) = S]C J body t , t K (R0] , Ω, I ] ) in S S ( { Ω0t | t ∈ T }, I ] OI ]I { It] 0 | t ∈ T }) (4.12) where the partitioned initial abstract environment R0] ∈ C → E ] is defined as: ( E0] if c = (∅, ∅, weak ) def R0] = λc : ⊥]E otherwise The resulting analysis is sound: Theorem 4.2. PC ⊆ P]C . Proof. In Appendix A.9. Due to partitioning, P]C is less efficient than P]I . The abstract semantic functions for primitive statements, as well as the join ∪] and widening O, are performed pointwise on all configurations c ∈ C. However, a clever implementation need not represent explicitly nor iterate over partitions mapping a configuration to an empty environment ⊥]E or an empty interference ⊥]N . The extra cost with respect to a non-scheduled analysis has thus a component that is linear in the number of non-⊥]E environment partitions and a component linear in the number of non-⊥]N interferences. Thankfully, partitioned environments are extremely sparse: Sec. 5 shows that, in practice, at most program points, R] (c) = ⊥]E except for a few configurations (at most 4 in our benchmark). Partitioned interferences are less sparse (52 in our benchmark) because, being flow-insensitive, they accumulate information for configurations reachable from any program point. However, this is not problematic: as interferences are non-relational, a larger number of partitions can be stored and manipulated efficiently. Thanks to partitioning, the precision of P]C is much better than that of P]I in the presence of locks and priorities. For instance, P]C using the interval domain discovers that T = 0 in Fig. 14, while the analysis of Sec. 3.3 would only discover that T ∈ [−1, 1] due to spurious interferences from the high priority thread. 38 ANTOINE MINÉ parallel iterator iterator trace partitioning domain scheduler partitioning domain memory domain interference domain pointer domain non relational numerical domains − intervals − congruences pointer domain numerical domains −intervals − congruences − octagons − decision trees − digital filters . . . Figure 27: Hierarchy of abstractions in Astrée and Thésée. Domains in boldface are specific to Thésée and not included in Astrée. 5. Experimental Results We implemented the abstract analysis of Sec. 4.5 in Thésée, our prototype analyzer based on the Astrée static analyzer [8]. We first describe succinctly Astrée, then Thésée, and finally our target application and its analysis by Thésée. 5.1. The Astrée Analyzer. Astrée is a static analyzer that checks for run-time errors in embedded C programs. Astrée accepts a fairly large subset of C, excluding notably dynamic memory allocation and recursion, that are generally unused (or even forbidden) in embedded code. Moreover, Astrée does not analyze multi-threaded programs, which is the very issue we address in the present article. The syntax and semantics assumed by Astrée are based on the C99 norm [35], supplemented with the IEEE 754-1985 norm for floating-point arithmetics [33]. The C99 norm underspecifies many aspects of the semantics, leaving much leeway to compiler implementations, including random undocumented and unpredictable behaviors in case of an error such as an integer overflow. A strictly conforming program would rely only on the semantics defined in the norm. Few programs are strictly conforming; they rely instead on additional, platform-specific semantic hypotheses. This is especially true in the embedded software industry, where programs are designed for a specific, well-controlled platform, and not for portability. Thus, Astrée provides options to set platform-specific semantic features, such as the bit-size and byte-ordering of data-types, and the subsequent analysis is only sound with respect to these hypotheses. The run-time errors checked by Astrée are: overflows in STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 39 integer arithmetics and casts, integer divisions by zero, invalid bit-shifts, infinities and Not a Number floating-point values (caused by overflows, divisions by zero, or invalid operations), out-of-bound array accesses, invalid pointer arithmetics or dereferences (including null, dangling, and misaligned pointers), and failure of user-defined assertions (specified in a syntax similar to the standard assert function). Astrée takes as input the C source after preprocessing by a standard preprocessor and a configuration file describing the ranges of the program inputs (such as memorymapped sensors) if any. It then runs fully automatically and outputs a list of alarms corresponding to potential errors, and optionally program invariants for selected program points and variables. Astrée is sound in that it computes an over-approximation of all program traces, for all input scenarios. Moreover, the analysis continues even for erroneous program traces if the behavior after the error has a reasonable semantics. This is the case after integer overflows, for instance, using a wrap-around semantics, but it is not the case after dereferencing a dangling pointer, which has truly unpredictable results. In all cases, when there is no alarm, or when all the alarms can be proved by other means to be spurious, then the program is indeed proved free of run-time error. Although Astrée accepts a large class of C programs, it cannot analyze most of them precisely and efficiently. It is specialized, by its choice of abstractions, towards control / command aerospace code, for which it gives good results. Thanks to a modular design, it can be adapted to other application domains by adding new abstractions. Actually, the initial specialization towards control / command avionic software [8] was achieved by incrementally adding new domains and refining existing ones until all false alarms could be removed on a target family of large control software from Airbus (up to 1 M lines) [23]. The resulting analyzer achieved the zero false alarm goal in a few hours of computation on a standard 2.66 GHz 64-bit intel server, and could be deployed in an industrial context [23]. This specialization can be continued with limited effort, at least for related application domains, as shown by our case study on space software [9]. Astrée is now a mature tool industrialized by AbsInt [1]. Figure 27 presents the design of Astrée as a hierarchy of abstract domains — we ignore for now boldface domains, which are specific to Thésée. Actually, Astrée does not contain a single “super-domain” but rather many small or medium-sized domains that focus on a specific kind of properties each, possess a specific encoding of these properties and algorithms to manipulate them, and can be easily plugged in and out. One of the first domain included in Astrée was the simple interval domain [13] that expresses properties of the form X ∈ [a, b] for every machine integer and floating-point variable X ∈ V. The interval domain is key as it is scalable, hence it can be applied to all variables at all program points. Moreover, it is able to express sufficient conditions for the absence of many kinds of errors, e.g., overflows. Astrée also includes relational domains, such as the octagon domain [46] able to infer relations of the form ±X ± Y ≤ c. Such relations are necessary at a few locations, for instance to infer precise loop invariants, which then lead to tighter variable bounds. However, as the octagon domain is less scalable, it is used only on a few variables, selected automatically by a syntactic heuristic. Astrée also includes abstract domains specific to the target application domain, such as a domain to handle digital filtering featured in many control / command applications [27]. The computations are performed in all the domains in parallel, and the domains communicate information through a partially reduced product [18], so that they can improve each other in a controlled way — a fully reduced product, 40 ANTOINE MINÉ where all domains communicate all their finds, would not scale up. Additionally to numeric variables, the C language features pointers. Pointer values are modeled in the concrete semantics of Astrée as semi-symbolic pairs containing a variable name and an integer byteoffset. The pointer abstract domain is actually a functor that adds support for pointers to any (reduced product of) numerical abstract domain(s) by maintaining internally for each pointer a set of pointed-to variables, and delegating the abstraction of the offset to the underlying numerical domain(s) (associating a synthetic integer variable to each offset). Another functor, the memory domain, handles the decomposition of aggregate variables (such as arrays and structures) into simpler scalar variables. The decomposition is dynamic to account for the weak type system of C and the frequent reinterpretation of the same memory portions as values of different types (due to union types and to type-punning). Both functors are described in [45]. Finally, a trace partitioning domain [44] adds a limited amount (for efficiency) of path-sensitivity by maintaining at the current control point several abstract states coming from execution traces with a different history (such as which branches of if statements were taken in the past). The computation in these domains is driven by an iterator that traverses the code by structural induction on its syntax, iterating loops with widening and stepping into functions to achieve a fully flow- and context-sensitive analysis. More information and pointers about Astrée can be found in [7]. 5.2. The Thésée Analyzer. Thésée is a prototype extension of Astrée that uses the abstract scheduled interference semantics of Sec. 4.5 to support the analysis of multi-threaded programs. Thésée checks for the same classes of run-time errors as Astrée. Additionally, it reports data-races, but ignores other parallel-related hazards, such as dead-locks and priority inversions, that are not described in our concrete semantics. Thésée benefited directly from Astrée’s numerous abstract domains and iteration strategies targeting embedded C code. Figure 27 presents the design of Thésée, where nonboldface domains are inherited from Astrée and boldface ones have been added. Firstly, the memory domain has been modified to compute the abstract interferences generated by the currently analyzed thread and apply the interferences from other threads. We use the method of Fig. 25: the memory domain dynamically modifies expressions to include interferences explicitly (e.g., replacing variables with intervals) before passing the expressions to a stack of domains that are unaware of interferences. Interferences are themselves stored and manipulated by a specific domain which maintains abstract sets of values. Non-relational abstractions from Astrée, such as intervals but also abstract pointer values, are directly exploited to represent abstract interferences. Secondly, a scheduler partitioning domain has been added. It maintains an abstraction of environments and of interferences for each abstract scheduled configuration live at the current program point. Then, for each configuration, it calls the underlying domain with the abstract environment associated to this configuration, as well as the abstract interferences that can effect this environment (i.e., a join of interferences from all configurations not in mutual exclusion with the current one). Additionally, the scheduler domain interprets directly all the instructions related to synchronization, which involves copying and joining abstract environments from different configurations, as described in Fig. 26. Finally, we introduced an additional, parallel iterator driving the whole analysis. Following the execution model of the ARINC 653 specification, the parallel iterator first executes the main function as a regular single-threaded program and collects the set of resources STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 41 (threads, synchronization objects) it creates. Then, as the program enters parallel mode, the iterator analyzes each thread in sequence, and keeps re-analyzing them until their interferences are stable (in parallel mode, no new thread may be created). All these changes add up to approximately 10 K lines of code in the 100 K lines analyzer and did not require much structural change. 5.3. Analyzed Application. Thésée has been applied to the analysis of a large industrial program consisting of 1.7 M lines of unpreprocessed C code6 and 15 threads, and running under an ARINC 653 real-time OS [3]. The analyzed program is quite complex as it mixes string formatting, list sorting, network protocols (e.g., TFTP), and automatically generated synchronous logic. The application performs system calls that must be properly modeled by the analyzer. To keep the analyzer simple, Thésée implements natively only low-level primitives to declare and manipulate threads as well as simple mutexes having the semantics described in Sec. 4.1. However, ARINC 653 objects have a more complex semantics. The analyzed program is thus completed with a 2,500-line hand-written model of the ARINC 653 standard, designed specifically for the analysis with Thésée. It implements all the system calls in C extended with Thésée primitives. The model maps high-level ARINC 653 objects to lower-level Thésée ones. For instance, ARINC processes7 have a name while Thésée threads only have an integer identifier, so, the model keeps track of the correspondence between names and identifiers in C arrays and implements system calls to look up names and identifiers. It also emulates the ARINC semantics using Thésée primitives. For instance, a lock with a timeout is modeled as a non-deterministic test that either actually locks the mutex, or yields and returns an error code without locking the mutex. An important feature of the program we analyze is that all potentially blocking calls have a finite timeout, so, by construction, no dead-lock nor unbounded priority inversion can occur. This explains why we did not focus on detecting statically these issues in the present article. 5.4. Analysis Results. At the time of writing, the analysis with Thésée of this application takes 27 h on our 2.66 GHz 64-bit intel server. An important result is that only 5 iterations are required to stabilize abstract interferences. Moreover, there is a maximum of 52 partitions for abstract interferences and 4 partitions at most for abstract environments, so that the analysis fits in the 32 GB of memory of our server. The analysis currently generates 2,136 alarms (slightly less than one alarm per 800 lines of unpreprocessed code). These figures have evolved before and during the writing of this article, as we improved the analysis. Figure 28 presents the evolution of the number of alarms on a period of 18 months. As our improvement effort focuses on optimizing the analysis precision, we do not present the detailed evolution of the analysis time (it oscillates between 14 h and 28 h,8 with a number of iterations between 4 and 7) nor the memory consumption (stable at a little under 30 GB). The number of alarms started at 12,257 alarms mid-2010, as reported in [7, 6After preprocessing and removal of comments, empty lines, and multiple definitions, the code is 2.1 M lines. The increase in size is due to the use of macros. 7In the ARINC 653 [3] terminology, execution units in shared memory are called “processes”; they correspond to POSIX threads and not to POSIX processes [34]. 8Intuitively, adding domains and refining their precision degrades the efficiency. However, inferring tighter invariants can also reduce the number of loop iterations to reach a fixpoint, and so, improving the precision may actually lower the overall analysis time. 42 ANTOINE MINÉ 14000 Analysis result 12000 Number of alarms 10000 8000 6000 4000 2000 0 2010 05 2010 07 2010 09 2010 11 2011 01 2011 03 2011 05 2011 07 2011 09 2011 11 2012 01 Date (year/month) Figure 28: Evolution of the number of alarms in the analysis of our target application as we improved our prototype analyzer. int clock, acc; void accum(int reset) { static int t0; if (reset) { acc = 0; } else { acc += clock - t0; } t0 = clock; /* 0 ≤ acc ≤ clock */ } (a) struct t { int id; struct { char msg[23]; } x[3]; } tab[12]; char* end of msg(int ident, int pos) { int i; struct t* p = tab; for (i=0; i<12 && p[i].id!=ident; i++); char* m = p[i].x[pos].msg; for (i=0; i<23 && m[i]; i++); /* offset(m + i) ∈ 4 + 292[0, 11] + 96[0, 2] + [0, 22] */ return m+i; } (b) Figure 29: Program fragments that required an improvement in the analyzer prototype. § VI]. This high initial number can be explained by the lack of specialization of the analyzer: the first versions of Thésée were naturally tuned for avionic control / command software as they inherited abstract domains E ] and N ] from Astrée, but our target application for Thésée is not limited to control / command processing. To achieve our current results, we improved the numerical, pointer, and memory domains in Thésée, and designed new ones. We illustrate two of these improvements in Fig. 29. A first example is the improvement of STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 43 transfer functions of existing domains. For instance, the function accum from Fig. 29.(a) accumulates, in acc, elapsed time as counted by a clock variable (updated elsewhere), and we need to discover the invariant acc ≤ clock. This requires analyzing precisely the incrementation of acc in a relational domain. As the octagon domain we use [46] only supported precisely assignments involving two variables, we added new transfer functions for three-variable assignments (another solution, using the more powerful polyhedron domain [21], did not prove scalable enough). A second example is an improvement of the pointer domain to precisely track pointers traversing nested arrays and structures, as in Fig. 29.(b) where the precise location of the pointer m+i needs to be returned. Our target application features similar complex data-structures and their traversal P extensively. We thus added a non-relational integer domain for offsets of the form α0 + i αi [`i , hi ], where the values of αi , `i , and hi are inferred dynamically. Note that all these improvements concern only the abstract domain parameters; neither the interference iterator nor the scheduler partitioning were refined. Following the design-by-refinement used in Astrée [8], we have focused on the analysis of a single (albeit large and complex) industrial software and started refining the analyzer to lower the number of alarms, instead of multiplying shallower case studies. We plan to further improve the analysis precision in order to approach the zero false alarm goal. This is the objective of the AstréeA project [20], successor to Thésée. The remaining 2,136 alarms can be categorized into three kinds. Firstly, some alarms are, similarly to the ones described in Fig. 29, not related to parallelism but to the imprecision of the parameter abstract domains. An important class of properties currently not supported by Astrée nor Thésée is that of memory shape properties [12]. In the context of embedded software, dynamic memory allocation is disabled; nevertheless, our target code features dynamic linked lists allocated in large static arrays. Another class of properties concerns the correct manipulation of zero-terminated C strings. A significant part of the remaining alarms may be removed by designing new memory domains for these properties. Secondly, some alarms can be explained by an imprecise abstraction of thread interferences, similar to the imprecision observed in Figs. 21–22 (these examples were inspired from our target code). Hence the need to extend our framework to support relational and flow-sensitive abstractions of interferences. Thirdly, some alarms have simply not yet been fully investigated. Although Thésée provides verbose information on the context of each alarm as well as the thread-local and interference invariants, discovering the origin of alarms is a challenging task on such a large code: it often requires tracking the imprecision upstream and understanding the interplay of thread interferences. 6. Related Work There are far too many works on the semantics and analysis of parallel programs to provide a fair survey and comparison here. Instead, we focus on a few works that are either recent or provide a fruitful comparison with ours. 6.1. Interferences. The idea of attaching to each thread location a local invariant and handling proofs of parallel programs similarly to that of sequential programs dates back to the Hoare-style logic of Owicki and Gries [49] and the inductive assertion method of Lamport [37, 40]. It has been well studied since; see [22] for a recent account and survey. 44 ANTOINE MINÉ The difference between the proofs of sequential programs and that of parallel programs in this framework is that the local invariants of each thread must be proved invariant by the execution of all other threads — i.e., a non-interference check. These proof methods are studied from an Abstract Interpretation theoretical point of view by Cousot and Cousot [15], which leads to two results: an expression of each method as a decomposition of the global invariant into thread-local invariants, and a framework to apply abstractions and derive effective and sound static analyzers. When shifting from proof methods to inference methods, the non-interference check naturally becomes an inference of interferences. Our work is thus strongly inspired from [15]: it is based on an Owicki–Gries style decomposition of the global invariant (although it is not only based on the control points of threads, but also on a more complex scheduler state). The thread-local and interference parts are then abstracted separately, using a relational flow-sensitive analysis for the former and a coarser non-relational flow-insensitive analysis for the later. Our work is also similar to the recent static analysis of C programs with POSIX threads by Carré and Hymans [11]: both are based on Abstract Interpretation and interference computation, and both are implemented by modifying existing static analyses of sequential programs. Their analysis is more powerful than ours in that it handles dynamic thread creation and the concrete semantics models interferences as relations (instead of actions), but the subsequent abstraction leads to a non-relational analysis; moreover, real-time scheduling is not considered. 6.2. Data-Flow Analysis. Fully flow-insensitive analyses, such as Steensgaard’s pointsto analysis [58], naturally handle parallel programs. To our knowledge, all such analyses are also non-relational. These fast analyses are adequate for compiler optimization but, unfortunately, the level of accuracy required to prove safety properties demands the use of (at least partially) flow-sensitive and relational methods, which we do. By contrast, Sălcianu and Rinard [54] proposed a flow-sensitive pointer and escape analysis for parallel programs which is more precise (and more costly), although it still targets program optimisation. It uses a notion of interference to model the effect of threads and method calls. 6.3. Model Checking. Model-checking also has a long history of verifying parallel systems, including recently weak memory models [6]. To prevent state explosion, Godefroid [31] introduced partial order reduction methods. They limit the number of interleavings to consider, with no impact on soundness nor completeness. Due to the emphasis on completeness, the remaining set of interleavings can still be high. By contrast, we abstract the problem sufficiently so that no interleaving need to be considered at all, at the cost of completeness. Another way to reduce the complexity of model checking is the context bound approach, as proposed by Qadeer et al. [51]. As it is unsound, it may fail to find some run-time errors. By contrast, our method takes into account all executions until completion. In his PhD, Malkis [42] used abstract interpretation to prove the equivalence of Owicki and Gries’s proof method and the more recent model-checking algorithm by Flanagan and Qadeer [29], and presented an improvement based on counterexample-guided abstract refinement, a method which, unlike ours, is not guaranteed to converge in finite time. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 45 6.4. Weakly Consistent Memories. Weakly consistent memory models have been studied originally for hardware — see [2] for a tutorial. Precise formal models are now available for popular architectures, such as the intel x86 model by Sewell et al. [57], either inferred from informal processor documentations or reverse-engineered through “black-box” testing [5]. Pugh [50] pioneered the use of weakly consistent memory models in programming language semantics in order to take into account hardware and compiler optimizations. This culminated in the Java memory model of Manson et al. [43, 32]. Weakly consistent memory models are now recognised as an important part of language semantics and are increasingly supported by verification methods. An example in modelchecking is the work of Atig et al. [6]. An example in theorem proving is the extension by Ševčı́k et al. [56] of Leroy’s formally proved C compiler [41]. Testing methods have also been proposed, such as that of Alglave et al. [5]. In the realm of static analysis, we can cite the static analysis by Abstract Interpretation of the happens-before memory model (at the core of the Java model) designed by Ferrara [28]. Recently, Alglave and al. proposed in [4] to lift analyses that are only sound with respect to sequential consistency, to analyses that are also sound in weak memory models. Their method is generic and uses a “repair loop” similar to our fixpoint of flow-insensitive interferences. Memory models are often defined implicitly, by restricting execution traces using global conditions, following the approach chosen by the Java memory model [32]. We chose instead a generative model based on local control path transformations, which is reminiscent of the approach by Saraswat et al. [55]. We believe that it matches more closely classic software and hardware optimizations. Note that we focus on models that are not only realistic, but also amenable to abstraction into an interference semantics. The first condition ensures the soundness of the static analysis, while the second one ensures its efficiency. 6.5. Real-Time Scheduling. Many analyses of parallel programs assume arbitrary preemption, either implicitly at all program points (as in flow-insensitive analyses), or explicitly at specified program points (as in context-bounded approaches [51]), but few analyses model and exploit the strict scheduling policy of real-time schedulers. A notable exception is the work of Gamatié et al. [30] on the modeling of systems under an ARINC 653 operating system. As the considered systems are written in the SIGNAL language, their ARINC 653 model is naturally also written in SIGNAL, while ours in written in C (extended with low-level primitives for parallelism, which were not necessary when modeling in SIGNAL as the language can naturally express parallelism). 6.6. Further Comparison. A detailed comparison between domain-aware static analyzers, such as Astrée, and other verification methods, such as theorem proving and model checking, is presented in [19]. These arguments are still valid in the context of a parallel program analysis and not repeated here. On the more specific topic of parallel program analysis, we refer the reader to the comprehensive survey by Rinard [53]. 7. Conclusion We presented a static analysis by Abstract Interpretation to detect in a sound way run-time errors in embedded C software featuring several threads, a shared memory with weak consistency, mutual exclusion locks, thread priorities, and a real-time scheduler. Our method is based on a notion of interferences and a partitioning with respect to an abstraction of the 46 ANTOINE MINÉ scheduler state. It can be implemented on top of existing analyzers for sequential programs, leveraging a growing library of abstract domains. Promising early experimental results on an industrial code demonstrate the scalability of our approach. A broad avenue for future work is to bridge the gap between the interleaving semantics and its incomplete abstraction using interferences. In particular, it seems important to abstract interferences due to well synchronized accesses in a relational way (this is in particular needed to remove some alarms remaining in our target application). We also wish to add some support for abstractions that are (at least partially) sensitive to the history of thread interleavings. This would be useful to exploit more properties of real-time schedulers, related for instance to the guaranteed ordering of some computations (by contrast, we focused in this article mainly on properties related to mutual exclusion). Moreover, we wish to extend our framework to include more models of parallel computations. This includes support for alternate real-time operating systems with similar scheduling policies but manipulating different synchronization objects, for instance the condition variables in real-time POSIX systems [34], or alternate priority schemes, such as the priority ceiling protocol for mutexes. Another example is the support for the OSEK/VDX and Autosar real-time embedded platforms widely used in the automotive industry. We also wish to study more closely weak memory consistency semantics and, in particular, how to design more precise or more general interference semantics, and abstract them efficiently. Supporting atomic variables, recently included in the C and C++ languages, may also trigger the need for a finer, field-sensitive handling of weak memory consistency. A long term goal is the analysis of other errors specifically related to parallelism, such as dead-locks, live-locks, and priority inversions. In a real-time system, all system calls generally have a timeout in order to respect hard deadlines. Thus, interesting properties are actually quantitative: by construction, unbounded priority inversions cannot occur, so, we wish to detect bounded priority inversions. On the practical side, we wish to improve our prototype analyzer to reduce the number of false alarms on our target industrial code. This requires some of the improvements to the parallel analysis framework proposed above (such as relational and flow-sensitive abstractions for interferences), but also the design of new numerical, pointer, and memory domains which are not specific to parallel programs. Acknowledgement We wish to thank the ESOP’11 and LMCS anonymous reviewers as well as David Pichardie for their helpful comments on several versions of this article. References [1] AbsInt, Angewandte Informatik. Astrée run-time error analyzer. http://www.absint.com/astree. [2] S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Comp., 29(12):66–76, 1996. [3] Aeronautical Radio Inc. ARINC 653. http://www.arinc.com. [4] J. Alglave, D. Kroening, J. Lugton, V. Nimal, and M. Tautschnig. Soundness of data flow analyses for weak memory models. In Proc. of the 9th Asian Symp. on Programming Languages and Systems (APLAS’2011), volume 7078 of LNCS, pages 272–288, Dec. 2011. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 47 [5] J. Alglave, L. Maranget, S. Sarkar, and P. Sewell. Litmus: Running tests against hardware. In Proc. of 17th Int. Conf. on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’11), volume 6605 of LNCS, pages 41–44. Springer, Mar. 2011. [6] M. F. Atig, A. Bouajjani, S. Burckhardt, and M. Musuvathi. On the verification problem for weak memory models. In Proc. of the 37th ACM SIGACT/SIGPLAN Symp. on Principles of Programming Languages (POPL’10), pages 7–18. ACM, Jan. 2010. [7] J. Bertrane, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, and X. Rival. Static analysis and verification of aerospace software by abstract interpretation. In AIAA Infotech@Aerospace, number 2010-3385 in AIAA, pages 1–38. AIAA (American Institute of Aeronautics and Astronautics), Apr. 2010. [8] B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. A static analyzer for large safety-critical software. In Proc. of the ACM SIGPLAN Conf. on Programming Languages Design and Implementation (PLDI’03), pages 196–207. ACM, June 2003. [9] O. Bouissou, E. Conquet, P. Cousot, R. Cousot, J. Feret, K. Ghorbal, E. Goubault, D. Lesens, L. Mauborgne, A. Miné, S. Putot, X. Rival, and M. Turin. Space software validation using abstract interpretation. In Proc. of the Int. Space System Engineering Conf., Data Systems in Aerospace (DASIA’09), volume SP-669, pages 1–7. ESA, May 2009. [10] F. Bourdoncle. Efficient chaotic iteration strategies with widenings. In Proc. of the Int. Conf. on Formal Methods in Programming and their Applications (FMPA’93), volume 735 of LNCS, pages 128–141. Springer, June 1993. [11] J.-L. Carré and C. Hymans. From single-thread to multithreaded: An efficient static analysis algorithm. Technical Report arXiv:0910.5833v1, EADS, Oct. 2009. [12] B.-Y. E. Chang and X. Rival. Relational inductive shape analysis. In Proc. of the 35th ACM SIGPLAN/SIGACT Symp. on Principles of Programming Languages (POPL’08), pages 247–260. ACM, 2008. [13] P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proc. of the 4th ACM Symp. on Principles of Programming Languages (POPL’77), pages 238–252. ACM, Jan. 1977. [14] P. Cousot and R. Cousot. Constructive versions of Tarski’s fixed point theorems. Pacific Journal of Mathematics, 81(1):43–57, 1979. [15] P. Cousot and R. Cousot. Invariance proof methods and analysis techniques for parallel programs. In Automatic Program Construction Techniques, chapter 12, pages 243–271. Macmillan, New York, NY, USA, 1984. [16] P. Cousot and R. Cousot. Abstract interpretation frameworks. Journal of Logic and Computation, 2(4):511–547, Aug. 1992. [17] P. Cousot and R. Cousot. Comparing the Galois connection and widening/narrowing approaches to abstract interpretation, invited paper. In Int. Workshop on Programming Language Implementation and Logic Programming (PLILP’92), volume 631 of LNCS, pages 269–295. Springer, 1992. [18] P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. Combination of abstractions in the Astrée static analyzer. In Proc. of the 11th Annual Asian Computing Science Conf. (ASIAN’06), volume 4435 of LNCS, pages 272–300. Springer, Dec. 2006. [19] P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. Varieties of static analyzers: A comparison with Astrée, invited paper. In Proc. of the First IEEE & IFIP Int. Symp. on Theoretical Aspects of Software Engineering (TASE’07), pages 3–17. IEEE CS Press, June 2007. [20] P. Cousot, R. Cousot, J. Feret, A. Miné, and X. Rival. The AstréeA static analyzer. http://www.astr eea.ens.fr. [21] P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In Conf. Rec. of the 5th Annual ACM SIGPLAN/SIGACT Symp. on Principles of Programming Languages (POPL’78), pages 84–97. ACM, 1978. [22] W.-P. de Roever, F. de Boer, U. Hanneman, J. Hooman, Y. Lakhnech, M. Poel, and J. Zwiers. Concurrency Verification: Introduction to Compositional and Noncompositional Methods. Cambridge University Press, 2001. [23] D. Delmas and J. Souyris. Astrée: from research to industry. In Proc. of the 14th Int. Static Analysis Symp. (SAS’07), volume 4634 of LNCS, pages 437–451. Springer, Aug. 2007. 48 ANTOINE MINÉ [24] E. W. Dijkstra. Cooperating sequential processes. In Programming Languages: NATO Advanced Study Institute, pages 43–112. Academic Press, 1968. [25] E. W. Dijkstra. Guarded commands, non-determinacy and formal derivation of programs. Comm. ACM, 18(8):453–457, 1975. [26] J. Feret. Occurrence counting analysis for the pi-calculus. Electronic Notes in Theoretical Computer Science, 39(2), 2001. [27] J. Feret. Static analysis of digital filters. In Proc. of the 13th European Symp. on Programming (ESOP’04), volume 2986 of LNCS, pages 33–48. Springer, Mar. 2004. [28] P. Ferrara. Static analysis via abstract interpretation of the happens-before memory model. In Proc. of the 2nd Int. Conf. on Tests and Proofs (TAP’08), volume 4966 of LNCS, pages 116–133. Springer, 2008. [29] C. Flanagan and S. Qadeer. Thread-modular model checking. In Proc. of the 10th Int. SPIN Workshop on Model Checking of Software (SPIN’03), volume 2648 of LNCS, pages 213–224. Springer, 2003. [30] A. Gamatié and T. Gautier. Synchronous modeling of avionics applications using the SIGNAL language. In Proc. of the 9th IEEE Real-Time and Embedded Technology and Applications Symp. (RTAS’03), pages 144–151. IEEE Computer Society, 2003. [31] P. Godefroid. Partial-Order Methods for the Verification of Concurrent Systems – An Approach to the State-Explosion Problem. PhD thesis, University of Liege, Computer Science Department, 1994. [32] J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification. Addison Wesley, 3rd edition, June 2005. [33] IEEE Computer Society. Standard for binary floating-point arithmetic. Technical report, ANSI/IEEE Std. 745-1985, 1985. [34] IEEE Computer Society and The Open Group. Portable operating system interface (POSIX) – Application program interface (API) amendment 2: Threads extension (C language). Technical report, ANSI/IEEE Std. 1003.1c-1995, 1995. [35] ISO/IEC JTC1/SC22/WG14 working group. C standard. Technical Report 1124, ISO & IEC, 2007. [36] B. Jeannet and A. Miné. Apron: A library of numerical abstract domains for static analysis. In Proc. of the 21th Int. Conf. on Computer Aided Verification (CAV’09), volume 5643 of LNCS, pages 661–667. Springer, June 2009. [37] L. Lamport. Proving the correctness of multiprocess programs. IEEE Trans. on Software Engineering, 3(2):125–143, Mar. 1977. [38] L. Lamport. Time, clocks, and the ordering of events in a distributed system. Comm. ACM, 21(7):558– 565, July 1978. [39] L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. In IEEE Trans. on Computers, volume 28, pages 690–691. IEEE Comp. Soc., Sep. 1979. [40] L. Lamport. The “Hoare logic” of concurrent programs. Acta Informatica, 14(1):21–37, June 1980. [41] X. Leroy. Formal certification of a compiler back-end or: Programming a compiler with a proof assistant. In Proc. of the 33rd ACM SIGPLAN/SIGACT Symp. on Principles of Programming Languages (POPL’06), pages 42–54. ACM, 2006. [42] A. Malkis. Cartesian Abstraction and Verification of Multithreaded Programs. PhD thesis, University of Freiburg, 2010. [43] J. Manson, B. Pugh, and S. V. Adve. The Java memory model. In Proc. of the 32nd ACM SIGPLAN/SIGACT Symp. on Principles of Programming Languages (POPL’05), pages 378–391. ACM, Jan. 2005. [44] L. Mauborgne and X. Rival. Trace partitioning in abstract interpretation based static analyzer. In Proc. of the 14th European Symp. on Programming (ESOP’05), volume 3444 of LNCS, pages 5–20. Springer, Apr. 2005. [45] A. Miné. Field-sensitive value analysis of embedded C programs with union types and pointer arithmetics. In Proc. of the ACM SIGPLAN/SIGBED Conf. on Languages, Compilers, and Tools for Embedded Systems (LCTES’06), pages 54–63. ACM, June 2006. [46] A. Miné. The octagon abstract domain. Higher-Order and Symbolic Computation, 19(1):31–100, 2006. [47] A. Miné. Static analysis of run-time errors in embedded critical parallel C programs. In Proc. of the 20th European Symp. on Programming (ESOP’11), volume 6602 of LNCS, pages 398–418. Springer, Mar. 2011. [48] F. Nielson, H. R. Nielson, and C. Hankin. Principles of Program Analysis. Springer, Oct. 1999. STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 49 [49] S. Owicki and D. Gries. An axiomatic proof technique for parallel programs I. Acta Informatica, 6(4):319–340, Dec. 1976. [50] B. Pugh. Fixing the Java memory model. In Proc. of the ACM Conf. on Java Grande, pages 89–98. ACM, 1999. [51] S. Qadeer and J. Rehof. Context-bounded model checking of concurrent software. In Proc. of the 11th Int. Conf. on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’05), volume 3440 of LNCS, pages 93–107. Springer, 2005. [52] J. C. Reynolds. Toward a grainless semantics for shared-variable concurrency. In Proc. of the Annual Conf. on Foundations of Software Technology and Theoretical Computer Science (FSTTCS’04), volume 3328 of LNCS, pages 35–48. Springer, Dec. 2004. [53] M. C. Rinard. Analysis of multithreaded programs. In Proc. of the 8th Int. Static Analysis Symp. (SAS’01), volume 2126 of LNCS, pages 1–19. Springer, Jul 2001. [54] A. Sălcianu and M. Rinard. Pointer and escape analysis for multithreaded programs. In Proc. the 8th ACM SIGPLAN Symp. on Principles and Practices of Parallel Programming (PPoPP’01), pages 12–23. ACM, 2001. [55] V. A. Saraswat, R. Jagadeesan, M. M. Michael, and C. von Praun. A theory of memory models. In Proc. of the 12th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programs (PPoPP’07), pages 161–172. ACM, Mar. 2007. [56] J. Ševčı́k, V. Vafeiadis, F. Zappa Nardelli, P. Sewell, and S. Jagannathan. Relaxed-memory concurrency and verified compilation. In Proc. of the 38th ACM SIGACT/SIGPLAN Symp. on Principles of Programming Languages (POPL’11), pages 43–54. ACM, Jan. 2011. [57] P. Sewell, S. Sarkar, S. Owens, F. Zappa Nardelli, and M. Myreen. x86-TSO: A rigorous and usable programmer’s model for x86 multiprocessors. Comm. ACM, 53, 2010. [58] B. Steensgaard. Points-to analysis in almost linear time. In Proc. of the 23rd ACM SIGPLAN/SIGACT Symp. on Principles of Programming Languages (POPL’96), pages 32–41. ACM, 1996. [59] A. Tarski. A lattice theoretical fixpoint theorem and its applications. Pacific Journal of Mathematics, 5:285–310, 1955. [60] C. B. Watkins and R. Walter. Transitioning from federated avionics architectures to integrated modular avionics. In Proc. of the 26th IEEE/AIAA Digital Avionics Systems Conf. (DASC’07), volume 2.A.1, pages 1–10. IEEE, Oct. 2007. Appendix A. Proof of Theorems A.1. Proof of Theorem 2.1. ∀s ∈ stat : SJ s K is well defined and a complete t−morphism. Proof. We prove both properties at the same time by structural induction on s. • The case of assignments X ← e and guards e ./ 0? is straightforward. • The semantics of conditionals and sequences is well-defined as its components are welldefined by induction hypothesis. It is a complete t−morphism, by induction hypothesis and the fact that the composition and the join of complete t−morphisms are complete t−morphisms. • For a loop while e ./ 0 do s, consider F and G defined as: def F (X) = (SJ s K ◦ SJ e ./ 0? K)X def G(X) = (R, Ω) t F (X) . By induction hypothesis, F , and so G, are complete t−morphisms. Thus, G has a least fixpoint [14]. We note that: SJ while e ./ 0 do s K(R, Ω) = SJ e 6./ 0? K(lfp G) 50 ANTOINE MINÉ which proves that the semantics of loops is well-defined. Moreover, accordingFto [14] again, the least fixpoint can be computed by countable Kleene iterations: lfp G = i∈N Gi (∅, ∅). F We now prove by induction on i that Gi (∅, ∅) = k<i F k (R, Ω). Indeed: G1 (∅, ∅) = (R, Ω) t F (∅, ∅) = (R, Ω) = F 0 (R, Ω) and = = = = Gi+1 (∅, ∅)  F G k<i F k (R, Ω)  F (R, Ω) t F F k (R, Ω) k<i F (R, Ω) t k<i F k+1 (R, Ω) F k k<i+1 F (R, Ω) F because F is a t−morphism. As a consequence, lfp G = i∈N F i (R, Ω). Note that, ∀i ∈ N : F i is a complete t−morphism. Thus, the function (R, Ω) 7→ lfp G is also a complete t−morphism, and so is SJ while e ./ 0 do s K. A.2. Proof of Theorem 2.2. P ⊆ P] . Proof. We prove by structural induction on s that: ∀s, R] , Ω : (SJ s K ◦ γ)(R] , Ω) v (γ ◦ S] J s K)(R] , Ω) . • The case of primitive statements X ← e and e ./ 0? holds by hypothesis: the primitive abstract functions provided by the abstract domain are assumed to be sound. • The case of sequences s1 ; s2 is settled by noting that the composition of sound abstractions is a sound abstraction. • The case of conditionals if e ./ 0 then s is settled by noting additionally that ∪] is a sound abstraction of t, as ∪]E is a sound abstraction of ∪. • We now treat the case of loops. By defining: F ] (X) F (X) def = = def (R] , Ω) ∪] (S] J s K ◦ S] J e ./ 0? K)(X) (R, Ω) t (SJ s K ◦ SJ e ./ 0? K)(X) we have S] J while e ./ 0 do s K(R] , Ω) = S] J e 6./ 0? K(lim λX ] : X ] O F ] (X ] )) SJ while e ./ 0 do s K(R, Ω) = SJ e 6./ 0? K(lfp F ) . By induction hypothesis, soundness of ∪] and composition of sound functions, F ] is a sound abstraction of F . Assume now that (R]0 , Ω0 ) is the limit of iterating λX : X OF ] (X) from (⊥]E , ∅). Then, it is a fixpoint of λX ] : X ] O F ] (X ] ), hence (R]0 , Ω0 ) = (R]0 , Ω0 ) O F ] (R]0 , Ω0 ). Applying γ and the soundness of O and F ] , we get: γ(R]0 , Ω0 ) = γ((R]0 , Ω0 ) O F ] (R]0 , Ω0 )) w γ(F ] (R]0 , Ω0 )) w F (γ(R]0 , Ω0 )) . STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 51 Thus, γ(R]0 , Ω0 ) is a post-fixpoint of F . As a consequence, it over-approximates lfp F , which implies the soundness of the semantics of loops. We now apply the property we proved to s = body, R] = E0] and Ω = ∅, and use the monotony of SJ s K and the fact that γ(E0] ) ⊇ E0 to get: γ(S] J body K(E0] , ∅)) w SJ body K(γ(E0] , ∅)) w SJ body K(E0 , ∅) which implies P] ⊇ P. A.3. Proof of Theorem 2.3. ∀s ∈ stat : ΠJ π(s) K = SJ s K. Proof. The proof is by structural induction on s. • The case of primitive statements is straightforward as π(s) = { s }. • For sequences, we use the induction hypothesis and the fact that Π is a morphism for path concatenation to get: = = = = SJ s1 ; s2 K SJ s2 K ◦ SJ s1 K ΠJ π(s2 ) K ◦ ΠJ π(s1 ) K ΠJ π(s1 ) · π(s2 ) K ΠJ π(s1 ; s2 ) K . • For conditionals, we also use the fact that Π is a morphism for ∪: = = = = SJ if e ./ 0 then s K(R, Ω) (SJ s K ◦ SJ e ./ 0? K)(R, Ω) t SJ e 6./ 0? K(R, Ω) (ΠJ π(s) K ◦ ΠJ { e ./ 0? } K)(R, Ω) t ΠJ { e 6./ 0? } K(R, Ω) ΠJ ((e ./ 0?) · π(s)) ∪ { e 6./ 0? } K(R, Ω) ΠJ π(if e ./ 0 then s) K(R, Ω) . def • For loops while e ./ 0 do s, we define F and G as in proof A.1, i.e., F (X) = (SJ s K ◦ F def SJ e ./ 0? K)X and G(X) = (R, Ω) t F (X). Recall then that lfp G = i∈N F i (R, Ω). By induction hypothesis and ·−morphism, we have: Fi = (SJ s K ◦ SJ e ./ 0? K)i = (ΠJ {e ./ 0?} · π(s) K)i = ΠJ ({e ./ 0?} · π(s))i K . def Let us S now define the set of paths P = lfp λX : {} ∪ (X · {e ./ 0?} · π(s)). By [14], P = i∈N ({e ./ 0?} · π(s))i . As a consequence: G G ΠJ P K = ΠJ ({e ./ 0?} · π(s))i K = Fi i∈N and ΠJ P K(R, Ω) = F i∈N F i (R, Ω) i∈N = lfp G. 52 ANTOINE MINÉ Finally: = = = = which concludes the proof. SJ while e ./ 0 do s K(R, Ω) SJ e 6./ 0? K(lfp G) (ΠJ { e 6./ 0? } K ◦ ΠJ P K)(R, Ω) ΠJ P · {e 6./ 0?} K(R, Ω) ΠJ π(while e ./ 0 do s) K(R, Ω) A.4. Proof of Theorem 3.1. ∀t ∈ T , s ∈ stat : ΠI J π(s), t K = SI J s, t K. Proof. The proof A.3 of Thm. 2.3 only relies on the fact that the semantic functions SJ s K are complete t−morphisms. As the functions SI J s, t K are complete tI −morphisms, the same proof holds. A.5. Proof of Theorem 3.2. P∗ ⊆ PI . Proof. To ease the proof, we will use the notations R(X), Ω(X), I(X) to denote the various components of a triplet X = (R(X), Ω(X), I(X)) in the concrete domain DI = P(E) × P(L) × P(I), and V (X), Ω(X) for pairs X = (V (X), Ω(X)) in P(R) × P(L) output by the semantics of expressions. F Let (ΩI , II ) be the fixpoint computed in (3.4), i.e., (ΩI , II ) = t∈T (Ω0t , It0 ) where (−, Ω0t , It0 ) = SI J body t , t K(E0 , ΩI , II ). Then, by definition, PI = ΩI . We first prove the following properties that compare respectively the set of errors and environments output by the interleaving semantics and the interference semantics of any path p ∈ π∗ : S (i) Ω(Π∗ J p K(E0 , ∅)) ⊆ t∈T Ω(ΠI J proj t (p), t K(E0 , ∅, II )) (ii) ∀t ∈ T , ρ ∈ R(Π∗ J p K(E0 , ∅)) : ∃ρ0 ∈ R(ΠI J proj t (p), t K(E0 , ∅, II )) : ∀X ∈ V : (ρ(X) = ρ0 (X) ∨ ∃t0 6= t : (t0 , X, ρ(X)) ∈ II ) The proof is by induction on the length of p. The case p =  is straightforward: the Ω component is ∅ on both sides of (i), and we can take ρ0 = ρ in (ii) as the R component is E0 on both sides. Consider now p = p0 · (s0 , t0 ), i.e., p is a path p0 followed by an assignment or guard s0 from thread t0 . Consider some ρ ∈ R(Π∗ J p0 K(E0 , ∅)) and the expression e0 appearing in s0 . We can apply the (ii) recurrence hypothesis to p0 and t0 which returns some ρ0 ∈ R(ΠI J proj t0 (p0 ), t0 K(E0 , ∅, II )). The fact that, for any X ∈ V, either ρ(X) = ρ0 (X) or ∃t00 6= t0 : (t00 , X, ρ(X)) ∈ II implies, given the definition of EI J e0 K (Fig. 7), that: (iii) EJ e0 Kρ v EI J e0 K(t0 , ρ0 , II ) When considering, in particular, the error component Ω(EJ e0 Kρ), (iii) allows extending the recurrence hypothesis (i) on p0 to also hold on p, i.e., executing s0 adds more errors on the right-hand side of (i) than on the left-hand side. To prove (ii) on p, we consider two cases, depending on the kind of statement s0 : • Assume that s0 is a guard, say e0 = 0? (the proof is identical for other guards e0 ./ 0?). Take any t ∈ T and ρ ∈ R(Π∗ J p K(E0 , ∅)). By definition of SJ e0 = 0? K, we have ρ ∈ R(Π∗ J p0 K(E0 , ∅)) and 0 ∈ V (EJ e0 Kρ). Take any ρ0 that satisfies the recurrence hypothesis (ii) on p0 for t and ρ. We prove that it also satisfies (ii) on p for t and ρ. The case t 6= t0 is straightforward as, in this case, proj t (p) = proj t (p0 ). STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 53 When t = t0 , then proj t (p) = proj t (p0 ) · (e0 = 0?). Recall property (iii): EJ e0 Kρ v EI J e0 K(t0 , ρ0 , II ), which implies that 0 ∈ V (EI J e0 K(t0 , ρ0 , II )), and so, we have ρ0 ∈ R(ΠI J proj t (p), t0 K(E0 , ∅, II )). • Assume that s0 is an assignment X ← e0 . Take any ρ ∈ R(Π∗ J p K(E0 , ∅)) and t ∈ T . Then ρ has the form ρ0 [X 7→ ρ(X)] for some ρ0 ∈ R(Π∗ J p0 K(E0 , ∅)) and ρ(X) ∈ V (EJ e0 Kρ0 ). We first prove that (t0 , X, ρ(X)) ∈ II . Take ρ00 as defined by the recurrence hypothesis (ii) for t0 , p0 and ρ0 . Then ρ(X) ∈ V (EJ e0 Kρ0 ) ⊆ V (EI J e0 K(t0 , ρ00 , II )) by property (iii). By definition of SI J X ← e0 , t0 K (Fig. 8), we have (t0 , X, ρ(X)) ∈ I(SI J X ← e0 , t0 K({ρ00 }, ∅, II )). We have ρ00 ∈ R(ΠI J proj t0 (p0 ), t0 K(E0 , ∅, II )) by definition. Because proj t0 (p) = proj t0 (p0 )· (X ← e0 ) ∈ π(body t0 ), it follows that (t0 , X, ρ(X)) ∈ I(ΠI J π(body t0 ), t0 K(E0 , ∅, II )). By Thm. 3.1, we then have (t0 , X, ρ(X)) ∈ I(SI J body t0 , t0 K(E0 , ∅, II )) = It00 . Thus, S (t0 , X, ρ(X)) ∈ II , as II satisfies II = t∈T It0 . To prove (ii), we consider first the case where t 6= t0 . Take ρ00 as defined by the recurrence hypothesis (ii) for t, p0 and ρ0 . As t 6= t0 , proj t (p) = proj t (p0 ), and ρ00 ∈ R(ΠI J proj t (p), t K(E0 , ∅, II )). As ρ and ρ0 are equal except maybe on X, and we have (t0 , X 0 , ρ(X)) ∈ II , then ρ00 satisfies (ii) for t, p, and ρ. We now consider the case where t = t0 . Take ρ00 as defined by the recurrence hypothesis (ii) for t, p0 and ρ0 . We define ρ0 = ρ00 [X 7→ ρ(X)]. The property (iii) implies V (EJ e0 Kρ0 ) ⊆ V (EI J e0 K(t0 , ρ00 , II )). We get ρ0 ∈ R(ΠI J proj t (p0 ) · (X ← e0 ), t K (E0 , ∅, II )) = R(ΠI J proj t (p), t K(E0 , ∅, II )). As ρ and ρ0 are equal except maybe on X, and ρ0 and ρ00 are also equal except maybe on X, and on X we have ρ(X) = ρ0 (X), then ρ0 satisfies (ii) for t, p and ρ. The theorem then stems from applying property (i) to all p ∈ π∗ and using Thm. 3.1: = = ⊆ = = ⊆ = = P∗ Ω(Π∗ J π∗ K(E0 , ∅)) S Ω(Π∗ J p K(E0 , ∅)) Sp∈π∗ Ω(ΠI J proj t (p), t K(E0 , ∅, II )) St∈T , p∈π∗ Ω(ΠI J π(body t ), t K(E0 , ∅, II )) St∈T Ω(SI J body t , t K(E0 , ∅, II )) St∈T t∈T Ω(SI J body t , t K(E0 , ΩI , II )) ΩI PI . A.6. Proof of Theorem 3.3. PI ⊆ P]I . Proof. We start by considering the semantics of expressions. We first note that, for any abstract environment R] ∈ E ] , abstract interference I ] ∈ I ] , thread t, and expression e, if ρ ∈ γE (R] ), then EI J e K(t, ρ, γI (I ] )) ⊆ EJ apply(t, R] , I ] , e) Kρ, i.e., apply can be used to over-approximate the semantics with interference EI using the non-interfering semantics E in the concrete. We prove this by structural induction on the syntax of expressions e. We consider first the case of variables e = X ∈ V, which is the interesting case. When γE (R] ) has no interference for X, then apply(t, R] , I ] , X) = X and: EJ apply(t, R] , I ] , X) Kρ = EJ X Kρ = {ρ(X)} = EI J X K(t, ρ, γI (I ] )) . 54 ANTOINE MINÉ In case of interferences on X, we have apply(t, R] , I ] , X) = as-expr (VX] ∪]N get(X, R] )), which is an interval [l, h] containing, by definition of as-expr and soundness of get, both ρ(X) and { v | ∃t0 6= t : (t0 , X, v) ∈ γI (I ] ) }. Thus, EJ apply(t, R] , I ] , X) Kρ = [l, h] ⊆ EJ X Kρ. For other expressions, we note that EI and E are defined in similar way, and so, the proof stems from the induction hypothesis and the monotony of EI and E. To prove the soundness of primitive statements S]I J s K, we combine the above result with the soundness of S] with respect to S. We immediately get that R((SI J s K ◦ γ)(R] , Ω, I ] )) ⊆ R((γ ◦S]I J s K)(R] , Ω, I ] )) for an assignment or test s, and likewise for the Ω component. (We reuse the notations R(X), Ω(X), I(X) from the proof A.5.) The I component is unchanged by SI J s K and S]I J s K when s is a test. For the I component after an assignment, we remark that I((SI J X ← e K ◦ γ)(R] , Ω, I)) can be written as γI (I) ∪ { (t, X, ρ(X)) | ρ ∈ R((SI J X ← e K ◦ γ)(R] , Ω, I)) } . We then reuse the fact that R((SI J s K◦γ)(R] , Ω, I ] )) ⊆ R((γ ◦S]I J s K)(R] , Ω, I ] )) to conclude the proof of primitive statements. The case of non-primitive statements is easier as it is mostly unchanged between S and SI (hence, between S] and S]I ). Hence, the proof in A.2 of Thm. 2.2 still applies. As a consequence, we have: ∀t ∈ T : (SI J body t , t K ◦ γ)(R] , Ω, I ] ) vI (γ ◦ S]I J body t , t K)(R] , Ω, I ] ) . Consider now the solutions (ΩI , II ) and (Ω]I , II] ) of the fixpoints (3.4) and (3.6). We have: (ΩI , II ) = lfp F F where F (Ω, I) = t∈T (Ω0t , It0 ) and (−, Ω0t , It0 ) = SI J body t , t K(E0 , Ω, I) Likewise: (Ω]I , II] ) = lim F ] F where F ] (Ω] , I ] ) = (Ω] , I ] ) O ]t∈T (Ω]t 0 , It] 0 ) and (−, Ω]t 0 , It] 0 ) = S]I J body t , t K(E0] , Ω] , I ] ) def defining (Ω]1 , I1] ) t] (Ω]2 , I2] ) = (Ω]1 ∪ Ω]2 , I1] ∪]I I2] ) def and (Ω]1 , I1] ) O (Ω]2 , I2] ) = (Ω]2 , I1] OI I2] ) By soundness of ∪]I , OI , S]I , and E0] , we get that F ] is a sound abstraction of F . The same fixpoint transfer property that was used for loops in proof A.2 can be used here to prove that lim F ] is a sound abstraction of lfp F . As a consequence, we have Ω]I ⊇ ΩI , and so, P]I ⊇ PI . A.7. Proof of Theorem 3.5. P0∗ ⊆ PI . Proof. We reuse the notations R(X), Ω(X), I(X), V (X) from proof A.5. Consider a path p from a thread t that gives, under an elementary transformation from Def. 3.4, a path p0 . Let us denote by Vf the subset of fresh variables (i..e, that do not appear anywhere in the program, except maybe in p0 ), and by Vl (t) the subset of variables that are local to t (i.e., that do not appear anywhere, except maybe in thread t). STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 55 We consider triples (R, Ω, I) such that the interferences I are consistent with the fresh and local variables, i.e., if (t, X, v) ∈ I, then X ∈ / Vf and X ∈ Vl (t0 ) =⇒ t = t0 . We prove that, for such triples, the following holds: (i) (ii) Ω(ΠI J p0 , t K(R, Ω, I)) ⊆ Ω(ΠI J p, t K(R, Ω, I)) ∀(t0 , X, v) ∈ I(ΠI J p0 , t K(R, Ω, I)) : (t0 , X, v) ∈ I(ΠI J p, t K(R, Ω, I)) or (t = t0 ∧ X ∈ Vl (t)) (iii) ∀ρ0 ∈ R(ΠI J p0 , t K(R, Ω, I)) : ∃ρ ∈ R(ΠI J p, t K(R, Ω, I)) : ∀X ∈ V : ρ(X) = ρ0 (X) or X ∈ Vf i.e., the transformation does not add any error (i), it can only add interferences on local variables (ii), and change environments on fresh variables (iii). We now prove (i)–(iii) for each case in Def. 3.4. (1) Redundant store elimination: X ← e1 · X ← e2 X ← e2 , where X ∈ / var (e2 ) and nonblock (e1 ). We note: – (Ri , Ωi , Ii ) = ΠI J X ← ei , t K(R, Ω, I) for i = 1, 2, and – (R1;2 , Ω1;2 , I1;2 ) = ΠI J X ← e1 · X ← e2 , t K(R, Ω, I). As X ∈ / var (e2 ), EI J e2 K(t, ρ, I) = EI J e2 K(t, ρ[X 7→ v], I) for any ρ and v. Moreover, as nonblock (e1 ): ∀ρ ∈ R : ∃v ∈ V (EI J e1 K(t, ρ, I)) : ρ[X 7→ v] ∈ R1 . This implies R1;2 = R2 , and so, (iii). Moreover, Ω1;2 = Ω1 ∪ Ω2 ⊇ Ω2 , and so, (i). Likewise, I1;2 = I1 ∪ I2 ⊇ I2 , and so, (ii). Note that the hypothesis nonblock (e1 ) is important. Otherwise we could allow X ← 1/` 0 · X ← 1/`0 0 X ← 1/`0 0, where the error `0 is in the transformed program but not in the original one (here, Ω1;2 = Ω1 6⊇ Ω2 ). (2) Identity store elimination X ← X . We have: Ω(ΠI J X ← X, t K(R, Ω, I)) = Ω I(ΠI J X ← X, t K(R, Ω, I)) ⊇ I R(ΠI J X ← X, t K(R, Ω, I)) ⊇ R . In the two last inequalities, the converse inequality does not necessarily hold. Indeed, X ← X creates interferences that may be observed by other thread. Moreover V (EI J X K(t, ρ, I)) is not necessarily { ρ(X) }, but may contain interferences from other threads. This shows in particular that the converse transformation, identity insertion, is not acceptable as it introduces interferences. (3) Reordering assignments: X1 ← e1 ·X2 ← e2 X2 ← e2 ·X1 ← e1 , where X1 ∈ / var (e2 ), X2 ∈ / var (e1 ), X1 6= X2 , and nonblock (e1 ). We note: – (Ri , Ωi , Ii ) = ΠI J Xi ← ei , t K(R, Ω, I) for i = 1, 2, and – (R1;2 , Ω1;2 , I1;2 ) = ΠI J X1 ← e1 · X2 ← e2 , t K(R, Ω, I), and – (R2;1 , Ω2;1 , I2;1 ) = ΠI J X2 ← e2 · X1 ← e1 , t K(R, Ω, I). As X2 ∈ / var (e1 ), X1 ∈ / var (e2 ), and X1 6= X2 , we have ∀ρ, v : EI J e1 K(t, ρ, I) = EI J e1 K(t, ρ[X2 7→ v], I) and ∀ρ, v : EI J e2 K(t, ρ, I) = EI J e2 K(t, ρ[X1 7→ v], I) . 56 ANTOINE MINÉ This implies R1;2 = R2;1 , and so, (iii). As nonblock (e1 ), we have ∀ρ ∈ R : ∃v : ρ[X1 7→ v] ∈ R1 . This implies Ω2 = Ω(ΠI J X2 ← e2 , t K(R1 , Ω, I)), and so Ω1;2 = Ω1 ∪Ω2 . Likewise, I1;2 = I1 ∪I2 . Moreover, Ω2;1 ⊆ Ω1 ∪ Ω2 = Ω1;2 and I2;1 ⊆ I1 ∪ I2 = I1;2 . Thus (i) and (ii) hold. As in (1), the nonblock (e1 ) hypothesis is important so that errors in e2 masked by X1 ← e1 in the original program do not appear in the transformed program. (4) Reordering guards: e1 ./ 0? · e2 ./0 0? e2 ./0 0? · e1 ./ 0?, where noerror (e2 ). We use the same notations as in the preceding proof. We have I2;1 = I1;2 = I, which proves (ii). Consider ρ ∈ R, then either ρ ∈ R1 ∩R2 , in which case ρ ∈ R1;2 and ρ ∈ R2;1 , or ρ ∈ / R1 ∩ R2 , in which case ρ ∈ / R1;2 and ρ ∈ / R2;1 . In both cases, R1;2 = R2;1 , which proves (iii). We have Ω2 ⊆ Ω2;1 ⊆ Ω1 ∪Ω2 and Ω1 ⊆ Ω1;2 ⊆ Ω1 ∪Ω2 . But, as noerror (e2 ), Ω2 = ∅, which implies Ω2;1 ⊆ Ω1 ⊆ Ω1;2 , and so, (i). The property noerror (e2 ) is important. Consider otherwise the case where e1 ./ 0? filters out an environment leading to an error in e2 . The error would appear in the transformed program but not in the original one. (5) Reordering guards before assignments: X1 ← e1 · e2 ./ 0? e2 ./ 0? · X1 ← e1 , where X1 ∈ / var (e2 ) and either nonblock (e1 ) or noerror (e2 ). We use the same notations as in the preceding proofs. As X1 ∈ / var (e2 ), we have ∀ρ, v : EI J e2 K(t, ρ, I) = EI J e2 K(t, ρ[X1 7→ v], I) . This implies R1;2 = R2;1 , and so, (iii). Moreover, we have I1;2 = I1 and I2;1 ⊆ I1 , thus (ii) holds. For (i), consider first the case nonblock (e1 ). We have ∀ρ ∈ R : ∃v : ρ[X1 7→ v] ∈ R1 . This implies Ω2 = Ω(ΠI J e2 ./ 0?, t K(R1 , Ω, I)), and so Ω1;2 = Ω1 ∪ Ω2 . As Ω2 ⊆ Ω2;1 ⊆ Ω1 ∪ Ω2 , (i) holds. Consider now the case noerror (e2 ). We have Ω1;2 = Ω1 and Ω2;1 ⊆ Ω1 , and so, (i) holds. (6) Reordering assignments before guards: e1 ./ 0? · X2 ← e2 X2 ∈ / var (e1 ), X2 ∈ Vl (t), and noerror (e2 ). As X2 ∈ / var (e1 ), we have X2 ← e2 · e1 ./ 0?, where ∀ρ, v : EI J e1 K(t, ρ, I) = EI J e1 K(t, ρ[X2 7→ v], I) and thus, using the same notations as before, R1;2 = R2;1 , and so, (iii). Because, noerror (e2 ), we have Ω2;1 ⊆ Ω1 ∪Ω2 = Ω1 and Ω1;2 = Ω1 , and so Ω2;1 ⊆ Ω1;2 (i). Unlike the preceding proofs, we now have I1;2 ⊆ I2;1 = I2 and generally I1;2 6⊇ I2;1 . However, as X2 ∈ Vl (t), we have I2;1 \ I1;2 ⊆ {t} × Vl (t) × R, i.e., the only interferences added by the transformation concern the variable X2 , local to t. This is sufficient to ensure (ii). (7) Assignment propagation: X ← e · s X ← e · s[e/X], where X ∈ / var (e), var (e) ⊆ Vl (t), and e is deterministic. Let us note : – (R1 , Ω1 , I1 ) = ΠI J X ← e, t K(R, Ω, I), – (R1;2 , Ω1;2 , I1;2 ) = ΠI J s, t K(R1 , Ω1 , I1 ), 0 , Ω0 , I 0 ) = Π J s[e/X], t K(R , Ω , I ). – (R1;2 1 1 1 I 1;2 1;2 STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 57 Take ρ1 ∈ R1 , then there exists ρ ∈ R such that ρ1 = ρ[X 7→ ρ1 (X)] and ρ1 (X) ∈ V (EI J e K(t, ρ, I)). As e is deterministic and X ∈ / var (e), V (EJ X Kρ1 ) = V (EJ e Kρ) = {ρ1 (X)}. Additionally, as var (e) ⊆ Vl (t), there is no interference in I for variables in e from other threads, and so, V (EI J X K(t, ρ1 , I1 )) = V (EI J e K(t, ρ, I)) = {ρ1 (X)}. As a 0 , which proves (iii). Moreover, I 0 consequence, R1;2 = R1;2 1;2S= I1;2 , hence (ii) holds. FiS nally, we have { Ω(EI J e K(t, ρ, I)) | ρ ∈ R } ⊆ Ω1 but also { Ω(EI J e K(t, ρ1 , I1 )) | ρ1 ∈ R1 } ⊆ Ω1 , i.e., any error from the evaluation of e while executing s[e/X] in R1 was already present during the evaluation of e while executing X ← e in R. Thus, Ω1;2 = Ω01;2 , and (i) holds. The fact that e is deterministic is important. Otherwise, consider X ← [0, 1] · Y ← X +X X ← [0, 1] · Y ← [0, 1] + [0, 1]. Then Y ∈ {0, 2} on the left of while Y ∈ {0, 1, 2} on the right of : the transformed program has more behaviors than the original one. Likewise, var (e) ⊆ Vl (t) ensures that e may not evaluate to a different value due to interferences from other threads. (8) Sub-expression elimination: s1 · . . . · sn X ← e · s1 [X/e] · . . . · sn [X/e], where X ∈ Vf , var (e) ∩ lval (si ) = ∅, and noerror (e). Let us note: (R0 , Ω0 , I 0 ) = ΠI J X ← e, t K(R, Ω, I) . Consider ρ0 ∈ R0 . Then ρ0 = ρ[X 7→ ρ0 (X)] for some ρ ∈ R and ρ0 (X) ∈ V (EI J e K(t, ρ, I)). As X does not appear in si (being fresh), and noting: we get: (Ri0 , Ω0i , Ii0 ) = ΠI J s1 [X/e] · . . . · si [X/e], t K({ ρ0 }, Ω0 , I 0 ) ∀i, ρ0i ∈ Ri0 : V (EJ X Kρ0i ) = {ρ0 (X)} and, as X ∈ Vf , there is no interference on X, and ∀ρ0i ∈ Ri0 : V (EI J X K(t, ρ0i , Ii0 )) = {ρ0 (X)} . As var (e) ∩ lval (si ) = ∅, and noting we get: (Ri , Ωi , Ii ) = ΠI J s1 · . . . · si , t K({ρ}, Ω, I) ∀i, ρi ∈ Ri : V (EI J e K(t, ρi , Ii )) = V (EI J e K(t, ρ, I)) ⊇ {ρ0 (X)} . As a consequence, ∀i, ρ0i ∈ Ri0 : ∃ρi ∈ Ri such that ρ0i = ρi [X 7→ ρ0 (X)]. When i = n, this implies (iii). Another consequence is that ∀i : Ii0 ⊆ Ii ∪ { (t, X, ρ0 (X)) | ρ0 ∈ R0 }. As X ∈ Vf , this implies (ii) when i = n. Moreover, as noerror (e), Ω0 = Ω. Note that: ∀i : Ω(ΠI J s[X/e], t K(Ri0 , Ω0i , Ii0 )) ⊆ Ω(ΠI J s, t K(Ri0 , Ω0i , Ii0 )) . Thus, ∀i : Ω0i ⊆ Ωi , which implies (i) when i = n. (9) Expression simplification: s s[e0 /e], when ∀ρ : EJ e Kρ w EJ e0 Kρ and var (e) ∪ 0 var (e ) ⊆ Vl (t). As var (e) ⊆ Vl (t), there is no interference in I for variables in e from other threads. We deduce that EI J e K(t, ρ, I) = EJ e Kρ. Likewise, EI J e0 K(t, ρ, I) = EJ e0 Kρ, and so, EI J e K(t, ρ, I) w EI J e0 K(t, ρ, I). By monotony of SI , we get: ΠI J s, t K(R, Ω, I) w ΠI J s[e0 /e], t K(R, Ω, I) which implies (i)–(iii). 58 ANTOINE MINÉ We now prove that, if the pair p, p0 satisfies (i)–(iii), then so does the pair p · s, p0 · s for any primitive statement s executed by t. We consider a triple (R0 , Ω0 , I0 ) and note (R0 , Ω0 , I 0 ) = ΠI J p0 , t K(R0 , Ω0 , I0 ) and (R, Ω, I) = ΠI J p, t K(R0 , Ω0 , I0 ). Take any ρ0 ∈ R0 . By (iii) on the pair p, p0 , there is some ρ ∈ R that equals ρ0 except maybe for some variables that are free, and so, cannot occur in s. Moreover, by (ii) on p, p0 , I contains I 0 except maybe for some interferences that are from t, and so, cannot influence the expression in s. So, by noting e the expression appearing in s, EI J e K(t, ρ0 , I 0 ) vI EI J e K(t, ρ, I). As a consequence, (i) and (ii) hold for the pair p·s, p0 ·s. Consider now ρ0 ∈ R(ΠI J p0 · s, t K(R0 , Ω0 , I0 )). If s is a guard e = 0? (the other guards e ./ 0? being similar), then ρ0 ∈ R0 and, by (iii) for p, p0 , ∃ρ ∈ R equal to ρ0 except for some free variables. As, 0 ∈ V (EI J e K(t, ρ0 , I 0 )) ⊆ V (EI J e K(t, ρ, I)), ρ proves the property (iii) for p · s, p0 · s. If s is an assignment X ← e then ρ0 = ρ00 [X 7→ ρ0 (X)] for some ρ00 ∈ R0 and ρ0 (X) ∈ V (EI J e K(t, ρ00 , I 0 )). By (iii) for p, p0 , ∃ρ0 ∈ R equal to ρ00 except for some free variables. So, ρ0 (X) ∈ V (EI J e K(t, ρ00 , I 0 )) ⊆ V (EI J e K(t, ρ0 , I)). Thus, ρ0 [X 7→ ρ0 (X)] proves the property (iii) for p · s, p0 · s. The following two properties are much easier to prove. Firstly, if the pair p, p0 satisfies (i)–(iii), so does the pair q · p, q · p0 for any path q. This holds because (i)–(iii) are stated for all R, Ω and I. Secondly, if both pairs p, p0 and p0 , p00 satisfy (i)–(iii), then so does the pair p, p00 . This completes the proof that elementary path transformations can be applied in a context with an arbitrary prefix and suffix, and that several transformations can be applied sequentially. We are now ready to prove the theorem. Consider the least fixpoint computed by the interference semantics (3.4): (ΩI , II ) = lfp F S S where F (Ω, I) = ( t∈T Ωt , t∈T It ) and (−, Ωt , It ) = SI J body t , t K(E0 , Ω, I) . By Thm. 3.1, we have (−, Ωt , It ) = ΠI J π(body t ), t K(E0 , Ω, I). Given transformed threads π 0 (t), consider also the fixpoint: (Ω0I , II0 ) = lfp F 0 S S where F 0 (Ω0 , I 0 ) = ( t∈T Ω0t , t∈T It0 \ Il ) and (−, Ω0t , It0 ) = ΠI J π 0 (t), t K(E0 , Ω0 , I 0 ) and Il is a set of interferences we can ignore as they only affect local or fresh variables: Il = { (t, X, v) | t ∈ T , v ∈ R, X ∈ Vf ∪ Vl (t) } . Then, given each path in p0 ∈ π 0 (t), we can apply properties (i) and (ii) to the pair p, p0 , where p is the path in π(body t ) that gives p0 after transformation. We get that F 0 (X) vI F (X). As a consequence, lfp F 0 vI lfp F . The transformed semantics, however, is not exactly lfp F 0 , but rather: (Ω00t , It00 ) = lfp F 00 S S where F 00 (Ω0 , I 0 ) = ( t∈T Ω0t , t∈T It0 ) and (Ω0t , It0 ) defined as before The difference lies in the extra interferences generated by the transformed program, which are all in Il . Such interferences, however, have no influence on the semantics of threads, as we have: ΠI J π 0 (t), t K(E0 , Ω, I 0 ) = ΠI J π 0 (t), t K(E0 , Ω, I 0 \ Il ) . STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 59 Indeed, any interference (t0 , X, v) ∈ Il is either from thread t and then ignored for the thread t itself, or it is from another thread t0 6= t in which case X is a local variable of t or a free variable, which does not occur in t0 . As a consequence, It0 = It00 and Ω00t = Ω0t , and so, Ω00 = Ω0 ⊆ Ω. Hence, the interference semantics of the original program contains all the errors that can occur in any program obtained by acceptable thread transformations. A.8. Proof of Theorem 4.1. PH ⊆ PC and P0H ⊆ PC . Proof. We first prove PH ⊆ PC . In order to do so, we need to consider a path-based interference semantics ΠC J P, t K that, given a set of paths P ⊆ π(body t ) in a thread t, computes: def F ΠC J P, t K(R, Ω, I) = C { (SC J sn , t K ◦ · · · ◦ SC J s1 , t K)(R, Ω, I) | s1 · . . . · sn ∈ P } . Similarly to Thms. 2.3, 3.1, the two semantics are equal: ∀t ∈ T , s ∈ stat : ΠC J π(s), t K = SC J s, t K The proof is identical to that in A.3 as the SC functions are complete t−morphisms, and so, we do not repeat it here. The rest of the proof that PH ⊆ PC follows a similar structure as A.5. Let (ΩC , IC ) be the fixpoint computed in (4.10), i.e., F (ΩC , IC ) = C { (Ω0t , It0 ) | t ∈ T } where (−, Ω0t , It0 ) = SC J body t , t K({c0 } × E0 , ΩC , IC ) . def def We denote initial states for PH and PC as respectively E0h = {h0 }×E0 and E0c = {c0 }×E0 . Furthermore, we link scheduler states h ∈ H and partitioning configurations c ∈ C in a thread t with the following abstraction αt : H → P(C): def αt (b, l) = { (l(t), u, weak ) | ∀x ∈ u, t0 ∈ T : x ∈ / l(t0 ) } . i.e., a configuration forgets the ready state b(t) of the thread (ready, yield ing, or waiting for some mutex), but remembers the exact set of mutexes l(t) held by the current thread, and optionally remembers the mutexes not held by any thread u. We prove the following properties by induction on the length of the path p ∈ π∗ : S (i) Ω(ΠH J p K(E0h , ∅)) ⊆ t∈T Ω(ΠC J proj t (p), t K(E0c , ∅, IC )) (ii) ∀t ∈ T : ∀(h, ρ) ∈ R(ΠH J p K(E0h , ∅)) : ∃(c, ρ0 ) ∈ R(ΠC J proj t (p), t K(E0c , ∅, IC )) : c ∈ αt (h)∧ ∀X ∈ V : ρ(X) = ρ0 (X) or ∃t0 , c0 : t 6= t0 , intf (c, c0 ), (t0 , c0 , X, ρ(X)) ∈ IC . The properties hold for p =  as ∀t ∈ T : ΠH J  K(E0h , ∅) = (E0h , ∅) ΠC J , t K(E0c , ∅, IC ) = (E0c , ∅, IC ) and c0 ∈ αt (h0 ). Assume that the properties hold for p0 and consider p = p0 · (s0 , t0 ), i.e., p0 followed by a primitive statement s0 executed by a thread t0 . The case where s0 is an assignment or a guard is very similar to that of proof A.5: we took care to update (ii) to reflect the change in the evaluation of variables in expressions EC J X K (in particular, the 60 ANTOINE MINÉ use of intf to determine which interferences from other threads can influence the current one, given their respective configuration). The effect of enabled t in SH J s0 , t0 K is to remove states from R(ΠH J p0 K(E0h , ∅)), and so, it does not invalidate (ii). Moreover, as assignments and guards do not modify the scheduler state, the subsequent sched application has no effect. Consider now the case where s0 is a synchronization primitive. Then (i) holds as these primitives do not modify the error set. We now prove (ii). Given (h, ρ) ∈ R(ΠH J p K(E0h , ∅)), there is a corresponding (h1 , ρ1 ) ∈ R(ΠH J p0 K(E0h , ∅)) such that (h, ρ) ∈ R(SH J s0 , t0 K({(h1 , ρ1 )}, ∅)). Given t ∈ T , we apply (ii) on (h1 , ρ1 ) and p0 , and get a state (c1 , ρ01 ) ∈ R(ΠC J proj t (p0 ), t K(E0c , ∅, IC )) with c1 ∈ αt (h1 ). We will note (l1 , u1 , −) the components of c1 . We construct a state in C × E satisfying (ii) for p. We first study the case where t = t0 and consider several sub-cases depending on s0 : • Case s0 = yield. We have ρ1 = ρ and αt (h1 ) = αt (h). We choose c = (l1 , ∅, weak ). Then (c, ρ01 ) ∈ R(SC J s0 , t K({ (c1 , ρ01 ) }, Ω, IC )). Moreover, c ∈ αt (h). We also have, ∀c0 ∈ C : intf (c1 , c0 ) =⇒ intf (c, c0 ). Hence, ∀X ∈ V : either ρ(X) = ρ01 (X), or ρ01 (X) comes from some weakly consistent interference not in exclusion with c1 , and so, not in exclusion with c. As a consequence, (c, ρ01 ) satisfies (ii) for p0 . • Case s0 = lock(m). We choose c = (l1 ∪ {m}, ∅, weak ). This ensures as before that c ∈ αt (h). Moreover, ρ1 = ρ. We now construct ρ0 such that and (c, ρ0 ) ∈ R(SC J s0 , t K({ (c1 , ρ01 ) }, Ω, IC )) ∀X ∈ V : ρ(X) = ρ0 (X) or ∃t00 , c0 : t0 6= t00 , intf (c, c0 ), (t00 , c0 , X, ρ(X)) ∈ IC . − If ρ01 (X) = ρ1 (X), then we take ρ0 (X) = ρ01 (X) = ρ1 (X) = ρ(X). − Otherwise, we know that ρ(X) = ρ1 (X) comes from a weakly consistent interference compatible with c1 : ∃t00 , c0 : t0 6= t00 , intf (c1 , c0 ), (t00 , c0 , X, ρ1 (X)) ∈ IC . If intf (c, c0 ) as well, then the same weakly consistent interference is compatible with c and can be applied to ρ0 . We can thus set ρ0 (X) = ρ01 (X). − Otherwise, as intf (c, c0 ) does not hold, then either m ∈ l0 or m ∈ u0 , where (l0 , u0 , −) = c0 . Assume that m ∈ l0 , i.e., ρ1 (X) was written to X by thread t00 while holding the mutex m. Because R(ΠH J p K(E0h , ∅)) 6= ∅, the mutex m is unlocked before t0 executes s0 = lock(m), so, t00 executes unlock(m) at some point in an environment mapping X to ρ1 (X). Note that SC J unlock(m), t00 K calls out to convert the weakly consistent interference (t00 , c0 , X, ρ1 (X)) ∈ IC to a well synchronized interference (t00 , (l0 \ {m}, u0 , sync(m)), X, ρ1 (X)) ∈ IC . This interference is then imported by SC J lock(m), t0 K through in. Thus: (c, ρ01 [X 7→ ρ1 (X)]) ∈ R(ΠC J proj t (p), t K(E0c , ∅, IC )) and we can set ρ0 (X) = ρ1 (X) = ρ(X). The case where m ∈ u0 is similar, except that the weakly consistent interference is converted to a well synchronized one by a statement SC J yield, t00 K or SC J unlock(m0 ), t00 K for an arbitrary mutex m0 , in an environment where X maps to ρ1 (X). In all three cases, (c, ρ0 ) satisfies (ii) for p0 . STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 61 • Case s0 = unlock(m). We have ρ1 = ρ. We choose c = (l1 \ {m}, u1 , weak ), which implies c ∈ αt (h). Moreover, as in the case of yield, ∀c0 : intf (c1 , c0 ) =⇒ intf (c, c0 ). Similarly, (c, ρ01 ) satisfies (ii) for p0 . • Case s0 = X ← islocked(m). We have ∀Y 6= X : ρ1 (Y ) = ρ(Y ) and ρ(X) ∈ {0, 1}. When X ← islocked(m) is interpreted as X ← [0, 1], the result is straightforward: we set c = c1 and ρ0 = ρ01 [X 7→ ρ(X)]. Otherwise, if ρ(X) = 0, we set c = (l1 , u1 ∪{m}, weak ) and, if ρ(X) = 1, we set c = (l1 , u1 \ {m}, weak ), so that c ∈ αt (h). Moreover, when ρ(X) = 0, then ρ0 is constructed as in the case of lock(m), except that ρ0 (X) is set to 0. Likewise, the case ρ(X) = 1 is similar to that of yield and unlock(m), except that we also set ρ0 = ρ01 [X 7→ 1]. In all cases (c, ρ0 ) satisfies (ii) for p0 . We now study the case t 6= t0 , which implies proj t (p) = proj t (p0 ). We prove that, in each case, (c1 , ρ01 ) satisfies (ii) for p: • Case s0 = yield. We have ρ1 = ρ and αt (h1 ) = αt (h). • Case s0 = lock(m). We have ρ1 = ρ. In order ensure that c1 ∈ αt (h), we need to ensure that m ∈ / u1 . We note that, by definition of SC , a configuration with m ∈ u1 can only be reached if the control path proj t (p0 ) executed by the thread t contains some X ← islocked(m) statement not followed by any lock(m) nor yield statement, and no thread t00 > t locks m. We deduce that t0 < t. Hence, the interleaved control path p0 preempts the thread t after a non-blocking operation to schedule a lower-priority thread t0 . This is forbidden by the enabled function: we have R(enabled t0 (ΠH J p0 K(E0h , ∅))) = ∅, hence R(ΠH J p K(E0h , ∅)) = ∅. • Case s0 = unlock(m). We have ρ1 = ρ and αt (h1 ) ⊆ αt (h). • Case s0 = X ← islocked(m). We have αt (h1 ) = αt (h). Moreover, ∀Y 6= X : ρ1 (Y ) = ρ(Y ) and ρ(X) ∈ {0, 1}. To prove that (ii) holds, it is sufficient to prove that ∃t00 , c0 : t 6= t00 , (t00 , c0 , X, ρ(X)) ∈ IC and intf (c1 , c0 ), so that the value of ρ(X) can be seen as an interference from some t00 in t. We choose t00 = t0 . Moreover, as c0 , we choose the configuration obtained by applying the recurrence hypothesis (ii) to p0 on (h1 , ρ1 ), but t0 instead of t. We deduce then by, definition of SC J X ← islocked(m), t0 K on the configuration c0 , that there exist interferences (t0 , c0 , X, 0), (t0 , c0 , X, 1) ∈ IC . This ends the proof that PH ⊆ PC . We now prove that P0H ⊆ PC . The proof is similar to A.7. Given an original path p and the transformed path p0 of a thread t, given any (R, Ω, I) such that I is consistent with fresh and local variables, we prove: (i) (ii) Ω(ΠC J p0 , t K(R, Ω, I)) ⊆ Ω(ΠC J p, t K(R, Ω, I)) ∀(t0 , c, X, v) ∈ I(ΠC J p0 , t K(R, Ω, I)) : (t0 , c, X, v) ∈ I(ΠC J p, t K(R, Ω, I)) or t = t0 ∧ X ∈ Vl (t) (iii) ∀(c, ρ0 ) ∈ R(ΠC J p0 , t K(R, Ω, I)) : ∃ρ ∈ E : (c, ρ) ∈ R(ΠC J p, t K(R, Ω, I)), ∀X ∈ V : ρ(X) = ρ0 (X) or X ∈ Vf Note, in particular, that in (ii) and (iii), the configuration c is the same for the original path p and the transformed path p0 . We first consider the case of acceptable elementary operations from Def. 3.4. As they involve guards and assignments only, not synchronization primitives, and because 62 ANTOINE MINÉ SC J X ← e, t K and SC J e ./ 0?, t K never change the partitioning, the proof of (i)—(iii) for all elementary transformations is identical to that of proof A.7. We now prove that, if (i)–(iii) hold for a pair p, p0 , then they also hold for a pair p·s, p0 ·s for any statement s. The case where s is an assignment or guard is also identical to that of proof A.7, for the same reason. We now consider the case of synchronization primitives. (i) holds because synchronization primitives do not change the set of errors. The proof that (ii) holds is similar to the case of an assignment. Indeed, any interference added by s after p0 has the form (t, c, X, ρ0 (X)) for some state (c, ρ0 ) ∈ R(ΠC J p0 , t K(R, Ω, I)). Due to (iii), there is some (c, ρ) ∈ R(ΠC J p, t K(R, Ω, I)) where, either X ∈ Vf or ρ(X) = ρ0 (X). When X ∈ / Vf , we note that any (t, c, X, ρ0 (X)) added by s after p0 is also added by s after p. Thus, the extra interferences in p0 do not violate (ii). For the proof of (iii), take (c, ρ0 ) ∈ R(ΠC J p0 · s, t K(R, Ω, I)). There exists some (c, ρ01 ) ∈ R(ΠC J p0 , t K(R, Ω, I)) where, for all X ∈ V, either ρ0 (X) = ρ01 (X), or there is a well synchronized interference (t0 , c0 , X, ρ0 (X)) with t 6= t0 . By applying (ii) to the pair p, p0 , all these interferences are also in I(ΠC J p, t K(R, Ω, I)). Thus, by applying (iii) to the pair p, p0 , we get a state (c, ρ1 ) ∈ R(ΠC J p, t K(R, Ω, I)) that also satisfies (iii) for the pair p · s, p0 · s. As in proof A.7, the fact that, for any p, p0 , p00 , q, if the pairs p, p0 and p0 , p00 satisfy (i)–(iii), then so do the pair p, p00 and the pair q · p, q · p0 is straightforward. This completes the proof that elementary path transformations can be applied in sequence and applied in a context containing any primitive statements (even synchronization ones) before and after the transformed part. The end of the proof is identical to that of proof A.7. We compare the fixpoints lfp F and lfp F 0 that compute respectively the semantics of the original program SC J body t , t K = ΠC J π(body t ), t K and the transformed program ΠC J π 0 (t), t K. Then, (i) and (ii) imply that F 0 (X) vC F (X), and so, lfp F 0 vC lfp F , except for interferences on local or free variables. In particular, Ω(lfp F 0 ) ⊆ Ω(lfp F ). The interference semantics of the original program contains all the errors that can occur in any program obtained by acceptable thread transformations. As a consequence, P0H ⊆ PC . A.9. Proof of Theorem 4.2. PC ⊆ P]C . Proof. We remark that PC and PI , and so, P]C and P]I , are similar. In particular, the definitions for non-primitive statements and the fixpoint computation of interferences have the exact same structure. Hence, the proof A.6 applies directly to prove the soundness of non-primitive statements as a consequence of the soundness of primitive statements. Moreover, for assignments and tests, the proof of soundness is identical to the proof A.6, but componentwise for each c ∈ C. To prove the soundness of synchronization statements, we first observe the soundness of in ] and out ] in that: ∀t ∈ T , l, u ⊆ M, m ∈ M, V ] ∈ E ] , I ] ∈ I ] : ∀ρ ∈ γE (V ] ) : in(t, l, u, m, ρ, γI (I ] )) ⊆ γE (in ] (t, l, u, m, V ] , I ] )) out(t, l, u, m, ρ, γI (I ] )) ⊆ γI (out ] (t, l, u, m, V ] , I ] )) . Secondly, we observe that S]C first reorganizes (without loss of information) the sets of environment tuples R ⊆ C × E and interference tuples I ⊆ T × C × V × R appearing in SC def def as functions R0 = λc : { ρ | (c, ρ) ∈ R } and I 0 = λt, c, X : { v | (t, c, X, v) ∈ I }. Then, STATIC ANALYSIS OF RUN-TIME ERRORS IN PARALLEL C PROGRAMS 63 it applies an abstraction in, respectively, E ] and N ] by replacing the set union ∪ by its abstract counterparts ∪]E and ∪]I . This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 171 Second St, Suite 300, San Francisco, CA 94105, USA, or Eisenacher Strasse 2, 10777 Berlin, Germany
6cs.PL
Estimating the spectral gap of a trace-class Markov operator arXiv:1704.00850v2 [math.ST] 22 Jun 2017 Qian Qin, James P. Hobert and Kshitij Khare Department of Statistics University of Florida June 2017 Abstract The utility of a Markov chain Monte Carlo algorithm is, in large part, determined by the size of the spectral gap of the corresponding Markov operator. However, calculating (and even approximating) the spectral gaps of practical Monte Carlo Markov chains in statistics has proven to be an extremely difficult and often insurmountable task, especially when these chains move on continuous state spaces. In this paper, a method for accurate estimation of the spectral gap is developed for general state space Markov chains whose operators are non-negative and trace-class. The method is based on the fact that the second largest eigenvalue (and hence the spectral gap) of such operators can be bounded above and below by simple functions of the power sums of the eigenvalues. These power sums often have nice integral representations. A classical Monte Carlo method is proposed to estimate these integrals, and a simple sufficient condition for finite variance is provided. This leads to asymptotically valid confidence intervals for the second largest eigenvalue (and the spectral gap) of the Markov operator. The efficiency of the method is studied. For illustration, the method is applied to Albert and Chib’s (1993) data augmentation (DA) algorithm for Bayesian probit regression, and also to a DA algorithm for Bayesian linear regression with non-Gaussian errors (Liu, 1996). 1 Introduction Markov chain Monte Carlo (MCMC) is widely used to estimate intractable integrals that represent expectations with respect to complicated probability distributions. Let π : S → [0, ∞) be a probability density function (pdf) with respect to a σ-finite measure µ, where (S, U , µ) is some measure space. Suppose we Key words and phrases. Data augmentation algorithm, Eigenvalues, Hilbert-Schmidt operator, Markov chain, Monte Carlo 1 want to approximate the integral J := Z f (u)π(u)µ(du) S P m−1 for some function f : S → R. Then J can be estimated by Jˆm := m−1 m−1 k=0 f (Φk ), where {Φk }k=0 are the first m elements of a well-behaved Markov chain with stationary density π(·). Unlike classical Monte Carlo estimators, Jˆm is not based on iid random elements. Indeed, the elements of the chain are typically neither identically distributed nor independent. Given varπ f, the variance of f (·) under the stationary distribution, the accuracy of Jˆm is primarily determined by two factors: (i) the convergence rate of the Markov chain, and (ii) the correlation between the f (Φk )s when the chain is stationary. These two factors are related, and can be analyzed jointly under an operator theoretic framework. The starting point of the operator theoretic approach is the Hilbert space of functions that are square integrable with respect to the target pdf, π(·). The Markov transition function that gives rise to Φ = {Φk }∞ k=0 defines a linear (Markov) operator on this Hilbert space. (Formal definitions are given in Section 2.) If Φ is reversible, then it is geometrically ergodic if and only if the corresponding Markov operator admits a positive spectral gap (Roberts and Rosenthal, 1997; Kontoyiannis and Meyn, 2012). The gap, which is a real number in (0, 1], plays a fundamental role in determining the mixing properties of the Markov chain, with larger values corresponding to better performance. For instance, suppose Φ0 has pdf π0 (·) such that dπ0 /dπ is in the Hilbert space, and let d(Φk ; π) denote the total variation distance between the distribution of Φk and the chain’s stationary distribution. Then, if δ denotes the spectral gap, we have d(Φk ; π) ≤ C(1 − δ)k for all positive integers k, where C depends on π0 but not on k (Roberts and Rosenthal, 1997). Furthermore, (1 − δ)k gives the maximal absolute correlation between Φj and Φj+k as j → ∞. It follows (see e.g. √ Mira and Geyer, 1999) that the asymptotic variance of m(Jˆm − J) as m → ∞ is bounded above by 2−δ varπ f . δ Unfortunately, it is impossible to calculate the spectral gaps of the Markov operators associated with practically relevant MCMC algorithms, and even accurately approximating these quantities has proven extremely difficult. In this paper, we develop a method of estimating the spectral gaps of Markov operators corresponding to a certain class of data augmentation (DA) algorithms (Tanner and Wong, 1987), and then show that the method can be extended to handle a much larger class of reversible MCMC algorithms. DA Markov operators are necessarily non-negative. Moreover, any non-negative Markov operator that is compact has a pure eigenvalue spectrum that is contained in the set [0, 1], and 1 − δ is precisely the 2 second largest eigenvalue. We propose a classical Monte Carlo estimator of 1 − δ for DA Markov operators that are trace-class, i.e. compact with summable eigenvalues. While compact operators were once thought to be rare in MCMC problems with uncountable state spaces (Chan and Geyer, 1994), a string of recent results suggests that trace-class DA Markov operators are not at all rare (see e.g. Qin and Hobert, 2016; Chakraborty and Khare, 2017; Choi and Román, 2017; Pal et al., 2017). Furthermore, by exploiting a simple trick, we are able to broaden the applicability of our method well beyond DA algorithms. Indeed, if a reversible Monte Carlo Markov chain has a Markov transition density (Mtd), and the corresponding Markov operator is Hilbert-Schmidt, then our method can be utilized to estimate its spectral gap. This is because the square of such a Markov operator can be represented as a trace-class DA Markov operator. A detailed explanation is provided in Section 4. Of course, there is a large literature devoted to developing theoretical bounds on the second largest eigenvalue of a Markov operator (see e.g. Lawler and Sokal, 1988; Sinclair and Jerrum, 1989; Diaconis and Stroock, 1991). However, these results are typically not useful in situations where the state space, S, is uncountable and multi-dimensional, which is our main focus. There also exist computational methods for approximating the eigenvalues of a Hilbert-Schmidt operator (see e.g. Koltchinskii and Giné, 2000; Ahues et al., 2001, §4.2). Unfortunately, these methods require a closed form kernel function, which is typically not available in the MCMC context. There are still other methods based on simulation. Most notably, Garren and Smith (2000) used simulations of a reversible chain to estimate the second largest eigenvalue of its operator (assuming it’s Hilbert-Schmidt). Their approach is reminiscent of the so-called power method from computer science, and we use these ideas as well. The main difference between their method and ours is that we exploit the specific structure of the Mtd associated with the DA algorithm. This makes our method much simpler to implement computationally, and our results easier to interpret. The power of our method comes at the price of being computationally intensive, especially when the target posterior is based on a large sample. The rest of the paper is organized as follows. The notion of Markov operator is formalized in Section 2. In Section 3, it is shown that the second largest eigenvalue of a non-negative trace-class operator can be bounded above and below by functions of the power sums of the operator’s eigenvalues. In Section 4, DA Markov operators are formally defined, and the sum of the kth (k ∈ N) power of the eigenvalues of a trace-class DA Markov operator is related to a functional of its Mtd. This functional is usually a multidimensional integral, and a classical Monte Carlo estimator of it is developed in Section 5. The efficiency of the Monte Carlo estimator is studied in Section 6. Finally, in Section 7 we apply our methods to a few well-known MCMC algorithms. Our examples include Albert and Chib’s (1993) DA algorithm for Bayesian probit regression, and a DA algorithm for Bayesian linear regression with non-Gaussian errors (Liu, 1996). 3 2 Markov operators Assume that the Markov chain Φ has a Markov transition density, p(u, ·), u ∈ S, such that, for any measurable A ⊂ S and u ∈ S, P(Φk ∈ A|Φ0 = u) = where Z p(k) (u, u′ ) µ(du′ ) , A  p(u, ·) k=1 p(k) (u, ·) := R  p(k−1) (u, u′ )p(u′ , ·) µ(du′ ) k > 1 S is the k-step Mtd corresponding to p(u, ·). We will assume throughout that Φ is Harris ergodic, i.e. irreducible, aperiodic and Harris recurrent. Define a Hilbert space consisting of complex valued functions on S that are square integrable with respect to π(·), namely Z o  |f (u)|2 π(u) µ(du) < ∞ . L (π) := f : S → C  2 n S For f, g ∈ L2 (π), their inner product is given by hf, giπ = Z f (u)g(u)π(u) µ(du) . S We assume that U is countably generated, which implies that L2 (π) is separable and admits a countable orthonormal basis (see e.g. Billingsley, 1995, Theorem 19.2). The transition density p(u, ·), u ∈ S defines the following linear operator P. For any f ∈ L2 (π), P f (u) = Z p(u, u′ )f (u′ ) µ(du′ ) . S The spectrum of a linear operator L is defined to be  σ(L) = λ ∈ C (L − λI)−1 doesn’t exist or is unbounded , where I is the identity operator. It is well-known that σ(P ) is a closed subset of the unit disk in C. Let f0 ∈ L2 (π) be the normalized constant function, i.e. f0 (u) ≡ 1, then P f0 = f0 . (This is just a fancy way of saying that 1 is an eigenvalue with constant eigenfunction, which is true of all Markov operators defined by ergodic chains.) Denote by P0 the operator such that P0 f = P f − hf, f0 iπ f0 for all f ∈ L2 (π). Then the spectral gap of P is defined as n o δ = 1 − sup |λ| λ ∈ σ(P0 ) . For the remainder of this section, we assume that P is non-negative (and thus self-adjoint) and compact. This implies that σ(P ) ⊂ [0, 1], and that any non-vanishing element of σ(P ) is necessarily an eigenvalue 4 of P . Furthermore, there are at most countably many eigenvalues, and they can accumulate only at the origin. Let λ0 , λ1 , . . . , λκ be the decreasingly ordered strictly positive eigenvalues of P taking into account multiplicity, where 0 ≤ κ ≤ ∞. Then λ0 = 1 and λ1 is what we previously referred to as the “second largest eigenvalue” of the Markov operator. If κ = 0, we set λ1 = 0 (which corresponds to the trivial case where {Φk }∞ k=0 are iid). Since Φ is Harris ergodic, λ1 must be strictly less than 1. Also, the compactness of P implies that of P0 , and it’s easy to show that σ(P0 ) = σ(P )\{1}. Hence, Φ is geometrically ergodic and the spectral gap is δ = 1 − λ1 > 0 . For further background on the spectrum of a linear operator, see e.g. Helmberg (2014) or Ahues et al. (2001). 3 Power sums of eigenvalues We now develop some results relating λ1 to the power sum of P ’s eigenvalues. We assume throughout this section that P is non-negative and trace-class (compact with summable eigenvalues). For any positive integer k, let sk = κ X λki , i=0 and define s0 to be infinity. The first power sum, s1 , is the trace norm of P (see e.g. Conway, 1990, 2000), √ while s2 is the Hilbert-Schmidt norm of P. That P is trace-class implies s1 < ∞, and it’s clear that sk is decreasing in k. The magnitude of sk is directly related to the convergence behavior of the chain. For instance, suppose that the chain starts at a point mass Φ0 = u, then the chi-square distance between the distribution of Φk and the stationary distribution is given by (see e.g. Diaconis et al., 2008) χ2k (u) := Z SU 2 κ X p(k) (u, u′ ) − π(u′ ) 2 ′ λ2k µ(du ) = i |fi (u)| , π(u′ ) i=1 where fi : SU → C is the normalized eigenfunction corresponding to λi . It follows that s2k := κ X i=1 λ2k i = Z SU χ2k (u)π(u) µ(du), which is the average of χ2k (u) under π. More importantly, one can use functions of sk to bound λ1 , and thus the spectral gap. Observe that, λ1 ≤ uk := (sk − 1)1/k , 5 ∀k ∈ N. Moreover, if κ ≥ 1, then it’s easy to show that λ1 ≥ lk := sk − 1 , sk−1 − 1 ∀k ∈ N. We now show that, in fact, these bounds are monotone in k and converge to λ1 . Proposition 1. As k → ∞, uk ↓ λ1 , (1) lk ↑ λ1 . (2) and if furthermore κ ≥ 1, Proof. We begin with (1). When κ = 0, sk ≡ 1 and the conclusion follows. Suppose κ ≥ 1, and that the second largest eigenvalue is of multiplicity m, i.e. 1 = λ0 > λ1 = λ2 = · · · = λm > λm+1 ≥ · · · ≥ λκ > 0. If κ = m, then sk − 1 = mλk1 for all k ≥ 1 and the proof is trivial. Suppose for the rest of the proof that P κ ≥ m + 1. For positive integer k, let rk = κi=m+1 λki < ∞. Then rk > 0, and rk+1 ≤ λm+1 < λ1 . rk Hence, k−1 r1 λm+1 rk rk ≤ lim = 0. lim = lim k→∞ mλk k→∞ sk − 1 − rk k→∞ mλk 1 1 It follows that log uk = log λ1 + Finally, 1/(k+1) uk+1 < λ1 κ X i=1 and (1) follows. λki 1 1 log m + log(1 + o(1)) → log λ1 . k k 1/(k+1) ≤ κ X i=1 λki κ 1/[k(k+1)]  X Now onto (2). We have already shown that sk − 1 = mλk1 (1 + o(1)) . Thus, lk = mλk1 (1 + o(1)) → λ1 . mλ1k−1 (1 + o(1)) 6 i=1 λki 1/(k+1) = uk , To show that lk is increasing in k, which would complete the proof, we only need note that (sk+1 − 1)(sk−1 − 1) = = ≥ κ X λk+1 i κ X λjk−1 j=1 κ κ 1 X X k−1 k−1 2 λi λj (λi 2 i=1 j=1 κ κ X X λki λkj i=1 j=1 i=1 + λ2j ) = (sk − 1)2 . Suppose now that we are interested in the convergence behavior of a particular Markov operator that is known to be non-negative and trace-class. If it is possible to estimate sk , then Proposition 1 provides a method of getting approximate bounds on λ1 . When a DA Markov operator is trace-class, there is a nice integral representation of sk that leads to a simple, classical Monte Carlo estimator of sk . In the following section, we describe some theory for DA Markov operators, and in Section 5, we develop a classical Monte Carlo estimator of sk . 4 Data augmentation operators and an integral representation of sk In order to formally define DA, we require a second measure space. Let (SV , V, ν) be a σ-finite measure space such that V is countably generated. Also, rename S and π, SU and πU , respectively. Consider the random element (U, V ) taking values in SU × SV with joint pdf πU,V (·, ·). Suppose the marginal pdf of U is the target, πU (·), and denote the marginal pdf of V by πV (·). We further assume that the conditional densities πU |V (u|v) := πU,V (u, v)/πV (v) and πV |U (v|u) := πU,V (u, v)/πU (u) are well defined almost everywhere in SU × SV . Recall that Φ is a Markov chain on the state space SU with Mtd p(u, ·), u ∈ SU . We call Φ a DA chain, and accordingly, P a DA operator, if p(u, ·) can be expressed as p(u, ·) = Z SV πU |V (·|v)πV |U (v|u) ν(dv) . (3) Such a chain is necessarily reversible with respect to πU (·). To simulate it, in each iteration, one first draws the latent element V using πV |U (·|u), where u ∈ SU is the current state, and then given V = v, one updates the current state according to πU |V (·|v). A DA operator is non-negative, and thus possesses a positive spectrum (Liu et al., 1994). 7 Assume that (3) holds. Given k ∈ N, the power sum of P ’s eigenvalues, sk , if well defined, is closely related to the diagonal components of p(k) (·, ·). Just as we can calculate the sum of the eigenvalues of a R matrix by summing its diagonals, we can obtain sk by evaluating SU p(k) (u, u) µ(du). Here is a formal statement. Theorem 1. The DA operator P is trace-class if and only if Z p(u, u) µ(du) < ∞ . (4) SU If (4) holds, then for any positive integer k, sk := κ X i=0 λki = Z p(k) (u, u) µ(du) . (5) SU Theorem 1 is a combination of a few standard results in classical functional analysis. It is fairly wellknown, but we were unable to find a complete proof in the literature. An elementary proof is given in the appendix for completeness. For a more modern version of the theorem, see Brislawn (1988). It is often possible to exploit Theorem 1 even when Φ is not a DA Markov chain. Indeed, suppose that Φ is reversible, but is not a DA chain. Then P is not a DA operator, but P 2 , in fact, is. (Just take πU,V (u, v) = πU (u)p(u, v).) If, in addition, P is Hilbert-Schmidt, which is equivalent to Z Z (p(u, u′ ))2 πU (u) µ(du) µ(du′ ) < ∞ , πU (u′ ) SU SU then by a simple spectral decomposition (see e.g. Helmberg, 2014, §28 Corollary 2.1) one can show that P 2 is trace-class, and its eigenvalues are precisely the squares of the eigenvalues of P . In this case, the spectral gap of P can be expressed as 1 minus the square root of P 2 ’s second largest eigenvalue. Moreover, by R Theorem 1, for k ∈ N, the sum of the kth power of P 2 ’s eigenvalues is equal to SU p(2k) (u, u) µ(du) < ∞. We now briefly describe the so-called sandwich algorithm, which is a variant of DA that involves an extra step sandwiched between the two conditional draws of DA (Liu and Wu, 1999; Hobert and Marchev, 2008). Let s(v, ·), v ∈ SV be a Markov transition function (Mtf) with invariant density πV (·). Then Z Z πU |V (·|v ′ )s(v, dv ′ )πV |U (v|u)ν(dv) p̃(u, ·) = SV (6) SV is an Mtd with invariant density πU (·). This Mtd defines a new Markov chain, call it Φ̃, which we refer to as a sandwich version of the original DA chain, Φ. To simulate Φ̃, in each iteration, the latent element is first drawn from πV |U (·|u), and then updated using s(v, ·) before the current state is updated ac- cording to πU |V (·|v ′ ). Sandwich chains often converge much faster than their parent DA chains (see e.g. Khare and Hobert, 2011). 8 Of course, p̃(u, ·) defines a Markov operator on L2 (πU ), which we refer to as P̃ . It is easy to see that, if the Markov chain corresponding to s(v, ·) is reversible with respect to πV (·), then p̃(u, ·) is reversible with respect to πU (·). Thus, when s(v, ·) is reversible, P̃ 2 is a DA operator. Interestingly, it turns out that p̃(u, ·) can often be re-expressed as the Mtd of a DA chain, in which case P̃ itself is a DA operator. Indeed, a sandwich Mtd p̃(u, ·) is said to be “representable” if there exists a random element Ṽ in SV such that ′ p̃(u, u ) = Z SV πU |Ṽ (u′ |v)πṼ |U (v|u) ν(dv) , (7) where πU |Ṽ (u′ |v) and πṼ |U (v|u) have the apparent meanings (see, e.g. Hobert, 2011). It is shown in Proposition 2 in Section 5 that when P is trace-class and p̃(u, ·) is representable, P̃ is also trace-class. In this case, let {λ̃i }κ̃i=0 be the decreasingly ordered positive eigenvalues of P̃ taking into account multiplicity, where 0 ≤ κ̃ ≤ ∞. Then λ̃0 = 1, and λ̃1 ≤ λ1 < 1 (Hobert and Marchev, 2008). For a positive integer k, we will P denote κ̃i=0 λ̃ki by s̃k . Henceforth, we assume that p̃(u, ·) is representable and we treat P̃ as a DA operator. R It follows from Theorem 1 that in order to find sk or s̃k , all we need to do is evaluate SU p(k) (u, u) µ(du) R or SU p̃(k) (u, u) µ(du), where p̃(k) (u, ·) is the k-step Mtd of the sandwich chain. Of course, calculating these integrals (in non-toy problems) is nearly always impossible, even for k = 1. In the next section, we introduce a method of estimating these two integrals using classical Monte Carlo. Throughout the remainder of the paper, we assume that P is a DA operator with Mtd given by (3), and that (4) holds. 5 Classical Monte Carlo Consider the Mtd given by a(u, ·) = Z SV Z SV πU |V (·|v ′ )r(v, dv ′ )πV |U (v|u) ν(dv) , (8) where r(v, ·), v ∈ SV is an Mtf on SV with invariant pdf πV (·). We will show in this section that this form has utility beyond constructing sandwich algorithms. Indeed, the k-step Mtd of a DA algorithm (or a sandwich algorithm) can be re-expressed in the form (8). This motivates the development of a general R method for estimating the integral SU a(u, u) µ(du), which is the main topic of this section. We begin by showing how p(k) (u, ·), u ∈ SU can be written in the form (8). The case k = 1 is trivial. Indeed, if r(v, ·) is taken to be the kernel of the identity operator, then a(u, ·) = p(u, ·). Define an Mtd q(v, ·), v ∈ SV by q(v, ·) = Z SU πV |U (·|u)πU |V (u|v) µ(du), 9 and let q (k) (v, ·), k ≥ 1 denote the corresponding k-step Mtd. If we let r(v, dv ′ ) = q (k−1) (v, v ′ ) ν(dv ′ ), v ∈ SV for k ≥ 2, then a(u, ·) = p(k) (u, ·). Next, consider the sandwich Mtd p̃(k) (u, ·), u ∈ SU . Again, the k = 1 case is easy. Taking r(v, ·) = s(v, ·) yields a(u, ·) = p̃(u, ·). Now let q̃(v, ·) = Z SU Z SV s(v ′ , ·)πV |U (v ′ |u)πU |V (u|v) ν(dv ′ ) µ(du) , and denote the corresponding k-step transition function by q̃ (k) (v, ·). Then taking r(v, ·) = Z SV q̃ (k−1) (v ′ , ·)s(v, dv ′ ) when k ≥ 2 yields a(u, ·) = p̃(k) (u, ·). The following proposition shows that, when P is trace-class, R Proposition 2. Proof. That Z R SU SU a(u, u) µ(du) < ∞. SU R SU a(u, u) µ(du) is finite. a(u, u) µ(du) < ∞ is equivalent to   πU,V (u, v) πU,V (u, v ′ ) ′ r(v, dv ) πU (u)πV (v) ν(dv) µ(du) < ∞. πU (u)πV (v ′ ) πU (u)πV (v) Z Z SV SV Note that Z SU  πU,V (u, v) πU (u)πV (v) 2 πU (u)πV (v) µ(du)ν(dv) = Z SU p(u, u) µ(du) < ∞. (9) (10) and by Jensen’s inequality, Z SU SV ≤ Z Z = Z Z = SU ZSU 2 πU,V (u, v ′ ) ′ r(v, dv ) πU (u)πV (v) ν(dv) µ(du) ′ SV πU (u)πV (v )  Z  πU,V (u, v ′ ) 2 r(v, dv ′ )πU (u)πV (v) ν(dv) µ(du) ′) π (u)π (v U V SV   ′ πU,V (u, v ) 2 πU (u)πV (v ′ ) ν(dv ′ ) µ(du) πU (u)πV (v ′ ) Z Z SV SV p(u, u) µ(du) SU < ∞. The inequality (9) follows from (10), (11), and the Cauchy-Schwarz inequality. 10 (11) Combining Proposition 2 and Theorem 1 leads to the following result: If P is trace-class and p̃(u, ·) is representable, then P̃ is also trace-class. This is a generalization of Khare and Hobert’s (2011) Theorem 1, which states that, under a condition on s(v, dv ′ ) that implies representability, the trace-class-ness of P implies that of P̃ . We now develop a classical Monte Carlo estimator of R SU a(u, u) µ(du). Let ω : SV → [0, ∞) be a pdf that is almost everywhere positive. We will exploit the following representation of the integral of interest:  Z Z Z  Z  πV |U (v|u)  (12) πU |V (u|v ′ )r(v, dv ′ ) ω(v) µ(du) ν(dv) . a(u, u) µ(du) = ω(v) SV SV SU SU Clearly, η(u, v) := (U ∗ , V ∗ ) defines a pdf on SU × SV , and if Z SU Z SV  πU |V (u|v ′ )r(v, dv ′ ) ω(v) has joint pdf η(·, ·), then   πV |U (V ∗ |U ∗ ) a(u, u) µ(du) = E . ω(V ∗ ) Therefore, if {(Ui∗ , Vi∗ )}N i=1 are iid random elements from η(·, ·), then N 1 X πV |U (Vi∗ |Ui∗ ) N ω(Vi∗ ) (13) i=1 is a strongly consistent and unbiased estimator of central to our discussion. R SU a(u, u) µ(du). This is the Monte Carlo formula that is Of course, we are mainly interested in the cases a(u, ·) = p(k) (u, ·) or a(u, ·) = p̃(k) (u, ·). We now develop algorithms for drawing from η(·, ·) in these two situations. First, assume a(u, ·) = p(k) (u, ·). If k = 1, then r(u, ·) is the kernel of the identity operator, and η(u, v) = πU |V (u|v)ω(v) . If k ≥ 2, then r(v, dv ′ ) = q (k−1) (v, v ′ ) dv ′ , and  Z Z ′ (k−1) ′ ′ πU |V (u|v )q (v, v ) ν(dv ) ω(v) = η(u, v) = SU SV  p(k−1) (u′ , u)πU |V (u′ |v) µ(du′ ) ω(v) . Thus, when k ≥ 2, we can draw from η(u, v) as follows: Draw V ∗ ∼ ω(·), then draw U ′ ∼ πU |V (·|v ∗ ), then draw U ∗ ∼ p(k−1) (u′ , ·), and return (u∗ , v ∗ ). Of course, we can draw from p(k−1) (u′ , ·) by simply running k − 1 iterations of the original DA algorithm from starting value u′ . We formalize all of this in Algorithm 1. Algorithm 1: Drawing (U ∗ , V ∗ ) ∼ η(u, v) µ(du) ν(dv) when a(u, ·) = p(k) (u, ·). 11 1. Draw V ∗ from ω(·). 2. Given V ∗ = v ∗ , draw U ′ from πU |V (·|v ∗ ). 3. If k = 1, set U ∗ = U ′ . If k ≥ 2, given U ′ = u′ , draw U ∗ from p(k−1) (u′ , ·) by running k − 1 iterations of the DA algorithm. Similar arguments lead to the following algorithm for the sandwich algorithm Algorithm 1S: Drawing (U ∗ , V ∗ ) ∼ η(u, v) µ(du) ν(dv) when a(u, ·) = p̃(k) (u, ·) 1. Draw V ∗ from ω(·). 2. Given V ∗ = v ∗ , draw V ′ from s(v ∗ , ·). 3. Given V ′ = v ′ draw U ′ from πU |V (·|v ′ ). 4. If k = 1, set U ∗ = U ′ . If k ≥ 2, given U ′ = u′ , draw U ∗ from p̃(k−1) (u′ , ·) by running k − 1 iterations of the sandwich algorithm. It is important to note that we do not need to know the representing conditionals πU |Ṽ (·|v) and πṼ |U (·|u) from (7) in order to run Algorithm 1S. As with all classical Monte Carlo techniques, the key to successful implementation is a finite variance. Define πV |U (V ∗ |U ∗ ) D = var ω(V ∗ ) 2 Of course, D 2 < ∞ if and only if Z Z SV SU   πV |U (v|u) ω(v) 2  . η(u, v) µ(du) ν(dv) < ∞ . (14) The following theorem provides a sufficient condition for finite variance. Theorem 2. The variance, D 2 , is finite if Z SV Z SU πV3 |U (v|u)πU |V (u|v) ω 2 (v) µ(du) ν(dv) < ∞. Proof. First, note that (14) is equivalent to Z Z  π 2 (v|u)  R π (u|v ′ )r(v, dv ′ )  V |U SV U |V SV SU πV (v)ω(v) πU (u) 12 πU (u)πV (v) µ(du) ν(dv) < ∞. (15) Now, it follows from (15) that Z Z SV  π2 V |U (v|u) SU Moreover, by Jensen’s inequality, Z Z R SV SV Z Z = Z Z SV ZSV SU SU πU (u)πV (v) µ(du) ν(dv) < ∞. πU |V (u|v ′ )r(v, dv ′ ) πU (u) SU ≤ = πV (v)ω(v) 2 2 πU (u)πV (v) µ(du) ν(dv)  πU |V (u|v ′ ) 2 r(v, dv ′ )πU (u)πV (v) µ(du) ν(dv) π (u) U SV   πU |V (u|v ′ ) 2 πU (u)πV (v ′ ) µ(du) ν(dv ′ ) πU (u) Z (16)  (17) p(u, u) µ(du) SU < ∞. The conclusion now follows from (16), (17), and Cauchy-Schwarz. Theorem 2 implies that an ω(·) with heavy tails is more likely to result in finite variance (which is not surprising). It might seem natural to take ω(·) = πV (·). However, in practice, we are never able to draw from πV (·). (If we could do that, we would not need MCMC.) Moreover, in Section 7 we provide an example where taking ω(·) to be πV (·) leads to an infinite variance, whereas a heavier-tailed alternative leads to a finite variance. On the other hand, it can be beneficial to use ω(·)s resembling πV (·), as we argue in Section 6. Let ψ : SU → [0, ∞) be a pdf that is positive almost everywhere. The following dual of (12) may also R be used to represent SU a(u, u) µ(du): Z Z Z Z πU |V (u|v) r(v ′ , dv)πV |U (v ′ |u)ψ(u) ν(dv ′ ) µ(du) . a(u, u) µ(du) = ψ(u) SU SV SV SU Now suppose that {(Ui∗ , Vi∗ )}N i=1 are iid from  Z ′ ′ ′ r(v , dv)πV |U (v |u) ν(dv ) ψ(u) µ(du) . ζ(u, v) µ(du) ν(dv) = SV The analogue of (13) is the following classical Monte Carlo estimator of N 1 X πU |V (Ui∗ |Vi∗ ) . N ψ(Ui∗ ) R SU a(u, u) µ(du): i=1 We now state the obvious analogues of Algorithms 1 and 1S. Algorithm 2: Drawing (U ∗ , V ∗ ) ∼ ζ(u, v) µ(du) ν(dv) when a(u, ·) = p(k) (u, ·). 13 (18) 1. Draw U ∗ from ψ(·). 2. If k = 1, set U ′ = U ∗ . If k ≥ 2, given U ∗ = u∗ , draw U ′ from p(k−1) (u∗ , ·). 3. Given U ′ = u′ , draw V ∗ from πV |U (·|u′ ). Algorithm 2S: Drawing (U ∗ , V ∗ ) ∼ ζ(u, v) µ(du) ν(dv) when a(u, ·) = p̃(k) (u, ·). 1. Draw U ∗ from ψ(·). 2. If k = 1, set U ′ = U ∗ . If k ≥ 2, given U ∗ = u∗ , draw U ′ from p̃(k−1) (u∗ , ·). 3. Given U ′ = u′ , draw V ′ from πV |U (·|u′ ). 4. Given V ′ = v ′ , draw V ∗ from s(v ′ , ·). Let D ′2 be the variance of πU |V (U ∗ |V ∗ )/ψ(U ∗ ) under ζ. To ensure that it’s finite, we only need Z SU Z SV  Z SV πU |V (u|v) ψ(u) 2 r(v ′ , dv)πV |U (v ′ |u)ψ(u) ν(dv ′ ) µ(du) < ∞ . (19) The following result is the analogue of Theorem 2. Corollary 1. The variance, D ′2 , is finite if Z SU Z πU3 |V (u|v)πV |U (v|u) SV ψ 2 (u) ν(dv) µ(du) < ∞ . (20) Proof. Note that the left hand side of (19) is equal to Z SU Z SV Z πU2 |V (u|v) SV   πV |U (v ′ |u) r(v ′ , dv) πU (u)πV (v ′ ) ν(dv ′ ) µ(du) . ψ(u)πU (u) πV (v ′ ) Apply the Cauchy-Schwarz inequality, then utilize Jensen’s inequality to get rid of r(v ′ , dv), and finally make use of (20) and the fact that P is trace-class. Suppose that we have obtained estimates of sk and sk−1 based on (13) or (18), call them s∗k and s∗k−1 . Then u∗k = (s∗k − 1)1/k and lk∗ = (s∗k − 1)/(s∗k−1 − 1) serve as point estimates of uk and lk , respectively. When our estimators have finite variances, we can acquire, via the delta method, confidence intervals for uk and lk . Assume that a confidence interval for lk is (ak , bk ) and a confidence interval for uk is (ck , dk ), then (ak , dk ) is an interval estimate for λ1 . Interval estimates of λ̃1 can be derived in a similar fashion. 14 6 Efficiency of the algorithm To obtain an interval estimate of λ1 based on (13) or (18), one needs to run N iterations of Algorithm 1 or 2. If the time needed to simulate one step of the DA chain is τ , then the time needed to run N iterations of Algorithm 1 or 2 is approximately kN τ . Given k and N , the accuracy of the estimate depends on two factors: 1. The distance between lk and uk , and 2. The errors in the estimates, lk∗ and u∗k . We now briefly analyze these two factors, and give some additional guidelines regarding the choice of ω(·) and ψ(·). As before, suppose that 1 = λ0 > λ1 = λ2 = · · · = λm > λm+1 ≥ · · · ≥ λκ > 0 for some m < ∞. Clearly, as k → ∞,    sk − 1 = λk1 m + O λkm+1 /λk1 . Hence, as k → ∞, lk := and    sk − 1 k−1 /λ1k−1 , = λ1 1 + O λm+1 sk−1 − 1 uk := (sk − 1)1/k    = λ1 m1/k 1 + O k−1 λkm+1 /λk1     1 + O k−1 λkm+1 /λk1 . = λ1 1 + (log m)O k−1  λ1 1 + O k−1 λk /λk  m = 1 2 1 =  λ 1 + O k−1 m > 1. 1 Depending on whether m = 1 or not, uk − lk decreases at either a geometric or polynomial rate as k grows. The errors of lk∗ and u∗k arise from those of s∗k and s∗k−1 . We now consider the estimator (18) for estimating sk . Its variance is given by (Z Z Z  )  πU |V (u|v) 2 ′ D ′2 1 ′ ′ 2 = r(v , dv)πV |U (v |u)ψ(u) ν(dv ) µ(du) − sk N N ψ(u) SU SV SV (Z Z Z ) πU2 |V (u|v) 1 = πV |U (v|u′ )p(k) (u, u′ ) µ(du′ ) ν(dv) µ(du) − s2k . N ψ(u) SU SV SU Note that  pk (u, v), (u′ , v ′ ) := πV |U (v ′ |u′ )p(k) (u, u′ ) 15 gives the k-step Mtd of a Gibbs chain whose stationary pdf is πU,V (·, ·). Thus, under suitable conditions, for almost any u ∈ SU , lim sk (u) := lim k→∞ Z k→∞ SV = Z Z Z πU2 |V (u|v) SU πU2 |V (u|v) ψ(u) p(u, u)πU (u) . = ψ(u) SV πV |U (v|u′ )p(k) (u, u′ ) µ(du′ ) ν(dv) ψ(u) πU,V (u′ , v) µ(du′ ) ν(dv) SU As k → ∞, we expect ′2 D = Z SU sk (u) µ(du) − s2k → Z SU p(u, u)πU (u) µ(du) − 1. ψ(u) Suppose that ψ(u) ≈ πU (u), then heuristically, Z Z p(u, u)πU (u) p(u, u)µ(du) − 1 = s1 − 1. µ(du) − 1 ≈ ψ(u) SU SU Thus, if the sum of P ’s eigenvalues, s1 , is relatively small, we recommend picking ψ(·)s that resemble πU (·), with possibly heavier tails (to ensure that the moment condition (20) holds). By a similar argument, when using the estimator (13), picking ω(·)s that resemble πV (·) is likely to control D 2 around s1 − 1 for large ks. While (under suitable conditions) the variance of s∗k converges to a constant as k → ∞, this is not the case for u∗k and lk∗ (because uk and lk are non-linear in sk and sk−1 ). In fact, using the delta method, one can show that these variances are unbounded. Thus, there’s a trade-off between decreasing uk − lk (by increasing k) and controlling the errors of u∗k and lk∗ . We do not recommend increasing k indefinitely. As long as k is large enough so that sk − 1 is significantly smaller than 1, uk serves as a non-trivial (and often decent) upper bound for λ1 . 7 Examples In this section, we apply our Monte Carlo technique to several common Markov operators. In particular, we examine one toy Markov chain, and two practically relevant Monte Carlo Markov chains. In the two real examples, we are able to take advantage of existing trace-class proofs to establish that (15) (or (20)) hold for suitable ω(·) (or ψ(·)). 7.1 Gaussian chain We begin with a toy example. Let SU = SV = R, πU (u) ∝ exp(−u2 ), and n  u 2 o πV |U (v|u) ∝ exp − 4 v − . 2 16 Then πU |V (u|v) ∝ exp{−2(u − v)2 } . This leads to one of the simplest DA chains known. Indeed, the Mtd, p(u, ·) = Z πU |V (·|v)πV |U (v|u) dv , R can be evaluated in closed form, and turns out to be a normal pdf. The spectrum of the corresponding Markov operator, P , has been studied thoroughly (see e.g. Diaconis et al., 2008). It is easy to verify that (4) holds, so P is trace-class. In fact, κ = ∞, and for any non-negative integer i, λi = 1/2i . Thus, the second largest eigenvalue, λ1 , and the spectral gap, δ, are both equal to 1/2. Moreover, for any positive integer k, ∞ X 1 1 = . sk = ik 2 1 − 2−k i=0 We now pretend to be unaware of this spectral information, and use (13) to estimate {sk , lk , uk }4k=1 . Recall that lk and uk are lower and upper bounds for λ1 , respectively. Note that Z R πV3 |U (v|u)πU |V 6 2 (u|v) du ∝ exp − v . 5  It follows that, if we take ω(v) ∝ exp(−v 2 /2), then (15) holds, and our estimator of sk has finite variance. We used a Monte Carlo sample size of N = 1 × 105 to form our estimates, and the results are shown in Table 1. Table 1: Estimated power sums of eigenvalues for the Gaussian chain k Est. sk √ Est. D/ N Est. lk Est. uk 1 1.996 0.004 0.000 0.996 2 1.331 0.004 0.333 0.575 3 1.142 0.004 0.429 0.522 4 1.068 0.004 0.482 0.511 Note that the estimates of the sk s are quite good. We constructed 95% confidence intervals (CIs) for l4 and u4 via the delta method, and the results were (0.442, 0.522) and (0.498, 0.524), respectively. Remark 1. It is interesting that, if ω(·) is set to be πV (·), which seems natural, then (15) fails to hold. In fact, the estimator of s1 has infinite variance in this case. Indeed, recall that the estimator given in (13) has 17 the form N 1 X πV |U (Vi∗ |Ui∗ ) , N ω(Vi∗ ) i=1 where (Ui∗ , Vi∗ ) are iid, and (U1∗ , V1∗ ) has pdf given by η(u, v) = πU |V (u|v)ω(v). Hence, the variance of the estimator, D 2 , is finite if and only if Z SU Z πV2 |U (v|u)πU |V (u|v) ω(v) SV dv du < ∞. (21) If ω(·) = πV (·) ∝ exp(−2v 2 ), then the left hand side of (21) becomes proportional to Z Z Z Z o n  u 2 exp(−8v 2 + 12uv − 4u2 ) dv du, − 2(u − v)2 + 2v 2 dv du = exp − 8 v − 2 SU SV SU SV which is infinite. 7.2 Bayesian probit regression Let Y1 , Y2 , . . . , Yn be independent Bernoulli random variables with P(Y1 = 1|β) = Φ(xTi β), where xi , β ∈ Rp , and Φ(·) is the cumulative distribution function of the standard normal distribution. Take the prior on β to be Np (Q−1 w, Q−1 ), where w ∈ Rp and Q is positive definite. The resulting posterior distribution is intractable, but Albert and Chib (1993) devised a DA algorithm to sample from it. Let z = (z1 , z2 , . . . , zn )T be a vector of latent variables, and let X be the design matrix whose ith row is xTi . The Mtd of the Albert and Chib (AC) chain, p(β, ·), β ∈ Rp , is characterized by   −1  T  −1  1 T T T T T w +X z X X +Q β − X X +Q w +X z , πU |V (β|z) ∝ exp − β − X X +Q 2 and πV |U (z|β) ∝ n Y i=1 exp   2  1 T − zi − xi β IR+ (yi − 0.5)zi . 2 The first conditional density, πU |V (·|z), is a multivariate normal density, and the second conditional density, πV |U (·|β), is a product of univariate truncated normal pdfs. A sandwich step can be added to facilitate the convergence of the AC chain. Chakraborty and Khare (2017) constructed a Haar PX-DA variant of the chain, which is a sandwich chain with transition density of the form (6) (see also Roy and Hobert (2007)). The sandwich step s(z, dz ′ ) is equivalent to the following update: z 7→ z ′ = gz, where the scalar g is drawn from the following density:   1 T T −1 T 2 T T −1 n−1 πG (g|z) ∝ g exp − z In − X(X X + Q) X zg + z X(X X + Q) wg . 2 18 Note that this pdf is particularly easy to sample from when w = 0. Chakraborty and Khare showed that P is trace-class when one uses a concentrated prior (corresponding to Q having large eigenvalues). In fact, the following is shown to hold in their proof. Proposition 3. Suppose that X is full rank. If all the eigenvalues of Q−1/2 X T XQ−1/2 are less than 7/2, then for any polynomial function t : Rp → R, Z |t(β)|p(β, β) dβ < ∞ . Rp We will use the estimator (18). The following proposition provides a class of ψ(·)s that lead to estimators with finite variance. Proposition 4. Suppose the hypothesis in Proposition 3 holds. If ψ(·) is the pdf of a p-variate t-distribution, i.e. ψ(β) ∝ −(a+p)/2  1 1 + (β − b)T Σ−1 (β − b) a for some b ∈ Rp , positive definite matrix Σ ∈ Rp×p , and positive integer a, then the estimator (18) has finite variance. Proof. Note that for every β and z πU3 |V (β|z) ≤ CπU |V (β|z) , where C is a constant. Hence, by Proposition 3, for any polynomial function t : Rp → R, Z Z Z 3 |t(β)|p(β, β) dβ < ∞. |t(β)|πU |V (β|z)πV |U (z|β) dz dβ ≤ C Rp Rp Rn Since ψ −2 (·) is a polynomial function on Rp , the moment condition (20) holds. The result follows from Corollary 1. As a numerical illustration, we apply our method to the Markov operator associated with the AC chain corresponding to the famous “lupus data” of van Dyk and Meng (2001). In this data set, n = 55 and p = 3. As in Chakraborty and Khare (2017), we will let w = 0 and Q = X T X/g, where g = 3.499999. It can be easily shown that the assumptions in Proposition 3 are met. Chakraborty and Khare compared the AC chain, Φ, and its Haar PX-DA variant, Φ̃, defined a few paragraphs ago. This comparison was done using estimated autocorrelations. Their results suggest that Φ̃ outperforms Φ when estimating a certain test function. We go further and estimate the second largest eigenvalue of each operator. It can be shown that the posterior pdf, πU (·), is log-concave, and thus possess a unique mode. Let β̂ be the posterior mode, and Σ̂ the estimated variance of the MLE. We pick ψ(·) to be the pdf of t30 (β̂, (Σ̂−1 +Q)−1 ). 19 This is to say, for any β ∈ Rp , o−(p+30)/2 n 1 . ψ(β) ∝ 1 + (β − β̂)T (Σ̂−1 + Q)(β − β̂) 30 By Proposition 4, this choice of ψ(·) guarantees finite variance. When n is large, ψ(·) is expected to resemble πU (·). The performance of our method seems insensitive to the degrees of freedom of the t-distribution (which is set at 30 for illustration). We used a Monte Carlo sample size of N = 4 × 105 to form our estimates for the DA operator, and the results are shown in Table 2. Asymptotic 95% CIs for l5 and u5 are (0.397, 0.545) and (0.573, 0.595), respectively. Using a Bonferroni argument, we can state that asymptotically, with at least 95% confidence, λ1 ∈ (0.397, 0.595). Table 2: Estimated power sums of eigenvalues for the AC chain k Est. sk √ Est. D ′ / N Est. lk Est. uk 1 6.744 0.072 0.000 5.744 2 2.041 0.007 0.181 1.020 3 1.363 0.004 0.349 0.713 4 1.156 0.004 0.430 0.628 5 1.068 0.003 0.436 0.584 Table 3: Estimated power sums of eigenvalues for the Haar PX-DA version of the AC chain k Est. s̃k √ Est. D ′ / N Est. ˜lk Est. ũk 1 3.796 0.012 0.000 1.796 2 1.538 0.004 0.193 0.734 3 1.172 0.004 0.319 0.556 4 1.060 0.003 0.352 0.496 5 1.025 0.003 0.419 0.479 We now consider the sandwich chain, Φ̃. One can show that the Mtd of any Haar PX-DA chain is representable (Hobert and Marchev, 2008). Hence, P̃ is indeed a DA operator. Recall that {λ̃i }κ̃i=0 , 0 ≤ κ̃ ≤ ∞, denote the decreasingly ordered positive eigenvalues of P̃ . It was shown in Khare and Hobert 20 (2011) that λ̃i ≤ λi for i ∈ N with at least one strict inequality. For a positive integer k, Pκ̃ k i=0 λ̃i is denoted by s̃k . Let ũk and ˜lk , be the respective counterparts of uk and lk . Estimates of s̃k , k = 1, 2, · · · , 5 using 4 × 105 Monte Carlo samples are given in Table 3. Our estimate of s̃1 − 1 is less than half of s1 − 1, implying that, in an average sense, the sandwich version of the AC chain reduces the nontrivial eigenvalues of P by more than half. Asymptotic 95% CIs for l5 and u5 are (0.321, 0.518) and (0.456, 0.503). Thus, asymptotically, with at least 95% confidence, λ̃1 ∈ (0.321, 0.503). The method does not detect a significant difference between λ1 and λ̃1 . 7.3 Bayesian linear regression model with non-Gaussian errors Let Y1 , Y2 , . . . , Yn be independent d-dimensional random vectors from the linear regression model Yi = β T xi + Σ1/2 εi , where xi ∈ Rp is known, while β ∈ Rp×d and the d × d positive definite matrix Σ are to be estimated. The iid errors, ε1 , ε2 , . . . , εn , are assumed to have a pdf that is a scaled mixture of Gaussian densities: Z  u  ud/2 T exp − ε ε h(u) du, fh (ε) = d/2 2 R+ (2π) where h(·) is a pdf with positive support, and R+ := (0, ∞). For instance, if d = 1 and h(u) ∝ u−2 e−1/(8u) , then ε1 has pdf proportional to e−|ε|/2 . To perform a Bayesian analysis, we require a prior on the unknown parameter, (β, Σ). We adopt the (improper) Jeffreys prior, given by 1/|Σ|(d+1)/2 . Let y represent the n × d matrix whose ith row is the observed value of Yi . The following four conditions, which are sufficient for the resulting posterior to be proper (Qin and Hobert, 2016; Fernandez and Steel, 1999), will be assumed to hold: 1. n ≥ p + d, 2. (X : y) is full rank, where X is the n × p matrix whose ith row is xTi , 3. 4. R R R+ ud/2 h(u) du < ∞, and R+ u−(n−p−d)/2 h(u) du < ∞. The posterior density is highly intractable, but there is a well-known DA algorithm to sample from it (Liu, 1996). Under our framework, the DA chain Φ is characterized by the Mtd Z  πU |V (·, ·|z)πV |U (z|β, Σ) dz, p (β, Σ), (·, ·) = Rn + 21 where z = (z1 , z2 , . . . , zn )T , πU |V (β, Σ|z) ∝ |Σ|−(n+d+1)/2 πV |U (z|β, Σ) ∝ n Y d/2 zi exp i=1 n n Y i=1 − exp n − o T zi yi − β T xi Σ−1 yi − β T xi , and 2 T o zi yi − β T xi Σ−1 yi − β T xi h(zi ) . 2 The first conditional density, πU |V (·, ·|z), characterizes a multivariate normal distribution on top of an inverse Wishart distribution, i.e. β|Σ, z is multivariate normal, and Σ|z is inverse Wishart. The second conditional density, πV |U (·|β, Σ), is a product of n univariate densities. Moreover, when h(·) is a standard pdf on R+ , these univariate densities are often members of a standard parametric family. The following proposition about the resulting DA operator is proved in Qin and Hobert (2016). Proposition 5. Suppose h(·) is strictly positive in a neighborhood of the origin. If there exists ξ ∈ (1, 2) and δ > 0 such that Z 0 then P is trace-class. δ ud/2 h(u) du < ∞, R ξu d/2 h(v) dv 0 v When P is trace-class, we can pick an ω(·) and try to make use of (13). A sufficient condition for the estimator’s variance, D 2 , to be finite is stated in the following proposition, whose proof is given in the appendix. Proposition 6. Suppose that h(·) is strictly positive in a neighborhood of the origin. If ω(z) can be written Q as ni=1 ωi (zi ), and there exists ξ ∈ (1, 4/3) such that for all i ∈ {1, 2, . . . , n}, Z R+ u3d/2 h3 (u) du < ∞, R ξu ( 0 v d/2 h(v) dv)3 ωi2 (u) (22) then (15) holds, and thus by Theorem 2, the estimator (13) has finite variance. For illustration, take d = 1 and h(u) ∝ u−2 e−1/(8u) . Then ε1 follows a scaled Laplace distribution, and the model can be viewed as a median regression model with variance Σ unknown. It’s easy to show that h(·) satisfies the assumptions in Proposition 5, so the resultant DA operator is trace-class. (This result was actually first proven by Choi and Hobert (2013).) Now let ω(z) = n Y i=1 ωi (zi ) ∝ n Y −3/2 −1/(32zi ) zi e . i=1 The following result shows that this will lead to an estimator with finite variance. 22 Corollary 2. Suppose d = 1, h(u) ∝ u−2 e−1/(8u) , and ω(z) = n Y i=1 ωi (zi ) ∝ n Y zi−α−1 e−γ/zi , i=1 where 0 < α < 3/4 and 0 < γ < 3/64. Then the variance, D 2 , is finite. Proof. In light of Proposition 6, we only need to show that (22) holds for some ξ ∈ (1, 4/3). For any ξ > 0, making use of the fact that (by monotone convergence theorem) ξu Z lim u→∞ 0 v 1/2 h(v) dv = Z u1/2 h(u) du > 0 , R+ one can easily show for any δ > 0, Z ∞ δ u3/2 h3 (u) du = R ξu ( 0 v 1/2 h(v) dv)3 ωi2 (u) Z ∞ δ u2α−5/2 exp{2γ/u − 3/(8u)} du < ∞. R ξu ( 0 v 1/2 h(v) dv)3 (23) On the other hand, using L’Hôpital’s rule, we can see for (1 − 16γ/3)−1 < ξ < 4/3, lim u→0 u3/2 h3 (u) R ξu ( 0 v 1/2 h(v) dv)3 ωi2 (u) !1/3 u2α/3−5/6 exp{2γ/(3u) − 1/(8u)} R ξu −3/2 e−1/(8v) dv u→0 0 v n  2γ 1 1 1 o = lim R(u) exp − − − + u→0 3 8ξ 8 u = lim = 0, where R(u) is a function that is either bounded near the origin or goes to ∞ at the rate of some power function as u → 0. It follows that for ξ ∈ ((1 − 16γ/3)−1 , 4/3) and small enough δ, Z 0 δ u3/2 h3 (u) du < ∞. R ξu ( 0 v 1/2 h(v) dv)3 ωi2 (u) (24) Combining (23) and (24) yields (22). The result then follows. We now test the efficiency of the Monte Carlo estimator (13) using some simulated data with d = 1. 23 Here are our simulated X and y:  1 2.32    1 5.65    1 −7.69    1 3.59    1 5.57  X=  1 −9.99    1 −18.88    5.95  1    1 −16.39  1 4.75 1 0 2.32  0    1 0 5.65 0    1 0 −7.69 0   0 1 0 3.59    0 1 0 5.57    0 1 0 −9.99    0 1 0 −18.88     0 0 0 0     0 0 0 0  0 0 0 0  and              y=             0.14 2.99 1.37 −2.55 −3.60 14.86 21.24 2.78 9.14 2.06               .             The simulation was was based on a linear model containing an intercept, one continuous covariate, a single factor with three levels, and an interaction between the two. The elements in the second column of X were independently generated from N (0, 100). Once X was simulated, we generated the data according to Yi = β∗T xi + p Σ ∗ ǫi , where β∗ = (1, 0, −0.5, 0.5, 0, −1)T , Σ∗ = 1, {ǫi }10 i=1 are iid, and ǫ1 has pdf given by fh (·) when h(u) ∝ u−2 e−1/(8u) . That is, the errors have a scaled Laplace distribution. Then the DA chain Φ lives in SU = 6 R6 × R+ , and SV is R10 + . We used a Monte Carlo sample size of N = 2 × 10 to form estimates of {sk , lk , uk }4k=1 , and the results are shown in Table 4. Table 4: Estimated power sums of eigenvalues for the DA chain for Bayesian linear regression with non-Gaussian errors k Est. sk √ Est. D/ N Est. lk Est. uk 1 35.587 0.121 0.000 34.587 2 2.465 0.020 0.042 1.210 3 1.325 0.014 0.222 0.687 4 1.102 0.012 0.313 0.564 The asymptotic 95% CIs for l4 and u4 are (0.241, 0.383) and (0.532, 0.597), respectively. Also, using Bonferroni, we may conclude that asymptotically, with at least 95% confidence, λ1 ∈ (0.241, 0.597). The 24 Monte Carlo sample size required to secure a reasonable estimate does increase with n and p. For example, in another example we considered where n = 20 and p = 4, we needed a Monte Carlo sample size of 1×107 to get decent results. Acknowledgment. The second and third authors were supported by NSF Grant DMS-15-11945. Appendix A Proof of Theorem 1 Theorem 1. The DA operator P is trace-class if and only if Z SU p(u, u) µ(du) < ∞. (4) If (4) holds, then for any positive integer k, sk := κ X λki = Z SU i=0 p(k) (u, u) µ(du) < ∞. (5) 2 Proof. Note that P is self-adjoint and non-negative. Let {gi }∞ i=0 be an orthonormal basis of L (πU ). The operator P is defined to be trace-class if (see e.g. Conway, 2000) ∞ X hP gi , gi iπU < ∞. (25) i=0 This condition is equivalent to P being compact with summable eigenvalues. To show that P being traceclass is equivalent to (4), we will prove a stronger result, namely ∞ X i=0 hP gi , gi iπU = Z p(u, u)µ(du). (26) SU We begin by defining two new Hilbert spaces. Let L2 (πV ) be the Hilbert space consisting of functions that are square integrable with respect to the weight function πV (·). For f, g ∈ L2 (πV ), their inner product is defined, as usual, by hf, giπV = Z f (v)g(v)πV (v) ν(dv). SV 25 Let L2 (πU × πV ) be the Hilbert space of functions on SU × SV that are square integrable with respect to the weight function πU (·)πV (·). For f, g ∈ L2 (πU × πV ), their inner product is hf, giπU ×πV = Z f (u, v)g(u, v)πU (u)πV (v) µ(du) ν(dv). SU ×SV 2 Note that L2 (πV ) is separable. Let {hj }∞ j=0 be an orthonormal basis of L (πV ). It can be shown that {gi hj }(i,j)∈Z2+ is an orthonormal basis of L2 (πU × πV ). Of course, gi hj denotes the function given by (gi hj )(u, v) = gi (u)hj (v). The inequality (4) is equivalent to   Z πU,V (u, v) 2 πU (u)πV (v) µ(du) ν(dv) < ∞, πU (u)πV (v) SU ×SV which holds if and only if the function ϕ : SU × SV → R given by ϕ(u, v) = πU,V (u, v) πU (u)πV (v) is in L2 (πU × πV ). Suppose (4) holds. Then by Parseval’s identity, Z p(u, u) µ(du) = hϕ, ϕiπU ×πV SU = X (i,j)∈Z2+ = X (i,j)∈Z2+ = |hϕ, gi hj iπU ×πV |2 Z gi (u)hj (v)πU,V (u, v) µ(du) ν(dv) SU ×SV ∞ Z ∞ X X i=0 j=0 2 SV Z SU  2 gi (u)πU |V (u|v) µ(du) hj (v)πV (v) ν(dv) . Again by Parseval’s identity, this time applied to the function on SV (and in fact, in L2 (πV ) by Jensen’s inequality) given by ϕi (v) = Z SU gi (u)πU |V (u|v) µ(du), 26 we have Z ∞ ∞ X X |hϕi , hj iπV |2 p(u, u) µ(du) = SU i=0 j=0 = = = = ∞ X hϕi , ϕi iπV i=0 ∞ Z X i=0 SV ∞ Z X i=0 SV ∞ Z X i=0 SU Z 2 SU Z SU Z gi (u)πU |V (u|v) µ(du) πV (v) ν(dv) Z SU SU  gi (u′ )πU |V (u′ |v)πV |U (v|u) µ(du′ ) gi (u)πU (u) µ(du) ν(dv)  p(u, u′ )gi (u′ ) µ(du′ ) gi (u)πU (u) µ(du). (27) Note that the use of Fubini’s theorem in the last equality can be easily justified by noting that gi ∈ L2 (πU ), P and making use of Jensen’s inequality. But the right hand side of (27) is precisely ∞ i=0 hP gi , gi iπU . Hence, R (26) holds when SU p(u, u) µ(du) is finite. To finish our proof of (26), we’ll show (25) implies (4). Assume that (25) holds. Tracing backwards along (27) yields X (i,j)∈Z2+ |hϕi , hj iπV |2 < ∞. This implies that the function ϕ̃ := X (i,j)∈Z2+ hϕi , hj iπV gi hj is in L2 (πU × πV ). Recall that (4) is equivalent to ϕ being in L2 (πU × πV ). Hence, it suffices to show that ϕ̃(u, v) = ϕ(u, v) almost everywhere. Define a linear transformation T : L2 (πU ) → L2 (πV ) by Z f (u)πU |V (u|v) µ(du), ∀f ∈ L2 (πU ). T f (v) = SU By Jensen’s inequality, T is bounded, and thus, continuous. For any g = 27 P∞ i=0 αi gi ∈ L2 (πU ) and h = P∞ j=0 βj hj ∈ L2 (πV ), Z SV Z ϕ(u, v)g(u)h(v) πU (u)πV (v) µ(du) ν(dv) SU = hT g, hiπV = = ∞ ∞ X X i=0 j=0 ∞ X ∞ X i=0 j=0 αi βj hT gi , hj iπV αi βj hϕi , hj iπV = hϕ̃, ghiπU ×πV Z Z ϕ̃(u, v)g(u)h(v) πU (u)πV (v) µ(du) ν(dv), = SV SU where g ∈ L2 (πV ) is given by g(u) := g(u), and gi is defined similarly for i ∈ Z+ . This implies that for any C1 ∈ U and C2 ∈ V, Z Z ϕ(u, v) πU (u)πV (v) µ(du) ν(dv) = ϕ̃(u, v) πU (u)πV (v) µ(du) ν(dv). C1 ×C2 C1 ×C2 Note that Z 1/2 SU ×SV |ϕ̃(u, v)| πU (u)πV (v) µ(du) ν(dv) ≤ hϕ̃, ϕ̃iπU ×πV < ∞. (28) By (28) and the dominated convergence theorem, one can show that Z Z o n ϕ̃(u, v) πU (u)πV (v) µ(du) ν(dv) ϕ(u, v) πU (u)πV (v) µ(du) ν(dv) = A := C ∈ U × V C C is a λ system. An application of Dynkin’s π-λ theorem reveals that U × V ⊂ A. Therefore, ϕ̃(u, v) = ϕ(u, v) almost everywhere, and (4) follows. For the rest of the proof, assume that P is trace-class. This implies that P is compact, and thus admits the spectral decomposition (see e.g. Helmberg, 2014, §28 Corollary 2.1) given by Pf = κ X i=0 λi hf, fi iπU fi , f ∈ L2 (πU ) where fi , i = 0, 1, . . . , κ, is the normalized eigenfunction corresponding to λi . By Parseval’s identity, κ ∞ X ∞ X X λj |hgi , fj iπU |2 hP gi , gi iπU = i=0 j=0 i=0 = = κ X j=0 κ X j=0 28 λj hfj , fj iπU λj . (29) This equality is in fact a trivial case of Lidskii’s theorem (see e.g. Erdös, 1974; Gohberg et al., 2012). It follows that (5) holds for k = 1. We now consider the case where k ≥ 2. By (29) and a simple induction, we have the following decom- position for P k . k P f= κ X i=0 Hence P k λki hf, fi iπU fi , f ∈ L2 (πU ) . is trace-class with ordered positive eigenvalues {λki }κi=0 . Note that P k is a Markov operator whose Mtd is p(k) (u, ·), u ∈ SU . Thus, in order to show that (5) holds for k ≥ 2, it suffices to verify P k is a DA operator, for then we can treat P k as P and repeat our argument for the k = 1 case. To be specific, we’ll show that there exists a random variable Ṽ taking values on SṼ , where (SṼ , Ṽ, ν̃) is a σ-finite measure space and Ṽ is countably generated, such that for u ∈ SU , p (k) (u, ·) = Z SṼ πU |Ṽ (·|v)πṼ |U (v|u) ν̃(dv), (30) where πṼ (·), πU |Ṽ (·|·), and πṼ |U (·|·) have the apparent meanings. Let (Uk , Vk )∞ k=0 be a Markov chain. Suppose that U0 has pdf πU (·), and for any non-negative integer k, let Vk |Uk = u have pdf πV |U (·|u), and let Uk+1 |Vk = v have pdf πU |V (·|v). It’s easy to see {Uk }∞ k=0 is a stationary DA chain with Mtd p(u, ·). Suppose k is even. The pdf of Uk |U0 = u is p (k) (u, ·) = Z SU p(k/2) (u, u′ )p(k/2) (u′ , ·)µ(du). Meanwhile, since the chain is reversible and starts from the stationary distribution, U0 |Uk/2 = u has the same distribution as Uk/2 |U0 = u, which is just p(k/2) (u, ·). Thus, (30) holds with Ṽ = Uk/2 . A similar argument shows that when k is odd, (30) holds with Ṽ = V(k−1)/2 . B Proof of Proposition 6 Proposition 6. Suppose that h(·) is strictly positive in a neighborhood of the origin. If ω(z) can be written Q as ni=1 ωi (zi ), and there exists ξ ∈ (1, 4/3) such that for all i ∈ {1, 2, . . . , n}, Z R+ u3d/2 h3 (u) du < ∞, R ξu ( 0 v d/2 h(v) dv)3 ωi2 (u) then (15) holds, and thus by Theorem 2, second moment exists for the estimator (13). 29 Proof. Let Sd be the set of d × d positive definite matrices. For any β ∈ Rp , Σ ∈ Sd , z ∈ Rn , and ξ ∈ (1, 4/3), πU |V (β, Σ|z)πV3 |U (z|β, Σ) Q |Σ|−(n+d+1)/2 ni=1 exp{−zi (yi − β T xi )T Σ−1 (yi − β T xi )/2} × =R R Qn −(n+d+1)/2 T T −1 T i=1 exp{−zi (yi − β̃ xi ) Σ̃ (yi − β̃ xi )/2} dΣ̃ dβ̃ Rp Sd |Σ̃| n Y 3d/2 n Y zi z exp{−3zi (yi − β T xi )T Σ−1 (yi − β T xi )/2}h3 (zi ) R ∞i { 0 v d/2 exp[−v(yi − β T xi )T Σ−1 (yi − β T xi )/2]h(v) dv}3 i=1 Q |Σ|−(n+d+1)/2 ni=1 exp{−zi (yi − β T xi )T [Σ/(4 − 3ξ)]−1 (yi − β T xi )/2} ≤R R × Qn −(n+d+1)/2 T T −1 T i=1 exp{−zi (yi − β̃ xi ) Σ̃ (yi − β̃ xi )/2} dΣ̃ dβ̃ Rp Sd |Σ̃| 3d/2 3 h (zi ) . R ξzi d/2 h(v) dv)3 ( v i=1 0 Note that Z −(n+d+1)/2 Sd |Σ| n Y i=1 −nd/2 = (4 − 3ξ) Z Sd exp  T zi − y i − β T xi 2 |Σ|−(n+d+1)/2 n Y exp i=1 n  − Σ 4 − 3ξ −1 Rp Z Sd πU |V (β, Σ|z)πV3 |U (z|β, Σ) dΣ dβ −nd/2 ≤ (4 − 3ξ) The result follows immediately. y i − β xi   dΣ o T zi yi − β T xi Σ−1 yi − β T xi dΣ. 2 Thus, Z T n Y i=1 3d/2 3 h (zi ) zi . R ξz ( 0 i v d/2 h(v) dv)3 References A HUES , M., L ARGILLIER , A. and L IMAYE , B. (2001). Spectral Computations for Bounded Operators. CRC Press. A LBERT, J. H. and C HIB , S. (1993). Bayesian analysis of binary and polychotomous response data. Journal of the American statistical Association 88 669–679. B ILLINGSLEY, P. (1995). Probability and Measure. 3rd ed. John Wiley & Sons. B RISLAWN , C. (1988). Kernels of trace class operators. Proceedings of the American Mathematical Society 104 1181–1190. C HAKRABORTY, S. and K HARE , K. (2017). Convergence properties of Gibbs samplers for Bayesian probit regression with proper priors. Electronic Journal of Statistics 11 177–210. 30 C HAN , K. S. and G EYER , C. J. (1994). Discussion: Markov chains for exploring posterior distributions. The Annals of Statistics 22 1747–1758. C HOI , H. M. and H OBERT, J. P. (2013). Analysis of MCMC algorithms for Bayesian linear regression with Laplace errors. Journal of Multivariate Analysis 117 32–40. C HOI , H. M. and ROM ÁN , J. C. (2017). Analysis of Polya-Gamma Gibbs sampler for Bayesian logistic analysis of variance. Electronic Journal of Statistics 11 326–337. C ONWAY, J. B. (1990). A Course in Functional Analysis. 2nd ed. Springer-Verlag. C ONWAY, J. B. (2000). A Course in Operator Theory. American Mathematical Soc. D IACONIS , P., K HARE , K. and S ALOFF -C OSTE , L. (2008). Gibbs sampling, exponential families and orthogonal polynomials (with discussion). Statistical Science 23 151–200. D IACONIS , P. and S TROOCK , D. (1991). Geometric bounds for eigenvalues of Markov chains. The Annals of Applied Probability 1 36–61. E RD ÖS , J. (1974). On the trace of a trace class operator. Bulletin of the London Mathematical Society 6 47–50. F ERNANDEZ , C. and S TEEL , M. F. (1999). Multivariate student-t regression models: Pitfalls and inference. Biometrika 86 153–167. G ARREN , S. T. and S MITH , R. L. (2000). Estimating the second largest eigenvalue of a Markov transition matrix. Bernoulli 6 215–242. G OHBERG , I., G OLDBERG , S. and K RUPNIK , N. (2012). Traces and Determinants of Linear Operators, vol. 116. Birkhäuser. H ELMBERG , G. (2014). Introduction to Spectral Theory in Hilbert Space. Elsevier. H OBERT, J. P. (2011). The data augmentation algorithm: Theory and methodology. In Handbook of Markov Chain Monte Carlo (S. Brooks, A. Gelman, G. Jones and X.-L. Meng, eds.). Chapman & Hall/CRC Press. H OBERT, J. P. and M ARCHEV, D. (2008). A theoretical comparison of the data augmentation, marginal augmentation and PX-DA algorithms. The Annals of Statistics 36 532–554. K HARE , K. and H OBERT, J. P. (2011). A spectral analytic comparison of trace-class data augmentation algorithms and their sandwich variants. The Annals of Statistics 39 2585–2606. 31 KOLTCHINSKII , V. and G IN É , E. (2000). Random matrix approximation of spectra of integral operators. Bernoulli 6 113–167. KONTOYIANNIS , I. and M EYN , S. P. (2012). Geometric ergodicity and the spectral gap of non-reversible Markov chains. Probability Theory and Related Fields 154 327–339. L AWLER , G. F. and S OKAL , A. D. (1988). Bounds on the l2 spectrum for Markov chains and Markov processes: A generalization of Cheegers inequality. Transactions of the American Mathematical Society 309 557–580. L IU , C. (1996). Bayesian robust multivariate linear regression with incomplete data. Journal of the American Statistical Association 91 1219–1227. L IU , J. S., W ONG , W. H. and KONG , A. (1994). Covariance structure of the Gibbs sampler with applications to the comparisons of estimators and augmentation schemes. Biometrika 81 27–40. L IU , J. S. and W U , Y. N. (1999). Parameter expansion for data augmentation. Journal of the American Statistical Association 94 1264–1274. M IRA , A. and G EYER , C. J. (1999). Ordering Monte Carlo Markov chains. School of Statistics, University of Minnesota. technical report . PAL , S., K HARE , K. and H OBERT, J. P. (2017). Trace class markov chains for bayesian inference with generalized double pareto shrinkage priors. Scandinavian Journal of Statistics 44 307–323. Q IN , Q. and H OBERT, J. P. (2016). Trace-class Monte Carlo Markov chains for Bayesian multivariate linear regression with non-Gaussian errors. arXiv:1602.00136 . ROBERTS , G. O. and ROSENTHAL , J. S. (1997). Geometric ergodicity and hybrid Markov chains. Electronic Communications in Probability 2 13–25. ROY, V. and H OBERT, J. P. (2007). Convergence rates and asymptotic standard errors for markov chain monte carlo algorithms for bayesian probit regression. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 69 607–623. S INCLAIR , A. and J ERRUM , M. (1989). Approximate counting, uniform generation and rapidly mixing Markov chains. Information and Computation 82 93–133. TANNER , M. A. and W ONG , W. H. (1987). The calculation of posterior distributions by data augmentation (with discussion). Journal of the American statistical Association 82 528–540. 32 VAN DYK , D. A. and M ENG , X.-L. (2001). The art of data augmentation (with discussion). Journal of Computational and Graphical Statistics 10 1–50. 33
10math.ST
1 Deep Local Binary Patterns arXiv:1711.06597v1 [cs.CV] 17 Nov 2017 Kelwin Fernandes and Jaime S. Cardoso Abstract—Local Binary Pattern (LBP) is a traditional descriptor for texture analysis that gained attention in the last decade. Being robust to several properties such as invariance to illumination translation and scaling, LBPs achieved stateof-the-art results in several applications. However, LBPs are not able to capture high-level features from the image, merely encoding features with low abstraction levels. In this work, we propose Deep LBP, which borrow ideas from the deep learning community to improve LBP expressiveness. By using parametrized data-driven LBP, we enable successive applications of the LBP operators with increasing abstraction levels. We validate the relevance of the proposed idea in several datasets from a wide range of applications. Deep LBP improved the performance of traditional and multiscale LBP in all cases. xref xref xref (a) r=1, n=8 (b) r=2, n=16 (c) r=2, n=8 Figure 1: LBP neighborhoods with radius (r) and angular resolution (n). The first two cases use Euclidean distance to define the neighborhood, the last case use Manhattan distance. Index Terms—Local Binary Patterns, Deep Learning, Image Processing. • I. I NTRODUCTION I N recent years, computer vision community has moved towards the usage of deep learning strategies to solve a wide variety of traditional problems, from image enhancement [1] to scene recognition [2]. Deep learning concepts emerged from traditional shallow concepts from the early years of computer vision (e.g. filters, convolution, pooling, thresholding, etc.). Although these techniques have achieved state-of-the-art performance in several of tasks, the deep learning hype has overshadowed research on other fundamental ideas. Narrowing the spectrum of methods to a single class will eventually saturate, creating a monotonous environment where the same basic idea is being replicated over and over, and missing the opportunity to develop other paradigms with the potential to lead to complementary solutions. As deep strategies have benefited from traditional -shallowmethods in the past, some classical methods started to take advantage of key deep learning concepts. That is the case of deep Kernels [3], which explores the successive application of nonlinear mappings within the kernel umbrella. In this work, we incorporate deep concepts into Local Binary Patterns [4], [5], a traditional descriptor for texture analysis. Local Binary Patterns (LBP) is a robust descriptor that briefly summarizes texture information, being invariant to illumination translation and scaling. LBP has been successfully used in a wide variety of applications, including texture classification [6]–[9], face/gender recognition [10]–[15], among others [16]–[18]. LBP has two main ingredients: • The neighborhood (N ), usually defined by an angular resolution (typically 8 sampling angles) and radius r of the neighborhoods. Fig. 1 illustrates several possible neighborhoods. Kelwin Fernandes ([email protected]) and Jaime S. Cardoso ([email protected]) are with Faculdade de Engenharia da Universidade do Porto and with INESC TEC, Porto, Portugal. The binarization function b(xref , xi ) ∈ {0, 1}, which allows the comparison between the reference point (central pixel) and each one of the points xi in the neighborhood. Classical LBP is applicable when xref (and xi ) are in an ordered set (e.g., R and Z), with b(xref , xi ) defined as b(xref , xi ) = (xref ≺ xi ), (1) where ≺ is the order relation on the set (interpolation is used to compute xi when a neighbor location does not coincide with the center of a pixel). The output of the LBP at each position ref is the code resulting from the comparison (binarization function) of the value xref with each of the xi in the neighborhood, with i ∈ N (ref ), see Figure 2. The LBP codes can be represented by their numerical value as formally defined in (2). X LBP (xref ) = 2i · b(xref , xi ) (2) i∈|N (ref )| LBP codes can take 2|N | different values. In predictive tasks, for typical choices of angular resolution, LBP codes are compactly summarized into a histogram with 2|N | bins, being this the feature vector representing the object/region/image (see Fig. 3). Also, it is typical to compute the histograms in sub-regions and to build a predictive model by using as features the concatenation of the region histograms, being nonoverlapping and overlapping [19] blocks traditional choices (see Figure 4). In the last decade, several variations of the LBP have been proposed to attain different properties. The two best-known variations were proposed by Ojala et. al, the original authors of the LBP methodology: rotation invariant and uniform LBP [5]. Rotation invariance can be achieved by assigning a unique identifier to all the patterns that can be obtained by applying circular shifts. The new encoding is defined in (3), where 2 0 22 110 < 20 > 1 1 < > 42 < 80 80 > ⇒ 1 0 0 ⇒ 10011010 > < 0 0 1 60 1 (a) LBP code with 8 neighbors. 94 1 < 30 0 222 > ⇒ 65 > 15 1 < ⇒ 100001 > > 40 0 0 0 22 (b) LBP code with 6 neighbors. Figure 2: Cylinder and linear representation of the codes at some pixel positions. Encodings are built in a clockwise manner from the starting point indicated in the middle section of both figures. LBP encodings ⇒ Histogram e1 e5 ... e7 e5 e8 e1 ... e7 e3 e10 e1 ... e6 .. . .. . .. . .. .. . e2 ... e2 e9 e10 . ⇒ Frequency Original image ⇒ Classifier e1 e2 e3 . . . en e10 Encodings Frequency Figure 3: Traditional pipeline for image classification using LBP. e1 e2 e3 . . . en Frequency Encodings e1 e2 e3 . . . en Classifier Frequency Encodings e1 e2 e3 . . . en Frequency Encodings e1 e2 e3 . . . en Encodings Figure 4: Multi-block LBP with 2 × 2 non-overlapping blocks. ROR(e, i) applies a circular-wrapped bit-wise shift of i positions to the encoding e. LBP (xref ) = min{ROR(LBP (xref ), i) | i ∈ [0, . . . |N |)} (3) In the same work, Ojala et. al [5] identified that uniform patterns (i.e. patterns with two or less circular transitions) are responsible for the vast majority of the histogram frequencies, leaving low discriminative power to the remaining ones. Then, the relatively small proportion of non-uniform patterns limits the reliability of their probabilities, all the non-uniform patterns are assigned to a single bin in the histogram construction, while uniform patterns are assigned to individual bins. [5]. Heikkila et. al proposed Center-Symmetric LBP [20], which increases robustness on flat image areas and improves computational efficiency. This is achieved by comparing pairs of neighbors located in centered symmetric directions instead of comparing each neighbor with the reference pixel. Thus, an encoding with four bits is generated from a neighborhood of 8 pixels. Also, the binarization function incorporates an activation tolerance given by b(xi , xj ) = xi > xj + T . Further extensions of this idea can be found in [21]–[23]. Local ternary patterns (LTP) are an extension of LBP that use a 3-valued mapping instead of a binarization function. The function used by LTP is formalized at (4). LTP are less sensitive to noise in uniform regions at the cost of losing invariance to illumination scaling. Moreover, LTP induce an additional complexity in the number of encodings, producing histograms with up to 3N bins.   −1 bT (xref , xi ) = 0   +1 xi < xref − T xref − T ≤ xi ≤ xref + T xref + T < xi (4) So far, we have mainly described methods that rely on redefining the construction of the LBP encodings. A different line of research focuses on improving LBP by modifying the texture summarization when building the frequency histograms. Two examples of this idea were presented in this work: uniform LBP [5] and multi-block LBP (see Fig. 4). Since different scales may bring complementary information, one can concatenate the histograms of LBP values at different scales. Berkan et al. proposed this idea in the Over-Complete LBP (OCLBP) [19]. Besides computing the encoding at multiple scales, OCLBP computes the histograms on several spatially overlapped blocks. An alternative to this way of modeling multiscale patterns is to, at each point, compute the LPB code at different scales, concatenate the codes and summarize (i.e., compute the histogram) of the concatenated feature vector. This latter option has difficulties concerning the dimensionality of the data (potentially tackled with a bag of words approach) and the nature of the codes (making unsuitable standard k-means to find the bins-centers for a bag of words approach). Multi-channel data (e.g. RGB) has been handled in a similar way, by 1) computing and summarizing the LBP codes in each channel independently and then concatenating the histograms [24] and by 2) computing a joint code for the three channels [25]. As LBP have been successfully used to describe spatial relations between pixels, some works explored embedding temporal information on LBP for object detection and background removal [10], [26]–[30]. It is trivial to prove that the only options for the binarization function that hold Eq. (5) are the constant functions (always zeros or always ones), the one given by Eq. (1) and its reciprocal. Model Histogram ... LBP LBP LBP Image 3 Figure 5: Recursive application of Local Binary Patterns. Finally, Local Binary Pattern Network (LBPNet) was introduced by Xi et al. [31] as a preliminary attempt to embed Deep Learning concepts in LBP. Their proposal consists on using a pyramidal approach on the neighborhood scales and histogram sampling. Then, Principal Component Analysis (PCA) is used on the frequency histograms to reduce the dimensionality of the feature space. Xi et al. analogise the pyramidal construction of LBP neighborhoods and histogram sampling as a convolutional layer, where multiple filters operate at different resolutions, and the dimensionality reduction as a Pooling layer. However, LBPNets aren’t capable of aggregating information from a single resolution into higher levels of abstraction which is the main advantage of deep neural networks. In the next sections, we will bring some ideas from the Deep Learning community to traditional LBP. In this sense, we intend to build LBP blocks that can be applied recursively in order to build features with higher-level of abstraction. II. D EEP L OCAL B INARY PATTERNS The ability to build features with increasing abstraction level using a recursive combination of relatively simple processing modules is one of the reasons that made Convolutional Neural Networks – and in general Neural Networks – so successful. In this work, we propose to represent “higher order” information about texture by applying LBP recursively, i.e., cascading LBP computing blocks one after the other (see Fig 5). In this sense, while an LBP encoding describes the local texture, a second order LBP encoding describes the texture of textures. However, while it is trivial to recursively apply convolutions – and many other filters – in a cascade fashion, traditional LBP are not able to digest their own output. Traditional LBP rely on receiving as input an image with domain in an ordered set (e.g. grayscale intensities). However, LPB codes are not in an ordered set, dismissing the direct recursive application of standard LBP. As such we will first generalize the main operations supporting LBP and discuss next how to assemble together a deep/recursive LBP feature extractor. We start the discussion with the binarization function b(xref , xi ). It is instructive to think, in the conventional LBP, if nontrivial alternative functions exist to the adopted one, Eq. (1). What is(are) the main property(ies) required by the binarization function? Does it need to make use of a (potentially implicit) order relationship? A main property of the binarization function is to be independent of scaling and translation of the input data, that is, b(k1 xref + k2 , k1 xi + k2 ) = b(xref , xi ), k1 > 0. (5) Proof. Assume xi , xj > xref and b(xref , xi ) 6= b(xref , xj ). Under the independence to translation and scaling (Eq. (5)), b(xref , xi ) = b(xref , xj ) as shown below, which is a contradiction. b(xref , xi ) = h Identity of multiplication i   xj − xref xj − xref b xref , xi xj − xref xj − xref = h Identity of addition i    xj − xref xref xj − xref xj xj − xref + (xi − xi ) xref , xi + b xj − xref xj − xref xj − xref = hArithmetici   xi − xref xj − xi xi − xref xj − xi b xref + xref , xj + xref x − xref xj − xref xj − xref x − xref  j  j xi − xref xj − xi = Eq. (5), where k1 = , k2 = xref xj − xref xj − xref b(xref , xj ) Therefore, b(xref , xi ) must be equal to all xi above xref . Similarly, b(xref , xi ) must be equal to all xi below xref . Among our options, the constant binarization function is not a viable option, since the information (in information theory perspective) in the output is zero. Since the recursive application of functions can be understood as a composition, invariance to scaling and translation is trivially ensured by using a traditional LBP in the first transformation. Given that transitivity is a relevant property held by the natural ordering of real numbers, we argue that such property should be guaranteed by our binarization function. In this sense, we will focus on strict partial orders of encodings. Following, we show how to build such binarization functions for the i-th application of the LBP operator, where i > 1. We will consider both predefined/expert driven solutions and data driven solutions (and therefore, application specific). Hereafter, we will refer to the binarization function as the partial ordering of LBP encodings. Despite the existence of other types of functions may be of general interest, narrowing the search space to those that can be represented as a partial ordering induce efficient learning mechanisms. A. Preliminaries Let us formalize the deep binarization function as the order relation b+ ∈ P(EN ×EN ), where EN is the set of encodings induced by the neighborhood N . Let Φ be an oracle Φ :: P(EN ×EN ) → R that assesses the performance of a binarization function. For example, among other options, the oracle can be defined as the performance of the traditional LBP pipeline (see Fig. 3) on a dataset for a given predictive task. 4 Table I: Lower bound of the number of combinations for deciding the best LBP binarization function as partial orders. # Neighbors 2 3 4 5 6 7 8 Rotational Inv. 2 · 101 5 · 102 3 · 106 7 · 1011 1 · 1036 2 · 1072 1 · 10225 Uniform 2 · 104 1 · 1015 2 · 1041 6 · 1094 2 · 10190 3 · 10346 1 · 10585 Traditional 5 · 102 7 · 1011 8 · 1046 2 · 10179 1 · 10685 3 · 102640 3 · 1010288 2) Learning b+ from a High-dimensional Space: A second option is to map the code space to a new (higher-dimensional) space that characterizes LBP encodings. Then, an ordering or preference relationship can be learned in the extended space, for instance resorting to preference learning algorithms [36]– [38]. Some examples of properties that characterize LBP encodings are: • • B. Deep Binarization Function • From the entire space of binarization functions, we restrict our analysis to those induced by strict partial orders. Within this context, it is easy to see that learning the best binarization function by exhaustive exploration is intractable since the number of combinations equals the number of directed acyclic graph (DAG) with 2|N | = |EN | nodes. The DAG counting problem was studied by Robinson [32] and is given by the recurrence relation Eqs. (6)-(7). • a0 = 1   n X k−1 n an>1 = (−1) 2k(n−k) an−k k (6) (7) k=1 Table I illustrates the size of the search space for several numbers of neighbors. For instance, for the traditional setting with 8 neighbors, the number of combinations has more than 10,000 digits. Thereby, a heuristic approximation must be carried out. 1) Learning b+ from a User-defined dissimilarity function: The definition of a dissimilarity function between two codes seems reasonably accessible. For instance, an immediate option is to adopt the hamming distance between codes, dH . With rotation invariance in mind, one can adopt the minimum hamming distance between all circularly shifted versions of xref and xi , dri H . The circular invariant hamming distance between xref and xi can be computed as dri H = min s∈0,··· ,N −1 dH (ROR(xref , s), xi ) (8) Having defined such a dissimilarity function between pairs of codes, one can know proceed with the definition of the binarization function. Given the dissimilarity function, we can learn a mapping of the codes to an ordered set. Resorting to Spectral Embedding [33], one can obtain such a mapping. The conventional binarization function, Eq. (1), can then be applied. Other alternatives for building the mappings can be found in the manifold learning literature: Isomaps [34], Multidimensional scaling (MDS) [35], among others. In this case, the oracle function can be defined as the intrinsic loss functions used in the optimization process of such algorithms. Preserving a desired property P such as rotational invariance and sign invariance (i.e. interchangeability between ones and zeros) can be achieved by considering P -aware dissimilarities. • Number of transitions of size 1 (e.g. 101, 010). Number of groups/transitions. Size of the smallest/largest group. Diversity on the group sizes. Number of ones. Techniques to learn the final ordering based on the new high-dimensional space include: • • Dimensionality reduction techniques, including Spectral embeddings, PCA, MDS and other manifold techniques. Preference learning strategies for learning rankings [36]– [38]. A case of special interest that will be used in the experimental section of this work are Lexicographic Rankers (LR) [36], [38]. In this work, we will focus on the simplest type of LR, linear LR. Let us assume that features in the new high-dimensional space are scoring rankers (e.g. monotonic functions) on the texture complexity of the codes. Thus, for each code ei and feature sj , the complexity associated to ei by sj is denoted as sj (ei ). We assume sj (ei ) to lie in a discrete domain with a well-known order relation. Thus, each feature is grouping the codes into equivalence classes. For example, the codes with 0 transitions (i.e. flat textures), 2 transitions (i.e. uniform textures) and so on. If we concatenate the output of the scoring rankers in a linear manner (s0 (ei ), s1 (ei ), · · · , sn (ei )), a natural arrangement is their lexicographic order (see Eq. (9)), where each sj (ei ) is subordering the equivalence class obtained by the previous prefix of rankers (s0 (ei ), · · · , sj−1 (ei )).  a=b    a ≺ b LexRank(a, b) =  ab    LexRank(t(a), t(b)) , |a| = 0 ∨ |b| = 0 , a0 ≺ b0 , a0  b0 , a0 = b0 (9) where t(a) returns the tail of the sequence. Namely, the order between two encodings is decided by the first scoring ranker in the hierarchy that assigns different values to the encodings. Therefore, the learning process is reduced to find the best feature arrangement. A heuristic approximation to this problem can be achieved by iteratively appending to the sequence of features the one that maximizes the performance of the oracle Φ. Similarly to property-aware dissimilarity functions, if the features in the new feature vector V(x) are invariant to P , the P -invariance of the learned binarization function is automatically guaranteed. 5 Image LBP LBP-b+ 1 ··· LBP-b+ n Histogram Model Figure 6: Deep LBP. (a) Input image (b) LBP (c) DeepLBP(1) (d) DeepLBP(2) (e) DeepLBP(3) (f) DeepLBP(4) III. D EEP A RCHITECTURES Given the closed form of the LBP with deep binarization functions, their recursive combination seems feasible. In this section, several alternatives for the aggregation of deep LBP operators are proposed. A. Deep LBP (DLBP) The simplest way of aggregating Deep LBP operators is by applying them recursively and computing the final encoding histograms. Figure 6 shows this architecture. The first transformation is done by a traditional shallow LBP while the remaining transformations are performed using deep binarization functions. Figure 7 illustrates the patterns detected by several deep levels on a cracker image from the Brodatz database. In this case, the ordering between LBP encodings was learned by using a lexicographic ordering of encodings on the number of groups, the size of the largest group and imbalance ratio between 0’s and 1’s. We can observe that the initial layers of the architecture extract information from local textures while the later layers have higher levels of abstraction. B. Multi-Deep LBP (MDLBP) Despite it may be a good idea to extract higher-order information from images, for the usual applications of LBP, it is important to be able to detect features at different levels of abstraction. For instance, if the image has textures with several complexity levels, it may be relevant to keep the patterns extracted at different abstraction levels. Resorting to the techniques employed in the analysis of multimodal data [40], we can aggregate this information in two ways: feature and decision-level fusion. 1) Feature-level fusion: one histogram is computed at each layer and the model is built using the concatenation of all the histograms as features. 2) Decision-level fusion: one histogram and decision model is computed at each layer. The final model uses the probabilities estimated by each individual model to produce the final decision. Figures 8a and 8b show Multi-Deep LBP architectures with feature-level and decision-level fusion respectively. In our experimental setting, feature-level fusion was used. Figure 7: Visualization of LBP encodings from a Brodatz database [39] image. The results obtained by applying n layers of Deep LBP operators are denoted as DeepLBP(n). A neighborhood of size 8, radius 10 and Euclidean distance was used. The grayscale intensity is defined by the order of the equivalence classes. Image LBP LBP-b+ 1 Histogram Histogram-1 ... LBP-b+ n Histogram-n .. . Model (a) Multi-Deep LBP with feature-level fusion. Image LBP LBP-b+ 1 Histogram Histogram-1 ... LBP-b+ n Histogram-n .. . Model-0 Model-1 Model Model-n Global Model (b) Multi-Deep LBP with decision-level fusion. Figure 8: Deep LBP architectures. C. Multiscale Deep LBP (Multiscale DLBP) In the last few years, deep learning approaches have benefited from multi-scale architectures that are able to aggregate information from different image scales [41]–[43]. Despite being able to induce higher abstraction levels, deep networks 6 Scale 1 Image Deep LBP1 Scale 2 Image Deep LBP2 .. . ... Image Deep LBPn (a) KTH TIPS (b) FMD (c) Virus (d) Brodatz (e) Kylberg (f) 102 Flowers Model Scale n Figure 9: Multi-scale Deep LBP. Table II: Summary of the datasets used in the experiments Dataset KTH TIPS FMD Virus Brodatz* Kylberg 102 Flowers Caltech 101 Reference [44] [45] [46] [39] [47] [48] [49] Task Texture Texture Texture Texture Texture Object Object Images 810 1000 1500 1776 4480 8189 9144 Classes 10 10 15 111 28 102 102 are restrained to the size of the individual operators. Thereby, aggregating multi-scale information in deep architectures may exploit their capability to detect traits that appear at different scales in the images in addition to turning the decision process scale invariant. In this work, we consider the stacking of independent deep architectures at several scales. The final decision is done by concatenating the individual information produced at each scale factor (cf. Figure 9). Depending on the fusion approach, the final model operates in different spaces (i.e. feature or decision level). In an LBP context, we can define the scale operator of an image by resizing the image or by increasing the neighborhood radius. IV. E XPERIMENTS In this section, we compare the performance of the proposed deep LBP architectures against shallow LBP versions. Several datasets were chosen from the LBP literature covering a wide range of applications, from texture categorization to object recognition. Table II summarizes the datasets used in this work. Also, Fig. 10 shows an image per dataset in order to understand the task diversity. We used a 10-fold stratified cross-validation strategy and the average performance of each method was measured in terms of: • Accuracy. (g) Caltech 101 Figure 10: Sample images from each dataset • Class rank: Position (%) of the ground truth label in the ranking of classes ordered by confidence. The ranking was induced using probabilistic classifiers. While high values are preferred when using accuracy, low values are preferred for class rank. All the images were resized to have a maximum size of 100 × 100 and the neighborhood used for all the LBP operators was formed by 8 neighbors on a radius of size 3, which proved to be a good configuration for the baseline LBP. The final features were built using a global histogram, without resorting to image blocks. Further improvements in each application can be achieved by finetuning the LBP neighborhoods and by using other spatial sampling techniques on the histogram construction. Since the objective of this work was to objectively compare the performance of each strategy, we decided to fix these parameters. The final decision model is a Random Forest with 1000 trees. In the last two datasets, which contain more than 100 classes, the maximum depth of the decision trees was bounded to 20 in order to limit the required memory. In all our experiments, training data was augmented by including vertical and horizontal flips. 7 Table III: Class rank (%) of the ground-truth label and accuracy with single-scale strategies Dataset KTH TIPS FMD Virus Brodatz Kylberg 102 Flowers Caltech 101 Strategy Similarity High Dim LBP Similarity High Dim LBP Similarity High Dim LBP Similarity High Dim LBP Similarity High Dim LBP Similarity High Dim LBP Similarity High Dim LBP Similarity High Dim 1 1.55 26.96 8.08 0.25 0.23 13.46 13.05 - Class Rank Layers 2 3 4 19.18 18.87 18.26 18.64 18.78 18.79 1.60 1.68 1.82 0.94 0.91 1.09 25.77 25.79 25.61 23.20 23.36 23.30 6.61 6.78 6.72 6.65 6.50 6.53 0.22 0.22 0.23 0.21 0.21 0.22 0.18 0.16 0.14 0.07 0.07 0.07 13.34 13.56 13.99 13.10 12.99 13.15 12.37 12.23 12.32 11.98 12.19 12.16 A. Single-scale First, we validated the performance of the proposed deep architectures on single scale settings with increasing number of deep layers. Information from each layer was merged at a feature level by concatenating the layerwise histogram (c.f. Section III-B). Table III summarizes the results of this setting. In all the datasets, the proposed models surpassed the results achieved by traditional LBP. Furthermore, even when the accuracy gains are small, the large gains in terms of class rank suggest that the deep architectures induce more stable models, which assign a high probability on the ground-truth level, even on misclassified cases. For instance, in the Kylberg dataset, a small relative accuracy gain of 3.23% was achieved by the High Dimensional rule, the relative gain on the class rank was 69.56%. With a few exceptions (e.g. JAFFE dataset), the data-driven deep operator based on a high dimensional projection achieved the best performance. Despite the possibility to induce encoding orderings using user-defined similarity functions, the final orderings are static and domain independent. In this sense, more flexible data-driven approaches as the one suggested in Section II-B2 are able to take advantage of the dataset-specific properties. Despite the capability of the proposed deep architectures to achieve large gain margins, the deep LBP operators saturate rapidly. For instance, most of the best results were found on architectures with up to three deep layers. Further research on aggregation techniques to achieve higher levels of abstraction should be conducted. For instance, it would be interesting to explore efficient non-parametric approaches for building encoding orderings that allow more flexible data-driven optimization. 5 18.80 19.10 1.86 1.11 25.59 23.50 6.73 6.55 0.25 0.23 0.14 0.07 14.29 13.32 12.38 12.34 1 89.22 29.20 56.80 89.23 95.29 23.18 39.71 - 2 53.28 53.28 88.96 92.96 28.90 33.40 61.00 61.53 89.73 90.72 96.14 98.37 25.59 24.56 40.35 41.45 Accuracy Layers 3 53.28 53.28 88.57 93.58 30.00 32.60 61.33 61.27 90.23 90.72 96.52 98.35 24.46 23.76 40.07 40.78 4 53.28 53.28 86.99 92.72 30.90 33.30 60.93 61.47 90.50 90.09 96.72 98.26 24.92 22.81 39.74 40.56 5 53.28 53.28 87.97 92.36 30.80 33.00 61.93 62.27 90.36 89.59 96.81 98.24 24.58 22.36 39.81 40.43 B. Multi-Scale A relevant question in this context is if the observed gains are due to the higher abstraction levels of the deep LBP encodings or to the aggregation of information from larger neighborhoods. Namely, when applying a second order operator, the neighbors of the reference pixel include information from their own neighborhood which was initially out of the scope of the local LBP operator. Thereby, we compare the performance of the Deep LBP and multiscale LBP. In order to simplify the model assessment, we fixed the number of layers to 3 in the deep architectures. A scaling factor of 0.5 was used on each layer of the pyramidal multiscale operator. Guided by the results achieved in the single-scale experiments, the deep operator based on the lexicographic sorting of the high-dimensional feature space was used in all cases. Table IV summarizes the results on the multiscale settings. In most cases, all the deep LBP architectures surpassed the performance of the best multiscale shallow architecture. Thereby, the aggregation level achieved by deep LBP operators goes beyond a multiscale analysis, being able to address meta-texture information. Furthermore, when combined with a multiscale approach, deep LBP achieved the best results in all the cases. C. LBPNet Finally, we compare the performance of our deep LBP architecture against the state of the art LBPNet [31]. As referred in the introduction, LBPNet uses LBP encodings at different neighborhood radius and histogram sampling in order to simulate the process of learning a bag of convolutional filters in deep networks. Then, the dimensionality of the descriptors are reduced by means of PCA, resorting to the idea of pooling layers from Convolutional Neural Networks 8 Table IV: Class rank (%) of the ground-truth label and accuracy with multi-scale strategies Dataset KTH TIPS FMD Virus Brodatz Kylberg 102 Flowers Caltech 101 Strategy Shallow Deep Shallow Deep Shallow Deep Shallow Deep Shallow Deep Shallow Deep Shallow Deep Class Rank Scales 1 2 3 1.55 1.17 1.22 0.91 0.79 0.62 26.96 26.31 26.32 23.36 23.54 23.77 8.08 7.51 7.97 6.50 5.92 6.04 0.25 0.20 0.23 0.21 0.13 0.13 0.23 0.13 0.12 0.07 0.05 0.04 13.46 13.10 12.79 12.99 12.68 12.71 12.92 12.46 12.28 12.21 11.74 11.60 Accuracy Scales 1 2 3 89.22 90.94 90.93 93.58 94.21 94.96 29.20 29.60 29.80 32.60 33.20 33.00 56.80 60.60 58.60 61.27 66.13 64.87 89.23 90.77 90.00 90.72 92.97 93.11 95.29 97.34 97.57 98.35 98.84 98.95 23.18 25.10 26.40 23.76 26.02 26.87 40.07 40.84 41.03 40.68 41.67 42.01 Table V: Class rank (%) of the ground-truth label and accuracy Dataset KTH TIPS FMD Virus Brodatz Kylberg (CNN). However, the output of a LBPNet cannot be used by itself in successive calls of the same function. Thereby, it is uncapable of building features with higher expresiveness than the individual operators. In our experiments, we considered the best LBPNet with up to three scales and histogram computations with nonoverlapping histograms that divide the image in 1 × 1, 2 × 2 and 3 × 3 blocks. The number of components kept in the PCA transformation was chosen in order to retain 95% of the variance for most datasets with the exception of 102 Flowers and Caltech, where a value of 99% was chosen due to poor performance of the previous value. A global histogram was used in our deep LBP architecture Table V summarizes the results obtained by multiscale LBP (shallow), LBPNet and our proposed deep LBP. In order to understand if the gains achieved by the LBPNet are due to the overcomplete sampling or to the PCA transformation preceeding the final classifier, we validated the performance of our deep architecture with a PCA transformation on the global descriptor before applying the Random Forest classifier. Despite being able to surpass the performance of our deep LBP without dimensionality reduction, LBPNet did not improve the results obtained by our deep architecture with PCA in most cases. In this sense, even whithout resorting to local descriptors on the histogram sampling, our model was able to achieve the best results within the family of LBP methods. The only exception was observed in the 102 Flowers dataset (see Fig. 10f), where the spatial information can be relevant. It is important to note that our model can also benefit from using spatial sampling of the LBP activations. Moreover, deep learning concepts such as dropout and pooling layers can be introduced within the Deep LBP architectures in a straightforward manner. V. C ONCLUSIONS Local Binary Patterns have achieved competitive performance in several computer vision tasks, being a robust and easy to compute descriptor with high discriminative power on a wide spectrum of tasks. In this work, we proposed Deep Local Binary Patterns, an extension of the traditional LBP that 102 Flowers Caltech 101 Strategy Shallow LBPNet Deep LBP Deep LBP (PCA) Shallow LBPNet Deep LBP Deep LBP (PCA) Shallow LBPNet Deep LBP Deep LBP (PCA) Shallow LBPNet Deep LBP Deep LBP (PCA) Shallow LBPNet Deep LBP Deep LBP (PCA) Shallow LBPNet Deep LBP Deep LBP (PCA) Shallow LBPNet Deep LBP Deep LBP (PCA) Class Rank 1.17 0.43 0.62 0.16 26.31 25.71 23.36 23.20 7.51 7.18 5.92 5.91 0.20 0.20 0.13 0.12 0.12 0.19 0.04 0.02 12.79 9.61 12.68 22.30 12.46 12.11 11.60 10.87 Accuracy 90.94 96.29 94.96 98.39 29.80 30.00 33.20 32.30 60.60 60.73 66.13 65.60 90.77 91.49 93.11 94.46 97.57 95.80 98.95 99.55 26.40 35.56 26.87 8.80 41.03 42.69 42.01 45.14 allow successive applications of the operator. By applying LBP in a recursive way, features with higher level of abstraction are computed that improve the descriptor discriminability. The key aspect of our proposal is the introduction of flexible binarization rules that define an order relation between LBP encodings. This was achieved with two main learning paradigms. First, learning the ordering based on a userdefined encoding similarity metric. Second, allowing the user to describe LBP encodings on a high-dimensional space and learning the ordering on the extended space directly. Both ideas improved the performance of traditional LBP in a diverse set of datasets, covering various applications such as face analysis, texture categorization and object detection. As expected, the paradigm based on a projection to a high-dimensional space achieved the best performance, given its capability of using application specific knowledge in an efficient way. The proposed deep LBP are able to aggregate information from local neighborhoods into higher abstraction levels, being able to surpass the performance obtained by multiscale LBP as well. While the advantages of the proposed approach were demonstrated in the experimental section, further research can be conducted on several areas. For instance, it would be interesting to find the minimal properties of interest that should be guaranteed by the binarization function. In this work, since we are dealing with intensity-based image, we restricted our analysis to partial orderings. However, under the presence of other types of data such as directional (i.e. periodic, angular) data, cycling or local orderings could be more suitable. In the most extreme case, the binarization function may be arbitrarily complex without being restricted to strict orders. On the other hand, constraining the shape of the binarization 9 function allows more efficient ways to find suitable candidates. In this sense, it is relevant to explore ways to improve the performance of the similarity-based deep LBP. Two possible options would be to refine the final embedding by using training data and allowing the user to specify incomplete similarity information. In this work, each layer was learned in a local fashion, without space for further refinement. While this idea was commonly used in the deep learning community when training stacked networks, later improvements take advantage of refining locally trained architectures [50]. Therefore, we plan to explore global optimization techniques to refine the layerwise binarization functions. Deep learning imposed a new era in computer vision and machine learning, achieving outstanding results on applications where previous state-of-the-art methods performed poorly. While the foundations of deep learning rely on very simple image processing operators, relevant properties held by traditional methods, such as illumination and rotational invariance, are not guaranteed. Moreover, the amount of data required to learn competitive deep models from scratch is usually prohibitive. Thereby, it is relevant to explore the path into a unification of traditional and deep learning concepts. In this work, we explored this idea within the context of Local Binary Patterns. The extension of deep concepts to other traditional methods is of great interest in order to rekindle the most fundamental concepts of computer vision to the research community. ACKNOWLEDGMENT This work was funded by the Project “NanoSTIMA: Macroto-Nano Human Sensing: Towards Integrated Multimodal Health Monitoring and Analytics/- NORTE-01-0145-FEDER000016” financed by the North Portugal Regional Op-erational Programme (NORTE 2020), under the PORTUGAL 2020 Partnership Agreement, and through the European Regional Development Fund (ERDF), and also by Fundação para a Ciência e a Tecnologia (FCT) within PhD grant number SFRH/BD/93012/2013. R EFERENCES [1] J. Xie, L. Xu, and E. Chen, “Image denoising and inpainting with deep neural networks,” in Advances in Neural Information Processing Systems, 2012, pp. 341–349. [2] B. Zhou, A. Lapedriza, J. Xiao, A. Torralba, and A. Oliva, “Learning deep features for scene recognition using places database,” in Advances in neural information processing systems, 2014, pp. 487–495. [3] Y. Cho and L. K. Saul, “Kernel methods for deep learning,” in Advances in neural information processing systems, 2009, pp. 342–350. [4] T. Ojala, M. Pietikäinen, and T. Mäenpää, “Gray scale and rotation invariant texture classification with local binary patterns,” in European Conference on Computer Vision. Springer, 2000, pp. 404–420. [5] T. Ojala, M. Pietikainen, and T. Maenpaa, “Multiresolution gray-scale and rotation invariant texture classification with local binary patterns,” IEEE Transactions on pattern analysis and machine intelligence, vol. 24, no. 7, pp. 971–987, 2002. [6] L. Liu, L. Zhao, Y. Long, G. Kuang, and P. Fieguth, “Extended local binary patterns for texture classification,” Image and Vision Computing, vol. 30, no. 2, pp. 86–99, 2012. [7] Y. Zhao, W. Jia, R.-X. Hu, and H. Min, “Completed robust local binary pattern for texture classification,” Neurocomputing, vol. 106, pp. 68–76, 2013. [8] Z. Guo, L. Zhang, and D. Zhang, “Rotation invariant texture classification using lbp variance (lbpv) with global matching,” Pattern recognition, vol. 43, no. 3, pp. 706–719, 2010. [9] ——, “A completed modeling of local binary pattern operator for texture classification,” IEEE Transactions on Image Processing, vol. 19, no. 6, pp. 1657–1663, 2010. [10] G. Zhao and M. Pietikainen, “Dynamic texture recognition using local binary patterns with an application to facial expressions,” IEEE transactions on pattern analysis and machine intelligence, vol. 29, no. 6, 2007. [11] T. Ahonen, A. Hadid, and M. Pietikäinen, “Face recognition with local binary patterns,” in European conference on computer vision. Springer, 2004, pp. 469–481. [12] B. Zhang, Y. Gao, S. Zhao, and J. Liu, “Local derivative pattern versus local binary pattern: face recognition with high-order local pattern descriptor,” IEEE transactions on image processing, vol. 19, no. 2, pp. 533–544, 2010. [13] J. Ren, X. Jiang, and J. Yuan, “Noise-resistant local binary pattern with an embedded error-correction mechanism,” IEEE Transactions on Image Processing, vol. 22, no. 10, pp. 4049–4060, 2013. [14] C. Shan, “Learning local binary patterns for gender classification on real-world face images,” Pattern Recognition Letters, vol. 33, no. 4, pp. 431–437, 2012. [15] D. Huang, C. Shan, M. Ardabilian, Y. Wang, and L. Chen, “Local binary patterns and its application to facial image analysis: a survey,” IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), vol. 41, no. 6, pp. 765–781, 2011. [16] L. Yeffet and L. Wolf, “Local trinary patterns for human action recognition,” in Computer Vision, 2009 IEEE 12th International Conference on. IEEE, 2009, pp. 492–497. [17] L. Nanni, A. Lumini, and S. Brahnam, “Local binary patterns variants as texture descriptors for medical image analysis,” Artificial intelligence in medicine, vol. 49, no. 2, pp. 117–125, 2010. [18] T. Xu, E. Kim, and X. Huang, “Adjustable adaboost classifier and pyramid features for image-based cervical cancer diagnosis,” in Biomedical Imaging (ISBI), 2015 IEEE 12th International Symposium on. IEEE, 2015, pp. 281–285. [19] O. Barkan, J. Weill, L. Wolf, and H. Aronowitz, “Fast high dimensional vector multiplication face recognition,” in Proceedings of the IEEE International Conference on Computer Vision, 2013, pp. 1960–1967. [20] M. Heikkilä, M. Pietikäinen, and C. Schmid, “Description of interest regions with center-symmetric local binary patterns,” in Computer vision, graphics and image processing. Springer, 2006, pp. 58–69. [21] J. Trefnỳ and J. Matas, “Extended set of local binary patterns for rapid object detection,” in Computer Vision Winter Workshop, 2010, pp. 1–7. [22] G. Xue, L. Song, J. Sun, and M. Wu, “Hybrid center-symmetric local pattern for dynamic background subtraction,” in Multimedia and Expo (ICME), 2011 IEEE International Conference on. IEEE, 2011, pp. 1–6. [23] C. Silva, T. Bouwmans, and C. Frélicot, “An extended center-symmetric local binary pattern for background modeling and subtraction in videos,” in International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, VISAPP 2015, 2015. [24] J. Y. Choi, K. N. Plataniotis, and Y. M. Ro, “Using colour local binary pattern features for face recognition,” in Image Processing (ICIP), 2010 17th IEEE International Conference on. IEEE, 2010, pp. 4541–4544. [25] C. Zhu, C.-E. Bichot, and L. Chen, “Multi-scale color local binary patterns for visual object classes recognition,” in Pattern Recognition (ICPR), 2010 20th International Conference on. IEEE, 2010, pp. 3065– 3068. [26] S. Zhang, H. Yao, and S. Liu, “Dynamic background modeling and subtraction using spatio-temporal local binary patterns,” in Image Processing, 2008. ICIP 2008. 15th IEEE International Conference on. IEEE, 2008, pp. 1556–1559. [27] G. Xue, J. Sun, and L. Song, “Dynamic background subtraction based on spatial extended center-symmetric local binary pattern,” in Multimedia and Expo (ICME), 2010 IEEE International Conference on. IEEE, 2010, pp. 1050–1054. [28] J. Yang, S. Wang, Z. Lei, Y. Zhao, and S. Z. Li, “Spatio-temporal lbp based moving object segmentation in compressed domain,” in Advanced Video and Signal-Based Surveillance (AVSS), 2012 IEEE Ninth International Conference on. IEEE, 2012, pp. 252–257. [29] H. Yin, H. Yang, H. Su, and C. Zhang, “Dynamic background subtraction based on appearance and motion pattern,” in Multimedia and Expo Workshops (ICMEW), 2013 IEEE International Conference on. IEEE, 2013, pp. 1–6. 10 [30] S. H. Davarpanah, F. Khalid, L. N. Abdullah, and M. Golchin, “A texture descriptor: Background local binary pattern (bglbp),” Multimedia Tools and Applications, vol. 75, no. 11, pp. 6549–6568, 2016. [31] M. Xi, L. Chen, D. Polajnar, and W. Tong, “Local binary pattern network: a deep learning approach for face recognition,” in Image Processing (ICIP), 2016 IEEE International Conference on. IEEE, 2016, pp. 3224–3228. [32] R. W. Robinson, “Counting unlabeled acyclic digraphs,” in Combinatorial mathematics V. Springer, 1977, pp. 28–43. [33] A. Y. Ng, M. I. Jordan, Y. Weiss et al., “On spectral clustering: Analysis and an algorithm,” in NIPS, vol. 14, no. 2, 2001, pp. 849–856. [34] J. B. Tenenbaum, V. De Silva, and J. C. Langford, “A global geometric framework for nonlinear dimensionality reduction,” science, vol. 290, no. 5500, pp. 2319–2323, 2000. [35] J. B. Kruskal, “Nonmetric multidimensional scaling: a numerical method,” Psychometrika, vol. 29, no. 2, pp. 115–129, 1964. [36] K. Fernandes, J. S. Cardoso, and H. Palacios, “Learning and ensembling lexicographic preference trees with multiple kernels,” in Neural Networks (IJCNN), 2016 International Joint Conference on. IEEE, 2016, pp. 2140–2147. [37] T. Joachims, “Optimizing search engines using clickthrough data,” in Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2002, pp. 133–142. [38] P. Flach and E. T. Matsubara, “A simple lexicographic ranker and probability estimator,” in European Conference on Machine Learning. Springer, 2007, pp. 575–582. [39] P. Brodatz, Textures: a photographic album for artists and designers. Dover Pubns, 1966. [40] A. Kapoor and R. W. Picard, “Multimodal affect recognition in learning environments,” in Proceedings of the 13th annual ACM international conference on Multimedia. ACM, 2005, pp. 677–682. [41] D. Eigen, C. Puhrsch, and R. Fergus, “Depth map prediction from a single image using a multi-scale deep network,” in Advances in neural information processing systems, 2014, pp. 2366–2374. [42] N. Neverova, C. Wolf, G. W. Taylor, and F. Nebout, “Multi-scale deep learning for gesture detection and localization,” in Workshop at the European Conference on Computer Vision. Springer, 2014, pp. 474– 490. [43] J. Wang, Y. Song, T. Leung, C. Rosenberg, J. Wang, J. Philbin, B. Chen, and Y. Wu, “Learning fine-grained image similarity with deep ranking,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014, pp. 1386–1393. [44] E. Hayman, B. Caputo, M. Fritz, and J.-O. Eklundh, “On the significance of real-world conditions for material classification,” in European conference on computer vision. Springer, 2004, pp. 253–266. [45] L. Sharan, R. Rosenholtz, and E. Adelson, “Material perception: What can you see in a brief glance?” Journal of Vision, vol. 9, no. 8, pp. 784–784, 2009. [46] C. San Martin and S.-W. Kim, Eds., Virus Texture Analysis Using Local Binary Patterns and Radial Density Profiles, ser. Lecture Notes in Computer Science, vol. 7042. Springer Berlin / Heidelberg, 2011. [47] G. Kylberg, “The kylberg texture dataset v. 1.0,” Centre for Image Analysis, Swedish University of Agricultural Sciences and Uppsala University, Uppsala, Sweden, External report (Blue series) 35, September 2011. [Online]. Available: http://www.cb.uu.se/∼gustaf/ texture/ [48] M.-E. Nilsback and A. Zisserman, “Automated flower classification over a large number of classes,” in Proceedings of the Indian Conference on Computer Vision, Graphics and Image Processing, Dec 2008. [49] 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. [50] M. Norouzi, M. Ranjbar, and G. Mori, “Stacks of convolutional restricted boltzmann machines for shift-invariant feature learning,” in Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009, pp. 2735–2742.
1cs.CV
1 Unequal Error Protection Querying Policies for the Noisy 20 Questions Problem Hye Won Chung, Brian M. Sadler, Lizhong Zheng and Alfred O. Hero arXiv:1606.09233v2 [cs.IT] 28 Sep 2017 Abstract In this paper, we propose an open-loop unequal-error-protection querying policy based on superposition coding for the noisy 20 questions problem. In this problem, a player wishes to successively refine an estimate of the value of a continuous random variable by posing binary queries and receiving noisy responses. When the queries are designed non-adaptively as a single block and the noisy responses are modeled as the output of a binary symmetric channel the 20 questions problem can be mapped to an equivalent problem of channel coding with unequal error protection (UEP). A new non-adaptive querying strategy based on UEP superposition coding is introduced whose estimation error decreases with an exponential rate of convergence that is significantly better than that of the UEP repetition coding introduced by Variani et al., [2]. With the proposed querying strategy, the rate of exponential decrease in the number of queries matches the rate of a closed-loop adaptive scheme where queries are sequentially designed with the benefit of feedback. Furthermore, the achievable error exponent is significantly better than that of random block codes employing equal error protection. Index Terms Noisy 20 questions problem, estimation, superposition coding, unequal error protection, error exponents. I. I NTRODUCTION Consider a noisy 20 questions game between a player and an oracle. The objective of the player is to estimate the value of a continuous target variable X ∼ unif[0, 1]. The player asks binary queries to the oracle who knows the value of X, and receives a noisy version of the oracle’s correct answers transmitted through a binary symmetric channel with flipping probability  ∈ (0, 1/2), denoted BSC(). The central question addressed here is: What is the optimal sequence of queries to estimate the value of X with a minimum estimation error at a fixed number of querying? This general setup of noisy 20 questions game and the optimal query design problem is of broad interest, arising in various areas, including active learning [3], [4], optimal sensing [5] and experimental design [6], [7], with diverse applications. For example, a target localization problem in a sensor network [8] can be modeled as a noisy 20 questions game where a player (agency) aims to locate a target by receiving query responses from sensors probing the region of interest. The problem of optimal query design for the noisy 20 questions game can be categorized into two main approaches, adaptive vs. non-adaptive designs. In each approach, the sequence of queries is designed by a controller that may either use feedback (adaptive 20 questions) or operate open-loop (non-adaptive 20 questions) to formulate the sequence of questions. For the adaptive case, the controller uses noisy answers to previous questions to determine the next question posed to the oracle. For the non-adaptive case, on the other hand, the controller designs the sequence of queries ahead of time without access to future answers of the oracle. In general, the use of feedback in the adaptive design provides an information advantage, allowing a better error rate of convergence, but at the cost of higher query design complexity and the need for a feedback channel. Previous studies on optimal query design for the noisy 20 questions problem often sought to design queries that acquire observations minimizing the posterior uncertainty of the target variable, where uncertainty was quantified by the Shannon entropy [9], [3], [10], [8]. In these works, the utility of observation is quantified by the expected reduction of the entropy due to the observation. This reduction is equivalent to the increase in mutual information between the target variable and the observation. For adaptive sequential querying, greedy successive-entropy-minimization policies [10], [11] have been extensively investigated. When the mutual information is used to quantify the utility of observations, any two observations that increase the mutual information by the same amount are considered to be equally valuable, regardless of how much these observations reduce the estimation error. However, when estimation accuracy is important, queries maximizing the mutual information may not generate observations of equal importance. For example, when the queries are on the coefficients in the dyadic expansion of a target variable X the queries on the most significant bits (MSBs) of X may acquire more valuable observation than those on the least significant bits (LSBs) in terms of reducing the estimation error. For estimation of X, the important question is then how to design queries that acquire observations valuable in reducing the estimation error. In the noisy 20 questions game, estimates on the coefficients in dyadic expansion of the target variable, which are based on the received noisy answers from the oracle, may contain errors. Since the errors in MSBs cause a higher estimation error Hye Won Chung ([email protected]) is with the School of Electrical Engineering at KAIST in South Korea. Brian M. Sadler ([email protected]) is with the US Army Research Laboratory. Lizhong Zheng ([email protected]) is with the EECS department at MIT. Alfred O. Hero ([email protected]) is with the EECS department at the University of Michigan. This research was supported in part by ARO grants W911NF-111-0391 and W911NF-15-1-0479. This research was presented in part at 2016 IEEE International Symposium on Information Theory in Barcelona, Spain [1]. 2 than do the errors in LSBs, it is desirable to provide unequal error protection (UEP) for MSBs vs. LSBs in order to minimize the estimation error with a limited number of queries. In this paper, we provide such a non-adaptive UEP querying policy for state estimation in the context of the noisy 20 questions problem. To develop the UEP querying policy, we exploit a close connection between the problem of optimal query design in the noisy 20 questions problem and the problem of channel coding for the classical information-transmission problem. Let M = {0, . . . , 2k − 1} denote the set of 2k possible states of the target variable X, determined by the first k bits in its dyadic expansion. A binary query partitions the set M into two disjoint subsets, one of which contains the true state of X. For adaptive sequential querying, the partition is random, depending on the answers to the previous queries, whereas for non-adaptive querying, the partition is deterministic and determined in advance. By considering the true state of the target variable as a message transmitted from the oracle to the player and the oracle’s binary answer bits to the sequence of queries as a codeword, the query design problem can be mapped to an equivalent problem of channel coding. Specifically, the query design problem reduces to the channel coding with feedback for the adaptive case and to channel coding without feedback for the non-adaptive case. The equivalence between the query design problem and the channel-coding problem allows us to apply UEP channel coding methods to design a UEP querying strategy. Unequal-error-protection querying accounts for the fact that for estimation of a target variable, the errors in the most significant bits (MSBs) are much more costly than the errors in the least significant bits (LSBs). One way to provide unequal error protection is repetition coding. In repetition coding, each bit is repeatedly transmitted multiple times, the number of repetitions varying in accordance with the desired level of unequal error protection. Such a UEP repetition coding approach to the noisy 20 questions√problem was considered in [2]. It was shown that the mean squared error (MSE) of this approach decreases exponentially in N where N is the number of queries. The square root of N rate is smaller than the linear in N exponential rate of decrease achievable by the bisection-based adaptive 20 questions strategy [12] that corresponds to Horstein’s coding scheme for a BSC() with perfect feedback [13]. The main contribution of this paper is to provide a new non-adaptive querying strategy based on superposition coding [14] that can provide UEP and achieve better MSE convergence rate than that of repetition coding in [2]. The proposed superposition coding strategy provides UEP for two levels of priority, i.e., a strictly better error protection for MSBs than that√for LSBs. We show that the proposed querying strategy achieves the MSE that decreases exponentially in N , as contrasted to N , matching the error rate of the adaptive 20 questions strategy [12]. Furthermore, this strategy achieves a better scale factor in the MSE exponent as compared to that of random block codes employing equal error protection. The rest of this paper is organized as follows. In Section II, we review the mathematical formulation for the noisy 20 questions problem for state estimation. We highlight the connection between the query design and the channel-coding problems both for adaptive sequential querying and for non-adaptive block querying. For query performance measures, the MSE and quantized MSE are considered. The different importances of the first k bits in the dyadic expansion of the target variable are quantified for these performance measures. In Section III, we review three well-known querying policies including the adaptive bisection policy [13], non-adaptive UEP repetition policy [2], and non-adaptive block querying based on random block coding [15]. In Sections III-A, we show that the bisection policy is the optimal myopic policy among successive-entropy-minimization policies in reducing the minimum MSE of the target variable (Proposition 1). In Sections III-B and III-C, two representative non-adaptive policies are presented and compared in terms of UEP property and coding gain. We introduce a new non-adaptive querying policy based on superposition coding in Section IV. We show that block querying based on superposition coding provides higher level of error protection for MSBs than for LSBs. We then establish that the proposed non-adaptive block querying strategy achieves a better quantized-MSE exponent (Theorem 1) and better MSE exponent (Corollary 1) than those of random block coding. In Section V, performance of all four policies discussed in this paper are compared by analyzing the achievable error rates of convergence for the estimation errors in the number N of queries. Finally, conclusions and future directions are discussed in Section VI. After presenting each result, we provide a brief discussion but defer the technical details of the proofs to the Appendices. A. Notations Capital letters will represent random variables and lower case letters will represent specific realizations of those random variables. The statistical expectation operator and the indicator operator will be denoted by E[] and 1(), respectively. For a continuous R random variable X distributed as p(x), x ∈ R, the differential entropy h(X) is defined as h(X) = −Pp(x) ln p(x)dx. For a discrete random variable Y with distribution p(y), y ∈ Y, the entropy H(Y ) is defined as H(Y ) = − y∈Y p(y) ln p(y). The entropy of a binary random variable Z distributed as Bernoulli(α), 0 ≤ α ≤ 1, is denoted HB (a) = −a ln a − (1 − a) ln(1 − a). The Kullback-Leibler divergence between two Bernoulli distributions Bernoulli(α) and Bernoulli(β) is denoted DB (αkβ) := 1−α α ln α β + (1 − α) ln 1−β . The star ∗ operator is defined as α ∗  := α(1 − ) + (1 − α) for α,  ∈ R. The normalized Gilbert-Varshamov distance γGV (R) ∈ [0, 1/2] is the value γGV (R) that gives DB (γGV (R)k1/2) = R. The −1 inverse of the normalized Gilbert-Varshamov distance is denoted γGV (α) for 0 ≤ α ≤ 1/2. N Bold face z or z1 denotes the length-N binary sequence (z1 z2 . . . zN ) where zt is the t-th bit of z. The Hamming weight of z is equal to the cardinality of the set {t ∈ [1 : N ] : zt = 1} and is denoted as wH (z). The bit-wise XOR operation is symbolized 3 encoder w/ feedback X oracle Qi controller Zi channel pY |Z Yi player X̂N Y1i−1 <adaptive sequential querying> encoder w/o feedback X oracle Z1N QN 1 N channel Y1 pY |Z player X̂N controller <non-adaptive block querying> Fig. 1. Noisy 20 questions problem between an oracle and a player over a BSC(). The controller generates questions using feedback (adaptive sequential querying) or operating open-loop (non-adaptive block querying). For adaptive sequential querying, the controller generates queries Qi adaptively based on past answers Y1i−1 , whereas for non-adaptive block querying the controller generates a length-N block of queries QN 1 = (Q1 , . . . , QN ) non-adaptively as a single block. The oracle gives the correct answer Zi to the query Qi about the target variable X. The player receives a noisy version Yi of the oracle’s answer Zi transmitted through a BSC(), and outputs an estimate X̂N based on the received answers Y1N = (Y1 , . . . , YN ). by ⊕ and the bit-wise XOR of two binary sequences x and y is written as x ⊕ y. The Hamming distance between two binary sequences x and y is the cardinality of the set {t ∈ [1 : N ] : xt 6= yt } and is denoted as dH (x, y) := |{t ∈ [1 : N ] : xt 6= yt }|. . ˙ . Nd ˙ N d denotes ˙ as follows: 1) aN = We will use the notation =, ≤, and ≥ e denotes d = lim inf N →∞ lnNaN . 2) aN ≤e ln aN ln aN Nd ˙ denotes d ≤ lim inf N →∞ N . d ≥ lim inf N →∞ N . 3) aN ≥e II. P ROBLEM S TATEMENT: N OISY 20 Q UESTIONS FOR E STIMATION OF A TARGET VARIABLE We consider an estimation problem for a target variable in the context of a noisy 20 questions game between a player and an oracle who communicate over a channel. The objective of the player is to estimate the value of a target variable, X ∼ unif[0, 1] by posing a sequence of binary queries to the oracle and receiving noisy answers. To estimate X, the player asks the oracle whether X is located within some sub-region Q ⊂ [0, 1], which may be connected or non-connected, and receives a noisy binary answer Y ∈ {0, 1} based on the correct answer Z(X) = 1(X ∈ Q) with error probability  ∈ [0, 1/2). The oracle always provides a correct binary answer Z(X) = 1(X ∈ Q) to the player’s query. The channel through which the oracle’s binary answer is transmitted to the player is modeled as a binary symmetric channel, BSC(). The player asks a sequence of N questions in the form of a sequence of querying regions (Q1 , Q2 , . . . , QN ). The oracle provides correct answers (Z1 , Z2 , . . . , ZN ) to the queries about the target variable X, and the player receives a noisy version (Y1 , Y2 , . . . YN ) of the oracle’s answers transmitted through N uses of the BSC(). Based on these answers, the player calculates an estimate X̂N of X. For a given cost function c(x, x̂N ) between the true value x and the estimate x̂N , the player’s goal is to find the optimal sequence of querying regions (Q1 , Q2 , . . . , QN ) and the estimator X̂N (Y1 , . . . , YN ) that minimize the expected cost function. That is, the player aims to achieve min (Q1 ,Q2 ,...,QN ),X̂N (·) E[c(X, X̂N )] (1) where the expectation is taken over the joint distribution of (X, Y1 , Y2 , . . . , YN ). Note that the joint distribution of (X, Y1 , Y2 , . . . , YN ) depends on the querying regions (Q1 , Q2 , . . . , QN ). The sequence of questions is designed by a controller that may either use feedback (adaptive sequential querying) or operate open-loop (non-adaptive block querying) as depicted in Fig. 1. Depending on whether the questions are designed with or without the benefit of feedback, the optimal querying strategy and the corresponding performance can vary. In the next section, we highlight differences between adaptive sequential querying and non-adaptive block querying and show a connection between the noisy 20 questions problem and the channel-coding problem. A. Adaptive vs. Non-adaptive Querying Strategies and Associated Channel-Coding Problems In the adaptive case, the i-th querying region Qi can be updated based on past answers Y1i−1 := (Y1 , . . . , Yi−1 ) to previous queries. For this case, the controller uses the updated posterior distribution p(x|y1i−1 ) of X to design the next query, i.e., the 4 region Qi . For example, consider the case when the i-th querying region Qi is designed to equalize the probabilities of X belonging to Qi and of X not belonging to Qi , respectively, for given collected answers Y1i−1 = y1i−1 : Pr(X ∈ Qi |Y1i−1 = y1i−1 ) = Pr(X ∈ / Qi |Y1i−1 = y1i−1 ) = 1/2. (2) Since the channel input (the oracle’s binary answer) Zi (X) is an indicator random variable of the event {X ∈ Qi }, for the choice of Qi satisfying (2) the corresponding channel input Zi follows the distribution Pr(Zi = 0|Y1i−1 = y1i−1 ) = Pr(Zi = 1|Y1i−1 = y1i−1 ) = 1/2, (3) which is an optimal input distribution for the BSC() in maximizing the mutual information. Specifically, the corresponding mutual information between the oracle’s i-th binary answer Zi and the channel output Yi given previous answers Y1i−1 = y1i−1 is I(Zi ; Yi |Y1i−1 = y1i−1 ) = C (4) where C := ln 2 − (− ln  − (1 − ) ln(1 − )). (5) To summarize, in adaptive sequential querying the channel input Zi (X) = 1(X ∈ Qi ) depends on the previous channel outputs Y1i−1 , since the querying region Qi depends on Y1i−1 . As depicted in the upper figure of Fig. 1, the combined operation of the controller and the oracle can be thought of as an encoder in a feedback communication system. Therefore, there is a one-to-one mapping between designing an adaptive sequential-querying strategy and designing a sequential channel encoder with noiseless feedback. In the non-adaptive case the querying regions QN 1 := (Q1 , . . . , QN ) are specified in advance, before observing any of the answers from the oracle. Assume that the controller generates queries on the first k bits in the dyadic expansion of X ≈ 0.B1 . . . Bk , Bi ∈ {0, 1} for i = 1, . . . , k. The resolution Pk parameter k may depend on the number of queries N . Discovering (B1 , . . . , Bk ) is equivalent to finding the index M = i=1 Bi 2k−i ∈ {0, . . . , 2k −1} of the interval IM := [M 2−k , (M +1)2−k ) that contains X. Here the domain [0, 1] of X is uniformly quantized into 2k disjoint sub-intervals {I0 , . . . , I2k −1 } of length 2−k . If the oracle’s answer Zi to the question Qi can be transmitted to the player without noise, i.e.,  = 0, then by querying each coefficient of the dyadic expansion of X from the MSB to the LSB, the player can discover the N most significant bits (B1 , . . . , BN ) of X without error. However, in the case of a noisy channel, the player needs to ask redundant questions in order to accurately estimate the k most significant bits of X for some k < N . Non-adaptive block querying can be mapped to an equivalent problem of length-N block channel coding over a BSC(). The rate of the block code is defined as R = (k ln 2)/N (nats/channel use) for the resolution of k bits of X. Designing a block of questions (Q1 , . . . , QN ) to discover the index M of the sub-interval IM containing X can be thought of as designing a length-N and rate-R block code, or, more specifically, defining an encoding map f : {0, . . . , 2k − 1} → {0, 1}N , to reliably transmit one of the 2k messages through N uses of the channel with channel coding rate R = (k ln 2)/N . A block of questions specifies the encoding map f : {1, . . . , 2k } → {0, 1}N , and vice versa. The one-to-one mapping between the two is described as follows. Define sub-intervals Im := [m2−k , (m + 1)2−k ) for m ∈ {0, . . . , 2k − 1}. We restrict the querying region Qi to be the union of a subset of the quantized intervals {I0 , . . . , I2k −1 }. In other words, we fix the (m) (m) (m) maximum resolution of the querying interval as 2−k . Let zi denote the i-th bit of the codeword f (m) = (z1 , . . . , zN ) (m) for a message m given an encoding map f : {0, . . . , 2k − 1} → {0, 1}N . Note that the bit zi is the oracle’s binary answer (m) to the query Qi indicating whether x ∈ Qi when x ∈ Im . Therefore, the bit zi equals 1 if and only if Im ⊂ Qi , i.e., (m) zi = 1(Im ⊂ Qi ). (6) On the other hand, when the encoding map f (·) is specified, the associated i-th querying region Qi becomes the union of the (m0 ) sub-intervals {Im0 } for message m0 ’s such that the i-th answer bit zi equals 1, i.e., [ Qi = Im0 . (7) (m0 ) {m0 :zi =1} Given the block of questions (Q1 , . . . , QN ), for an index m such that x ∈ Im the oracle transmits the corresponding length-N binary answer bits f (m) through N uses of the BSC(), and the player tries to decode the message m given a noisy version of the codeword. Thus both adaptive sequential querying and non-adaptive block querying can be mapped to associated channel-coding problems in information transmission through a noisy channel, with and without feedback, respectively. However, different from information-transmission problems where the goal is to achieve reliable communications at some positive rate 0 < R ≤ C for capacity C of the channel, the objective of the noisy 20 questions problem for state estimation is to minimize estimation error E[c(X, X̂N )]. In the next section, we introduce two different types of estimation errors that will be considered in this paper and discuss what kind of properties are desired for channel coding to minimize these estimation errors. 5 X̂N | > 2 1(|X k /2) |X X̂N |2 cq (X, X̂N ) X X̂N Fig. 2. Plot of three different cost functions: |X − X̂N |2 for the MSE, cq (X, X̂N ) for the quantized MSE and 1(M̂ 6= M ) = 1(|X − X̂N | > 2−k /2) for the block-decoding-error probability when the resolution parameter k = 3. B. Estimation Errors: Mean Squared Error and Quantized Mean Squared Error We consider two types of estimation errors. The first is the mean squared error (MSE) E[|X − X̂N |2 ] where X̂N is the estimate of X after N queries. The second is the quantized MSE E[cq (X, X̂N )] where the quantized cost function cq (X, X̂N ) with 2k levels is a stepwise function defined as cq (X, X̂N ) = (d2−k )2 , when 2−k 2−k < |X − X̂N | ≤ d2−k + , 2 2 for d ∈ {0, . . . , 2k − 1}, d2−k − (8) for X, X̂N ∈ [0, 1]. We consider this cost function when the objective of the problem is to estimate the value of X up to the first k bits (B1 , . . . , Bk ) in the dyadic expansion of X. Let (B̂1 , . . . , B̂k ) denote the estimate of (B1 , . . . , Bk ) and let M̂ = k X B̂i 2k−i (9) i=1 denote the estimate of the message M = as Pk i=1 Bi 2k−i . We define the decoding-error distance d(M, M̂ ) between M and M̂ d(M, M̂ ) := |M − M̂ | = k X i=1 (Bi − B̂i )2k−i . (10) By defining the finite-resolution estimator X̂N,finite as X̂N,finite := M̂ 2−k + 2−k /2, (11) the quantized MSE cq (X, X̂N ) with X̂N = X̂N,finite can be written in terms of the decoding-error distance as cq (X, X̂N,finite ) = 2−2k (d(M, M̂ ))2 . (12) Note that the quantized MSE equals 0 when the player correctly decodes the message M . The error increases proportionally to the square of the decoding-error distance. On the other hand, in information-transmission problems where the cost function is 1(M̂ 6= M ), decoding error is claimed when M̂ 6= M , i.e., when d(M, M̂ ) 6= 0, and the cost of incorrect decoding is the same for every M̂ 6= M regardless of the decoding-error distance d(M, M̂ ). This difference in the cost functions makes the desired channel-coding strategy for state-estimation problem different from that of the information-transmission problem. Fig. 2 shows the three different cost functions, |X − X̂N |2 for the MSE, cq (X, X̂N ) for the quantized MSE and 1(M̂ 6= M ) = 1(|X − X̂N | > 2−k /2) for the block-decoding-error probability when the resolution parameter k = 3. The quantized MSE E[cq (X, X̂N )] approximates the MSE E[|X − X̂N |2 ]. In particular, with the finite-resolution estimator X̂N = X̂N,finite , the MSE E[|X − X̂N,finite |2 ] can be written as a sum of the quantized MSE E[cq (X, X̂N,finite )] and the error from finite resolution, E[|X − X̂N,finite |2 ] = E[cq (X, X̂N,finite )] + c2−2k , (13) 6 for some constant 0 < c ≤ 1/4. This can be shown by writing the difference between the two expected errors as a sum of errors conditioned on the decoding-error distance d(M, M̂ ) = d for d ∈ {0, . . . , 2k − 1}, E[|X − X̂N,finite |2 ] − E[cq (X, X̂N,finite )] = k 2X −1  Pr(d(M, M̂ ) = d)E d=0 h |X − X̂N,finite |2 − d2 2−2k  d(M, M̂ ) = d i . (14) For d = 0, the conditional expectation in (14) is bounded above by 2−2k /4. Given that X ∼ unif[0, 1], conditioned on d(M, M̂ ) = d for d ∈ {1, . . . , 2k − 1}, |X − X̂N,finite | is uniformly distributed over [d2−k − 2−k /2, d2−k + 2−k /2). Thus i  h 1 −2k E |X − X̂N,finite |2 − d2 2−2k d(M, M̂ ) = d = 2 . (15) 12 Therefore, the difference between the MSE and quantized MSE is bounded above by a scale factor of 2−2k as in (13). Consider the case when the resolution k bits of the estimator X̂N,finite increases linearly in the number of queries N as ∗ ∗ k = N R/ ln 2 for some fixed positive rate R > 0. Let EMSE,policy (R) and Eq,policy (R) denote the best achievable exponentially decreasing rates of the MSE and of the quantized MSE in N at a fixed rate R, respectively, for some policy, i.e., − ln E[|X − X̂N,finite |2 ] , N →∞ N − ln E[cq (X, X̂N,finite )] ∗ . Eq,policy (R) := lim inf N →∞ N ∗ EMSE,policy (R) := lim inf (16) (17) Then the equality in (13) implies that for large N , the exponential convergence rate of the MSE E[|X − X̂N,finite |2 ] in N is dominated by the minimum between the exponentially decreasing rate of the quantized MSE and 2R, i.e., ∗ ∗ EMSE,policy (R) = min{Eq,policy (R), 2R}. (18) ∗ Eq,policy (R) For sufficiently large R > 0 where ≤ 2R, the MSE exponent is identical to the quantized-MSE exponent. In this ∗ paper, we analyze performance of a querying policy by first calculating the best achievable quantized-MSE exponent Eq,policy (R) at a fixed rate R > 0 for querying resolution of k = N R/ ln 2 bits. Once the quantized-MSE exponent is calculated for every R > 0, by using (18) we calculate the resulting MSE exponent. We next show how the MSE and the quantized MSE can be bounded below and above in terms of the block-decoding-error events {M̂ 6= M } or bit-decoding-error events {B̂i 6= Bi }, i ∈ {1, . . . , k}. The block-decoding error {M̂ 6= M } occurs when any of Bi ’s are incorrectly decoded. For a given cost function c(x, x̂N ), the expected estimation error can be written in terms of block-decoding events {M̂ = M } and {M̂ 6= M } as E[c(X, X̂N )] = Pr(M̂ 6= M )E[c(X, X̂N ) M̂ 6= M ] + Pr(M̂ = M )E[c(X, X̂N ) M̂ = M ]. (19) With the finite-resolution estimator X̂N,finite = M̂ e−N R + e−N R /2, the MSE and the quantized MSE can be bounded above as E[|X − X̂N,finite |2 ] ≤ Pr(M̂ 6= M ) + (e−N R /2)2 , E[cq (X, X̂N,finite )] ≤ Pr(M̂ 6= M ), (20) (21) by using E[|X − X̂N,finite |2 |M̂ = M ] ≤ (e−N R /2)2 and E[cq (X, X̂N,finite )|M̂ = M ] = 0, respectively. The achievable exponent of the MSE in (20) is determined by trade-offs between the exponentially decreasing rate of Pr(M̂ 6= M ) at a fixed rate R and the exponent 2R. On the other hand, in (21), the achievable exponent of the quantized MSE is determined by the exponentially decreasing rate of Pr(M̂ 6= M ) in N at a fixed rate R. Tighter bounds on the two estimation errors can be found by expanding the errors in terms of the bit-decoding events. For a cost function c(x, x̂N ), the expected cost can be written as E[c(X, X̂N )] = k  X i=1 +  Pr(B̂i 6= Bi , B̂1i−1 = B1i−1 )E[c(X, X̂N ) B̂i 6= Bi , B̂1i−1 = B1i−1 ] Pr(B̂1k = B1k )E[c(X, X̂N ) B̂1k = (22) B1k ] where the number of information bits is k = N R/ ln 2. Note that conditioned on the event {B̂i 6= Bi , B̂1i−1 = B1i−1 }, both the cost functions |X − X̂N,finite |2 and cq (X, X̂N,finite ) are bounded above by 2−2(i−1) . Thus, we have E[|X − X̂N,finite |2 B̂i 6= Bi , B̂1i−1 = B1i−1 ] ≤ 2−2(i−1) , E[cq (X, X̂N,finite ) B̂i 6= Bi , B̂1i−1 = B1i−1 ] ≤ 2−2(i−1) . (23) 7 From these bounds and (22), we can upper bound the MSE as, E[|X − X̂N,finite |2 ] ≤ k X i=1 Pr(B̂i 6= Bi )2−2(i−1) + 2−2k , (24) and the quantized MSE as E[cq (X, X̂N,finite )] ≤ k X i=1 Pr(B̂i 6= Bi )2−2(i−1) . (25) These bounds show how differently each bit-error probability contributes to the estimation errors. In the upper bounds on the MSE (24) and on the quantized MSE (25), we can see that the weights on the bit-error probabilities decrease exponentially in i as the bit position i increases corresponding to lower significance. In order to minimize the upper bounds on the MSE and on the quantized MSE for a fixed number of querying N , we need to design a querying strategy (or the associated channel coding) that can provide unequal error protection depending on the bit positions. This property differentiates a good channel-coding strategy for state estimation from that for information transmission. In classical information-transmission problems where the cost function is 1(M̂ 6= M ), any bit error event {B̂i 6= Bi } results in the same cost. Therefore, the optimal coding strategy to minimize the expected cost function E[1(M̂ 6= M )], which equals the block-decoding-error probability Pr(M̂ 6= M ), provides equal error protection for all the information bits. In the state-estimation problem, on the other hand, the optimal coding strategy should provide unequal error protection on information bits {B1 , . . . , Bk } depending on the bit positions. III. R EVIEW OF T HREE D IFFERENT Q UERYING S TRATEGIES In this section, we review three well-known querying policies including the adaptive bisection policy [13], the nonadaptive UEP repetition policy [2], and the non-adaptive block-querying policy based on random block coding [15] in Sections III-A, III-B, and III-C, respectively. The performance of these policies are analyzed by the best achievable quantizedMSE exponent defined in (17) with the finite-resolution estimator X̂N,finite (11). A. Adaptive Bisection Policy For adaptive sequential querying, greedy successive entropy minimization of a target variable is often proposed as a way to design a querying strategy for estimation of the target variable [8], [10]. Successive-entropy-minimization strategies select a binary query that maximally reduces the remaining uncertainty of the target variable at each round. This can be accomplished by choosing a querying region Qi that balances the probability of the event {X ∈ Qi } and the probability of the event {X ∈ / Qi }, given past answers y1i−1 , i.e., (26) Pr(X ∈ Qi |Y1i−1 = y1i−1 ) = Pr(X ∈ / Qi |Y1i−1 = y1i−1 ) = 1/2. R The uncertainty of the target variable is quantified by the differential entropy h(X) := − p(x) ln p(x)dx where X ∼ p(x), and the expected reduction of the uncertainty by the i-th querying equals h(X|Y1i−1 = y1i−1 ) − h(X|Yi , Y1i−1 = y1i−1 ) (27) where Yi is the noisy observation of the oracle’s answer Zi = 1(X ∈ Qi ) transmitted through a BSC(). For Qi satisfying (26), the expected reduction of the uncertainty in (27) is equal to C := maxYi I(X; Yi |Y1i−1 = y1i−1 ) = HB (1/2) − HB () where I(X; Yi |Y1i−1 = y1i−1 ) is the conditional mutual information between X and Yi given Y1i−1 = y1i−1 . After N rounds of querying, successive-entropy-minimization strategies reduce the entropy of X by N C. From the elementary bound h(X) − h(X|Y1N ) ≤ max I(X; Y N ) = N C, YN (28) we can see that the successive-entropy-minimization policy achieves the maximum possible entropy reduction of X for N uses of the BSC(). The bisection policy, which is also called Horstein’s coding scheme [13], is one example of the successive-entropyminimization policies. This policy asks whether X lies to the left or right of the median of the updated posterior distribution at each round. The left figure of Fig. 3 illustrates the bisection policy for the first two rounds of querying. At the first round, the value of X is uniformly distributed over [0, 1] and the median of the prior distribution equals 1/2. Thus, the player asks whether X belongs to the right half of the region of interest [0, 1] by choosing Q1 = [1/2, 1], i.e., the player tries to extract the most significant bit of X. Given the observed answer Y1 ∈ {0, 1}, the player updates the posterior distribution p(x|y1 ) of X, and then chooses Q2 ⊂ [0, 1] that bisects the posterior distribution such that Pr(X ∈ Q2 |Y1 = y1 ) = 1/2, i.e., it queries whether X lies to the right of the median of the posterior distribution p(x|y1 ). Depending on the answer Y1 to the previous query, the updated posterior distribution p(x|y1 ) and the median of the distribution change, so that the second querying region Q2 changes as a function of the answer to the previous query. At each round, the player keeps updating the posterior distribution 8 Bisection policy (adaptive) Dyadic policy (non-adaptive) p(x) p(x) 1 0 Y1 = 0 x Y1 = 1 p(x|y1 ) p(x|y1 ) 1 0 0 1 0 Y1 = 0 Y1 = 1 p(x|y1 ) 1 0 x p(x|y1 ) 1 0 1 Fig. 3. Illustration of two successive-entropy-minimization policies, adaptive bisection policy and non-adaptive dyadic policy, for the first two rounds. The shaded regions correspond to the posterior distribution over the querying region Qi at the i-th round. The bisection policy designs Qi to be right region of the median of the posterior distribution, while the dyadic policy assigns Qi to be the region that corresponds to the i-th bit Bi of the binary expansion of X being equal to 1. The querying region Qi of the bisection policy changes depending on the received answers Y1i−1 of the previous queries, while that of the dyadic policy does not change on Y1i−1 . For both the querying strategies, the shaded areas take 1/2 of the posterior distribution. p(x|y1i−1 ) of the target variable given collected answers and designs the querying region Qi to be right of the median of the updated p(x|y1i−1 ). The bisection policy is known to work well in practice, but there are few available theoretical guarantees for the performance of this policy. Here we demonstrate that among successive-entropy-minimization policies satisfying (26) for every i ∈ {1, . . . , N } the bisection policy maximally reduces the conditional variance of X at each round. More specially, we show that the bisection policy chooses Qi that maximizes the predicted variance reduction at the i-th round given the answers y1i−1 of the previous rounds, i.e.,  (29) max Var(X|Y1i−1 = y1i−1 ) − E[Var(X|Yi , Y1i−1 = y1i−1 )] . Qi The predicted variance reduction depends on the choice of the querying region Qi since the posterior distribution p(x|yi , y1i−1 ) is a function of Qi . The minimum-mean-square-error (MMSE) estimator X̂N,MMSE = E[X|Y1N = y1N ] minimizes the MSE and makes it equal to the conditional variance of X given Y1N , min E[|X − X̂N |2 ] = E[(X − X̂N,MMSE )2 ] = E[Var(X|Y1N )]. (30) X̂N Therefore, the bisection policy, which maximizes the predicted one-step variance reduction in (29), is the optimal myopic (greedy) policy in reducing the MSE at each round given the previous answers. But this does not necessarily mean that the bisection policy is the globally optimal policy in minimizing the MSE for a fixed number of querying. Proposition 1: Among successive-entropy-minimization policies, which choose the i-th querying region Qi satisfying Pr(X ∈ Qi |Y1i−1 = y1i−1 ) = Pr(X ∈ / Qi |Y1i−1 = y1i−1 ) = 1/2 given previous answers y1i−1 , the bisection policy maximizes the predicted one-step variance reduction (29) at each round. Proof: Appendix A Remark 1: In the proof of Proposition 1 in Appendix A, we show that the predicted variance reduction of X due to the i-th query Qi is a function of not only {Pr(X ∈ Qi |Y1i−1 = y1i−1 ), Pr(X ∈ / Qi |Y1i−1 = y1i−1 )} but also {E[X|X ∈ Qi , Y1i−1 = i−1 i−1 i−1 y1 ], E[X|X ∈ / Qi , Y1 = y1 ]}. Successive-entropy-minimization policies select Qi that makes Pr(X ∈ Qi |Y1i−1 = i−1 y1 ) = 1/2 but do not care about the corresponding conditional expectations {E[X|X ∈ Qi , Y1i−1 = y1i−1 ], E[X|X ∈ / Qi , Y1i−1 = y1i−1 ]}, which also governs the conditional variance of X. What we show in Proposition 1 is that the choice of the querying region Qi from the bisection policy results in the selection of {E[X|X ∈ Qi , Y1i−1 = y1i−1 ], E[X|X ∈ / Qi , Y1i−1 = y1i−1 ]} that maximizes the predicted variance reduction among all the possible querying regions Qi satisfying Pr(X ∈ Qi |Y1i−1 = y1i−1 ) = 1/2. More discussions on successive-entropy-minimization policies and the proof of Proposition 1 are provided in Appendix A. In this paper, we are particularly interested in the error rates of convergence achievable with the bisection policy. Even though the error rate for the bisection policy is very hard to analyze and not known in general, a slight modification of the bisection policy proposed by Burnashev and Zigangirov in [12], and called the BZ algorithm, is analyzable. The BZ algorithm works very similarly to the bisection policy, except that the boundary of the querying regions is not equal to the median of the posterior distribution. Rather, the BZ boundary is chosen among a set of uniformly quantized thresholds T = {0, 2−k , 2(2−k ), . . . , 2k (2−k )} with resolution 2−k . More specifically, the threshold is chosen by sampling between the two points in the set T that are closest to the median of the posterior distribution. Let M denote the true index of the interval 9 IM = [M 2−k , (M + 1)2−k ) where the target variable X belongs. After N rounds of querying with the BZ algorithm, the controller finds the sub-interval IM̂ = [M̂ 2−k , (M̂ + 1)2−k ) where the posterior probability of {X ∈ IM̂ } is maximized and defines such a M̂ as the estimate of M . In [12], [5], it is shown that the probability of the error event {M̂ 6= M } with the BZ algorithm decreases exponentially in N as    √ −N − ln 1/2+ (1−) Pr(M̂ 6= M ) ≤ 2k e (31) for a fixed k. When we consider a sequence of BZ algorithms with different resolutions {2−k } where k scales as k = RN/ ln 2 for a fixed rate R > 0, the probability of decoding error {M̂ 6= M } is bounded above by     √ −N − ln 1/2+ (1−) −R Pr(M̂ 6= M ) ≤ e . (32) Since the quantized MSE can be bounded above by the block-decoding-error probability as shown in (21), the quantized-MSE exponent defined in (17) is bounded below by the exponent on the right hand side of (32). Lemma 1 (Quantized-MSE exponent with BZ algorithm): The best achievable quantized-MSE exponent with the BZ algorithm, ∗ denoted Eq,BZ (R), is bounded below as   p ∗ (33) Eq,BZ (R) ≥ Eq,BZ (R) := − ln 1/2 + (1 − ) − R when the resolution of the querying region scales as k = N R/ ln 2 bits for a fixed rate R > 0. B. Non-Adaptive Unequal-Error-Protection Repetition Querying Different from the adaptive policy where the updated posterior distribution p(x|y1i−1 ) is available to the controller for the design of the i-th querying region Qi , for the non-adaptive policy a block of queries is determined independently of previous answers from the oracle. Our objective is to design a block of queries to estimate X up to the first k bits in the binary expansion of X ≈ 0.B1 B2 . . . Bk with the minimum estimation error E[c(X, X̂N )] for a given cost function c(X, X̂N ). We first point out that even for the non-adaptive case, there exists a block of queries (Q1 , . . . , QN ) that does not depend on Y1N but still meets the condition (26) of successive-entropy-minimization policies for every Y1N ∈ {0, 1}N . Such a policy is the dyadic policy [10] and works as follows: The dyadic policy queries the coefficients in the dyadic expansion of X ≈ 0.B1 B2 . . . BN from B1 to BN one at a time over N rounds of querying. The right figure of Fig. 3 illustrates the procedure of the dyadic policy. At the first round, as does the bisection policy, the dyadic policy queries the MSB B1 . At the second round, regardless of Y1 ∈ {0, 1} it queries the second MSB B2 by choosing Q2 to be Q2 = [1/4, 2/4] ∪ [3/4, 1], which is the region of X where B2 = 1. The player continues the procedure of asking about Bi at the i-th round for i = 1, . . . , N . Since the prior distribution of X is uniform over [0, 1], the quantized bits {Bi } are i.i.d. with Bernoulli(1/2). Moreover, since the channel outputs Y1i−1 ∈ {0, 1}i−1 contain information only about B1i−1 but not about Bi , the events {Bi = 1} and {Bi = 0} are independent of Y1i−1 . Therefore, the dyadic policy satisfies the condition (26) for every y1i−1 ∈ {0, 1}i−1 and achieves the maximum reduction (28) of the conditional entropy. Even though the dyadic policy maximally reduces the uncertainty of X measured by the entropy, this policy fails to make the estimation error converge to 0 even when N → ∞. This is because, in the BSC(), with  ∈ (0, 1/2) probability the player receives an incorrect value for the information bit Bi . Since each bit Bi is queried only once by the dyadic policy, if the player receives an incorrect answer for some bit Bi there is no way to recover from this error. Therefore, the estimation error of the dyadic policy does not converge to 0. To correctly estimate (B1 , . . . , Bk ) through N uses of the noisy BSC(), the player needs to design a block of queries (Q1 , . . . , QN ) with some redundancy, or equivalently design a block code with encoding map f : {0, . . . , 2k − 1} → {0, 1}N to guarantee a reliable transmission of the information bits (B1 , . . . , Bk ). As pointed out earlier, the decoding error of each Bi has different effect on the estimation error. The different importances of Bi ’s can be quantified by the different weights on the bit error probabilities Pr(B̂i 6= Bi ) in the upper bounds (24) and (25) on the MSE and on the quantized MSE, respectively. For non-adaptive block querying, in order to minimize the estimation error with a limited number N of queries it is desirable to provide different levels of error protection. One way to provide unequal error protection is to repeat the query on the information bits multiple times, the number of repetitions varying in accordance with the desired level of error protection. Such a UEP repetition coding approach was considered in [2]. For this policy, the controller queries each information bit Bi in the dyadic expansion of X ≈ 0.B1 . . . Bk repeatedly Ni times P and the oracle sends the uncoded bit Bi repeatedly by Ni uses of the BSC(). The total number of channel k uses is restricted to i=1 Ni = N where k is the resolution of the quantification of X. Note that this repetition-coding policy cannot achieve the maximum entropy reduction (28) of the target variable X, which is achievable only when the player keeps asking the most informative query at each round. The repeated queries on Bi successively reduce the uncertainty of Bi , and the bit error probability of Bi decreases exponentially in the number of repeated queries, Ni . The minimum bit-error probability of Bi is achievable with a simple majority-voting algorithm, which claims the 10 estimate B̂i to be the more frequently received binary value at the Ni channel outputs. This simple algorithm is equivalent to maximum-likelihood (ML) decoding for Bi . Lemma 2: When the oracle sends a binary bit Bi ∼ Bernoulli(1/2) repeatedly Ni (≥ 1) times through a BSC(), the best achievable bit-error probability with the majority-voting algorithm decreases exponentially in Ni as e−1/(3Ni ) −Ni DB (1/2k) √ e ≤ Pr(B̂i 6= Bi ) ≤ e−Ni DB (1/2k) . 2πNi (34) Proof: Appendix B. By assigning different numbers of repetitions (N1 , N2 , . . . Nk ) for each information bit Bi we can provide unequal error protection for the information bits. The remaining issue is the optimal solution for the number of repetitions (N1 , N2 , . . . , Nk ) that minimize the estimation error where k is the total number of queried information bits. These should be selected to minimize the upper bound on the MSE E[|X − X̂N,finite |2 ] in (24) or the upper bound on the quantized MSE E[cq (X, X̂N )] in (25). Since the weight 2−2(i−1) on Pr(B̂i 6= Bi ) decreases exponentially in i and Pr(B̂i 6= Bi ) decreases exponentially in Ni as shown in (34), the optimal Ni∗Pthat minimizes the upper bounds should decrease linearly in i from MSB to LSB. This condition k then implies that N = i=1 Ni∗ = O(k 2 ). Therefore, the √ number of information bits that are queried by the optimal UEP repetition coding increases in N on the order of k = O( N ), and the√corresponding rate R = k/N goes to 0 as N → ∞. The resulting MSE and quantized MSE decrease exponentially only as N . By using the similar arguments, in [2] it was shown that √ with the UEP repetition coding, the MSE minimized over all choices of (N1 , . . . , Nk ) and k decreases exponentially in N but not faster than that c1 e−c2 √ N ≤ min (N1 ,...,Nk ),k E[|X − X̂N,finite |2 ] ≤ c3 e−c4 √ N , (35) for some positive constants c1 , c2 , c3 , c4 > 0. Therefore, compared to the adaptive bisection-based policy, whose estimation error decreases exponentially in N , the UEP repetition coding achieves a quadratically worse exponential rate of converenge. Moreover, the UEP repetition coding gives a MSE exponent (16) and quantized-MSE exponent (17) that is equal to zero at any positive rate R > 0 where k = N R/ ln 2 bits. Lemma 3: With the UEP repetition coding, the best achievable MSE exponent and the quantized-MSE exponent are ∗ ∗ EMSE,repetition (R) = Eq,repetition (R) = 0 (36) at any positive rate R > 0. For non-adaptive block querying, in order to improve the error rates of convergence we need to use more sophisticated codes that can efficiently encode k = O(N ) information bits in a length-N codeword while guaranteeing reliable transmission of those k = O(N ) bits. For this purpose, we consider a non-adaptive block querying based on random block coding in the following section. C. Non-Adaptive Block Querying Based on Random Block Coding In this section, we introduce a non-adaptive block-querying strategy based on random block coding [15]. The encoding map f : {0, . . . , eN R − 1} → {0, 1}N of the random block codes of rate R independently generates length-N codewords (m) (m) z(m) = (z1 , . . . , zN ) := f (m) each of which is composed of i.i.d. symbols of Bernoulli(1/2) distribution. The player and the oracle agree on the encoding map, which in turn specifies a block of queries (Q1 , . . . , QN ). Fig. 4 illustrates the one-to-one mapping between the codebook and the block of queries. For a given block code with codewords {z(m) }, m ∈ {0, . . . , eN R −1}, where the querying resolution is k = N R/ ln 2 bits, the corresponding i-th querying region Qi becomes the union of the intervals (m0 ) Im0 = [m0 2−k , (m0 + 1)2−k ) of m0 ’s such that the i-th answer bit zi = 1. When the value of the target variable X belongs to the sub-interval Im , the oracle transmits the length-N answer bits (m) (m) z(m) = (z1 , . . . , zN ) to the block of queries (Q1 , . . . , QN ) by N uses of the BSC(). The length-N channel-output sequence that the player receives is denoted by y = z(m) ⊕ n where n is the noise sequence composed of i.i.d. symbols with Bernoulli() distribution. Given the channel-output sequence y, the player finds an estimate m̂ of m that maximizes the likelihood (ML decoder) m̂ = arg max pN (y|z(m) ) (37) m N QN where p (y|z) = i=1 pY |Z (yi |zi ) and pY |Z (y|z) is the transition probability of the BSC(). Define the set of y’s that are mapped to the message m0 by the ML decoder as Ym0 for m0 ∈ {0, . . . , eN R − 1}. Since the message M is uniformly distributed over {0, . . . , eN R − 1} for X ∼ unif[0, 1], the average decoding-error probability is Pr(M̂ 6= M ) = R eN X−1 m=0 e−N R X y∈Y / m pN (y|z(m) ). (38) 11 N 0 1 1 0 0 0 1 0 1 random block code f : {0, . . . , 2k 1} ⇥ {0, 1}N p(x) k ··· ··· ··· ··· ··· ··· ··· ··· ··· ~ i.i.d. Bern(1/2) 2k p(x|y1N ) p(x|y1 ) y1 02 1 1 0 1 0 0 0 0 1 1 x y2 02 k 1 ··· yN x 02 k 1 x Fig. 4. Non-adaptive block querying based on random block coding with encoder f : {0, . . . , 2k − 1} → {0, 1}N . The i-th querying region (shade region) is the union of the sub-intervals Im0 = [m0 2−k , (m0 + 1)2−k ) for messages m0 for which the associated codeword has bit 1 at the i-th position. Since every symbol of every codeword are i.i.d. with Bernoulli(1/2), at each querying about a half of the sub-intervals belong to the querying region. As the querying progresses, if the posterior probability of the event {x ∈ Im } for the correct message m becomes higher than those of the other incorrect messages, the player can correctly decode the index m of the sub-interval where the value x of the target variable belongs. We review previous results on analyzing the exponentially decreasing rate of Pr(M̂ 6= M ) for random block codes with the ML decoding, and use it to analyze the best achievable quantized-MSE exponent (17) with the random block codes. For the random block codes of rate R, define the best achievable error exponent for the block-decoding-error probability Pr(M̂ 6= M ) as − ln Pr(M̂ 6= M ) Er (R) := lim inf . (39) N →∞ N For a BSC() with the optimal input distribution Bernoulli(1/2), Forney’s analysis [16] provides a closed form solution for Er (R), ( E0 (1/2, ) − R, 0 ≤ R < Rcrit (), Er (R) = (40) DB (γGV (R)k), Rcrit () ≤ R ≤ C, p √ √ where E0 (a, b) = −√ln(1−2a(1−a)( b− 1 − b)2 ) and thus E0 (1/2, ) = − ln(1/2+ (1 − )), Rcrit () = DB (γcrit ()k1/2) with γcrit () = √+√1− , C = HB (1/2) − HB (), and γGV (R) is the normalized Gilbert-Varshamov distance, defined such that DB (γGV (R)k1/2) = R. The exponent Er (R) is a decreasing function of the rate R. As shown in [17] (pp. 147-149), for a very noisy channel ( ≈ 0.5) the error exponent in (40) can be approximated as ( C − R, 0 ≤ R < C4 , √ 2 C (41) Er (R) ≈ 2√ ( C − R) , 4 ≤ R ≤ C. From the upper bound in (21) we obtain the bound on the quantized MSE: ˙ −N Er (R) . E[cq (X, X̂N,finite )]≤e (42) Therefore, Er (R) is the achievable quantized-MSE exponent. Moreover, we can also show that the exponent Er (R) is not just an achievable quantized-MSE exponent but the best achievable quantized-MSE exponent with the random block coding. In Lemma 4, we prove this result by using fact that the random block codes provide equal error protection for every information bit, which makes the exponent of every bit-decoding-error probability equal to the exponent of the block-decoding-error probability, i.e., . (43) Pr(Bi 6= Bi ) = Pr(M̂ 6= M ), ∀i ∈ {1, . . . , k = N R/ ln 2}. ∗ Lemma 4: The best achievable quantized-MSE exponent Eq,rc (R) with the non-adaptive block-querying strategy based on random block codes of rate R is equal to ∗ Eq,rc (R) = Er (R) (44) for the random-coding exponent Er (R) defined in (40). Proof: Appendix C. √ Compared to the UEP repetition coding that achieves MSE and the quantized MSE decreasing exponentially only in N , the block querying based on random block coding achieves the estimation errors exponentially decreasing in N , matching the error rates of the adaptive bisection policy. However, the random block coding is not a MSE-optimal non-adaptive policy since it does not take into account the different contributions of decoding error of each information bit to the MSE. In the next section, we introduce a new non-adaptive block querying strategy based on superposition coding, which employs both coding gain and unequal error protection. 12 IV. N ON -A DAPTIVE B LOCK Q UERYING BASED ON S UPERPOSITION C ODING Superposition coding [14] was originally developed as a channel-coding scheme for communications over a degraded broadcast channel where one receiver is statistically stronger than the other so that the stronger receiver can always recover the weaker receiver’s message as well as its own message. The weaker receiver’s message is thus treated as a public message and the stronger receiver’s message as a private message. Since the public message should be decodable not only to the stronger receiver but also to the weaker receiver, a better error protection is required for the public message than for the private message. Superposition-coding scheme provides a higher level of error protection for the public message than for the private message. In this section, we use this superposition-coding principles to develop a non-adaptive block-querying strategy that provides better error protection for MSBs than for LSBs in the dyadic expansion of the target variable X ≈ 0.B1 B2 . . . Bk . Not only does the proposed strategy provide unequal error protection for MSBs vs. LSBs, but it also achieves reliable communications for k = N R/ ln 2 information bits at any fixed rate 0 < R ≤ C where C is the capacity of a given channel. By unequally distributing a fixed amount of querying resource to the MSBs and LSBs of the target variable, the UEP querying strategy achieves better MSE convergence rates than that of the querying strategy based on random block coding, which distributes the querying resource equally to all the queried information bits. We first partition the information bits (B1 , . . . , Bk ) into two sub-groups, a group containing the first k1 < k bits of X (B1 , . . . , Bk1 ) and the other group containing the remaining k2 := k − k1 bits of X (Bk1 +1 , . . . , Bk1 +k2 ). The group of MSBs (B1 , . . . , Bk1 ) determines the more important partial message M1 ∈ {0, . . . , 2k1 − 1}, while the group of LSBs (Bk1 +1 , . . . , Bk1 +k2 ) determines the less important partial message M2 ∈ {0, . . . , 2k2 − 1}. Denote the rates of M1 (MSBs) and of M2 (LSBs) by R1 = (k1 ln 2)/N and R2 = (k2 ln 2)/N , respectively. Upon transmission of M = (M1 , M2 ) of total rate R = R1 + R2 , the quantized MSE E[cq (X, X̂N )] can be expressed in terms of the decoding events of the two partial messages (M1 , M2 ) as E[cq (X, X̂N )] = Pr(M̂1 6= M1 )E[cq (X, X̂N )|M̂1 6= M1 ]   + Pr(M̂1 = M1 , M̂2 6= M2 )E[cq (X, X̂N )|M̂1 = M1 , M̂2 = 6 M2 ]   + Pr(M̂1 = M1 , M̂2 = M2 )E[cq (X, X̂N )|M̂1 = M1 , M̂2 = M2 ] . (45) When the partial message M1 , which is composed of the N R1 -most significant bits of X, can be correctly decoded, the quantized MSE associated with the finite-resolution estimator X̂N = X̂N,finite in (11) can be bounded above by e−2N R1 . By using this bound and the fact that E[cq (X, X̂N )|M̂1 = M1 , M̂2 = M2 ] = 0, the quantized MSE can be bounded above as E[cq (X, X̂N,finite )] ≤ Pr(M̂1 6= M1 ) + Pr(M̂2 6= M2 |M̂1 = M1 )e−2N R1 (46) for R1 < R. By the weight e−2N R1 on Pr(M̂2 6= M2 |M̂1 = M1 ), the decoding error of the partial message M2 (LSBs), conditioned on the correctly decoded M1 (MSBs), contributes less to the estimation error, than does the decoding error of M1 (MSBs). When we use random block coding, which provides equal error protection for every information bit of the message M , the best achievable decoding-error probabilities for the partial message M1 (MSBs) and for M2 (LSBs) conditioned on the correct estimate M̂1 = M1 are . Pr(M̂1 6= M1 ) = e−N Er (R1 +R2 ) , (47) . Pr(M̂2 6= M2 |M̂1 = M1 ) = e−N Er (R2 ) where Er (R) is the error exponent of the random block coding at rate R, defined in (40). Since Er (R) is a decreasing function in the rate R and thus Er (R1 + R2 ) < Er (R2 ) for R1 > 0, the decoding-error probability Pr(M̂1 6= M1 ) of the partial message M1 decreases in a slower rate than does the conditional decoding-error probability Pr(M̂2 6= M2 |M̂1 = M1 ) of the partial message M2 . Therefore, the exponentially decreasing rate of the quantized MSE in (46) is dominated by the exponentially ∗ decreasing rate of Pr(M̂1 6= M1 ), and as demonstrated in Lemma 4, the best achievable quantized-MSE exponent Eq,rc (R) with the random block coding is equal to Er (R) for R = R1 + R2 . To improve the quantized-MSE exponent compared to that of random block coding, we need to design a UEP coding scheme that can provide higher level of error protection for M1 (MSBs) to achieve a better exponentially decreasing rate of Pr(M̂1 6= M1 ) than that of the random block coding in (47). In this section, we provide such a UEP coding scheme based on superposition-coding principles. By using the improved convergence rates of Pr(M̂1 6= M1 ), we demonstrate that the proposed UEP coding scheme achieves a strictly positive gain in the exponentially decreasing rate of the quantized MSE E[cq (X, X̂N )] for high rate regimes of R > 0. 13 {0, 1}N Random Coding {0, 1}N UEP Coding Fig. 5. The distributions of codewords (each color dot) in the output space {0, 1}N for random block coding and for UEP coding with two levels of error protection. To better protect the color information of the codewords, which represents the MSBs of the message of the codewords, the same color codewords should be clustered together. However, this clustering makes it harder to decode the correct codeword among the same color codewords, i.e., harder to decode the LSBs of the message. {0, 1}N satellite codeword z(m1 ,m2 ) cloud center u(m1 ) v(m2 ) u(m1 ) z(m1 ,m2 ) Superposition coding Fig. 6. Superposition coding with two levels of priority, where the first partial codeword u(m1 ) encodes the MSBs of the message (color information of the codewords) and the second partial codeword v(m2 ) encodes the LSBs of the message. A. Encoding of Superposition Codes and the Associated Non-Adaptive Block Querying In Fig. 5, we illustrate the codeword distributions of random block coding and of desired UEP coding with two levels of error protection, where the MSBs of the message are protected with a higher priority than are the LSBs of the message. Each color dot is a codeword, and the shell around it is the decoding region for M = (M1 , M2 ) in the output space {0, 1}N . Here the partial message M1 (MSBs) is represented by the color of the codeword. Codewords with the same color have the same partial message M1 (MSBs), while their M2 ’s (LSBs) are different. For the random block coding, the same color codewords are uniformly distributed in {0, 1}N . When a noise vector corrupts the transmitted codeword beyond the correct decoding region, the decoded codeword may not have the same color as that of the transmitted codeword, since the codewords are uniformly distributed regardless of their colors and there are eN R1 different colors of the codewords. On the other hand, if the same color codewords are concentrated together as shown in the right figure, even if the channel noise corrupts the transmitted codeword, the color information will have higher probability of being correctly decoded. However, the probability of M2 being correctly decoded given a correct estimate for M̂1 = M1 will be lower for the UEP coding, since the codewords of the same color are closer to each other and thus harder to be distinguished. We next construct codes that satisfy such a geometric property to provide two levels of unequal error protection by using superposition-coding principles. Superposition codes are constructed by superimposing two types of random block codes generated by different distributions. The first type of random block codes of length N and rate R1 is composed of eN R1 binary length-N codewords, {u(m1 ) }, m1 ∈ {0, . . . , eN R1 − 1}, which encode the more important partial message m1 (MSBs). The symbols of every codeword are chosen independently at random with Bernoulli(1/2) distribution. We call these partial codewords “cloud centers” in the output space {0, 1}N . The second type of random block codes of length N and rate R2 is composed of codewords {v(m2 ) }, m2 ∈ {0, . . . , eN R2 − 1}, and it encodes the less important partial message m2 (LSBs). Every symbol of every codeword in {v(m2 ) } is independent and identically distributed with Bernoulli(α) distribution for a fixed α ∈ (0, 1/2). This parameter α determines the distribution of codewords in superposition coding. The codeword z(m1 ,m2 ) for the total message (m1 , m2 ) is designed by the bit-wise XOR of the two partial codewords u(m1 ) and v(m2 ) . The superposition codes Cs of rate R = R1 + R2 are thus composed of {z(m1 ,m2 ) } for messages (m1 , m2 ) ∈ {0, . . . , eN R1 − 1} × {0, . . . , eN R2 − 1}, where z(m1 ,m2 ) = u(m1 ) ⊕ v(m2 ) . The set of codewords {z(m1 ,m2 ) } for a fixed m1 is called “satellite codewords” for the respective cloud center u(m1 ) . There are eN R2 satellite codewords around each cloud center u(m1 ) . Fig. 6 illustrates the distribution of codewords with superposition coding. Note that when α = 1/2 the distribution of the codewords in the superposition codes Cs becomes the same as that of 14 random block coding UEP coding p(x|y1N ) p(x|y1N ) correct m1 region 02 correct m1 region x k 1 2 02 x k k1 1 2 k1 Fig. 7. Illustration of the typical posterior distributions of X after N rounds of querying for random block coding (left) and for UEP coding with two levels of error protection (right). Consider the case where the posterior probability of X in the correct m1 region is higher for the UEP coding than it is for the random block coding but the peaks within the correct m1 region are smoother for the UEP coding. For such a case, the UEP coding provides better error protection for m1 but worse error protection for m2 given the correct m̂1 = m1 than does the random block coding. random block codes that are composed of eN (R1 +R2 ) independent and identically distributed codewords where every symbol of every codeword is chosen independently at random with Bernoulli(1/2) distribution. Therefore, the random block codes with independent codewords of i.i.d. symbols of Beronoulli(1/2) distribution are a special case of the superposition codes. In contrast to the case of α = 1/2, where every codeword is independent, for superposition codes with α ∈ (0, 1/2) the satellite codewords {z(m1 ,m2 ) }, m2 ∈ {0, . . . , eN R2 − 1}, for a fixed m1 (the same color codewords), are mutually dependent. Since the typical Hamming weight of v(m2 ) is N α, the typical distance between a satellite codeword z(m1 ,m2 ) = u(m1 ) ⊕ v(m2 ) and its cloud center u(m1 ) is N α. As α decreases from 1/2 to 0, the satellite codewords become more and more concentrated around its cloud center. Therefore, the superposition codes satisfy the desired geometric property for unequal error protection with two levels of error protection. The parameter α ∈ (0, 1/2) determines how much the satellite codewords are concentrated around its cloud center, which determines the trade-offs between decoding-error probabilities of M1 and of M2 . There exists a one-to-one mapping between the length-N superposition codewords {z(m1 ,m2 ) } and the corresponding block of querying regions (Q1 , . . . , QN ). The block of querying regions (Q1 , . . . , QN ) associated with the superposition codewords {z(m1 ,m2 ) = u(m1 ) ⊕ v(m2 ) }, m1 ∈ {0, . . . , 2k1 − 1}, m2 ∈ {0, . . . , 2k2 − 1}, can be represented in terms of the sub-intervals Im1 := [m1 2−k1 , (m1 +1)2−k1 ) of length 2−k1 and another set of sub-intervals Im1 ,m2 := [m1 2−k1 +m2 2−(k1 +k2 ) , m1 2−k1 + (m2 + 1)2−(k1 +k2 ) ) of length 2−(k1 +k2 ) as: [ Qi = Im1 ,m2 (m1 ,m2 ) =1 (m1 ,m2 ):zi    = [ (m ) m1 :ui 1 =1 (m )    Im1 ∩   [    Im1 ,m2  ∪  (m ) m2 :vi 2 =0 [ (m ) m1 :ui 1 =0 Im1 ∩ ∪ (m2 ) m2 :vi  !!  Im1 ,m2  (48) =1 (m ) where ui 1 and vi 2 are the i-th bit of the partial codeword u(m1 ) and that of the partial codeword v(m1 ) , respectively. For a (m ) partial message m1 whose i-th bit ui 1 of the codeword u(m1 ) equals 1, about (1 − α)-fraction of the sub-intervals {Im1 ,m2 } (m ) (m ) within the Im1 are included in Qi since vi 2 is i.i.d. with Bernoulli(α), α ∈ (0, 1/2). On the other hand, if ui 1 = 0 for some m1 , about α-fraction of the sub-intervals {Im1 ,m2 } within the Im1 are included in Qi . Therefore, different from block querying based on random block coding, where each sub-interval of {Im1 ,m2 : m1 ∈ {0, . . . , 2k1 −1}, m2 ∈ {0, . . . , 2k2 −1}} is independently included in Qi with probability 1/2, for block querying based on superposition coding the events {Im1 ,m2 ⊂ Qi } (0 ≤ m2 ≤ 2k2 − 1) for a fixed m1 depend on each other. Fig. 7 illustrates how the posterior distribution of X after N rounds of querying with the UEP coding (right figure) will appear as compared to that of the random block coding (left figure). Given the channel outputs y1N , if the posterior probability over X ∈ [m01 2−k1 , (m01 + 1)2−k1 ) is largest for the correct m01 = m1 among all m01 ∈ {0, . . . , 2k1 − 1}, then the partial message m1 can be correctly decoded by the optimal ML decoding for the partial message m1 . If the posterior probability associated with the correct m1 region is larger for the UEP coding than it is for the random block coding, one obtains an improvement in the decoding-error probability Pr(M̂1 6= M1 ) of the partial message M1 . However, this improvement might come at the cost of degraded Pr(M̂2 6= M2 |M̂1 = M1 ) due to the geometric structure of codewords with the UEP coding. B. Decoding of Superposition Codes and the Analysis of Error Exponents for Decoding-Error Probabilities In this section, we show that the non-adaptive block querying based on the superposition coding achieves an improved error exponent for the decoding-error probability Pr(M̂1 6= M1 ) of the more important partial message M1 (MSBs) as compared to that of non-adaptive block querying based on random block coding. This improvement occurs when R1 , the rate of M1 (MSBs), is sufficiently small and R2 < C2 (α) := HB (α ∗ ) − HB (), the rate of M2 (LSBs), is sufficiently larger, where 15 α ∗  = α(1 − ) + (1 − α) and α is the parameter that determines the distribution of the superposition codes as explained in Section IV-A. Denote the maximum achievable error exponents of Pr(M̂1 6= M1 ) and of Pr(M̂2 6= M2 |M̂1 = M1 ) with the superposition coding of rates (R1 , R2 ) by − ln Pr(M̂1 6= M1 ) , N →∞ N (49) − ln Pr(M̂2 6= M2 |M̂1 = M1 ) ∗ . ELSBs (R2 , α) = lim inf N →∞ N We analyze these exponents and compare those to the best achievable decoding-error exponents (47) of the random block codes. ∗ ∗ There have been many previous works [18], [19], [20] to analyze the error exponents EMSBs (R1 , R2 , α) and ELSBs (R2 , α) ∗ of superposition codes. A lower bound on ELSBs (R2 , α) can be calculated by directly applying the Gallager’s error-exponent analysis for a discrete memoryless channel with random block codes, where codewords are independent and composed of i.i.d. ∗ symbols having Bernoulli(α) distribution [20]. On the other hand, the analysis of EMSBs (R1 , R2 , α) is much more complicated, since in order to find the most probable M1 (MSBs, or the color of the transmitted codeword) it involves comparisons between sums of likelihoods of exponentially many satellite codewords in Fig. 6, which are mutually dependent. The optimal maximumlikelihood (ML) decoding for the partial message M1 finds m̂1 such that !   X N (m1 ,m2 ) m̂1 = arg max p y|z (50) ∗ EMSBs (R1 , R2 , α) = lim inf m1 m2 QN where y is the length-N channel-output sequence for the input codeword z(m1 ,m2 ) , pN (y|z) = i=1 pY |Z (yi |zi ) and pY |Z (y|z) ∗ is the transition probability of the BSC(). Even though there exist a few lower bounds on EMSBs (R1 , R2 , α) and some bounds ∗ (R1 , R2 , α). are shown to be numerically tighter than the others, there has been no simple closed form solution for EMSBs ∗ Since our goal is not to exactly calculate the error exponent EMSBs (R1 , R2 , α) of Pr(M̂1 6= M1 ) but to prove gains in this error exponent from the UEP superposition coding, we consider two well-known sub-optimal decoding rules that provide ∗ lower bounds on EMSBs (R1 , R2 , α). We show that these lower bounds are already greater than the optimal error exponent Er (R1 + R2 ) of the random block codes. The first sub-optimal decoding rule we consider is joint-maximum-likelihood (JML) decoding for m = (m1 , m2 ). Given the received word y = z(m1 ,m2 ) ⊕ n, which is a noisy version of the transmitted codeword z(m1 ,m2 ) added by a length-N noise word n composed of i.i.d. symbols of Bernoulli() distribution, this decoding rule finds the most probable (m̂1 , m̂2 ) such that   (m̂1 , m̂2 ) = arg max pN y|z(m1 ,m2 ) . (51) (m1 ,m2 ) Note that this decoding rule minimizes the probability of block-decoding error (M̂1 , M̂2 ) 6= (M1 , M2 ) but not the probability of the partial-decoding error M̂1 6= M1 , so that this is a sub-optimal decoding rule for M1 . The decoding error of M1 happens only when M̂1 6= M1 , regardless of whether or not M̂2 = M2 . Let EMSBs,JML (R1 , R2 , α) denote the best achievable error exponent of Pr(M̂1 6= M1 ) with the JML decoding rule. In Lemma 5, we show that EMSBs,JML (R1 , R2 , α) ≥ Er (R1 + R2 ) for every (R1 , R2 ), regardless of the choice of α ∈ (0, 1/2). This implies that the superposition codes provide a better, or at least as good, error protection for the partial message M1 than does the random block codes for every (R1 , R2 ), independent of the choice of α ∈ (0, 1/2). The second sub-optimal decoding rule we consider is successive-cancellation (SC) decoding. To decode m̂1 , this decoding  (m ) 1 rule focuses only on the geometry of the partial codewords u , m ∈ {0, . . . , eN R1 − 1}, (cloud centers in Fig. 6) while 1  (m ,m ) 1 2 . More specifically, this decoding rule behaves as if one of ignoring the true structure of the overall codewords z {u(m1 ) } is transmitted and the received word y is corrupted by a noise word v(m2 ) ⊕ n. Note that u(m1 ) , v(m2 ) , and n are independent of each other, and every symbol of the partial codeword v(m2 ) is i.i.d. with Bernoulli(α) and every symbol of the noise word n is i.i.d. with Bernoulli(). Therefore, the new noise word v(m2 ) ⊕ n is modeled as a sequence of i.i.d. symbols following Bernoulli(α ∗ ) distribution where α ∗  = α(1 − ) + (1 − α). Denoting by qY |U (y|u) the transition probability QN of the BSC(α ∗ ) and defining q N (y|u) = i=1 qY |U (yi |ui ), this sub-optimal decoding rule produces an estimate m̂1 of m1 such that   m̂1 = arg max q N y|u(m1 ) (52) m1 for a given channel output sequence y. After decoding m1 and having the estimate m̂1 , the SC decoding rule subtracts u(m̂1) from y and finds the estimate m̂2 for the partial message m2 (LSBs) that maximizes the likelihood of pN y ⊕ u(m̂1 ) |v(m2 )   m̂2 = arg max pN y ⊕ u(m̂1 ) |v(m2 ) . (53) m2 16 Let EMSBs,SC (R1 , α) and ELSBs,SC (R2 , α) denote the best achievable error exponents of Pr(M̂1 6= M1 ) and of Pr(M̂2 6= M2 |M̂1 = M1 ), respectively, with the SC decoding rule. Forney’s analysis [16] yields the exponentially-tight error exponent EMSBs,SC (R1 , R2 , α) for Pr(M̂1 6= M1 ) with the SC decoding rule: ( E0 (1/2, α ∗ ) − R1 , 0 ≤ R1 ≤ Rcrit (α ∗ ), (54) EMSBs,SC (R1 , α) = DB (γGV (R1 )kα ∗ ), Rcrit (α ∗ ) < R1 ≤ C − C2 (α). √ Here γGV ∈ [0, 1/2] is the Gilbert-Varshamov distance satisfying DB (γGV (R)k1/2) = R, E0 (a, b) = − ln(1 − 2a(1 − a)( b − p √ 1 − b)2 ) and thus E0 (1/2, α ∗ ) = − ln(1/2 + (α ∗√)(1 − (α ∗ ))), C = HB (1/2) − HB (), C2 (α) = HB (α ∗ ) − HB (), √ Rcrit (α∗) = DB (γcrit (α∗)k1/2) for γcrit (α∗) = √α∗+α∗ . For a given α ∈ (0, 1/2), the error exponent ELSBs,SC (R2 , α) 1−α∗ of Pr(M̂2 6= M2 |M̂1 = M1 ) can be shown to be positive for every 0 ≤ R2 < C2 (α). ∗ The following lemma summarizes two lower bounds on the error exponent EMSBs (R1 , R2 , α) (49) achievable with the sub-optimal JML decoding and with the sub-optimal SC decoding, respectively. Lemma 5: Superposition coding provides a better, or at least as good, error protection for the partial message M1 (MSBs of the message) than does the random block coding for every pair of rates (R1 , R2 ) of the partial messages (M1 , M2 ), regardless of the choice of the parameter α ∈ (0, 1/2) of the superposition coding. With joint-maximum-likelihood (JML) decoding for superposition codes, the error exponent EMSBs,JML (R1 , R2 ) of Pr(M̂1 6= M1 ), which is greater than or equal to Er (R), is achievable, i.e., ∗ EMSBs (R1 , R2 , α) ≥ EMSBs,JML (R1 , R2 ) ≥ Er (R1 + R2 ). (55) Moreover, for a sufficiently small R1 > 0 and sufficiently large R2 < C2 (α) = HB (α ∗ ) − HB (), a strictly positive gain in the error exponent can be achieved using successive-cancellation (SC) decoding rule, i.e., ∗ EMSBs (R1 , R2 , α) ≥ EMSBs,SC (R1 , α) > Er (R1 + R2 ) (56) where EMSBs,SC (R1 , α) is the best achievable decoding-error exponent for M1 using the SC decoding rule. Proof: Appendix D. For a very noisy BSC(), we can further demonstrate that, when we choose the rate R2 of the partial message M2 (LSBs) equal to the maximum possible rate C2 (α) to guarantee Pr(M̂2 6= M2 |M̂1 = M1 ) → 0 as N → ∞, the superposition coding provides a strictly positive gain in the error exponent of Pr(M̂1 6= M1 ) as compared to that of the random block coding, for ∗ the entire regime of R1 ∈ [0, C − C2 (α)) where EMSBs (R1 , R2 , α) is positive. Lemma 6: For a very noisy BSC() where  = 0.5 − δ for a sufficiently small δ > 0, assume a fixed α ∈ (0, 1/2) and the ∗ rate R2 = C2 (α). Then the best achievable error exponent EMSBs (R1 , R2 , α) of Pr(M̂1 6= M1 ) for superposition coding is strictly larger than the best achievable error exponent Er (R1 + R2 ) of random block coding for every R1 ∈ [0, C − C2 (α)). In particular, with successive cancellation (SC) decoding rule we can achieve an error exponent EMSBs,SC (R1 , α) that is strictly larger than Er (R1 + R2 ), ∗ EMSBs (R1 , R2 , α) ≥ EMSBs,SC (R1 , α) > Er (R1 + R2 ), (57) for every R1 ∈ [0, C − C2 (α)). Proof: Appendix E. In Fig 8, we provide a plot of the error exponent Er (R1 + R2 ) of random block coding (solid line) and the error exponent EMSBs,SC (R1 , α) of superposition coding with successive-cancellation decoding (dash-dot line) over R = R1 + R2 for a BSC(0.45) with a fixed α = 0.11 and R2 = C2 (α). The plot for EMSBs,SC (R1 , α) starts from R = C2 (α) at which R1 = 0. It is shown that EMSBs,SC (R1 , α) is larger than Er (R1 + R2 ) for every R1 ∈ [0, C − C2 (α)). Lemma 5 and 6 demonstrate that even with the sub-optimal decoding rules (either JML or SC rule) the superposing coding can provide a better error protection for the MSBs of the transmitted message than does the random block coding. In the next section, we use this result to show that the superposition coding achieves strictly positive gains in the exponentially decreasing rates of quantized MSE and MSE. C. Gains in the quantized-MSE exponent and MSE Exponent from Superposition Coding By using the improvement in the decoding-error exponent of M1 (MSBs) from superposition coding, we next demonstrate a gain in the exponentially decreasing rate of the quantized MSE E[cq (X, X̂N,finite )] for the quantized cost function ∗ cq (X, X̂N,finite ) (12) of resolution k = N R/ ln 2 bits for a fixed rate R > 0. Define Eq,spc (R) the best achievable exponentially decreasing rate of E[cq (X, X̂N,finite )] with the non-adaptive block querying based on the superposition coding (SPC) of rate R: − ln E[cq (X, X̂N,finite )] ∗ Eq,spc (R) = lim inf . (58) N →∞ N As shown in (46), the quantized MSE is bounded above by E[cq (X, X̂N,finite )] ≤ Pr(M̂1 6= M1 ) + Pr(M̂2 6= M2 |M̂1 = M1 )e−2N R1 , (59) 17 Er (R) EMSBs,SC (R1 , ↵) at R2 = C2 (↵) C2 (↵) Fig. 8. A plot of decoding-error exponents of the more important partial message M1 (MSBs) for random block coding, Er (R1 + R2 ) (solid line), and for superposition coding with successive-cancellation decoding, EMSBs,SC (R1 , α) (dash-dot line), where  = 0.45 and α = 0.11. When the rate R2 of the less important partial message M2 (LSBs) equals C2 (α), which is the maximum rate to guarantee Pr(M̂2 6= M2 |M̂1 = M1 ) → 0 as N → ∞, for every R1 ∈ [0, C − C2 (α)) the error exponent EMSBs,SC (R1 , α) of superposition coding is larger than the error exponent Er (R1 + R2 ) of random block coding. and the exponentially decreasing rate of the quantized MSE is dominated either by the error exponent of Pr(M̂1 6= M1 ) or by the error exponent of Pr(M̂2 6= M2 |M̂1 = M1 ) plus 2R1 . For random block coding, the exponentially decreasing rate Er (R) of Pr(M̂1 6= M1 ) is smaller than that of Pr(M̂2 6= M2 |M̂1 = M1 ), so that the random block coding achieves the ∗ quantized-MSE exponent Eq,rc (R) equal to Er (R), as demonstrated in Lemma 4. In Lemma 5 and 6, we showed that the superposition coding achieves a better error exponent of Pr(M̂1 6= M1 ) by providing higher-level error protection for M1 (MSBs) than does the random block coding. But this improvement comes with ∗ (R) with degraded error protection for M2 (LSBs). Therefore, to analyze the best achievable quantized-MSE exponent Eq,spc the superposition coding, we need to consider the trade-offs in the levels of error protection for M1 (MSBs) and for M2 (LSBs), which can be controlled by the choice of the respective rates (R1 , R2 ) of the two partial messages, under the constraint of the total rate R1 + R2 = R, and the choice of the distribution parameter α ∈ (0, 1/2) of the superposition coding. From (59), the ∗ best achievable quantized-MSE exponent Eq,spc (R) is bounded below by ∗ Eq,spc (R) ≥ max {(R1 ,R2 ,α): R1 +R2 =R, α∈(0,1/2)} ∗ ∗ min{EMSBs (R1 , R2 , α), ELSBs (R2 , α) + 2R1 }, (60) ∗ ∗ where EMSBs (R1 , R2 , α) and ELSBs (R2 , α) are the best achievable error exponents of Pr(M̂1 6= M1 ) and of Pr(M̂2 6= M2 |M̂1 = M1 ), respectively, with the superposition coding, as defined in (49). For a given α ∈ (0, 1/2), when we choose the rate R2 of the partial message M2 (LSBs) equal to C2 (α) = HB (α∗)−HB (), which is the maximum possible rate of M2 to guarantee Pr(M̂2 6= M2 |M̂1 = M1 ) → 0 as N → ∞, the resulting error exponent ∗ ∗ ELSBs (R2 , α) equals 0. This particular choice of R2 = C2 (α) provides a lower bound on Eq,spc (R) such that ∗ Eq,spc (R) ≥ max {α:α∈(0,1/2)} ∗ min{EMSBs (R − C2 (α), C2 (α), α), 2(R − C2 (α))}. (61) The optimization in the right-hand side is about finding the optimal value of the distribution parameter α ∈ (0, 1/2) of the superposition coding. ∗ In the theorem below, we prove that for a very noisy BSC() the quantized-MSE exponent Eq,spc (R) is strictly larger than that of random block coding, i.e., ∗ ∗ Eq,spc (R) > Eq,rc (R) = Er (R), (62) at high-rate regimes of R ∈ (E0 (1/2, )/3, C), by solving the optimization in the right-hand side of (61) and proving that ∗ this lower bound is greater than the best achievable quantized-MSE exponent Eq,rc (R) of random block coding. To prove this theorem, we use Lemma 6 where we showed that for a very noisy BSC() successive-cancellation decoding for superposition coding provides a strictly positive gain in the error exponent of M1 (MSBs) at every rate R1 ∈ (0, C − C2 (α)) of M1 (MSBs) when the rate R2 of M2 (LSBs) is fixed as R2 = C2 (α). Theorem 1: For a very noisy BSC() with  = 0.5 − δ for a sufficiently small δ > 0, the best achievable quantized∗ ∗ MSE exponent Eq,spc (R) of superposition coding is strictly larger than the best achievable quantized-MSE exponent Eq,rc (R) p of random block coding for every rate R ∈ (E0 (1/2, )/3, C) where E0 (1/2, ) = − ln(1/2 + (1 − )) ≈ C/6 and 18 2R E⇤q,rc (R) = Er (R) Eq,spc (R) ∗ (R) = E (R), E ∗ Fig. 9. A plot of Eq,rc r q,spc (R), and 2R for a BSC() with  = 0.45 where Eq,rc (R) is the best achievable quantized-MSE exponent ∗ (R) with superposition coding. For any with random block coding and Eq,spc (R) is a lower bound on the best achievable quantized-MSE exponent Eq,spc R ∈ (E0 (1/2, )/3, /C), there exists a gain in the achievable quantized-MSE exponent from superposition coding compared to that of random block coding. C = HB (1/2) − HB (). In particular, successive-cancellation (SC) decoding for superposition coding achieves the quantized∗ (R) for R ∈ (E0 (1/2, )/3, C), i.e., MSE exponent Eq,spc (R) that is strictly larger than Eq,rc ∗ ∗ Eq,spc (R) ≥ Eq,spc (R) > Eq,rc (R) = Er (R), (63) Eq,spc (R) = EMSBs,SC (R − C2 (α∗ ), α∗ ) (64) where for EMSBs,SC (R1 , α) in (54), C2 (α) = HB (α ∗ ) − HB () and α∗ ∈ (0, 1/2) satisfying R = C2 (α) + E0 (1/2,α∗) . 3 Proof: Appendix G In Fig 9, we provide a plot of Eq,spc (R) in (64) (dash-dot line), which is a lower bound on the best achievable quantized-MSE ∗ ∗ (R) in (44) (solid line), which is the best achievable quantized-MSE (R) with superposition coding, and Eq,rc exponent Eq,spc exponent with random block coding, with the line 2R (dashed line). Here we consider a BSC() with  = 0.45. We can observe that the achievable quantized-MSE exponent Eq,spc (R) with superposition coding is strictly larger than the best achievable ∗ quantized-MSE exponent Eq,rc (R) with random block coding, at every rate R ∈ (E0 (1/2, )/3, C), as stated in Theorem 1. We next consider the achievable MSE E[|X − X̂N,finite |2 ] with the superposition coding and demonstrate a gain in the MSE exponent in the high-rate regimes as compared to that of the random∗ block coding. As shown in (13) and (18) the MSE can be . written as a sum of the quantized MSE E[cq (X, X̂N,finite )] = e−N Eq,policy (R) and the estimation error from the finite-resolution estimator X̂N,finite as ∗ ∗ . . E[|X − X̂N,finite |2 ] = e−N Eq,policy (R) + e−N 2R = e−N min{Eq,policy (R),2R} . (65) ∗ ∗ As shown in (18), the MSE exponent EMSE,policy (R) and the quantized-MSE exponent Eq,policy (R) at a fixed rate R > 0 are related as ∗ ∗ EMSE,policy (R) = min{Eq,policy (R), 2R}. (66) ∗ When Eq,policy (R) > 2R, the MSE exponent at a fixed rate R is limited by the quantization error from the finite-resolution ∗ estimator of rate R. When Eq,policy (R) ≤ 2R, on the other hand, the MSE exponent is governed by the quantized-MSE exponent, which depends on the error exponents of decoding-error probabilities of the two partial messages (M1 , M2 ) of rates (R1 , R2 ) where R1 + R2 = R. ∗ ∗ For random block coding, since the quantized-MSE exponent Eq,rc (R) is equal to Er (R), the MSE exponent EMSE,rc (R) of random block coding equals ∗ EMSE,rc (R) = min{Er (R), 2R}. (67) For a very noisy BSC(), the decoding-error exponent Er (R) of random block coding can be approximated as (40). By using this approximation, we can show that, where  ∈ [0.5 − δ, 0.5] for a sufficiently small δ > 0, ( 2R, 0 ≤ R ≤ E0 (1/2, )/3, ∗ EMSE,rc (R) = (68) Er (R), E0 (1/2, )/3 < R ≤ C. 19 Fig. 10. Monte Carlo simulation for quantized-MSE E[cq (X, X̂N,finite )] of the querying policies based on superposition coding (dash-dot line) and of random block coding (solid line) as a function of the number of queries, where the rates (R1 , R2 ) of the partial messages (M1 , M2 ) are fixed as (R1 , R2 ) = (0.5(C − R2 ), 0.9C2 (α)) for capacity C of the BSC() and for the maximum achievable rate C2 (α) of M2 . The crossover probability  of the BSC() and the distribution parameter α of the superposition coding are set to be  = 0.3 and α = 0.1, respectively. The markers in each line indicate the simulation points in terms of (k1 , k2 ), the numbers of MSBs and of LSBs that are queried during the respective number N of queries, for N satisfying N = (k1 ln 2)/R1 = (k2 ln 2)/R2 . In this simulation, we checked five pairs of (k1 , k2 ) including (5, 4), (6, 5), (6, 6), (7, 7), and (8, 8) at the fixed rate pair (R1 , R2 ) with the increasing number of queries. The number of Monte Carlo trials at each simulation point is equal to 3000. ∗ (R) of the random block coding is dominated by In the low-rate regime of 0 ≤ R ≤ E0 (1/2, )/3, the MSE exponent EMSE,rc the estimation error from the finite-resolution estimator of rate R. On the other hand, in the high rate regime of E0 (1/2, )/3 < ∗ ∗ (R), which is equal to Er (R). R ≤ C, the MSE exponent EMSE,rc (R) is dominated by the quantized-MSE exponent Eq,rc ∗ We next consider the MSE exponent EMSE,spc (R) of superposition coding, which is equal to ∗ ∗ EMSE,spc (R) = min{Eq,spc (R), 2R}. (69) ∗ (R) Eq,spc of superposition coding is strictly larger than that In Theorem 1, we demonstrated that the quantized-MSE exponent ∗ ∗ (R) = Er (R) at any rate R ∈ (E0 (1/2, )/3, C) for a very noisy BSC(). (R) > Eq,rc of random block coding, i.e., Eq,spc ∗ Combining this result with the fact that EMSE,rc (R) = Er (R) > 2R in this regime of R ∈ (E0 (1/2, )/3, C), we can conclude ∗ ∗ that the MSE exponent EMSE,spc (R) with superposition coding is strictly larger than the MSE exponent EMSE,rc (R) of random block coding in R ∈ (E0 (1/2, )/3, C) for a very noisy BSC(). ∗ Corollary 1: For a very noisy BSC() with  = 0.5 − δ for a sufficiently small δ > 0, the MSE exponent EMSE,spc (R) with ∗ superposition coding is strictly larger than that of random block coding EMSE,rc (R) at any rate R ∈ (E0 (1/2, )/3, C), i.e, ∗ ∗ EMSE,spc (R) > EMSE,rc (R) = Er (R). (70) The non-adaptive block querying based on superposition coding thus achieves a strictly lager MSE exponent than that of random block coding, when the querying resolution of the block querying strategy scales as k = N R/ ln 2 bits for any rate R ∈ (E0 (1/2, )/3, C) over a very noisy BSC(). In Fig 9, we can see that the gain in the quantized-MSE exponent from superposition coding in R ∈ (E0 (1/2, )/3, C) also ∗ results in a gain in the MSE exponent in this high rate regime, since the MSE exponent EMSE,spc (R) of superposition coding ∗ is proven to be at least larger than Er (R) in this regime, which is equal to the MSE exponent EMSE,rc (R) of random block coding, as stated in Corollary 1. In this section, we focused our discussion on very noisy BSC()s and proved gains in the achievable convergence rates of estimation errors from superposition coding by using approximations of error exponents of decoding-error probabilities in the high-noise regime of  ∈ (1/2 − δ, 1/2) for a sufficiently small δ > 0. For other noise regimes, on the other hand, such a nice approximation of error exponents of decoding-error probabilities does not exist, and it is hard to compare the quantized-MSE exponent of superposition coding and that of random block coding. Instead, in the next section, we show empirical performances of the querying policies in mild-noise regimes by comparing the quantized MSE of superposition coding and that of random block coding. D. Simulations: Performance of Superposition Coding vs. Random Block Coding In this section, we compare the performance of two querying policies, one based on superposition coding, which provides two different levels of error protection for MSBs vs. LSBs in the dyadic expansion of the target variable, and the other based 20 TABLE I C OMPARISON OF FOUR DIFFERENT QUERYING POLICIES Policy Bisection policy Repetition policy Random block coding Superposition coding MSE convergence rate e−c1 N , c1 > 0 √ e−c2 N , c2 > 0 e−c3 N , c3 > 0 e−c4 N , c4 ≥ c3 > 0 Features Adaptive Non-adaptive, unequal error protection, no coding gain Non-adaptive, equal error protection, coding gain Non-adaptive, unequal error protection, coding gain on random block coding, which provides equal error protection to all the information bits in the dyadic expansion of the target variable. Fig. 10 shows the empirical performance of these two non-adaptive block querying policies by comparing the quantized MSE E[cq (X, X̂N,finite )] of superposition coding (dash-dot line) and that of random block coding (sold line) for a BSC() with  = 0.3, where the distribution parameter α of the superposition coding equals α = 0.1 and the rates of the two partial messages M1 (MSBs) and M2 (LSBs) are fixed as (R1 , R2 ) = (0.5(C − R2 ), 0.9C2 (α)) for C = HB (1/2) − HB () and C2 (α) = HB (α ∗ ) − HB (). We observe that the estimation error from the superposition coding is about one third of that of random block coding at the number of queries only about 200. Therefore, even though Theorem 1 states the performance gain from the UEP superposition coding in the asymptotic regime for very noisy BSCs, empirical simulations show that the idea of designing a non-adaptive querying policy by using the UEP superposition coding provides performance gains in estimating the target variable even in non-asymptotic regimes of the number of queries and for wider range of noise levels of BSCs. V. C OMPARISON B ETWEEN P ERFORMANCES O F THE F OUR D IFFERENT Q UERYING P OLICIES In this section, we summarize and compare the four different querying policies discussed in this paper, including the adaptive bisection policy (Section III-A), the non-adaptive UEP repetition policy (Section III-B), the non-adaptive block querying based on random block coding (Section III-C), and the non-adaptive block querying based on UEP superposition coding (Section IV). Table I summarizes the MSE convergence rates and features of the four policies. Only the bisection policy uses past answers from the oracle to design the next query, while the other three policies determine a set of queries non-adaptively. Among the three non-adaptive block-querying policies, repetition policy and the policy based on superposition coding provide unequal error protection for MSBs vs. LSBs in the dyadic expansion of the target variable, while the block-querying policy based on random block coding √ provides equal error protection for every information bit. Repetition policy achieves MSE decreasing exponentially only in N , while the other two non-adaptive block querying policies as well as the bisection policy achieve √ the linear in N exponential rate of decrease. This is because the optimal repetition policy can extract only k = O( N ) information bits reliably by N number of queries. Non-adaptive block-querying policies based on either random block coding or superposition coding, on the other hand, can extract up to k < N R bits for any positive rate 0 < R < C by N number of queries over a binary symmetric channel of capacity C. Furthermore, superposition coding achieves a better MSE exponent than that of random block coding by providing unequal error protection for information bits. We next compare the achievable quantized-MSE exponent at a fixed rate R > 0 for the three non-adaptive querying policies. ∗ • Non-adaptive UEP repetition querying: Eq,repetition (R) = 0 for every rate R > 0. ∗ • Non-adaptive block querying based on random block coding: Eq,rc (R) = Er (R) for Er (R) in (40), i.e., ( E0 (1/2, ) − R, 0 ≤ R < Rcrit (), Er (R) = (71) DB (γGV (R)k), Rcrit () ≤ R ≤ C. • ∗ Non-adaptive block querying based on superposition coding: Eq,spc (R) ≥ max{Er (R), Eq,spc (R)} where Eq,spc (R) := max min{EMSBs,SC (R − C2 (α), α), α∈(0,1/2) (72) 2(R − C2 (α))}, for EMSBs,SC (R1 , α) in (54). ∗ ∗ ∗ When we compare the three exponents Eq,repetition (R), Eq,rc (R), and Eq,spc (R) of the non-adaptive policies, we can show that ∗ ∗ ∗ Eq,spc (R) ≥ Eq,rc (R) ≥ Eq,repetition (R), (73) which implies that the non-adaptive block querying based on superposition coding can achieve better error rates of convergence ∗ ∗ for the quantized MSE than do the other two non-adaptive policies. The first inequality between Eq,spc (R) and Eq,rc (R) follows from the fact that random block coding is a special case of superposition coding where the parameter α equals 1/2. In Theorem 1, ∗ ∗ we also demonstrated a strictly positive gain Eq,spc (R) > Eq,rc (R) in the high rate regimes of R for a very noisy BSC() from ∗ the observation that the lower bound Eq,spc (R) in (72) satisfies Eq,spc (R) > Eq,spc (R) > Er (R). 21 Fig. 11. Monte Carlo simulation for quantized-MSE performance of the querying policies based on random block coding (solid line), superposition coding (dash-dot line), and bisection policy (dashed line) as a function of the number of queries, where the pair of resolution bits (k1 , k2 ) for the MSBs and LSBs of the value of the target variable is fixed as (k1 , k2 ) = (6, 6) for every N . The crossover probability  of the BSC() and the distribution parameter α of the superposition coding are set to  = 0.3 and α = 0.1, respectively. The number of Monte Carlo trials is equal to 3000. We next compare the performance between the adaptive bisection policy (BZ algorithm) and two non-adaptive querying policies, one based on random block coding and the other based on superposition coding. In Lemma III-A of Section III-A, we stated a lower bound on the quantized-MSE exponent for the adaptive BZ algorithm. But we cannot use this lower bound in comparing the performance between the adaptive BZ algorithm and the two non-adaptive policies, since the tightness of this lower bound was not proven. Instead, Monte Carlo simulations are provided to compare the empirical performance of these three policies. Fig. 11 shows a plot of the empirical quantized MSE E[cq (X, X̂N,finite )] of the two non-adaptive querying policies, random block coding (solid line) and superposition coding (dash-dot line), as well as that of the BZ algorithm (dashed line) as a function of the number N of queries, where the pair of resolution bits (k1 , k2 ) for the MSBs and LSBs of the value of the target variable is fixed as (k1 , k2 ) = (6, 6) for every N . It is observed that the bisection policy achieves the quantized MSE, one to three orders of magnitude smaller than those of the two non-adaptive policies with number of queries less than 200. The non-adaptive policy based on superposition coding achieves gain in the quantized MSE performance over that of the random block coding, but falls short of achieving as fast convergence rate as that of the adaptive bisection policy in the non-asymptotic regime of number of queries. VI. F UTURE D IRECTIONS In this paper, the problem of optimal query design was considered in the context of noisy 20 questions game with the goal of estimating the value of a continuous target variable. We proposed a new non-adaptive block-querying policy based on superposition coding that could not only extract k = N R/ ln 2 information bits (0 < R ≤ C) reliably over N uses of a BSC() of capacity C but also provide two levels of unequal error protection (UEP) for the information bits. Different from the √ UEP repetition querying policy considered in [2] where the best achievable quantized MSE decreases exponentially only in N where N is the number of queries, our non-adaptive querying policy based on superposition coding achieves linear in N exponential rate of decrease, matching the rate of the bisection-based adaptive 20 questions scheme. Moreover, the achievable MSE exponent is larger than that of random block coding, which provides equal error protection for every information bit. There are several open directions worthy of further study related to our work. First, the idea of designing a non-adaptive querying policy by using the UEP superposition coding can be applied to many other applications of data acquisition, possibly with diverse channel models, source (target) distributions, and cost functions. In applying the idea of UEP querying to general models of data acquisition, the important question is how to correctly assess the value (significance) of information bits that we try to extract by querying. For example, when a continuos random source, which we try to estimate, is not uniformly distributed over [0, 1], we need to first find the optimal quantization levels and the corresponding reproduction points with finite number of bits. Depending on the quantization levels and cost function, the significance of those information bits might be varying. We need to measure the correct value of those bits in estimating the target variable and design a UEP querying policy to provide different levels of error protection depending on the value of those information bits. Second, the proposed UEP querying policy based on superposition coding can be generalized to provide more than two levels of error protection. This generalization may also improve the achievable estimation error since the resulting UEP querying policy 22 would be able to use a fixed querying resource more efficiently by providing finer levels of error protection for information bits of different significance, compared to the two-level case we considered in this paper. Showing the improved performance, however, might require more complicated analysis on the error exponents of each of the partial messages. This generalization might also require development of more efficient decoding algorithms for the superposition codes. In our work, we mainly used successive-cancellation decoding rule, which is a sub-optimal decoding rule that successively decodes the two partial messages, public message (MSBs) and private message (LSBs). Compared to the optimal maximum-likelihood decoding for each of the partial messages, the successive-cancellation decoding is computationally more efficient and also easier to analyze. But when the number of levels of error protection and the corresponding number of partial messages are increased, the performance of the successive-cancellation decoding might become worse than the two-level case, since the decoding error of the previous stage might keep propagating to all the later stages. Therefore, we need to develop another type of decoding rule to overcome this kind of challenge. A PPENDIX A P ROOF OF P ROPOSITION 1: A DAPTIVE B ISECTION P OLICY Successive-entropy-minimization policies choose the most informative querying region Qi , which asks one bit of information about the target variable X at each round, by satisfying Pr(X ∈ Qi |Y1i−1 = y1i−1 ) = Pr(X ∈ / Qi |Y1i−1 = y1i−1 ) = 1/2 (74) for answers y1i−1 ∈ {0, 1}i−1 to previous queries. For a continuous random variable X ∼ p(x|y1i−1 ), there exist diverse ways to design such a querying region Qi satisfying the condition (74). We quantify the value of the resulting observation Yi by the predicted variance reduction, defined as Var(X|Y1i−1 = y1i−1 ) − E[Var(X|Yi , Y1i−1 = y1i−1 )]. (75) Note that E[Var(X|Yi , Y1i−1 = y1i−1 )] depends on the choice of Qi since the two possible posterior distributions of X, p(x|yi = 0, y1i−1 ) and p(x|yi = 1, y1i−1 ), after the i-th querying, are functions of the choice of Qi . The objective is to find the querying region Qi that not only satisfies (74) but also maximizes the predicted variance reduction (75). We aim to solve  max Var(X|Y1i−1 = y1i−1 ) − E[Var(X|Yi , Y1i−1 = y1i−1 )] . (76) Qi ∈A Q|Y1i−1 where A = {Q : Pr(X ∈ = y1i−1 ) = Pr(X ∈ / Q|Y1i−1 = y1i−1 ) = 1/2}. Proposition 1 states that the optimal Qi that is the solution of the optimization (76) is the querying region that corresponds to the bisection policy, i.e., the optimal Qi is right region of the median of p(x|y1i−1 ). For adaptive sequential querying, given answers y1i−1 to the previous queries (Q1 , . . . , Qi−1 ) we denote the updated posterior distribution p(x|y1i−1 ) of X by q(x) := p(x|y1i−1 ). Define a one-step encoding map d : [0, 1] → {0, 1} that maps the value of x ∈ [0, 1] to a binary bit Z = d(x). This encoding map d(·) is defined as the indicator function of the event X ∈ Q, i.e., d(x) = 1 for every x ∈ Q and d(x) = 0 for every x ∈ / Q. We derive the optimal one-step encoding map d(·) that maximally reduces the conditional variance of X ∼ q(x) given the noisy answer Y = Z ⊕ N where N ∼ Bernoulli(). The conditional variance of X given Y can be written as E[Var(X|Y )] = Pr(Y = 0)Var(X|Y = 0) + Pr(Y = 1)Var(X|Y = 1)     2 2 = Pr(Y = 0) E[X 2 |Y = 0] − (E[X|Y = 0]) + Pr(Y = 1) E[X 2 |Y = 1] − (E[X|Y = 1])   2 2 = E[X 2 ] − Pr(Y = 0) (E[X|Y = 0]) + Pr(Y = 1) (E[X|Y = 1]) . (77) Since E[X 2 ] does not depend on the encoding map d(·), to minimize E[Var(X|Y )] the encoding map d(·) should maximize 2 2 Gd := Pr(Y = 0) (E[X|Y = 0]) + Pr(Y = 1) (E[X|Y = 1]) . (78) After applying Bayes’ rule, Gd in (78) can be expressed in terms of the probabilities {Pr(Z = 0), Pr(Z = 1)} and the conditional expectations {E[X|Z = 0] = E[X|X ∈ Q], E[X|Z = 1] = E[X|X ∈ / Q]} as Gd = 1 2 ((1 − ) · Pr(Z = 0)E[X|Z = 0] +  · Pr(Z = 1)E[X|Z = 1]) Pr(Y = 0) 1 2 + ( · Pr(Z = 0)E[X|Z = 0] + (1 − ) · Pr(Z = 1)E[X|Z = 1]) . Pr(Y = 1) (79) 23 Note that both of {Pr(Z = 0), Pr(Z = 1)} and {E[X|Z = 0], E[X|Z = 1]} depend on the encoding map d(·) as Z Pr(Z = 0) = Pr(X ∈ / Qi ) = q(x)dx, d(x)=0 Z Pr(Z = 1) = Pr(X ∈ Qi ) = q(x)dx, d(x)=1 Z 1 E[X|Z = a] = xq(x)dx, for a = 0, 1. Pr(Z = a) d(x)=a (80) (81) (82) When m denotes the mean of X ∼ q(x), {Pr(Z = 0), Pr(Z = 1)} and {E[X|Z = 0], E[X|Z = 1]} should satisfy m = E[X] = Pr(Z = 0)E[X|Z = 0] + Pr(Z = 1)E[X|Z = 1]. (83) We show that among encoding maps d(·) with a fixed {Pr(Z = 0), Pr(Z = 1)} the encoding map that maximizes Gd in (79), which thus minimizes E[Var(X|Y )], under the constraint of (83) should be a step function. Lemma 7: Among encoding maps d : [0, 1] → {0, 1} with a fixed {Pr(Z = 0), Pr(Z = 1)}, the optimal encoding map that maximizes Gd in (78) under the constraint of (83) should maximize |E[X|Z = 0] − m|. For a fixed Pr(Z = 0), in order to maximize |E[X|Z = 0] − m| the optimal encoding map d : [0, 1] → {0, 1} should be either ( 0 x ≤ t1 d(x) = (84) 1 x > t1 Rt for the threshold t1 such that 0 1 q(x)dx = Pr(Z = 0), or ( 1 x ≤ t2 d(x) = (85) 0 x > t2 R1 for the threshold t2 such that t2 q(x)dx = Pr(Z = 0). Proof: Let us define β := Pr(Z = 0) and Aβ := E[X|Z = 0] for a fixed 0 ≤ β ≤ 1. From the constraints in (83), it becomes Pr(Z = 1)E[X|Z = 1] = m − βAβ . By using these parameters, we can rewrite Gd in (79) as 2 Gd = (βAβ + (1 − )(m − βAβ )) ((1 − )βAβ + (m − βAβ )) +  + (1 − 2)β (1 − ) − (1 − 2)β 2 (86) By rearranging terms in the numerator and denominator of Gd , we can simply Gd as (1 − 2)2 β 2 (Aβ − m)2 + m2 . (1 − ) + (1 − 2)2 β(1 − β) (87) Pr(Z = 0) = Pr(Z = 1) = 1/2. (88) Gd = Therefore, for a fixed (β, , m), Gd is maximized when Aβ is as far as possible from the mean m = E[X] of X ∼ q(x). For a fixed β = Pr(Z = 0), the optimal encoding map d : [0, 1] → {0, 1} that maximizes |Aβ − m| = |E[X|Z = 0] − m| should be a step function of either (84) or (85). For successive-entropy-minimization strategies that query one bit of information about the target variable X ∼ q(x) at each round, the probabilities of the event {Z = 0} and of {Z = 1} are balanced as The thresholds of the two step functions (84) and (85) for this case become the same as the median of the distribution. Lemma 7 thus implies that among policies satisfying (88), the adaptive bisection policy is the optimal one-step policy that minimizes the conditional variance of X given a noisy answer Y . A PPENDIX B P ROOF OF L EMMA 2: B IT-E RROR P ROBABILITY WITH R EPETITION C ODING In Lemma 2, we show that when a binary bit Bi ∼ Bernoulli(1/2) is repeatedly transmitted through a BSC() by Ni times, the decoding-error probability of Bi with the majority voting algorithm is bounded below and above as e−1/(3Ni ) −Ni DB (1/2k) √ e ≤ Pr(B̂i 6= Bi ) ≤ e−Ni DB (1/2k) . 2πNi (89) We first prove the upper bound. For bit Bi repeatedly queried Ni times, denote the corresponding channel outputs by (Y1 , . . . , YNi ) ∈ {0, 1}Ni and define Yj0 = 2Yj − 1 ∈ {−1, 1}. The majority voting claims an estimate B̂i = 1 when 24 PNi Yj0 ≤ 0. Since the channel is symmetric and Bi ∼ Bernoulli(1/2), the bit error Yj0 > 0, and B̂i = 0 when j=1 probability can be bounded above as PNi j=1 Pr(B̂i 6= Bi )     Ni Ni X X 1 1 = Pr  Yj0 > 0 Bi = 0 + Pr  Yj0 ≤ 0 Bi = 1 2 2 j=1 j=1   Ni X ≤ Pr  Yj0 ≤ 0 Bi = 1 (90) j=1  PNi 0 = Pr e−λ j=1 Yj ≥ 1 Bi = 1 , for λ > 0 h i PNi 0 ≤ E e−λ j=1 Yj Bi = 1 ,  where the last inequality is from the Markov’s inequality. Using the conditional independence of Y10 , . . . , YN0 i given Bi = 1 and the fact that Pr(Yj0 = 1|Bi = 1) = 1 −  and Pr(Yj0 = −1|Bi = 1) = , Ni h h i Y i PNi 0 0 E e−λ j=1 Yj Bi = 1 = E e−λYj Bi = 1 j=1 = Ni Y j=1 (91)  (1 − )e−λ +  · eλ . q p  −λ +  · eλ is minimized as 2 (1 − ) = e−DB (1/2k) . Therefore, the bit-error When λ = ln 1−  , the term (1 − )e probability can be bounded above as   Ni Y  (1 − )e−λ +  · eλ  Pr(B̂i 6= Bi ) ≤ min  λ (92) j=1 = e−Ni DB (1/2k) . We next prove the lower bound in (89). The bit error probability can be bounded below as   Ni X 1 Pr(B̂i 6= Bi ) ≥ Pr  Yj0 = 0 Bi = 1 , 2 j=1 (93) P  Ni 0 where Pr j=1 Yj = 0 Bi = 1 is the probability of the event that a half of the transmitted bits are flipped by the channel noise, which is distributed by Bernoulli() distribution. This probability is bounded below as   Ni X Pr  Yj0 = 0 Bi = 1 j=1   Ni Ni /2 (1 − )Ni /2 Ni /2 r 2 −1/(3Ni ) Ni Ni /2 e 2  (1 − )Ni /2 ≥ πNi r 2 −1/(3Ni ) −Ni DB (1/2k) = e e πNi = (94) where the middle inequality is from the Stirling bound. By plugging this lower bound into (93), we obtain e−1/(3Ni ) −Ni DB (1/2k) Pr(B̂i 6= Bi ) ≥ √ e . 2πNi (95) 25 A PPENDIX C P ROOF OF L EMMA 4: QUANTIZED -MSE EXPONENT WITH R ANDOM B LOCK C ODING In Lemma 4, we show that the best achievable quantized-MSE exponent with the random block codes of rate R is ∗ Eq,rc (R) = Er (R) (96) for Er (R) in (40). The achievability of (96) was shown by the bound (42). In this section we prove the converse, i.e., the quantized-MSE exponent with the random block codes of rate R cannot be better than Er (R). We prove this by providing a lower bound on the quantized MSE. Consider the quantized MSE expanded in terms of the conditional bit-error probabilities. E[cq (X, X̂N,finite )] k   X = Pr(B̂i 6= Bi , B̂1i−1 = B1i−1 )E[cq (X, X̂N,finite ) B̂i 6= Bi , B̂1i−1 = B1i−1 ] . (97) i=1 . Since Pr(M̂ = M ) → 1 as N → ∞ for the random block codes of rate R ∈ (0, C), we know that Pr(B̂1i = B1i ) = 1 for any i = 1, . . . , k. Therefore, we can write E[cq (X, X̂N,finite )] as E[cq (X, X̂N,finite )] k   . X = Pr(B̂i 6= Bi |B̂1i−1 = B1i−1 )E[cq (X, X̂N,finite ) B̂i 6= Bi , B̂1i−1 = B1i−1 ] . (98) i=1 We then show that the first term of the summation in the right-hand side is ˙ −N Er (R) , Pr(B̂1 6= B1 )E[cq (X, X̂N,finite )|B̂1 6= B1 ]≥e for the random coding error exponent Er (R). Note that Pr(B̂1 6= B1 ) ≤ Pr(M̂ 6= M ) ≤ k X i=1 Pr(B̂i 6= Bi ). (99) (100) The average bit error probability Pr(B̂i 6= Bi ) for the random block codes is the same for every i ∈ {1, . . . , k} from the symmetry of encoding process for the information bits {Bi }. Since k = N R/ ln 2 increases linearly in N , the exponent of . . Pr(B̂1 6= B1 ) is the same as that of Pr(M̂ 6= M ) = e−N Er (R) , i.e., Pr(B̂1 6= B1 ) = e−N Er (R) . Moreover, . E[cq (X, X̂N,finite )|B̂1 6= B1 ] = 1. (101) This can be shown by calculating a lower bound on E[cq (X, X̂N,finite )|B̂1 6= B1 ]. When B̂1 = 1 and B1 = 0, the best X̂N that minimizes the conditional expectation is X̂N = 1/2. Conditioned on B1 = 0, X is uniformly distributed over [0, 1/2], and thus Z 1/2 (102) E[cq (X, X̂N )|B̂1 = 1, B1 = 0] ≥ 2(x − 1/2)2 dx = 1/12. 0 The same bound also holds when B̂1 = 0 and B1 = 1. From this lower bound on E[cq (X, X̂N )|B̂1 = 1, B1 = 0] and the bit . error probability Pr(B̂1 6= B1 ) = e−N Er (R) , the lower bound in (99) can be proven. From the bound (99) and the expansion on E[cq (X, X̂N,finite )] in (98), we can conclude that ˙ −N Er (R) . E[cq (X, X̂N,finite )]≥e (103) A PPENDIX D P ROOFS OF L EMMA 5: DECODING - ERROR EXPONENTS OF PARTIAL M ESSAGES E NCODED BY S UPERPOSITION C ODING In Lemma 5, we show that superposition coding provides a better, or at least as good, error protection for the more important partial message M1 (MSBs) than that of the random block coding. We provide two lower bounds EMSBs,JML (R1 , R2 ) and ∗ EMSBs,SC (R1 , α) on the best achievable error exponent EMSBs (R1 , R2 , α) and prove that these exponents are larger than the best achievable exponent Er (R1 + R2 ) of random block coding. The first lower bound EMSBs,JML (R1 , R2 ) is defined as the best achievable error exponent for Pr(M̂1 6= M1 ) with jointmaximum-likelihood (JML) decoding rule for superposition coding. We show that EMSBs,JML (R1 , R2 ) ≥ Er (R1 + R2 ) for every (R1 , R2 , α) in the following lemma. 26 Er (R) EMSBs,SC (R1 , ↵) at R2 = 2C2 (↵)/3 E0 (1/2, ✏) E0 (1/2, ↵ ⇤ ✏) R2,th (↵, ✏) R1,th (R2 , ↵, ✏) R2 R = R1 + R2 Fig. 12. A plot of error exponents Er (R1 + R2 ) (solid line) and EMSBs,SC (R1 , α) (dash-dot line) for the more important partial message M1 (MSBs) with random block coding and with superposition coding, respectively, where  = 0.45, α = 0.11, and R2 = 2C2 (α)/3. The error exponent EMSBs,SC (R1 , α) of superposition coding is strictly larger than that of the random block coding Er (R1 , R2 ) over R1 ∈ (0, R1,th (R2 , α, )) for a fixed R2 = 2C2 (α)/3 > R2,th (α, ). Lemma 8: For a given (R1 , R2 , α), the best achievable error exponent EMSBs,JML (R1 , R2 ) with joint-ML decoding rule for superposition coding is bounded below as LB EMSBs,JML (R1 , R2 ) ≥ EMSBs,JML (R1 , R2 ) (104) where ( LB EMSBs,JML (R1 , R2 ) = E0 (1/2, ) − R2 − R1 , R1 ≤ max{0, Rcrit () − R2 }, DB (γGV (R1 + R2 )k), max{0, Rcrit () − R2 } < R1 ≤ HB (1/2) − HB () − R2 . (105) Proof: Appendix F LB Note that for any given (R1 , R2 , α) the achievable exponent EMSBs,JML (R1 , R2 ) is equal to Er (R1 + R2 ) in (40). Since the LB joint-maximum-likelihood decoding is a sub-optimal decoding rule, the fact that EMSBs,JML (R1 , R2 ) ≥ EMSBs,JML (R1 , R2 ) = Er (R1 + R2 ) implies that the superposition coding provides a better, or at least as good, error protection for the partial message M1 than that of the random block coding for every (R1 , R2 ), regardless of the choice of α ∈ (0, 1/2). ∗ We next prove a strictly positive gain in the error exponent EMSBs (R1 , R2 , α) of superposition coding, by providing another ∗ lower bound EMSBs,SC (R1 , α) on EMSBs (R1 , R2 , α). The exponent EMSBs,SC (R1 , α) is the best achievable error exponent with successive-cancellation (SC) decoding. As shown in Eq. (54), the exponent can be written as ( E0 (1/2, α ∗ ) − R1 , 0 ≤ R1 ≤ Rcrit (α ∗ ), EMSBs,SC (R1 , α) = (106) DB (γGV (R1 )kα ∗ ), Rcrit (α ∗ ) < R1 ≤ C − C2 (α), p √ √ where E0 (a, b) = − ln(1 − 2a(1 − a)( b − 1 − b)2 ) and thus E0 (1/2, α ∗ ) = − ln(1/2 + (α ∗ )(1 − (α ∗ ))), C = √ √ HB (1/2) − HB (), C2 (α) = HB (α ∗ ) − HB (), Rcrit (α ∗ ) = DB (γcrit (α ∗ )k1/2) and γcrit (α ∗ ) = √α∗+α∗ . 1−α∗ By comparing EMSBs,SC (R1 , α) in (106) with the error exponent Er (R1 + R2 ) in (40) of random block coding, we show that for a sufficiently large R2 and sufficiently small R1 superposition coding provides a strictly better error protection for the partial message M1 than does random block coding. More precisely, for a given α ∈ (0, 1/2) and a fixed  ∈ (0, 1/2), we find thresholds R2,th (α, ) on R2 and R1,th (R2 , α, ) on R1 such that when R2,th (α, ) < R2 < C2 (α) and 0 ≤ R1 < R1,th (R2 , α, ), it is guaranteed that EMSBs,SC (R1 , α) > Er (R1 + R2 ). (107) The threshold on R2 , denoted R2,th (α, ), is defined as the rate R at which the random-coding error exponent Er (R) equals the error exponent EMSBs,SC (0, α) = E0 (1/2, α ∗ ) of superposition coding at R1 = 0. For a fixed rate R2 > R2,th (α, ), the threshold on R1 denoted R1,th (R2 , α, ), is defined as the minimum rate R1 where the error exponent EMSBs,SC (R1 , α) of superposition coding equals the random-coding error exponent Er (R1 +R2 ). There always exists such a threshold R1,th (R2 , α, ) in the range [0, C −R2 ] since both EMSBs,SC (R1 , α) and Er (R1 +R2 ) keeps decreasing as R1 increases and EMSBs,SC (R1 , α) > Er (R1 +R2 ) at R1 = 0 and EMSBs,SC (R1 , α) = Er (R1 +R2 ) as R1 approaches to C −R2 . In Fig. 12, we plot EMSBs,SC (R1 , α) (dash-dot line) and Er (R1 + R2 ) (solid line) for α = 0.11,  = 0.45 and R2 = 2C2 (α)/3 > R2,th (α, ). From the plot, we can observe a gain in the error exponent of Pr(M̂1 6= M1 ) from superposition coding for every 0 ≤ R1 ≤ R1,th (R2 , α, ) at 27 a fixed R2 = 2C2 (α)/3 > R2,th (α, ). From the plot, we can also see how the thresholds R2,th (α, ) and R1,th (R2 , α, ) are determined for this particular example. Lastly, we state a lower bound on the error exponent ELSBs,SC (R2 , α) of Pr(M̂2 6= M2 |M̂1 = M1 ) with successivecancellation decoding rule for superposition coding. This result was provided in [20]: ELSBs,SC (R2 , α) := max [F0 (ρ, α) − ρR2 ] (108)   1+ρ     X  X 1  F0 (ρ, α) = − ln pV (v)pY |V (y|v) 1+ρ    y∈{0,1} v∈{0,1}  (109) 0≤ρ≤1 where for pV (v) being Bernoulli(α) distribution and pY |V (y|v) being the transition probability of BSC(). We can show that ELSBs,SC (R2 , α) > 0 for R2 < C2 (α) where C2 (α) is equal to C2 (α) = ∂F0 (ρ, α) ∂ρ ρ=0 = HB (α ∗ ) − HB (). (110) Note that as α decreases from 1/2 to 0, the maximum rate C2 (α) of the less important partial message M2 (LSBs) keeps decreasing. A PPENDIX E P ROOF OF L EMMA 6: G AIN IN THE DECODING - ERROR EXPONENT OF MSB S FROM S UPERPOSITION C ODING FOR A V ERY N OISY BSC() In Lemma 6, we show that for a very noisy BSC() with  = 1/2 − δ for a sufficiently small δ > 0, superposition coding achieves a strictly positive gain in the error exponent of Pr(M̂1 6= M1 ) for every rate R1 ∈ (0, C − C2 (α)) of the more important message M1 (MSBs) compared to that of random block coding, when the rate R2 of the less important message M2 (LSBs) equals the maximum rate C2 (α) = HB (α ∗ ) − HB () for a fixed parameter α ∈ (0, 1/2) of superposition coding. When we fix R2 = C2 (α), the best achievable Pr(M̂1 6= M1 ) of random block coding at a rate R1 ∈ [0, C − C2 (α)] is . Pr(M̂1 6= M1 ) = e−N Er (R1 +R2 ) (111) where ( Er (R1 + R2 ) = E0 (1/2, ) − C2 (α) − R1 , 0 ≤ R1 ≤ max{0, Rcrit () − C2 (α)}, DB (γGV (R1 + C2 (α))k), max{0, Rcrit () − C2 (α)} < R1 ≤ C − C2 (α), (112) p for E0 (1/2, ) = ln 2−ln(1+2 (1 − )), C = HB (1/2)−HB (), C2 (α) = HB (α∗)−HB () and Rcrit () = DB (γcrit ()k1/2) √  √ √ where γcrit () = + 1− . With superposition coding and successive cancellation (SC) decoding, we can achieve ˙ −N EMSBs,SC (R1 ,α) Pr(M̂1 6= M1 )≤e (113) E0 (1/2, α ∗ ) − R1 , 0 ≤ R1 ≤ Rcrit (α ∗ ), DB (γGV (R1 )kα ∗ ), Rcrit (α ∗ ) < R1 ≤ C − C2 (α), (114) where ( EMSBs,SC (R1 , α) = for the Gilbert-Varshamov distance γG (R) ∈ [0, 1/2] that is defined as DB (γGV (R)k1/2) = R. To prove that EMSBs,SC (R1 , α) > Er (R1 + R2 ) for every R1 ∈ [0, C − C2 (α)) at R2 = C2 (α), we need to demonstrate the following three statements for  ≈ 0.5 at every α ∈ (0, 1/2), 1) E0 (1/2, α ∗ ) > E0 (1/2, ) − C2 (α). 2) E0 (1/2, α ∗ ) − R1 > DB (γGV (R1 + C2 (α))k) for 0 ≤ R1 ≤ Rcrit (α ∗ ) when Rcrit () < C2 (α). 3) DB (γGV (R1 )kα ∗ ) > DB (γGV (R1 + C2 (α))k) for Rcrit (α ∗ ) < R1 < C − C2 (α). Once these three statements are proven, it is sufficient to show that EMSBs,SC (R1 , α) > Er (R1 + R2 ) for every 0 ≤ R1 ≤ C − C2 (α) when R2 = C2 (α). The first statement 1) E0 (1/2, α ∗ ) > E0 (1/2, ) − C2 (α) is equivalent to √ √ √ √ (115) HB (α ∗ ) − ln( α ∗  + 1 − α ∗ )2 > HB () − ln(  + 1 − )2 . √ √ When we define f (x) = HB (x) − ln( x + 1 − x)2 , the above inequality is equivalent to f (α ∗ ) − f () > 0. Note that 0 ≤  < α ∗  ≤ 1/2 for every α ∈ (0, 1/2). Moreover, the derivative of f (x) is positive in the regime of 0.05 ≤ x ≤ 1/2. Therefore, for a BSC() with  ≥ 0.05, the statement 1) E0 (1/2, α ∗ ) > E0 (1/2, ) − C2 (α) is true. 28 We next prove the statement 3) DB (γGV (R1 )kα ∗ ) > DB (γGV (R1 + C2 (α))k) for Rcrit (α ∗ ) < R1 < C − C2 (α) = HB (1/2) − HB (α ∗ ), which will also be used to prove the statement 2) later. First, note that at R1 = HB (1/2) − HB (α ∗ ), DB (γGV (R1 )kα ∗ ) = DB (γGV (R1 + C2 (α))k) = 0 from the definition of γGV (R). We will prove that DB (γGV (R1 )kα ∗ ) − DB (γGV (R1 + C2 (α))k) strictly decreases in R1 ∈ (Rcrit (α ∗ ), HB (1/2) − HB (α ∗ )]. Since DB (γGV (R1 )kα ∗ ) = DB (γGV (R1 + C2 (α)k) = 0 at R1 = HB (1/2) − HB (α ∗ ), the fact that the difference between the two divergences strictly decreases implies the statemenet 3). To show that DB (γGV (R1 )kα ∗ ) − DB (γGV (R1 + C2 (α))k) keeps decreasing as R1 increases, we will show that ∂ ∂ DB (γGV (R1 )kα ∗ ) < DB (γGV (R1 + C2 (α))k). (116) ∂R1 ∂R1 From the definition of γGV (R), it satisfies ln 2 + γGV (R) ln γGV (R) + (1 − γGV (R)) ln(1 − γGV (R)) = R. By differentiating both sides by γGV (R) and re-arranging the terms, we get ∂γGV (R) 1 = − 1−γ (R) . GV ∂R ln (117) γGV (R) From ∂ ∂x DB (xky) = ln  x 1−y 1−x y  and (117), we have ln 1−α∗ ∂ DB (γGV (R1 )kα ∗ ) = 1 − 1−γα∗(R ) , ∂R1 ln γGVGV(R1 )1 ln 1− ∂ DB (γGV (R1 + C2 (α))k) = 1 − 1−γ (R +C (α)) . 1 2 ∂R1 ln γGVGV(R1 +C 2 (α)) (118) Therefore, showing (116) is equivalent to showing GV (R1 +C2 (α)) ln 1−γ ln 1− γGV (R1 +C2 (α))  . < GV (R1 ) ln 1−α∗ ln 1−γ α∗ γGV (R1 ) (119) To prove this inequality, we will first show that γGV (R1 ) − γGV (R1 + C2 (α)) ≥ α ∗  −  (120) Note that α ∗  = γGV (HB (1/2) − HB (α ∗ )) and  = γGV (HB (1/2) − HB ()). Therefore, (120) can be written as γGV (R1 ) − γGV (R1 + C2 (α)) ≥ γGV (HB (1/2) − HB (α ∗ )) − γGV (HB (1/2) − HB ()). (121) Note that γGV (R) ∈ [0, 1/2] is convex and decreasing in R ≥ 0. Moreover, we know that (HB (1/2) − HB ()) − (HB (1/2) − HB (α ∗ )) = C2 (α). Since we consider the regime where R1 ≤ HB (1/2) − HB (α ∗ ), from the convexity of γGV (R), the inequality in (121) can be implied. Again, since α ∗  −  = γGV (HB (1/2) − HB (α ∗ )) − γGV (HB (1/2) − HB ()), for c := α ∗  − , we have γGV (R1 + C2 (α)) ≤ γGV (R1 ) − c ≤ 1/2 from (121). Since ln 1−x x is decreasing in 0 ≤ x ≤ 1/2 and γGV (R1 + C2 (α)) ≤ γGV (R1 ) − c ≤ 1/2, we have GV (R1 )−c) ln 1−(γ (γGV (R1 )−c) GV (R1 ) ln 1−γ γGV (R1 ) ≤ GV (R1 +C2 (α)) ln 1−γ γGV (R1 +C2 (α)) GV (R1 ) ln 1−γ γGV (R1 ) . (122) Therefore, to prove (119), it is sufficient to show that GV (R1 )−c) ln 1−(γ ln 1− (γGV (R1 )−c)  . < GV (R1 ) ln 1−α∗ ln 1−γ α∗ γGV (R1 ) (123) Since α ∗  < γGV (R1 ) and  = α ∗  − c, if we can prove that ln 1−(x−c) (x−c) ln 1−x x (124) is increasing in x ∈ [α ∗ , 1/2], the inequality in (123) holds. We will prove this by showing that the derivative of (124) in x is positive for a very noisy BSC() with  ≈ 1/2. The derivative of (124) is positive iff −1 1−x 1 1 − (x − c) ln + ln > 0. (x − c)(1 − (x − c)) x x(1 − x) (x − c) (125) 29 From α ∗  =  + α(1 − 2), when  ≈ 1/2 it is implied that c = α ∗  −  ≈ 0 and α ∗  ≈ 1/2. Therefore, in the regime of α ∗  ≤ x ≤ 1/2, c/x ≈ 0 and c/(1 − x) ≈ 0. In this regime, we can approximate the terms in the left-hand side of (125) as   c (1 − x) 1 + 1−x 1 − (x − c) 1−x c c  ln = ln = ln + + + O(c2 ), (126) (x − c) x 1−x x x 1 − xc   −1 −1 −1 1 c(1 − 2x) 2   = = 1 + + O(c ) . (127) (x − c)(1 − (x − c)) x(1 − x) 1 − c  1 + c x(1 − x) x(1 − x) x 1−x By plugging these approximations, the left-hand side of (125) is approximated as   1−x c 1 − (1 − 2x) ln + O(c2 ). x2 (1 − x)2 x (128) Since 0 < (1 − 2x) ln 1−x x  1 for x = 1/2 − δ for an arbitrarily small δ > 0, it can be shown that (128) is positive. This implies that (125) is valid for the very noisy channel, and thus (123) is true. This concludes the proof for the statement 3) DB (γGV (R1 )kα ∗ ) > DB (γGV (R1 + C2 (α))k) for Rcrit (α ∗ ) < R1 < C − C2 (α) = HB (1/2) − HB (α ∗ ). Lastly, we prove the statement 2) E0 (1/2, α ∗ ) − R1 > DB (γGV (R1 + C2 (α))k) for 0 ≤ R1 ≤ Rcrit (α ∗ ) when Rcrit () < C2 (α). Statement 3) implies that at R1 = Rcrit (α ∗ ), E0 (1/2, α ∗ ) − R1 > DB (γGV (R1 + C2 (α)k), since E0 (1/2, α∗)−R1 = DB (γGV (R1 )kα∗) at R1 = Rcrit (α∗). When Rcrit () < C2 (α), the derivative of DB (γGV (R1 +C2 (α)) in R1 ∈ [0, Rcrit (α ∗ )] is ∂ DB (γGV (R1 + C2 (α))k) ≤ 0. (129) −1< ∂R1 ∂ (E0 (1/2, α ∗)−R1 ) = −1. Since (E0 (1/2, α ∗)−R1 ) On the other hand, the derivative of (E0 (1/2, α ∗)−R1 ) in R1 is ∂R 1 decreases faster than DB (γGV (R1 + C2 (α))k) in R1 ∈ [0, Rcrit (α ∗ )], while (E0 (1/2, α ∗ ) − R1 ) is still greater than DB (γGV (R1 + C2 (α))k) at R1 = Rcrit (α ∗ ), it is implied that E0 (1/2, α ∗ ) − R1 > DB (γGV (R1 + C2 (α))k) (130) in R1 ∈ [0, Rcrit (α ∗ )]. We proved the three statements 1), 2) and 3), and these three statements imply the Lemma 6. A PPENDIX F P ROOF OF L EMMA 8: A L OWER B OUND ON THE DECODING - ERROR EXPONENT OF THE M ORE I MPORTANT PARTIAL M ESSAGE WITH J OINT-ML D ECODING RULE FOR S UPERPOSITION C ODING In Lemma 8, we show that the decoding-error exponent EMSBs,JML (R1 , R2 ) of the more important partial message M1 (MSBs) with joint-ML decoding rule for superposition coding is bounded below as LB EMSBs,JML (R1 , R2 ) ≥ EMSBs,JML (R1 , R2 ) (131) where ( LB EMSBs,JML (R1 , R2 ) = E0 (1/2, ) − R2 − R1 , R1 ≤ max{0, Rcrit () − R2 }, DB (γGV (R1 + R2 )k), max{0, Rcrit () − R2 } < R1 ≤ HB (1/2) − HB () − R2 . (132) In this section, we prove this lemma. Consider superposition codes composed of codewords {z(m1 ,m2 ) }, m1 ∈ {0, . . . , eN R1 −1}, m2 ∈ {0, . . . , eN R2 −1}, where (m1 ,m2 ) z = u(m1 ) ⊕ v(m2 ) and u(m1 ) consists of N i.i.d. symbols of Bernoulli(1/2) distribution and v(m2 ) of Bernoulli(α) distribution for α ∈ (0, 1/2). Without loss of generality, we suppose that z(0,0) is the correct codeword, which is transmitted by N uses of a BSC(), and analyze the decoding-error probability of m1 = 0. Given the received word y = z(0,0) ⊕ n, the joint maximum likelihood decoding rule finds a unique codeword z(m̂1 ,m̂2 ) that is closest to y. When we denote the decoded message as (m̂1 , m̂2 ), the decoding error happens only when m̂1 6= 0, regardless of whether or not m̂2 = 0. The decoding-error event of the partial message M1 , denoted EJML , occurs if there exists a codeword z(m1 ,m2 ) with m1 6= 0 whose distance from y is less than or equal to the minimum of all distances between y and z(m1 ,m2 ) for m1 = 0, i.e., when the minimum distance between y and any incorrect codeword z(m1 ,m2 ) with m1 6= 0 is N δ and the minimum distance between y and any codeword z(m1 ,m2 ) with m1 = 0 is N τ , the decoding error occurs for the event EJML = {δ ≤ τ }. Because only the distances of codewords from y matter, we consider the “output-centered analysis” proposed in [16] where all codewords are translated by y. Let w(m1 ,m2 ) = z(m1 ,m2 ) ⊕ y = z(m1 ,m2 ) ⊕ z(0,0) ⊕ n denote the translated codewords. For the correct (m1 , m2 ) = (0, 0), the translated codeword w(0,0) is equal to the channel noise word n and is independent of y. The set of translated codewords for m1 = 0, w(0,m2 ) = v(m2 ) ⊕ v(0) ⊕ n, are independent of y but dependent on n. Moreover, {w(0,m2 ) }, m2 ∈ {0, . . . , eN R2 − 1} are mutually dependent. The rest of the translated codewords with m1 6= 0, 30 i.e., {w(m1 ,m2 ) } for m1 ∈ {1, . . . , eN R1 − 1} and m2 ∈ {0, . . . , eN R2 − 1}, are independent of y, n, and {w(0,m2 ) } for m2 ∈ {0, . . . , eN R2 − 1}. However, the codewords {w(m1 ,m2 ) }, m2 ∈ {0, . . . , eN R2 − 1}, for a fixed m1 are mutually dependent. Lastly, all possible received words y are equiprobable: p(y) = 2−N . The probability distribution of the decoding system consisting of the translated codewords and a received word y is thus decomposed as p({w(0,m2 ) }, y, {w(m1 6=0,m2 ) }) = 2−N p({w(0,m2 ) })p({w(m1 6=0,m2 ) }). (133) Therefore, we can think of the whole decoding system as the one consisting of two independent subsystems, one comprising the translated codewords with m1 = 0 and the other comprising the translated codewords with m1 6= 0. We analyze the lower bound on the decoding-error probability of M1 with the joint-ML decoding rule by using the fact that {w(0,m2 ) } and {w(m1 6=0,m2 ) } are independent. The decoding-error event EJML occurs if the minimum weight N τ of {w(0,m2 ) } is greater than or equal to the minimum weight N δ of {w(m1 6=0,m2 ) }, i.e., EJML = {δ ≤ τ }. Define an error event Eγ = {δ ≤ γ ≤ τ } for a fixed γ ∈ Γ = {γ : 0 ≤Pγ ≤ 1, N γ ∈ N0 } for the set N0 of non-negative integers. The decoding-error probability is equal to Pr(EJML ) = Pr(δ ≤ τ ) = γ∈Γ Pr(Eγ ). We first analyze Pr(Eγ ) and then find the typical γ that dominates the exponentially decreasing rate of Pr(EJML ) in the asymptotic regime. From the independency between {w(0,m2 ) } and {w(m1 6=0,m2 ) }, Pr(Eγ ) = Pr(δ ≤ γ) Pr(τ ≥ γ). (134) We first establish an upper bound on Pr(δ ≤ γ). Note that N δ = min(m1 6=0,m2 )wH w(m1 ,m2 where wH (·) is the Hamming weight of the sequence. We need to analyze the distribution of wH w(m1 6=0,m2 ) . Note that every symbol of every w(m1 6=0,m2) is equiprobable. By the Chernoff exponent lemma, for γ < 1/2, the probability that the Hamming weight wH w(m1 6=0,m2 ) of a given incorrect codeword w(m1 6=0,m2 ) is less than or equal to N γ is   . Pr wH (w(m1 6=0,m2 ) ) ≤ N γ = e−N DB (γk1/2) . (135) Since there are (eN R − eN R2 ) codewords with m1 6= 0, by the union bound   m1 6=0,m2 Pr(δ ≤ γ) = Pr min wH (w ) ≤ Nγ (m1 6=0,m2 ) ( −N (DB (γk1/2)−R) , γ ≤ γGV (R), ˙ e ≤ 1, γ > γGV (R).  ) (136) We next analyze Pr(τ ≥ γ) where τ = min(m1 =0,m2 ) wH (w(m1 ,m2 ) ). The translated correct codeword w(0,0) is equal to n and is distributed by p(n) = wH (n) (1 − )N −wH (n) . (137) Therefore, for γ > , by the Chernoff exponent lemma we have . Pr(wH (n) ≥ N γ) = e−N DB (γk) . (138)  (m1 =0,m2 ) (m1 =0,m2 ) N R2 The event τ ≥ γ occurs when the Hamming weight wH w of every codeword {w , 0 ≤ m2 ≤ e − 1} is greater than or equal to N γ. Therefore, for  < γ < 1/2,   (m1 =0,m2 ) min wH (w ) ≥ Nγ Pr(τ ≥ γ) = Pr (m1 =0,m2 ) (139) . ≤ Pr(wH (n) ≥ N γ) = e−N DB (γk) . This bound may not be exponentially tight for 0 ≤ α < 1/2. However, when α = 1/2, since {w(0,m2 6=0) , n} are independent to each other and every symbol of every w(0,m2 6=0) is independent and equiprobable, for  < γ < 1/2   . Pr wH (w(0,m2 6=0) ) ≥ N γ = 1. (140) Therefore, for the case of α = 1/2, the upper bound in (139) becomes exponentially tight. From (133), (135) and (139), ( −N (DB (γk)+DB (γk1/2)−R) ,  < γ ≤ γGV (R), ˙ e Pr(Eγ )≤ (141) −N DB (γk) e , γ > γGV (R). P By using this result, we calculate the achievable error exponent of Pr(EJML ) = γ∈Γ Pr(Eγ ) by finding γ that dominates the exponentially decreasing rate of Pr(EJML ) as N increases. The resulting Pr(EJML ) is ( −N (E0 (1/2,)−R) , 0 ≤ R < Rcrit (), ˙ e Pr(EJML )≤ (142) −N DB (γGV (R)k) e , Rcrit () ≤ R < C, 31 p √ √ where E0 (a, b) = − ln(1 − 2a(1 − √a)( b − 1 − b)2 ) and thus E0 (1/2, ) = ln 2 − ln(1 + 2 (1 − ). And, Rcrit () = DB (γcrit ()k1/2) with γcrit () = √+√1− , and C = HB (1/2) − HB (). Therefore, the best achievable error exponent EMSBs,JML (R1 , R2 ) with joint ML decoding for superposition coding of rates LB (R1 , R2 ) is bounded below as EMSBs,JML (R1 , R2 ) ≥ EMSBs,JML (R1 , R2 ) where LB EMSBs,JML (R1 , R2 ) = ( E0 (1/2, ) − R2 − R1 , R1 < max{0, Rcrit () − R2 }, DB (γGV (R1 + R2 )k), max{0, Rcrit () − R2 } ≤ R1 < HB (1/2) − HB () − R2 . (143) A PPENDIX G P ROOF OF T HEOREM 1: G AINS IN THE QUANTIZED -MSE EXPONENT FROM S UPERPOSITION C ODING In Theorem 1, we show that for a very noisy BSC() with  = 0.5 − δ for a sufficiently small δ > 0, the best achievable ∗ ∗ quantized-MSE exponent Eq,spc (R) with superposition coding is strictly larger than that of random block coding Eq,rc (R) for ∗ every rate R ∈ (E0 (1/2, )/3, C). Here we prove this theorem by finding a lower bound Eq,spc (R) on Eq,spc (R) and showing ∗ that this lower bound is strictly larger than Eq,rc (R) at any rate R ∈ (E0 (1/2, )/3, C). The quantized MSE E[cq (X, X̂N,finite )] can be bounded above in terms of decoding-error probabilities of the two partial messages M1 (MSBs) and M2 (LSBs) as E[cq (X, X̂N,finite )] ≤ Pr(M̂1 6= M1 ) + Pr(M̂2 6= M2 |M̂1 = M1 )e−2N R1 . (144) In Lemma 6, we show that successive-cancellation decoding rule for superposition codes of distribution parameter α ∈ (0, 1/2) achieves Pr(M̂1 6= M1 ) such that ˙ −N EMSBs,SC (R1 ,α) Pr(M̂1 6= M1 )≤e (145) where ( E0 (1/2, α ∗ ) − R1 , 0 ≤ R1 ≤ Rcrit (α ∗ ), EMSBs,SC (R1 , α) = DB (γGV (R1 )kα ∗ ), Rcrit (α ∗ ) < R1 ≤ C − C2 (α). (146) By using this bound and the bound on the conditional decoding-error probability of M2 with the successive-cancellation decoding, ˙ −N ELSBs,SC (R2 ,α) , Pr(M̂2 6= M2 |M̂1 = M1 )≤e (147) the quantized MSE with the superposition coding can be bounded above as E[cq (X, X̂N,finite )] ≤ e−N EMSBs,SC (R1 ,α) + e−N ELSBs,SC (R2 ,α) e−2N R1 . = e−N min{EMSBs,SC (R1 ,α),ELSBs,SC (R2 ,α)+2R1 } . ∗ Therefore, the best achievable quantized-MSE exponent Eq,spc (R) with the superposition coding of rate R = R1 + R2 is bounded below as ∗ Eq,spc (R) ≥ max {(R1 ,R2 ,α): R1 +R2 =R, α∈(0,1/2)} ∗ ∗ min{EMSBs (R1 , R2 , α), ELSBs (R2 , α) + 2R1 }. (148) For a given α ∈ (0, 1/2), when we choose the rate R2 of the partial message M2 (LSBs) equal to C2 (α) = HB (α∗)−HB (), which is the maximum possible rate of M2 to guarantee Pr(M̂2 6= M2 |M̂1 = M1 ) → 0 as N → ∞, the resulting error exponent ∗ ELSBs,SC (R2 , α) equals 0. This particular choice of R2 = C2 (α) provides a lower bound on Eq,spc (R) such that ∗ Eq,spc (R) ≥ max min{EMSBs,SC (R − C2 (α), α), 2(R − C2 (α))}. α∈(0,1/2) (149) We next find α ∈ (0, 1/2) that maximizes min{EMSBs,SC (R − C2 (α), α), 2(R − C2 (α))}. More specifically, we find α that makes EMSBs,SC (R − C2 (α), α) = 2(R − C2 (α)). (150) For a very noisy BSC() with  ≈ 1/2, as shown in [17] (pp. 147-149), the error exponent EMSBs,SC (R1 , α) in (54) can be approximated as ( C−C2 (α) − R1 , 0 ≤ R1 < C−C42 (α) , √ (151) EMSBs,SC (R1 , α) ≈ p 2 ( C − C2 (α) − R1 )2 , C−C42 (α) ≤ R1 ≤ C − C2 (α). 32 E⇤q,rc (R) = Er (R) EMSBs,SC (R1 , ↵) at R2 = C2 (↵) 2R1 Eq,spc (C/2) gain in the quantized MSE exponent at R=C/2 C2 (↵) C/2 ∗ (R + R ) = E (R + R ) (the best achievable quantized MSE with random block coding), E Fig. 13. A plot of Eq,rc r 1 2 1 2 MSBs,SC (R1 , α) (the achievable decoding-error exponent of MSBs with superposition coding), and the line 2R1 at a fixed R2 = C2 (α) where  = 0.45 and α = 0.11. When we choose α that satisfies the condition in (150), i.e., EMSBs,SC (R − C2 (α), α) = 2(R − C2 (α)) at R = C/2, the achievable quantized-MSE exponent Eq,spc (C/2) with the superposition coding equals the value of EMSBs,SC (R1 , α) at R1 where EMSBs,SC (R1 , α) and 2R1 cross each other. The achievable quantized-MSE ∗ (C/2) = E (C/2) with random block coding exponent Eq,spc (C/2) at R = C/2 is strictly larger than the best achievable quantized-MSE exponent Eq,rc r as shown in this figure. By using this approximation, we can see that when  ≈ 1/2, R1 = R − C2 (α) satisfying (150) is in the interval 0 ≤ R1 ≤ Rcrit (α ∗ ) ≈ C−C42 (α) , since at R1 = R − C2 (α) = E0 (1/2, α ∗ )/3 ≈ C−C62 (α) , which is strictly smaller than Rcrit (α ∗ ) ≈ C−C42 (α) , the condition (150) is satisfied. So, at α ∈ (0, 1/2) satisfying R = C2 (α) + E0 (1/2, α ∗ ) , 3 (152) the condition (150) is met. Moreover, when  ≈ 1/2, the derivative of C2 (α) + E0 (1/2,α∗) with respect to α is positive in 3 E0 (1/2,α∗) α ∈ (0, 1/2). Therefore, C2 (α) + increases from E0 (1/2, )/3 to C = HB (1/2) − HB () as α increases from 0 to 3 1/2. It means that for all R ∈ (E0 (1/2, )/3, C), there always exists a unique α∗ ∈ (0, 1/2) satisfying (152). ∗ (R) = Er (R1 + R2 ) for every R1 ∈ [0, C − C2 (α)) when Lastly, as shown in Lemma 6, since EMSBs,SC (R1 , α) > Eq,rc ∗ ∗ ∗ R2 = C2 (α), for our choice of R1 (α ) = R − C2 (α ) ∈ [0, C − C2 (α)) and R2 = C2 (α∗ ) it can be shown that EMSBs,SC (R − C2 (α∗ ), α∗ ) > Er (R). (153) This completes the proof of the theorem. In Fig 13, we illustrate the gain in the quantized-MSE exponent from superposition coding at R = C/2. When we choose α that satisfies the condition in (150), i.e., EMSBs,SC (R − C2 (α), α) = 2(R − C2 (α)) at R = C/2, the achievable quantized-MSE exponent with the superposition coding, which is denoted Eq,spc (C/2), is equal to the value of EMSBs,SC (R1 , α) at R1 where EMSBs,SC (R1 , α) and 2R1 cross each other. In this plot, we can check that the achievable quantized-MSE exponent Eq,spc (C/2) ∗ with superposition coding is strictly larger than the best achievable quantized-MSE exponent Eq,rc (C/2) = Er (C/2) with random block coding. R EFERENCES [1] H. W. Chung, L. Zheng, B. M. Sadler, and A. O. Hero, “Unequal error protection coding approaches to the noisy 20 questions problem,” in Proc. IEEE International Symposium on Information Theory (ISIT). IEEE, 2016, pp. 1700–1704. [2] E. Variani, K. Lahouez, A. Bar-Hen, and B. Jedynak, “Non-adaptive policies for 20 questions target localization,” in Proc. IEEE International Symposium on Information Theory Proceedings (ISIT). IEEE, 2015, pp. 775 – 778. [3] D. J. MacKay, “Information-based objective functions for active data selection,” Neural computation, vol. 4, no. 4, pp. 590–604, 1992. [4] B. Settles, “Active learning literature survey,” Computer Sciences Technical Report 1648, University of Wisconsin–Madison, 2009. [5] R. Castro and R. Nowak, “Active learning and sampling,” in Foundations and Applications of Sensor Management. Springer, 2008, pp. 177–200. [6] D. V. Lindley, “On a measure of the information provided by an experiment,” The Annals of Mathematical Statistics, pp. 986–1005, 1956. [7] V. V. Fedorov, Theory of optimal experiments. Elsevier, 1972. [8] T. Tsiligkaridis, B. M. Sadler, and A. O. Hero, “Collaborative 20 questions for target localization,” IEEE Transactions on Information Theory, vol. 60, no. 4, pp. 2233–2252, 2014. [9] S. Luttrell, “The use of transinformation in the design of data sampling schemes for inverse problems,” Inverse Problems, vol. 1, no. 3, p. 199, 1985. [10] B. Jedynak, P. I. Frazier, R. Sznitman et al., “Twenty questions with noise: Bayes optimal policies for entropy loss,” Journal of Applied Probability, vol. 49, no. 1, pp. 114–136, 2012. [11] Y. Chen, S. H. Hassani, A. Karbasi, and A. Krause, “Sequential information maximization: When is greedy near-optimal?” in Proc. of The 28th Conference on Learning Theory, 2015, pp. 338–363. 33 [12] M. V. Burnashev and K. Zigangirov, “An interval estimation problem for controlled observations,” Problemy Peredachi Informatsii, vol. 10, no. 3, pp. 51–61, 1974. [13] M. Horstein, “Sequential transmission using noiseless feedback,” IEEE Transactions on Information Theory, vol. 9, no. 3, pp. 136–143, 1963. [14] T. M. Cover, “Broadcast channels,” IEEE Transactions on Information Theory, vol. 18, no. 1, pp. 2–14, 1972. [15] C. E. Shannon, “A mathematical theory of communication,” Bell System Technical Journal, vol. 27, pp. 379–423, 623–656, 1948. [16] G. D. Forney Jr, “On exponential error bounds for random codes on the BSC,” unpublished manuscript, 2001. [17] R. G. Gallager, Information theory and reliable communication. Willey, 1968, vol. 2. [18] Y. Kaspi and N. Merhav, “Error exponents for broadcast channels with degraded message sets,” IEEE Transactions on Information Theory, vol. 57, no. 1, pp. 101–123, 2011. [19] J. Korner and A. Sgarro, “Universally attainable error exponents for broadcast channels with degraded message sets,” IEEE Transactions on Information Theory, vol. 26, no. 6, pp. 670–679, 1980. [20] R. G. Gallager, “Capacity and coding for degraded broadcast channels,” Problemy Peredachi Informatsii, vol. 10, no. 3, pp. 3–14, 1974.
7cs.IT
Proceedings of the 13th International Conference on Nanochannels, Microchannels and Minichannels ICNMM15 July 6-9, 2015, San Francisco, CA, USA Preprint submitted to ASME InterPACKICNMM2015-48569 A NEW ALGORITHM FOR CONTACT ANGLE ESTIMATION IN MOLECULAR DYNAMICS SIMULATIONS Sumith YD Department of Mechanical and Aerospace Engg., Syracuse University, Syracuse, NY, USA ABSTRACT It is important to study contact angle of a liquid on a solid surface to understand its wetting properties, capillarity and surface interaction energy. While performing transient molecular dynamics (MD) simulations it requires calculating the time evolution of contact angle. This is a tedious effort to do manually or with image processing algorithms. In this work we propose a new algorithm to estimate contact angle from MD simulations directly and in a computationally efficient way. This algorithm segregates the droplet molecules from the vapor molecules using Mahalanobis distance (MND) technique. Then the density is smeared onto a 2D grid using 4th order B-spline interpolation function. The vapor liquid interface data is estimated from the grid using density filtering. With the interface data a circle is fitted using Landau method. The equation of this circle is solved for obtaining the contact angle. This procedure is repeated by rotating the droplet about the vertical axis. We have applied this algorithm to a number of studies (different potentials and thermostat methods) which involves the MD simulation of water. INTRODUCTION It is quite common in the literature to use Berendsen[1] or Nose-Hoover[2] thermostat for liquid molecular dynamic simulations to study different thermodynamic properties of water. In this paper alongside with the new algorithm, we have investigated the effect of such thermostats on the contact angle of water with respect to wall heating algorithm [3]. In the past Bo Shi et al [4] have simulated the contact angle of water on top of Platinum surface with FCC 111. Their work was with simulating columbic potential with P3M method [5] and keeping the temperature constant using Berendsen thermostat [1]. Maruyama and et al [6] have also done contact angle studies of water on platinum with truncated potential. Shalabh C. Maroo* Department of Mechanical and Aerospace Engg., Syracuse University, Syracuse, NY, USA Email: [email protected] Both researchers have used ZP potential for water platinum interaction. There are previous works on contact angle estimation from MD simulations. Erik et al [7] have come up with an idea of smearing the molecules into grid with Nearest Grid Point (NGP) scheme which we will discuss the drawback later in this paper. In another work Malani et al [8] have shown a new method to study contact angle from MD. Sergi et al [9] have calculated contact angle of water from MD using local averaging and fitting methods. Also there exists a wide range of studies done on contact angle estimation using MD simulations [10-13]. Most of these researchers have focused on finding contact angle and surface energy through different ways. However almost everyone uses NGP scheme which makes the prediction of liquid-vapor interface skeptical. Again a discussion about transient monitoring of contact angle is not found in the literature. With the enormous amount of result data estimation of contact angle using image recognition algorithms or manual methods becomes almost impossible. There are not many algorithms which suit well for the direct post processing of molecular simulations. The paper is divided into two sections, first explaining the algorithm used for estimating contact angle; second the details of MD Simulation and models used. ALGORITHM DETAILS Often MD simulation results of water and other liquids will have the information of co-existence of vapor and liquid. Segregating the liquid droplet or liquid from the vapor will avoid false detection of Solid-Liquid boundary (LVB) when using density filtering. Though this step is optional, it would give more appropriate data for estimating contact angle. For convenience the whole process is divided into 5 steps. 1 Step 1: Sample preparation The unwanted vapor molecules (outliers) in the data can be removed effectively using Mahalanobis Distance [17] technique. Fig. 3. Data after removing the vapor molecules using MND Fig. 1. Equilibrated water droplet on platinum If 𝑋𝑐 is the 𝑛 × 2 column centered vector consisting of (𝑥 − 𝑥̅ , 𝑦 − 𝑦̅)data of n points then variance-covariance matrix 𝐶𝑥 is defined as 𝟏 𝑪𝒙 = (𝒏−𝟏) (𝑿𝒄 )𝑻 (𝑿𝒄 ) (1) Then the Mahalanobis Distance (MND) is calculated as 𝑴𝑵𝑫𝒊 = √𝑿𝒊 𝑪𝒙 −𝟏 𝑿𝒊 𝑻 (2) Where 𝑋𝑖 is the mean centered data of ith data point. From this list of MND we can neglect those data points with considerably high MND values. The effectiveness of MND technique can be visualized from Fig. 2 and Fig. 3. The vapor molecules which would have been a hindrance to estimate the contact angle accurately was removed easily with MND method. Step 2: Density grid using B-Splines In this step a 2D mesh in XZ plane (see figure 2) is generated and the entire droplet data is projected and smeared into the grids using 4th order B-spline function. This makes it easier to find a smooth transition between the liquid core and the empty space. The Nearest Grid Point (NGP) method is a traditional first order method normally researchers use to assign data to the grid points. Inspired from Hockney and Eastwood [18] the density of the molecules at every grid point using NGP scheme can be calculated by the below equation. 𝝆𝒊𝒋 = ∑𝑵 𝒑=𝟏 𝑾 ( |𝒙𝒊 −𝒙𝒑 | 𝒅𝒙 ) ∗ 𝑾( |𝒚𝒊 −𝒚𝒑 | 𝒅𝒚 ) (3) Where the weight function is defined as 𝟏, 𝒙 < 𝟏𝟐 𝑾(𝒙) = { 𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆 (4) The B-spline method is inspired from Smooth Particle Mesh Ewald [19]. Reproducing the definition gives, for any real number u, let 𝑀2 (𝑢) denote the linear hat function given by 𝑀2 (𝑢) = 1 − |𝑢 − 1| for 0 ≤ 𝑢 ≤ 2 and 𝑀2 (𝑢) = 0 for 𝑢 < 0 or 𝑢 > 2. For n greater than 2, define 𝑀𝑛 (𝑢) by the recursion 𝑴𝒏 (𝒖) = 𝒖 𝒏−𝟏 𝑴𝒏−𝟏 (𝒖) + 𝒏−𝒖 𝒏−𝟏 𝑴𝒏−𝟏 (𝒖 − 𝟏) (5) For our case n = 4 and u is in fractional coordinates. From Fig. 4 we can see that the B-spline scheme gives an upper hand in predicting the LVB. Fig. 2. Center of mass data with vapor molecules Fig. 4. a) NGP method, b) B-Spline method 2 Step 3: Density based filtering In this step the exact LVB is calculated based on threshold density bands. Mathematically this can be explained using Equations 6 and 7. This will remove the grid points with high densities which resemble the liquid region and low densities that resemble the vapor (noise). 𝐓𝐡𝐫𝐞𝐬𝐡𝐨𝐥𝐝𝐌𝐀𝐗 = 𝐰𝟏 ∗ 𝐌𝐞𝐚𝐧 (6) 𝐓𝐡𝐫𝐞𝐬𝐡𝐨𝐥𝐝𝐌𝐈𝐍 = 𝐰𝟐 ∗ 𝐌𝐞𝐚𝐧 (7) 𝑤1 and w2 are weights which can be fine-tuned according to the data. For the present studies we have taken them as 2 and 0.5 respectively. Now, all the data which meets the below criteria will be used for further analysis. 𝐓𝐡𝐫𝐞𝐬𝐡𝐨𝐥𝐝𝐌𝐈𝐍 ≤ 𝐆𝐫𝐢𝐝. 𝐯𝐚𝐥𝐮𝐞 ≤ 𝐓𝐡𝐫𝐞𝐬𝐡𝐨𝐥𝐝𝐌𝐀𝐗 Fig. 6. Radial rays from centroid to find the extremities (8) This will lead to detection of the points as shown in Fig. 5. Fig. 7. Detected droplet boundary Fig. 5. Density based filtered data Step 4: Removing the wall effects As one may notice, an unwanted lower set of contour is also detected due to the interface between water and platinum. This has to be taken care as explained next. Find the centroid of the data from the Step 3 and set the z coordinate as the top of the platinum plate. Then we radially move outwards from that point until we reach the boundary of data. This procedure is repeated for 0 ≤ 𝜃 ≤ 𝜋. This will help us to identify the most appropriate data. At the end we will be having a collection of points which forms the exterior of the droplet. Fig. 6 shows this procedure graphically and Fig. 7 shows the detected droplet boundary. This will also eliminate the unwanted data points inside the droplet due to the occasional void formation due to the density fluctuations in the MD simulations. Also using a z-location based cutoff we can eliminate the unwanted monolayer or interface formed next to the platinum wall. If the centroid of the data was above the platinum surface then we should leave the z –coordinate of centroid as it is and angular search should be from 0 ≤ 𝜃 ≤ 2𝜋. This will guarantee the contact angle estimation of droplet with contact angle greater than 90°. Also this is required if the droplet is floating in vacuum and not attached to the solid. Step 5: Solving for contact angle With the detected LVB step 4, we can fit a circle using Landau method [20] and get the circle’s equation which represents the droplet boundary. Landau method is an efficient method to fit a circle using non iterative geometric fit. This method relies on minimizing the error of fit between the set of points and the estimated arc. The main equations for this method are mentioned below. For a detailed version and nomenclature we encourage readers to see the original reference. 𝒙 ̅= 3 𝒄𝟏 𝒃𝟐 −𝒄𝟐 𝒃𝟏 𝒂𝟏 𝒃𝟐 −𝒂𝟐 𝒃𝟏 (9) ̅= 𝒚 𝒂𝟏 𝒄𝟐 −𝒂𝟐 𝒄𝟏 𝒂𝟏 𝒃𝟐 −𝒂𝟐 𝒃𝟏 𝟏 ̅ + 𝑵𝒙 ̅𝟐 + ∑ 𝒚𝟐 − 𝟐 ∑ 𝒚 ̅ + 𝑵𝒚 ̅𝟐 ] 𝑹𝟐 = [∑ 𝒙𝟐 − 𝟐 ∑ 𝒙 𝑵 (10) (11) Once we get the equation of circle we can solve it for the angle made by the tangent at the platinum-water interface. This step is graphically shown in Fig. 8. During a fresh simulation it is advisable to do a test case and fine tune the parameters to make this algorithm well suited for the selected data. These parameters are including, but not limited to the weight functions of step 3, z – cutoff of step 4. platinum plate as shown in Fig. 9. The lateral boundaries are applied with periodic boundary condition (PBC) and vertical boundary is closed with platinum wall on bottom and mirror boundary on top. The platinum wall is of square shape with 20 nm sides and mirror boundary is kept at a distance of 12.5 nm from platinum. The water-platinum interaction is simulated using ZP-potential. A self-written and validated C++ code is used to perform the analysis. There are two sub cases of simulations based on this model. They are Berendsen and surface heating algorithm. More details of this simulation are described in the following paragraphs. Fig. 9. Simulation model for contact angle estimation Fig. 8. Final boundary of the droplet and fitted circle CONTACT ANGLE ESTIMATION STUDIES Case 1: Water-platinum interaction using LJ potential A cube shaped water droplet with 6 nm sides (7221 molecules) is kept on top of platinum wall interacting using LJpotential. The sides are under periodic boundary condition and top is covered with another platinum surface to prevent the escape of molecules. The simulations are performed using Gromacs software. The platinum surfaces are modeled with FCC 111 structure and are square shaped with sides of 25 nm. The platinum surfaces are kept apart at a distance of 14 nm. There are three sub cases for this model based on the thermostat used. They are Berendsen, Nose-Hoover and Velocity re-scale thermostats. The simulation is performed from 0 ps to 1000 ps. Case 2: Water-platinum interaction using ZPpotential In this case a pre-equilibrated cubic shaped water droplet with sides of 4 nm (2133 molecules) is kept on top of FCC 111 The equations of motions are solved using velocity verlet scheme. A shifted scheme suggested by Stoddard and Ford [14] with 7σ was used instead of Ewald summation methods or P3M. The feature of this potential is that both potential and force goes smoothly to zero at the cut off radius. 12 6        U  r   4       r   r       12   6   r 2   12   6    6   - 3      - 7    4     rc    rc   rc   rc     rc   (12) The water molecules are modeled using SPCE model introduced by Berendsen et al [14]. The intra molecular bonds are kept rigid throughout the simulation using the RATTLE algorithm [15]. Zhu-Philpott [16] model is used to model the interaction between water and platinum molecules. The advantage of such model is to obtain reasonable droplet shape formation during the simulation [4]. ETotal  EConduction  EIsotropic  EAnisotropic EConduction   real ,image 4 (13) qreal qimage 2r (14) Cw Pt w10 Pt rwi10 i 1 N Pt EIsotropic  4 w Pt  6 3  2 2      w  Pt w  Pt  4 w Pt      2 2      2  z 2   i 1    z   wi  wi   wi  wi  (15) N Pt E Anisotropic (16) The parameters are taken from Maruyama’s paper [6]. For simulations with thermostat based heating we have used Berendsen thermostat [1]. For those with wall heating we have used the modified Maroo-Chung model [3]. The details of this surface heating algorithm will be discussed in a separate paper which is yet to be published. Since we are not modeling a contiguous array of droplets we can ignore the long range effects of the single water droplet. Simulation of droplet and films with SPME method will be studied extensively and will be published in another work. Hence we limit our studies with truncated potentials for the present work. For the sub cases we have equilibrated the system at 300K for 200 ps. From 200 ps to 1000 ps the Berendsen thermostat or surface heating is applied for the two sub cases. For the last sub case we left the system uncoupled from thermostat from 200 ps to 1000 ps. At the end of simulation the trajectory files are processed and contact angles are determined using the algorithm mentioned in the next section. The time evolution of contact angle is shown in Fig. 11 and Fig. 10. Fig. 10. Contact angle evolution for case 1 Fig. 11. Contact angle evolution for case 2 Since the main focus of this paper is not the effect and causes of the contact angle we have not included those discussions here. However we have made such a detailed study and currently that work is under review elsewhere. A working version of MATLAB code for this algorithm can be obtained from authors upon request. CONCLUSION A new algorithm for contact angle estimation from transient data of MD simulation was discussed. The efficiency and accuracy of this algorithm was demonstrated using different types of simulations. The MD simulations were done for water platinum interaction with ZP potential and LJ potential. Further, we used different thermostatting schemes for the droplet and show how it influences the contact angle. The results also showed the influence of interaction potential and also the thermostatting method used. The algorithm can be used to study the transient behavior of droplets on different surfaces. REFERENCES [1] Berendsen, H. J., Postma, J. P. M., van Gunsteren, W. F., DiNola, A., and Haak, J., 1984, "Molecular dynamics with coupling to an external bath," The Journal of chemical physics, 81(8), pp. 3684-3690. [2] Hoover, W. G., 1985, "Canonical dynamics: equilibrium phase-space distributions," Physical Review A, 31(3), p. 1695. [3] Maroo, S. C., and Chung, J., 2010, "A novel fluid–wall heat transfer model for molecular dynamics simulations," Journal of Nanoparticle Research, 12(5), pp. 1913-1924. [4] Shi, B., Sinha, S., and Dhir, V. K., "Molecular simulation of the contact angle of water droplet on a platinum surface," Proc. ASME 2005 International Mechanical Engineering Congress and Exposition, American Society of Mechanical Engineers, pp. 93-97. [5] Eastwood, J., Hockney, R., and Lawrence, D., 1980, "P3M3DP—The three-dimensional periodic particle- 5 particle/particle-mesh program," Computer Physics Communications, 19(2), pp. 215-261. [6] Kimura, T., and Maruyama, S., 2002, "Molecular Dynamics Simulation of Water Droplet in contact with a Platinum Surface," Heat Transfer, 1, pp. 537-542. [7] Santiso, E. E., Herdes, C., and Müller, E. A., 2013, "On the Calculation of Solid-Fluid Contact Angles from Molecular Dynamics," Entropy, 15(9), pp. 3734-3745. [8] Malani, A., Raghavanpillai, A., Wysong, E. B., and Rutledge, G. C., 2012, "Can Dynamic Contact Angle Be Measured Using Molecular Modeling?," Phys. Rev. Lett., 109(18), p. 5. [9] Sergi, D., Scocchi, G., and Ortona, A., 2012, "Molecular dynamics simulations of the contact angle between water droplets and graphite surfaces," Fluid Phase Equilibria, 332, pp. 173-177. [10] Ohler, B., and Langel, W., "Molecular Dynamics Simulations on the Interface between Titanium Dioxide and Water Droplets: A New Model for the Contact Angle," Journal of physical chemistry. C, 113(23), pp. 10189-10197. [11] Blake, T. D., Clarke, A., DeConinck, J., and deRuijter, M. J., 1997, "Contact angle relaxation during droplet spreading: Comparison between molecular kinetic theory and molecular dynamics," Langmuir, 13(7), pp. 2164-2166. [12] Nijmeijer, M. J. P., Bruin, C., Bakker, A. F., and Vanleeuwen, J. M. J., 1989, "A VISUAL MEASUREMENT OF CONTACT ANGLES IN A MOLECULARDYNAMICS SIMULATION," Physica A, 160(2), pp. 166180. [13] Hong, S., Ha, M. Y., and Balachandar, S., 2009, "Static and dynamic contact angles of water droplet on a solid surface using molecular dynamics simulation," Journal of colloid and interface science, 339(1), pp. 187-195. [14] Berendsen, H., Grigera, J., and Straatsma, T., 1987, "The missing term in effective pair potentials," Journal of Physical Chemistry, 91(24), pp. 6269-6271. [15] Andersen, H. C., 1983, "RATTLE: A “Velocity” version of the SHAKE algorithm for molecular dynamics calculations," Journal of Computational Physics, 52(1), pp. 24-34. [16] Zhu, S.-B., and Philpott, M. R., 1994, "Interaction of water with metal surfaces," DTIC Document. [17] De Maesschalck, R., Jouan-Rimbaud, D., and Massart, D. L., 2000, "The mahalanobis distance," Chemometrics and intelligent laboratory systems, 50(1), pp. 1-18. [18] Hockney, R. W., and Eastwood, J. W., 2010, Computer simulation using particles, CRC Press. [19] Essmann, U., Perera, L., Berkowitz, M. L., Darden, T., Lee, H., and Pedersen, L. G., 1995, "A smooth particle mesh Ewald method," The Journal of chemical physics, 103(19), pp. 8577-8593. [20] Thomas, S. M., and Chan, Y., 1989, "A simple approach for the estimation of circular arc center and its radius," Computer Vision, Graphics, and Image Processing, 45(3), pp. 362-370. 6
5cs.CE
Discontinuous energy shaping control of the Chaplygin sleigh Joel Ferguson ∗ Alejandro Donaire ∗∗ Richard H. Middleton ∗ arXiv:1801.06278v1 [cs.SY] 19 Jan 2018 ∗ School of Electrical Engineering and Computing and PRC CDSC, The University of Newcastle, Callaghan, NSW 2308, Australia (e-mail: [email protected]; [email protected]). ∗∗ Department of Electrical Engineering and Information Theory and PRISMA Lab, University of Naples Federico II, Napoli 80125, Italy, and with the School of Electrical Eng. and Comp. Sc. of the Queensland University of Technology, Brisbane, QLD, Australia (e-mail: [email protected]) Abstract: In this paper we present an energy shaping control law for set-point regulation of the Chaplygin sleigh. It is well known that nonholonomic mechanical systems cannot be asymptotically stabilised using smooth control laws as they do no satisfy Brockett’s necessary condition for smooth stabilisation. Here, we propose a discontinuous control law that can be seen as a potential energy shaping and damping injection controller. The proposed controller is shown to be robust against the parameters of both the inertia matrix and the damping structure of the open-loop system. Keywords: Nonholonomic systems; port-Hamiltonian systems; discontinuous control; robust control. 1. INTRODUCTION Mechanical systems are often subject to constraints which restrict the motion of the system. These constraints are often categorised as begin either holonomic or nonholonomic. Holonomic constraints refer to static relationships between configuration variables which, in effect, restricts the configuration space of a system. Nonholonomic constraints, however, refers to all constraints that cannot be described in this manner (Goldstein, 1980). Of particular interest to this work, the constraints that arise from nonslip condition of wheels are necessarily described as a relationship between the configuration and velocity of a system (Bloch et al., 2003). As such, these constraints restrict in what directions the system can move and therefore, they are nonholonomic. In this work, we consider the Chaplygin sleigh which is a benchmark system widely used for nonholonomic control design (van der Schaft and Maschke, 1994; Astolfi, 1996; Lee, 2007; Fujimoto et al., 2012; Tian and Li, 2002; Bloch and Reyhanoglu, 1992). Nonholonomic systems with constraints that are linear in velocities can be represented as port-Hamiltonian (pH) system with Lagrange multipliers that enforce the constraints. In the work of van der Schaft and Maschke (1994) it was shown that by reducing the dimension of the momentum space, these systems have an equivalent representation without Lagrange multipliers. The reduced representation is essentially ‘constraint free’ insofar as any state in the reduced state-space is permissible. Important to this work, the Chaplygin sleigh admits such a representation (Astolfi et al., 2010). Here, we utilise this ‘constraint free’ representation of the Chaplygin system to develop a control law to achieve setpoint regulation of the system. Unfortunately, as it is well known, Brockett’s necessary condition for asymptotic stabilisation using smooth feedback control is not satisfied by nonholonomic mechanical systems. As a consequence, this class of system cannot be stabilised using continuously differentiable control laws (Brockett, 1983). This restriction does not rule out the possibility of asymptotic stabilisation using non-smooth controllers, which has been achieved in (Astolfi, 1996; Fujimoto et al., 2012). In this work, we propose a discontinuous energy shaping control law for the Chaplygin system. While control of the Chaplygin system (and nonholonomic systems generally) has been extensively studied, control methods that exploit the natural passivity of the system are quite limited. Similar to the method proposed here, a discontinuous energy shaping control law was proposed by Fujimoto et al. (2012) for the rolling coin system—which is encompassed in the Chaplygin system used here—to asymptotically stabilise the system. A different approach was taken by Lee (2007) where a switching strategy was used to drive a mobile robot—which again is encompassed in the Chaplygin system used here—to a compact set containing the origin. Previously, we studied the control of the Chaplygin system in (Ferguson et al., 2016) by switching between two manifold regulating control laws where each law could be considered to be energy shaping controllers. Here, we extend this previous work by proposing a single energy shaping control law that drives the configuration of the system to the origin. By exploiting the passivity properties " cos θ Q(q) = sin θ 0  y u l #  ml 0 p 2  J + ml2  J(p) =   ml − p2 0 2  J + ml  m 0 M= , (2) 0 J + ml2 where m is the mass of the sleigh and J is the rotational inertia about the centre of mass. (x, y) θ 0 0 1 x Fig. 1. The Chaplygin sleigh is fixed to the ground at the point (x, y). It is able to pivot about this point and move forwards in the u direction. The point (x, y) is constrained from moving in a direction perpendicular to u. The centre of mass is indicated by the red spot and is a distance l from the point (x, y). of the open-loop system, the controller is robust against both the inertia and damping matrices. The remained of the paper is structured as follows: The Chaplygin sleigh model is presented and the problem formulated in section 2. In Section 3 the discontinuous, potential energy shaping controller is presented and the stability properties of the closed-loop are analysed in section 4. A numerical simulation of the closed-loop is presented in Section 5 and conclusions drawn in section 6. Notation: For a differentiable function H(x), ∇H denotes > the column vector of partial derivatives ∂∂xH . Given a differentiable function f (x) ∈ Rn , ∂f ∂x denotes the standard Jacobian matrix. 0n is a matrix of dimension n × n with all elements equal to zero whereas 0n×m is a n × m matrix of all zeros. In denotes a n × n dimension identity matrix. 2. PROBLEM FORMULATION 2.1 Chaplygin sleigh model This paper is focused on control design for the Chaplygin sleigh system (Figure 1). This system can be modelled as a pH system of the form (Astolfi et al., 2010):        03 Q(q) q̇ ∇q H 03×2 = + u ṗ I2 −Q> (q) J(p) − D(q, p) ∇p H (1) y = ∇p H 1 > −1 H = p M p, 2 with generalised coordinates q = (x, y, θ), where x and y denote the position at which the sleigh is fixed to the ground in the x − y plane and θ describes the sleigh’s heading angle, p = (p1 , p2 ) is the momentum and D(q, p) is the damping matrix satisfying D = D> ≥ 0. The system matrices are given by In the special case where l = 0, this system coincides with the knife edge system (Bloch et al., 2003). The knife edge system is closely related to the rolling disk system, studied in (Fujimoto et al., 2012), which has an extra state associated with the roll angle of the disk. If the roll angle from the rolling disk is ignored, it coincides with the knife edge system. Due to the relationship between these systems, the regulating controller developed in this paper can be applied to either of these examples. 2.2 Problem statement Considering the Chaplygin sleigh system (1), our objecting is to design a control law u = u(q, p) (3) such that limt→∞ q(t) = 0n . 3. DISCONTINUOUS CONTROL LAW The approach taken to control the Chaplygin system is to first perform two consecutive coordinate transformations, q → z → w. The control law is then designed in the w coordinates where the control objective can be achieved by potential energy shaping using a quadratic potential function. The stability analysis relies heavily on the relationship between the z and w coordinates. 3.1 Transformation q → z The first of our coordinate transformations q → z is defined by the mapping " # " #" # z1 0 0 1 x z = z2 = fz (q) , cos θ sin θ 0 y . (4) z3 sin θ − cos θ 0 θ The Chaplygin system (1) can be expressed in the coordinates (z, p) by the equations        03 Qz (z) ż ∇z H 03×2 = + u ṗ ∇p H I2 −Q> z (z) J(p) − Dz (z, p) y = ∇p H 1 H = p> M −1 p, 2 (5) with Qz and Dz defined by " # 0 1 ∂fz Qz (z) = (q)Q(q)|q=fz−1 (z) = 1 −z3 ∂q 0 z2 Dz (z, p) = D(p, q)|q=fz−1 (z) . (6) The reason for expressing the system as a function of z is the structure of Qz in (6). Importantly, Qz has a full-rank left annihilator Q⊥ (7) z (z) = [−z2 0 1] . 3.2 Transformation z → w Similar to the transformation to z in the previous subsection, we now consider the coordinate transformation z → w. The proposed transformation is given by   " # z1 w1 w = w2 = fw (z) , z2 z1−1 − 2z3 z1−2  . (8) w3 2z3 z1−2 The inverse transformation z = fw−1 (z) is given by   " # w1 z1   z = z2 = fw−1 (w) , w1 w12 + w1 w3  . (9) 2 z3 w1 w3 2 This are two important properties that have motivated this choice for fw : Firstly, the mapping fw−1 : w → z is smooth. This means that if a solution w(t) is bounded, then z(t) is be bounded also. Secondly, the entire set {w ∈ R3 |w1 = 0} corresponds to z = 03×1 . This means that in the w coordinates, the control objective can be addressed simply by regulating the variable w1 to zero whilst keeping w2 and w3 bounded. The Chaplygin system (5) can be expressed as a function of (w, p) by the equations        03 Qw (w) ẇ ∇w H 03×2 = + u ṗ ∇p H I2 −Q> w (w) J(p) − Dw (w, p) y = ∇p H 1 H = p> M −1 p, 2 (10) with Qw and Dw defined by ∂fw Qw (w) = (z)Qz (z)|z=fw−1 (w) ∂z  0 1 2w2 1   − w3 − w12 w3  1 − =  w1 2   2w2 0 w12 Dw (w, p) = Dz (p, z)|z=fw−1 (w) . (11) Importantly, the matrix Qw is ill-defined at w1 = 0. This has the consequence of the dynamics (10) being undefined at this point. As such we define the set on which the dynamics (10) are defined: U = {(w, p) ∈ R5 |w1 6= 0}. (12) The dynamics (10) are well defined on the set U . 3.3 Regulation control law Consider the following control law as a solution to the problem statement:   0 0  k  ∇p H u(w, p) = −Q> w Lw − D̂∇p H − 0 (13) w12 | {z } Di (w) where D̂ ∈ R2×2 is positive definite, L = diag(l1 , l2 , l3 ) where each li ∈ R is positive and k > 0 is a constant. Remark 1. Considering the Chaplygin system (5), the term ∇p H can be expressed as a function of z, ż as    z 1 ż1 ∇p H = 3 . (14) 1 0 ż2 Thus, the control law (13) can be written independent of the mass matrix M . Remark 2. The control law (13) is independent of the open-loop damping Dw and is, thus, robust against this parameter. Remark 3. The control law (13) has been given as a function of (w, p) but can be equivalently expressed as a function of (z, p) or (q, p) using the mappings fw (8) and fz (4). Now we show that the closed-loop system admits a Hamiltonian representation. Proposition 4. Consider the Chaplygin system (10) in closed-loop with the control law (13). The closed-loop dynamics are given by      0n×n Qw (w) ẇ ∇w Hd = ṗ ∇p Hd −Q> w (w) J(p) − Dd (w, p) (15) 1 > −1 1 > Hd = p M p + w Lw, 2 2 where Dd (w, p) = Dw (w, p) + D̂ + Di (w). (16) Proof. The proof follows from direct matching. 2 The control law (13) can be interpreted as potential energy shaping plus damping injection. To see this, first notice that the role of the term −Q> w Lw is to add the term 1 > 2 w Lw to the closed-loop Hamiltonian. This term can be considered a potential function in w. Secondly, the term −D̂∇p H − Di ∇p H is to increase the damping from Dw to Dd in closed-loop. 4. STABILITY ANALYSIS We now analyse the asymptotic behaviour of the closedloop system (15). Note, however, that the analysis is not straightforward as the right-hand side of the dynamic equation is discontinuous. In fact, considering the form of Qw in (11), the closed-loop dynamics are not defined at w1 = 0. This is even more troublesome when we consider that we wish to regulate the system to a configuration satisfying w1 = 0. With this in mind, we will determine the asymptotic behaviour of the system in two steps: Firstly, it is shown that the choice of Di in (13) has the consequence that, provided that w1 (0) 6= 0, then w1 (t) cannot reach zero in finite time. This means that the closed-loop dynamics are well defined for all finite time. The second step is to show that the system cannot be positively invariant on the set U . As a consequence, we show that w1 tends towards zero asymptotically but will not reach this configuration in finite time. Our result requires the following Lemma: Lemma 5. Any real valued function f (x) satisfies the inequality, 2 Z x2 Z x2 1 − f 2 (x)dx f (x)dx ≥ − (17) x2 − x1 x1 x1 where x2 > x1 are in the domain of f . Proof. The proof is provided in the appendix. 2 It will now be shown that any solution to the closed-loop dynamics (15) cannot satisfy w1 (T ) = 0 for any finite time T < ∞. Lemma 6. The set U is positively invariant. That is, if (w(0), p(0)) ∈ U , (w(t), p(t)) ∈ U for all time t ≥ 0. Proof. First note that the time derivative of Hd satisfies Ḣd = −∇> p Hd Dd ∇p Hd > (18) < ∇p Hd Di ∇p Hd ≤ 0. As Hd is quadratic in p, w, (18) this implies that for any solution with initial conditions in U , p(t) and w(t) will be bounded over any time interval in which the solution is contained within U . We denote such an interval as ∆t = [0, T ). Considering Qw in (11), as p(t) is bounded ∆t, ẇ1 (t) is bounded on the same time interval. Boundedness of ẇ1 implies that limt→T w1 (t) exists for all T . Now, for the sake of contradiction, assume that limt→T w1 (t) = 0 for some finite T ∈ [t0 , ∞). Taking any interval [t1 , T ], such that t1 ≥ 0, pick t0 such that w1 (t0 ) = max{w1 (t)} ∀t ∈ [t1 , T ]. From (18) it can be verified that time derivative of Hd satisfies k k Ḣd (t) ≤ − 2 ∇p2 Hd2 (t) = − 2 ẇ12 (t) (19) w1 (t) w1 (t) Integrating with respect to time from t0 to T Z T k (20) Hd (T ) − Hd (t0 ) ≤ − ẇ12 (t)dt 2 t0 w1 (t) As w1 (t0 ) = max{w1 (t)}∀t ∈ [t0 , T ], Z T k 0 (21) ẇ2 (t)dt Hd (T ) − Hd (t ) ≤ − 2 0 w1 (t ) t0 1 Applying Lemma 5 to this inequality yields !2 Z T k 1 0 Hd (T ) − Hd (t ) ≤ − 2 0 ẇ1 (t)dt w1 (t ) T − t0 t0 1 2 (w1 (T ) − w1 (t0 )) T − t0 1 k ≤− 2 0 w2 (t0 ) w1 (t ) T − t0 1 k ≤− . T − t0 (22) 0 As T −t ≤ T −t1 is arbitrarily small, the right hand side of this inequality can be made arbitrarily large by choosing a small enough time interval. However, Hd is lower bounded, thus we have a contradiction. Thus, we conclude that there is no finite T such that limt→T w1 (t) = 0. As a consequence, U is positively invariant. 2 ≤− k w12 (t0 ) As the set U is positively invariant, the closed-loop dynamics (15) are well defined for all time. We now show that w1 (t) tends to zero asymptotically. This will be done by considering two properties. Firstly, as Ḣd ≤ 0, the trajectories (w(t), p(t)) are confined to a compact set. Secondly, it is shown that there is no subset of U that satisfies Ḣd = 0 identically. Combining these two properties, it can be deduced that w1 → 0. Lemma 7. Consider the closed-loop dynamics (15). On the set U there is no solution to (w(t), p(t)) satisfying Ḣd = 0 identically. Proof. From (18), it can be seen that time derivative of Hd satisfies Ḣd ≤ −p> M −1 D̂M −1 p. (23) As D̂, M > 0, for (23) to be identically equal to zero, p must be identically equal to zero. This means that ṗ = 0 along such a solution. Evaluating the ṗ dynamics of (15) at p = ṗ = 0 results in   ∂ > fw > > −Qw (w)Lw = − Q (z) Lw = 02 . (24) −1 ∂z z=fw (w) Recalling that Qz has a left annihilator given by (7), (24) is satisfied if ∂ > fw Lw = Q⊥ a(w), (25) −1 z z=fw (w) ∂z z=fw−1 (w) where Q⊥ z is defined by (24) and a ∈ R is an unknown, possibly state dependant, function. Rearranging (25) results in ∂ > fw−1 ⊥ (26) Qz z=f −1 (w) a. Lw = w ∂w Using the definition of fw−1 in (9) and Q⊥ z in (7), (26) can be evaluatedto find  " # 1 w2 + w3 w1 w3 "−w w − w w # w1 1 2 1 3  w1 0  0 L w2 = 0 a. (27)  1 2 w3 1 w1 0 w1 2 The second row of (27) implies that w2 = 0. Substituting w2 into the first row of (27) implies that w1 = 0. However, such a solution is not contained in U , thus, there is no trajectory in U such that Ḣd = 0 identically. 2 We are now in a position to determine the asymptotic behaviour of the closed-loop system (15). The typical approach to verifying asymptotic properties of pH systems is to first show that the system is stable as Hd (t) ≤ Hd (0). Then asymptotic stability is shown by application of LaSalle’s theorem together with some detectability requirements. Here, there are two problems with this approach. Firstly, the dynamics are ill-defined at w1 = 0, thus, the point (w, p) = (03×1 , 02×1 ) cannot be an equilibrium—although it behaves just like one in the sense that if (w, p) starts small, it stays small. Secondly, as the system dynamics are not defined for w1 = 0, LaSalle’s theorem does not apply. The following Proposition provides an argument which is similar in nature to LaSalle’s theorem to show that w1 (t) tends towards 0. Considering the transformation (9), this means that z(t) tends towards 03×1 , satisfying the control objective. Proposition 8. Consider the closed-loop dynamics (15) with initial conditions (w(0), p(0)) ∈ U . The system verifies: (i) For each  > 0 there exists a δ() > 0 such that ||(w(0), p(0))|| < δ =⇒ ||(w(t), p(t))|| < . (ii) limt→∞ q(t) = 03×1 . Proof. For this proof, we let x = (p, w). Noting that as Ḣd ≤ 0 for all time, Hd (t) ≤ Hd (0). As Hd is quadratic in w and p, claim (i) can be verified to be true. Furthermore, this means that the set {x|Hd (x) ≤ Hd (0)} (28) is both bounded and positively invariant. First note that limt→∞ Hd = HL exists and is in the set [0, Hd (0)] as Hd (t) is monotonic and bounded below by zero. Now define the set 3 2 1 0 -1 -3 -4 -5 -6 -6 -4 -2 0 2 4 6 (29) which is bounded. By Lemma 6, together with claim (i), the set V is positively invariant. Let x(x0 , t) denote the solution such the x(x0 , 0) = x0 ∈ V . Consider a solution x(x0 , t) to the system. As the right hand side of (15) is smooth on V , it is locally Lipschitz. Thus, the solution x(x0 , t) exists and is unique for all time. By the Bolzano-Weierstrass theorem, the solution admits an accumulation point as t → ∞. The set of all accumulation points is denoted L+ . Furthermore, L+ is compact and x(t) → L+ as t → ∞. (See Section C.3 Khalil for details). + Now suppose that W = L ∩ V 6= ∅. By definition, for each y ∈ W , there exists a sequence tn such that limn→∞ x(tn ) = y. As Hd is continuous and limt→∞ Hd = HL , Hd (W ) = HL . By the continuity of solutions on V and claim (i), a solution x(y, t) is contained in W . Thus, such a solution satisfies Ḣd (t) = 0. But by Proposition 7, there is no solution in the set U satisfying Ḣ = 0 identically. Thus we conclude that W = ∅ L+ is contained in the set V̄ \ V = {x|H(x) ≤ H(0), w1 = 0}. 4 -2 The proof of claim (ii) follows from similar argument to LaSalle’s invariance principle. The proof is as follows: V = U ∩ {x|Hd (x) ≤ Hd (0)} 5 (30) As x(t) → L+ , w1 → 0. Considering the transformation fw−1 in (9) and the fact that w(t) is bounded, w1 (t) → 0 implies that z(t) → 03×1 . Then, considering the transformation fz in (4), z(t) → 03×1 implies that q(t) → 03×1 as desired. 2 Notice that although q tends towards the origin, the asymptotic behaviour of p has not been established. Clearly p(t) ∈ L∞ as 12 p> M −1 p < Hd (t) ≤ Hd (0) for all time. Further analysis is considered beyond the scope of this paper and left as future work. 5. SIMULATION RESULTS In order to demonstrate the effectiveness of the control strategy, a numerical simulation was preformed. The parameters used for the open-loop Chaplygin system were m = 2, J = 1, l = 1 and Fig. 2. Chaplygin sleigh initialised from several initial conditions. The system is controlled by a discontinuous, potential energy shaping controller which drives the configuration to the origin.  1 p 0  0.1 + p2  1 . D=   1 p 0 2 0.1 + p2  The expression √ 1 0.1+p2i (31) is an approximation of Coulomb friction (Gómez-Estern and van der Schaft, 2004) and assumed to be unknown for control purposes. The inertial parameters, m and J, are also assumed to be unknown. The control law (13) was utilised for control with the following parameters: L = diag(2, 0.5, 0.8) k = 0.1 (32) D̂ = diag(4, 8). The Chaplygin sleigh was initialised from an assortment of positions and the simulation was run for 100 seconds. The resulting path of each simulation is shown in Figure 2 where the ghosted images of the sleigh represent the initial positions and the solid image of the sleigh is the target final position. The time histories of the configuration, momentum and control signals for each run can be found in Figures 3, 4 and 5, respectively. Notice that although we have not proved convergence of the functions p(t) or u(t), they appear well behaved in the numerical simulation. Notice that the simulation plotted in blue, which was initialised at (x, y, θ) = (−3, −2, 18 π), takes a rather inefficient path to the origin. This is because it was initialised close to the set parametrised by w1 = z1 = θ = 0, on which the control law and closed-loop are not defined. As a result of this singularity, initial conditions close to θ = 0 will have a large initial closed-loop Hamiltonian Hd . To dissipate this energy from the closed-loop, the system traverses a long path before converging. Simulations with initial conditions away from this singularity take more ‘natural’ paths. Configuration Control action 2 0 u1 x 5 0 -5 0 20 40 60 80 100 10 -2 y 0 0 20 40 60 80 100 0 20 40 60 80 100 5 -10 0 20 40 60 80 100 u2 5 0 0 -5 0 20 40 60 80 100 Fig. 3. Time history of the configuration variables of the closed-loop Chaplygin sleigh system from several simulation scenarios. p1 Fig. 5. Time history of the control signals of the closedloop Chaplygin sleigh system from several simulation scenarios. Momentum 1 0 -1 0 20 40 60 80 100 0 20 40 60 80 100 1 p2 -5 0 -1 Fig. 4. Time history of the momentum variables of the closed-loop Chaplygin sleigh system from several simulation scenarios. 6. CONCLUSION In this paper we presented a discontinuous control law for the Chaplygin sleigh system which is robust against both the inertial parameters and damping structure of the open-loop system. The proposed control law is successful in driving the configuration of the system to the origin. The results were demonstrated by performing numerical simulations to verify the theoretical claims. In future work, we aim to both extend the analysis to characterise the behaviour of the momentum and control signals as well as extend the controller to apply to a wider class of nonholonomic systems. REFERENCES Astolfi, A. (1996). Discontinuous control of nonholonomic systems. Systems & Control Letters, 38(27), 15–37. Astolfi, A., Ortega, R., and Venkatraman, A. (2010). A globally exponentially convergent immersion and invari- ance speed observer for mechanical systems with nonholonomic constraints. Automatica, 46(1), 182–189. Bloch, A., Baillieul, J., Crouch, P., and Marsden, J. (2003). Nonholonomic Mechanics and Control. Springer-Verlag, New York. Bloch, A. and Reyhanoglu, M. (1992). Control and stabilization of nonholonomic dynamic systems. IEEE Transactions on Automatic Control, 37(11), 1746–1757. Brockett, R.W. (1983). Asymptotic stability and feedback stabilization. In Differential Geometric Control Theory, 181–191. Birkhauser, Boston. Ferguson, J., Donaire, A., and Middleton, R.H. (2016). Switched PassivityBased Control of the Chaplygin Sleigh. In Proc. IFAC Symposium on Nonlinear Control Systems, 1012–1017. Elsevier B.V., Monterey, California. Fujimoto, K., Sakai, S., and Sugie, T. (2012). Passivity based control of a class of Hamiltonian systems with nonholonomic constraints. Automatica, 48(12), 3054– 3063. Goldstein, H. (1980). Classical Mechanics. AddisonWesley, Reading, MA, 2 edition. Gómez-Estern, F. and van der Schaft, A. (2004). Physical damping in IDA-PBC controlled underactuated mechanical Systems. European Journal of Control, 10(5), 451–468. Lee, D. (2007). Passivity-Based Switching Control for Stabilization of Wheeled Mobile Robots. In Proc. Robotics: Science and Systems, 8. Lieb, E.H. and Loss, M. (2001). Analysis. American Mathematical Society, Providence, RI, 2 edition. Tian, Y.P. and Li, S. (2002). Exponential stabilization of nonholonomic dynamic systems by smooth time-varying control. Automatica. van der Schaft, A. and Maschke, B.M. (1994). On the Hamiltonian formulation of nonholonomic mechanical systems. Reports on Mathematical Physics, 34(2), 225– 233. Appendix A. PROOFS Proof of Lemma 5 By the Schwarz inequality (Lieb and Loss, 2001), any two real valued functions f (x), g(x) satisfy  2 Z x2 Z x2 Z x2 f 2 (x)dx g 2 (x)dx. (A.1) f (x)g(x)dx ≤ x1 x1 x1 Taking g(x) = 1, (A.1) simplifies to  2 Z x2 Z x2 Z x2 1dx f 2 (x)dx f (x)dx ≤ x1 x1 x1 Z x2 ≤ (x2 − x1 ) f 2 (x)dx (A.2) x1 Z x2 2 Z f (x)dx ≤ x2 1 f 2 (x)dx x2 − x1 x1 x1 Taking the negative of this inequality results in 2 Z x2 Z x2 1 − f 2 (x)dx f (x)dx ≥ − x2 − x1 x1 x1 as desired. 2 (A.3)
3cs.SY
Semi-Supervised Algorithms for Approximately Optimal and Accurate Clustering Buddhima Gamlath [email protected] Sangxia Huang [email protected] arXiv:1803.00926v1 [cs.DS] 2 Mar 2018 Ola Svensson [email protected] Abstract We study k-means clustering in a semi-supervised setting. Given an oracle that returns whether two given points belong to the same cluster in a fixed optimal clustering, we investigate the following question: how many oracle queries are sufficient to efficiently recover a clustering that, with probability at least (1 − δ), simultaneously has a cost of at most (1 + ǫ) times the optimal cost and an accuracy of at least (1 − ǫ)? We show how to achieve such a clustering on n points with O((k2 log n) · m(Q, ǫ4 , δ/(k log n))) oracle queries, when the k clusters can be learned with an ǫ′ error and a failure probability δ ′ using m(Q, ǫ′ , δ ′ ) labeled samples, where Q is the set of candidate cluster centers. We show that m(Q, ǫ′ , δ ′ ) is small both for k-means instances in Euclidean space and for those in finite metric spaces. We further show that, for the Euclidean k-means instances, we can avoid the dependency on n in the query complexity at the expense of an increased dependency on k: specifically, we give a slightly more involved algorithm that uses O(k4 /(ǫ2 δ) + (k9 /ǫ4 ) log(1/δ) + k · m(Q, ǫ4 /k, δ)) oracle queries. Finally, we show that the number of queries required for (1 − ǫ)-accuracy in Euclidean k-means must linearly depend on the dimension of the underlying Euclidean space, whereas, for finite metric space k-means, this number must at least be logarithmic in the number of candidate centers. This shows that our query complexities capture the right dependencies on the respective parameters. 1 Introduction Clustering is a fundamental problem that arises in many learning tasks. Given a set P of data points, the ˙ k of P according to some optimization criteria. In unsupervised goal is to output a k-partition C1 ∪˙ . . . ∪C clustering, the data points are unlabeled. The classic k-means problem and other well-studied clustering problems such as k-median fall into this category. In a general k-means clustering problem, the input comprises a finite set of n points P that is to be clustered, a set of candidate centers Q, and a distance metric d giving the distances between each pair of points in P ∪ Q. The goal is to find k cluster centers c1 , . . . , ck ∈ Q that minimizes the cost, which is the sum of squared distances between each point in P and its closest cluster center. In this case, the clustering C is defined by setting Ci = {x ∈ P : ci is the closest center to x} for all i = 1, . . . , k and breaking ties arbitrarily. Two widely studied special cases are the k-means problem in Euclidean space (where P ⊂ Rr , Q = Rr , and d is the Euclidean distance function) and the k-means problem in finite metric spaces (where (P ∪ Q, d) forms a finite metric space). Despite its popularity and success in many settings, there are two known drawbacks of the unsupervised k-means problem: 1. Finding the centers that satisfy the clustering goal is computationally hard. For example, even the special case of 2-means problem in Euclidean space is NP-hard [9]. 2. There could be multiple possible sets of centers that minimize the cost. However, in practical instances, not all such sets are equally meaningful, and we would like our algorithm to find one that corresponds to the concerns of the application. Since k-means is NP-hard, it is natural to seek approximation algorithms. For the general k-means problem in Euclidean space, notable approximation results include the local search by Kanungo et al. [15] 1 with an approximation guarantee of (9 + ǫ) and the recent LP-based 6.357-approximation algorithm by Ahmadian et al. [1]. On the negative side, Lee et al. [16] ruled out arbitrarily good approximation algorithms for the k-means problem on general instances. For several special cases, however, there exist PTASes. For example, in the case when k is constant, Har-Peled and Mazumdar [12] and Feldman et al. [10] showed how to get a PTAS using weak coresets, and in the case when the dimension d is constant, Cohen-Addad et al. [7] and Friggstad et al. [11] gave PTASes based on a basic local search algorithm. In addition, Awasthi et al. [4] presented a PTAS for k-means, assuming that the input is “clusterable” (satisfies a certain stability criterion). Even if we leave aside the computational issues with unsupervised k-means, we still have the problem that there can be multiple different clusterings that minimize the cost. To see this, consider the 2-means problem on the set of vertices of an equilateral triangle. In this case, we have three different clusterings that give the same minimum cost, but only one of the clusterings might be meaningful. One way to avoid this issue is to have strong assumptions on the input. For example, Balcan et al. [5] considered the problem in a restricted setting where any c-approximation to the problem also classifies at least a (1 − ǫ) fraction of the points correctly. Ashtiani et al. [3] recently proposed a different approach for addressing the aforementioned drawbacks. They introduced a semi-supervised, active clustering framework where the algorithm is allowed to make queries of the form same-cluster(x, y) to a domain expert, and the expert replies whether the points x and y belong to the same cluster in some fixed optimal clustering. Under the additional assumptions that the clusters are contained inside k balls in Rr that are sufficiently far away from each other, they presented an algorithm that makes O(k 2 log k + k(log n + log(1/δ))) same-cluster queries, runs in O(kn log n+ k 2 log(1/δ)) time, and recovers the clusters with probability at least (1 − δ). Their algorithm finds approximate cluster centers, orders all points by their distances to the cluster centers, and performs binary searches to determine the radii of the balls. Although it recovers the exact clusters, this approach works only when the clusters are contained inside well-separated balls. When the clusters are determined by a general Voronoi partitioning, and thus distances to the cluster boundaries can differ in different directions, this approach fails. A natural question arising from the work of Ashtiani et al. [3] is whether such strong assumptions on the input structure are necessary. Ailon et al. [2] addressed this concern and considered the problem without any assumptions on the structure of the underlying true clusters. Their main result is a polynomial-time (1 + ǫ)-approximation scheme for k-means in the same semi-supervised framework as in Ashtiani et al. [3]. However, in contrast to Ashtiani et al. [3], their work gives no assurance on the accuracy of the recovered clustering compared to the true clustering. To achieve their goal, the authors utilized importance sampling to uniformly sample points from small clusters that significantly contribute to the cost. Their algorithm makes O(k 9 /ǫ4 ) same-cluster queries, runs in O(nr(k 9 /ǫ4 )) time, and succeeds with a constant probability. In this work, we investigate the k-means problem in the same semi-supervised setting as Ailon et al. [2], but, in addition to approximating the cost, we seek a solution that is also accurate with respect to the true clustering. We assume that the underlying true clustering minimizes the cost, and that there are no points on cluster boundaries (i.e., the margin between each pair of clusters can be arbitrarily small but not zero). This last assumption is what differentiates our setup from that of Ailon et al. [2]. It is reasonable to assume that no point lies on the boundary of two clusters, as otherwise, to achieve constant accuracy, we would have to query at least a constant fraction of the boundary points. Without querying each boundary point, we have no way of determining to which cluster it belongs. Observe that if we label all the points correctly with respect to the true clustering, the resulting clustering automatically achieves optimal cost. However, such perfect accuracy is difficult to achieve as there may be points that are arbitrarily close to each other but belong to different clusters. Using only a reasonable number of samples, the best we can hope for is to recover an approximately accurate solution. PAC (Probably Approximately Correct) learning helps us achieve this goal and provides a trade-off between the desired accuracy and the required number of samples. Suppose that we have a solution where only a small fraction of the input points is incorrectly classified. In this case, one would hope that the cost is also close to the optimal cost. Unfortunately, the extra cost incurred by the incorrectly classified points can be very high depending on their positions, true labels, and the labels assigned to them. Our main concern in this paper is controlling this additional cost. We show that if we start with a constant-factor approximation for the cost, we can refine the clustering with PAC learning. This yields a simple polynomial-time algorithm that, given a k-means instance and (ǫ, δ) ∈ (0, 1)2 as parameters, with probability at least (1 − δ) outputs a clustering that has a cost of at most (1 + ǫ) times the optimal cost and that classifies at least a (1 − ǫ) fraction of the points 2 correctly with respect to the underlying true clustering. To do so, the algorithm makes O((k 2 log n) · m(Q, ǫ4 , δ/(k log n))) same-cluster queries, where m(Q, ǫ′ , δ ′ ) is the number of labeled samples needed by the PAC learning algorithm to learn k clusters in a k-means instance (P, Q, d) with an ǫ′ error and a failure probability δ ′ (recall that Q is the set of candidate centers for a k-means instance). We further show that our algorithm can be easily adapted to k-median and other similar problems that use the ℓ’th power of distances in place of squared distances for some ℓ > 0. We formally present this result as Theorem 11 in Section 3. An informal statement for the case of k-means is given below in Theorem 1. Theorem 1 (An informal version of Theorem 11). There exists a semi-supervised learning algorithm that, given a k-means instance, oracle access to same-cluster queries that are consistent with some fixed optimal clustering, and parameters (ǫ, δ) ∈ (0, 1)2 , outputs a clustering that, with probability at least (1 − δ), correctly labels (up to a permutation of the labels) at least a (1 − ǫ) fraction of the points and, simultaneously, has a cost of at most (1 + ǫ) times the optimal cost. In doing so, the algorithm makes O((k 2 log n) · m(Q, ǫ4 , δ/(k log n))) same-cluster queries. Our algorithm is general and applicable to any family of k-means, k-median, or similar distance based clustering instances that can be efficiently learned with PAC learning. As shown in Appendix A, these include Euclidean and general finite metric space clustering instances. In contrast, both Ashtiani et al. [3] and Ailon et al. [2], considered only the Euclidean k-means problem. To the best of our knowledge, ours is the first such result applicable to finite metric space k-means and both Euclidean and finite metric space k-median problems. Ideally, we want m(Q, ǫ, δ) to be small. Additionally, the analysis of our algorithm relies on two natural properties of learning algorithms. Firstly, we require PAC learning to always correctly label all the sampled points. Secondly, we also require it to not ‘invent’ new labels and only output labels that it has seen on the samples. We show that such learning algorithms with small m(Q, ǫ, δ) exist both for k-means instances in Euclidean space and for those in finite metric spaces with no points on the boundaries of the optimal clusters. For r-dimensional Euclidean k-means, m(Q = Rr , ǫ, δ) has a linear dependency on r. For the case of finite metric spaces, m(Q, ǫ, δ) has a logarithmic dependency on |Q|, which is the size of the set of candidate centers. In fact, these learning algorithms are applicable not only to k-means instances but also to instances of any similar distance-based clustering problems whose costs are defined in terms of the ℓ’th power (ℓ > 0) of distances as opposed to squared distances. Our semi-supervised learning algorithm is inspired by the work of Feldman et al. [10] on weak coresets. They construct the weak coresets by first obtaining an intermediate clustering with a constant-factor approximation algorithm and refining each intermediate cluster using random samples. In order to get good guarantees on the cost, they partition each cluster into an inner ball that contain the majority of the points, and an outer region with the remaining points. We proceed similarly to this construction; however, we further partition the outer region into O(log n) concentric rings and use PAC learning to label the points in the inner ball and in each of the outer rings. For Euclidean k-means instances, the number of same-cluster queries needed by the algorithm has a logarithmic dependency on the number n of points that is similar (up to a poly(log log n) factor) to that of the algorithm by Ashtiani et al. [3]. The advantage of our algorithm is that it works for a much broader range of k-means instances whereas the applicability of the algorithm of Ashtiani et al. [3] is restricted to those instances whose clusters are contained in well-separated balls in Euclidean space. This algorithm is effective in many natural scenarios where the number of clusters k is larger than log n. However, as the size of the k-means instance (i.e., the number of points) becomes large, the log n factor becomes undesirable. In Euclidean k-means, the number of samples needed by the learning algorithm for error ǫ and failure probability δ does not depend on n. The log n dependency in the final query complexity is exclusively due to repeating the PAC learning step on Ω(k log n) different partitions of P . To overcome this problem, we present a second algorithm, which is applicable only to Euclidean kmeans instances, inspired by the work of Ailon et al. [2]. This time, we start with a (1 + ǫ)-approximation for the cost and refine it using PAC learning. Unlike our first algorithm, we only run the PAC learning once on the whole input, and thus we completely eliminate the dependency on n. The disadvantages of this algorithm compared to our first algorithm are the slightly more involved nature of the algorithm and its increased dependency on k in its query complexity. Theorem 2 below formally states this result. The proof follows from the analysis our algorithm in Section 4. Theorem 2. There exists a polynomial-time algorithm that, given a k-means instance in r-dimensional Euclidean space, oracle access to same-cluster queries that are consistent with some fixed optimal clustering, and parameters (ǫ, δ) ∈ (0, 1)2 , outputs a clustering that, with probability at least (1 − δ), correctly labels (up to a permutation of the labels) at least a (1 − ǫ) fraction of the points and, simultaneously, has 3 a cost of at most (1 + ǫ) times the optimal cost. The algorithm makes O(k 4 /(ǫ2 δ) + (k 9 /ǫ4 ) log(1/δ) + k · m(Q, ǫ4 /k, δ)) same-cluster queries. For the Euclidean setting, query complexities of both our algorithms have a linear dependency on the dimension of the Euclidean space. The algorithm of Ashtiani et al. [3] does not have such a dependency due to their strong assumption on the cluster structure, whereas the one by Ailon et al. [2] does not have it as it only approximates the cost. We show that, in our scenario, such a dependency is necessary to achieve the accuracy guarantee of our algorithms. For the finite metric space k-means, the query complexity of our general algorithm has an O(poly(log |P |, log |Q|)) dependency. The dependency on |P | comes from the repeated application of the learning algorithm on Ω(k log |P |) different partitions, and whether we can avoid this is an open problem. However, we show that an Ω(log |Q|) query complexity is necessary for the accuracy. Formally, we prove the following theorem in Section 5. Theorem 3. Let K be a family of k-means instances. Let A be an algorithm that, given a k-means instance in K, oracle access to same-cluster queries for some fixed optimal clustering, and parameters (ǫ, δ) ∈ (0, 1)2 , outputs a clustering that, with probability at least (1 − δ), correctly labels (up to a permutation of the cluster labels) at least a (1 − ǫ) fraction of the points. Then, the following statements hold: 1. If K is the family of k-means instances in r-dimensional Euclidean space that have no points on the boundaries of optimal clusters, A must make Ω(r) same-cluster queries. 2. If K is the family of finite metric space k-means instances that have no points on the boundaries of optimal clusters, A must make Ω(log |Q|) same-cluster queries. The outline of this extended abstract is as follows. In Section 2 we introduce the notation, formulate the problem and present the learning theorems that we use in the subsequent sections. In Section 3 we present our first algorithm, which is simple and applicable to general k-means instances that admit efficient learning algorithms, but has a dependency of log n in its query complexity. In Section 4 we discuss how to remove the log n dependency in the query complexity for the special case of Euclidean k-means instances and present our second algorithm. In Section 5, we prove our query lower bound claims of Theorem 3. In Appendix A, we introduce the basic concepts and tools of PAC learning and explain how to design learning algorithms for Euclidean and finite metric space k-means instances. 2 Preliminaries In this section, we introduce the basic notation and two common families of k-means instances, and formally define the k-means problem that we address in this work. We also introduce the notion of learnability for families of k-means instances and state two learning theorems, which we prove later in Appendix A. 2.1 k-Means Problem in a Semi-supervised Setting Let P and Q be two sets of points where |P | = n, and let d : (P ∪ Q) × (P ∪ Q) → R+ be a distance metric. We denote a k-means instance by the triple (P, Q, d). Two common families of k-means instances we consider in this work are: 1. k-means instances in Euclidean space, where P ⊂ Rr , Q = Rr , and d(x1 , x2 ) = kx1 − x2 k is the Euclidean distance between x1 and x2 , and 2. k-means instances in finite metric spaces, where (P ∪ Q, d) forms a finite metric space. Let [k] := {1, . . . , k}. We identify a k-clustering C of (P, Q, d) by a labeling function fC : P → [k], and a set of k centers, c1 , . . . , ck ∈ Q, associated with each label, 1, . . . , k. For each label i ∈ [k] of a clustering C, let Ci := {p ∈ P : fC (p) = i} be the set of points whose label is i. For convenience, we may use the labeling function fC or the set of clusters {C1 , . . . , Ck } interchangeably to denote a clustering C. P 2 d (p, q). For each i, define For a subset C ⊆ P and a point q ∈ Q, define cost(C, q) := p∈C center ci := argminq∈Q cost(Ci , q), i.e., each center is a point in Q that minimizes the sum of squared distances between itself and P each of the points assigned to it. For a k-clustering C, we define its kmeans cost as cost(C) := i∈[k] cost(Ci , ci ). Let C ∗ be the set of all k-clusterings of (P, Q, d). Then, the 4 optimal k-means cost of (P, Q, d) is defined as OP T := minC∈C ∗ cost(C). We say that a k-clustering C α-approximates the k-means cost if cost(C) ≤ αOP T . Let O be a fixed k-clustering of (P, Q, d) that achieves the optimal k-means cost, and let C be any k-clustering of P . Let fO and fC be the labeling functions that correspond to O and C respectively. We assume that we have oracle access to the labeling function fO of the optimal target clustering up to a permutation of the labels. We can simulate a single query to such an oracle with O(k) queries to a same-cluster oracle as explained in Algorithm 1. A same-cluster oracle is an oracle that answers same-cluster(p1 , p2 ) queries with ‘yes’ or ‘no’ based on whether p1 and p2 belong to the same cluster in the fixed optimal clustering O. The error of a clustering C with respect to the clustering O for a k-means instance (P, Q, d) is now defined as error(C, O) := |{p ∈ P : fO (p) 6= fC (p)}|. In other words, error(C, O) is the number of points wrongly labeled by the clustering C with respect to the optimal clustering O. We note that the error is only up to a permutation of the cluster labels because we only have access to a simulated (up to a permutation of the cluster labels) version of fO instead of the true fO . We say that a k-clustering C is (1 − α)-accurate with respect to O if error(C, O) ≤ αn. Input : A point x ∈ X, oracle access to same-cluster(x1 , x2 ). Output: A label i ∈ [k]. Global : A list of points S = [ ]. 1 2 3 4 5 for 1 ≤ i ≤ length(S) do if same-cluster(x, S[i]) then Return i Append x to S. Return length(S). Algorithm 1: Simulating a labeling oracle with the same-cluster oracle. Given (P, Q, d), parameters k and (ǫ, δ) ∈ (0, 1)2 , and oracle access to fO , our goal is to output a k-clustering Ô of (P, Q, d) that, with probability at least (1 − δ), satisfies error(Ô, O) ≤ ǫn and cost(Ô) ≤ (1 + ǫ)OP T . 2.2 PAC Learning for k-Means Let K be a family of k-means instances, and let m(Q, ǫ, δ) be a positive integer-valued function. We say such a family K is learnable with sample complexity m if there exists a learning algorithm AL such that the following holds: Let ǫ ∈ (0, 1) be an error parameter and let δ ∈ (0, 1) be a probability parameter. Let (P, Q, d) be a k-means instance in class K. Let O be a fixed optimal k-means clustering and let fO be the associated labeling function. Let T be a fixed subset of P , and let S be a multiset of at least m(Q, ǫ, δ) independently and uniformly distributed samples from T . The algorithm AL , given input (P, Q, d) and (s, fO (s)) for all s ∈ S, outputs a function h : P → [k]. Moreover, with probability at least (1 − δ) over the choice of S, the output h agrees with fO on at least a (1 − ǫ) fraction of the points in T (i.e., |{p ∈ T : h(p) = fO (p)}| ≥ (1 − ǫ)|T |). We say that such a learning algorithm AL has the zero sample error property if the output h of AL assigns the correct label to all the sampled points (i.e., h(s) = fO (s) for all s ∈ S). Furthermore, we say that such a learning algorithm AL is non-inventive if it does not ‘invent’ labels that it has not seen. This means that the output h of AL does not assign labels that were not present in the input (sample, label) pairs (i.e., if h(x) = c for some x ∈ P , then for some sample point s ∈ S, fO (s) = c). In Section 3, we present a simple algorithm for (1 + ǫ)-approximate and (1 − ǫ)-accurate k-means clustering for a family K of k-means instances, assuming that K is learnable with a zero sample error, non-inventive learning algorithm. In the analysis, zero sample error and non-inventive properties play a key role in the crucial step of bounding the cost of incorrectly labeled points in terms of that of correctly labeled nearby points. We now present two learning theorems for the Euclidean setting and the finite metric space setting. Assuming no point lies on cluster boundaries, the theorem states that the labeling function fO of the optimal clustering is learnable with a zero sample error, non-inventive learning algorithm. We say that a k-means instance (P, Q, d) has no boundary points if in any optimal clustering O with optimal clusters O1 , . . . , Ok and respective centers o1 , . . . , ok , the closest center to any given point p ∈ P is unique (i.e., if p ∈ Oi , d(p, oi ) < d(p, oj ) for all j 6= i). 5 Theorem 4 (Learning k-Means in Euclidean Space). Let d(p1 , p2 ) = kp1 − p2 k be the Euclidean distance function. Let K = {(P, Rr , d) : P ⊂ R, |P | < ∞, (P, Rr , d) has no boundary points} be the family of k-means instances that are in r-dimensional Euclidean space and that have no boundary points. The family K is learnable with sample-complexity1 m(Rr , ǫ, δ) = Õ((k 2 r log(k 2 r)(log(k 3 r/ǫ)) + log(1/δ))/ǫ). Theorem 5 (Learning k-Means in Finite Metric Spaces). Let K = {(P, Q, d) : (P ∪ Q, d) is a finite metric space, and (P, Q, d) has no boundary points} be the family of finite metric space k-means instances that have no boundary points. The family K is learnable with sample-complexity2 m(Q, ǫ, δ) = Õ((k 2 (log k)(log |Q|)(log k + log 1/ǫ) + log(1/δ))/ǫ). We prove Theorem 4 and Theorem 5 in Appendix A, where we also introduce the necessary PAC learning concepts and tools. A Simple Algorithm for (1 + ǫ) Cost and (1 − ǫ) Accuracy 3 Let K be a family of k-means instances that is learnable with sample complexity m using a zero sample error, non-inventive learning algorithm AL . Let Aα be a constant-factor approximation algorithm, and let A1 be a polynomial-time algorithm for the 1-means problem (i.e., given (P, Q, d) ∈ K, A1 finds argminq∈Q cost(P, q) in polynomial time). We present a simple semi-supervised learning algorithm that, given a k-means instance (P, Q, d) of class K and oracle access to the labeling function fO of a fixed optimal clustering O of (P, Q, d), outputs a clustering Ô that, with probability at least (1 − δ), satisfies cost(Ô) ≤ (1 + ǫ)OP T and error(Ô, O) ≤ ǫ|P |. Our algorithm uses Aα , A1 , and AL as subroutines and makes O((k log |P |) · m(Q, ǫ4 , δ/(k log |P |))) oracle queries. We show that our algorithm can be easily modified for (1 + ǫ)-approximate and (1 − ǫ)-accurate k-median and other similar distance-based clustering problems. Towards the end of this section, we discuss several applications of this result, namely, for Euclidean and finite metric space k-means and k-median problems. Let us start by applying the learning algorithm AL to learn all the cluster labels. If we get perfect accuracy, the cost will be optimal. A natural question to ask in this case is: what happens to the cost if the learning output has ǫ error? In general, even a single misclassified point can incur an arbitrarily large additional cost. To better understand this, consider the following: Let Oi , Oj ⊆ P be two distinct optimal clusters in the target clustering, and let oi , oj be their respective cluster centers. Let p ∈ Oi be a point that is incorrectly classified and assigned label j 6= i by AL . Also assume that the number of misclassified points is small enough so that the centers of the clusters output by the learning algorithm are close to those of the optimal clustering. Thus, in the optimal clustering, p incurs a cost of d2 (p, oi ), whereas according to the learning outcome, p incurs a cost that is close to d2 (p, oj ). In the worst case, d(p, oj ) can be arbitrarily larger than d(p, oi ). Now suppose that, within distance r from p, there exists some point q ∈ Oj . In this case, we can bound the cost incurred due to the erroneous label of p using the true cost of p in the target clustering. To be more specific, using the triangle inequality, we get the following bound for any metric space: d(p, oj ) ≤ d(p, q) + d(q, oj ) ≤ r + d(q, oj ). Furthermore, due to the optimality, d(q, oj ) ≤ d(q, oi ) ≤ d(q, p) + d(p, oi ) ≤ r + d(p, oi ). Hence, it follows that d(p, oj ) ≤ 2r + d(p, oi ). To utilize this observation in an algorithmic setting, we need to make sure that, for every point that is misclassified into cluster j, there exists a correctly classified nearby point q that belongs to the optimal cluster Oj . Luckily, this is ensured by the combination of zero sample error and non-inventive properties of AL . If a point is misclassified into cluster j, the non-inventive property says that AL must have seen a sample point q from cluster j. The zero sample error property ensures that q is labeled correctly by AL . To make sure that such correctly labeled points are sufficiently close to their incorrectly labeled counterparts, we run AL separately on certain suitably bounded partitions of P . The formal description of our algorithm is given in Algorithm 2. The outline is as follows: First, we run Aα on (P, Q, d) and obtain an intermediate clustering C = {C1 , . . . , Ck }. For each Ci , we run A1 to find a suitable center ci . Next, we partition each intermediate cluster Ci into an inner ball and O(log |P |) outer rings centered around ci . We run the learning algorithm AL separately on each of these partitions. We choose the inner and outer radii of the rings so that, in each partition, the points that are incorrectly classified by the learning algorithm only incur a small additional cost compared to that of the correctly classified points. The final output is a clustering Ô that is consistent with the learning outputs on each of the partitions. For each cluster Ôi , we associate the output of running A1 on (Ôi , Q, d) as its center. 1 Õ 2 Õ hides poly(log log k, log log r) factors. hides poly(log log k, log log |Q|) factors. 6 Note that, due to the accuracy requirements, the cluster center to which a point is assigned in the output may not be the cluster center closest to that point in the output. It remains an interesting problem to find an accurate clustering in which every point is always assigned to its nearest cluster center. Input : k-Means instance (P, Q, d), oracle access to fO , constant-factor approximation algorithm Aα , 1-means algorithm A1 , zero sample-error, non-inventive learning algorithm AL with sample complexity m, accuracy parameter 0 < ǫ < 1, and failure probability 0 < δ < 1. Output: A clustering Ô = {Ô1 , . . . , Ôk } defined by a labeling fÔ : P → [k]. The respective cluster centers are ôi = argminq∈Q cost(Ôi , q). For each i ∈ [k], run A1 on (Ôi , Q, d) to find ôi . 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Let n = |P |, and let γ = ǫ2 /(288α). Run Aα and obtain an α-approximate k-means clustering C = {C1 , . . . , Ck }. For each i ∈ [k], run A1 on (Ci , Q, d) and find centers ci = argminq∈Q cost(Ci , q). for Ci ∈ C do p Let ri = cost(Ci , ci )/(γ|Ci |). Let Ci,0 be all points in Ci that are at most ri away from ci . Let Ci,j be the points in Ci that are between 2j−1 ri and 2j ri away from ci for j = 1, . . . , (log n)/2. Let m′ = m(Q, γ 2 , δ/(k log n)). for each non-empty Ci,j do Sample m′ points x1 , . . . , xm′ ∈ Ci,j independently and uniformly at random. Query the oracle on x1 , . . . , xm′ and let Si,j = {(xi , fO (xi )) : i = 1, . . . , m′ }. Run AL on input (P, Q, d) and Si,j , and obtain a labeling hi,j : Ci,j → [k]. Output the clustering Ô defined by the following labeling function: for each i, j, x ∈ Ci,j do Set fÔ (x) = hi,j (x). Algorithm 2: A simple algorithm for (1 + ǫ)-approximate (1 − ǫ)-accurate k-means clustering. We now analyze Algorithm 2 and show that, with probability at least (1 − δ), it outputs a (1 + ǫ)approximate and (1 − ǫ)-accurate k-means clustering. Let n = |P | be the total number of points in the k-means instance. Assume that 0 < γ < 1/2. For all i, j, p, let Hi,j,p = {x ∈ Ci,j : hi,j (x) = p} be the set of points that are in Ci,j and labeled p by the output hi,j of the learning algorithm AL . Call a point x ∈ P bad if x ∈ Hi,j,p but fO (x) 6= p; otherwise, call it good. Denote the set of bad points by B and let the complement B c of B be the set of good points. For each i, let oi = argminq∈Q cost(Oi , q) denote the center of cluster i in O. For any point x ∈ P , let o(x) denote the center of the optimal cluster for x under the clustering O. Thus, o(x) = op ⇔ fO (x) = p. Notice that, for all i, all the points in Ci belong p to one of the Ci,j ’s. In other words, no point in (log n)/2 Ci is more than 2 ri away from ci , where ri = cost(Ci , ci )/(γ|Ci |). To see this, suppose x ∈ Ci is a point that is more than 2(log n)/2 ri away from ci . Then, d2 (x, ci ) ≥ 2log n · cost(Ci , ci )/(γ|Ci |) > cost(Ci , ci ) which is a contradiction. Lemma 6. With probability at least (1 − δ), all non-empty Ci,j ’s satisfy |Cij ∩ B| ≤ γ 2 |Cij |. Proof. Recall that we run AL with mK (P, Q, d, γ 2 , δ/(k log n)) samples. Thus, by definition, AL , each run of AL succeeds with probability at least (1 − δ/(k log n)). Since we only run AL at most k log n times, the claim follows from the union bound. We continue the rest of the analysis conditioned on |Ci,j ∩ B| ≤ γ 2 |Ci,j | for all Ci,j . In proving the subsequent results, we use the following observations. Observation 7. No two points in Ci,j are more than distance R = 2 · 2j ri apart. Note that, according to the definition of Ci,j in the algorithm, R is the outer diameter of the ring that bounds Ci,j . Observation 8. For j ≥ 1, the inner radius of the ring that bounds Ci,j is 2j−1 ri . Therefore, we have the following lower bound for the cost of Ci,j : cost(Ci,j , ci ) ≥ |Ci,j |(2j−1 ri )2 . Lemma 9. For all i, j and p, if x ∈ Hi,j,p ∩ B then d(x, op ) ≤ 4 · 2j ri + d(x, o(x)). 7 Proof. If x ∈ Hi,j,p ∩ B, then x is in some optimal cluster denoted by Oq for some q 6= p. Note that if hi,j (i.e., the output of the algorithm AL ) gives label p to some point x, then the non-inventive property of AL ensures that it has seen at least one point y ∈ Ci,j that is in Op , and the zero sample-error property ensures that y is labeled correctly by hi,j . Thus, op = o(y) and oq = o(x). Hence, y is a good point with label p, and consequently, we have d(x, op ) ≤ d(x, y) + d(y, op ) ≤ d(x, y) + d(y, oq ) ≤ 2 d(x, y) + d(x, o(x)) ≤ 4 · 2j ri + d(x, o(x)), where the last inequality follows from Observation 7. Lemma 10 (Squared Triangle Inequality). For any a, b ≥ 0 and 0 < ǫ < 1, we have     2 2 1 2 2 2 2 b ≤ (1 + ǫ)a + b . (a + b) ≤ (1 + ǫ)a + 1 + ǫ ǫ Proof. The first inequality follows from the AM-GM inequality because 2ab ≤ ǫa2 + b2 /ǫ. The second inequality holds because ǫ < 1 implies 1 < 1/ǫ. Now, let us analyze the cost of the labeling output by Algorithm 2: cost(P, Ô) = X cost(Ôp , ôp ) ≤ X cost(Ôp , op ) = cost(Hi,j,p , op ). i,j,p p∈[k] p∈[k] X Splitting the cost contributions of good and bad points, we get X X cost(Hi,j,p ∩ B, op ) cost(P, Ô) ≤ d2 (x, o(x)) + i,j,p x∈B c = X 2 d (x, o(x)) + X X d2 (x, op ). i,j,p x∈Hi,j,p ∩B x∈B c Applying Lemma 9 together with Lemma 10, for any ǫ ∈ (0, 1), we have   X X X 2·3 ǫ 2 j 2 2 d (x, o(x)) + (4 · 2 ri ) cost(P, Ô) ≤ d (x, o(x)) + 1+ 3 ǫ i,j,p x∈Hi,j,p ∩B x∈B c  X X ǫ X 2 96 j 2 ≤ 1+ d (x, o(x)) + (2 ri ) 3 ǫ i,j,p x∈Hi,j,p ∩B x∈P  X X 96 ǫ = 1+ (2j ri )2 . OP T + 3 ǫ i,j x∈Ci,j ∩B From Lemma 6, we have |Ci,j ∩ B| ≤ γ 2 |Ci,j |, and it follows that  X 96 ǫ γ 2 |Ci,j | (2j ri )2 OP T + cost(P, Ô) ≤ 1 + 3 ǫ i,j   X X 96 ǫ 96 γ 2 |Ci,0 | ri2 + = 1+ OP T + γ 2 |Ci,j | (2j ri )2 . 3 ǫ ǫ i (1) i,j:j≥1 Consider the last two terms of Equation 1 individually. For the first summation, we have X γ 2 |Ci,0 | i 96 2 X 2 96 cost(Ci , ci ) X 96γ 96γα γ |Ci,0 | ri = ≤ cost(Ci , ci ) ≤ OP T. ǫ ǫ γ|C | ǫ ǫ i i i In the last inequality, we used the fact that C gives an α-approximation for the optimal cost. For the second summation of Equation 1, Observation 8 gives X i,j:j≥1 γ 2 |Cij | X 4 · 96γ 2 X 384γ 2 96 j 2 (2 ri ) = |Cij |(2j−1 ri )2 ≤ cost(Cij , ci ) ǫ ǫ ǫ i,j:j≥1 ≤ i,j:j≥1 X 384γ 2 i ǫ 384γ 2 α cost(Ci , ci ) ≤ OP T. ǫ 8 Here, we have again used the approximation guarantee of C in the final inequality. Choosing γ = ǫ2 /(288α) makes sure that both 96γα/ǫ ≤ ǫ/3 and 384γ 2 α/ǫ ≤ ǫ/3, and consequently, we get a final cost of at most (1 + ǫ)OP T . Recall that we established this bound conditioned on |Ci,j ∩ B| ≤ γ 2 |Ci,j | for all i, j. In Lemma 6, we saw that all the O(k log n) runs of the learning algorithm AL succeed with probability at least (1 − δ). Hence, the condition |Ci,j ∩ B| ≤ γ 2 |Ci,j | is true for all i, j with the same probability. Summing the inequality over all i, j yields |B| ≤ γ 2 |P | ≤ ǫ|P |. Consequently, the output of Algorithm 2, with probability at least (1 − δ) over the choice of samples in step 10, outputs a (1 + ǫ)-approximate and (1 − ǫ)-accurate k-means clustering. In Algorithm 2, instead of an exact algorithm A1 for the 1-means problem, we can also use a PTAS. Using a PTAS to approximate 1-means up to a (1 + ǫ) factor will only cost an additional (1 + ǫ) factor in our cost analysis. As a result, we get the same approximation and accuracy guarantees if we replace ǫ with ǫ/3. Algorithm 2 makes O((k log n) · m(Q, ǫ4 , δ/(k log n))) queries to the oracle fO in total. Recall that simulating an oracle query to fO takes O(k) same-cluster queries. Therefore, the total number of samecluster queries is O((k 2 log n) · m(Q, ǫ4 , δ/(k log n))). Our definition of a learning algorithm in Section 2.2 has nothing to do with whether the input is a k-means instance or a k-median instance. In fact, it applies to any similar clustering scenario where the cost is defined in terms of the ℓ’th power (ℓ > 0) of distances instead of squared distances. The analysis of Algorithm 2 can be adapted to any fixed ℓ where we have a suitable triangle inequality analogous to Lemma 10. For example, when ℓ ≤ 1, we can simply use the trivial inequality (a + b)ℓ ≤ aℓ + bℓ . Thus, for such clustering problems, Algorithm 2, with a slight modification on choice of radii in Step 4 and a little adjustment to the parameter γ, will give the same guarantees. Hence, we have the following theorem which is the formal version of Theorem 1. The proof follows from the analysis of Algorithm 2. Theorem 11. Let K be a family of k-means (k-median) instances. Suppose that K is learnable with sample complexity m(Q, ǫ, δ) using a zero sample error, non-inventive learning algorithm AL . Let Aα be a constant-factor approximation algorithm, and let A1 be a PTAS for the 1-means (1-median) problem. There exists a polynomial-time algorithm that, given an instance (P, Q, d) ∈ K, oracle access to samecluster queries for some fixed optimal clustering O, and parameters (ǫ, δ) ∈ (0, 1)2 , outputs a clustering that, with probability at least (1 − δ), is (1 − ǫ)-accurate with respect to O, and simultaneously has a cost of at most (1 + ǫ)OP T . The algorithm uses AL , Aα , and A1 as subroutines. The number of same-cluster queries made by the algorithm is 1. O((k 2 log |P |) · m(Q, ǫ4 , δ/(k log |P |))) for the k-means setting and 2. O((k 2 log |P |) · m(Q, ǫ2 , δ/(k log |P |))) for the k-median setting. For k-means and k-median instances in Euclidean space and those in finite metric spaces, there exist several constant-factor approximation algorithms (for example, Ahmadian et al. [1] and Kanungo et al. [15]). Solving the 1-means problem in Euclidean space is straightforward: The solution to P argminq∈Rr cost(P, q) is simply q = ( p∈P p)/|P |. For the k-median problem in Euclidean space, the problem of 1-median does not have an exact algorithm but several PTASes exist (for example, Cohen et al. [6]). In a finite metric space, to solve argminq∈Q cost(P, q), we can simply try all possible q ∈ Q in polynomial time, and this holds for the k-median setting as well. Thus, for Euclidean and finite metric space k-means and k-median instances that have no boundary points, Theorem 11, together with Theorem 4 and Theorem 5, gives efficient algorithms for (1 + ǫ)-approximate, (1 − ǫ)-accurate semi-supervised clustering. 4 Removing the Dependency on Problem Size in the Query Complexity for Euclidean k-Means For the family of Euclidean k-means instances, the query complexity of Algorithm 2 suffers from a Õ(log n) dependency (where n is the number of points in the input k-means instance, and Õ hides poly(log log n) factors) due to the repeated use of the learning algorithm AL . Specifically, we run AL with a failure probability of δ/(k log n), O(log n) times per cluster. Note that the sample complexity of AL itself, in the case of Euclidean k-means instances, does not have this dependency. In this section, we show that we can avoid this dependency on n using a slightly more involved algorithm at the cost of increasing the query complexity by an extra poly(k) factor. Nevertheless, this 9 algorithm has superior performance when the size of the input instance (i.e., the number of points) is very large (when log n = Ω(k 10 ) for example). RecallPthat, for a set C ⊂ Rr , cost(C, y) is minimized when y is the centroid of C, denoted by µ(C) = ( x∈C x)/|C|. Define the fractional size of an optimal cluster Oi as the fraction of points that belong to Oi , i.e., the ratio |Oi |/n. Suppose we only want to get a good approximation for the cost, and that we know that all the clusters in the target solution have sufficiently large fractional sizes. In this case, naive uniform sampling will likely pick a large number of samples from each of the clusters. This observation, together with Lemma 12, allows us to approximate the centroid and the cost of each cluster to any given accuracy. Lemma 12 (Lemma 1 and Lemma 2 of Inaba et al. [13]). Let (ǫ, δ) ∈ (0, 1)2 , let m ≥ 1/(ǫδ) be a positive integer, and let S = {p1 , . . . , pm } be a multiset of m i.i.d. samples from the uniform distribution over some finite set C ⊂ Rr . With probability at least (1 − δ), d2 (µ(S), µ(C)) ≤ ǫ · cost(C, µ(C))/|C| and cost(C, µ(S)) ≤ (1 + ǫ) cost(C, µ(C)). However, the above approach fails when some clusters in the optimal target solution contribute significantly to the cost, but have small fractional sizes (that is because uniform sampling is not guaranteed to pick sufficient numbers of samples from the small clusters). Ailon et al. [2] circumvented this issue with an algorithm that iteratively approximates the centers of the clusters using a distance-based probability distribution (D2 -sampling). We will refer to their algorithm as A∗ . Note that when it comes to accuracy, we can totally disregard clusters with small fractional sizes; we only have to correctly label a sufficiently large fraction of the points in large clusters. With this intuition, we present the outline of our algorithm. Let (P, Rr , d) be a k-means instance in Euclidean space that has no boundary points. For simplicity, we refer to the instance (P, Rr , d) by just P where possible, as for Euclidean k-means, the other two parameters are fixed. We start with a naive uniform sampling step that gives a good approximation for the centers of large clusters. Starting with these centers, we run a slightly modified version of algorithm A∗ to approximate the centers of the remaining small clusters. Thus, at this point, we have a clustering with a good cost and we know which clusters are large. We now run the learning algorithm AL on input P and obtain a labeling of the points. For each point, we assign its final label based on 1. the label assigned to it by the learning algorithm AL , and 2. its proximity to large cluster centers. In particular, if the output of AL decides that a point p should be in some large cluster i, and if p is sufficiently close to the approximate center for cluster i, we label it according to the learning output; otherwise, we label it according to its nearest approximate center. We show that this approach retains a cost that is close to the cost of the clustering output by A∗ . The accuracy guarantee comes from the facts that a large fraction of the points are sufficiently close to the centers of large clusters, and that AL labels most of them correctly with a good probability. We now review the key properties of algorithm A∗ (the algorithm of Ailon et al. [2]). Let 0 < ǫ < 1. Call a k-means instance P is (k, ǫ)-irreducible if no (k−1)-means clustering gives an (1+ǫ)-approximation for the k-means problem, i.e., if OP T k denotes the optimal k-means cost of P , then P is (k, ǫ)-irreducible if OP T k−1 > (1 + ǫ)OP T k . Suppose that P is (k, ǫ)-irreducible. Let O = {O1 , . . . , Ok } be the target optimal clustering, and let o1 , . . . , ok be the respective centers. Let Ci = {c1 , . . . , ci } denote a set of i centers and let Z(i) denote the following statement: There exists a set of i distinct indices j1 , . . . , ji such that, for all r ∈ [i], cost(Ojr , cr ) ≤ (1 + ǫ/16) cost(Ojr , ojr ). To put it differently, Z(i) says that Ci is a set of good candidate centers for i-many distinct clusters in the target optimal solution. Assuming P is (k, ǫ)irreducible, the algorithm A∗ yields a method to incrementally construct sets C1 , . . . , Ck (i.e., Ci+1 = Ci ∪{ci+1 }) such that, conditioned on Z(i) being true, Z(i + 1) is true with probability at least (1 − 1/k). Now suppose that P is (k, ǫ/(4k))-irreducible. Then A∗ gives a (1 + ǫ/(4 · 16k))-approximation for kmeans with probability at least (1 − 1/k)k ≥ 1/4. Otherwise, A∗ gives a (1 + ǫ/(4 · 16k))-approximation for the i-means problem for some i < k, where i is the largest integer such that P is (i, ǫ/4k)-irreducible. In the latter case, it will give a (1 + ǫ/(4 · 16k))(1 + ǫ/(4k))k−i -approximation with probability at least 1/4. In either case, the output of A∗ is a (1 + ǫ)-approximation. In our algorithm, we first find the centers of large clusters using uniform sampling, and then run A∗ find the remaining centers. This allows us to know which clusters are large, which is a crucial information needed for the final labeling. Suppose that in the target optimal solution we have k0 ≤ k clusters whose fractional sizes are at least ǫ/k. Note that k0 is at least 1 due to the Pigeonhole Principle, since at 10 least one cluster should have a fractional size of at least 1/k > ǫ/k. By Lemma 12, using uniform sampling, we can approximate the centroid of each of these large clusters with a good accuracy. Hence, we can have a set Ck0 of k0 centers such that Z(k0 ) is true with probability (1 − δ). Afterwards, we use A∗ to incrementally construct Ck0 +1 , . . . , Ck . Conditioned on Z(k0 ) being true, the output Ck will be a (1 + ǫ)-approximation with probability (1 − 1/k)k−k0 ≥ (1 − 1/k)k ≥ 1/4 for k ≥ 2. However, by independently running this incremental construction O(log(1/δ)) times and choosing the set of centers with the minimum total cost, we can boost this probability to (1−δ). This observation gives the following generalization of Theorem 10 of Ailon et al. [2]. Theorem 13. Consider a Euclidean k-means instance (P, Rr , d). Let O1 , . . . , Ok be a fixed optimal clustering with respective centers o1 , . . . , ok . Let k0 ≤ k and let Ck0 = {c1 , . . . , ck0 } be a set of points such that, with probability at least p0 , cost(Oi , ci ) ≤ (1 + ǫ/(64k)) cost(Oi , oi ) for all i ∈ [k0 ]. There exists an algorithm Acost that, given P , Ck0 , andPparameters (ǫ, δ) ∈ (0, 1)2 as P input, outputs a set cost(O , c ) ≤ (1 + ǫ) of centers Ck = Ck0 ∪ {ck0 +1 , . . . , ck } such that i i i∈[k] cost(Oi , oi ) with i∈[k] probability at least p0 (1 − δ). Moreover, Acost uses O((k 9 /ǫ4 ) log(1/δ)) same-cluster queries and runs in time O(nr(k 9 /ǫ4 ) log(1/δ)). Theorem 13 implies a method to get a good approximation for the cost that also reveals which clusters are large. Specifically, we first perform uniform sampling over the whole set P and approximate the centers of the large clusters. If we get a sufficient number of samples, the approximate centers will satisfy the precondition of Theorem 13 with a good probability. Thus, using algorithm Acost from Theorem 13, we get the desired approximation for the cost. What remains now is to use PAC learning and to appropriately label the points according to the learning outcome. We present the pseudo-code of our algorithm in Algorithm 3, where we use the algorithm Acost from Theorem 13 and the learning algorithm AL guaranteed by Theorem 4. In Algorithm 3, Q1 (k, ǫ, δ) = 256k 3 /(ǫ2 δ) is the number of samples needed to ensure that we pick a sufficient number of samples from each of the clusters with fractional sizes of at least ǫ/k, Q2 (k, ǫ, δ) is the sample complexity of the algorithm Acost , and Q3 (k, r, ǫ, δ) = m(Rr , ǫ, δ) is the sample complexity of the learning algorithm AL for an error ǫ and a failure probability δ. Note that Algorithm 3 only outputs a labeling; the corresponding centers are the centroids of the clusters defined by the labeling. As with Algorithm 2, the center that a point is assigned to in the final output may not be the closest center to that point. Input : Point set P ⊂ Rr , oracle access to fO , parameter k, accuracy parameter ǫ, failure probability δ, and algorithms Acost and AL . Output: A clustering Ô defined by the labeling fÔ : P → [k]. The cluster centers are the centroids of the clusters defined by fÔ . 1 2 3 4 5 Draw Q1 (k, ǫ, δ) samples from P independently and uniformly at random, and query fO to get their true cluster labels in O. Denote the set of sampled points by S, and for all i ∈ [k], denote the set of sampled points that belong to class i by Si . Let k ′ be the number of distinct cluster labels with more than (ǫ/(2k))Q1 (k, ǫ, δ) samples. Let Ck′ := {µ(Si ) : |Si | > (ǫ/(2k))Q1 (k, ǫ, δ)}. Without loss of generality, assume that the class labels for centers in Ck′ are 1, . . . , k ′ . Run the algorithm Acost , starting from Ck′ as the partial set of centers. This takes Q2 (k, ǫ, δ) more queries. Let Ck = {c1 , . . . , ck } be the output, and let OP T ∗ be the cost of the clustering obtained by assigning each point to its nearest ci . Use the PAC learning algorithm AL on Q3 (k, r, ǫ4 /k, δ) uniform i.i.d. samples from P to learn a  classifier for the k classes that is 1 − ǫ4 /k -accurate with probability at least (1 − δ). Let H1 , . . . , Hk be the sets of points that are labeled 1, . . . , k respectively by the classifier. Output the clustering Ô defined by the following labeling function: for each i ∈ [k ′ ] and p ∈ Hi such that d2 (p, ci ) ≤ kOP T ∗ /(nǫ3 ), set fÔ (p) = i. For any other point p, set fÔ (p) = i if the nearest cluster center to p in Ck is ci . Algorithm 3: Algorithm whose query complexity is independent of n 4.1 Analysis of Algorithm 3 Assume 0 < ǫ < 1/4. For an optimal cluster Oi with center oi , denote by ∆(Oi ) := cost(Oi , oi )/|Oi | the average squared distance from the points in Oi to their center oi . Let c1 , . . . , ck′ be the points in Ck′ where ci is the approximate centroid for the cluster with label i found in Step 2 of Algorithm 3. 11 First, we show that Step 2 of Algorithm 3 approximates all the large cluster centers accurately enough so that the precondition for applying Theorem 13 is satisfied (recall that the precondition is to have a set of k ′ < k approximate centers for k ′ distinct optimal clusters in the target solution). Lemma 14 ensures this, and also makes sure that the clusters that are too small are not picked as large clusters. This last fact is useful in the proof of Lemma 15. Lemma 14. With probability at least 1 − δ, the following statements are true: 1. For all i ∈ [k ′ ], d2 (oi , ci ) ≤ (ǫ/(64k)) ∆(Oi ). 2. For all i ∈ [k ′ ], cost(Oi , ci ) ≤ (1 + ǫ/(64k)) cost(Oi , oi ). 3. Let L = {i ∈ [k] : |Oi | ≥ (ǫ/k)n} be the set of the labels of the optimal clusters with a fractional size of at least ǫ/k. Then, L ⊆ [k ′ ]. 4. Let T = {i ∈ [k] : |Oi | ≤ (ǫ2 /k)n} be the set of the labels of the optimal clusters with fractional size of at most ǫ2 /k. Then T ∩ [k ′ ] = ∅. Proof. Notice that for each i ∈ [k ′ ], we have at least (ǫ/(2k))Q1 (k, ǫ, δ) = 128k 2/(ǫδ) samples in Step 2. Thus, using Lemma 12 on each cluster with error parameter ǫ/(64k) and failure probability δ/(2k), and applying the union bound, the first two statements hold with probability at least (1 − δ/2). As for the final two statements, note the following. Let q = Q1 (k, ǫ, δ), and let the random variables Xi,j : P j = 1, . . . , q be such that Xi,j = 1 if the j-th sample is from Oi . Otherwise, Xi,j = 0. Let Xi = j∈[q] Xi,j be total number of samples picked from Oi and pi = Pr[Xi,j = 1]. Since we pick identical samples, this probability does not depend on j. If i ∈ L, then pi ≥ ǫ/k and E[Xi ] = q · pi ≥ q · ǫ/k. Applying a standard Chernoff bound, we get        32k 2 δ q·ǫ  1 1 ǫ ≤ exp − ≤ . Pr Xi < · q ≤ Pr Xi < E[Xi ] ≤ exp − 2 2 k 2 2 ·3·k 3ǫδ 2k For i ∈ T , observe that pi ≤ ǫ2 /k and E[Xi ] = q · pi ≤ q · ǫ2 /k. Since ǫ < 1/4, we further have that ǫ/(2k) > 2ǫ2 /k. Applying another standard Chernoff bound, we now get     ǫ2 1 ǫ Pr Xi > · q ≤ Pr Xi > 2 · q ≤ Pr [Xi > 2 E[Xi ]] 2 k k     q · ǫ2 32k 2 δ ≤ exp − 2 ≤ exp − ≤ . 2 ·3·k 3δ 2k Applying the union bound, we get that the final two statements are also true with probability at least (1 − δ/2). Thus, all four statements are true with probability at least (1 − δ). Recall that OP T ∗ is the cost of the clustering defined by the centers Ck after Step 3 of Algorithm 3. Lemma 14, together with Theorem 13, implies that, with probability at least (1 − 2δ), X X cost(Oi , oi ) ≤ (1 + ǫ)OP T. cost(Oi , ci ) ≤ (1 + ǫ) OP T ∗ ≤ i∈[k] i∈[k] Also note that the PAC learning of Step 4 has at most ǫ4 /k error with probability at least (1 − δ). The following lemma thus provides the final ingredient of our proof. Conditioned on Steps 1, 2, 3, and 4 of Algorithm 3 being successful, Lemma 15 shows that the clustering defined in Step 5 achieves the desired accuracy of the algorithm with only a marginal increase in the cost. Lemma 15. Consider an P outcome of Algorithm 3 where all four statements of Lemma 14 are true. Additionally, suppose that i∈[k] cost(Oi , ci ) ≤ (1 + ǫ)OP T , and that the PAC learning of Step 4 of Algorithm 3 has at most ǫ4 /k error. Then, the output clustering Ô is (1 − 6ǫ)-accurate with respect to the target optimal clustering O and (1 + 3ǫ)-approximates the k-means cost. Proof. It is easy to see that the points that are incorrectly labeled by fÔ are fully contained inside the union of the following three disjoint sets: 1. Points that belong to the target optimal clusters whose fractional sizes are at most ǫ/k. 12 2. Points that are incorrectly labeled by the clustering algorithm in Step 4 but are not in the set defined above. 3. Points that do not satisfy the distance criterion in Step 5 but are correctly classified and are assigned a label from {1, . . . , k ′ } by the PAC learning output in Step 4. At most a k(ǫ/k) = ǫ fraction of the points are in the first set. By the accuracy of the PAC learning step, the second set has at most ǫ4 /k fraction of the points. As for the third set, we consider the following: By the fourth statement of Lemma 14, for i = 1, . . . , k ′ , Oi has a fractional size of at least ǫ2 /k; therefore, cost(Oi , oi )/(n(ǫ2 /k)) ≥ ∆(Oi ). Recall that Hi is the set of points that are assigned label i in the PAC learning step. Let i ∈ {1, . . . , k ′ }, and let p ∈ Hi be a point that is correctly labeled in the PAC learning output and that satisfies d2 (p, ci ) > kOP T ∗ /(nǫ3 ). For such a point p, we can lower bound the distance to its approximate center at follows: d2 (p, ci ) > kOP T ∗ kOP T k cost(Oi , oi ) ∆(Oi ) ≥ ≥ ≥ . nǫ3 nǫ3 nǫ3 ǫ Also, since 2 d2 (p, oi ) + 2 d2 (oi , ci ) ≥ d2 (p, ci ), and d2 (oi , ci ) ≤ (ǫ/(64k)) ∆(Oi ) by Lemma 14 (1), we get     ∆(Oi ) 1 ∆(Oi ) 1 ∆(Oi ) ǫ ∆(Oi ) d2 (p, oi ) > > − 2 d2 (oi , ci ) > −2 . 2 ǫ 2 ǫ 64k 4ǫ Hence, there can be at most 4ǫ|Oi | such points. Summing over all Oi , we conclude that at most 4ǫ fraction of the points are in the final set. Hence, the resulting clustering isP at least (1 − 6ǫ) accurate. It remains to show that the cost increase in Step 5 is small. Let cost′ = i∈[k] cost(Oi , ci ) be the cost of assigning each optimal cluster Oi to its approximate center ci . We know cost′ is close to the optimal cost by Theorem 13. We now show that the label assignment in Step 5 does not increase this cost by too much. Observe that for the points that are not labeled according to the PAC learning output, the contribution to cost′ can only decrease by assigning it to the nearest ci . For the points that are labeled according to the PAC output, if the learning algorithm has assigned them the correct labels, then there is no change in their contribution to cost′ . Thus, it is sufficient to bound the cost of those points that are incorrectly labeled by the PAC learning and are labeled according to the learning output in the final assignment. There can be at most (ǫ4 /k)n such points due to the learning accuracy, and assigning such a point p to ci can incur at most an extra d2 (p, ci ) cost. However, due to the distance constraint of Step 5 of Algorithm 3, d2 (p, ci ) ≤ kOP T ∗ /(nǫ3 ). Therefore, the total cost increase by these points is at most ǫ4 n kOP T ∗ ≤ ǫOP T ∗ ≤ ǫ(1 + ǫ)OP T ≤ 2ǫOP T. k nǫ3 Consequently, the cost of the output clustering of the algorithm is at most (1 + 3ǫ)OP T . Combining Lemma 14, Theorem 13, and Lemma 15, we have the proof of Theorem 2. We need each of the Steps 1, 3, and 4 to succeed with probability at least (1−δ/3) so that we get a final failure probability of δ, which can be easily achieved by replacing the probability parameter δ of Algorithm 3 with δ/3. Furthermore, according to the statement of Lemma 15, we also need to replace the accuracy parameter ǫ by ǫ/6. As for the claim on the query complexity, we recall that we only need O(k) same-cluster queries per single fO query, and Algorithm 3 makes a total number of Q1 (k, ǫ, δ) + Q2 (k, ǫ, δ) + Q3 (k, r, ǫ4 /k, δ) queries to fO . We remark that the sample complexity m(P, Rr , d, ǫ, δ) for learning Euclidean k-means instances is independent of P . 5 Lower Bounds for (1 − ǫ)-Accurate k-Means The results we presented in Section 3 and Section 4 uses PAC learning to achieve (1 − ǫ)-accuracy. Considering the class of Euclidean k-means instances, the query complexities of both our results have a linear dependency on the dimension of the Euclidean space. This is in contrast to the query complexities of the algorithms in Ashtiani et al. [3], which had strong assumptions on the input, and Ailon et al. [2], which was only aiming to approximate the optimal cost. In this section, we argue that the linear dependency on dimension is necessary for accuracy for Euclidean k-means instances. This result, as shown in the latter half of this section, also implies that the dependency on log |Q| is necessary for the k-means instances in finite metric spaces, where Q is the set of candidate centers. 13 Let r > 0 be an integer, and e1 , . . . , er be the standard basis in Rr . Consider the 2-means instance (P, Rr , d) in r-dimensional Euclidean space, where P = {−e1 , e1 , . . . , −er , er }. There are 2r points in P . In Lemma 16, we show that any optimal solution for this instance contains exactly one of ±ei in each optimal cluster for all i = 1, . . . , r. Hence, there are 2r different optimal solutions. This means that, without querying at least one of ±ei , it is information-theoretically impossible to know which cluster ei and −ei each belong to, and thus to achieve constant classification error, the query complexity must be linear in r. This proves the first claim of Theorem 3. Lemma 16. Consider the k-means instances (P, Rr , d) defined as above. Let O = {O1 , O2 } be any fixed optimal clustering on (P, Rr , d). For each i ∈ [r], either ei ∈ O1 and −ei ∈ O2 or ei ∈ O2 and −ei ∈ O1 . ˙ = {±e1, . . . , ±er }. We first observe the following: Let i ∈ [r] be Proof. Consider a bi-partition A∪B such that −ei ∈ A and ei ∈ B. Define A′ := A \ {−ei } ∪ {ei } and B ′ := B \ {ei } ∪ {−ei }. Then the cost of the solution (A, B) is the same as the cost of (A′ , B ′ ). This is because ei and −ei are at the same distance to all points in P \ {±ei }. Therefore, without loss of generality, we only need to consider bi-partitions where the set A can be described as A = {er0 +1 , . . . , er0 +r1 } ∪ {±er0 +r1 +1 , . . . , ±er0 +r1 +r2 } , for some r0 , r1 and r2 where r0 + r1 + r2 = r. Consequently, we have that B = {±e1 , . . . , ±er0 } ∪ {−er0 +1 , . . . , −er0 +r1 } . To put differently, A contains only the positive points on axes r0 + 1, . . . , r0 + r1 whereas B contains only the negative points on the same axes. For axes r0 + r1 + 1, . . . , r0 + r1 + r2 , A contains both positive and negative points on those axes. Similarly, for axes 1, . . . , r0 , B contains both points on those axes. The center of A is 1 1 ,..., , 0, . . . , 0) , (0, . . . , 0, | {z } r1 + 2r2 r1 + 2r2 | {z } | {z } r0 r2 r1 and the center of B is 1 1 ,...,− , 0, . . . , 0) . (0, . . . , 0, − | {z } r1 + 2r0 r1 + 2r0 | {z } | {z } r0 r2 r1 The cost of set A is  r1 · 1− 1 r1 + 2r2 2 !  + 2r2 · 1 + r1 1 (r1 + 2r2 )2  r1 (r1 + 2r2 − 1)2 + r1 (r1 − 1) + 2r2 (r1 + 2r2 )2 + 2r1 r2 1 + (r1 − 1) (r1 + 2r2 )2  1 (r1 + 2r2 )2  1 = r1 (r1 + 2r2 )2 − 2r1 (r1 + 2r2 ) + r1 + r1 (r1 − 1) + 2r2 (r1 + 2r2 )2 + 2r1 r2 2 (r1 + 2r2 )  1 (r1 + 2r2 )3 − r1 (r1 + 2r2 ) = 2 (r1 + 2r2 ) r1 = (r1 + 2r2 ) − . r1 + 2r2 = Similarly, the cost of set B is !   2 1 1 1 + 2r · 1 + r r1 · + (r1 − 1) 0 1 r1 + 2r0 (r1 + 2r0 )2 (r1 + 2r0 )2 r1 . = (r1 + 2r0 ) − r1 + 2r0  1− The total cost of this clustering is therefore  2r − r1 r1 + r1 + 2r2 r1 + 2r0  . It remains to show that the maximum of     r1 r1 r1 r1 = + + r1 + 2r2 r1 + 2r0 r1 + 2r2 2r − 2r2 − r1 14 is achieved by setting r1 = r and r0 = r2 = 0. For a fixed r1 , the last expression gives a convex function in variable r2 , and therefore either r2 = 0 or r2 = r − r1 maximizes the expression. In either case, we have that the maximum of this expression for a fixed r1 is 1+ r1 2r = , 2r − r1 2r − r1 which in turn achieves maximum when r1 = r. Now consider the hard example for Euclidean setting with r = (log n/2). Thus, Pwe have log n points in P . Start with an empty set Q, and for each subset P ′ of P , add µ(P ′ ) = ( p ∈ P ′ p)/|P ′ | to Q. This forms a finite metric space k-means instance (P, Q, d) that has no boundary points. From the claim on dimension dependency for the Euclidean setting discussed above, it follows that Ω(r) = Ω(log n) = Ω(log |Q|) samples are necessary to achieve (1 − ǫ)-accuracy. This proves the second claim of Theorem 3. References [1] Sara Ahmadian, Ashkan Norouzi-Fard, Ola Svensson, and Justin Ward. Better guarantees for kmeans and euclidean k-median by primal-dual algorithms. 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS), pages 61–72, 2017. [2] Nir Ailon, Anup Bhattacharya, Ragesh Jaiswal, and Amit Kumar. Approximate clustering with same-cluster queries. In 9th Innovations in Theoretical Computer Science Conference, ITCS 2018, January 11-14, 2018, Cambridge, MA, USA, pages 40:1–40:21, 2018. [3] Hassan Ashtiani, Shrinu Kushagra, and Shai Ben-David. Clustering with same-cluster queries. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS’16, pages 3224–3232, USA, 2016. Curran Associates Inc. [4] P. Awasthi, A. Blum, and O. Sheffet. Stability yields a PTAS for k-median and k-means clustering. In 2010 IEEE 51st Annual Symposium on Foundations of Computer Science, pages 309–318, Oct 2010. [5] Maria-Florina Balcan, Avrim Blum, and Anupam Gupta. Clustering under approximation stability. J. ACM, 60(2):8:1–8:34, May 2013. [6] Michael B. Cohen, Yin Tat Lee, Gary Miller, Jakub Pachocki, and Aaron Sidford. Geometric median in nearly linear time. In Proceedings of the Forty-eighth Annual ACM Symposium on Theory of Computing, STOC ’16, pages 9–21, New York, NY, USA, 2016. ACM. [7] Vincent Cohen-Addad, Philip N. Klein, and Claire Mathieu. Local search yields approximation schemes for k-means and k-median in euclidean and minor-free metrics. In IEEE 57th Annual Symposium on Foundations of Computer Science, FOCS 2016, 9-11 October 2016, Hyatt Regency, New Brunswick, New Jersey, USA, pages 353–364, 2016. [8] Amit Daniely, Sivan Sabato, Shai Ben-David, and Shai Shalev-Shwartz. Multiclass learnability and the ERM principle. J. Mach. Learn. Res., 16(1):2377–2404, January 2015. [9] S. Dasgupta. The Hardness of K-means Clustering. Technical report (University of California, San Diego. Department of Computer Science and Engineering). Department of Computer Science and Engineering, University of California, San Diego, 2008. [10] Dan Feldman, Morteza Monemizadeh, and Christian Sohler. A PTAS for k-means clustering based on weak coresets. In Proceedings of the Twenty-third Annual Symposium on Computational Geometry, SCG ’07, pages 11–18, New York, NY, USA, 2007. ACM. [11] Zachary Friggstad, Mohsen Rezapour, and Mohammad R. Salavatipour. Local search yields a PTAS for k-means in doubling metrics. In IEEE 57th Annual Symposium on Foundations of Computer Science, FOCS 2016, 9-11 October 2016, Hyatt Regency, New Brunswick, New Jersey, USA, pages 365–374, 2016. 15 [12] Sariel Har-Peled and Soham Mazumdar. On coresets for k-means and k-median clustering. In Proceedings of the thirty-sixth annual ACM symposium on Theory of computing, pages 291–300. ACM, 2004. [13] Mary Inaba, Naoki Katoh, and Hiroshi Imai. Applications of weighted voronoi diagrams and randomization to variance-based k-clustering: (extended abstract). In Proceedings of the Tenth Annual Symposium on Computational Geometry, SCG ’94, pages 332–339, New York, NY, USA, 1994. ACM. [14] Thorsten Joachims. Advances in kernel methods. chapter Making Large-scale Support Vector Machine Learning Practical, pages 169–184. MIT Press, Cambridge, MA, USA, 1999. [15] Tapas Kanungo, David M. Mount, Nathan S. Netanyahu, Christine D. Piatko, Ruth Silverman, and Angela Y. Wu. A local search approximation algorithm for k-means clustering. In Proceedings of the Eighteenth Annual Symposium on Computational Geometry, SCG ’02, pages 10–18, New York, NY, USA, 2002. ACM. [16] Euiwoong Lee, Melanie Schmidt, and John Wright. Improved and simplified inapproximability for k-means. Inf. Process. Lett., 120:40–43, 2017. [17] S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. A PAC Learning In this section, we introduce some fundamental concepts and tools from PAC learning theory, and prove Theorem 4 and Theorem 5. We start by introducing some necessary notations. Let X be an arbitrary domain set, Y be a label set, and H ⊆ {h : X → Y} be a hypothesis class. Let D be some arbitrary distribution over X × Y. The error of a hypothesis h ∈ H with respect to D is defined as LD (h) := Pr [h(x) 6= y] . (2) (x,y)∼D We say that H satisfies the realizability assumption if there exists some h∗ ∈ H such that LD (h∗ ) = 0. A learning algorithm A for hypothesis class H receives as input a sequence S := ((x1 , y1 ), . . . , (xm , ym )) of m pairs of domain points and their labels, where each domain point is sampled independently from D. The learning algorithm should output a predictor A(S) ∈ H. The goal of the algorithm is to minimize the generalization error LD (A(S)) with respect to the unknown D. We define the empirical error (risk) on S for a hypothesis h as |{i ∈ [m] : h(xi ) 6= yi }| LS (h) := . (3) m We call the algorithm A an empirical risk minimization (ERM) algorithm if A(S) ∈ argmin LS (h) . h∈H Let H be a hypothesis class for some discrete domain X . If the realizability assumption holds for H, and if A is an ERM algorithm for H, then LS (A(S)) = 0. Clearly, A(S) depends on S. Hence, the generalization error, LD (A(S)), is a random variable whose randomness depends on S. We are interested in establishing an upper bound on the number of samples that A needs in order to guarantee that the generalization error is small with a good probability. Definition 17 (Sample Complexity of a Learning Algorithm). Let A be a learning algorithm for a hypothesis class H. We define the sample complexity of A, mA,H (ǫ, δ), as the minimum natural number such that, if S is sequence of m ≥ mA,H (ǫ, δ) i.i.d. samples from D, with probability at least 1 − δ, LD (A(S)) ≤ ǫ. We now introduce some terminology from learning theory. We first define the notions of shattering and VC-dimension for a binary hypothesis class H ⊆ {h : X → {1, 2}}. Definition 18 (Shattering). We say a binary hypothesis class H shatters a finite set C = {c1 , . . . , cm } ⊆ X , |C| if {(h(c1 ), . . . , h(cm )) : h ∈ H} = {1, 2} . 16 Definition 19 (Vapnik–Chervonenkis (VC) Dimension). The VC-dimension of a binary hypothesis class H, denoted VCdim(H), is the maximum size of a set C ⊂ X that can be shattered by H. If H shatters sets of arbitrarily large size, we say that H has infinite VC-dimension. By definition, to shatter a set C, a hypothesis class H must have at least 2|C| distinct elements. Hence, we have the following lemma. Lemma 20. Let H be a finite hypothesis class. Then, VCdim(H) = O(log |H|). For a k-ary hypothesis class H ⊆ {h : X → [k]}, we define the analogous notions of multiclass shattering and Natarajan dimension. As we will see below, the notion of multiclass shattering is a generalization of the notion of shattering for the binary hypothesis classes. Consequently, the Natarajan dimension is a generalization of the VC-dimension. Definition 21 (Multiclass Shattering). We say that a set C ⊆ X is shattered by a k-ary hypothesis class H if there exist two functions f0 , f1 : C → [k] such that, • For every x ∈ C, f0 (x) 6= f1 (x). • For every B ⊂ C, there exists a function h ∈ H such that, ∀x ∈ B, h(x) = f0 (x) and ∀x ∈ C\B, h(x) = f1 (x). Definition 22 (Natarajan Dimension). The Natarajan dimension of a k-ary hypothesis class H, denoted by Ndim(H), is the maximal size of a set C ⊆ X that can be shattered by H. Suppose k = 2. If a binary hypothesis class Hbin : X → {1, 2} shatters a set C ⊆ X according to Definition 18, then for all subsets B of C, there exists a hypothesis h ∈ Hbin that maps all points in B to 1 and all points in C\B to 2. Thus, setting f0 (x) = 1 and f1 (x) = 2 to be constant functions, it follows that Hbin shatters C according to Definition 21 as well. For the converse, suppose that Hbin is hypothesis class that shatters a set C ⊆ X according to Definition 21. Definition 21 essentially says that, any mapping C → {1, 2}|C| must be achievable with one of the hypotheses in Hbin which is equivalent to Definition 18. To see this, notice that f0 (x) 6= f1 (x), and that we only have two labels. In the remainder of this appendix, we prove Theorem 4 and Theorem 5. We proceed with defining a new hypothesis class for binary classification which is associated with non-homogeneous halfspaces in Rr . Formally, given a non-homogeneous hyperplane ℓ ⊂ Rr , let hℓ be the binary classifier that assigns labels ±1 to points based on which side of the hyperplane the point lies on. We define the binary hypothesis class HbEUC as HbEUC = {hℓ : ℓ is a (non-homogeneous) hyperplane in Rr }. Lemma 23 (Theorem 9.3 of Shalev-Shwartz and Ben-David [17]). The VC-dimension of HbEUC is r + 1. Let (P, Rr , d) be a k-means instance in Euclidean space. Let O be a fixed optimal clustering of P , and let fO be the labeling function of O. Assume that (P, Rr , d) has no boundary points (i.e., in an optimal clustering, for any given point p ∈ P , the closest optimal center is unique). Let A, B ⊂ P two non-empty disjoint subsets of points of two different labels under fO . Due to the assumption of having no boundary points, there exists a hypothesis h ∈ HbEUC that perfectly separates points in A from those in B. That is to say, it assigns −1 to all points in A and +1 to all points in B. Such a hypothesis h can be learned in polynomial-time using standard SVM (Support Vector Machine) training algorithms like the one proposed by Joachims [14]. Let S = {(x1 , y1 ), . . . , (xm , ym )} be a multiset of sample-label pairs from P × Q. Fix a pair of distinct cluster labels a, b ∈ [k ′ ] and let Sa,b be the subset of the samples-label pairs in S whose labels are either a or b. Since each pair of original clusters can be separated with a hyperplane in Rr , there exists a hypothesis ga,b ∈ HbEUC that perfectly labels the samples in Sa,b ; that is to say that for all (x, y) ∈ Sa,b , ga,b (x) = 1 if y = a and ga,b (x) = −1 ifPy = b. Suppose for each pair a, b ∈ [k], a 6= b, we find a hypothesis ga,b . Then, for P all samples (x, a) ∈ S, b6=a ga,b (x) = k − 1. Moreover, for any sample (x, a) ∈ S, and for any a′ 6= a, b6=a′ ga′ ,b (x) < k − 1. This is because ga′ ,a (x) = −1. Consequently, the function g defined as X ga,b (x) g(x) = argmax a∈[k] b∈[k],b6=a 17 returns the correct label y for all (x, y) ∈ S. Hence, the aforementioned procedure gives an ERM algorithm for the hypothesis class H∗ which is formally defined follows: for ḡ = (ga,b )[a,b∈[k],a6=b] ∈ k(k−1) P HbEUC , a (k(k − 1))-tuple of binary hypotheses, let hḡ (x) = argmaxa∈[k] b∈[k],b6=a ga,b (x). Define n k(k−1) o H∗ = hḡ : ḡ ∈ HbEUC . The pseudo-code of the algorithm is presented in Algorithm 7. This algorithm is an adaptation of the All-Pairs algorithm described in Chapter 17.1 of Shalev-Shwartz and Ben-David [17]. An observant reader may notice that learning two hypotheses, namely ga,b and gb,a , per each distinct a, b is redundant as one can set ga,b (x) = −gb,a (x). However, for the ease of presentation, we stick with the idea that ga,b and gb,a are picked independently from each other. Input : A set of samples S = (x1 , y1 ), . . . , (xm , ym ) and an ERM algorithm B for learning HbEUC . Output: A hypothesis g ∈ H∗ . 1 2 3 4 5 6 7 for a, b ∈ [k] such that a 6= b do Let Sa,b = [ ] be an empty list. for t = 1, . . . , m do If yt = a add (xt , 1) to Sa,b . If yt = b add (xt , −1) to Sa,b . Let ga,b = B(Sa,b ). Let g(x) = argmaxa∈[k] P  b∈[k],b6=a ga,b (x) . Algorithm 4: An ERM algorithm for k-category classification. The corollary to the following lemma bounds the Natarajan dimension of H∗ . Lemma 24 (Lemma 29.6 of Shalev-Shwartz and Ben-David [17]). Consider a multiclass predictor derived in the following way. Train l binary classifiers from a binary hypothesis class Hbin and let v : {−1, 1}l → v [k] be a mapping from the l predictor results to a class label. Let Hbin be the class of multiclass predictors v obtained in this manner. If VCdim(Hbin ) = d then, Ndim(Hbin ) ≤ 3dl log(ld). Corollary 25. The Natarajan dimension of the hypothesis class H∗ is O(rk 2 log(rk)) where r is the dimension of the Euclidean space and k is the number of clusters in the k-means instance. The following lemma, combined with Corollary 25 yields that   3   k 2 r log(k 2 r) log kǫ r + log mERM,H∗ (ǫ, δ) = O  ǫ 1 δ  . Lemma 26 (Theorem 3.7 of Daniely et al. [8]). Let H ⊆ {h : X → [k]} be a hypothesis class, for which the realizability assumption holds with respect to some distribution D, and let d = Ndim(H). Let mERM,H (ǫ, δ) = sup mA,H (ǫ, δ), A∈ERM where the supremum is taken over all ERM algorithms for H. Then,  ! 1 + log d log kd ǫ δ . mERM,H (ǫ, δ) = O ǫ Thus, if m ≥ mERM,H∗ (ǫ, δ) i.i.d. samples from Q and their respective labels were input to Algorithm 7, the output hypothesis h, with probability at least (1 − δ), will have at most an ǫ error. To prove Theorem 4, what remains is to ensure that the learned hypothesis does not output class labels that the learning algorithm has not seen in the samples. For this, we propose a simple modification to Algorithm 7. That is, if a′ is a class label that is not present in the samples, for all class labels a from which we have seen at least 1 sample, we set ga,a′ (x) = 1 and ga′ ,a (x) = −1 to be constant functions which may correspond to hyperplanes that are infinitely far away from the origin. Without loss of generality, assume that we have seen samples with labels 1, . . . , k ′ , and we have not seen samples with 18 labels k ′ + 1, . . . , k. Let a ∈ k ′ be a label that that we have seen and let a′ ∈ [k]\[k ′ ] be a label that we have not seen. Therefore we have X X X ga,b (x) ≥ −(k ′ − 1) + (k − k ′ ) = k − 2k ′ + 1, ga,b (x) + ga,b (x) = b6=a and X b6=a′ b∈[k]\[k′ ] b∈[k′ ],b6=a ga′ ,b (x) = X b∈[k′ ] ga′ ,b (x) + X ga′ ,b (x) ≤ −k ′ + (k − k ′ − 1) = k − 2k ′ − 1. b∈[k]\[k′ ],b6=a′ Consequently, the output g(x) of Algorithm 7 will never assign a label from [k]\[k ′ ] to any x ∈ Rd . To prove Theorem 5, all we need to do is to replace the binary hypothesis class HbEUC used in the preceding discussion with the binary hypothesis class HbFMS which we introduce next. We show that HbFMS satisfies the realizability assumption. We further show that there exists an ERM algorithm for HbFMS and the VC-dimension of HbFMS is small. Let (P, Q, d) be k-means instance in a finite metric space where |Q| < ∞, and define the binary hypothesis class HbFMS as follows: HbFMS = {hq1 ,q2 : (q1 , q2 ) ∈ Q × Q}, where hq1 ,q2 : P → {−1, +1} is a binary labeling function define as ( −1, if d(p, q1 ) ≥ d(p, q2 ) hq1 ,q2 (p) = +1, otherwise. Observe that this is a finite hypothesis class with at most |Q|2 hypotheses. Furthermore, based on the assumption on no boundary points, for any two subsets P of two different labels, there exists an h ∈ HbFMS that perfectly separates them. Hence, pairwise binary classification of any two labels is realizable under Hb . To find such h in polynomial-time, we simply iterate over all possible hypotheses and pick the one that gives zero error. Lemma 20 yields that the VC-dimension of HbFMS is O(log |Q|). 19
8cs.DS
Synthesis of Surveillance Strategies via Belief Abstraction arXiv:1709.05363v2 [cs.RO] 19 Mar 2018 Suda Bharadwaj1 and Rayna Dimitrova2 and Ufuk Topcu1 Abstract— We study the problem of synthesizing a controller for a robot with a surveillance objective, that is, the robot is required to maintain knowledge of the location of a moving, possibly adversarial target. We formulate this problem as a one-sided partial-information game in which the winning condition for the agent is specified as a temporal logic formula. The specification formalizes the surveillance requirement given by the user, including additional non-surveillance tasks. In order to synthesize a surveillance strategy that meets the specification, we transform the partial-information game into a perfect-information one, using abstraction to mitigate the exponential blow-up typically incurred by such transformations. This enables the use of off-the-shelf tools for reactive synthesis. We use counterexample-guided refinement to automatically achieve abstraction precision that is sufficient to synthesize a surveillance strategy. We evaluate the proposed method on two case-studies, demonstrating its applicability to large state-spaces and diverse requirements. I. INTRODUCTION Performing surveillance, that is, tracking the location of a target, has many applications. If the target is adversarial, these applications include patrolling and defense, especially in combination with other objectives, such as providing certain services or accomplishing a mission. Techniques for tracking non-adversarial but unpredictable targets have been proposed in settings like surgery to control cameras to keep a patient’s organs under observation despite unpredictable motion of occluding obstacles [1]. Mobile robots in airports have also been proposed to carry luggage for clients, requiring the robots to follow the human despite unpredictable motion and possibly sporadically losing sight of the target [2]. When dealing with a possibly adversarial target, a strategy for the surveying agent for achieving its objective can be seen as a strategy in a two-player game between the agent and the target. Since the agent may not always observe, or even know, the exact location of the target, surveillance is, by its very nature, a partial-information problem. It is thus natural to reduce surveillance strategy synthesis to computing a winning strategy for the agent in a two-player partial-information game. Game-based models for related problems have been extensively studied in the literature. Notable examples include pursuit-evasion games [3], patrolling games [4], and graph-searching games [5], where the problem is formulated as enforcing eventual detection, which is, in its essence a search problem – once the target is detected, the game ends. For many applications, this formulation is too restrictive. 1 Suda Bharadwaj and Ufuk Topcu are with the University of Texas at Austin 2 Rayna Dimitrova is with the University of Leicester, UK. Most of this work was done while Rayna Dimitrova was a postdoctoral researcher at UT Austin. Often, the goal is not to detect or capture the target, but to maintain certain level of information about its location over an unbounded (or infinite) time duration, or, alternatively, be able to obtain sufficiently precise information over and over again. In other cases, the agent has an additional objective, such as performing certain task, which might prevent him from capturing the target, but allow for satisfying a more relaxed surveillance objective. In this paper, we study the problem of synthesizing strategies for enforcing temporal surveillance objectives, such as the requirement to never let the agent’s uncertainty about the target’s location exceed a given threshold, or recapturing the target every time it escapes. To this end, we consider surveillance objectives specified in linear temporal logic (LTL), equipped with basic surveillance predicates. This formulation also allows for a seamless combination with other task specifications. Our computational model is that of a twoplayer game played on a finite graph, whose nodes represent the possible locations of the agent and the target, and whose edges model the possible (deterministic) moves between locations. The agent plays the game with partial information, as it can only observe the target when it is in it’s area of sight. The target, on the other hand, always has full information about the agent’s location, even when the agent is not in sight. In that way, we consider a model with one-sided partial information, making the computed strategy for the agent robust against a potentially more powerful adversary. We formulate surveillance strategy synthesis as the problem of computing a winning strategy for the agent in a partial-information game with a surveillance objective. There is a rich theory on partial-information games with LTL objectives [6], [7], and it is well known that even for very simple objectives the synthesis problem is EXPTIMEhard [8], [9]. Moreover, all the standard algorithmic solutions to the problem are based on some form of belief set construction, which transforms the imperfect-information game into a perfect-information game and this may be exponentially larger, since the new set of states is the powerset of the original one. Thus, such approaches scale poorly in general, and are not applicable in most practical situations. We address this problem by using abstraction. We introduce an abstract belief set construction, which underapproximates the information-tracking abilities of the agent (or, alternatively, overapproximates its belief, i.e., the set of positions it knows the target could be in). Using this construction we reduce surveillance synthesis to a two-player perfect-information game with LTL objective, which we then solve using off-the shelf reactive synthesis tools [10]. Our construction guarantees that the abstraction is sound, that is, if a surveillance strategy is found in the abstract game, it corresponds to a surveillance strategy for the original game. If, on the other hand, such a strategy is not found, then the method automatically checks if this is due to the coarseness of the abstraction, in which case the abstract belief space is automatically refined. Thus, our method follows the general counterexample guided abstraction refinement (CEGAR) [11] scheme, which has successfully demonstrated its potential in formal verification and reactive synthesis. Contributions. We make the following contributions: (1) We propose a formalization of surveillance objectives as temporal logic specifications, and frame surveillance strategy synthesis as a partial-information reactive synthesis problem. (2) We develop an abstraction method that soundly approximates surveillance strategy synthesis, thus enabling the application of efficient techniques for reactive synthesis. (3) We design procedures that automatically refine a given abstraction in order to improve its precision when no surveillance strategy exists due to coarseness of the approximation. (4) We evaluate our approach on different surveillance objectives (e.g, safety, and liveness) combined with task specifications, and discuss the qualitatively different behaviour of the synthesized strategies for the different kinds of specifications. Related work. While closely related to the surveillance problem we consider, pursuit-evasion games with partial information [3], [12], [13] formulate the problem as eventual detection, and do not consider combinations with other mission specifications. Other work, such as [14] and [15], additionally incorporates map building during pursuit in an unknown environment, but again solely for target detection. Synthesis from LTL specifications [16], especially from formulae in the efficient GR(1) fragment [17], has been extensively used in robotic planning (e.g. [18], [19]), but surveillance-type objectives, such as the ones we study here, have not been considered so far. Epistemic logic specifications [20] can refer to the knowledge of the agent about the truth-value of logical formulas, but, contrary to our surveillance specifications, are not capable of expressing requirements on the size of the agent’s uncertainty. CEGAR has been developed for verification [11], and later for control [21], of LTL specifications. It has also been extended to infinite-state partial-information games [22], and used for sensor design [23], both in the context of safety specifications. In addition to being focused on safety objectives, the refinement method in [22] is designed to provide the agent with just enough information to achieve safety, and is thus not applicable to surveillance properties whose satisfaction depends on the size of the belief sets. II. GAMES WITH SURVEILLANCE OBJECTIVES We begin by defining a formal model for describing surveillance strategy synthesis problems, in the form of a two-player game between an agent and a target, in which the agent has only partial information about the target’s location. A. Surveillance Game Structures We define a surveillance game structure to be a tuple G = (S, sinit , T, vis), with the following components: 0 1 2 3 4 vis(4, 18) = false, vis(4, 17) = false, 5 6 7 8 9 vis(4, 19) = true, vis(4, 23) = false 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 (a) Surveillance arena (4, 18) (3, 17) (3, 19) (3, 23) (9, 17) (9, 19) (9, 23) (b) Transitions from the initial state Fig. 1: A simple surveillance game on a grid arena. Obstacles are shown in red, the agent (at location 4) and the target (at location 18) are coloured in blue and orange respectively. • S = La × Lt is the set of states, with La the set of locations of the agent, and Lt the locations of the target; init • s = (lainit , ltinit ) is the initial state; • T ⊆ S × S is the transition relation describing the possible moves of the agent and the target; and • vis : S → B is a function that maps a state (la , lt ) to true iff position lt is in the area of sight of la . The transition relation T encodes the one-step move of both the target and the agent, where the target moves first and the agent moves second. For a state (la , lt ) we denote succ t (la , lt ) as the set of successor locations of the target: succ t (la , lt ) = {lt0 ∈ Lt | ∃la0 . ((la , lt ), (la0 , lt0 )) ∈ T }. We extend succ t to sets of locations of the target by stipulating that the set succ t (la , L) consists of all possible successor locations of the target for states in {la } × L. S Formally, let succ t (la , L) = lt ∈L succ t (la , lt ). For a state (la , lt ) and a successor location of the target lt0 , we denote with succ a (la , lt , lt0 ) the set of successor locations of the agent, given that the target moves to lt0 : succ a (la , lt , lt0 ) = {la0 ∈ La | ((la , lt ), (la0 , lt0 )) ∈ T }. We assume that, for every s ∈ S, there exists s0 ∈ S such that (s, s0 ) ∈ T , that is, from every state there is at least one move possible (this might be staying in the same state). We also assume that when the target moves to an invisible location, its position does not influence the possible one-step moves of the agent. Formally, we require that if vis(la , lt000 ) = vis(la , lt0000 ) = false, then succ a (la , lt0 , lt000 ) = succ a (la , lt00 , lt0000 ) for all lt0 , lt00 , lt000 , lt0000 ∈ Lt . This assumption is natural in the setting when the agent can move in one step only to locations that are in its sight. Example 1: Figure 1 shows an example of a surveillance game on a grid. The sets of possible locations La and Lt for the agent and the target consist of the squares of the grid. The transition relation T encodes the possible one-step moves of both the agent and the target on the grid, and incorporates all desired constraints. For example, moving to an occupied location, or an obstacle, is not allowed. Figure 1b shows the possible transitions from the initial state (4, 18). The function vis encodes straight-line visibility: a location lt is visible from a location la if there is no obstacle on the straight line between them. Initially the target is not in the area of sight of the agent, but the agent knows the initial position of the target. However, once the target moves to one of the locations reachable in one step, in this case, locations {17, 19, 23}, this might no longer be the case. More precisely, if the target moves to location 19, then the agent observes its location, but if it moves to one of the others, then the agent no longer knows its exact location.  (4, {18}) (3, {19}) (3, {17, 23}) (9, {19}) (9, {17, 23}) Fig. 2: Transitions from the initial state in the belief-set game from Example 2 where vis(4, 17) = vis(4, 23) = false. The outcome of given strategies fa and ft for the agent and the target in Gbelief , denoted outcome(Gbelief , fa , ft ), is a run s0 , s1 , . . . of Gbelief such that for every i ≥ 0, we have si+1 = fa (s0 , . . . , si , Bti ), where Bti = ft (s0 , . . . , si ). C. Temporal Surveillance Objectives B. Belief-Set Game Structures In surveillance strategy synthesis we need to state properties of, and reason about, the information which the agent has, i.e. its belief about the location of the target. To this end, we can employ a powerset construction which is commonly used to transform a partial-information game into a perfectinformation one, by explicitly tracking the knowledge one player has as a set of possible states of the other player. Given a set B, we denote with P(B) = {B 0 | B 0 ⊆ B} the powerset (set of all subsets) of B. For a surveillance game structure G = (S, sinit , T, vis) we define the corresponding belief-set game structure Gbelief = (Sbelief , sinit belief , Tbelief ) with the following components: • Sbelief = La × P(Lt ) is the set of states, with La the set of locations of the agent, and P(Lt ) the set of belief sets describing information about the location of the target; init init init • sbelief = (la , {lt }) is the initial state; • Tbelief ⊆ Sbelief × Sbelief is the transition relation where ((la , Bt ), (la0 , Bt0 )) ∈ Tbelief iff la0 ∈ succ a (la , lt , lt0 ) for some lt ∈ Bt and lt0 ∈ Bt0 and one of these holds: (1) Bt0 = {lt0 }, lt0 ∈ succ t (la , Bt ), vis(la , lt0 ) = true; (2) Bt0 = {lt0 ∈ succ t (la , Bt ) | vis(la , lt0 ) = false}. Condition (1) captures the successor locations of the target that can be observed from the agent’s current position la . Condition (2) corresponds to the belief set consisting of all possible successor locations of the target not visible from la . Example 2: Consider the surveillance game structure from Example 1. The initial belief set is {18}, consisting of the target’s initial position. After the first move of the target, there are two possible belief sets: the set {19} resulting from the move to a location in the area of sight of the agent, and {17, 23} consisting of the two invisible locations reachable in one step from location 18. Figure 2 shows the successor states of the initial state (4, {18}) in Gbelief .  Based on Tbelief , we can define the functions succ t : Sbelief → P(P(Lt )) and succ a : Sbelief × P(Lt ) → P(La ) similarly to the corresponding functions defined for G. A run in Gbelief is an infinite sequence s0 , s1 , . . . of states in Sbelief , where s0 = sinit belief , (si , si+1 ) ∈ Tbelief for all i. A strategy for the target in Gbelief is a function ft : + Sbelief → P(Lt ) such that ft (π · s) = Bt implies Bt ∈ ∗ succ t (s) for every π ∈ Sbelief and s ∈ Sbelief . That is, a strategy for the target suggests a move resulting in some belief set reachable from some location in the current belief. A strategy for the agent in Gbelief is a function fa : S + × P(Lt ) → S such that fa (π · s, Bt ) = (la0 , Bt0 ) implies Bt0 = ∗ Bt and la0 ∈ succ a (s, Bt ) for every π ∈ Sbelief , s ∈ Sbelief and Bt ∈ P(Lt ). Intuitively, a strategy for the agent suggests a move based on the observed history of the play and the current belief about the target’s position. Since the states of a belief-set game structure track the information that the agent has, we can state and interpret surveillance objectives over its runs. We now formally define the surveillance properties in which we are interested. We consider a set of surveillance predicates SP = {pk | k ∈ N>0 }, where for k ∈ N>0 we say that a state (la , Bt ) in the belief game structure satisfies pk (denoted (la , Bt ) |= pk ) iff |{lt ∈ Bt | vis(la , lt ) = false}| ≤ k. Intuitively, pk is satisfied by the states in the belief game structure where the size of the belief set does not exceed the threshold k ∈ N>0 . We study surveillance objectives expressed by formulas of linear temporal logic (LTL) over surveillance predicates. The LTL surveillance formulas are generated by the grammar ϕ := p | true | false | ϕ ∧ ϕ | ϕ ∨ ϕ | ϕ | ϕ U ϕ | ϕ R ϕ, where p ∈ SP is a surveillance predicate, is the next operator, U is the until operator, and R is the release operator. We also define the derived operators finally: ϕ = true U ϕ and globally: ϕ = false R ϕ. LTL formulas are interpreted over (infinite) runs. If a run ρ satisfies an LTL formula ϕ, we write ρ |= ϕ. The formal definition of LTL semantics can be found in [24]. Here we informally explain the meaning of the formulas we use. Of special interest will be surveillance formulas of the form pk , termed safety surveillance objective, and pk , called liveness surveillance objective. Intuitively, the safety surveillance formula pk is satisfied if at each point in time the size of the belief set does not exceed k. The liveness surveillance objective pk , on the other hand, requires that infinitely often this size is below or equal to k. Example 3: We can specify that the agent is required to always know with certainty the location of the target as p1 . A more relaxed requirement is that the agent’s uncertainty never grows above 5 locations, and it infinitely often reduces this uncertainty to at most 2 locations: p5 ∧ p2 .  D. Incorporating Task Specifications We can integrate LTL objectives not related to surveillance, i.e., task specifications, by considering, in addition to SP, a set AP of atomic predicates interpreted over states of G. In order to define the semantics of p ∈ AP over states of Gbelief , we restrict ourselves to predicates observable by the agent. Formally, we require that for p ∈ AP, and states (la , lt0 ) and (la , lt00 ) with vis(la , lt0 ) = vis(la , lt00 ) = false it holds that (la , lt0 ) |= p iff (la , lt00 ) |= p. One class of such predicates are those that depend only on the agent’s position. Example 4: Suppose that at goal is a predicate true exactly when the agent is at some designated goal location. We can then state that the agent visits the goal infinitely often while always maintaining belief uncertainty of at most 10 locations using the LTL formula at goal ∧ p10 .  E. Surveillance Synthesis Problem A surveillance game is a pair (G, ϕ), where G is a surveillance game structure and ϕ is a surveillance objective. A winning strategy for the agent for (G, ϕ) is a strategy fa for the agent in the corresponding belief-set game structure Gbelief such that for every strategy ft for the target in Gbelief it holds that outcome(Gbelief , fa , ft ) |= ϕ. Analogously, a winning strategy for the target for (G, ϕ) is a strategy ft such that, for every strategy fa for the agent in Gbelief , it holds that outcome(Gbelief , fa , ft ) 6|= ϕ. Surveillance synthesis problem: Given a surveillance game (G, ϕ), compute a winning strategy for the agent for (G, ϕ), or determine that such a strategy does not exist. It is well-known that two-player perfect-information games with LTL objectives over finite-state game structures are determined, that is exactly one of the players has a winning strategy. This means that the agent does not have a winning strategy for a given surveillance game, if and only if the target has a winning strategy for this game. We refer to winning strategies of the target as counterexamples. III. BELIEF SET ABSTRACTION We used the belief-set game structure in order to state the surveillance objective of the agent. While in principle it is possible to solve the surveillance strategy synthesis problem on this game, this is in most cases computationally infeasible, since the size of this game is exponential in the size of the original game. To circumvent this construction when possible, we propose an abstraction-based method, that given a surveillance game structure and a partition of the set of the target’s locations, yields an approximation that is sound with respect to surveillance objectives for the agent. An abstraction partition is a family Q = {Qi }ni=1 of subsets of Lt , Qi ⊆ Lt such that the following hold: Sn • i=1 Qi = Lt and Qi ∩ Qj = ∅ for all i 6= j; • For each p ∈ AP, Q ∈ Q and la ∈ La , it holds that (la , lt0 ) |= p iff (la , lt00 ) |= p for every lt0 , lt00 ∈ Q. Intuitively, these conditions mean that Q partitions the set of locations of the target, and the concrete locations in each of the sets in Q agree on the value of the propositions in AP. If Q0 = {Q0i }m i=1 is a family of subsets of Lt such that Sm 0 Q = L and for each Q0i ∈ Q0 there exists Qj ∈ Q t i=1 i 0 such that Qi ⊆ Qj , then Q0 is also an abstraction partition, and we say that Q0 refines Q, denoted Q0  Q. For Q = {Qi }ni=1 , we define a function αQ : Lt → Q by α(lt ) = Q for the unique Q ∈ Q with lt ∈ Q. We denote also with αQ : P(Lt ) → P(Q) the abstraction function defined by αQ (L) = {αQ (l) | l ∈ L}. We define a concretization function γ : P(Q) ∪ Lt →SP(Lt ) such that γ(A) = {lt } if A = lt ∈ Lt , and γ(A) = Q∈A Q if A ∈ P(Q). Given a surveillance game structure G = (S, sinit , T, vis) and an abstraction partition Q = {Qi }ni=1 of the set Lt , we define the abstraction of G w.r.t. Q to be the game structure Gabstract = αQ (G) = (Sabstract , sinit abstract , Tabstract ), where • Sabstract = (La ×P(Q))∪(La ×Lt ) is the set of abstract states, consisting of states approximating the belief sets in the game structure Gbelief , as well as the states S; (4, 18) (3, {Q4 , Q5 }) (3, 19) (9, {Q4 , Q5 }) (9, 19) Fig. 3: Transitions from the initial state in the abstract game from Example 5 where αQ (17) = Q4 and αQ (23) = Q5 . init init sinit abstract = (la , lt ) is the initial abstract state; • Tabstract ⊆ Sabstract × Sabstract is the transition relation such that ((la , At ), (la0 , A0t )) ∈ Tabstract if and only if one of the following two conditions is satisfied: (1) A0t = lt0 , lt0 ∈ succ t (γ(At )) and vis(la , lt0 ) = true, and la0 ∈ succ a (la , lt , lt0 ) for some lt ∈ γ(At ). (2) A0t = αQ ({lt0 ∈ succ t (γ(At ))|vis(la , lt0 ) = false}), and la0 ∈ succ a (la , lt , lt0 ) for some lt ∈ γ(At ) and some lt0 ∈ succ t (γ(At )) with vis(la , lt0 ) = false. As for the belief-set game structure, the first condition captures the successor locations of the target, which can be observed from the agent’s current location la . Condition (2) corresponds to the abstract belief set whose concretization consists of all possible successors of all positions in γ(At ), which are not visible from la . Since the belief abstraction overapproximates the agent’s belief, that is, γ(αQ (B)) ⊇ B, the next-state abstract belief γ(A0t ) may include positions in Lt that are not successors of positions in γ(At ). Example 5: Consider again the surveillance game from Example 1, and the abstraction partition Q = {Q1 , . . . , Q5 }, where the set Qi corresponds to the i-th row of the grid. For location 17 of the target we have αQ (17) = Q4 , and for 23 we have αQ (23) = Q5 . Thus, the belief set B = {17, 23} is covered by the abstract belief set αQ (B) = {Q4 , Q5 }. Figure 3 shows the successors of the initial state (4, 18) of the abstract belief-set game structure. The concretization of the abstract belief set {Q4 , Q5 } is the set {15, 16, 17, 18, 19, 20, 21, 22, 23, 24} of target locations.  An abstract state (la , At ) satisfies a surveillance predicate pk , denoted (la , At ) |= pk , iff |{lt ∈ γ(At ) | vis(la , lt ) = false}| ≤ k. Simply, the number of states in the concretized belief set has to be less than or equal to k. Similarly, for a predicate p ∈ AP, we define (la , At ) |= p iff for every lt ∈ γ(At ) it holds that (la , lt ) |= p. With these definitions, we can interpret surveillance objectives over runs of Gabstract . Strategies (and wining strategies) for the agent and the target in an abstract belief-set game (αQ (G), ϕ) are defined analogously to strategies (and winning strategies) in Gbelief . In the construction of the abstract game structure, we overapproximate the belief-set of the agent at each step. Since we consider surveillance predicates that impose upper bounds on the size of the belief, such an abstraction gives more power to the target (and, dually less power to the agent). This construction guarantees that the abstraction is sound, meaning that an abstract strategy for the agent that achieves a surveillance objective corresponds to a winning strategy in the concrete game. This is stated in the following theorem. Theorem 1: Let G be a surveillance game structure, Q = {Qi }ni=1 be an abstraction partition, and Gabstract = αQ (G). For every surveillance objective ϕ, if there exists a wining strategy for the agent in the abstract belief-set game • v0 : (4, 18) (4, 18) (3, {Q4 , Q5 })(9, {Q4 , Q5 }) (a) Abstract counterexample tree (4, 18) (3, {17, 23}) (9, {17, 23}) (b) Concrete counterexample tree Fig. 4: Abstract and corresponding concrete counterexample trees for the surveillance game in Example 6. (αQ (G), ϕ), then there exists a winning strategy for the agent in the concrete surveillance game (G, ϕ). IV. BELIEF REFINEMENT FOR SAFETY A. Counterexample Tree A winning strategy for the target in a game with safety surveillance objective can be represented as a tree. An abstract counterexample tree Cabstract for (Gabstract , pk ) is a finite tree, whose nodes are labelled with states in Sabstract such that the following conditions are satisfied: • • • The root node is labelled with the initial state sinit abstract . A node is labelled with an abstract state which violates pk (that is, sabstract where sabstract 6|= pk ) iff it is a leaf. The tree branches according to all possible transition choices of the agent. Formally, if an internal node v is labelled with (la , At ), then there is unique A0t such that: (1) ((la , At ), (la0 , A0t )) ∈ Tabstract for some la0 ∈ La , and (2) for every la0 ∈ La such that ((la , At ), (la0 , A0t )) ∈ Tabstract , there is a child v 0 of v labelled with (la0 , A0t ). A concrete counterexample tree Cbelief for (Gbelief , pk ) is a finite tree defined analogously to an abstract counterexample tree with nodes labelled with states in Sbelief . Due to the overapproximation of the belief sets, not every counterexample in the abstract game corresponds to a winning strategy for the target in the original game. An abstract counterexample Cabstract in (Gabstract , pk ) is concretizable if there exists a concrete counterexample tree Cbelief in (Gbelief , pk ), that differs from Cabstract only in the node labels, and each node labelled with (la , At ) in Cabstract has label (la , Bt ) in Cbelief for which Bt ⊆ γ(At ). Example 6: Figure 4a shows an abstract counterexample tree Cabstract for the game (αQ (G), p1 ), where G is the surveillance game structure from Example 1 and Q is the abstraction partition from Example 5. The counterexample corresponds to the choice of the target to move to one of the locations 17 or 23, which, for every possible move of the agent, results in an abstract state with abstract belief B = {Q4 , Q5 } violating p1 . A concrete counterexample tree Cbelief concretizing Cabstract is shown in Figure 4b.  B. Counterexample-Guided Refinement We now describe a procedure that determines whether an abstract counterexample for a safety surveillance objective is concretizable. This procedure essentially constructs the precise belief sets corresponding to the abstract moves of the target that constitute the abstract counterexample. v1 : (3, {Q2 }) v2 : (9, {Q2 }) v3 : (2, A) v4 : (4, A) v5 : (8, A) v6 : (4, A) v7 : (8, A) v8 : (14, A) Fig. 5: Abstract counterexample in Example 7. The leaf nodes are labelled with the abstract belief set A = {Q1 , Q2 }. 1) Forward belief-set propagation: Given an abstract counterexample tree Cabstract , we annotate its nodes with states in Sbelief in a top-down manner as follows. The root node is labelled with sinit belief . If v is a node annotated with the belief set (la , Bt ) ∈ Sbelief , and v 0 is a child of v in Cabstract labelled with an abstract state (la0 , A0t ), then we annotate v 0 with the belief set (la0 , Bt0 ), where Bt0 = succ t (la , Bt ) ∩ γ(A0t ). The counterexample analysis procedure based on this annotation is given in Algorithm 1. If each of the leaf nodes of the tree is annotated with a belief set (la , Bt ) for which (la , Bt ) 6|= pk , then the new annotation gives us a concrete counterexample tree Cbelief , which by construction concertizes Cabstract . Conversely, if there exists a leaf node annotated with (la , Bt ) such that (la , Bt ) |= pk , then we can conclude that the abstract counterexample tree Cabstract is not concretizable and use the path from the root of the tree to this leaf node to refine the partition Q. Theorem 2: If Algorithm 1 returns a path πabstract in Cabstract , then Cabstract is not concretizable, and πabstract is a non-concretizable path, otherwise Cabstract is concretizable. Example 7: Let G be the surveillance game structure from Example 1, and consider the surveillance game (G, p5 ). Let Q = {Q1 , Q2 } consist of the set Q1 , corresponding to the first two columns of the grid in Figure 1a and the set Q2 containing the locations from the other three columns of the grid. Figure 5 shows a counterexample tree Cabstract in the abstract game (αQ (G), p5 ). The analysis in Algorithm 1 annotates node v1 with the concrete belief set {17, 23}, and the leaf node v3 with the set B = {16, 18, 22, 24}. Thus, this counterexample tree Cabstract is determined to be unconcretizable and the partition Q should be refined.  When the analysis procedure determines that an abstract counterexample tree is unconcretizable, it returns a path in the tree that corresponds to a sequence of moves ensuring that the size of the belief-set does not actually exceed the threshold, given that the target behaves in a way consistent with the abstract counterexample. Based on this path, we can Input: surveillance game (G, pk ), abstract counterexample tree Cabstract Output: a path π in Cabstract or CONCRETIZABLE while there is a node v in Cabstract whose children are not annotated with states in Sbelief do let (la , Bt ) be the state with which v is annotated; foreach child v 0 of v labelled with (la0 , A0t ) do annotate v 0 with (la0 , succ t (la , Bt ) ∩ γ(A0t )); if there is a path π in Cabstract from the root to a leaf annotated with a sate sbelief where sbelief |= pk then return π; else return CONCRETIZABLE; Algorithm 1: Analysis of abstract counterexample trees for games with safety surveillance objectives. then refine the abstraction in order to precisely capture this information and thus eliminate this abstract counterexample. 2) Backward partition splitting: Let πabstract = v0 , . . . , vn be a path in Cabstract where v0 is the root node and vn is a leaf. For each node vi , let (lai , Ait ) be the abstract state labelling vi in Cabstract , and let (lai , Bti ) be the belief set with which the node was annotated by the counterexample analysis procedure. We consider the case when (lan , Btn ) |= pk , that is, |{lt ∈ Btn | vis(la , lt ) = false}| ≤ k. Note that since Cabstract is a counterexample we have (lan , Ant ) 6|= pk , and since k > 0, this means At ∈ P(Q). We now describe a procedure to compute a partition Q0 that refines the current partition Q based on the path πabstract . Intuitively, we split the sets that appear in Ant in order to ensure that in the refined abstract game the corresponding abstract state satisfies the surveillance predicate pk . We may have to also split sets appearing in abstract states on the path to vn , as we have to ensure that earlier imprecisions on this path do not propagate, thus including more than the desired newly split sets, and leading to the same violation of pk . Formally, if Ant = (lan , {Bn,1 , . . . , Bn,mn }), then we split some of the sets Bn,1 , . . . , Bn,mn to obtain from Ant a set 0 0 , . . . , Bn,m A0n = {Bn,1 0 } such that n n |{lt ∈ γ(C ) | vis(lan , lt ) = false}| ≤ k, where 0 0 ∩ Btn 6= ∅}. C n = {Bn,i ∈ A0n | Bn,i This property intuitively means that if we consider the sets in A0n that have non-empty intersection with Btn , an abstract state composed of those sets will satisfy pk . Since (lan , Btn ) satisfies pk , we can find a partition Qn  Q that guarantees this property, as shown in Algorithm 2. What remains, in order to eliminate this counterexample, is to ensure that only these sets are reachable via the considered path, by propagating this split backwards, obtaining a sequence of partitions Q  Qn  . . .  Q0 refining Q. Given Qj+1 , we compute Qj as follows. For each j, we define a set C j ⊆ P(Lt ) (for j = n, the set C n was defined above). Suppose we have defined C j+1 for some j ≥ 0, and Ajt = (laj , {Bj,1 , . . . , Bj,mj }). We split some of the sets Bj,1 , . . . , Bj,mj to obtain from Ajt a set 0 0 j A0j = {Bj,1 , . . . , Bj,m ⊆ A0j with 0 } where there exists C j γ(C j ) = {lt ∈ γ(Ajt ) | succ t (laj , {lt })∩γ(Aj+1 ) ⊆ γ(C j+1 )}. t This means that using the new partition we can express precisely the set of states that do not lead to sets in A0j+1 that we are trying to avoid. The fact that an appropriate partition Q can be computed, follows from the choice of the leaf node vn . The procedure for computing the partition Q0 = Q0 that refines Q based on πabstract is formalized in Algorithm 2. Example 8: We continue with the unconcretizable abstract counterexample tree from Example 7. We illustrate the refinement procedure for the path v0 , v1 , v3 . For node v3 , we split Q1 and Q2 using the set B = {16, 18, 22, 24}, obtaining the sets Q01 = Q1 ∩ {16, 18, 22, 24} = {16}, Q02 = Q1 \ {16}, Q03 = Q2 ∩ {16, 18, 22} = {18, 22, 24} and Q04 = Q2 \ {18, 22, 24}. We thus obtain a new partition Qv3  Q. In order to propagate the refinement backwards (to ensure eliminating Cabstract ) we compute the set of locations in Q2 from which the target can move to a location in Q02 or Q04 that is not visible from location 3. In this case, these are just the locations 18, 22 and 24, which have already been separated from Q2 , so here backward propagation does not require further splitting.  Let Q and Q0 be two counterexample partitions such that Q0  Q. Let Cabstract be an abstract counterexample tree in (αQ (G), pk ). We define γQ0 (Cabstract ) to be the set of abstract counterexample trees in (αQ0 (G), pk ) such that 0 0 Cabstract ∈ γQ0 (Cabstract ) iff Cabstract differs from Cabstract only in the node labels and for every node in Cabstract labelled with 0 (la , At ), the corresponding node in Cabstract is labelled with 0 an abstract state (la , At ) such that γ(A0t ) ⊆ γ(At ). The theorem below states the progress property (eliminating the considered counterexample) of Algorithm 2. Theorem 3: If Q0 is the partition returned by Algorithm 2 for an unconcretizable abstract counterexample Cabstract in (αQ (G), pk ), then γQ0 (Cabstract ) = ∅, and also γQ00 (Cabstract ) = ∅ for every partition Q00 where Q00  Q0 . Example 9: In the surveillance game (G, p5 ), where G is the surveillance game structure from Example 1, the agent has a winning strategy. After 6 iterations of the refinement loop we arrive at an abstract game (αQ∗ (G), p5 ), where the partition Q∗ consists of 11 automatically computed sets (as opposed to the 22 locations reachable by the target in G), which in terms of the belief-set construction means 211 versus 222 possible belief sets in the respective games. In the game (G, p2 ), on the other hand, the agent does not have a winning strategy, and our algorithm establishes this after one refinement, after which, using a partition of size 4, it finds a concretizable abstract counterexample.  V. BELIEF REFINEMENT FOR LIVENESS A. Counterexample Graph The counterexamples for general surveillance properties are directed graphs, which may contain cycles. In particular, pk each for a liveness surveillance property of the form Input: surveillance game (G, pk ), abstraction partition Q, unconcretizable path π = v0 , . . . , vn in Cabstract Output: an abstraction partition Q0 such that Q0  Q let (laj , Ajt ) be the label of vj , and (laj , Btj ) its annotation; n A :={Q ∩ Btn | Q ∈ An t , Q ∩ Bt 6= ∅}∪ n n n {Q \ Bt | Q ∈ At , Q \ Bt 6= ∅}; n Q0 := (Q \ An t ) ∪ A; C := {Q ∈ A | Q ∩ Bt 6= ∅} for j = n − 1, . . . , 0 do if Ajt ∈ Lt then break; B := {lt ∈ γ(Ajt ) | succ t (la , {lt }) ⊆ γ(C)}; A :={Q ∩ B | Q ∈ Ajt , Q ∩ B 6= ∅}∪ {Q \ B | Q ∈ Ajt , Q \ B 6= ∅}; Q0 := (Q0 \ Ajt ) ∪ A; C := {Q ∈ A | Q ∩ B 6= ∅} return Q0 Algorithm 2: Abstraction partition refinement given an unconcretizable path in an abstract counterexample tree. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Fig. 6: Agent locations on an (infinite) path in the abstract counterexample graph from Example 10. In the graph, the first node is labelled with (4, 18), the second with (9, {Q2 }), and all other nodes with some (la , {Q1 , Q2 }). infinite path in the graph has a position such that, from this position on, each state on the path violates pk . An abstract counterexample graph in the game (Gabstract , pk ) is a finite graph Cabstract defined analogously to the abstract counterexample tree. The difference being that there are no leaves, and that for each cycle ρ = v1 , v2 , . . . , vn with v1 = vn in Cabstract that is reachable from v0 , every node vi in ρ is labelled with state siabstract where siabstract 6|= pk . Example 10: We saw in Example 9 that in the safety surveillance game (G, p2 ) the agent does not have a winning strategy. We now consider a relaxed requirement, namely, that the uncertainty drops to at most 2 infinitely ofp2 ). ten. We consider the liveness surveillance game (G, Let Q = {Q1 , Q2 } be the partition from Example 7. Figure 6 shows an infinite path (in lasso form) in the abstract game (αQ (G), p2 ). The figure depicts only the corresponding trajectory (sequence of positions) of the agent. The initial abstract state is (4, 18), the second node on the path is labeled with the abstract state (9, {Q2 }), and all other nodes on the path are labeled with abstract states of the form (la , {Q1 , Q2 }). As each abstract state in the cycle violates p2 , the path violates p2 . The same holds for all infinite paths in the existing abstract counterexample graph.  A concrete counterexample graph Cbelief for the belief game (Gbelief , pk ) is defined analogously. An abstract counterexample graph Cabstract for the game (Gabstract , pk ) is concretizable if there exists a counterexample Cbelief in (Gbelief , pk ), such that for each 0 1 infinite path πabstract = vabstract , vabstract , . . . starting from the initial node of Cabstract there exists an infinite path 0 1 πbelief = vbelief , vbelief , . . . in Cbelief staring from its initial i node such that if vabstract is labelled with (la , At ) in Cabstract , i then the corresponding node vbelief in Cbelief is labelled with (la , Bt ) for some Bt ∈ P(Lt ) for which Bt ⊆ γ(At ). B. Counterexample-Guided Refinement 1) Forward belief-set propagation: To check if an abstract counterexample graph Cabstract is concretizable, we construct a finite graph D whose nodes are labelled with elements of Sbelief and with nodes of Cabstract . By construction we will ensure that if a node d in D is labelled with h(la , Bt ), vi, where (la , Bt ) is a belief state, and v is a node in Cabstract , then v is labelled with (la , At ) in Cabstract , and Bt ⊆ γ(At ). Initially D contains a single node d0 labelled with hsinit belief , v0 i, where v0 is initial node of Cabstract . Consider a node d in D labelled with h(la , Bt ), vi. For every child v 0 of v in Cabstract , labelled with an abstract state (la0 , A0t ) we proceed as follows. We let Bt 0 = succ t (la , Bt ) ∩ γ(A0t ). If there exists a node d0 in D labelled with h(la0 , Bt0 ), vi, then we add an edge from d to d0 in D. Otherwise, we create such a node and add the edge. We continue until no more nodes and edges can be added to D. The procedure is guaranteed to terminate, since both the graph Cbelief , and Sbelief are finite, and we add a node labelled hsbelief , vi to D at most once. If the graph D contains a reachable cycle (it suffices to consider simple cycles, i.e., without repeating intermediate nodes) ρ = d0 , . . . , dn with d0 = dn such that some di is labelled with (la , Bt ) where (la , Bt ) |= pk , then we conclude that the abstract counterexample Cabstract is not concretizable. If no such cycle exists, then D is a concrete counterexample pk ). graph for the belief game (Gbelief , Example 11: The abstract counterexample graph in the game (αQ (G), p2 ) discussed in Example 10 is not conretizable, since for the path in the abstract graph depicted in Figure 6 there exists a corresponding path in the graph D with a node in the cycle labelled with a set in Gbelief that satisfies p2 . More precisely, the cycle in the graph D contains a node labelled with (19, {10}). Intuitively, as the agent moves from the upper to the lower part of the grid along this path, upon not observing the target, it can infer from the sequence of observations that the only possible location of the target is 10. Thus, this paths is winning for the agent.  Theorem 4: If Algorithm 3 returns a path π in the graph D constructed for Cabstract , then Cabstract is not concretizable, and the infinite run in Gbelief corresponding to π satisfies pk , otherwise Cabstract is concretizable. 2) Backward partition splitting: Consider a path in the graph D of the form π = d0 , . . . , dn , d00 , . . . , d0m where dn = d0m , and where for some 0 ≤ i ≤ m for the label (lai , Bti ) it holds that (lai , Bti ) |= pk . Let πabstract = 0 v0 , . . . , vn , v00 , . . . , vm be the sequence of nodes in Cabstract corresponding to the labels in π. By construction of D, 0 . We apply the πabstract is a path in Cabstract and vn = vm refinement procedure from the previous section to the whole Input: surveillance game (G, pk ), abstract counterexample graph Cabstract with initial node v0 Output: a path π in a graph D or CONCRETIZABLE graph D = (D, E) with nodes D := {d0 } and edges E := ∅; annotate d0 with hsinit belief , v0 i; do D0 := D; foreach node d in D labelled with h(la , Bt ), vi do foreach child v 0 of v in Cabstract labelled (la0 , A0t ) do Bt0 := succ t (la , Bt ) ∩ γ(A0t ); if there is a node d0 ∈ D labelled with h(la0 , Bt0 ), v 0 i then add an edge (d, d0 ) to E else add a node d0 labelled h(la0 , Bt0 ), v 0 i to D; add an edge (d, d0 ) to E while D 6= D0 ; if there is a lasso path π in D starting from d0 such that some node in the cycle is annotated with hsbelief , vi and sbelief |= pk then return π; else return CONCRETIZABLE; Algorithm 3: Analysis of abstract counterexample graphs for games with liveness surveillance objectives. path πabstract , as well as to the path-prefix v0 , . . . , vn . Let Q and Q0 be two counterexample partitions such that 0 Q  Q. Let Cabstract be an abstract counterexample graph in (αQ (G), pk ). We define γQ0 (Cabstract ) to be the set pk ) such of abstract counterexample graphs in (αQ0 (G), 0 that for every infinite path π in Cabstract there exists an infinite path π in Cabstract such that for every node in π 0 labelled with (la , A0t ) the corresponding node in Cabstract is labelled with an abstract state (la , At ) such that γ(A0t ) ⊆ γ(At ). Theorem 5: If Q0 is the partition obtained by refining Q with respect to an uncocretizable abstract counterexample pk ), then γQ0 (Cabstract ) = ∅, and Cabstract in (αQ (G), also γQ00 (Cabstract ) = ∅ for every partition Q00 with Q00  Q0 . Example 12: We refine the abstraction partition Q from Example 6 using the path identified there, in order to eliminate the abstract counterexample. For this, following the refinement algorithm, we first split the set Q1 into sets Q01 = {10} and Q02 = Q1 \{10}, and let Q03 = Q2 . However, since from some locations in Q02 and in Q03 the target can reach locations in Q02 and Q03 that are not visible from the agent’s position 19, in order to eliminate the counterexample, we need to propagate the refinement backwards along the path and split Q02 and Q03 further. With that, we obtain an abstraction partition with 10 sets, which is guaranteed to eliminate this abstract counterexample. In fact, in this example this abstraction turns out to be sufficiently precise to obtain a winning strategy for the agent.  C. General surveillance and task specifications We have described refinement procedures for safety and liveness surveillance objectives. If we are given a conjunction of such objectives, we first apply the refinement procedure for safety, and if no path for which we can refine is found, we then apply the refinenment procedure for liveness. In the general case, we check if the counterexample contains a state for which the concrete belief is a strict subset of the abstract one. If this is not the case, then the counterexample is concretizable, otherwise we refine the abstraction to make this belief precise. In the special case when we have a conjunction of a surveillance and task specifications, we first refine with respect to the surveillance objective as described above, and if this is not possible, with respect to such a node. Since the set of states in the game is finite, the iterative refinement will terminate, either with a concretizable counterexample, or with a surveillance strategy. VI. EXPERIMENTAL EVALUATION We report on the application of our method for surveillance synthesis in two case studies. We have implemented the simulation in Python, using the slugs reactive synthesis tool [10]. The experiments were performed on an Intel i55300U 2.30 GHz CPU with 8 GB of RAM. A. Liveness Surveillance Specification + Task Specification Figure 7a shows a gridworld divided into regions. The surveillance objective requires the agent to infinitely often know precisely the location of the target (either see it, or have (a) Gridworld with a user provided (b) Gridworld showing visibility of the abstraction partition with 7 sets, agent. All locations shown in black are marked by black lines.. invisible to the agent. Fig. 7: 10x15 gridworld with a surveillance liveness specification. The agent is blue, and the target to be surveilled is orange. Red states are obstacles. (a) t1 (b) t3 (c) t4 (d) t5 (e) t6 (f) t7 Fig. 8: Evolution of the agent’s belief about the target’s location as it moves to the goal and loses sight of the target. Grey cells represent the locations the agent believes the target could be in. We show the belief at different timesteps t1 , . . . , t7 (note that t2 is excluded for space concerns) a belief consisting of one cell). Additionally, it has to perform the task of patrolling (visiting infinitely often) the green ’goal’ cell. Formally, the specification is p1 ∧ goal . The agent can move up to 3 grid cells away at each step. The sensor mode, that is, the visibility function, used here is ’line-of-sight’ with a range of 5 cells. The agent cannot see through obstacles (shown in red) and cannot see farther than 5 cells away. Using the abstraction partition of size 7 shown in Figure 7a, the overall number of states in the two-player game is 15×10+27 = 278 states. In contrast, solving the full abstract game will have in the order of 2150 states, which is a statespace size that state-of-the-art synthesis tools cannot handle. Figure 8 shows how the belief of the agent (shown in grey) can grow quickly when it cannot see the target. This growth occurs due to the coarseness of the abstraction, which overapproximates the target’s true position. In 7 steps, the agent believes the target can be anywhere in the grid that is not in its vision. It has to then find the target in order to satisfy the surveillance requirement. Figure 9 illustrates the searching behaviour of the agent when it is trying to lower the belief below the threshold in order to satisfy the liveness specification. The behaviour of the agent shown here will contrast with the behaviour under safety surveillance which will we look at next. (a) t5 (b) t7 (c) t9 Fig. 9: The agent has to search for the target in order to lower its belief below the surveillance liveness specification. (a) t1 (d) t5 (b) t3 (e) t6 (c) t4 (f) t7 Fig. 10: Evolution of the agent’s belief about the target’s location in a game with an abstraction partition of size 12. In this example, an abstraction partition of size 7 was enough to guarantee the satisfaction surveillance specification. For the purpose of comparison, we also solve the game with an abstraction partition of size 12 to illustrate the change in belief growth. Figure 10 shows the belief states growing much more slowly as the abstract belief states are smaller, and thus they more closely approximate the true belief of the agent. The additional abstraction partitions result in a much larger game as the state space grows exponentially in the size of the abstraction partition. Table I compares the sizes of the corresponding abstract games, and the time it takes to synthesize a surveillance controller in each case. Size of abstraction partition 7 12 Size of abstract game 278 4346 Synthesis time 237s 810s TABLE I: Comparison of synthesis times for the two cases A video simulation can be found at http://goo.gl/ YkFuxr. B. Safety surveillance specification + task specification Figure 11 depicts an environment created in Gazebo where the red blocks model buildings. The drone is given full line of sight vision - it can detect the target if there is no obstacle in the way. In this setting, we enforce the safety surveillance objective p30 (the belief size should never exceed 30) in addition to infinitely often reaching the green cell. The formal specification is p30 ∧ goal . Additionally, the target itself is trying to reach the goal cell infinitely often as well, which is known to the agent. We used an abstraction generated by a partition of size 6, which was sufficiently precise to compute a surveillance Fig. 11: A Gazebo environment where the red blocks are obstacles that the drones cannot see past. The green drone is the agent and the orange drone is the target. strategy in 210 s. Again, note that the precise belief-set game would have in the order of 2200 states. We simulated the environment and the synthesized surveillance strategy for the agent in Gazebo and ROS. A video of the simulation can be found at http://goo.gl/LyC1gQ. This simulation presents a qualitative difference in behaviour compared to the previous example. There, in the case of liveness surveillance, the agent had more leeway to completely lose the target in order to reach its goal location, even though the requirement of reducing the size of the belief to 1 is quite strict. Here, on the other hand, the safety surveillance objective, even with a large threshold of 30, forces the agent to follow the target more closely, in order to prevent its belief from getting too large. The synthesis algorithm thus provides the ability to obtain qualitatively different behaviour as necessary for specific applications by combining different objectives. C. Discussion The difference in the behaviour in the case studies highlights the different use cases of the surveillance objectives. Depending on the domain, the user can specify a combination of safety and liveness specification to tune the behaviour of the agent. In a critical surveillance situation (typical in defense or security situations), the safety specification will guarantee to the user that the belief will never grow too large. However, in less critical situations (such as luggage carrying robots in airports), the robot has more flexibility in allowing the belief to grow as long as it can guarantee its reduction in the future. VII. CONCLUSIONS We have presented a novel approach to solving a surveillance problem with information guarantees. We provided a framework that enables the formalization of the surveillance synthesis problem as a two-player, partial-information game. We then presented a method to reason over the belief that the agent has over the target’s location and specify formal surveillance requirements. The user can tailor the behaviour to their specific application by using a combination of safety and liveness surveillance objectives. The benefit of the proposed framework is that it allows it leverages techniques successfully used in verification and reactive synthesis to develop efficient methods for solving the surveillance problem. There are several promising avenues of future work using and extending this framework. Some of which currently being explored are the following; • Synthesizing distributed strategies for multi-agent surveillance in a decentralized manner. These compositional synthesis methods avoid the blow up of the state space that occurs in centralized synthesis procedures as the number of surveillance agents grow. • Incorporating static sensors or alarm triggers for the mobile agent(s) to coordinate with. • Allowing for sensor models to include uncertainty and detection errors while still providing surveillance guarantees. R EFERENCES [1] T. Bandyopadhyay, M. H. Ang, and D. Hsu, Motion Planning for 3D Target Tracking among Obstacles. Berlin, Heidelberg: Springer Berlin Heidelberg, 2011, pp. 267–279. [2] H. H. Gonzalez-Banos, C.-Y. Lee, and J. C. Latombe, “Real-time combinatorial tracking of a target moving unpredictably among obstacles,” in Proc. ICRA 2002, vol. 2, May 2002, pp. 1683–1690 vol.2. [3] T. H. Chung, G. A. Hollinger, and V. Isler, “Search and pursuit-evasion in mobile robotics,” Autonomous Robots, vol. 31, p. 299, Jul 2011. [4] N. Basilico, N. Gatti, and F. Amigoni, “Patrolling security games: Definition and algorithms for solving large instances with single patroller and single intruder,” Artif. Intell., vol. 184-185, June 2012. [5] S. Kreutzer, Graph Searching Games. Cambridge University Press, 2011, pp. 213–261. [6] L. Doyen and J. Raskin, Games with Imperfect Information: Theory and Algorithms. Cambridge University Press, 2011, pp. 185–212. [7] K. Chatterjee, L. Doyen, and T. A. Henzinger, “A survey of partialobservation stochastic parity games,” Formal Methods in System Design, vol. 43, no. 2, pp. 268–284, Oct 2013. [8] J. H. Reif, “The complexity of two-player games of incomplete information,” J. Comput. Syst. Sci., vol. 29, no. 2, pp. 274–301, 1984. [9] D. Berwanger and L. Doyen, “On the power of imperfect information,” in Proc. FSTTCS 2008, ser. LIPIcs, vol. 2, 2008, pp. 73–82. [10] R. Ehlers and V. Raman, “Slugs: Extensible GR(1) synthesis,” in Proc. CAV 2016, ser. LNCS, vol. 9780. Springer, 2016, pp. 333–339. [11] E. M. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith, “Counterexample-guided abstraction refinement,” in Proc. CAV 2000, ser. LNCS, vol. 1855. Springer, 2000, pp. 154–169. [12] J.-C. Chin, Y. Dong, W.-K. Hon, C. Y.-T. Ma, and D. K. Y. Yau, “Detection of intelligent mobile target in a mobile sensor network,” IEEE/ACM Trans. Netw., vol. 18, no. 1, pp. 41–52, Feb. 2010. [13] A. Antoniades, H. J. Kim, and S. Sastry, “Pursuit-evasion strategies for teams of multiple agents with incomplete information,” in Proc. CDC 2003, vol. 1, Dec 2003, pp. 756–761 Vol.1. [14] R. Vidal, O. Shakernia, H. J. Kim, D. H. Shim, and S. Sastry, “Probabilistic pursuit-evasion games: theory, implementation, and experimental evaluation,” IEEE Transactions on Robotics and Automation, vol. 18, no. 5, pp. 662–669, Oct 2002. [15] H. J. Kim, R. Vidal, D. H. Shim, O. Shakernia, and S. Sastry, “A hierarchical approach to probabilistic pursuit-evasion games with unmanned ground and aerial vehicles,” in Proc. CDC 2001, vol. 1, 2001, pp. 634–639 vol.1. [16] A. Pnueli and R. Rosner, “On the synthesis of a reactive module,” in Proc. POPL’89. ACM, 1989, pp. 179–190. [17] N. Piterman, A. Pnueli, and Y. Sa’ar, Synthesis of Reactive(1) Designs. Berlin, Heidelberg: Springer Berlin Heidelberg, 2006, pp. 364–380. [18] T. Wongpiromsarn, U. Topcu, and R. M. Murray, “Receding horizon temporal logic planning,” IEEE Transactions on Automatic Control, vol. 57, no. 11, pp. 2817–2830, Nov 2012. [19] H. Kress-Gazit, G. E. Fainekos, and G. J. Pappas, “From structured english to robot motion,” in Proc. IROS 2007, Oct 2007, pp. 2717– 2722. [20] R. van der Meyden and M. Y. Vardi, “Synthesis from knowledge-based specifications (extended abstract),” in Proc. CONCUR’98, ser. LNCS, vol. 1466. Springer, 1998, pp. 34–49. [21] T. A. Henzinger, R. Jhala, and R. Majumdar, “Counterexample-guided control,” in Proc. ICALP 2003, 2003, pp. 886–902. [22] R. Dimitrova and B. Finkbeiner, “Abstraction refinement for games with incomplete information,” in Proc. FSTTCS 2008, ser. LIPIcs, vol. 2, 2008, pp. 175–186. [23] J. Fu, R. Dimitrova, and U. Topcu, “Abstractions and sensor design in partial-information, reactive controller synthesis,” in Proc. ACC 2014. IEEE, 2014, pp. 2297–2304. [24] C. Baier and J. Katoen, Principles of model checking. MIT Press, 2008.
3cs.SY
Trajectory Generation using Sharpness Continuous Dubins-like Paths with Applications in Control of Heavy Duty Vehicles arXiv:1801.08995v1 [cs.SY] 26 Jan 2018 Rui Oliveira1,2 , Pedro F. Lima1,2 , Marcello Cirillo2 , Jonas Mårtensson1 and Bo Wahlberg1 Abstract— We present a trajectory generation framework for control of wheeled vehicles under steering actuator constraints. The motivation is smooth autonomous driving of heavy vehicles. The key idea is to take into account rate, and additionally, torque limitations of the steering actuator directly. Previous methods only take into account curvature rate limitations, which deal indirectly with steering rate limitations. We propose the new concept of Sharpness Continuous curves, which uses cubic and sigmoid curvature trajectories together with circular arcs to steer the vehicle. The obtained trajectories are characterized by a smooth and continuously differentiable steering angle profile. These trajectories provide low-level controllers with reference signals which are easier to track, resulting in improved performance. The smoothness of the obtained steering profiles also results in increased passenger comfort. The method is characterized by a fast computation time, which can be further speeded up through the use of simple pre-computations. We detail possible path planning applications of the method, and conduct simulations that show its advantages and real time capabilities. I. INTRODUCTION A. Background and Motivation Path planning deals with the generation of paths or trajectories (paths with an associated time law) for a vehicle. The generated paths/trajectories are then used as a reference signal for the controllers implemented in the vehicle. Planning methods for autonomous vehicles have come a long way from the initial problem of finding collision free paths, being now focused on properties such as kinodynamic constraints, optimality, and uncertainty [1], [2]. Non-holonomic systems, such as car-like vehicles, must follow specific patterns of motion, that are defined by their kinematic constraints. These constraints introduce an additional difficulty, as they limit the maneuverability of the vehicle, resulting in limited types of paths that are admissible, i.e., can be feasibly followed. Steering methods are planners that are able to compute a path between vehicle states in an environment without obstacles. Even though the vast majority of autonomous vehicle applications involve the presence of obstacles, steering methods still prove to be useful, as they are often used as part of obstacle avoiding path planners [3]–[6]. The Dubins path [7] is a steering method able to connect two arbitrary vehicle poses through a minimal length path. *This work was partially supported by the Wallenberg Autonomous Systems and Software Program (WASP) 1 School of Electrical Engineering, ACCESS Linnaeus Centre, KTH Royal Institute of Technology, SE-100 44 Stockholm, Sweden [email protected], [email protected], [email protected], [email protected] 2 Scania, Autonomous Transport Solutions, [email protected] Södertälje, Sweden However it is limited to vehicles moving either forward or backward and assumes instantaneous changes in the angular velocity. This concept was later extended to a vehicle that is able to change directions along the path, i.e. switch between forward and backward motion, resulting in the Reeds-Shepp paths [8]. Both [7] and [8] assume instantaneous angular velocity changes, resulting in paths with a discontinuous curvature profile. To perfectly track these paths, a car-like vehicle would have to immediately change its steering angle, or alternatively, to steer while stopped, which is not feasible/desirable in practice. In order to achieve curvature continuous paths, [9] proposed an extension to Reeds-Sheeps paths. Making use of clothoidal paths, the authors developed a steering method that provides curvature continuous paths. Clothoids are an obvious choice, since they have long been used in road design, as they allow for smooth driving [10]. Additionally the curvature and curvature rate are bounded, making them more suitable to be followed by actual car-like vehicles. Curvature continuity is, however, not enough for path feasibility. The continuity must also be present in the sharpness, that is, the curvature rate. A discontinuity in the sharpness of the path implies an infinite acceleration in the steering wheel actuator, that renders the path impossible to track precisely. Sharpness continuity, and consequently path feasibility, are thus, of extreme importance when precise maneuvering is needed. In such case, we would like to provide the vehicle with paths that are easy to follow [11]. By generating references that are easier to follow, the low-level controller performance is expected to improve. Passenger comfort comes as an added benefit, due to the smoother curvature profiles imposed by a continuous sharpness. To the best of our knowledge, [12] is the only work addressing sharpness continuity. However, the method only takes into account the curvature and sharpness of the path, not tackling the actual steering actuator limitations. B. Main Contributions The contribution of this work comes from the generation of vehicle trajectories that: • Directly take into account steering actuator magnitude, rate, and torque limitations; • Ease the controller task and improve passenger comfort; • Can connect arbitrary poses with arbitrary curvatures; • Have fast computation times. We build upon the work of [9], replacing clothoidal paths with cubic and sigmoid curvature paths. Cubic curvature paths are easy and intuitive to compute. Even though they are only differentiable, instead of infinitely differentiable, as in [12], they still result in paths which do not require infeasible torques from a steering wheel actuator. Sigmoid curvature paths take inspiration from [12], and they are used due to their characteristic smooth profile. Additionally, we formulate the constraints so that we can limit the actual steering angle rate and steering angle acceleration of the vehicle, instead of the sharpness of the path, as done in previous approaches [9], [12]. The maximum steering angle rate and acceleration are more intuitive constraints than the maximum sharpness, and they can be directly obtained from the vehicle actuator limitations. The proposed method is also computationally inexpensive and can be used as part of an online planner in autonomous vehicle systems. C. Outline The structure of the paper is as follows. In Section II, we present the vehicle model used and the problem to be solved. Following that, Section III presents the proposed method to solve the stated problem. Sections IV and V present Cubic Curvature and Sigmoid curvature paths, which are used to construct sharpness continuous paths. Section VI contains experimental simulation results, showcasing the performance of the method. Some conclusions and directions of future work are presented in Section VII. II. P ROBLEM S TATEMENT A. Vehicle Model We start by defining the vehicle model as:       ẋ cos θ 0 ẏ   sin θ  0  =     θ̇   κ  v + 0 σ. 0 1 κ̇ (x, y) represents the location of the vehicle rear wheel axle center and θ its orientation. The curvature κ of a vehicle with wheelbase length l is related to its steering angle φ through tan φ . (1) l The steering angle of the vehicle is set by an actuator, which like any real system has physical limitations. The limitations we target in this work are: • Maximum steering angle amplitude φmax , • Maximum steering angle rate of change φ̇max , • Maximum steering actuation acceleration φ̈max . These limitations effectively affect the vehicles motion capabilities and should be dealt with when generating paths to be followed. κ= B. Path Feasibility Path feasibility depends on the capabilities of the vehicle that performs it and on the path itself. The limited steering angle amplitude φmax imposes a maximum allowed curvature on the path κmax . By generating paths which have a curvature profile |κ| ≤ κmax , as done by Dubins [7], it is possible to address this limitation. Limited steering angle rate of change φ̇max is tackled in [9] by limiting the sharpness of the generated paths. In this paper, we deal with the third limitation, related to the limited steering angle acceleration φ̈max . Having a limited φ̈max results in φ̇ being a continuous function, which in turn indicates that φ is a continuously differentiable, C1 function. The paths generated by [9] have corresponding φ̇ profiles with discontinuities, that require an infinite φ̈max . This is impossible to achieve by an actuator, and motivates the usage of paths with a C1 steering profile. The steering profile is related to the curvature profile through (1). The sharpness α is defined as the spatial derivative of the curvature ∂κ , α= ∂s where s is the distance along the path. By ensuring sharpness continuity in a path, we guarantee that the curvature, and the steering profile of such a path is C1 , and that a vehicle will be able to follow it with bounded steering acceleration φ̈max . In the following section, we detail how to generate paths that respect all three limitations previously stated. III. S HARPNESS C ONTINUOUS PATHS A. Principle Dubins paths use a combination of arc circle turns and/or line segments to connect two arbitrary poses. The arc circle turns have a turning radius of κmax guaranteeing that a maximum steering angle φmax is never exceeded. In [9], this idea is extended with so called Curvature Continuous (CC) turns, which replace arc circles by a combination of clothoid and arc circle segments so as to guarantee curvature continuity. We extend this idea further, replacing the clothoid segments by cubic and sigmoid curvature paths, and in that way, achieving sharpness continuity. This comes with the added benefit that such paths are feasible with a limited steering acceleration φ̈max . B. Sharpness Continuous Turns We propose a novel concept of a turn, called Sharpness Continuous (SC) turn. Unlike the previously proposed CC turns [9], an SC turn is able to achieve curvature rate continuity. The SC turn consists of three segments, an initial cubic or sigmoid curvature path Γa , a circular arc Γ◦ , and a final cubic or sigmoid curvature path Γb . Figure 1 shows an example of a SC turn. The initial segment Γa starts at a configuration qa and ends with maximum curvature, ±κmax . The second segment is a circular arc Γ◦ with radius κ−1 max and arbitrary arc length. The SC turn is completed with a path Γb , with starting curvature ±κmax and ending at a configuration qb . We assume, without loss of generality, that the vehicle, and subsequently the path, starts at a configuration qa = (xa , ya , θa , κa ) = (0, 0, 0, 0). From qa , it then follows the path Γa taking it to a configuration qi = (xi , yi , θi , κmax ). δ qb µ Ω2 Γb Ω1 qj r r1 cos µ1 q1 Ω q2 r2 sin µ2 r1 sin µ1 Γo r2 cos µ2 r2 µ1 µ2 r1 κ−1 max Ω1 Γa r1 cos µ1 qi µ1 r1 q1 µ2 q2 r2 cos µ2 r2 qa r1 sin µ1 Fig. 1: Sharpness continuous turn general case Ω2 r2 sin µ2 The path has as initial and final conditions κi = κa and κf = κmax . The values xi , yi , and θi are those that result from following the curvature profile of Γa with a starting vehicle state qa . Once the vehicle has a curvature κmax , it then follows a circular arc path Γ◦ with radius κ−1 max . The circular arc starts at the position (xi , yi ) and has its center at a distance κ−1 max perpendicular to the orientation oi from point (xi , yi ). The center is then given by −1 (xΩ , yΩ ) = (xi − κ−1 max sin θi , yi + κmax cos θi ). (2) The last path segment Γb departs from the circular arc and it brings the vehicle to a configuration qb = (xb , yb , θb , κb ). Configuration qb depends on the point of departure from the circular arc, qj . However, it always lies in a circle Ω, which has the same center as the circular arc, (xΩ , yΩ ). In order to find the radius of circle Ω, we first assume an auxiliary circular arc to be centered at (xΩz , yΩz ) = (0, κ−1 max ). We then assume a departure configuration from the circle at (0, 0, 0, κmax). Then, by following the path given by a curvature profile with initial and final curvatures κi = κmax and κf = κg , we will end at a configuration qz = (xz , yz , θz , κz ). qz is a configuration located at an auxiliary Ωz circle (the auxiliary equivalent of the Ω circle), which has the same center as the circular arc. Thus we can compute the radius of Ωz , which is equal to the radius of Ω, as q q 2 r = (xg − xΩz )2 + (yg − yΩz )2 = x2g + (yg − κ−1 max ) . (3) An additional angle µ is defined as being the difference between θb and the tangential angle to Ω at configuration qb . It is computed using the previous auxiliary circular arc as   π yb − κ−1 max + − θb (4) µ = arctan xb 2 Fig. 2: Computing the external (top) and internal (bottom) tangents It can then be observed that given a certain initial configuration qa , the possible positions of the ending configuration qb , resulting from a combination of a cubic or sigmoid curvature path, a circular arc, and another cubic or sigmoid curvature path lie on a circle Ω. The possible θb orientations of these configurations are given by the tangential angle at the circle plus µ. C. Connecting Sharpness Continuous Turns A SC path between start and goal configurations qs and qg can be found by connecting two SC turns. Such path consists of three elements: • a SC turn starting at the initial configuration qs and ending at a configuration with null curvature q1 , • a line segment starting at q1 and ending at q2 , with orientation equal to both q1 and q2 , • a SC turn starting at configuration q2 with null curvature, and ending at the final configuration qg . In order to connect two SC turns, we need to find the configurations q1 and q2 that belong to the starting and ending SC turn possible departure configurations, and that can be connected with a line segment. That is, q1 and q2 must have the same orientation θ, and both must lie on a line segment with an inclination angle θ. As seen before, the possible set of departure configurations of a SC turn are located in a circle, and its orientations differ from the circle tangent by µ. Thus, to connect two SC turns, we need a way to connect two circles Ωs and Ωf with arbitrary centers, radii, and µ values. We first assume two auxiliary circles Ω1 and Ω2 , as depicted in Figure 2 (top). Ω1 and Ω2 have the same radii and µ values as the original circles Ωs and Ωf . Ω1 is centered at (0, 0) and Ω2 is located so that q1 and q2 are collinear. We are interested in finding the center of Ω2 = (xΩ2 , yΩ2 ). From Figure 2 (top) it can be seen that yΩ2 = −r1 cos µ1 + r2 cos µ2 . (5) We assume that the distance r(Ω1 , Ω2 ) between the circle centers is the same as the distance of the original circles r(Ωs , Ωf ). We then have q 2 . (6) xΩ2 = r(Ωs , Ωf )2 − yΩ 2 We know that q1 = (r1 sin µ1 , −r1 cos µ1 , 0) and q2 = (xΩ2 − r2 sin µ2 , yΩ2 − r2 cos µ2 , 0). In order to find these configurations in the original circles Ωs and Ωf , we need to first apply a rotation ∆θ = arctan(yΩg − yΩs , xΩg − xΩs ) to q1 and q2 . We then translate these configurations by (∆x , ∆y ) = (xΩs , yΩs ). The resulting rotated and translated configurations correspond to the desired tangent configurations between the circles Ωs and Ωf . The above procedure finds the departure configurations between two counter clockwise (left steering) SC turns (shown in Figure 2 (top)). The same procedure, with minor alterations, can also be used to find the possible departure configurations between any combination of clockwise (right steering) and counter clockwise turns. Figure 2 (bottom) shows an example of counter clockwise and clockwise turns. This method is valid as long as the found tangent configurations q1 and q2 do not lie inside the circles Ω2 and Ω1 , respectively. D. Small Orientation Change Turns A SC turn can sometimes have a very small orientation change δ between its starting and departing poses. Let us define δθ (Γi ) and δθ (Γf ) as the orientation changes between the initial and final poses of paths Γi and Γf . For an orientation change |δ| < |δθ (Γi ) + δθ (Γf )|, the SC turn has to perform a very long circular arc segment, so that it can correctly connect the start pose to the departing pose. In order to avoid this large turn, the method presented in [9] uses a combination of a clothoid and a symmetric clothoid, that achieves this exact orientation change without having to travel along the arc circle. In [13], the same authors found analytical expressions for this elementary path, that can achieve such an orientation change, and end up at the necessary departure configuration. Unfortunately, in our case we were not able to derive analytical expressions for the case of cubic and sigmoid curvature profiles. To achieve a SC turn that can achieve a small orientation change δ without having to resort to a large circular arc segment, we make use of splines. In [14], seventh order polynomials are used to generate paths between two arbitrary configurations. Using the same method we connect the starting pose to the departing pose. We additionally enforce a sharpness of zero at the endpoints in order to guarantee sharpness continuity. E. Finding the Shortest SC Path In order to find the shortest SC path between two configurations qs and qg , we need to compute all the possible SC turns that can be spanned from these configurations. The SC turns are then connected, in order to generate possible SC paths. The process is detailed below. Each of the configurations qs and qg can span a total of four SC turns, depending if the vehicle is moving forwards or backwards, or if the vehicle is turning left or right. The case of a SC turn which assumes the vehicle moving forward and turning left is shown in Figure 1. The method explained in section III-B can be readily used to obtain SC turns moving forward, independent of the direction they are turning. The procedure to obtain a SC turn moving backwards is fairly similar, the only difference being that now the SC turn is constructed backwards from the desired configuration from which we wish to span the SC turn. In total, there are 16 possible paths between the two sets of 4 SC turns spanned from configurations qs and qg . Each path is found by computing the SC path, resulting from connecting two SC turns, as detailed in section III-C. Each SC path length is evaluated, and the shortest of all possible paths is then selected as the solution. IV. C UBIC C URVATURE PATHS A. Introduction Cubic curvature paths are defined as paths with a cubic curvature profile κ(s) = a3 s3 + a2 s2 + a1 s + a0 , where s is the length along the path. As an example, clothoids have instead a linear curvature profile κ(s) = a1 s + a0 , where a1 is the clothoid sharpness α, and a0 the initial curvature of the clothoid κ(0) = κi . We choose a cubic curvature profile because it is the minimum degree polynomial which allows us to define arbitrary initial and final curvatures, κi and κf , and sharpnesses αi and αf . The sharpness profile of these paths is given by: α(s) = ∂κ(s) = 3a3 s2 + 2a2 s + a1 . ∂s (7) In order to find the parameters of the cubic polynomial, we use the initial and final constraints: κ(0) = κi = a0 , α(0) = αi = a1 , κ(sf ) = κf = a3 sf 3 + a2 sf 2 + a1 sf + a0 , α(sf ) = αf = 3a3 sf 2 + 2a2 sf + a1 , (8) where sf is the path length, and is itself an unknown. In our application we want to ensure sharpness continuity, for this purpose we need to set the initial and final sharpness values, αi and αf to zero. This allows us to stitch together cubic curvature paths with other path segments while ensuring sharpness continuity. this time by a scaling factor of φ̈peak /φ̈max . In order to make sure that the path respects both rate and acceleration limitations, we need to scale its length by the greater of the two scaling factors. Once the new path length sf is computed, the cubic curvature path is recomputed, by solving the linear equation system given by the initial and final cubic polynomial constraints (8). V. S IGMOID C URVATURE PATHS A. Introduction Sigmoids are comprised of several functions which achieve an ”S”-like shape. One such function is the hyperbolic tangent tanh(x). Paths with a curvature profile given by an hyperbolic tangent slowly change from one curvature to another in a very smooth way. We consider paths which follow a curvature profile of the type κ(s) = A tanh(Bs), where A depends on the desired initial and final path curvatures, and B is a tunable parameter, controlling the smoothness of the path. Assuming that A = 1, we plot the resulting hyperbolic tangent function for different values of B in Figure 3. It can be seen that an increasing magnitude of B results in a sharper transition. The sharper the transition, the more difficult the curvature profile is to follow. Choosing a too small value of B will result in easy to follow paths, but at the cost of large path lengths. We want our path to start at an initial curvature κi and finish at a final curvature κf . Once decided on a certain B value, B ∗ , we evaluate the function κ(x) = A tanh(B ∗ x), in the interval x ∈ [−1, 1]. To achieve the desired curvature change between κi and κf we need A∗ = (κf − κi ) 2 tanh(B ∗ ) The function κ(x) = A∗ tanh(Bx)−A∗ tanh(−B)+κi will then, in the domain x ∈ [−1, 1] take values from κi to κf . B. Sharpness Discontinuity The sharpness profile of a sigmoid curvature path is given by sf α(s) = A∗ Bsech2 (B(s − )), 2 1 0.8 0.6 0.4 0.2 tanh(Bx) B. Ensuring Steering Rate and Acceleration Constraints In order to have a feasible path, we need to ensure that a vehicle can follow it while complying with its steering limits. By ensuring that both κi and κf are smaller in magnitude than κmax , we ensure that the cubic curvature path always has a steering angle magnitude smaller than κmax . The steering angle profile corresponding to the cubic curvature path is first computed from the path curvature using (1). Assuming then that the vehicle is following the path at a given velocity v, the steering angle rate and acceleration profiles are computed. Both profiles have a peak magnitude rate φ̇peak and acceleration φ̈peak . In case φ̇peak is larger than the allowed maximum steering rate φ̇max the length sf needs to be increased so that φ̇peak = φ̇max . This can be achieved by simply scaling the path length by φ̇peak /φ̇max . Similarly if φ̈peak > φ̈max , we scale q the path length, however 0 −0.2 −0.4 −0.6 B=1 B=2 B=3 −0.8 −1 −1 −0.8 −0.6 −0.4 −0.2 0 x 0.2 0.4 0.6 0.8 1 Fig. 3: Influence of B in the hyperbolic tangent function which at the beginning and ending of the path s = 0 and s = s sf , has a non-null sharpness α = ±A∗ Bsech2 (B 2f ). This means that if we stitch a sigmoid curvature path with another path that has an initial or final null sharpness, we do not have the desired sharpness continuity property. However the magnitude of the discontinuity can be reduced by increasing the magnitude of the B value. By choosing large enough B values, this discontinuity becomes almost unnoticeable. C. From Maximum Steering Rate to Maximum Sharpness As for the case of cubic curvature paths, the steering rate and acceleration profiles of the path need to be computed. A scaling of the path length is then performed to ensure that the path complies with the steering rate and acceleration limits. The procedure to do so follows the same steps as explained in IV-B. VI. R ESULTS A. Convergence of SC Paths to Dubins Paths As previously mentioned the Dubins paths are proven to be optimal in terms of length. The CC and SC paths are, however, longer than the Dubins path. This happens because the CC and SC turns have longer turning radii than a stand alone circular arc with a radius r = κ−1 max . In Figure 4, we show the Dubins path for a given start and goal configuration. We then overlay SC paths with different maximum sharpness for the same start and goal configurations. It can be seen that the greater the maximum sharpness of the SC paths is, i.e. the greater the achievable steering rate and accelerations of the vehicle, the closer it approaches the Dubins path. This is somewhat intuitive, as increasing the maximum sharpness of the path results in increasing the rate of change of the curvature profile. If αmax → ∞, then the curvature transitions from and to κmax would be immediate, and the SC path would be equivalent to the Dubins path. B. Notes on Computational Complexity As previously mentioned, given two configurations qs and qg , the SC method computes all possible SC turns and how they can be connected. The connection process, as detailed 40 ture. In fact, one can allow the start and goal configuration to have curvature values in a discrete set K = [κ1 , κ2 , . . . , κN ]. 35 30 D. Spline Computations y position (m) 25 20 15 10 5 Dubins (α = ∞ ) α = 0.5 α = 0.25 α = 0.125 0 −5 −10 −5 0 5 10 15 20 25 30 35 40 45 x position (m) Fig. 4: SC paths with increasing sharpness α converge to the Dubins path in section III-C, is computationally cheap, requiring only a few trigonometric operations. The bulk of processing comes from finding the possible SC turns each configuration can span. As seen in section III-B, a SC turn depends on the cubic or sigmoid curvature paths that are part of it. In order to evaluate these paths, one has to generate their curvature profiles from the given initial and final constraints. To comply with the steering constraints, a numerical evaluation of a steering profile must be done, in order to find the path length scaling factors, as detailed in section IV-B. When one has the desired curvature profile, the orientation θ can be obtained analytically. The x and y positions of the path are, however, found by solving the vehicle model equations, using an Euler method. The computational cost of this, results from a trade-off between desired precision and required real-time capabilities of the SC method. In order to greatly decrease the computation complexity of the method, some shortcuts can be taken, as detailed in the following section. C. Precomputation of Cubic Curvature Paths As previously stated, the SC method computation speed is limited by the generation of the cubic or sigmoid curvature paths. Depending on the application however, some assumptions can be made, which can greatly improve the query time of the method, by allowing a precomputation of the cubic or sigmoid curvature paths to be used. If one assumes that the start and end configurations always have null curvatures, then one can compute in an initialization procedure, all the possible cubic or sigmoid curvature paths starting and ending at curvatures κ = 0, ±κmax . In this way, we skip the expensive generation of cubic curvature paths needed to find out the possible SC turns, greatly reducing the computation time of the SC method. In order to generate a SC turn, one just has to use the precomputed paths and apply rotations and translations on them. The precomputation of paths can still be achieved, without limiting the start and goal configurations to have null curva- In the case when small turn paths need to be used (detailed in section III-D), a numerical evaluation of the whole spline path is needed. Determining the coefficients of a spline is computationally cheap, but generating the path points is expensive, as it requires a simulation of a vehicle model, in order to find the x and y positions. Furthermore, splines of such high order, are prone to be numerically unstable, resulting in curvature profiles with a large magnitude. This phenomena becomes more evident the closer the poses are and the smaller the deflection angle is. Thus, after a spline path is computed, an evaluation step is required, in order to check that the path complies with the steering limitations of the vehicle. E. Timing Evaluation We test the steering method, measuring its computational speed for several problem instances. The method is implemented in C++ and running on a Linux Mint distribution. The computer used is equipped with an Intel Core i7-6820HQ Processor running at 2.70 GHz, and with 16,0 GB of RAM. We randomly generate 1000 queries to the steering method. The start and goal configurations of each query are generated by sampling the x and y coordinates from a uniform random distribution between −50 and 50. The orientations sampled from the interval [−π, π], and the curvatures are from the discrete equispaced set of curvatures [−κmax , . . . , 0, . . . , κmax ]. The set of discrete curvatures has in total 11 elements. In the first test, we simply evaluate queries resulting in a path that does not require spline computations. For each query that is found to result in an SC path without splines, we run the query first using precomputed paths and then without using the precomputed paths. For each query we compute the resulting SC path 100 times, and average its running time. When making use of precomputations, we get an average time for finding the solution of 70µs, while without precomputations we get an average time of 12ms. The precomputations prove to be of extreme importance, increasing the computational performance up to 3 orders of magnitude. The second test follows the previous setup, but now only measuring the performance of SC path solutions that have a spline in it. 1000 queries are evaluated, and averaged over 100 repetitions. When using precomputations, we get an average query time of 100µs. Without precomputations we get 14ms. The reported results indicate that the steering method is extremely inexpensive when making use of precomputations. Even in the case when no precomputations are made, the method runs in few milliseconds, making it suitable for realtime applications. 0.5 F. Simulations Steering angle (rad) 0.4 0.3 0.2 0.1 0 0 5 10 15 20 25 30 35 Time (s) Fig. 5: Steering reference profiles used in simulation Lateral error (m) 0.4 CC SC-Cubic SC-Sigmoid 0.2 0 −0.2 0 10 20 30 40 50 60 70 Time (s) 6 Heading error (rad) A simulation test is run in order to understand how do the proposed paths influence the performance of a vehicle tracking them. A kinematic vehicle model coupled with an accurate steering actuator model are used to simulate a heavy duty vehicle. In the test, three paths consisting of a straight segment, a turn, and a straight segment are generated. The first path is generated as a CC path [9]. The second and third paths, are generated using our proposed SC paths, where the second path uses cubic curvature paths (referred to as SC-Cubic), and the third path uses sigmoid curvature paths (referred to as SC-Sigmoid). All three paths are generated so that they abide by the same maximum steering angle magnitude φmax , steering angle rate φ̇max , and steering angle acceleration φ̈max constraints. As previously explained, the CC paths require an infinite φ̈max , being so, the CC path only respects the steering magnitude and rate constraints. The simulation assumes a steering actuator that is limited in terms of achievable steering angle magnitude, rate and acceleration. The steering angle is controlled making use of a tuned PID controller, which receives a steering angle reference, and actuates on the steering angle acceleration. The PID controller was tuned to achieve a satisfactory step response, characterized by a relatively fast settling time and with very little overshoot. The steering angle reference is provided from a high-level controller, which is responsible for tracking the path. The high-level controller consists of a feedforward part and a feedback part. The feedforward part is obtained by finding the closest path point, and getting the corresponding steering angle at that point. The feedback part consists in a proportional controller which tries to regulate both the lateral and heading error. Such a controller is a simple implementation commonly used in path tracking applications. Figure 5 shows the steering reference profiles of the three paths to be tracked. It can be seen that they consist of two straight segments connected by a turning motion. The difference between them is in the shape of the increasing and decreasing sections of the steering angle. In the CC case, the steering angle change follows a linear profile, in the SCCubic it follows a cubic profile, and in the SC-Sigmoid case it follows a sigmoid profile. Figure 6 shows the measured lateral and heading errors when the vehicle tries to track the different paths. The vehicle is initially placed at the start of the path, and it follows the first straight segment perfectly, as expected. However, when the turning section starts, a deviation from the path begins to arise. This is due to the performance of the low-level PID controller, which is not able to follow the feedforward steering reference exactly, as is expected of a real system. The feedback part is then responsible for trying to regulate the errors to zero. Shortly after the turn begins the CC path becomes unstable whilst both the SC-Cubic and SC-Sigmoid paths are stable, and their error then tends to zero. The error profiles show CC SC-Cubic SC-Sigmoid ·10−2 CC SC-Cubic SC-Sigmoid 4 2 0 −2 −4 0 10 20 30 40 50 60 70 Time (s) Fig. 6: Error profiles when tracking paths that the worst controller performance is obtained for the case of the CC paths. Figure 7 shows the steering angle acceleration request, which corresponds to the output of the PID controller. The request is shown for both the SC-Cubic and SC-Sigmoid paths, the CC path is not shown as it is unstable. It can be seen that the control action is significantly lower in the case of the SC-Sigmoid path, indicating that the steering reference is easier to follow. The lateral acceleration and jerk (acceleration rate) experienced by the vehicle are related to passenger comfort. In Figure 8, the lateral accelerations are shown for a vehicle which follows the reference steering profiles, without feedback from the lateral and heading errors. It can be seen that the lateral acceleration of the CC paths has large jerk values, which result from an aggressive steering actuation. Both the SC-Cubic and SC-Sigmoid steering profiles achieve smoother lateral acceleration profiles. The proposed SC paths show a performance improvement, with the SC-Sigmoid path performing slightly better than the 1 Steering acceleration request (rad/s2 ) 0.8 0.6 0.4 0.2 0 −0.2 −0.4 −0.6 −0.8 SC-Cubic SC-Sigmoid 0 5 10 15 20 25 30 35 Time (s) Fig. 7: Controller steering angle acceleration request when tracking a path CC SC-Cubic SC-Sigmoid 0.4 Lateral acceleration (m/s2 ) 0.3 of generating a path from a combination of two SC turns connected by a line segment. This would allow the SC paths to be able to connect configurations that lie close together. It is important to evaluate the path tracking performance of a controller using these type of paths on a real system. In this paper, the controllers used were simplified ones, which are not often used in real systems that must achieve high performance. It can be argued that more complex controller approaches, such as Model Predictive Controllers (MPC) will not have significant performance changes when using the proposed paths. Nonetheless, alternative controllers could be designed such that they take full advantage of the properties of the path, without requiring the computational effort of MPC techniques. This work can also be extended into time optimal trajectory planning. Currently the SC paths assume a constant velocity, however, the velocity profile could be optimized, such that the vehicle can perform the path in a time optimal way, while still obeying steering constraints. Moreover, instead of applying an a posteriori velocity profile optimization, a different curvature profile could be optimized with respect to time, and abiding by the steering constraints. 0.2 R EFERENCES 0.1 [1] M. Buehler et al., eds., The DARPA urban challenge: autonomous vehicles in city traffic. Vol. 56. springer, 2009. [2] H. Choset et al., Principles of robot motion: theory, algorithms, and implementation. MIT press, 2005. [3] Y. Kuwata et al., ”Real-time motion planning with applications to autonomous urban driving” IEEE Transactions on Control Systems Technology 17, no. 5 (2009): 1105-1118. [4] S. Karaman et al., ”Anytime motion planning using the RRT,” in Robotics and Automation (ICRA), 2011 IEEE Int. Conf. on, pp. 14781483. IEEE, 2011. [5] T. Shima et al., ”Multiple task assignments for cooperating uninhabited aerial vehicles using genetic algorithms” Computers & Operations Research 33, no. 11 (2006): 3252-3269. [6] D. Dolgov et al., ”Path planning for autonomous vehicles in unknown semi-structured environments” The International Journal of Robotics Research 29, no. 5 (2010): 485-501. [7] L. E. Dubins, ”On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents” American Journal of mathematics 79, no. 3 (1957): 497516. [8] J. Reeds and L. Shepp, ”Optimal paths for a car that goes both forwards and backwards” Pacific journal of mathematics 145, no. 2 (1990): 367-393. [9] T. Fraichard and A. Scheuer, ”From Reeds and Shepp’s to continuouscurvature paths” IEEE Transactions on Robotics 20, no. 6 (2004): 1025-1035. [10] P. F. Lima et al., ”Clothoid-based model predictive control for autonomous driving” In Control Conference (ECC), 2015 European, pp. 2983-2990. IEEE, 2015. [11] B. Nagy and A. Kelly, ”Trajectory generation for car-like robots using cubic curvature polynomials” Field and Service Robots 11 (2001). [12] G. Parlangeli and G. Indiveri, ”Dubins inspired 2D smooth paths with bounded curvature and curvature derivative” IFAC Proceedings Volumes 43, no. 16 (2010): 252-257. [13] A. Scheuer and T. Fraichard. ”Continuous-curvature path planning for car-like vehicles” In Intelligent Robots and Systems, 1997. IROS’97., Proceedings of the 1997 IEEE/RSJ International Conference on, vol. 2, pp. 997-1003. IEEE, 1997. [14] A. Piazzi et al., ”Smooth Path Generation for Wheeled Mobile Robots Using η3 -Splines” In Motion Control. InTech, 2010. 0 −0.1 −0.2 −0.3 −0.4 0 5 10 15 20 25 30 35 40 Time (s) Fig. 8: Lateral acceleration when tracking a path SC-Cubic path. Although being both sharpness continuous, the SC-Sigmoid path presents a smoother steering profile when compared against the SC-Cubic path, which results in a better tracking of the steering reference, and consequently on a better path tracking performance. VII. CONCLUSIONS In this paper, we presented the concept of SC paths. The proposed paths have the characteristic of respecting not only the maximum steering angle constraints, but also maximum steering rate and acceleration constraints. These properties are of importance as they ease the low-level controller task, by taking into account important steering actuator limitations, and consequently providing feasible to track paths. Furthermore, these paths present an higher degree of smoothness, which improves the driving comfort and reduces actuator effort. As future work, one could extend this approach by allowing the SC paths to handle more possible cases besides that
3cs.SY
arXiv:1704.05295v1 [cs.AI] 18 Apr 2017 Semantic Similarity from Natural Language and Ontology analysis preprint Sébastien Harispe, Sylvie Ranwez, Stefan Janaqi, Jacky Montmain Ecole des mines d’Alès - LGI2P ii Abstract Artificial Intelligence federates numerous scientific fields in the aim of developing machines able to assist human operators performing complex treatments – most of which demand high cognitive skills (e.g. learning or decision processes). Central to this quest is to give machines the ability to estimate the likeness or similarity between things in the way human beings estimate the similarity between stimuli. In this context, this book focuses on semantic measures: approaches designed for comparing semantic entities such as units of language, e.g. words, sentences, or concepts and instances defined into knowledge bases. The aim of these measures is to assess the similarity or relatedness of such semantic entities by taking into account their semantics, i.e. their meaning – intuitively, the words tea and coffee, which both refer to stimulating beverage, will be estimated to be more semantically similar than the words toffee (confection) and coffee, despite that the last pair has a higher syntactic similarity. The two state-of-theart approaches for estimating and quantifying semantic similarities/relatedness of semantic entities are presented in detail: the first one relies on corpora analysis and is based on Natural Language Processing techniques and semantic models while the second is based on more or less formal, computer-readable and workable forms of knowledge such as semantic networks, thesaurus or ontologies. Semantic measures are widely used today to compare units of language, concepts, instances, or even resources indexed by them (e.g., documents, genes). They are central elements of a large variety of Natural Language Processing applications and knowledge-based treatments, and have therefore naturally been subject to intensive and interdisciplinary research efforts during last decades. Beyond a simple inventory and categorization of existing measures, the aim of this monograph is to convey novices as well as researchers of these domains towards a better understanding of semantic similarity estimation and more generally semantic measures. To this end, we propose an in-depth characterisation of existing proposals by discussing their features, the assumptions on which they are based and empirical results regarding their performance in particular applications. By answering these questions and by providing a detailed discussion on the foundations of semantic measures, our aim is to give the reader key knowledge required to: (i) select the more relevant methods according to a particular usage context, (ii) understand the challenges offered to this field of study, (iii) distinguish room of improvements for state-of-the-art approaches and (iv) stimulate creativity towards the development of new approaches. In this aim, several definitions, theoretical and practical details, as well as concrete applications are presented. keywords: Semantic similarity, semantic relatedness, semantic measures, distributional measures, domain ontology, knowledge-based semantic measure. iii iv Contents 1 Introduction to semantic measures 1.1 Semantic measures in action . . . . . . . . . . . . . . . . . . . . 1.1.1 Natural Language Processing . . . . . . . . . . . . . . . 1.1.2 Knowledge engineering, Semantic Web and Linked Data 1.1.3 Biomedical Informatics & Bioinformatics . . . . . . . . 1.1.4 Other applications . . . . . . . . . . . . . . . . . . . . . 1.2 From similarity towards semantic measures . . . . . . . . . . . 1.2.1 Human cognition, similarity and existing models . . . . 1.2.2 Definitions of semantic measures and related vocabulary 1.2.3 From distance and similarities to semantic measures . . 1.3 Classification of semantic measures . . . . . . . . . . . . . . . . 1.3.1 How to classify semantic measures . . . . . . . . . . . . 1.3.2 A general classification of semantic measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2 3 3 4 4 4 8 12 14 14 16 2 Corpus-based semantic measures 2.1 From text analysis to semantic measures . . . . . . . . . . . . . 2.2 Semantic evidence of word similarity in natural language . . . . 2.2.1 The meaning of words . . . . . . . . . . . . . . . . . . . 2.2.2 Structural relationships: Paradigmatic and Syntagmatic 2.2.3 The notion of context . . . . . . . . . . . . . . . . . . . 2.2.4 Distributional semantics . . . . . . . . . . . . . . . . . . 2.3 Distributional measures . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Implementation of the distributional hypothesis . . . . . 2.3.2 From distributional model to word similarity . . . . . . 2.3.3 Capturing deeper co-occurrences . . . . . . . . . . . . . 2.4 Other corpus-based measures . . . . . . . . . . . . . . . . . . . 2.5 Advantages and limits of corpus-based measures . . . . . . . . 2.5.1 Advantages of corpus-based measures . . . . . . . . . . 2.5.2 Limits of corpus-based measures . . . . . . . . . . . . . 2.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 19 23 23 23 24 27 29 29 31 36 36 37 37 37 38 3 Knowledge-based semantic measures 3.1 Ontologies as graphs and formal notations . . . . . . . . . . . . 3.1.1 Ontologies as graphs . . . . . . . . . . . . . . . . . . . . 3.1.2 Relationships . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Graph traversals . . . . . . . . . . . . . . . . . . . . . . 3.1.4 Notations for taxonomies . . . . . . . . . . . . . . . . . 3.2 Types of semantic measures and graph properties . . . . . . . . 3.2.1 Semantic measures on cyclic semantic graphs . . . . . . 3.2.2 Semantic measures on acyclic graphs . . . . . . . . . . . 3.3 Semantic evidence in semantic graphs and their interpretations 3.3.1 Semantic evidence in taxonomies . . . . . . . . . . . . . 3.3.2 Concept specificity . . . . . . . . . . . . . . . . . . . . . 3.3.3 Strength of connotations between concepts . . . . . . . 3.4 Semantic similarity between a pair of concepts . . . . . . . . . 3.4.1 Structural approach . . . . . . . . . . . . . . . . . . . . 3.4.2 Feature-based approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 40 40 44 44 44 46 46 50 50 50 52 58 59 60 64 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi CONTENTS 3.5 3.6 3.4.3 Information theoretical approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.4.4 Hybrid approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.4.5 Considerations when comparing concepts in semantic graphs . . . . . . . . . . . . 67 3.4.6 List of pairwise semantic similarity measures . . . . . . . . . . . . . . . . . . . . . 69 Semantic similarity between groups of concepts . . . . . . . . . . . . . . . . . . . . . . . . 78 3.5.1 Direct approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 3.5.2 Indirect approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 3.5.3 List of groupwise semantic similarity measures . . . . . . . . . . . . . . . . . . . . 79 Other knowledge-based measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 3.6.1 Semantic measures based on logic-based semantics . . . . . . . . . . . . . . . . . . 83 3.6.2 Semantic measures for multiple ontologies . . . . . . . . . . . . . . . . . . . . . . . 83 3.7 Advantages and limits of knowledge-based measures . . . . . . . . . . . . . . . . . . . . . 84 3.8 Mixing knowledge-based and corpus-based approaches . . . . . . . . . . . . . . . . . . . . 85 3.9 3.8.1 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 3.8.2 Wikipedia-based measure: how to benefit from structured encyclopaedia knowledge 86 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 4 Evaluation of semantic measures 95 4.1 A general introduction to semantic measure evaluation . . . . . . . . . . . . . . . . . . . . 95 4.2 Criteria for semantic measure evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.3 4.4 4.2.1 Accuracy, Precision and Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.2.2 Computational complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.2.3 Mathematical properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.2.4 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 4.2.5 Technical details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Existing protocols and datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.3.1 Protocols used to compare measures . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.3.2 Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 5 Conclusion and research directions 115 A Examples of syntagmatic contexts 123 B A brief introduction to Singular Value Decomposition 127 C Other models for representing units of language 129 D Software tools and source code libraries 135 Bibliography 140 Author’s Biography 167 Preface In the last decades, numerous researchers from different domains have provided a lot of efforts developing and studying the notion of semantic measure and more specifically the notions of semantic similarity and semantic relatedness. Indeed, from the biomedical domain, where ontologies and conceptual annotations abound – e.g., genes are characterised by concepts from the Gene Ontology, scientific articles are indexed by terms defined into the Medical Subject Heading thesaurus (MeSH) – to Natural Language Processing (NLP) where text mining requires the semantics of units of language to be compared, researchers provided a vast body of research related to semantic measures: algorithms and approaches designed in the aim of comparing concepts, instances characterised by concepts and units of language w.r.t their meaning. Despite the vast literature dedicated to the domain, most of which is related to the definition of new measures, no extensive introduction proposes to highlight the large diversity of contributions which have been proposed so far. In this context, understanding the foundations of these measures, knowing the numerous approaches which have been proposed and distinguishing those to use in particular application contexts is challenging. This book proposes an extended introduction to semantic measures targeting both students and domain experts. The aim is to provide a general introduction to the diversity of semantic measures in order to distinguish the central notions and the key concepts of the domain. In a second step, we present the two main families of measures to further discuss technical details related to specific implementations. By organising information about measures and by providing references to key research papers, our aim is to improve semantic measure understanding, to facilitate their use and to provide an condensed overview of state-of-the-art contributions related to the domain. The first chapter introduces the motivations which highlight the importance of studying semantic measures. Starting by presenting various applications that benefit from semantic measures in different usage contexts, it then guides the reader towards a deeper understanding of those measures. Intuitive notions and the vocabulary commonly used in the literature are introduced. We present in particular the central notions of semantic relatedness, semantic similarity, semantic distance. . . More formal definitions and properties used for studying semantic measures are also proposed. Next, these definitions and properties are used to characterise the broad diversity of measures which have been introduced in the literature. A classification of semantic measures is then proposed; it distinguishes the two main approaches corresponding to corpus-based and knowledge-based semantic measures. These two families of semantic measures are further presented in detail in Chapter 2 and Chapter 3 respectively. The foundations of these measures and several implementations which have been proposed in the literature are discussed – software tools enabling practical use of measures are also presented in appendix. Chapter 4 is dedicated to semantic measures evaluation and selection. It presents several aspects of measures that can be studied for their comparison, as well as state-of-the-art protocols and datasets used for their evaluation. Finally, Chapter 5 concludes by summarising important notions which are introduced in this book, and by highlighting several important research directions which must be studied for improving both semantic measures and their understanding. By following this progression, we hope that the reader will find a detailed and stimulating introduction to semantic measures. Our aim is to give the reader access to an extensive state-of-the-art of this field, as well as key knowledge required to: (i) select the more relevant methods according to a particular usage context, (ii) understand the challenges offered to this field of study, (iii) distinguish room of improvements for state-of-the-art approaches and (iv) stimulate creativity towards the development of new approaches. Sébastien Harispe, Sylvie Ranwez, Stefan Janaqi, and Jacky Montmain Nı̂mes – France, January 2015 vii viii CONTENTS Chapter 1 Introduction to semantic measures Back in the 60s, the quest for artificial intelligence (AI) had originally been motivated by the assumption that “[. . . ] every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it [. . . ]” (McCarthy et al., 2006). Even if this assumption has today proved to be pretentious and perhaps even unattainable, efforts are still made to design intelligent agents which are able to resolve complex problems and to perform elaborated tasks. To this end, AI federates numerous scientific communities to tackle a large diversity of problems in the aim of giving machines the ability to reason, to understand knowledge, to learn, to plan, to manoeuvre, to communicate, and to perceive (Russell and Norvig, 2009). Central to this quest is the ability to estimate some likeness between things in the way human is able to compare stimuli, e.g. to compare objects, situations. This is a key notion to induce reasoning and therefore to provide machines with intelligence, i.e., the “ability to acquire and apply knowledge and skills” (Oxford Dict., 2012). In this context, numerous contributions have focused on designing and studying semantic measures for comparing semantic entities such as units of language, e.g. words, sentences, or concepts and instances defined into knowledge bases. The aim of these measures is to assess the similarity or relatedness of such semantic entities by taking into account their semantics, otherwise stated their meaning. These measures are cornerstones of refined processing of texts and ontologies and therefore play an important role in numerous domains. Semantic measures are widely used today to compare semantic entities such as units of language, concepts or even semantically characterised instances, according to information supporting their meaning. They are based on the analysis of semantic proxies, corpora of texts or ontologies1 , from which semantic evidence can be extracted. Notice that here, according to the literature related to the field, the notion of semantic measure is not framed in the rigorous mathematical definition of measure. It should instead be understood as any theoretical tool, mathematical function, algorithm or approach which enables the comparison of semantic entities according to semantic evidence. Generally speaking, these measures are used to estimate the degree of semantic likeness between semantic entities through a numerical value. Therefore, even if a large diversity of measures exists to estimate the similarity or the distance between specific mathematical objects (e.g., vectors, matrices, graphs, sets, fuzzy sets), data structures (e.g., lists, objects) and data types (e.g., numbers, strings, dates), the main particularity of semantic measures compared to traditional similarity or distance functions relies on two aspects: (i) they are dedicated to the comparison of semantic entities and (ii) they are based on the analysis of semantic proxies from which semantic evidence can be extracted. This semantic evidence is expected to directly or indirectly characterise the meaning of compared elements. As an example, the measures used to compare two words according to their sequences of characters cannot be considered as semantic since only the characters of the words and their ordering is taken into account, not their meaning. Indeed, according to such syntactic measures, the two words car and vehicle would be regarded as distant despite their closely related semantics. Semantic measures enable to overcome the limitation of such syntactic measures by comparing semantic entities w.r.t their semantics. To this aim, semantic measures rely on the analysis of two broad types of semantic proxies: corpora of texts and ontologies. These semantic proxies are used to extract semantic evidence which will next be used by semantic measures to support the comparison of compared units of language, concepts or instances. The first type of semantic proxy corresponds to unstructured or semi-structured texts (e.g., plain texts, dictionaries). These texts contain informal evidence of semantic relationships between units of language. Let us consider a simple example. Since it is common to drink coffee with sugar and nothing 1 Or more generally knowledge bases. 1 2 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES particular links coffee to cats, most will agree that the pair of words (coffee,sugar ) is more semantically coherent than the pair of words (coffee,cat) – otherwise stated that the words (coffee,sugar ) are more semantically related than the words (coffee,cat). Interestingly, corpus of texts can be used to derive the same conclusion. To this end, a semantic measure will take advantage of the fact that the word coffee is more likely to co-occur with the word sugar than with the word cat. Simply stated, it is possible to use observations regarding the distribution of words in a corpus in order to estimate the strength of the semantic relationship which links two words, e.g., based on the assumption that semantically related words tend to co-occur. The second type of semantic proxy from which semantic evidence can be extracted encompasses a large range of knowledge models. From structured vocabularies to highly formal ontologies, these proxies are structured and model, in an explicit manner, knowledge about the entities they define. As an example, in an ontology defining the concepts Coffee and Sugar, a specific relationship will probably explicitly define the link between the two concepts, e.g., that Coffee canBeDrinkWith Sugar. Semantic measures based on knowledge base analysis rely on techniques which take advantage of network-based (e.g., thesaurus, taxonomies), or logic-based ontologies to extract semantic evidence on which the comparison will be based. From gene analysis to recommendation systems, semantic measures have recently been found to cover a broad field of applications and are now essential metrics for leverage data mining, data analysis, classification, knowledge extraction, textual processing or even information retrieval based on text corpora or ontologies. They play an essential role in numerous treatments which require the analysis of the meaning (i.e., semantics) of compared entities. In this context, the study of semantic measures has always been an interdisciplinary effort. Communities of Psychology, Cognitive Sciences, Linguistics, Natural Language Processing, Semantic Web, and Biomedical informatics being among the most active contributors (2014). Due to the interdisciplinary nature of semantic measures, recent decades have been highly prolific in contributions related to the notion of semantic relatedness, semantic similarity and semantic distance, etc. This book provides an organised state of the art of semantic measures and proposes a classification of existing measures. Yet before introducing the technical aspects required to further introduce semantic measures, we will briefly discuss their large diversity of applications. 1.1 Semantic measures in action Semantic measures are used to solve problems in a broad range of applications and domains. They are essential tools for the design of numerous algorithms and treatments in which semantics matters. In this section, we present diverse practical applications involving semantic measures. Three domains of application are considered in particular: (i) Natural Language Processing, (ii) Knowledge Engineering/Semantic Web and Linked Data, and (iii) Biomedical informatics and Bioinformatics. Since they are transversal, additional applications related to information retrieval and clustering are also briefly considered. The list of applications presented in this section is far from being exhaustive. An extensive classification of contributions related to semantic measures is proposed in the state-of-the-art presented in this manuscript (Harispe et al., 2013b, version 2). This classification underlines the broad range of applications of semantic measures and highlights the large number of communities involved. 1.1.1 Natural Language Processing Linguists have, quite naturally, been among the first to study semantic measures in the aim of comparing units of language (e.g., words, sentences, paragraphs, documents). The estimation of word/concept relatedness plays an important role in detecting paraphrasing, e.g., duplicate content and plagiarism (Fernando and Stevenson, 2008), in generating thesauri or texts (Iordanskaja et al., 1991), in summarising texts (Kozima, 1993), in identifying discourse structure, and in designing question answering systems (Bulskov et al., 2002; Freitas et al., 2011; Wang et al., 2012a) to mention a few. The effectiveness of semantic measures to resolve both syntactic and semantic ambiguities has also been demonstrated on several occasions, e.g., (Sussna, 1993; Resnik, 1999; Patwardhan, 2003). Several surveys related to the usage of semantic measures and to the techniques used for their design for natural language processing can be found in (Weeds, 2003; Curran, 2004; Sahlgren, 2008; Dinu, 2011; Mohammad and Hirst, 2012a; Panchenko, 2013). 1.1. SEMANTIC MEASURES IN ACTION 1.1.2 3 Knowledge engineering, Semantic Web and Linked Data Interest in semantic measures is still growing while several initiatives promote the Semantic Web and Linked Data paradigms to provide “an extension of the current [Web], in which information is given well-defined meaning, better enabling computers and people to work in cooperation” (Berners-Lee et al., 2001). Communities associated to Knowledge Engineering, Semantic Web and Linked Data play an import role in the definition of methodologies and standards to formally express machine-understandable knowledge representations. They extensively study the problematic associated to the expression of structured and controlled vocabularies, as well as ontologies, i.e., formal and explicit specification of a shared conceptualisation defining a set of concepts, their relationships and axioms to model a domain2 (Gruber, 1993). These models rely on structured knowledge representations in which the semantics of the concepts (classes) and relationships (properties) are rigorously and formally defined in an unambiguous way. These (on-going) efforts have led to the definition of several languages which can be used today to express formal, computer-readable and processable forms of knowledge. Such models are therefore proxies of choice to compare the concepts and the instances of the domain they model. As we will see, the taxonomy of concepts, which is the backbone of ontologies, is particularly useful to estimate the degree of similarity between concepts. In this field, semantic measures can be used as part of processes aiming to integrate heterogeneous ontologies (refer to ontology alignment and instance matching) (Euzenat and Shvaiko, 2013); they are used to find similar/duplicate entities defined in different ontologies. Applications to provide inexact search capabilities over ontologies or to improve classical information retrieval techniques have also been proposed, e.g., (Hliaoutakis, 2005; Varelas et al., 2005; Hliaoutakis et al., 2006; Kiefer et al., 2007; Sy et al., 2012; Pirró, 2012). In this context, semantic measures have also been successfully applied to learning tasks using Semantic Web technologies (D’Amato, 2007). Their benefits for designing recommendation systems based on the Linked Data paradigm have also been stressed, e.g., (Passant, 2010; Harispe et al., 2013a). 1.1.3 Biomedical Informatics & Bioinformatics A large number of semantic measures have been defined in biomedical informatics and bioinformatics. In these domains, semantic measures are commonly used to study various types of instances which have been semantically characterised using ontologies (genes, proteins, drugs, diseases, phenotypes)3 . Several surveys related to the usage of semantic measures in the biomedical domain underline the diversity of their applications, e.g. for diagnosis, disease classification, drug design and gene analysis (Pedersen et al., 2007; Pesquita et al., 2009a; Guzzi et al., 2012). As an illustration, here we focus on applications related to studies on the Gene Ontology (GO) (Ashburner et al., 2000). The GO is the preferred example with which to highlight the large adoption of ontologies in biology; it is extensively used to conceptually annotate gene (products) on the basis of experimental observations or automatic inferences. A gene is classically annotated by a set of concepts structured in the GO. These annotations formally characterise genes regarding their molecular functions, their cellular location and the biological processes in which they are involved. Thanks to semantic measures, these annotations make the automatic comparison of genes possible, not on the basis of particular gene properties (e.g. nucleotidic/proteic sequence, structural similarity, gene expression), but rather on the analysis of biological aspects which are formalised by the GO. Genes can be further analysed by considering their representation in a semantic space expressing our current understanding of particular aspects of biology. In such cases, conceptual annotations bridge the gap between global knowledge of biology defined in the GO (e.g., organisation of molecular functions) and fine-grained understanding of specific instances (e.g., the specific role of a gene at molecular level). In this context, semantic measures enable computers to take advantage of this knowledge to analyse genes and therefore open interesting perspectives to infer new knowledge. As an example, various studies have highlighted the relevance of semantic measures to assess the functional similarity of genes (Wang et al., 2007; Du et al., 2009), to build gene clusters (Sheehan et al., 2008), to validate and to study protein-protein interactions (Xu et al., 2008), to analyse gene expression (Xu et al., 2009), to evaluate gene set coherence (Diaz-Diaz and Aguilar-Ruiz, 2011) or to recommend 2 More about ontologies can be found in (Gruber, 1995; Guarino et al., 2009; Fernandez-Lopez and Corcho, 2010). and biomedicine are heavy users of ontologies, e.g., BioPortal, a portal dedicated to ontologies related to biology and the biomedical domain, references hundreds of ontologies (Whetzel et al., 2011). 3 Biology 4 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES gene annotations (Couto et al., 2006), among others. A survey dedicated to semantic measures applied to the GO can be found in (Guzzi et al., 2012). 1.1.4 Other applications Information Retrieval (IR) uses semantic measures to overcome the limitations of techniques based on plain lexicographic term matching, i.e., simple IR models consider that a document is relevant according to a query only if the terms specified in the query occur in the document. Semantic measures enable the meaning of words to be taken into account by going over syntactic search. They can therefore be used to improve classic models, e.g., synonyms will no longer be considered as totally different words. As an example, semantic measures have been successfully used in the design of ontology-based information retrieval systems and for query expansion, e.g., (Hliaoutakis, 2005; Hliaoutakis et al., 2006; Varelas et al., 2005; Baziz et al., 2007; Saruladha et al., 2010b; Sy et al., 2012). An important aspect is that semantic measures based on ontologies allow for the analysis and querying of non-textual resources and therefore do not restrict IR techniques in text analysis, e.g., genes annotated by concepts can be queried (Sy et al., 2012). In the same vein, the definition of efficient generic indexing solutions based on semantic measures are proposed in (Fiorini et al., 2014). GeoInformatics actively contributes to the study of semantic measures. In this domain, measures have for instance been used to compute the similarity between locations according to semantic characterisations of their geographic features (Janowicz et al., 2011), e.g. estimating the semantic similarity of tags defined in the OpenStreetMap Semantic Network4 (Ballatore et al., 2012). Readers interested in the application of semantic measures in this field may also refer to (Akoka et al., 2005; Andrea Rodrı́guez and Egenhofer, 2004; Rodrı́guez et al., 2005; Janowicz, 2006; Formica, 2008; Janowicz et al., 2008). 1.2 From similarity towards semantic measures This section first introduces generalities related to the notion of similarity. We introduce in particular several models which have been proposed by cognitive sciences in order to study the human capacity to evaluate similarity of objects. Presenting these contributions will help us to better understand the models generally used to analyse object comparison. As we will see, they will be of specific interest for studying semantic measures. Indeed, the main models of similarity defined by cognitive sciences play an important role to understand the diversity of approaches which have been proposed to design semantic measures. The next aim of this section is to introduce the vocabulary which is commonly used to refer to the notion of semantic measures, i.e. semantic similarity, semantic relatedness, semantic distance, etc. Several mathematical definitions and properties related to distance and similarity are also presented. These definitions will be further used to distinguish mathematical properties of interest for the characterization and the study of semantic measures in Section 1.3. 1.2.1 Human cognition, similarity and existing models Human capacity to evaluate the similarity of things (e.g., objects, stimuli) has long been studied by cognitive sciences and psychology. It has been characterised as a central element of the human cognitive system and is therefore understood nowadays as a pivotal notion to simulate intelligence (Rissland, 2006). It is indeed a key element to initiating the process of learning in which the capacity to recognise similar situations helps us to build our experience5 , to activate mental traces, to make decisions, to innovate by applying experience gained in solving similar problems6 (Holyoak and Koh, 1987; Ross, 1987; Novick, 1988; Ross, 1989; Vosniadou and Ortony, 1989; Gentner and Markman, 1997). The importance of the notion of similarity for cognitive processes, and in particular for the process of learning, has also been stressed by the theories of transfer which highlights that new skills are expected to be easier to learn if similar to skills already learned (Markman and Gentner, 1993). In this context, similarity is therefore 4 http://wiki.openstreetmap.org/wiki/OSM_Semantic_Network 5 Cognitive models based on categorisation consider that human classify things, e.g., experience of life, according to their similarity to some prototype, abstraction or previous examples (Markman and Gentner, 1993). 6 Here the similarity is associated to the notion of generalisation and is measured in terms of probability of inter-stimulusconfusion errors (Nosofsky, 1992). 1.2. FROM SIMILARITY TOWARDS SEMANTIC MEASURES 5 commonly considered as a central component of memory retrieval, categorisation, pattern recognition, problem solving, reasoning, as well as social judgement, e.g., refer to Markman and Gentner (1993); Hahn et al. (2003); Goldstone and Son (2004) for associated references. As we have seen, from mathematics to psychology, the notion of similarity is central in numerous fields and is particularly important for human cognition and intelligent system design. In this subsection, we provide a brief overview of the psychological theories of similarity by introducing the main models proposed by cognitive sciences to study and explain (human) appreciation of similarity. Cognitive models of similarity generally aim to study the way humans evaluate the similarity of two mental representations according to some kind of psychological space (Tversky, 2004). They are therefore based on assumptions regarding the mental representation of the compared objects from which the similarity will be estimated. Indeed, as stated by several authors, the notion of similarity, per se, can be criticised as a purely artificial notion. In Goodman (1972), the notion of similarity is defined as “an imposture, a quack ” because objectively, everything is equally similar to everything else. The authors emphasise that, conceptually, two random objects have an infinitive number of properties in common and infinite different properties7 , e.g. a flower and a computer are both smaller than 10m, 9.99m, 9.98m, etc. An important notion to understand, which has been underlined by cognitive sciences, is that different degrees of similarities emerge only when some predicates are selected or weighted more than others. As stated in Hahn (2011), ”this important observation doesn’t mean that similarity is not an explanatory notion but rather that the notion of similarity is heavily framed in psychology”. Similarity assessment must therefore not be understood as an attempt to compare object realisations through the evaluation of their properties, but rather as a process aiming to compare objects as they are understood by the agent which estimates the similarity (e.g., a person, an algorithm). The notion of similarity therefore only makes sense according to the consideration of a partial (mental) representation on which the estimation of object similarity is based – this aspect of the notion of similarity will be essential for the rest of this book. Contrary to real objects, representations of objects do not contain infinitesimal properties. As an example, our mental representations of things only capture a limited number of dimensions of the object which is represented. Therefore, the philosophical worries regarding the soundness of similarity vanish given that similarity aim at comparing partial representations of objects and not objects themselves, e.g., human mental representation of objects (Hahn, 2011). It is important to understand that studying human capacity to assess similarity, the similarity is thus estimated between mental representations – i.e. representations, not the real objects. This will also be the case for semantic similarity measures. Considering that these representations are the ones of a human agent, the notion of similarity may thus be understood as how similar objects appear to us. Considering the existential requirement of representations to compare things or objects, much of the history of research on similarity in cognitive sciences focuses on the definition of models of the mental representation of objects, to further consider measures which will be used to compare objects based on their representations. The central role of cognitive sciences regarding the study of similarity relies on the design of cognitive models of both, mental representations and similarity. These models are used to study how humans store their knowledge and interact with it in order to compare object representations. Cognitive scientists then test these models according to our understanding of human appreciation of similarity. Indeed, evaluations of human appreciation of similarity help us to distinguish constraints/expectations on the properties an accurate model should have. This approach is essential to reject hypotheses and improve the models. As an example, studies have demonstrated that appreciation of similarity is sometimes asymmetric: the similarity between a person and his portrait is commonly expected to be lower than the inverse.8 Therefore, the expectation of asymmetric estimation of similarity is incompatible with the mathematical properties of a distance, which is symmetric by definition. Models based on distance axioms thus appeared inadequate and have to be revised or to be used with moderation. In this context, the introduction of cognitive models of similarity will be particularly useful to understand the foundations of some approaches adopted for the definition of semantic measures. Cognitive models of similarity are commonly organised into four different approaches: (i) Spatial models, (ii) Feature models, (iii) Structural models and (iv) Transformational models. We briefly intro7 This statement also stands if we restrict the comparison of objects to a finite set of properties. The reader may refer to Andersen’s famous story of the Ugly Duckling. Proved by Watanabe and Donovan (1969), the Ugly Duckling theorem highlights the intrinsic bias associated to classification, showing that all things are equal and therefore that an ugly duckling is as similar to a swan as two swans are to each other. The important teaching is that biases are required to make a judgement and to classify, i.e., to prefer certain categories over others. 8 Indeed, Tversky (1977) stresses that We say “the portrait resembles the person” rather than “the person resembles the portrait”. 6 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES duce these four models – more detailed introductions have been proposed by Goldstone and Son (2004) and Schwering (2008). A captivating talk introducing cognition and similarity, on which this introduction is based, can also be found in (Hahn, 2011). Spatial models The spatial models, also named geometric models, rely on one of the most influencal theories of similarity in cognitive sciences. They are based on the notion of psychological distance and consider objects (here perceptual effects of stimuli or concepts) as points in a multi-dimensional metric space. Spatial models consider similarity as a function of the distance between the mental representations of the compared objects. These models derive from Shepard’s spatial model of similarity. Objects are represented in a multi-dimensional space and their locations are defined by their dimensional differences (Shepard, 1962). In his seminal work on generalisation, Shepard (1987) provides a statistical technique in the form of Multi-Dimensional Scaling (MDS) to derive locations of objects represented in a multi-dimensional space. MDS can be used to derive some potential spatial representations of objects from proximity data (similarity between pairs of objects). Based on these spatial representations of objects, Shepard derived the universal law of generalisation which demonstrates that various kinds of stimuli (e.g., Morse code signals, shapes, sounds) have the same lawful relationship between distance (in an underlined MDS) and perceive similarity measures (in terms of confusability) – the similarity between two stimuli was defined as an exponentially decreasing function of their distance9 . By demonstrating a negative exponential relationship between similarity and generalisation, Shepard established the first sound model of mental representation on which cognitive sciences will base their studies on similarity. The similarity is in this case assumed to be the inverse of the distance separating the perceptual representations of the compared stimuli (Ashby and Perrin, 1988). Similarity defined as a function of distance is therefore implicitly constrained to the axiomatic properties of distance – these properties will be detailed in the following chapter, Section 1.2.3. A large number of geometric models have been proposed. They have long been among the most popular in cognitive sciences. However, despite their intuitive nature and large popularity, geometric models have been subject to intense criticism due to the constraints defined by the distance axioms. Indeed, several empirical analyses have questioned and challenged the validity of the geometric framework (i.e., both the model and the notion of psychological distance), by underlying inconsistencies with human appreciation of similarity, e.g., violation of the symmetry, triangle inequality and identity of the indiscernibles, e.g. (Tversky, 1977; Tversky and Itamar, 1978; Tversky and Gati, 1982)10 . Feature models To respond to the limitation of the geometric models, Tversky (1977) proposes the feature model in which evaluated objects are manipulated through sets of features. A feature “describes any property, characteristic, or aspect of objects that are relevant to the task under study” (Tversky and Gati, 1982). Therefore, feature models evaluate the similarity of two stimuli according to a feature-matching function F which makes use of their common and distinct features: simF (u, v) = F (U ∩ V, U \ V, V \ U ) (1.1) The function F is expected to be non-decreasing, i.e., the similarity increases when common (distinct) features are added (removed). Feature models are thus based on the assumption that F is monotone and that common and distinct features of compared objects are enough for their comparison. In addition, an important aspect is that the feature-matching process is expressed in terms of a matching function as defined in set theory (i.e., binary evaluation). The similarity of two objects is further derived as a parametrised function of their common and distinct features. Two models, the contrast model (simCM ) and the ratio model (simRM ) were initially 9 The similarity between two stimuli is here understood as the probability that a response to one stimulus will be generalised to the other (Shepard, 1987). With sim(A, B) the similarity between two stimuli A, B and dist(A, B) their distance, we obtain the relation sim(A, B) = e−dist(A,B) , that is dist(A, B) = −log sim(A, B), a form of entropy. 10 Note that recent contributions propose to answer these inconsistencies by generalising the classical geometric framework through quantum probability (Pothos et al., 2013). Compared objects are represented in a quantum model in which they are not seen as points or distributions of points, but entire subspaces of potentially very high dimensionality, or probability distributions of these spaces. 1.2. FROM SIMILARITY TOWARDS SEMANTIC MEASURES 7 proposed by Tversky (1977). They can be used to compare two objects u and v represented through sets of features U and V : simCM (u, v) = γf (U ∩ V ) − αf (U \ V ) − βf (V \ U ) (1.2) f (U ∩ V ) αf (U \ V ) + βf (V \ U ) + f (U ∩ V ) (1.3) simRM (u, v) = The symmetry of the measures produced by the two models can be tuned according to the parameters α and β. This enables the design of asymmetric measures. In addition, one of the major constructs of the feature model is the function f which is used to capture the salience of a (set of) feature(s). The salience of a feature is defined as a notion of specificity: “the salience of a stimulus includes intensity, frequency, familiarity, good form, and informational content” (Tversky, 1977). Therefore, the operators ∩, ∪ and \ are based on feature matching (F ) and the function f evaluates the contribution of the common or distinct features (distinguished by previous operators) to estimate the similarity11 . Structural alignment models Structural models are based on the assumption that objects are represented by structured representations. Indeed, a strong criticism of the feature model was that (features of) compared objects are considered to be unstructured, contrary to evidence suggesting that perceptual representations are well characterised by hierarchical systems of relationships, e.g., (Gentner and Markman, 1994; Markman and Gentner, 1993). Structural alignment models are structure mapping models in which the similarity is estimated using matching functions which will evaluate the correspondence between the compared elements (Gentner and Markman, 1994; Markman and Gentner, 1993). Here, the process of similarity assessment is expected to involve a structural alignment between two mental representations in order to distinguish correspondences. Hence, the greater the number of correspondences, the more similar the objects will be considered. In some cases, the similarity is estimated in an equivalent manner to analogical mapping (Markman and Gentner, 1990) and similarity is expected to involve mapping between both features and relationships. Another example of a structural model was proposed by Goldstone (1996, 1994a), who proposed to model similarity as an interactive activation and mapping model using connectionism activation networks based on mappings between representations. Tranformational models Transformational models assume that similarity is defined by the transformational distance between mental representations (Hahn et al., 2003). The similarity is framed in representational distortion (Chater and Hahn, 1997) and is expected to be assessed based on the analysis of the modifications required to transform one representation to another. The similarity, which can be explained in terms of the Kolmogorov complexity theory (Li and Vitányi, 2008), is therefore regarded as a decreasing function of transformational complexity (Hahn et al., 2003). Unification of cognitive models of similarity Several studies highlighted links and deep parallels between the various cognitive models. Tenenbaum and Griffiths (2001) propose a unification of spatial, feature-based and structure-based models through a framework relying on the generalisation of Bayesian inference – see Gentner (2001) for criticisms. Alternatively, Hahn (2011) proposes to introduce the transformational model as a generalisation of the spatial, feature and structure-based models. In this section, we have briefly presented several cognitive models which have been proposed to explain and study (human) appreciation of similarity. These models are characterised by particular interpretations and assumptions on the way knowledge is mentally represented and processed. This highlights that the notion of object representation is central for comparing objects, and directly impacts the second critical dimension of similarity: the strategy adopted to compare object representations in 11 As an example, the notion of the salience associated to a feature implicitly defines the possibility of designing measures which do not respect the identity of the indiscernibles, i.e. which enable non-maximal self-similarity. 8 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES order to assess the similarity of objects. As we will see, these two components will be of major importance for the definition and characterisation of semantic measures. In addition, we have also stressed that the fundamental differences between the models also rely on the conceptual approach used to explain similarity assessment, and more particularly on the mathematical properties of the measure which is used to compare the objects, e.g., symmetry, triangle inequality. These mathematical properties are also of major importance to better understand the models and the approaches which can be used to compare objects – similarly, semantic measures will also be analysed considering these mathematical properties. We have also introduced that, interestingly and despite the strong differences between the different models presented, several meaningful initiatives have been undertaken to unify the cognitive models. To this end, researchers have proposed to develop frameworks which generalise existing models of similarity – once again this kind of initiative will also be found in studies related to semantic measures. 1.2.2 Definitions of semantic measures and related vocabulary Generalities The goal of semantic measures is easy to understand – they aim to capture the strength of the semantic interaction between semantic elements (e.g., words, concepts) based on their meaning. Are the words car and auto more semantically related than the words car and mountain? Most people would agree that they are. This has been proved in multiple experiments, inter-human agreement on semantic similarity ratings is high, e.g. (Rubenstein and Goodenough, 1965; Miller and Charles, 1991; Pakhomov et al., 2010)12 . Appreciation of similarity is obviously subject to multiple factors. Our personal background is an example of such a factor, e.g., elderly people and teenagers will probably not associate the same score of semantic similarity between the two concepts Phone and Computer13 . However, most of the time, a consensus regarding the estimation of the strength of the semantic link between elements, i.e. semantic relatedness, can be reached (Miller and Charles, 1991) – this is what makes the notion of semantic measures intuitive and fascinating14 . The majority of semantic measures try to mimic the human capacity to assess the degree of relatedness between things according to semantic evidence. However, strictly speaking, semantic measures evaluate the strength of the semantic interactions between semantic entities according to the analysis of semantic proxies (texts, ontologies), nothing more. Thus, not all measures aim at mimicking human appreciation of similarity. In some cases, designers of semantic measures only aim to compare elements according to the information defined in a semantic proxy, no matter if the results produced by the measure correlate with human appreciation of semantic similarity/relatedness. This is, for instance, often the case in the design of semantic measures based on domain-specific ontologies. In these cases, the ontology can be associated to our understanding of the world, or a domain, and the semantic measure can be regarded as our capacity to take advantage of this knowledge to compare things. The aim, therefore, is to be coherent with the knowledge expressed in the considered semantic proxy, without regards to the coherence of the modelled knowledge. As an example, a semantic measure based on an ontology built by animal experts would not consider the two concepts Sloth and Monkey to be similar, even if most people think sloths are monkeys. Given that semantic measures aim at comparing things according to their meaning captured from semantic evidence, it is difficult to further define the notion of semantic measures without defining the concepts of Meaning and Semantics. Though risking the disappointment of the reader, this section will not face the challenge of demystifying the notion of Meaning. As stressed by Sahlgren (2006) “Some 2000 years of philosophical controversy should warn us to steer well clear of such pursuits”. The reader can refer to the various theories proposed by linguists and philosophers. In this contribution, we only consider that we are dealing with the notion of semantic meaning proposed by linguists: how meaning is conveyed through signs or language. Regarding the notion of semantics, it can be defined as the meaning or interpretation of any lexical units, 12 As an example, considering three benchmarks, Schwartz and Gomez (2011) observed 73% to 89% human interagreement between scores of semantic similarity associated to pairs of words. 13 Given that nowadays smartphones are kinds of computers and very different to the first communication devices. 14 Despite some hesitations and interrogations regarding the notion of (semantic) similarity, it is commonly admitted that the notions related to similarity make sense. However, there are numerous examples of authors who question their relevance, e.g. “Similarity, ever ready to solve philosophical problems and overcome obstacles, is a pretender, an impostor, a quack.”(Goodman, 1972) or “More studies need to performed with human subjects in order to discover whether semantic distance actually has any meaning independent of a particular person, and how to use semantic distance in a meaningful way” (Delugach, 1993), refer also to the work of Murphy and Medin (1985); Goldstone (1994b); Hahn and Ramscar (2001). 1.2. FROM SIMILARITY TOWARDS SEMANTIC MEASURES 9 linguistic expressions or instances which are semantically characterised according to a specific context. We further generally define the notion of semantic measure by the following definition: Definition: Semantic measures are mathematical tools used to estimate the strength of the semantic relationship between units of language, concepts or instances, through a (numerical) description obtained according to the comparison of information supporting their meaning. It is important to stress the diversity of the domain (in a mathematical sense) in which semantic measures can be used. They can be used to drive word-to-word, concept-to-concept, text-to-text or even instance-to-instance comparisons. In this book, when we do not focus on a specific type of measure, we will refer, as much as possible, to any element of the domain of measures through the generic term element – which refers to semantic entities or entities semantically characterised. It can therefore be any unit of language (e.g. word, text), a concept/class, an instance which is semantically characterised in an ontology (e.g., gene products, ideas, locations, persons). We formally define a semantic measure as a function: σk : Ek × Ek → R+ (1.4) with Ek the set of elements of type k ∈ K and K, the various types of elements which can be compared regarding their semantics, e.g., K = {words, concepts, sentences, texts, webpages, instances annotated by concepts. . . }. This expression can be generalised so as to take into account the comparison of different types of elements. This could be interesting to evaluate entailment of texts or to compare words and concepts, among others. However, here, we restrict our study to the comparison of pairs of elements of the same nature (a domain of study which is already a vast subject of research)15 . In addition, the co-domain of the function σk could also be relaxed to consider measures which produce results defined into more complex scales, e.g. discrete or bipolar scales. For convenience we focus on measures which are defined in R+ . We stress that semantic measures must implicitly or explicitly take advantage of semantic evidence. As an example, as we have said, measures comparing words through their syntactical similarity cannot be considered as semantic measures; recall that semantics refers to evidence regarding the meaning of compared elements. The distinction between approaches that can and cannot be assimilated to semantic measures is sometimes narrow; there is no clear boundary distinguishing non-semantics to semantic-augmented approaches, but rather a range of approaches. Some explanations can be found in the difficulty of clearly characterising the notion of meaning. For instance, someone can say that measures used to evaluate the syntactical distance between words capture semantic evidence related to the meaning of the words. Indeed, the sequence of characters associated to a word derives from its etymology which is sometimes related to its meaning, e.g., words created through morphology derivation such as subset from set. Therefore, the notion of semantic measure is sometimes difficult to distinguish from measures used to compare specific data structures. This fine line can also be explained by the fact that some semantic measures compare elements which are represented through canonical forms corresponding to specific data structures for which specific (non-semantic) similarity measures have been defined. As an example, units of language represented as vectors can be compared using vector similarity measures, or pure graph similarity measures can be used to compare entities defined into semantic graphs. In some cases, the semantics of the measure is therefore not captured by the measure used to compare the canonical forms of the elements. It is rather the process of mapping an element (e.g., word, concept) from a semantic space (text, ontology) to a specific data structure (e.g., vector, set), which semantically enhances the comparison. This, however, is an interesting paradox, the definition of the rigorous semantics of the notion of semantic measure is hard to define. However, an important aspect to underline is that, over the years, semantic measures have been studied through various notions and not always in rigorous terms, i.e. using a well-defined terminology. Some definitions are even still subject to debate and not all communities agree on the semantics carried by the terminology they use – the notions which are commonly used in the literature to refer to semantic measures are: semantic similarity, semantic relatedness, semantic distance, taxonomic distance, semantic dissimilarity, conceptual distance, etc. These notions can have different meanings depending on the 15 Note however, that semantic measures for the comparison of units of language of different sizes are also studied in the literature, e.g. to compare the meaning carried by sentences and paragraphes. For more information the reader can refer to the notion of cross-level semantic similarity (Jurgens et al., 2014). 10 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES communities and/or the authors which refer to them. This highlights the difficulty to define and reduce these notions into formal mathematical frameworks. We propose to clarify the definitions considered in this book. Semantic relatedness and semantic similarity Among the various notions associated to semantic measures, this section defines the two central notions of semantic relatedness and semantic similarity, which are among the most commonly referred to in the literature. Several authors have already distinguished them in different communities, e.g., (Resnik, 1999; Pedersen et al., 2007). Based on these works, we propose the following definitions. Definition Semantic relatedness: the strength of the semantic interactions between two elements with no restrictions on the types of the semantic links considered. Note that compared to the general definition of semantic measure, the notion of interaction used to define semantic relatedness refers to a positive value, i.e. the more two elements interact the more related they will be considered. As an example, compared to semantic relatedness, semantic distance refers to the degree of repulsion between the two compared elements. Definition Semantic similarity: subset of the notion of semantic relatedness only considering taxonomic relationships in the evaluation of the semantic interaction between two elements. In other words, semantic similarity measures compare elements regarding the constitutive properties they share and those which are specific to them. The two concepts Tea and Cup are therefore highly related despite the fact that they are not similar: the concept Tea refers to a Drink and the concept Cup refers to a Vessel. Thus, the two concepts share few of their constitutive properties. This highlights a potential interpretation of the notion of similarity, which can be understood in term of substitution, i.e., evaluating the implication to substitute the compared elements: Tea by Coffee or Tea by Cup. In some specific cases, communities such as linguists will consider a more complex definition of the notion of semantic similarity for words. Indeed, word-to-word semantic similarity is sometimes evaluated not only considering (near-)synonymy, or the lexical relations which can be considered as equivalent to the taxonomic relationships for words, e.g., hyponymy and hypernymy or even troponymy for verbs. In some contributions, linguists also consider that the estimation of the semantic similarity of two words must also take into account other lexical relationships, such as antonymy (Mohammad and Hirst, 2012a) – different definitions of the notion of semantic similarity can be found in the literature. In other cases, the notion of semantic similarity refers to the approach used to compare the elements, not the semantics associated to the results of the measure. As an example, designers of semantic measures relying on ontologies sometimes use the term semantic similarity to denote measures based on a specific type of semantic relatedness which only considers meronymy, e.g., partial ordering of concepts defined by partWhole relationships. The semantics associated to the scores of relatedness computed from such restrictions differs from semantic similarity.16 In this book, for the sake of clarity, we consider that only taxonomic relationships are used to estimate the semantic similarity of compared elements. Older contributions related to semantic measures do not stress the difference between the notions of similarity and relatedness. The reader must therefore understand that in the literature, authors sometimes introduce semantic similarity measures which estimate semantic relatedness and vice versa. In addition, despite the fact that the distinction between the two notions is now commonly admitted by most communities, it is still common to observe improper use of both notions. Extensive terminology refers to the notion of semantic measures and contributions related to the domain often refer to the notions of semantic distance, closeness, nearness or taxonomic distance, etc. The following subsection proposes to clarify the semantics associated to the terminology which is commonly used in the literature. 16 Nevertheless, as we will see, technically speaking, most approaches defined to compute semantic similarities based on ontologies can be used on any restriction of semantic relatedness considering a type of relationship which is transitive, reflexive and antisymmetric. 1.2. FROM SIMILARITY TOWARDS SEMANTIC MEASURES 11 Figure 1.1: Informal semantic graph of the terminology related to semantic measures. It structures various types of semantics which have been associated to semantic measures in the literature. Black (plain) relationships correspond to taxonomic relationships, inverse relationships refer to the semantic interpretation associated to the score of the measure, e.g., semantic similarity and dissimilarity measures have inverse semantic interpretations The diversity of types of semantic measures We have so far introduced the broad notion of semantic measures and have also distinguished the two central notions of semantic relatedness and semantic similarity. Extensive terminology has been used in the literature to refer to the notion of semantic measure. Thus, we here define the meaning of the terms commonly used (the list may not be exhaustive): • Semantic relatedness, sometimes called proximity, closeness, nearness, or attributional similarity (Turney and Pantel, 2010) ; refers to the notion introduced above. • Semantic similarity has also already been defined. In some cases, the term taxonomic semantic similarity is used to stress the fact that only taxonomic relationships are used to estimate the similarity.17 • Semantic distance is generally considered as the inverse of semantic relatedness, and all semantic interactions between the compared elements are considered. These measures respect (for the most part) the mathematical properties of distances which will be introduced later. Semantic distance is also sometimes denoted as farness. • Semantic dissimilarity is understood as the inverse of semantic similarity. • Taxonomic distance also corresponds to the semantics associated to the notion of dissimilarity. However, these measures are expected to respect the properties of distances. Figure 1.1 presents a graph in which the various notions related to semantic measures are (informally) structured through semantic relationships. Most of the time, the notion considered to be the inverse of semantic relatedness is denoted as semantic distance, whether or not the measure respects the mathematical properties characterising a distance. Therefore, for the purpose of organising the different notions, we introduce the term semantic unrelatedness to denote the set of measures whose semantics is the inverse to the one carried by semantic relatedness measures, without necessarily respecting the properties of a distance. To our knowledge, this notion has never been used in the literature. 17 Sometimes the notions of attributional or relational similarities are used to refer to semantic similarity (Baroni and Lenci, 2010). 12 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES 1.2.3 From distance and similarities to semantic measures Are semantic measures mathematical measures? What are the specific properties of a distance or a similarity measure? Do semantic similarity measures correspond to similarity measures in the way mathematicians understand them? As we have seen in Section 1.2.2, contributions related to semantic measures do not rely on formal definitions of the notion of measure or distance. Indeed, contributions related to semantic measures generally rely on the commonly admitted and intuitive expectations regarding these notions, i.e. similarity (resp. distance) must be higher (resp. lower) the more (resp. less) the two compared elements share commonness18 . However, the notions of measure and distance have been rigorously defined in Mathematics through specific axioms from which particular properties derive. These notions have been expressed for well-defined objects (element domain). Several contributions rely on these axiomatic definitions and interesting results have been demonstrated according to them. This section briefly introduces the mathematical background related to the notions of distance and similarity. It will help us to rigorously define and better characterise semantic measures in mathematical terms; it is a prerequisite to clarify the fuzzy terminology commonly used in studies related to semantic measures. For more information on the definition of measures, distance and similarity, the reader can refer to: (i) the seminal work of Deza and Deza (2013) – Encyclopedia of Distances, (ii) the work of Hagedoorn (2000)– A theory of similarity measures, Chapter 2, and (iii) the definitions proposed by D’Amato (2007). Most of the definitions proposed in this section have been formulated based on these contributions. Therefore, for convenience, we will not systematically refer to them. In addition, contrary to most of the definitions presented in these works, here we focus on highlighting the semantics of the various definitions according to the terminology introduced in Section 1.2.2. Distance and similarity in Mathematics For the definitions presented hereafter, based on D’Amato (2007), we consider a set D which defines the elements of the domain we want to compare and a totally ordered set (V, ). We also consider the element minV as the element of V such as ∀v ∈ V : minV  v, maxV ∈ V such as ∀v ∈ V : v  maxV ; and 0V ∈ V such as minV  0V  maxV .19 Definition Distance: a function dist : D × D → V is a distance on D if, ∀x, y ∈ D, the function is: • Non-negative, dist(x, y)  0V . • Symmetric, dist(x, y) = dist(y, x). • Reflexive dist(x, x) = 0V and ∀y ∈ D ∧ y 6= x : dist(x, x) ≺ dist(x, y). To be considered as a distance in a metric space, the distance must additionally respect two properties: • The identity of indiscernibles also known as strictness property, minimality or self-identity, that is dist(x, y) = 0V iff x = y. • The triangle inequality, when V ⊆ R, the distance between two points must be the shortest distance along any path: dist(x, y) ≤ dist(x, z) + dist(z, y). Despite the fact that some formal definitions of similarity have been proposed, e.g., (Hagedoorn, 2000; Deza and Deza, 2013), contrary to the notion of distance, there is no axiomatic definition of similarity that sets the standard; the notion appears in different fields of Mathematics, e.g., figures with the same shape are denoted similar (in geometry), similar matrices are expected to have the same eigenvalues, etc. In this book, we consider the following definition. Definition Similarity: a function sim : D × D → V is a similarity on D if, for all x, y ∈ D, the function sim is non-negative (sim(x, y)  0V ), symmetric (sim(x, y) = sim(y, x)) and reflexive, i.e., sim(x, x) = maxV and ∀x, y ∈ D ∧ y 6= x : sim(x, x)  sim(x, y). 18 The works of D’Amato (2007) and Blanchard et al. (2008) are among the exceptions. different definitions of V could be V = R, V = [0, 1], V = {very low, low, medium, high, very high}. 19 E.g. 1.2. FROM SIMILARITY TOWARDS SEMANTIC MEASURES 13 Definition Normalised function: any function f on D (e.g. similarity, distance) with values in [0, 1]. Notice that a normalised similarity sim can be transformed into a distance dist considering multiple approaches; inversely, a normalised distance can also be converted into a similarity. Some of the approaches used for such transformations are presented in (Deza and Deza, 2013, Chapter 1). As we have seen, distance and similarity measures are formally defined in mathematics as functions with specific properties. These properties are extensively used to demonstrate results and to develop proofs. However, the benefits of fulfilling some of these properties, e.g., triangle inequality for distance metric, have been subject to debate among researchers. As an example, Jain et al. (1999) stress that the mutual neighbour distance used in clustering tasks doesn’t satisfy the triangle inequality but perform well in practice – to conclude by “This observation supports the viewpoint that the dissimilarity does not need to be a metric”. Another example is the semantic measure proposed by Resnik for comparing concepts defined in a taxonomy20 (Resnik, 1995). This measure does not respect the identity of the indiscernibles, the similarity of a concept to itself can even be low when general concepts are evaluated. However, despite the fact that this property may seem counter-intuitive, this measure has proved to perform well in several usage contexts. This highlights the gap which often exists between (i) formal definitions of measures which are based on axiomatic definitions and rigid expectations of well-defined properties and (ii) results provided by empirical evaluations which sometimes challenge the benefits of respecting specific properties characterising measures. A large number of properties which are not presented in this section have been distinguished to further characterise distance or similarity functions, e.g., see (Deza and Deza, 2013). These properties are important and needed for theoretical proofs. However, as we have seen, the definition of semantic measures proposed in the literature is not framed in the mathematical axiomatic definitions of distance or similarity. In some cases, such a distortion among the terminology creates difficulties in bridging the gap between the various communities involved in the study of semantic measures and similarity/distance. As an example, in the Encyclopedia of distances, Deza and Deza (2013) do not distinguish the notions of distance and dissimilarity, which is the case in the literature related to semantic measures (refer to Section 1.2.2). In this context, the following section defines the terminology commonly adopted in the study of semantic measures w.r.t the mathematical properties already introduced. Flexibility of semantic measures Notice that we have not introduced the precise and technical mathematical definition of a measure proposed by measure theory. This can be disturbing considering that this manuscript extensively refers to the notion of semantic measure. The notion of measure we use is indeed not framed in the rigorous mathematical definition of measure. Such a definition would exclude many semantic measures defined in the literature. The notion of measure considered in this book therefore refers to the common sense of the term measure, any “measuring instruments” which can be used to “assess the importance, effect, or value of (something)” (Oxford Dict., 2012) – in our case, any functions answering the definitions of semantic distance/relatedness/similarity/etc. proposed in Section 1.2.2. Various communities have used the concepts of similarity or distance without considering the rigorous axiomatic definitions proposed in mathematics but rather using their broad intuitive meanings21 . To be in accordance with most contributions related to the field, and to facilitate the reading of this book, we will not limit ourselves to the mathematical definitions of distance and similarity. The literature related to semantic measures generally refers to a semantic distance as any (nonnegative) function, designed to capture the inverse of the strength of the semantic interactions linking two elements. Such functions must respect that: the higher the strength of the semantic interactions between two elements, the lower their distance. The axiomatic definition of a distance (metric) may not be respected. A semantic distance is, most of the time, what we define as a function estimating semantic 20 The measure will be introduced gradually in Chapter 3 – for the interested reader the similarity between two concepts u, v is defined by sim(u, v) = IC(M ICA(u, v)) with IC(x) the specificity of the concept x which is defined as the inverse of the logarithm of the probability of occurrence of a concept in a corpus of texts, i.e. −log(p(x)) and M ICA(u, v) the common ancestor of u and v which is the most specific, i.e. the common ancestor with the maximal IC. 21 As we have seen, researchers in cognitive science have demonstrated that human expectations regarding (semantic) distance challenges the mathematical axiomatic definition of distance. Thus, the communities involved in the definition of semantic measures mainly consider a common vision of these notions without always clearly defining their mathematical properties. 14 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES Properties Non-negative Symmetric Reflexive Normalised Identity of indiscernibles Triangle inequality (V ⊆ R) Definitions dist(x, y)  0V dist(x, y) = dist(y, x) dist(x, x) = 0V V = [0, 1] dist(x, y) = 0V iff x = y dist(x, y) ≤ dist(x, z) + dist(z, y) Table 1.1: Properties which can be used to characterise any function which aims to estimate the notion of distance between two elements. Refer to the notations introduced page 12. Properties Non-negative Symmetric Reflexive Normalised Identity of indiscernibles Integrity Definitions sim(x, y)  0V sim(x, y) = sim(y, x) sim(x, x) = maxV V = [0, 1] sim(x, y) = maxV iff x = y sim(x, y)  sim(x, x) Table 1.2: Properties which can be used to characterise any function which aims to estimate the notion of similarity/relatedness between two elements. Refer to the notations introduced page 12. unrelatedness. However, to be in accordance with the literature, we will use the term semantic distance to refer to any function designed to capture semantic unrelatedness. We will explicitly specify that the function respects (or does not respect) the axiomatic definition of a distance (metric) when required. Semantic relatedness measures are functions which are associated to an inverse semantics of the one associated to semantic unrelatedness: the higher the strength of the semantic interactions between two elements, the higher the function will estimate their semantic relatedness. The terminology we use (distance, relatedness, similarity) refers to the definitions presented in Section 1.2.2. To be clear, the terminology refers to the semantics of the functions, not their mathematical properties. However, we further consider that semantic measures must be characterised through mathematical properties. Table 1.1 and Table 1.2 summarise some of the properties which can be used to formally characterise any function designed in order to capture the intuitive notions of semantic distance and relatedness/similarity. These properties will be used in this book to characterise some of the measures that we will consider. They are essential to further understand the semantics associated to the measures and to distinguish semantic measures which are adapted to specific contexts and usage. 1.3 Classification of semantic measures We have seen that various mathematical properties can be used to characterise technical aspects of semantic measures. This section distinguishes other general aspects which may be interesting to classify semantic measures. They will be used to introduce the large diversity of approaches proposed in the literature. First we present some of the general aspects of semantic measures which can be relevant for their classification, and subsequently introduce two general classes of measures. 1.3.1 How to classify semantic measures The classification of semantic measures can be made according to several aspects; we propose to discuss four of them: 1. The type of elements that the measure aims to compare. 2. The semantic proxies used to extract the semantics required by the measure. 3. The semantic evidence and assumptions considered during the comparison. 4. The canonical form adopted to represent an element and how to handle it. 1.3. CLASSIFICATION OF SEMANTIC MEASURES 15 Types of elements compared: words, concepts, instances, etc. Semantic measures can be used to compare various types of elements: • Units of language: words, sentences, paragraphs, documents. • Concepts/Classes, groups of concepts. • Semantically characterised instances. Semantic measures can therefore be classified according to the type of elements they aim to compare. Semantic proxies from which semantics is distilled Semantic measures require a source of information to compare two semantic entities. It will be used to characterise compared elements and to extract the semantics required by the measure. Definition Semantic proxy: any source of information from which indication of the semantics of the compared elements, which will be used by a semantic measure, can be extracted. Two broad types of semantic proxies can be distinguished: • Unstructured or semi-structured texts: Text corpora, controlled vocabularies, dictionaries. • Structured: ontologies, e.g., thesaurus, structured vocabularies, taxonomies. Semantic evidence and considered assumptions Depending on the semantic proxy used to support the comparison of elements, various types of semantic evidence can be considered. The nature of this evidence conditions the assumptions associated to the measure. Definition Semantic evidence: any clue or indication based on semantic proxy analysis from which, often based on assumptions, a semantic measure will be based. As an example, considering the measures which rely on text analysis, we have already mentioned that the proximity or relatedness of terms can be assessed considering that pairs of terms which co-occur frequently are more related. In this case, the co-occurrence of words is considered as semantic evidence; its interpretation is governed by the assumption that relatedness of terms is a function of their degree of co-occurrence. Canonical forms used to represent compared elements The canonical form (representation) chosen to process a specific element can also be used to distinguish the measures defined for comparing a specific type of element. Since a canonical form corresponds to a specific reduction of the element, the degree of granularity with which the element is represented may highly impact the analysis. The selected canonical form is of major importance since it influences the semantics associated to the score produced by a measure, that is to say, how a score must/can be understood/interpreted. This particular aspect is essential when inference must be driven from scores produced by semantic measures. It is therefore important to stress that a semantic measure is defined to process a given type of element which is represented through a specific canonical form. 16 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES 1.3.2 A general classification of semantic measures Figure 1.2 presents a partial overview of the landscape of semantic measures which can be used to compare various types of semantic entities (e.g. words, concepts, instances). It summarizes one of the classifications of semantic measures which can be proposed. As we have seen, measures can first be classified based on the elements they can compare. Based on this aspect, we distinguish two main types of measures: • Corpus-based measures used to compare units of language, concepts or instances from text analysis, i.e. unstructured semantic proxies. These measures are generally used to compare words or more generally units of language. However, they can also be adapted for comparing concepts or instances by considering that disambiguation techniques have been used to identify concept or instance denotations in texts. • Knowledge-based measures which are designed for comparing entities defined in ontologies, i.e. structured semantic proxies. Knowledge-based measures can also be used to compare units of language, e.g., sentences or texts, for instance by considering that disambiguation techniques have been used for establishing bridges between texts and ontologies. Hybrid strategies can also be defined mixing both distributional and knowledge-based measures. Nevertheless, in the literature, measures are generally defined for comparing a specific type of elements: units of language or entities defined in an ontology. Therefore, classifying measures based on the elements they compare and the semantic proxy which is used in the analysis, i.e. texts or ontologies (knowledge representation system), helps to distinguish the general types of measures which have been proposed. These measures are based on different semantic evidence and assumptions which are used to capture the semantics of compared elements, e.g. the distributional hypothesis, intentional or extensional evidence expressed into ontologies. Based on these evidence and assumptions, a model is defined for comparing two elements – such a model is generally denoted a semantic measure. Various specific types of approaches have been proposed for distributional and knowledge-based measures, Figure 1.2 structures several broad categories. Depending on the strategy which is used for defining the measure and the evidence and assumptions which are considered, the semantics of the measure, i.e. the meaning which can be associated to the scores it produces, may vary. This chapter has introduced the notion of semantic measures. We have presented their practical usages in different application contexts, general definitions associated to the notion have been proposed, and different semantics which can be associated to them have been distinguished. This latter point helped us to better capture the meaning of semantic measures (results). To this end, we define the terminology classically found in the literature, e.g., semantic similarity/proximity/relatedness/distance, and we proposed an organisation of the notions commonly used, e.g. semantic similarity is a component of semantic relatedness. In a second step, to better understand the characteristics of semantic measures, we distinguished several central aspects of measures which can be used to categorising the large diversity of measure proposals. As a result, a general classification of the variety of semantic measures defined in the literature has been presented. Such a classification highlights the similarities and differences of the numerous measures and approaches which have been proposed in the literature. It can therefore be used to better understand the large diversity of measures and to characterise areas of research which have not been explored for designing measures. Importantly, this overview of semantic measures and the proposed classification also stresses the breadth of this field of study and the difficulty to define the notions on which are based semantic measures, e.g., semantic relatedness and semantic similarity. The two following chapters are dedicated to an in-depth introduction to both corpus-based and knowledge-based semantic measures. 1.3. CLASSIFICATION OF SEMANTIC MEASURES 17 Figure 1.2: Partial overview of the landscape of the types of semantic measures which can be used to compare various types of elements (e.g., words, concepts, instances) (Harispe et al., 2013b) 18 CHAPTER 1. INTRODUCTION TO SEMANTIC MEASURES Chapter 2 Corpus-based semantic measures 2.1 From text analysis to semantic measures Corpus-based semantic measures enable the comparison of units of language from the analysis of unstructured or semi-structured texts. They are more generally used to compare words, sentences or texts based on NLP techniques which most often only rely on statistical analysis of word usage in texts, e.g. based on the analysis of word (co-)occurrences and the linguistic contexts in which they occur. As we will see in this chapter, corpus-based measures cannot most of the time be reduced to single mathematical formulae. They rather refer to complex pipelines of treatments which are used (i) to extract the semantics of compared units of language, to further (ii) compare these units by analysing their semantics. To this end, corpus-based semantic measures take advantage of a large variety of NLP and information retrieval algorithms – which makes corpus-based semantic measures a broad field of study at a crossroad between several domains, in particular computational linguistics and information retrieval. Corpus-based measures are often denoted distributional measures in the literature (Mohammad and Hirst, 2012a). This is to stress that most measures are explicitly or implicitly based on the distributional hypothesis – a central hypothesis of distributional semantics which states that words occurring in similar contexts convey similar meaning (Harris, 1981). Nevertheless, like Mihalcea et al. (2006) and other authors, we here adopt the more general denotation of corpus-based semantic measures. This is to ease the introduction of the variety of measures which are based on corpus or natural language analysis, including those for which the distributional hypothesis is not considered to be the root of the approach. That is the case for measures which are based on the analysis of results provided by information retrieval systems. To stress this point, different classifications of semantic measures based on text analysis have been proposed in the literature, e.g. (Mihalcea et al., 2006; Panchenko, 2013). The one which has been adopted in this chapter is among the most used. In addition, even if this reflection is out of the scope of this book and will therefore not be discussed hereafter, evidence indicate that all corpus-based semantic measures are somehow implicitly or explicitly defined into the framework of distributional semantics (which will be introduced in this chapter). Much of the literature related to corpus-based measures focuses on the comparison of a pair of words; extensive surveys have been proposed by Weeds (2003); Curran (2004); Sahlgren (2008); Dinu (2011); Mohammad and Hirst (2012a); Panchenko (2013). Several contributions have also been proposed to compare larger units of language such as pairs of sentences or texts, e.g. (Corley and Mihalcea, 2005; Yu et al., 2006; Hughes and Ramage, 2007; Ramage et al., 2009; Buscaldi et al., 2013). However, most of these latter measures are extensions of measures which have been defined for comparing words, or rely on approaches which are also used to compare words, e.g. topic models such as Latent Semantic Analysis (Lintean et al., 2010) or Latent Dirichlet Allocation (Blei et al., 2003). Therefore, for the sake of clarity and due to space constraint, this chapter mainly introduces semantic measures which have been defined for comparing words. We will not present measures which can be used to compare texts or sentences1 . Generally speaking, corpus-based semantic measures are based on a strategy which will be used to capture the meaning of a word – this meaning is often regarded as a function of its usage in a semantic 1 A large literature is dedicated to the subject. As an introduction to the field the reader may refer to the broad overview of measures provided by Achananuparp et al. (2008). We also encourage the reader to take an interest to the central notion of compositionality which is essential in order to adapt models commonly used for assessing the similarity of words in order to process units of language larger than words (Kamp et al., 2014). 19 20 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES space built from a corpus of texts. Depending on the strategy which is adopted to (i) characterise the meaning of a word, and to (ii) represent the semantic space in which this meaning is defined, a specific canonical form will be selected to represent a word. This canonical form corresponds to a data structure which is expected to encompass evidence of the meaning of the word. It can be regarded as the second proxy layer from which the meaning of a word will be processed – the first one being the natural language under study. This representation will be of major importance for defining corpus-based semantic measures. It enables the meaning of words to be processed by algorithms and therefore enables words to be compared based on the comparison of their respective canonical forms. Despite the fact that corpus-based semantic measures are most often complex processes composed of multiple algorithms, four main components characterise the definition of a strategy for assessing the semantic similarity of words2 : 1. A premise on what the meaning of a word is. 2. A set of assumptions which defines the semantic evidence convey by natural language from which the meaning of a word can be captured. 3. A representation of a word such as (most of) its meaning – as defined in 1 and captured by the semantic evidence defined in 2 – can be processed by algorithms. In some cases, this is a two-step process as a representation of the whole semantic space will first be defined to next extract a specific canonical form of a word. 4. An algorithm or mathematical function specifically designed for comparing two word representations. All corpus-based semantic measures defined in the literature differ regarding the strategies which have been adopted to implement each of these components – mainly components 2, 3 and 4. The premise which defines the meaning of a word (Component 1) directly impacts the choice of (i) the semantic evidence which will be used to define the representation of a word and (ii) the approach which will be used to compare these representations. Nevertheless, this aspect is not always discussed when measures are defined. As we will see, the meaning of a word is generally considered to be a function of its usage – according to the distributional hypothesis. Note also that the comparison of two words representations (Component 4) has, technically speaking, no direct relationship with semantic analysis. Indeed, this step mainly refers to the definition or the use of mathematical functions or algorithms for comparing data structures. In some cases, this step corresponds to the definition of ad hoc functions used to compare complex representations of words. However, in most cases, words are represented using well-known mathematical objects (e.g. sets, vectors, probability distributions, nodes in graphs). In these cases, state-of-the-art measures defined for comparing these mathematical objects are used, regardless of the semantics carried by these objects. Figure 2.1 presents a general and conceptual overview of the various steps which can be used for defining corpus-based measures. Most of the approaches proposed in the literature can be break up into some of these steps. Each of these steps will be presented in this chapter and we will show how they can be combined in order to assess the semantic relatedness of words. Below, the five steps presented in Figure 2.1 are introduced: 1. The semantic proxy which is used is a corpus of unstructured or semi-structured texts, for instance retrieved from the Web. This corpus can be preprocessed depending on the strategy which is used for defining the measure. Such a preprocessing can involve, among others: stemming/lemmatization, Part-Of-Speech (POS) tagging, and removal of specific words, e.g. stop words – in some cases the study focuses on specific POS such as nouns or verbs. 2. At this stage, the vocabulary is distinguished, almost always implicitly. It contains all the words for which the measure will be able to compute a score of relatedness. Note that the notion of words may refers to a set of lemma or to complex objects such as a set of pairs hlemma, POSi for instance. 2 Note that these components are found in all the approaches which can be used for comparing units of language (e.g., sentences, texts). 2.1. FROM TEXT ANALYSIS TO SEMANTIC MEASURES 21 Figure 2.1: General process commonly adopted for the definition of corpus-based semantic measures. 3. Based on the (preprocessed) corpus and the vocabulary considered, a model is next built. It will be used to characterise all the words of the vocabulary under study. This model is generally a matrix which represents each word of the vocabulary using a set of contexts. As we will see, most of the diversity of measures can be explained by the variety of strategies which have been proposed to build such a model. The construction of this model is based on a set of assumptions regarding (i) the meaning of words and (ii) the semantic evidence which can be used for evaluating this meaning. As an example, the model can be a word to word co-occurrence matrix considering that two words co-occur if they appear in a word window of a specified size. In some cases syntactic patterns are used to study word co-occurrences. In other cases, using an information retrieval system, the model can also be a word-document matrix which specifies the relevant documents w.r.t a given word. At this stage, a raw model is built. Some transformations can be applied on it; we distinguish the phase of refinement and the phase of reduction: • The refinement refers to the treatments which are used to improve the model by incorporating additional information extracted from the corpus under study. As an example, some of the approaches incorporate corpora statistics to take into account the informativeness of specific 22 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES words, e.g. by taking into account term frequency. • The reduction refers to the use of specific techniques for reducing the potentially high dimensionality of the matrix. Note that this matrix is generally sparse as most of the words never co-occur in the same contexts. This step generally involves specific matrix processing and reduction techniques such as Singular Value Decomposition (SVD) (Berry et al., 1995; Golub and Van Loan, 2012) – these approaches will be briefly introduced later. 4. The transformation step aims at obtaining the general model, here denoted semantic model, which will be analysed for comparing the words. In some cases the semantic model, originally represented as a matrix, will be transformed into a graph representation. Therefore, interestingly, a bridge can be established between corpus-based and knowledge-based measures which will be discussed in detail in Chapter 3. Indeed, some of the strategies represent the semantic space using well-known knowledge representation models. As an example, it has been proposed to build semantic networks or referential networks from dictionaries and thesauruses to further compare words according to the strength of their interconnections in the semantic network, e.g. (Nitta, 1988; Kozima and Furugori, 1993; Niwa and Nitta, 1994; Kozima and Ito, 1997; Blondel, 2002; Ho and Cédrick, 2004; Iosif and Potamianos, 2012). This kind of approaches will be discussed in Chapter 3 which is dedicated to knowledge-based measures. 5. Finally, two words can be compared analysing the semantic model which has been defined. Once again a large variety of measures can be used depending on the representation of a word the model enables. However, despite the diversity of measures proposed in the literature, two general approaches for defining corpus-based measures can be distinguished: • Distributional measures: semantic measures based on distributional semantic models (Baroni and Lenci, 2010) and the distributional hypothesis (Harris, 1981). • Other types of measures: measures based on approaches which do not explicitly rely on the distributional hypothesis, e.g. approaches based on information retrieval systems. These two approaches are presented in this chapter. However, we will mainly focus on distributional measures as they are both the most studied and the most used in the literature. Let us remind that the measures which rely on a graph-based representation of the semantic model will be presented in the chapter dedicated to knowledge-based measures (Chapter 3). The aim of this chapter is not to introduce the extensive list of corpus-based measures which have been proposed in the literature. It is rather to present the central notions on which corpus-based measures rely. Therefore, a large portion of this chapter is dedicated to the introduction of the key notions of context and semantic model. Several examples of context and semantic model definitions will be illustrated. We next present several examples of measures which can be used to take advantage of these context and semantic model definitions for designing semantic measures. The reader must indeed understand that the central aspect of corpus-based semantic measures relies in the definition of the semantic model from which will be extracted the processable representation of a word. Indeed, next, the definition or use of a measure for comparing two word representations is most often only a matter of a technical discussion on mathematical formulae dedicated to the comparison of specific data structures - e.g., vectors, sets. The remainder of this chapter is organised as follow. After a brief introduction of what it is generally understood by word meaning, Section 2.2 presents several types of semantic evidence which can be extracted from natural language for assessing the similarity of words or more generally for assessing the similarity of two units of language. In this section, important concepts related to corpus-based measures will be introduced, e.g. distributional semantics, the distributional hypothesis, the notion of context. Section 2.3 presents several proposals of distributional measures. Section 2.4 briefly introduces the other types of measures which have been proposed in the literature. Section 2.5 discusses the advantage and limits of corpus-based measures. Finally, Section 2.6 concludes the chapter. 2.2. SEMANTIC EVIDENCE OF WORD SIMILARITY IN NATURAL LANGUAGE 2.2 23 Semantic evidence of word similarity in natural language In this section we first briefly discuss the notion of word meaning to further introduce semantic evidence which is commonly used to compare words from natural language analysis. In particular, we introduce the two structural relationships which can be studied between words, namely paradigmatic and syntagmatic relationships. 2.2.1 The meaning of words The notions of meaning and semantics have been extensively discussed by numerous communities, e.g. (Osgood, 1952; Aitchison, 2012), and this survey does not aim to propose an in-depth analysis of the different theories proposed so far. Nevertheless, as we saw in Section 2.1, the definition of word meaning directly influences the way semantic measures are defined. Indeed, an accurate measurement technique can only be defined if a clear and non-ambiguous definition of what we want to measure has been defined. However, the notion of semantic similarity or semantic relatedness of words – what we want to measure using corpus-based semantic measures – is generally not defined in the contributions related to semantic measures. The authors generally refer to the intuitive notion of word similarity/relatedness w.r.t their meaning by giving examples of the behaviour expected by measures, e.g. the measure must enable to distinguish that the two words (cup, tea) are more semantically related than the two words (cup, wine)3 . In this context, considering that measures can be evaluated using benchmarks composed of expected results of similarity, finely defining the notion of word meaning may seem unnecessary. This explains that some authors have questioned the relevance to finely characterise the notion of word meaning for assessing the similarity/relatedness of words, e.g. (Karlgren and Sahlgren, 2001; Sahlgren, 2006). The necessity to define what we consider by word meaning for designing word similarity measure is still an open debate. An important point to understand is that most contributions related to corpus-based semantic measures consider semantic relatedness as linguistic relatedness. The meaning of a word is assumed to be directly or indirectly explainable by the sole study of language, independently from both (i) the knowledge of language users and (ii) the environment. Therefore, the notion of linguistic relatedness, commonly denoted semantic relatedness, fall within the domain of Semantics, i.e. the study of language in isolation, and does not refer to the domain of Pragmatics which also incorporates the analysis of the context in which the language is used (Cruse, 2011). As discussed in Sahlgren (2008), this does not mean that linguists do not consider that extralinguistic factors play a role in defining the meaning of language, and therefore that linguistics can for instance be used to compare the meaning of the signified or the referent of a signifier4 – it only means that it is generally considered that ”For a large class of cases – though not for all – in which we employ the word ”meaning” it can be defined thus: the meaning of a word is its use in the language”, i.e. ”meaning is use” (Wittgenstein, 2010), i.e. ”Not the meanings that are in our heads, and not the meanings that are out there in the world, but the meanings that are in the text” (Sahlgren, 2008). Focusing on semantic measures, it rather means that corpus-based measures compare words w.r.t their linguistic meaning, i.e. the meaning of words which can be captured by analysing language in isolation, without regard on the amount of meaning of a word which is explicitly or implicitly conveyed by language. In corpus-based semantic measures words are therefore solely compared w.r.t their usage in texts. Interestingly, the usage of words in texts is assumed to reflect a commonly accepted meaning of words. This central notion relates to some of the early work of Firth: ”The complete meaning of a word is always contextual ” (Firth, 1935). It will be further discussed through the introduction of the distributional hypothesis. Therefore, in the majority of cases, corpus-based measures are assumed to evaluate the distributional relatedness of words: words are considered to be related if they occur in the same context 2.2.2 Structural relationships: Paradigmatic and Syntagmatic An interesting point to note is that a structural vision of language is adopted in most contributions related to corpus-based semantic measures. Structuralism have been developed based on the work of 3 What we did in this book for introducing the notion of semantic similarity and semantic measures. refers to the word, sequence of graphemes (letters), phonetic. The signified refers to the mental representation of a concrete or abstract concept the signifier refer to, and the referent is the concrete object in the real world (Chandler, 2007). 4 Signifier 24 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES Relationships Paradigmatic The A Syntagmatic cat is eating dog was barking Table 2.1: Paradigmatic and syntagmatic relationships. Saussure (1857-1913)5 . Here the natural language is regarded as a sequence of symbols (such as words) with no a priori semantics. These symbols are considered to be structured by two types of relationships: • Paradigmatic relationships. All symbols (e.g. words) are regarded as paradigms which are members of a specific class or semantic group. Paradigms are considered to establish a paradigmatic relationship – or associative relation – if they can be substituted, at least without modifying the grammatical coherence of the sentence. Therefore, a paradigm is generally considered as a set of symbols which refer to a specific class, e.g. verbs or nouns are examples of grammatical paradigms. Therefore, the paradigmatic vision considers a sentence as a sequence of disjunction of paradigms p0 ∨ p1 ∨ p2 ∨ p3 . . . ∨ pi with pi a specific paradigm. As an example, in Table 2.1 the word cat could be replaced by the word dog without implication on the grammatical coherence of the sentence. Note that the notion of class or semantic group which can link the various paradigms is broadly defined in the literature (Booij et al., 2000). It may refer to the lexical category of the syntagm or even to its meaning when classes refer to synonyms, hypo/hypernyms, antonyms.6 • Syntagmatic relationships correspond to the chain of associations of the symbols which compose a sentence, or a larger lexical unit. The selection of specific paradigms and their combination generates a syntagm which traduces the sequence of lexical units related by syntagmatic relationships. This contributes to define the meaning of a sentence. A syntagm is governed by the grammar of the language in use, i.e. the rules which define the coherency of expressing a specific chain of symbols. According the syntagmatic vision, a sentence is regarded as a sequence of conjunction of paradigms of the form p0 ∧ p1 ∧ p2 ∧ p3 . . . ∧ pi with pi a specific paradigm, e.g. the two sentences presented in Table 2.1 correspond to specific chains of paradigms. Paradigmatic analysis refers to the study of specific patterns in texts, in contrast to syntagmatic analysis which will be based on the analysis of a surface representation of the language in which words cooccurrence is a central component. Kozima and Furugori (1993), among others, mention the importance of these two types of structural relationships for discussing the relatedness of words. However, due to the different nature of these relationships, and the different information they convey, some authors have proposed to distinguish the notions of paradigmatic and syntagmatic relatedness (Sahlgren, 2008): • Paradigmatic relatedness refers to the notion of substitutability w.r.t the impact of substituting a word by another, e.g. on the grammatical coherence of a sentence. Indeed, more finely, paradigmatic relatedness of two words can be seen as a function of the impact of substituting two words on the meaning conveyed by a sentence. Paradigmatic relationships between words must therefore be evaluated by means of indirect co-occurrences. As an example, the two synonyms father and dad will not often co-occur, but will rather tend to occur with the same words – this can be captured by analysing second-order co-occurrences or more generally indirect co-occurrences of words. Paradigmatic relatedness is a broad notion. Indeed, the association of specific paradigms in the same semantic group may be justified by a variety of semantic relationships which can be established between paradigms, e.g. hypo/hypernymy, synonymy, antonymy. • Syntagmatic relatedness is mainly captured inside a specific text region by means of words collocation and direct co-occurrence (Kozima and Furugori, 1993), i.e. first-order co-occurrences. As we will see, structuralism and more particularly paradigmatic and syntagmatic relationships are central for the definition of corpus-based semantic measures. 2.2.3 The notion of context The notion of context is central in several natural language analysis. It is of major importance for capturing the meaning of a word through the analysis of syntagmatic and paradigmatic relationships. 5 For more information, the reader may refer to the work of Culler (1986); Adedimeji (2007); De Saussure (1989). the association of specific paradigms into a specific class may be motivated by the notion of semantic relatedness (Booij et al., 2000). 6 Interestingly 2.2. SEMANTIC EVIDENCE OF WORD SIMILARITY IN NATURAL LANGUAGE w0 w1 w2 w3 d0 1 0 1 1 d1 1 1 1 1 d2 0 0 1 0 25 d3 0 0 0 0 Table 2.2: Words represented according to the Vector Space Model (VSM). Indeed, the meaning of a word is generally considered to be understandable only w.r.t a context of use, i.e. according to its usage which is defined through the structural relationships the word establishes. Thus, the notion of context is central to perform structural processing of natural language by analysing paradigmatic and syntagmatic relationships. As an example, first-order co-occurrences of words will be evaluated by studying the syntagmatic relationships between words. Several approaches have been proposed for defining the context of a word. They differ in their linguistic sophistication, algorithmic complexity, reliability, and information they consider (Curran, 2004). A basic approach is to consider the context of a word as the document of the corpus in which the word occurs. Such a definition of context refers to the semantic model on which is based Vector Space Model (VSM) – a widely known model which have been proposed in Information Retrieval to characterising documents w.r.t. the vocabulary which constitutes the corpus (Salton and McGill, 1983; Turney and Pantel, 2010). In VSM a document is considered as a topical unit. It is represented as a vector which highlights the words it contains. In this aim, the corpus is used to derive a semantic model which corresponds to a document-word matrix. A basic example of such a matrix is presented in Table 2.2 – wi refers to the word i and dj to the document j of the corpus. If the word wi occurs in the document dj the cell (wi , dj ) will be filled by the value 1. Based on this model, when a query must be evaluated in order to find the more relevant documents, this is the vector representation of the query which will be evaluated. The information retrieval system will be based on a similarity function which will assess the similarity between the vector-based representation of the query and the vector representation of each document (i.e. the columns of the matrix) – vector comparison techniques will be introduced in Section 2.3, just consider for now that the similarity of two vectors can easily be computed using specific mathematical formulae. Therefore, by considering the transpose of the document-word matrix used in VSM, we can consider that each word is also represented according to a vector representation – the rows of the matrix in Table 2.2, e.g. w0 is represented by the vector [1, 1, 0, 0]. This vector representation of a word highlights the documents in which the word occurs. Thus, considering that vector similarity can be assessed using specific mathematical functions, the semantic relatedness of two words can simply be defined as a function of the similarity of their vector-based representations. More generally, as stressed by Sahlgren (2006) and other authors, we can consider that VSM relies on a semantic model which is a specific expression of a more general approach. Such a general approach does not constrain words to be characterised by documents but enables to build semantic models in which words are analysed w.r.t contexts, e.g. paragraph, sentence, word window – in the case of VSM the semantic model refers to a document-word matrix, the context selected is therefore a document7 . Thus, more generally, a semantic model can be defined as a matrix in which each row i is a vector representation of the word wi , and each dimension of the vector refers to a specific context cn , i.e. the row i provides a vector-based representation of the corresponding word wi with w ~i = (c1 , c2 , . . . , cn ). The notion of context is therefore essential for the definition of semantic measures. It is a core element of the semantic model from which a word will be characterised and represented to further be compared. In this section we introduce the contexts which can be defined for studying word co-occurrences and to build semantic models. We will next discuss how these semantic models can be used for assessing the relatedness of words. Several alternative approaches have been proposed to define processable definitions of context; this section will introduce the two broad types of contexts which can be analysed but will not cover in detail the large literature dedicated to their tuning and to the numerous variants which have been proposed and evaluated. For more information the reader may refer to (Weeds, 2003; Curran, 2004; Sahlgren, 2006) and to the specific contributions which will be introduced hereafter. The notion of context is generally considered according to the type of structural relationships which is studied. Syntagmatic and paradigmatic contexts are therefore commonly distinguished; both types of contexts 7 In some contributions VSM also refer to other models such as distributional models - and may refer to any model in which dimensions of vectors/matrices/tensors are derived from event frequencies (Turney and Pantel, 2010). 26 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES are introduced. Syntagmatic contexts Syntagmatic contexts refer to the study of co-occurrences in sequential ordering of words. Using this approach a specific window size of words will generally be used to define a context, e.g. using a five noun window the word bananas will be analysed by considering contexts such as ”. . . [Monkeys love fruits such as bananas, they are a great healthy food source] for them. . . ” . Considering multiple-words windows enables to not only focus on collocation of words but also to capture words which co-occur considering larger text regions and several words between them. A variety of alternative linguistic constructs can be used to define a syntagmatic context: a sentence, a paragraph, an n-size word window or even a window composed of several characters to mention a few. Different techniques can be used to process a context depending on its definition and on its the tuning: • Contexts which correspond to relatively large text regions such as documents, paragraphs or sentences will generally be analysed by counting the occurrences of each word in each context. This can be used to build a word-context matrix, e.g. a word-document matrix. Such a semantic model can also be used to compute a word co-occurrence matrix if required, e.g., by considering that two words which occur in the same context co-occur. • Contexts which are defined considering shorter text regions, e.g. composed of a window of few words, are generally not used to build word-context matrices. In this case the aim is generally to scan the documents by sliding the predefined window using a specific step, e.g. one word. At each step, the window will be processed by considering a focal word which is generally located at the center of the window, e.g. the word banana in the example presented above. Considering this focal word, the co-occurrences between the focal word and the other words composing the window are analysed. Let us note that, intuitively, the size of the window which is considered will define the sparseness of the co-occurrence matrix since the more a window is narrow the less two words will tend to co-occur. A large variety of approaches and configurations can be adopted to define syntagmatic contexts. Concrete and simple examples of syntagmatic contexts and associated processing are provided in Appendix A. More refined models have also been proposed in the literature. As an example, some authors have proposed to consider directional models based on oriented windows. During the co-occurrence evaluation, these models also take into account the location (left or right) of the words which co-occur with the focal word under study. It has also been proposed to weight co-occurrences according to the distance of the words inside a window. In some cases, the focal word is not located at the center of the window and an asymmetric window is used to evaluate word co-occurrences. Generally, window-based context extractors and more generally strategies based on syntagmatic context analysis benefit of low algorithmic complexity. They are therefore commonly considered as a solution of choice to process large corpora (Curran, 2004). They generally rely on several user defined parameters but have the advantage to be language independent – except specific pre-processing and particular configurations considering oriented windows. Adopting another approach, syntagmatic relationships between words can also be studied defining specific lexical patterns. As an example, for studying co-occurrences between two nouns, particular types of lexical relationships can be analysed, e.g. considering two words w1 and w2 , we can evaluate their co-occurrences by analysing the following patterns: • Hyponymy, Hyperonymy: hw1 ,is a, w2 i, hw1 ,such as, w2 i • Synonymy, Antonymy: hw1 ,or,w2 i • etc. This patterns can be used to define a three dimensional co-occurrence matrix with dimensions (Word1, Word2, Pattern). Such an approach can be used to define semantic model particularly adapted to the design of parametric semantic measures. Indeed, using such model semantic designer can compare words by controlling the importance which is given to each lexical pattern and therefore finely control the semantics of the scores produced by the measure. 2.2. SEMANTIC EVIDENCE OF WORD SIMILARITY IN NATURAL LANGUAGE 27 Additional references: Examples of use of syntagmatic contexts in the definition of semantic measures: Schütze and Pedersen (1997); Yoshida et al. (2003). Paradigmatic contexts Paradigmatic contexts refer to indirect co-occurrences, that is to say situations in which two words occur with the same words but not together. This is often the case for words which establish paradigmatic relationships such as synonymy, hyperonymy, co-hyponymy, troponymy, antonymy or meronymy. Generally, paradigmatic relationships are characterised by analysing words which are surrounded by the same words. Therefore, such contexts are generally defined in terms of grammatical dependency between words. Otherwise stated, word occurrences w.r.t paradigmatic contexts can be used to assess the distributional similarity of words in terms of lexical substituability (Weeds, 2003)8 . Most of the paradigmatic patterns are of the form hw, t, xi or hx, t, wi, with t the dependency under study, x a word which is part of the pattern and w the word the pattern is used to characterise. As an example, the pattern hw, SUBJ, GROWi can be defined in order to study words which are subjects of the verb to grow. Using such a pattern it is therefore possible to distinguish that the words plant and tree frequently occur with such a pattern, e.g. in the sentence ”Soil provides a base which the roots hold on to as a plant grows bigger” the word plant occurs with this pattern; examples of sentences in which the pattern ”tree grows” occurs are also numerous. Conversely, the word botany will never or significantly less frequently occurs with this specific pattern. This pattern which refers to a specific paradigmatic context can therefore be used to characterise that the words (plant,tree) together are probably more semantically related than the word botany and tree for instance. Paradigmatic contexts are also denoted pair-pattern by Turney and Pantel (2010), and refer to the notion of extended distributional hypothesis proposed by Lin and Pantel (2001). In order to analyse words using paradigmatic contexts, a specific size of window and a direction is generally considered. In more advanced approaches specific patterns will be used to characterise slight variation in the contexts, e.g. lexical-syntactic patterns. The reader can refer to the work of Curran (2004) for examples of use of lexical-syntactic patterns. It shows how to characterise words based on complex context extractors, e.g. using Cass or Sextant parsers to mention a few. Panchenko (2013)9 also presents several references related to the definition of pattern-based approaches and to the use of paradigmatic contexts. He also introduces an approach which can be used to consider multi-word expressions10 in the definition of paradigmatic contexts. Additional references: Examples of use of paradigmatic contexts in the definition of semantic measures: Hirschman et al. (1975); Hindle (1990); Hatzivassiloglou and McKeown (1993); Grefenstette (1994); Takenobu et al. (1995); Lin (1998b,a); Dagan et al. (1999); Lee (2001); Weeds (2003); Van Der Plas and Bouma (2004); Heylen et al. (2008); Panchenko (2013). According to Mohammad and Hirst (2012b), Lin (1998b) highlights that, in the context of paradigmatic context analysis, using more patterns tend to improve the results of semantic measures. In addition, interestingly, McCarthy et al. (2007) showed that syntagmatic contexts and more particularly simple sliding window approaches can be used to obtained results almost as good as those obtained using syntactic patterns. However, as we saw in this section, both syntagmatic and paradigmatic contexts are of particular importance for analysing relationships between words. They will both be used for defining semantic models on which will be based semantic measures. Indeed, as we will see in the next section, syntagmatic and paradigmatic relationships between words are the cornerstones of distributional semantics, a branch of study which have been extremely prolific on the definition of corpus-based semantic measures. 2.2.4 Distributional semantics Distributional semantics is a branch of study which explores how statistical analysis of large corpora, and in particular word distributions and statistical regularities w.r.t linguistic contexts, can be used to 8 As stressed in Weeds’ thesis, several authors only consider paradigmatic contexts to estimate semantic similarity. This is because the notion of semantic similarity is sometimes only evaluated w.r.t synonymy, i.e. what is the impact of substituting a word by another on the meaning of a specific sentence. 9 Chapter 2. 10 E.g. ”machine learning”. 28 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES model semantics (Lenci, 2008). Distributional semantics proposes a usage-based study of word meaning and extensively relies on one of the main tenets of computational linguistics and statistical semantics: the distributional hypothesis (Harris, 1954; Weaver, 1955; Firth, 1957; Sahlgren, 2008)11 . The distributional hypothesis, and by extension distributional semantics, is based on the assumption that words occurring in the same contexts tend to be semantically close (Harris, 1981). This hypothesis is of major importance for the definition of corpus-based semantic measures. It was made popular through the idea of (Firth, 1957): ”You shall know a word by the company it keeps” 12 , and is indeed based on the assumption that: 1. The context associated to a word can be characterised by the words surrounding it, i.e. through the definition of syntagmatic and paradigmatic contexts – refers to syntagmatic and paradigmatic structural relationships and to the notion of context introduced in sections 2.2.2 and 2.2.3 respectively. 2. Words occurring in similar contexts, e.g., often surrounded by the same words, are likely to be semantically related; it is assumed that ”similar things are being said about both of them” (Mohammad and Hirst, 2012b) – otherwise stated the association of their meaning is often used to refer to a specific topic which makes that the two words are de facto semantically related. The relevance of the distributional hypothesis and distributional semantics has been stressed out of linguistics, several contributions in psychology and cognitive sciences use it for studying knowledge acquisition and memory to cite a few. Indeed, the distribution hypothesis has been linked to cognitive processes related to language acquisition, processing and understanding (McDonald and Ramscar, 2001). It has for instance been shown that statistical properties of language, and more particularly statistical relationships between neighbouring speech sounds, plays an important role in word segmentation in infants, and therefore speech acquisition (Saffran et al., 1996). Word distribution analysis has also been identified as an interesting evidence to derive syntactic categories (Redington et al., 1998). Therefore distributional semantics became an approach of choice to model semantics of words w.r.t their usage contexts. This enthusiasm for distributional semantics relies on the statistical foundation of the approach which generally requires little expensive human supervision and therefore makes distributional semantics particularly adapted to large corpora analysis. In addition, this approach has been proved to be particularly interesting for solving NLP problems. Indeed, based on the distributional hypothesis, several distributional models have been proposed, e.g. topic models such as Latent Semantic Analysis (LSA), or Hypertext Analogue to Language (HAL) – they will be introduced later. As we will see, these distributional models are extensively and successfully used to analyse semantic relatedness of words – they have also proved to be particularly successful to perform a variety of NLP tasks and to design information retrieval systems13 . Thus, distributional semantics provides a theoretical framework for assessing the semantic similarity or relatedness of words by means of distributional analysis, i.e. by considering an implementation of the distributional hypothesis. Otherwise stated, it is often implicitly considered that distributional similarity of words is equivalent to semantic similarity. However, note that in the study of distributional semantics, some authors distinguish distributional similarity of words to their semantic similarity. This is in particular the case when specific definitions of semantic similarity and distributional similarity are considered. As an example, in (Weeds, 2003, chap 1.), the author considers that (i) the notion of semantic similarity is defined in terms of inter-substituability, i.e. regarding the impact to substitute a word by another on the meaning of a sentence, and (ii) the distributional similarity of words is defined only considering the impact of substituting two words on the grammatical coherence of the sentence. Considering this specific definition of semantic similarity, the assumption that distributional similarity equates semantic similarity cannot be true – ”distributional similarity is [in this case] a weaker requirement than semantic similarity” (Weeds, 2003). However, as we will see, in most cases, authors assume that distributional similarity can be considered as a valuable estimator of semantic relatedness. In addition, even if highly popular and of major importance for computational linguistics, the place of the distributional hypothesis is often subject to debate in the linguistic community. Some researchers, advocates of a strong vision of the distributional hypothesis, consider that it can be used to fully characterise the meaning of language, while others, i.e. weak distributional hypothesis advocates, only see 11 The term has been introduced in (McDonald and Ramscar, 2001). implicitly discussed in (Weaver, 1955) originally written in 1949 (source: wiki of the Association for Computational Linguistics http://aclweb.org/aclwiki accessed 09/13). 13 They have also been proved to be of particular interest in other related domains, e.g. for psychologists interested in semantic representation building and processing for cognitive tasks (Kamp et al., 2014). 12 Also 2.3. DISTRIBUTIONAL MEASURES 29 this hypothesis as a way to study linguistic meaning (Lenci, 2008). Despite the central importance of this debate for studying methods which can be used to manipulate the meaning of units of language through distributional models, we here consider that this debate is out of the scope of this book. In addition, from a practical point of view, distributional semantics and the application of the distributional hypothesis have been proved to be successful in the definition of corpus-based semantic measures – this will be illustrated in the next section which introduces distributional measures for comparing words. In some cases, authors consider the distributional hypothesis as a component of a more general framework denoted the statistical semantics hypothesis (Turney and Pantel, 2010). This general hypothesis has been proposed to defend Vector Space Models, a very popular class of models of words and texts that will be presented in this chapter. It states that meaning of texts can be studied by analysing statistical patterns of human word usage. The hypothesis is therefore related to the strong vision of the distributional hypothesis that has been aforementioned. Links with the statistical semantics hypothesis defined by Turney and Pantel (2010) will be provided in the following presentation. 2.3 Distributional measures Distributional measures are the corpus-based semantic measures which have been the more studied in the literature (Weeds, 2003; Curran, 2004; Sahlgren, 2008; Dinu, 2011; Mohammad and Hirst, 2012a; Panchenko, 2013). They rely on the distributional hypothesis introduced in Section 2.2.4 and are therefore based on the assumption that words which occur in the same contexts are semantically related. These measures rely on a distributional semantic model which corresponds to a semantic space built from the distributional analysis of corpora (Baroni and Lenci, 2010)14 . This semantic model, here denoted distributional model, is used to manipulate the semantics of specific units of languages, e.g. words, documents. Based on this semantic model, specific canonical representations of words, denoted distributional profiles of words, can be built according to the contexts in which they occur15 . As we will see, an important part of the large literature related to distributional measures is dedicated to the various approaches which have been proposed and tested to instantiate distributional model based on various context definitions. Thus, depending on the distributional model which is selected and depending on the definition of the distributional profile which is used to represent a word, a large diversity of distributional measures have been proposed and evaluated. 2.3.1 Implementation of the distributional hypothesis Studies of distributional measures are tightly related to spatial representations of both the semantic space which characterises a corpus and the words to compare – in the vain of the spatial models proposed in Information Retrieval, e.g. Vector Space Models (VSM) and topic models, and according to the spatial model of similarity which has been widely studied in cognitive sciences (refers to Section 1.2.1). Distributional models are generally defined to capture the meaning of words through distributional profiles of words build from context analysis. These profiles represent words into a multi-dimensional space defined by the distributional model under study. Using this strategy, words are therefore considered as specific points of a highly multi-dimensional space. The various dimensions which characterise a word generally refer to the various words of the vocabulary or to the notion of paradigmatic and syntagmatic contexts which have been introduced in Section 2.2.316 The various distributional measures are therefore mainly distinguished by (i) the strategy which is used to build the distributional model and (ii) the measure which is used to process the distributional profile of words extracted from the model. This section introduces the different strategies which have been proposed to build a distributional model. Next, the approaches which have been proposed to represent words based on these semantic models, and the measures which can be used to compare such word representations will be presented. The construction of the distributional model mainly depends on the steps presented below, some of them have already been discussed: 14 As stressed by the authors, such semantic models based on distributional semantics have been denoted through a variety of names in the literature, e.g. vector spaces, semantic spaces, word spaces, corpus-based semantic models. 15 A distributional profile is also denoted a contextual vector in the literature. 16 Considering these two types of contexts corresponds to the distributional hypothesis and the extended distributional hypothesis in the general statistical semantics hypothesis defined by Turney and Pantel (2010). 30 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES • Pre-processing techniques of the corpus (optional), e.g., stop filter, part-of-speech filter. As we have seen, in some cases, this step defines the vocabulary which will be considered and therefore the pairs of words for which a semantic relatedness can be assessed. • Type of context used to build the distributional model. Depending if syntagmatic or paradigmatic contexts are used, the context which is used to characterise a word may be a document, a paragraph, a sentence, a potentially oriented word windows, a number of letters, etc. The various contexts which can be used to characterise a word by analysing syntagmatic and paradigmatic relationships of words have been introduced in Section 2.2.3. • Frequency weighting (optional). The function used to transform the raw counts associated to each context in order to incorporate frequency and additional knowledge relative to the informativeness of contexts – this step is used to reduce the impact of frequent words or more generally contexts. A large number of approaches have been proposed in the literature. The most popular approach to weight the importance of words in texts is TF-IDF (Salton and McGill, 1983): tf idfi,d = tfi,d · idfi (2.1) with tfi,d the frequency of the term ti in a document d (more exactly the number of occurrences of ti in d) and idfi the inverse document frequency of ti is defined by: idfi = log |D| |Dti | (2.2) with |D| the set of documents of the corpus and Dti ⊆ D = {dj ∈ D | ti ∈ dj } the set of documents in which the term ti occurs. The rationale is to consider a word important for a document if it (i) frequently occurs in it (high tf ) and (ii) is rarely found in the documents of the corpus (high idf ). Numerous alternative expressions modelling this intuitive idea have been proposed. Association measures such as Pointwise Mutual Information (PMI) can also be used to refine raw co-occurrences17 . More complex weighting schemes commonly used in information retrieval can also be adopted, e.g. Lnu.tc (Bellot et al., 2014). • Dimension reduction technique (optional) used to reduce the distributional model represented as a matrix, generally a word-context matrix. This process is used to reduce the sparseness of the matrix, it can be done by removing the most frequent contexts, i.e. low entropy columns. Matrix factorisation techniques can also be used to reduce the number of dimensions (and therefore the initial amount of information), e.g. using Singular Value Decomposition (SVD) (Berry et al., 1995; Golub and Van Loan, 2012) – alternative approaches for matrix factorization can also be applied, e.g. Principal Component Analysis, Independent Component Analysis to cite a few (Turney and Pantel, 2010). In some cases such treatments have the interesting properties of removing noise by finding the most important axes of variation. By forcing correspondences between words and context in the reduction process this also enables the discovering of latent dimensions. As we will discuss in Section 2.3.3, reduction techniques are also used to highlight high order co-occurrences, i.e. indirect co-occurrences between words. Appendix B introduces the intuitions, interesting properties and limits of SVD. A large number of distributional models have been proposed and studied in the literature, some of them will be introduced in this chapter (e.g. Latent Semantic Analysis, Explicit Semantic Analysis, Hyperspace Analogue to Language). We invite interested readers to refer to the original contribution for details, and to start by studying contributions related to vector space model, e.g. we recommend the detailed survey provided by Turney and Pantel (2010) as a general introduction to distributional models. Reisinger and Mooney (2010) also propose how to define a VSM that enables context-dependent vector representations of words that tries to solve the problem of lexical ambiguity of words. We also encourage the reader to study the contributions related to the definition of general frameworks dedicated to distributional models unification (Baroni and Lenci, 2010). Finally, since this book focuses on semantic measures, and cannot present the whole literature related to models of units of language, this chapter will only introduce some of the models that have been proposed so far. Other (recent and more complex) models that are of interest for semantic measure design are also briefly presented in Appendix C. We discuss in particular, how language models can be used to derive representations of words and we 17 This approach will be introduced in Equation 2.7 page 34. 2.3. DISTRIBUTIONAL MEASURES 31 introduce the reader to compositionality, i.e. how to combine models to build representations of complex units of language such as sentences. We advise the reader to consult this appendix only when traditional distributional models presented herein are fully understood. Distributional measures differ regarding the type of distributional models they use. They also differ considering the approach used to assess the similarity/distance of words that are characterised w.r.t the distributional model – recall that words are represented by distributional profiles build from the analysis of distributional models. In some cases words will be considered as vectors or (fuzzy) sets to cite a few. In other cases, the matrix will be used to extract statistics on which will be based the measures. Several approaches will be presented in the next section – according to the literature, most of them are particular instantiations of the spatial model of similarity through distributional semantics. However, an important aspect to understand is that distributional models, e.g. word co-occurrence matrices, are not necessarily tight to the geometrical model. Distributional semantics and implementations of the distributional hypothesis must therefore not only be regarded as a means to obtain a geometrical representation of words through vector representations – even if some authors do not distinguish distributional semantics from the geometrical representation of words which can be made from distributional models (Kamp et al., 2014). Indeed, as we will see, first of all, distributional models contain statistics which are valuable in the aim of assessing the similarity or relatedness of words. However, as we will see, these measures can be defined independently from the geometrical/spatial model commonly considered in the design of distributional measures and can for instance exclusively rely on information theoretical notions. 2.3.2 From distributional model to word similarity We have introduced how, by implementing the distributional hypothesis, distributional models can be used to characterise word by analysing their usage contexts. Based on these models, several distributional measures have been proposed. They differ regarding the conceptual approach on which they are based and on the type of distributional models they have been designed for. Indeed, as we have seen, distributional models can be of various forms, e.g. word-context matrix, word-word matrix or even sometimes three dimensional word-word-context matrices18 . This section briefly introduces three main types of approaches which have been proposed to assess word similarity from distributional models: • The geometric/spatial approach which evaluates the relative positions of two words in the semantic space defined by contexts vectors. • The set-based approach which rely on the analysis of the overlap of the set of contexts in which the words occur. • The probabilistic approach which is based on probabilistic models and measures proposed by information theory. Due to space constraint, we will only consider specific examples of measures for each category. For detailed information the reader may refer to the presentations provided in original references. Technical details and several measures have also been introduced by Weeds (2003); Curran (2004); Sahlgren (2006); Mohammad and Hirst (2012b); Panchenko (2013). The geometric or spatial approach The geometric approach is based on the assumption that compared elements are defined in a semantic space corresponding to the intuitive spatial model of similarity proposed by cognitive sciences (see Section 1.2.1). A word is considered as a point in a multi-dimensional space representing the diversity of the vocabulary in use or more generally the various contexts which are used to characterise a word. Two words are therefore compared regarding their location in this multi-dimensional space. The dimensions which are considered to represent the semantic space are defined by the contexts used to build the distributional model. Words are represented through their corresponding vector in the matrix and are therefore compared through measures used to compare vectors. This approach as already been illustrated when introducing contexts in Section 2.2.3. 18 Refer to the complex syntagmatic context analysis based on lexical patterns which is introduced page 26. 32 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES We define u and v the vector representations of the words u and v, with n the size of the vectors, and uk the value of u in dimension k. Among the measures commonly used for comparing vectors, we distinguish: • Minkowski Lp distance metric: distLP (u, v) = n X k=1 simLP (u, v) = |uk − vk | p ! p1 (2.3) 1 distLP (u, v) + 1 Instances of this measure are L1 Manhattan distance (p = 1) and the L2 Euclidian distance (p = 2). • Cosine similarity, the cosine of the angle between the vectors – the similarity is inversely proportional to the angle. The cosine similarity between u and v is: Pn uk vk pPn simcos (u, v) = pPn k=1 (2.4) 2 2 k=1 uk k=1 vk • Measures of correlation can also be used in some cases (Schütze, 1998; Ganesan et al., 2003). For instance, the similarity of two words can be defined as the coefficient of the Pearson’s product-moment correlation between their vector representations (the cosine similarity of re-centered vectors): Pn (uk − u)(vk − v) p pPn (2.5) simP earson (u, v) = Pn k=1 2 2 k=1 (uk − u) k=1 (vk − v) Numerous approaches rely on the cosine similarity which, contrary to the Lp family also incorporates information about contexts in which the words do not co-occur. However, as stressed by Lee (1999), the cosine similarity appears to be less effective in some experiments based on paradigmatic context analysis (Weeds, 2003). Other approaches for comparing vectors are introduced by Mohammad and Hirst (2012b), the reader can also refer to the collection of measures proposed by Deza and Deza (2013). Numerous approaches based on multidimensional representation of words exist. The most popular approaches based on the spatial model are briefly presented. For each of them we present: (i) the approach used to build the distributional model, (ii) the strategy considered to extract distributional profiles of words and (iii) the measure used to compare these profiles: • LSA – Latent Semantic Analysis (Deerwester et al., 1990; Landauer and Dumais, 1997; Landauer et al., 1998), also called Latent Semantic Indexing (LSI) in Information Retrieval. This approach is used to represent a word-context matrix, generally a word-document matrix, which can be used to extract a distributional profile of a word. Two word profiles can next be compared using the measures which have been presented above – the cosine similarity measure was used initially (Equation 2.4). In this approach, the sparseness of the matrix is reduced using Singular Value Decomposition which is a linear algebra operation used to reduce the number of contexts considered in the matrix. This operation is used to obtain a low-rank approximation of the matrix and therefore obtain a more compact representation of the word-context matrix which is used to characterise a word. Such a treatment has also the interesting property to put into light latent concepts by highlighting indirect co-occurrences between words – i.e. words occurring within a similar context but not necessarily occurring together. • ESA – Explicit Semantic Analysis (Gabrilovich and Markovitch, 2007). Compared to LSA which uses latent concepts, ESA is based on explicit description of concepts. The approach relies on the analysis of corpora which are composed of texts describing specific concepts. The approach has originally been developed to be used with Wikipedia assuming that an article refers to a specific concept. Then, a word-concept (i.e. word-article) matrix is built in order to characterise a word. Each cell of the matrix refers to the strength of association between the pairs word/concept – TF-IDF is used (Salton and McGill, 1983). Words are next compared using the cosine similarity of the vector representations of words. 2.3. DISTRIBUTIONAL MEASURES 33 • HAL – Hyperspace Analogue to Language (Lund and Burgess, 1996). This approach is used to generate a word co-occurrence matrix. Co-occurrences are analysed considering syntagmatic context and a ten word sliding window is used by considering a specific model for counting co-occurrences, i.e. the distance between words in the window are taken into account to weight co-occurrences. In addition, each word is characterised by a vector of twice the size of the vocabulary since words co-occurrence counts are oriented, i.e. two word co-occurrence matrices are computed, one for each side. The similarity of word representations was originally computed using the Minkowski distance, Equation 2.3. • Schutze wordspace (Schütze, 1993). In this approach n-gram co-occurrences are analysed to further build word profiles based on it. In the original approach 5000 frequent four-grams were considered to build a four-gram co-occurrence matrix. A four-gram n1 was considered to co-occur with another four-gram n2 if n1 was located at least at 200 four-grams to the left of n2 . The matrix is also reduced using SVD. Next, based on this matrix, the vector representations of a word is built summing the vectors which represent each of the 500 n-gram which occurs to the left and right of each occurrence of the word under study (vector representation of words are also normalised). Finally, the similarity between word vectors are computed using the normalised correlation coefficient, based on Equation 2.5. • Random indexing (Kanerva et al., 2000). This approach is based on a two step process. To each context used to characterise a word, e.g. a document or a paragraph, is associated an index vector which corresponds to a randomly generated vector. It will be used to build the vector representation of the words. Each time the word is encountered within a context, e.g. paragraph, the vector associated to the corresponding context will be added to the vector representation of the word. This approach can be used to reduce the high-dimensionality of the sparse word-context matrices produces by other topic model approaches, such as LSA, HAL. It can also be used to avoid the computing expensive reduction of the matrix (which must be computed each time the model is updated). The various measures which can be used to compare vector representation of words can be used with this space model. Nevertheless, note that this model to do not generate a statistically meaningful distributional model composed of specific statistics such as co-occurrences. • COALS – Correlated Occurrence Analogue to Lexical Semantic (Rohde et al., 2006). This approach uses a four word (weighted) sliding window to compute a word-word co-occurrence matrix. A reduction of the number of columns can be performed in order to focus on the most common words, e.g. considering a frequency threshold. A correlation normalisation is next applied to each cell of the matrix by computing the Pearson correlation between the pair of words which is associated to each cell (Equation 2.5). Negative values are discarded and positive values are square rooted. Reduction of the matrix based on SVD can also be applied. Finally, the cosine similarity (Equation 2.4) is used to compute the similarity of word vectors. We have presented several distributional models from which semantic measures based on the spatial model can be defined. Nevertheless, nothing prevent the use of the statistics provided by most of these distributional model for defining other types of semantic measures. The set-based approach Words are compared regarding the number of contexts in which they occur which are common and different (Curran, 2004). The comparison can be made using classical set-based measures (e.g., Dice index, Jaccard coefficient). The reader may refer to the several set-based operators which have for instance been used to compare words in (Bollegala, 2007b; Terra and Clarke, 2003). As an example to compare the words u and v, with C(u) the sets of contexts in which the word u occurs, the similarity can be defined using Dice index: simDice (u, v) = 2|C(u) ∩ C(v)| |C(u)| + |C(v)| (2.6) Extensions have also been proposed in order to take into account a weighting scheme through fuzzy sets, e.g. (Grefenstette, 1994). Set-based measures relying on information theory metrics have also been proposed, they are introduced in the following subsection which presents the measures based on probabilistic approaches. 34 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES The probabilistic approach The distributional hypothesis enables to express the semantic relatedness of words in term of probability of co-occurrence, i.e. regarding both, the contexts in which compared words appear together and alone. These two evidences can intuitively be used to estimate the strength of association between two words. This strength of association can also be seen as the mutual information of two words which can be expressed regarding the probability the two words occur in the corpus, as well as the probability the two words co-occur in the same context. Once again a large diversity of measures have been proposed in the literature. Only those which are frequently used are presented (Dagan et al., 1999; Mohammad and Hirst, 2012b). With p(u) the probability that the word u occurs in a context and p(u, v) the probability that the two words u and v occurs in the same context – the notion of context may refer to windows of different sizes or event larger units of language depending on the implementation of the notion of context which is considered (Section 2.2.3). For convenience following formulae are introduced without defining a specific implementation of the notion of context. • Pointwise Mutual Information (PMI) (Fano, 1961). pmi(u, v) = log p(u, v) p(u)p(v) (2.7) The PMI was first adapted for the comparison of words by (Church and Hanks, 1990). It is based on the analysis of the number of co-occurrences and individual occurrences of words (marginal frequencies), e.g., in paragraphs or sentences – examples of use are discussed in (Turney, 2001; Lemaire and Denhière, 2008; Mohammad and Hirst, 2012b). On of the limitation of PMI is its biais towards rare words (Manning and Schütze, 1999): considering that u and v are two words that always co-occur, we will have p(u, v) = p(u), and pmi(u, v) = log(1/p(u)). Thus, when u is rare, i.e. p(u) is low, the value of pmi(u, v) will be high. To overcome the fact that PMI is biased towards infrequent words, various adaptations and correction factors have been proposed (Pantel and Lin, 2002; Mohammad and Hirst, 2012b). For instance, the Normalised PMI (NPMI) is defined as follows: npmi(u, v) = pmi(u, v) −log p(u, v) (2.8) Other adaptations have also been proposed, e.g. (Han et al., 2013) propose PMImax , an adaptation of PMI in order to take into account multiple senses of words. Note that (N)PMI functions have also been often used to refine word-context matrices (distributional model) by incorporating information on word association. Another variation of PMI widely used in NLP is the Positive PMI (PPMI) which forces to only consider positive PMI values (Niwa and Nitta, 1994). As an example, Bullinaria and Levy (2007) showed that PPMI outperforms numerous weighting approaches for semantic relatedness computations based on context-co-occurrence analyses. PPMI is defined by : ppmi(u, v) = max(0, pmi(u, v)) (2.9) • Confusion probability and Maximum likelihood Estimate (MLE) can also be used – refer to the work of Dagan et al. (1999) for both details and examples. Vector representation of words obtained from most distributional models can also be seen as distribution functions corresponding to distribution profiles19 . Therefore, the several approaches which have been proposed by information theory to compare probability mass functions20 can also be used to compare vector representations of words. Note that measures which consider word representations as probability mass functions imply that the vector representation of words are normalised such as the sum of the vector equals one. The functions commonly used in the probabilistic approach are the followings: 19 i.e. word representation. Distributional profiles are introduced in Section 2.3. Notice that these vectors can also be vectors of strength of association if one of the metrics presented above (e.g. PMI) has been used to convert the initial wordcontext matrix. As an example, considering an initial word-word co-occurrence matrix, this can be done by substituting the value of each cell of the matrix by the corresponding PMI or NPMI values. 20 The reader may refer to the work of Cover and Thomas (2006) for an introduction to the field of Information Theory. 2.3. DISTRIBUTIONAL MEASURES 35 • Kullback-Leibler divergence (information gain or relative entropy) is a classic measure used to compare two probability distributions. It is often characterised as the loss of information when a probability distribution is approximated by another. The distance between two words p and q can thus be estimated by the relative entropy between their respective distributions p and q. distKL (p, q) = n X pk log k=1 pk qk (2.10) This measure is positive, asymmetric and ensures that distKL (p, p) = 0. However, this distance does not satisfies the triangle inequality. It can also be applied on conditional probabilities (Dagan et al., 1999). Please refer to the details discussed in the contribution of Cover and Thomas (2006) for more information. • Jensen-Shannon divergence. This function also measures the distance between two probability distributions. distJS (p, q) = 1 1 dKL (p, m) + dKL (q, m) 2 2 (2.11) with m = p+q 2 . This measure is based on the Kullback-Leibler divergence with the interesting properties of being symmetric and to be bounded between 0 and 1 – it has also been demonstrated that in specific cases this measure is an approximation of the χ2 test (Cover and Thomas, 2006). • χ2 distance – several variants exists in the literature. distχ2 (p, q) = 1 X (pi − qi )2 2 i pi + qi (2.12) • Other measures such as Skew Divergence or Kendall’s τ (Lee, 1999; Curran, 2004) and the measures presented in Section 2.3.2 for comparing vector representations of words can also be used. An excerpt of the similarity functions which can be used to compare probability distributions can be found in the work of Pantel and Lin (2002); a comprehensive survey presenting a large collection of measures is also proposed by Cha (2007)21 . Several combinations of measures can therefore be used to mix both the strength of association (weighting scheme, e.g., PMI) and the measures which can be used to compare the probability functions/vectors. Alternatively, fuzzy metrics can also be considered for comparing words according to their strength of association – the reader may refer to the contribution of Mohammad and Hirst (2012b) for detailed examples. The probabilistic approach does not only refers to the different measures based on information theory. Several statistical techniques have also been proposed to define distributional models (or topic models); two of them are briefly presented: • Probabilistic Latent Semantics Analysis (PLSA) is a statistical technique based on mixture decomposition which are derived from latent class model (Hofmann, 1999). Its aim is to propose an approach with a solid foundation in statistics in order to respond to some limitations associated to LSA (e.g. overfitting, word and documents are assumed to be joint by a Gaussian model). The latent variables which are considered in PLSA correspond to topics. The probabilistic model relies on two conditional probabilities: the probability that a word is associated to a given topic and the probability that a document refers to a topic – refer to the work of Cohen and Widdows (2009) for details. • LDA – Latent Dirichlet Allocation (Blei et al., 2003). This topic model is similar to PLSA but adopt a different approach w.r.t the assumption on the topic distribution in document. The interested reader will refer to the original publication and to the multiple adaptations proposed for defining semantic measures, e.g. (Dinu and Lapata, 2010). 21 An interesting correlation analysis between measures is also provided. 36 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES 2.3.3 Capturing deeper co-occurrences Most of the measures which have been presented so far are based on distributional models build considering syntagmatic contexts. They can only be used to estimate the similarity of words regarding their first order co-occurrences, i.e., the similarity is mainly assessed by studying the contexts in which the words occur together. However, a strong limitation of first order co-occurrence studies (which only rely on simple syntagmatic context, i.e. those not based on syntagmatic patterns) is that words which do not co-occur in the same context will have a low similarity. However, in some cases, similar or related words never co-occur in the same syntagmatic contexts - in particular if short contexts are considered. As an example, even if syntactic context analyses perform well for synonymy detection in general (Turney, 2001), specific synonyms may not co-occurs syntagmatically. As an example, some studies of large corpus have observed that the words road and street almost never co-occurs in the same word window, although they can be considered as synonyms in most cases (Lemaire and Denhière, 2008). As we have seen, this specific aspect of word similarity can be studied by analysing paradigmatic contexts, as these words will tend to occur in similar paradigmatic contexts. Approaches have also been proposed to capture this type of word similarity by processing results of syntagmatic context analysis. Indeed, focusing on syntagmatic contexts, specific techniques have also been proposed to highlight deeper relationships between words, e.g., second order co-occurrences, i.e. co-occurrences which correspond to paradigmatic relationships. These techniques will transform the word-context matrix to enable evidence of deeper co-occurrence to be captured. To this end matrix factorisation techniques can be used (e.g. SVD is presented in Appendix B). Statistical analysis can be used to distinguish valuable patterns in order to highlight deeper cooccurrences between words. These patterns, which represent the relationships between words, can be identified using several techniques; among them we distinguish: • LSA (Dumais et al., 1988), HLA (Lund and Burgess, 1996), PLSA (Hofmann, 1999), LDA (Blei et al., 2003). These approaches have been introduced in Section 2.3.2. • SOC-PMI Second Order Co-occurence PMI (Islam and Inkpen, 2006). This approach can be used to consider related words of the compared words when computing their PMI. Related words were originally obtained using a Web-based search engine; other approaches can also be adopted. • Syntax or dependency-based model, i.e. models which are based on paradigmatic context analysis – refers to Section 2.2.3. We recall that Appendix C presents other models that can be used to derive word representations. 2.4 Other corpus-based measures The large majority of corpus-based measures are distributional measures and therefore extensively rely on the distributional hypothesis. However, other approaches have been proposed to assess the semantic similarity or relatedness of words based on corpora analysis. As an example, several authors have proposed to compare words w.r.t results returned by an information retrieval system, e.g. using results provided by Web search engines considering the words to compare (Chen et al., 2006; Sahami and Heilman, 2006; Bollegala, 2007b; Cilibrasi and Vitanyi, 2007; Gracia and Mena, 2008). In this case, even if many information retrieval systems are based on an implementation of the distributional hypothesis, these measures are generally not considered as distributional measures per se. Other approaches are based on specific treatments performed on semi-structured texts. In Lesk (1986) the author proposes to compare words based on the number of words’ overlap of their descriptions in dictionaries. In other cases, measures also take into consideration more or less structural information, e.g. information expressed into WordNet, Probase (Wu et al., 2012) or other semantic networks (Nitta, 1988; Kozima and Furugori, 1993; Niwa and Nitta, 1994; Kozima and Ito, 1997; Blondel, 2002; Ho and Cédrick, 2004; Iosif and Potamianos, 2012; Zhila et al., 2013). These approaches are based on concepts which will be introduced in the section dedicated to knowledge-based semantic measures. As an example, (Jarmasz and Szpakowicz, 2003b,a) propose a measure which uses Roget’s Thesaurus to compute the similarity of words. Words are regarded as if they were structured by a taxonomy and the similarity of two words is defined as a function of the depth of the most specific common ancestor of the two words. In other cases a graph representation of a corpus of texts will be build and used as a semantic proxy. For instance, Muller et al. (2006) analyse a dictionary to generate a graph in which nodes are entries in the dictionary or words which occurs in definitions. An edge is created between an entry and each word in 2.5. ADVANTAGES AND LIMITS OF CORPUS-BASED MEASURES 37 its definition. The similarity between words is next evaluated using a random-walk approach. Numerous measures mixing knowledge-based and corpus-based approaches will be introduced in Section 3.8. 2.5 Advantages and limits of corpus-based measures Here, we list some of the advantages and limits of corpus-based semantic measures and in particular those of distributional measures. 2.5.1 Advantages of corpus-based measures • They are unsupervised and can be used to compare the relatedness of words expressed in corpora without prior knowledge regarding their meaning or usage – in comparison to knowledge-based measures. • They enable fine-grained analysis of the semantics of measures as tuning of measures can be done by considering syntagmatic and paradigmatic relationships. As we saw, specific measures can also be used to target specific relationships between words, e.g. antonymy. • They can be used to compare numerous units of language (from words to texts). 2.5.2 Limits of corpus-based measures • The words to compare must occur at least few times. • They highly depend on the corpus which is used. This specific point can also be considered as an advantage as the measure is context-dependent. Sense-tagged corpora are most of the time not available (Resnik, 1999; Sánchez et al., 2011). The construction of a representative corpus of text can be challenging in some usage contexts, e.g., biomedical studies. • It is difficult to estimate the relatedness between concepts or instances due to the disambiguation process which is required prior to the comparison. Distributional measures are mainly designed for the comparison of words. However, some pre-processing and disambiguation techniques can be used to enable concepts or instances comparison from text analysis. Interesting words for the consideration of lexical ambiguity in distributional models have also been proposed, e.g. (Reisinger and Mooney, 2010) propose a VSM that enables context-dependent vector representations of words to be build. Nevertheless, the computational complexity of approaches based on disambiguation is most of the time a drawback making such approaches impracticable with large corpora analysis. The comparison of multi-word expressions can also not be performed using most approaches. • It is difficult to estimate the semantic similarity between two words using these measures. Even if different observations are provided in the literature, it is commonly considered that distributional measures can only be used to capture semantic relatedness. This is due to the large amount of relationships that can be associated to a pair of co-occurring words (Chaffin and Herrmann, 1984; Zhila et al., 2013). And to the fact that co-occurrence is generally, for the most part, only considered as an evidence of relatedness, e.g., (Batet, 2011). Additional considerations have to be made to capture specific relationships. As an example, Mohammad and Hirst (2012b) specifies that similarity can be captured performing specific pre-processing or using specific paradigmatic contexts – Mohammad et al. (2008) show for instance that semantic measures can be used to detect antonyms. In the same vein, Ferret (2010) proposes an interesting study on the use of corpus-based semantic measures for synonymy extraction22 . The reader may also refer to the recent work of Yih et al. (2012) in which the authors propose a modification of LSA to assess the degree of synonymy and antonymy between words. • It is generally difficult to explain and to trace the semantics of the relatedness in some cases, e.g. when the approach is based on a general implementation of the distributional hypothesis it is difficult to deeply understand the semantics associated to the co-occurrences and therefore to the scores produced by the measure. 22 As we will see in Chapter 4 which is dedicated to semantic measure evaluation, synonymy detection is frequently used to compare and to analyse measures. 38 CHAPTER 2. CORPUS-BASED SEMANTIC MEASURES Software solutions and source code libraries that provide corpus-based semantic measures implementations are presented in Appendix D. Chapter 4 also provides information related to the evaluation protocoles and datasets that can be used to compare these measures. 2.6 Conclusion Due to their central importance for applications based on natural language analysis, corpus-based semantic measures have attracted a lot of interest in the last decades. This has led to the proposal of a large variety of measures which can be used to compare different types of units of language – from words to documents. As an introduction to corpus-based semantic measures and to illustrate the type of semantic evidence which can be extracted from natural language analysis in order to compare units of language, this chapter has focused on presenting measures for comparing words. This type of measures is cornerstone of corpus-based semantic measures. Indeed, these measures are based on important notions and models which are used to design measures for comparing larger lexical units. As we saw, most of the measures which have been proposed in the literature are based on distributional semantics and rely on distributional semantics through the definition or extension of topic models, e.g., LSA, HAL, LDA. These measures are based on syntagmatic and paradigmatic analyses of language, i.e. according to the distributional hypothesis, words are compared w.r.t the contexts in which they occur. An important aspect of this approach is therefore that its roots are based on a quantitative analysis of word occurrences w.r.t. the central notion of context detailed in this chapter. We have also introduced alternative approaches to pure-distributional measures. They take advantage of external algorithms which are used to distinguish relevant resources considering specific words. Words will therefore be compared by analysing the set of resources which are associated to them. It’s worth to note that most of the time these resources are retrieved based on algorithms which also take into account the distributional hypothesis, sometimes implicitly, e.g. approaches based on information retrieval algorithms. This challenges the ability to differentiate corpus-based measures defined as purely distributional, i.e. distributional measures, and other measures. An interesting and important aspect of corpus-based measures is therefore the large diversity of lexical units they can compare and the diversity of approaches and adaptations defined in the literature. In this context, important research efforts focus on defining methods for adapting corpus-based measures dedicated to the comparison of words, and more particularly distributional measures, in order to compare larger lexical units such as sentences, paragraphs or documents. To this end, a central aspect to study is semantic compositionality w.r.t semantic similarity: how to evaluate larger units of language than words using approaches commonly used to define corpus-based measures, e.g., using the distributional hypothesis and by adapting distributional models (Kamp et al., 2014). Challenges related to this field of study also aim at incorporating the consideration of linguistic expressions, e.g. anaphora or even negation (to cite a few) into existing models. It is indeed commonly considered that current models and in particular distributional semantics provide quantitative evidence of semantic similarity and therefore only give access to a rough approximation of the meaning which is conveyed by natural language (Baroni and Lenci, 2010). This highlights the narrow link which exists between the study of semantic measures and the study of computable models of natural language such as distributional models. Another interesting and important topic refers to the unification of corpus-based measures in order to define models which are generic enough to be used for comparing lexical units of different granularities, i.e. in order that the same approach/measure can be used to define corpus-based semantic measures for comparing words or paragraphs (Pilehvar et al., 2013). Chapter 3 Knowledge-based semantic measures As we have seen, two main families of semantic measures can be distinguished: corpus-based measures, which take advantage of unstructured or semi-structured texts, and knowledge-based measures which rely on ontologies. Corpus-based measures are essential for comparing units of languages such as words, or even concepts when there is no formal expression of knowledge available to drive the comparison. On the contrary, knowledge-based semantic measures rely on more or less formal expressions of knowledge explicitly defining how the compared entities, i.e. concepts or instances, must be understood. Thus, they are not constrained to the comparison of units of language and can be used to drive the comparison of any formally described pieces of knowledge, which encompasses a large diversity of elements, e.g., concepts, genes, person, music bands, etc. This chapter focuses on knowledge-based measures and we will more particularly introduce measures which rely on ontologies processed as semantic graphs or semantic networks. These measures are generally used to compare terms structured through unambiguous semantic relationships or concepts defined in taxonomies and knowledge organisation systems. It also encompasses measures commonly used to compare terms or senses defined into lexical databases such as WordNet (Miller, 1998; Fellbaum, 2010). The main limitation of knowledge-based measures is their strong dependence on the availability of an ontology – an expression of knowledge which can be difficult to obtain and may therefore not be available for all fields of studies. However, in recent decades, we have observed, both in numerous scientific communities and industrial fields, the growing adoption of knowledge-enhanced approaches based on ontologies. As an example the Open Biological and Biomedical Ontology (OBO) foundry gives access to hundreds of ontologies related to biology and biomedicine. Moreover, thanks to the large efforts made to standardise the technology stack which can be used to define and to take advantage of ontologies (e.g., RDF(S), OWL, SPARQL – triple stores implementations) and thanks to the increasing adoption of the Linked Data and Semantic Web paradigms, a large number of initiatives give access to ontologies in numerous domains (e.g., biology, geography, cooking, sports). In the introduction, we also point out that several large corporations adopt ontologies to support large-scale worldwide systems. The most significant example over recent years is the adoption of the Knowledge Graph by Google, a graph built from a large collection of billions of non-ambiguous subjectpredicate-object statements used to formally describe general or domain-specific pieces of knowledge (Singhal, 2012). This ontology is used to enhance their search engine capabilities and millions of users benefit from it on a daily basis. Several examples of such large ontologies are now available: DBpedia, Freebase, Wikidata, Yago. Another significant fact about the increasing adoption of ontologies is the joint effort made by the major search engines companies, e.g., Bing (Microsoft), Google, Yahoo! and Yandex, to design Schema.org1 , a set of structured schemas defining a vocabulary which can be used by publishers to define meta-data with the aim of characterising the content of their web pages in an unambiguous manner. Another interesting aspect of the last few years is the growing adoption of graph databases (e.g., Neo4J2 , OrientDB3 , Titan4 ). These databases rely on a graph model to describe information in a NoSQL 1 http://schema.org 2 http://www.neo4j.org/ 3 http://www.orientechnologies.com/orientdb/ 4 http://thinkaurelius.github.io/titan/ 39 40 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES fashion. They actively contribute to the growing adoption of the graph property model – thinking in terms of connected entities (Robinson et al., 2013). In this context, a lot of attention has been given to ontologies, which in numerous cases merely correspond to semantic graphs or semantic networks – characterised elements (concepts, instances and relationships) are defined in an unambiguous manner without using complex logical constructs. Such semantic graphs have the interesting properties of being easily expressed and maintained while ensuring a good ratio between semantic expressiveness and effectiveness (in term of computational complexity). This justifies the large number of contributions related to the design of semantic measures dedicated to semantic graphs – a diversity of measures to which this chapter is dedicated. Due to space constraint we will not introduce knowledge-based measures which refer to logic-based measures, i.e. measures used to compare knowledge base entities defined using complex logical constructs. These measures are used to process knowledge bases, generally defined using description logics, which cannot most of the time be considered as simple graphs – even if a partial representation of the knowledge they define can be reduced as a graph. An introduction to logic-based measures can be found in (D’Amato, 2007), several references are also provided in Section 3.6.1 and in (Harispe et al., 2013b, version 2). In addition, this chapter will not detail the semantic measures which have been proposed for comparing concepts taking into account multiple ontologies, they are however introduced in Section 3.6.2. This chapter is structured as follow. Section 3.1 provides information regarding the processing of ontologies through semantic graph representations. It also defines the formal notations which will be used to present the measures. Section 3.2 distinguishes different types of measures w.r.t the properties of the semantic graph considered. Section 3.3 presents the foundations of numerous knowledge-based measures by introducing semantic evidence which can be extracted from semantic graph analysis (mainly taxonomies). Section 3.5 presents numerous measures which have been proposed for assessing the semantic similarity of concepts defined in a taxonomy. Section 3.6 briefly introduces knowledge-based measures which are not detailed in this chapter, i.e. logic-based measures and measures based on the analysis of multiple ontologies – several references are provided. Section 3.7 discusses the advantages and limits of knowledge-based measures. Finally, Section 3.9 concludes this chapter. 3.1 Ontologies as graphs and formal notations This section presents the type of ontologies and knowledge organisation system considered in this book. It also provides important information regarding ontology processing through graph analysis – information which is generally not provided in contribution related to semantic measures. We next introduce the notations which will be used in this chapter to refer to particular constitutive elements of a semantic graph. 3.1.1 Ontologies as graphs We briefly introduces the reader to ontologies which can be processed as graphs. However, this section does not aim at: (i) presenting the field of Knowledge Representation, (ii) discussing the broad diversity of ontologies which have been proposed in the literature, and (iii) introducing the language and specifications which can be used to express ontologies, e.g., RDF(S), OWL. Here, we assume that the reader is already familiar with knowledge modelling and to the associated terminology. An introduction to this field of study is provided by Gruber (1993); Baader et al. (2010); Hitzler et al. (2011). Numerous ontologies can be expressed as graphs. In addition, more complex ontologies can be reduced or used to generate knowledge represented as a graph. This section discusses specific aspects of ontologies related to graph representations. We first introduce simple ontologies which can be represented as graphs (e.g., taxonomies) to further discuss the case of more complex ontologies. Taxonomies and partially ordered sets Taxonomies are used to structure elements which have similar characteristics into ordered classes. They were originally used in biology to define taxa (classes), by categorising organisms sharing common properties. A taxonomy is a function of a taxonomic scheme which defines the properties considered to distinguish classes. Depending on this scheme, the number of classes and their ordering may vary. The semantics carried by a taxonomy is non-ambiguous as the interpretation of the taxonomic relationship is formally expressed through particular properties/axioms. Indeed, considering a set of 3.1. ONTOLOGIES AS GRAPHS AND FORMAL NOTATIONS 41 Figure 3.1: Taxonomy of concepts represented as a graph elements C (e.g. concepts), a taxonomy is a non-strict partial order (poset) of C. It can be defined by C , a binary relation  over C which is5 : (i) reflexive ∀c ∈ C : c  c, (ii) antisymmetric ∀u, v ∈ C : (u  v ∧ v  u) ⇒ u = v and (iii) transitive ∀u, v, w ∈ C : (u  v ∧ v  w) ⇒ u  w. Note that in some rare cases taxonomies are totally ordered, but generally, they are only partially ordered, i.e., ∃(u, v) ∈ C : u  v ∧ v  u. Given that they generally contain a root element denoted > which subsumes all other elements, i.e., ∀c ∈ C, c  >, they can be represented as a connected, Rooted and Directed Acyclic Graph (RDAG). A taxonomy of concepts C can therefore be formally defined as a semantic graph O : hC, R, E, AO i with C the set of concepts, R a singleton defining the unique predicate which can be used to order the concepts, i.e. R = {subClassOf} and E ⊆ C × R × C the set of oriented relationships (edges) which defines the ordering of C. Only considering O : hC, R, Ei leads to a labelled graph structuring elements of C through labelled oriented edges. Nevertheless, by defining the sets of axioms associated to the taxonomic predicate defined in R, e.g., associated relationships are considered reflexive, antisymmetric and transitive, AO explicitly and formally states that O is a taxonomy per se and not a simple graph data structure. These axioms can be used to define inference techniques and more generally to ensure the coherence of specific algorithms w.r.t the knowledge defined in the representations. As an example, Figure 3.1 denotes an example of taxonomy represented by a graph structure. Although simple, taxonomies are knowledge organisation systems which are used in numerous processes; they are also the backbones of more refined ontologies and are therefore considered as essential components of knowledge modelling. Most of the measures detailed in this chapter rely on these simple ontologies. The notion of taxonomy has been detailed here through a taxonomy of concepts, we also consider R the taxonomic of predicates in which subPredicateOf refers to the taxonomic relationship defining that one predicate inherits from another6 . General discussion on ontologies as graphs Although some ontologies cannot be reduced to simple graphs, a large part of the knowledge they model can generally be expressed as a graph. Therefore, an important aspect to understand is that ontologies, even if they are not explicitly defined as graphs, can be reduced into graphs. Indeed, in all cases, a partial representation of the knowledge defined in expressive ontologies can be manipulated as a graph. The example of the taxonomy has been underlined but this is also the case for the knowledge which links instances to classes (also obtained by a common reasoning procedure). In this case, the ontology can be reduced as a graph in which instances are represented as nodes and linked to their class(es) by simple subject–predicate–object (spo) statements. Therefore, any complex ontology, in which sets of concepts and instances have been defined, can be represented as a connected graph in which nodes denote concepts or instances. In this chapter we consider a graph-based formalism frequently used to manipulate ontologies. It can be used to express numerous network-based ontologies and, sometimes through reductions, ontologies 5 Note that we adopt the notation used in the literature related to poset instead of the notation commonly used in description logics (v). 6 Generally named subPropertyOf, e.g., in RDFS. 42 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES which rely on complex logic constructs. It corresponds to an extension of the structure O : hC, R, E, AO i which has been presented to introduce taxonomies as graphs. Extensions have been made to take instances, data values and multiple predicates into consideration. The next subsection presents this formalism in detail. Types of ontologies considered in this chapter Regardless of the particularities of some domain-specific ontologies and regardless of the language considered for the modelling, all approaches used to represent knowledge share common components: • Concepts (Classes), set of things sharing common properties, e.g., Human. • Instances, i.e., members of classes, e.g., alan (an instance of the class Human). • Predicates, the types of relationships defining the semantic relationships which can be established between instances or classes, e.g., subClassOf. • Relationships, concrete links between classes and instances which carry a specific semantics, e.g., alan isA Human – alan worksAt BletchleyPark. Relationships form spo statements. • Attributes, properties of instances, e.g., Alan hasName Turing. • Axioms, for instance defined through properties of the predicates, e.g. taxonomic relationships are transitive, the definition of the domain and the range (co-domain) of predicates, or constraints on predicate and attributes, e.g., Any Human has exactly 2 legs. In practice, numerous ontologies do not rely on complex logical constructs or complex concept/predicate definitions but rather correspond to a formal semantic network, here denoted semantic graphs. In addition, we have stressed the fact that complex ontologies can also be regarded as semantic graphs (sometimes considering partial reductions). A semantic graph, in which instances of classes and data values of specific datatypes are considered, can formally be defined by O : hC, R, I, V, E, AO i, with: • C the set of concepts. • R the set of predicates. • I the set of instances. • V the set of data values. • E the set of oriented relationships of a specific predicate r ∈ R: E ⊆ ECC ∪ ERR ∪ EII ∪ EIC ∪ ECI ∪ ECV ∪ ERV ∪ EIV with: – ECC ⊆ C × R × C – ERR ⊆ R × R × R – EII ⊆ I × R × I – EIC ⊆ I × R × C – ECI ⊆ C × R × I – ECV ⊆ C × R × V – ERV ⊆ R × R × V – EIV ⊆ I × R × V • AO the set of axioms defining the interpretations of classes and predicates. 3.1. ONTOLOGIES AS GRAPHS AND FORMAL NOTATIONS 43 Figure 3.2: Example of a semantic graph related to the music domain. Concepts, instances and data values are represented (Harispe et al., 2013a). The sets of concepts (C), predicates (R), instances (I), values (V ) are expected to be mutually disjoint7 . We consider that each instance is a member of at least one concept and that the taxonomies of concepts C , and predicates R (if any), correspond to connected and rooted directed acyclic graphs (RDAGs). In this manuscript we will mainly manipulate such an ontology without considering predicate taxonomies. In the following, we consider that a lexical reference – didactical device (Guarino and Giaretta, 1995) – is used to refer, in an unambiguous manner, to any node which refers to a concept/predicate/instance. Although we will use a literal in this manuscript, in practice, this unique identifier is a URI or a domainspecific identifier – except data values (V) which are (typed) literals. Figure 3.2 presents an example of a semantic graph related to the music domain which involves related concepts, predicates, instances and data values8 . In this example, concepts are taxonomically structured in the layer C, e.g. MusicBand, MusicGenre. Several types of instances are also defined in layer I, e.g. rollingStones, rock. These instances can be characterised according to specific concepts, e.g. the statement rollingStones isA MusicBand defines that rollingStones is a member of the class MusicBand. In addition, instances can be interconnected through specific predicates, e.g., rollingStones hasGenre rock. Specific data values (layer D) can also be used to specify information relative to both concepts and instances, e.g., rollingStones haveBeenFormedIn "1962-01-01"∧∧ xsd:date. All relationships which link the various nodes of the graph are directed and semantically characterised, i.e., they carry an unambiguous and controlled semantics. Notice that extra information are not represented in this figure, e.g., the taxonomy of predicates, axiomatic definitions of predicate properties. We denote GT , the taxonomic reduction of the ontology, i.e. the layer C in Figure 3.2. GT corresponds to the taxonomy C , and therefore only contains concepts. As we will see, this reduction is widely used to compute the semantic similarity between concepts; it will be extensively used in this chapter. We will alos denote GT I (T stands for Taxonomic and I for isA relationship) the graph composed of the layers C and I in Figure 3.2 (only considering edges in ECC , EII and EIC 9 ). Knowledge modelling is a vast domain and a large diversity of ontologies have been proposed to express knowledge in a machine understandable form. This section has briefly introduced several ontologies 7 Note that a set of data types (D) can easily be added. of a subgraph extracted from DBpedia (Auer et al., 2007). 9 Triplets are rarely defined in E CI . 8 Representation 44 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES which can be processed as graphs. We have also introduced the formalism adopted in this manuscript to represent such ontologies and to refer to some of their essential components. 3.1.2 Relationships The relationships of a semantic graph are distinguished according to their predicate and to the pair of elements they link. They can also be denoted statements or triplets in some contributions. As an example, the triplet (u, t, v) corresponds to the unique relationship of type t ∈ R which links the elements u, v: u is named the subject, t the predicate and v the object. Relationships are central elements of semantic graphs and will be used to define algorithms and to characterise paths in the graph. Since the relationships are oriented, we denote t− the type of relationship carrying the inverse semantic of t. We therefore consider that any relationship (u, t, v) implicitly implies (v, t− , u), even if the type of relationship t− and the relationship (v, t− , u) are not explicitly defined in the graph. As an example, the relationship Human subClassOf Mammal implies the inverse relationship Mammal subClassOf− Human (even if the ontology defines that superClassOf is the inverse of subClassOf− , i.e. subClassOf− ≡ superClassOf). The notion of inverse predicate will be considered to discuss detailed paths. In some ontology languages, inverse relationships between predicates are explicitly defined by specific construct, e.g., owl:inverseOf in OWL. 3.1.3 Graph traversals Graph traversals are often represented through paths in a graph, i.e., sequence of relationships linking two nodes. To express such graph paths, we adopt the following notations10 . • Path: Sequence of relationships [(ci−1 , ti , ci ), (ci , ti+1 , ci+1 ), . . .]. To lighten the formalism, if a single predicate is used the path is denoted [ci−1 , ci , ci+1 , . . .]t . • Path Pattern: We denote π = ht1 , . . . , tn i with tn ∈ R, a path pattern which corresponds to a list of predicates11 . Therefore, any path which is a sequence of relationships is an instance of a specific path pattern π. We extend the use of the path pattern notation to express concise expressions of paths: • ht∗ i corresponds to the set of paths of any length composed only of relationships having for predicate t. • ht∗∗ i corresponds to the set of paths of any length composed of relationships associated to the predicate t or t− . As an example, {Human, hsubClassOf∗ i, Animal} refers to all paths which link concepts Human and Animal and which are only composed of relationships subClassOf (they do not contain relationships of type subClassOf− ). We also mix the notations to characterise set of paths between specific elements. As an example, {u, ht, subClassOf∗ i, v} represents the set of paths which (i) link the elements u and v, (ii) start by a relationship of predicate t, and (iii) end by a (possibly empty) path of subClassOf relationships. As an example the concept membership function I which characterises instances of a specific concept can formally be redefined by: I(X) = {i|{i, hisA,subClassOf∗ i, X} = 6 ∅} (3.1) To lighten the formalism, we consider that the set of paths {u, hp∗ i, v} can be shortened by {u, p, v}, e.g. {Human, hsubClassOf∗ i, Animal} = {Human, subClassOf, Animal} and {Human, hsubClassOf∗∗ i, Animal} = {Human, subClassOf∗ , Animal} 3.1.4 Notations for taxonomies The taxonomy GT is the semantic graph associated to the non-strict partial order defined over the set of concepts C. We introduce the notations used to characterise GT as well as its concepts; some of them have already been introduced and are repeated for clarity: • C(GT ) shortened by C refers to the set of concepts defined in GT . 10 These 11 In notations are based on an adaptation of the notations used by Lao (2012). SPARQL 1.1, such paths are denoted using path properties t1 /t2 /t3 . 3.1. ONTOLOGIES AS GRAPHS AND FORMAL NOTATIONS 45 • E(GT ) shortened by ET refers to the set of relationships defined in GT with: ET ⊆ C × {subClassOf} × C ⊆ ET ⊆ ECC 12 • A concept v subsumes another concept u if u  v, i.e., {u, subClassOf, v} = 6 ∅. Several additional denominations will be used; it is commonly said that v is an ancestor of u, that u is subsumed by v and that u is a descendant of v. • C + (u) ⊆ C, with u ∈ C, the set of concepts such as: C + (u) = {c|(u, subClassOf, c) ∈ ET } • C − (u) ⊆ C, with u ∈ C, the set of concepts such as: C − (u) = {c|(c, subClassOf, u) ∈ ET } • C(u) ⊆ C, with u ∈ C, the set of neighbours of concepts such as: C(u) = C + (u) ∪ C − (u) • A(u) the set of concepts which subsumes u, also named the ancestors of u, i.e., A(u) = {c|{u, subClassOf, c} = 6 ∅} ∪ {u}. We also denote A− (u) = A(u) \ {u} the exclusive set of ancestors of u. • parents(u) the minimal subset of A− (u) from which A− (u) can be inferred according to the taxonomy GT , i.e., if GT doesn’t contain taxonomic redundancies13 we obtain: parents(u) = C + (u). • D(u) the set of concepts which are subsumed by u, also named the descendants of u, i.e., D(u) = {c|{c, subClassOf, u} 6= ∅} ∪ {u}. We also denote D− (u) = D(u) \ {u} the exclusive set of descendants of u. • children(u) the minimal subset of D− (u) from which D− (u) can be inferred according to the taxonomy GT , i.e., if GT doesn’t contain taxonomic redundancies we obtain: children(u) = C − (u). • roots(GT ), shortened by roots, the set of concepts {c|A(c) = {c}}. We call the root, denoted as >, the unique concept (if any) which subsumes all concepts, i.e., ∀c ∈ C, c  >. • leaves(GT ), shortened by leaves, the set of concepts without descendants, i.e. leaves = {c|D(c) = {c}}. We also note leaves(u) the set of leaves subsumed by a concept (inclusive if u is a leaf), i.e., leaves(u) = D(u) ∩ leaves. • depth(u), the length of the longest path in {u, subClassOf, >}, for convenience we also consider depth(GT ) = argmax depth(c). c∈C • G+ T (u) the graph composed of A(u) and the set of relationships which link two concepts in A(u). • G− T (u) the graph composed of D(u) and the set of relationships which link two concepts in D(u). − • GT (u) = G+ T (u) ∪ GT (u) the graph induced by A(u) ∪ D(u). • Ω(u, v), the set of Non Comparable Common Ancestors (NCCAs) of the concepts u, v. Ω(u, v) is formally defined by: ∀(x, y) ∈ Ω(u, v), (x, y) ∈ {A(u)∩A(v)}×{A(u)∩A(v)}∧x ∈ / A(y)∧y ∈ / A(x). NCCAs are also called the Disjoint Common Ancestors (DCAs) in some contributions, e.g. (Couto et al., 2005). 12 E CC were used to introduce semantic graphs 13 Taxonomic redundancies refer to taxonomic relationships which can be inferred analysing other relationships. As an example if it is define that u ≺ v and v ≺ w, a relationship which explicitly defines that u ≺ w is considered redundant. 46 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES • A taxonomic tree is defined as a special case of taxonomy in which: ∀c ∈ C : |parents(c)| < 2. Despite the fact that these notations are used to characterise the taxonomy of concepts GT and that specific semantics is associated to the notations (e.g., parents, children), they can be used to characterise any poset. Using these notations, the next section introduces semantic evidence which are commonly used to assess the semantic similarity or relatedness of concepts or instances defined into semantic graphs. 3.2 Types of semantic measures and graph properties Two main groups of measures can be distinguished depending on the properties of semantic graphs they are adapted to: • Measures adapted to semantic graphs composed of (multiple) predicate(s) which potentially induce cycles. • Measures adapted to taxonomies, i.e., acyclic semantic graphs composed of a unique predicate inducing transitivity. The two types are introduced in the following sections. 3.2.1 Semantic measures on cyclic semantic graphs Considering all predicates defined in a semantic graph potentially leads to a cyclic graph. Nevertheless, only few semantic measures framed in the relational setting have been designed to deal with cycles. Since these measures take advantage of all predicates, they are generally used to evaluate semantic relatedness (and not semantic similarity). Notice that they can be used to compare concepts and instances. Two types of measures can be further distinguished: • Measures based on graph traversal, i.e., pure graph-based measures. These measures have initially been proposed to study node interactions in a graph and essentially derive from graph theory contributions. They can be used to estimate the relatedness of nodes considering that greater the (direct or indirect) interconnection between two nodes, the more related they are. These measures are not semantic measures per se but rather graph measures used to compare nodes. However, they can be used on semantic graphs and can also be adapted in order to take into account evidence of semantics defined in the graph (e.g. strength of connotation). • Measures based on the graph property model. These measures consider concepts or instances as sets of properties distinguished from the graph. Semantic measures based on graph traversals Measures based on graph traversals can be used to compare any pair of concepts or instances represented as nodes. These measures rely on algorithms designed for graph analysis which are generally used in a straightforward manner. Nevertheless, some adaptations have been proposed in order to take into account the semantics defined in the graph. Among the large diversity of measures and metrics which can be used to estimate the relatedness (distance, interconnection, etc.) of two nodes in a graph, we distinguish: • Shortest path approaches. • Random-walk approaches. • Other interconnection measures. The main advantage of these measures is their unsupervised nature. Their main drawback is the absence of extensive control over the semantics which are taken into account; this generates difficulties in justifying, explaining, and therefore analysing the resulting scores. However, in some cases, these drawbacks are reduced by enabling fine-grain control over the predicates considered during the comparison. This is done by tuning the contribution of each relationship or predicate. 3.2. TYPES OF SEMANTIC MEASURES AND GRAPH PROPERTIES 47 Shortest path approaches The shortest path problem is one of oldest problems of graph theory. It can be applied to compare both pairs of instances and concepts considering their relatedness as a function of the distance between their respective nodes. More generally, the relatedness is estimated as a function of the weight of the shortest path linking them. Classical algorithms proposed by graph theory can be used. The algorithm to use depends on specific properties of the graph, e.g., Do the constraints applied to the shortest path (really) induce cycles? Are there non-negative weights associated to relationships? Is the graph considered to be oriented? Rada et al. (1989) were among the first to use the shortest path technique to compare two concepts defined in a semantic graph (initially a taxonomy). This approach is sometimes denoted as the edge-counting strategy in the literature (edge refers to relationship). As the shortest path may contain relationships of any predicate we call it unconstrained shortest path (usp). One of the drawbacks of the usp in the design of semantic measures lies in the fact that the meaning of the relationships from where the relatedness derives is not taken into account. In fact, complex semantic paths which involve multiple predicates and only those composed of taxonomic relationships are considered equally. Therefore, propositions to penalise any usp reflecting complex semantic relationships have been proposed (Hirst and St-Onge, 1998; Bulskov et al., 2002). Approaches for considering particular predicates in a specific manner have also been described. To this end, a weighting scheme can be considered in order to tune the contribution of each relationship or predicate in the computation of the final score – this weighting scheme can be derived from the notion of strength of connotation (Section 3.3.3). Random walk approaches These approaches are based on a Markov chain model of random walks (Spitzer, 1964). The random walk is defined through a transition probability associated to each relationship. The walker can therefore walk from node to node – each node represents a state of the Markov chain. Several measures can be used to compare two nodes u and v based on this technique; a selection of measures introduced by Fouss et al. (2007) is listed: • The average first-passage time, hitting time, i.e., the average number of steps needed by the walker to go from u to v. • The average commute time, Euclidean commute time distance. • The average first passage cost. • The pseudo inverse of the Laplacian matrix. These approaches are closely related to spectral clustering and spectral embedding techniques (Saerens et al., 2004). Examples of measures based on random walk techniques are defined and discussed in (Muller et al., 2006; Hughes and Ramage, 2007; Ramage et al., 2009; Fouss et al., 2007; Alvarez and Yan, 2011; Garla and Brandt, 2012). As an example, the hitting time H(u, v) of two nodes u, v is defined as the expected number of steps needed by a random walker to go from u to v. The hitting time can recursively be defined by: X H(u, v) = 1 + p(u, k)H(k, v) (3.2) k∈N + (u) With N + (u) the set of nodes which are linked to u by an outgoing relationship starting from u and p(u, k) the transition probability of the Markov Chain: w(u, k) i∈N + (u) w(u, i) p(u, k) = P With w(u, k) the weight of the relationship between u and k. The commute time C(u, v) = H(u, v)+H(v, u) corresponds to the expected time needed for a random walker to travel from u to v and back to u. Intuitively, the more paths that connect u and v, the smaller their commute distance becomes. Several technical criticisms of classical approaches used to evaluate 48 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES hitting and commute times, as well as associated extensions, have been formulated in the literature, e.g., (Sarkar et al., 2008; von Luxburg et al., 2011). In a similar vein, approaches based on graph-kernel can also be used to estimate the relatedness of two nodes in a graph (Kondor and Lafferty, 2002); they have already been applied to the design of semantic measures by Guo et al. (2006). Note that these measures take advantage of second-order information which is generally hard to interpret (in terms of semantics). Other measures based on interaction analysis Several approaches exploiting graph structure analysis can be used to estimate the relatedness of two nodes through their interconnections. Chebotarev and Shamis (2006b,a) proposed the use of indirect paths linking two nodes by means of the matrix-forest theorem. simRank , proposed by Jeh and Widom (2002), is an example of such a measure. Considering N as the set of nodes of the graph, N − (n) as the nodes linked to the node n by a single relationship ending with n (i.e., in-neighbours), simRank similarity is defined by: X X |N | simRank (x, y) (3.3) simRank (u, v) = |N − (u)||N − (v)| − − x∈N (u) y∈N (v) Note that simRank is a normalised function. Olsson et al. (2011) propose an adaptation of the measure for semantic graphs built from Linked Data. Semantic measures for the graph property model The second type of measures which can be used to compare a pair of instances/concepts defined in a (potentially) cyclic semantic graph relies on the graph property model. Here the graph is not only considered as a data structure which highlights the interactions between the different elements it defines. It is considered as a data model in which concepts and instances are describes through sets of properties. The properties may sometimes refer to specific data types. Therefore, the nodes of the graph may refer to data values, concepts, instances or even predicates – the semantic graphs generally correspond to RDF graphs or labelled graphs. In this case the measures take advantage of semantic graphs by encompassing expressive definitions of concepts/instances through properties. The measures rely on the comparison of the different properties which characterise the concepts or instances being compared. Therefore the study of these measures inherits from early work related to both the comparison of objects defined into knowledge base and the comparison of entities defined in a subset of the first order logic (Bisson, 1992, 1995). As an example, these measures have been extensively studied for comparing objects analysing their different properties. They are based on the aggregation of specific measures enabling the comparison of each of the properties characterising compared objects (Valtchev and Euzenat, 1997; Valtchev, 1999b,a). Considering the domain of knowledge representation, these contributions have formed the basis of several frameworks which are used for comparing instances or concepts in the field of ontology alignment or instance matching, e.g., OWL Lite Alignment (OLA) method has been proposed to compare ontologies based on aggregations of several measures (Euzenat and Valtchev, 2004; Euzenat et al., 2004). In this presentation, we do not introduce the expressive formalisms which have been introduced in earlier contributions (Bisson, 1992, 1995; Euzenat and Valtchev, 2004; Euzenat et al., 2004; Harispe et al., 2013a), e.g. for comparing objects defined in a knowledge base (Valtchev and Euzenat, 1997; Valtchev, 1999b,a; Harispe et al., 2013a). We rather distinguish two general approaches which have been proposed and which are commonly used to compare concepts or instances. Elements represented as a list of direct property An element can be evaluated by studying its direct properties, i.e., the set of values associated to the element according to a specific predicate. As an example, focusing on relationships related to instances, two types of relationships can be distinguished: • Taxonomic relationships (isA) – relationships which link instances to concepts. • Non-taxonomic relationships: 3.2. TYPES OF SEMANTIC MEASURES AND GRAPH PROPERTIES 49 – Which link two instances (object properties in OWL). – Which link instances to data values (datatype properties in OWL). Two elements will be compared w.r.t values associated to each property considered. To this end, for each property considered, a specific measure will be used to compare associated values (concepts, data values, instances). Properties which link two instances associate a set of instances to the instance which is characterised. Considering Figure 3.2 page 43, the property genre can be used to characterise the instance rollingStones through a set of instances {i|∃(rollingStones, genre, i)}, i.e., {rock, ...}. Such properties therefore refer to sets, they are often compared using simple set-based measures – they will for example evaluate the cardinality of the intersection (e.g., the number of music genres that two bands have in common). Taxonomic properties are evaluated using semantic measures adapted to concept comparison. These measures will be presented in Section 3.4. Properties associated to data values can be compared using measures adapted to the type of data considered, e.g., a measure for comparing dates if the corresponding property refers to a date. Finally, the scores produced by the various measures (associated to the various properties) are aggregated in order to obtain a global score of relatedness of the two elements (Euzenat and Shvaiko, 2013). Such a representation has been formalised in the framework proposed by Ehrig et al. (2004). This is a strategy which is commonly adopted in ontology alignment, instance matching or link discovery between instances; SemMF (Oldakowski and Bizer, 2005), SERIMI (Araujo et al., 2011) and SILK (Volz et al., 2009) are all based on this approach. The reader can also refers to the extensive survey presented in (Euzenat and Shvaiko, 2013). Consideration of indirect properties of elements Several contributions underline the relevance of indirect properties in comparing entities represented through graphs, especially in object models (Bisson, 1995). Referring to Figure 3.2 (page 43), indirect properties might be used to consider properties of music genres (e.g., rock, rockNroll) to compare two music bands (e.g., rollingStones - doors). This approach relies on a representation of the compared elements which is an extension of the canonical form used to represent an element as a list of properties. This approach can be implemented to take into account the indirect properties of compared elements, e.g., properties induced by the elements associated to the element that we want to characterise. Albertoni and De Martino (2006) extended the formal framework proposed in Ehrig et al. (2004) to allow for the consideration of some indirect properties. This framework is dedicated to instance comparison. It formally defines an indirect property of an instance along a path in the graph. The indirect properties to be taken into account depend on the context of use of the framework, e.g., application context. From a different perspective, Andrejko and Bieliková (2013) suggested an unsupervised approach to compare two instances by considering their indirect properties. Each direct property which is shared between the compared instances plays a role in computing the global relatedness. When the property links two instances, a recursive process is applied to take into account properties of associated instances with the instances being processed. Lastly, the measure aggregates the scores obtained during the recursive process. The authors have also proposed to weigh the contribution of the various properties in the aggregation so as to define a personalised information retrieval approach. In (Harispe et al., 2013a) the authors also proposed an approach enabling more expressive formulations of measures to compare entities based on the analysis of direct and indirect properties. This approach enables to define aggregations of properties in order to consider new properties during the comparison of entities, e.g. it is impossible to evaluate an instance of a class Person whose weight and size have been specified through his body mass index (which can be computed from the weight and size alone). All the measures which can be used on the whole semantic graph G can also be used for any reduction GR0 ⊆ G; the reduction GR0 is the subgraph of G built only considering the relationships of G that are of specific types defined into R0 ⊂ R, with R the set of types of relationships of G. As an example, 50 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES the taxonomy GT is the reduction GR0 ⊆ G obtained defining R0 = {subClassOf}.14 Depending on the types of relationships that are considered, i.e. R0 , a large number of reductions can be obtained. Some of them have the interesting property to be acyclic. Depending on the topological properties of the reduction, two cases can be distinguished: 1. The reduction GR0 leads to a cyclic graph. Measures presented for cyclic graphs can be used. 2. GR0 is acyclic – particular techniques and algorithms can be used. Most semantic measures defined for acyclic graphs focus on taxonomic relationships defined in GR0 and consider the reduction to be the taxonomy of concepts GT . However, some measures consider a specific subset of R0 , e.g., R0 = {isA, partOf}, which also produces an acyclic graph (Wang et al., 2007). The measures which can be used in this case are usually a generalisation of semantic similarity measures designed for GT . 3.2.2 Semantic measures on acyclic graphs Semantic measures applied to graph-based ontologies were originally designed for taxonomies. Since most ontologies are usually composed mainly of taxonomic relationships or represent poset structures, substantial literature is dedicated to semantic similarity measures15 . In particular, a large diversity of semantic measures focus on GT and have been defined for the comparison of pairs of concepts. These measures are presented in details in Section 3.4. 3.3 Semantic evidence in semantic graphs and their interpretations A semantic graph carries explicit semantics, e.g. through the taxonomy defining concepts partial ordering. It also contains implicit semantic evidence. According to Section 1.3.1 page (15), we consider semantic evidence as any information on which interpretations can be based according to the meaning carried by the ontology or the elements it defines (concepts, instances, relationships). Semantic evidence derives from the study of specific factors (e.g., number of concepts, depth of a concepts, average number of relationships associated to a concept) which can be used to discuss particular properties of the semantic graph (e.g., coverage, expressiveness) or particular properties of its elements (e.g. specificity of concepts). The acquisition of semantic evidence is generally made using the following process. Based on the analysis of specific factors using particular metrics, some properties of both the semantic graph and the elements it defines can be obtained. Based on these properties, and either based on high assumptions or theoretically justified by the core semantics on which relies the ontology, semantic evidence can be obtained. As an example of semantic evidence, the number of concepts described in a taxonomy can be interpreted as a clue on the degree of coverage of the ontology. One can also consider that the deeper a concept w.r.t the depth of GT , the more specific the concept. As we will see, several properties are used to consider extra semantics from semantic graphs; they are especially important for the design of semantic measures. Indeed, semantic evidence is core elements of measures; it has been used for instance to: (i) normalise measures, (ii) estimate the specificity of concepts and to (iii) weigh the relationships defined in the graph, i.e., to estimate the strength of connotation between concept/instances. It is therefore central for both designers and users of semantic measures to know: (i) the properties which can be used to derive semantic evidence, (ii) how it is computed, and (iii) the assumptions on which its interpretation relies. Most of the properties used to derive semantic evidence are well-known graph properties defined by graph theory. In this section, we only introduce the main properties which are based on the study of a taxonomy of concepts (GT ). We go on to introduce two applications of these properties: the estimation of the specificity of concepts and the estimation of the strength of connotation between concepts. 3.3.1 Semantic evidence in taxonomies Semantic evidence used to process more general semantic graphs are adaptations of the graph properties commonly used to assess the similarity of nodes of a taxonomy. The interested reader can refer 14 In the Figure 3.2, page 43, subClassOf relationships are in red color and the taxonomic reduction G T = GR 0 ⊆ G obtained defining R0 = {subClassOf} thus corresponds the graph shown onto the layer C. 15 According to the literature we consider that semantic measures on G are necessarily semantic similarity measure. T 3.3. SEMANTIC EVIDENCE IN SEMANTIC GRAPHS AND THEIR INTERPRETATIONS 51 to the numerous contributions proposed by the graph theory community. In this section we mainly focus on semantic evidence commonly exploited in taxonomies. Two kinds of semantic evidence can be distinguished: • Intentional evidence which can also be called intrinsic evidence, which is based on the analysis of properties associated to the topology of GT . • Extensional evidence which is based on the analysis of both the topology of GT and the distribution of concepts’ usage, i.e., the number of instances associated to concepts. Notice that we don’t consider semantic evidence purely extensional, i.e., only based on concepts’ usage, without taking the taxonomy into account. Indeed, in most cases, the distribution of concepts’ usage must be evaluated considering the transitivity of the taxonomic relationship. If this is not the case, incoherent results could be obtained, As an example, if the transitivity of the taxonomic relationship is not considered to propagate the usage of concepts (instance membership), the distribution of instances can be incoherent w.r.t the partial order defined by the taxonomy, i.e., a concept can have more instances than one of its ancestors. We further distinguish the evidence which is based on global properties (i.e., derived from the full taxonomy), from that based on local properties of concepts. Intentional evidence Global properties • Depth of the taxonomy – maximal number of ancestors of a concept The depth of the taxonomy corresponds to the maximal depth of a concept in GT . It informs on the degree of expressiveness/granularity of the taxonomy. As an example, the deeper GT , the more detailed the taxonomy is expected to be. The maximal number of ancestors of a concept is also used as an estimator of the upper bound of the degree of expressiveness of a concept. Inversely, the number of concepts defined in GT , i.e., |D(>)| if > exists, can also be used as an upper bound of the degree of generality of a concept. • Diameter – width of the taxonomy The width of the taxonomy corresponds to the length of the longest shortest path which links two concepts in GT .16 It also informs on the degree of coverage of the taxonomy. GT is generally assumed to better cover a domain the bigger its diameter. The rational of this assumption is that bigger is the diameter, the higher the maximal number of concepts separating two concepts and therefore the higher is the likelihood that meaningful concepts of the domain have been expressed into the ontology. Local properties • Local density It can be considered that relationships in dense parts of a taxonomy represent smaller taxonomic distances. Metrics such as compactness can be used to characterise local density (Botafogo et al., 1992)17 . Other metrics such as the (in/out)-branching factor of a concept (|C + (u)|, |C − (u)|), the number of neighbours of a given concept (|C(u)|), can also be used (Sussna, 1993). It is generally assumed that the higher the number of neighbours of a concept, the more general it is. • Number of ancestors – depth – number of descendants – number of subsumed leaves – distance to leaves. 16 Backtracks, 17 Author loops or detours excluded, ref: http://mathworld.wolfram.com/GraphDiameter.html also introduces interesting factors for graph-based analysis; the depth of a node is also introduced. 52 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES The number of ancestors of a concept is often considered to be directly proportional to its degree of expressiveness. The more a concept is subsumed, the more detailed/restrictive the concept is expected to be. The number of ancestors can also be interpreted w.r.t the maximal number of ancestors a concept of the taxonomy can have. The depth of a concept is also expected to be directly proportional to its degree of expressiveness. The deeper the concept (according to the maximal depth), the more detailed/restrictive the concept is regarded18 . A local depth of a concept can also be evaluated according to the depth of the branch in which it is defined. In a similar fashion, in some cases the distance of a concept to the leaves it subsumes, or the number of leaves it subsumes, will be considered as an estimator of expressiveness: the greater the distance/number the less expressive the concept is considered. Extensional evidence Global properties • Distribution of instances among the concepts. The distribution of instances among concepts, i.e., concept usage, can be used to design local correction factors, e.g., to correct estimations of the expressiveness of a concept. This is generally made by evaluating the balance of the distribution. Local properties • Number of instances associated to a concept The number of instances of a concept is expected to be inversely proportional to its expressiveness, the less instances a concept has, the more specific it is expected to be. This semantic evidence and its interpretations have been used to characterise notions extensively used by semantic measures. They are indeed used to estimate the specificity of concepts as well as the strength of connotations between concepts. These two notions are introduced in detail in the following subsections. 3.3.2 Concept specificity Not all concepts have the same degree of specificity. Indeed, most people will agree that Dog is a more specific description of a LivingBeing than Animal. The notion of specificity can be associated to the concept of salience which has been defined by Tversky (1977) to characterise a stimulus according to its “intensity, frequency, familiarity, good form, and informational content”. In Bell et al. (1988), it is also specified that “salience is a joint function of intensity and what Tversky calls diagnosticity, which is related to the variability of a feature in a particular set [i.e., universe, collection of instances]”. The idea is to capture the amount of information carried by a concept – this amount is expected to be directly proportional to its degree of specificity and generality. The notion of specificity of a concept is not totally artificial and can be explained by the roots of taxonomies. Indeed, the transitivity of the taxonomic relationship specifies that not all concepts have the same degree of specificity or detail. In knowledge modelling, the ordering of two concepts u ≺ v defines that u must be considered as more abstract (less specific) than v. In fact, the taxonomy explicitly defines that all instances of u are also instances of v. This expression is illustrated by Figure 3.3; we can see that the more a concept is subsumed by numerous concepts: (A) the number of properties which characterise the concept increases (intentional interpretation), and (B) its number of instances decreases (extensional interpretation). Therefore, another way of comparing the specificity of concepts defined in a total order19 is to study their usage, analysing their respective number of instances. The concept which contains the highest 18 Note that the depth of a concept as an estimator of its degree of expressiveness can be seen as an inverse function of the notion of status introduced by Harary et al. (1965) for organisation study. 19 For any pair of concepts u, v either u  v or v  u. 3.3. SEMANTIC EVIDENCE IN SEMANTIC GRAPHS AND THEIR INTERPRETATIONS 53 Figure 3.3: Set-based representations of ordered concepts according to (A) their intentional expressions in term of properties characterising the concepts, and (B), in term of their extensional expressions, i.e., the set of instances which compose the concept. Figure based on Blanchard (2008). Figure 3.4: Potential set-based representations of non-ordered concepts according to (A) their intentional expressions in term of properties characterising the concepts, and (B), in term of their extensional expressions, i.e., the set of instances associated to the concepts. Figure based on Blanchard (2008). number of instances will be the least specific (its universe of interpretation is larger). In this case, it is therefore possible to assess the specificity of ordered concepts either by studying the topology of the graph, or the set of instances associated to them. Nevertheless, in taxonomies, concepts are generally only partially ordered. This implies that presented evidence used to compare the specificity of two ordered concepts cannot be used without assumptions, i.e., concepts which are not ordered are in some sense not comparable. This aspect is underlined in Figure 3.4. It is impossible to compare, in an exact manner, the specificity of two non-ordered concepts. This is due to the fact that the amount of shared and distinct properties between these concepts can only be estimated w.r.t the properties which characterise the common concepts they derive from, i.e., their Non Comparable Common Ancestors (NCCAs). However, this estimation can only be a lower bound of their commonality since extra properties shared by the two concepts may not be carried by such NCCAs. As we will see, the estimation of the degree of specificity of concepts is of major importance in the design of semantic measures. Therefore, given that discrete levels of concept specificity are not explicitly expressed in a taxonomy, various approaches and functions have been explored to evaluate concept specificity. We denote such a function as θ: θ : C → R+ (3.4) 54 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES The function θ may rely on the intrinsic and/or extrinsic properties presented above. It must be in agreement with the taxonomic representation which defines that concepts are always semantically broader than their specialisations20 . Thus, θ must monotonically decrease from the leaves (concepts without descendants) to the root(s) of the taxonomy: x  y ⇒ θ(x) ≥ θ(y) (3.5) We present examples of θ functions which have been defined in the literature. Basic intrinsic estimators of concept specificity The specificity of concepts can be estimated considering the location of its corresponding node in the graph. A naive approach will define the specificity of the concept c, θ(c), as a function of some simple properties related to c, e.g., θ(c) = f (depth(c)), θ(c) = f (A(c)) or θ(c) = f (D(c)) with A(c) and D(c) the ancestors and descendants of c. The main drawback of simple specificity estimators is that concepts with a similar depth or an equal number of ancestors/descendants will have similar specificities, which is a heavy assumption. In fact, two concepts can be described with various degrees of detail, independently of their depth, e.g., (Yu et al., 2007a). More refined θ functions have been proposed to address this limitation. Extrinsic information content Another strategy explored by designers of semantic measures has been to characterise the specificity of concepts according to Shannon’s Information Theory. The specificity of a concept will further be regarded as the amount of information the concept conveys, its Information Content (IC). The IC of a concept can for example be estimated as a function of the size of the universe of interpretations associated to it (i.e. instances). The IC is a common expression of θ and was originally defined by Resnik (1995) to assess the informativeness of concepts from a corpus of texts. The IC of the concept c is defined as inversely proportional to p(c), the probability to encounter an instance of c in a collection of instances (negative entropy). The original IC definition was based on the number of occurrences of a concept in a corpus of texts. We denote eIC any IC which relies on extrinsic information, i.e., information not provided by the ontology21 . They are based on the analysis of concept usage in a corpus of texts or on the analysis of a collection of instances for which associated concepts are known22 . We consider the formulation of eIC originally defined by Resnik (1995): |I(c)| p(c) = |I| with I(c) the set of instances of c, e.g., occurrences of c in a corpus, instances in an ontology {i|{i, hisA, subClassOf∗ i, c} = 6 ∅}. eICResnik (c) = −log(p(c)) (3.6) = log(|I|) − log(|I(c)|) The suitability of the log function can be supported by the work of Shepard (1987)23 . Notice also the link with Inverse Document Frequency (IDF) which is commonly used in information retrieval (Jones, 1972): |I| ) |I(c)| = log(|I|) − log(|I(c)|) IDF (c) = log( (3.7) = IC(c) 20 This explains that the specificity of concepts cannot be estimated only considering extrinsic information. that if the instances are represented in the graph, some eIC are indeed iIC. 22 As an example, usage of concepts defined in the Gene Ontology can be known studying gene annotations which provide genes and associated Gene Ontology concepts, e.g. refer to UniprotKB. 23 Shepard derived his universal law of stimulus generalisation based on the consideration that logarithm functions are suited to approximate semantic distance (Al-Mubaid and Nguyen, 2006). 21 Note 3.3. SEMANTIC EVIDENCE IN SEMANTIC GRAPHS AND THEIR INTERPRETATIONS 55 The main drawback of θ functions based on extrinsic information lies in their tight dependence on concepts usage: they will automatically reflect its bias24 . Nevertheless, in some cases, the consideration of such bias is desired as all concepts which are highly represented will be considered less informative, even the concepts which seem specific w.r.t intrinsic factors (e.g., depth of concepts). However, in some cases, bias in concept usage can badly affect IC estimation and may not be adapted. In addition, IC computation based on text analysis can be both time consuming and challenging given that, in order to be accurate, complex disambiguation techniques have to be used to detect which concept occurs in texts or knowledge bases. Intrinsic information content In order to avoid the dependency of eIC calculus to concept usage, various intrinsic IC formulations (iIC ) have been proposed. They can be used to define θ functions by only considering structural information extracted from the ontology, e.g., the intrinsic factors presented in Section 3.3.1. iIC formulations extend basic specificity estimators presented above. Multiple topological characteristics can be used to express iIC, e.g., number of descendants, ancestors, depths, etc. (Seco et al., 2004; Schickel-Zuber and Faltings, 2007; Zhou et al., 2008; Sánchez et al., 2011). As an example, the formulation proposed by Zhou et al. (2008) enables to consider the contribution of both the depth and the number of descendants of a concept to compute its specificity:   log(depth(c)) log(|D(c)|) + (1 − k) (3.8) iICZhou (c) = k 1 − log(|C|) log(depth(GT )) with |C| the number of concepts defined in the taxonomy,D(c) the descendants of c, depth(c) its depth, depth(GT ) the maximal depth of a concept in GT and k ∈ [0, 1] a parameter used to set the contribution of both components (originally set to 0.6). In (Sánchez et al., 2011), the iIC incorporates additional semantic evidence in the aim of better distinguishing the concepts with the same numbers of descendants but different degrees of concreteness – here captured as a function of the number of ancestors a concept has.   |leaves− (c)| +1 |A(c)|  (3.9) iICSanchez (c) = −log  |leaves| + 1 We denote leaves− (c) the exclusive set of leaves of the concept c, i.e., if c is a leaf leaves− (c) = ∅. Note that iICSanchez will set the same iIC for each leaf. To avoid this, we propose the following modification:   iICSanchez0 (c) = −log  |leaves(c)| |A(c)| |leaves| + 1  (3.10) iICs are of particular interest as only the topology of the taxonomy is considered. They prevent errors related to bias on concept usage. However, the relevance of iIC relies on the assumption that GT expresses enough knowledge to rigorously evaluate the specificities of concepts. Therefore, as a counterpart, iICs are sensitive to structural bias in the taxonomy and are therefore sensitive to unbalanced taxonomy, degrees of completeness, homogeneity and coverage of the taxonomy (Batet et al., 2010a). Non-taxonomic information content Both introduced iIC and eIC only take taxonomic relationships into account. In order to take advantage of all predicates and semantic relationships, Pirró and Euzenat (2010a) proposed the extended IC (extIC). extIC(c) = αEIC(c) + βIC(c) (3.11) P X u∈Cr (u) iIC(u) EIC(c) = |Cr (u)| r∈R With Cr (u) the set of concepts linked to the concept c by any relationship of type r ∈ R (i.e., generalisation of C(u)). In this formula, the contribution of the various relationships of the same predicate 24 As an example, this can be problematic for GO-based studies as some genes are studied and annotated more than others (e.g., drug related genes) and annotation distribution patterns among species reflect abnormal distortions, e.g. human – mouse (Thomas et al., 2012). 56 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES is averaged. However, the more a concept establishes relationships of different predicates, the higher its EIC will be. We thus propose to average EIC by |R|, or to weigh the contribution of the different predicates. List of functions defined to estimate concept specificity We have presented various strategies which can be used to estimate the specificities of concepts defined in a partially ordered set (θ functions). It is important to understand that these estimators are based on assumptions regarding ontologies. Table 3.1 lists some of the properties of some of the θ functions proposed in the literature – proposals are ordered by date. Ex inf. refers to the use of extensional information. [0, 1] [0, 1] [0, 1] [0, +∞[ No No No Yes IC Resnik intrinsic (Resnik, 1995) IC Seco (Seco, 2005) Depth non-linear (Seco, 2005) TAM (Yu et al., 2007a) No No No No No and al., Eu(A) (B) APS (Schickel-Zuber Faltings, 2007) IC Zhou (Zhou et 2008) extIC (Pirró and zenat, 2010a) IC Sanchez et al (Sánchez et al., 2011) IC Sanchez et al. (Sánchez et al., 2011) [0, +∞[ [0, +∞[ [0, 1] [0,1] [0,1/2] [0, +∞[ Consider the number of leaves contained in D(c), the higher it is, the less specific c is considered. Refined version A (see above) exploiting D(c). Parametric hybrid iIC mixing Seco’s IC and nonlinear depth. iIC based on all predicates. The probability p(c) associated to a concept is computed as the number of pairs of instances which are members of c divided by total the number of pairs. Inverse Document Frequency (IDF) obtained by dividing the number of instances by the number of instances of the concept (Jones, 1972), i.e. IDF (c) = log(|I|/|I(c)|). As we saw, in Section 3.3.2, this formulation is similar to IC proposed by Resnik (1995). iIC based on the number of descendants of a concept. Normalised depth or max depth can be used. In a graph, considering the minimal depth of a concept doesn’t ensure that the specificity increases according to the partial ordering (due to multi-inheritance). Depend on concept usage. IC(c) = −log(|I(c)|/|I|). Normalised versions have also been proposed, e.g., (Sheehan et al., 2008). Resnik’s IC with ∀c ∈ C the number of instances associated to c (without taxonomic inferences) set to one. IC estimated from the number of descendants. Use log to introduce non-linear estimation of depth. Comments Table 3.1: Selection of θ functions which can be used to estimate the specificity of a concept defined in a taxonomy. Yes IDF (Chabalier et al., 2007) [0, +∞[ , [0, 1] Yes IC Resnik (Resnik, 1995) Depth Codomain [0, 1] Ex inf No Names – References 3.3. SEMANTIC EVIDENCE IN SEMANTIC GRAPHS AND THEIR INTERPRETATIONS 57 58 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES 3.3.3 Strength of connotations between concepts A notion strongly linked to concept specificity is the strength of connotation between a pair of concepts/instances, i.e., the strength of the relationship(s) which links two concepts/instances. Otherwise stated, this notion can be used to assess the strength of interaction associated to a specific relationship. Considering taxonomic relationships, it is generally considered that the strength of connotation between concepts is stronger the deeper two concepts are in the taxonomy. As an example, the taxonomic relationship linking concepts SiberianTiger and Tiger will generally be considered to be stronger than the one linking the concepts Animal and LivingBeing. Such a notion is quite intuitive and has for instance been studied by Quillian and Collins in the early studies of semantic networks (Collins and Quillian, 1969) – hierarchical network models were built according to response time to questions, i.e., mental activations evaluated w.r.t the time people took to correctly answer questions related to two concepts, e.g., a Canary is an Animal – a Canary is a Bird – a Canary is a Canary. Based on the variation of times taken to correctly answer questions involving two ordered concepts (e.g., Canary – Animal), the authors highlighted human sensibility to non-uniform strength of connotation and its link to concept specificity. It is worth noting that the estimation of the strength of connotation of two linked concepts is in some sort a measure of the semantic similarity or taxonomic distance between two directly ordered concepts. The models used to estimate the strength of connotation between two concepts are generally based on the assumption that the taxonomic distance associated to a taxonomic relationship shrinks with the depth of the two concepts it links (Richardson et al., 1994). Given that the strength of connotation between concepts is not explicitly expressed in a taxonomy, it has been suggested that several intrinsic factors need considering in order to refine its estimation, e.g., (Richardson et al., 1994; Young Whan and Kim, 1990; Sussna, 1993). A taxonomy only explicitly defines the partial ordering of its concepts, which means that if a concept v subsumes another concept u, all the instances of u are also instances of v, i.e., u  v ⇒ I(u) ⊆ I(v). Nevertheless, non-uniform strength of connotation aim to consider that all taxonomic relationships do not convey the same semantics. Strictly speaking, taxonomic relationships only define concept ordering and concept inclusion. Therefore, according to the extensional interpretation which can be made of a taxonomy, the size of the universe of interpretation of a concept, i.e., the size of the set of its possible instances w.r.t the whole set of instances, must reduce the more a concept is specialised25 . This reduction of the universe of eligible interpretations associated to a concept (i.e. instances), corresponds to a specific understanding of the semantics of non-uniform strengths of connotation. Alternative explanations which convey the same semantics can also be expressed according to the insights of the various cognitive models which have been introduced in Section 1.2.1: • Spatial/Geometric model: it states that the distance between concepts is a non-linear function which must take salience of concept into account. • Feature model (which represents a concept as a set of properties): It can be seen as the difficulty to further distinguish a concept which is relevant to characterise the set of instances of a domain. • Alignment and Transformational models: the effort of specialisation which must be done to extend a concept increases the more a concept has been specialised. All these interpretations state the same central notion – the strength of connotation which links two concepts is a function of two factors: (i) the specificities of the linked concepts, and (ii) the variation of these specificities. The semantic evidence introduced in the previous section, as well as the notion of IC, can be used to assess the strength of connotation of two concepts. As an example, the strength of connotation w which characterises a taxonomic relationship linking two concepts u, v, with u  v, can be defined as a function of the ICs of u and v (Jiang and Conrath, 1997): w(u, v) = IC(u) − IC(v). It is important to stress that estimations of the strength of connotations based on the density of concepts, the branching factor, the maximal depth or the width of the taxonomy, are based on assumptions regarding the definition of the ontology. We have presented various semantic evidence which can be used to extract knowledge from an ontology represented as a semantic graph. We have also presented two applications of such semantic evidence for 25 We here consider a finite universe. 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 59 assessing the specificity of a concept defined in a taxonomy and the strength of interaction between two elements defined in a semantic graph. As we will see, semantic evidence are central for the definition of semantic measures. We will now introduce semantic measures which can used to compare pairs of concepts and pairs of groups of concepts. 3.4 Semantic similarity between a pair of concepts The majority of semantic measures framed in the relational setting have been proposed to assess the semantic similarity or taxonomic distance of a pair of concepts defined in a taxonomy. Given that they are designed to compare two concepts, these measures are denoted as pairwise measures in some communities, e.g., bioinformatics (Pesquita et al., 2009a). As we will see, extensive literature is dedicated to these measures – they can be used to compare any pairs of nodes expressed in a graph which defines a (partial) ordering, that is to say, any graph structured by relationships which are transitive, reflexive and antisymmetric (e.g., isA, partOf). The main approaches used to compare concepts defined in a taxonomy are: • Measures based on graph structure analysis. They estimate the similarity as a function of the degree of interconnection between concepts. They are generally regarded as measures which are framed in the spatial model – the similarity of two concepts is estimated as a function of their distance in the graph, e.g., based on the analysis of the lengths of the paths which link the concepts. These measures can also be considered as being framed in the transformational model by considering them as functions which estimate the similarity of two concepts regarding the difficulty to transform one concept into another. • Measures based on concept features analysis. This approach extracts features of concepts from the graph. These features will be subsequently analysed to estimate the similarity as a function of shared and distinct features of the compared concepts. This approach is conceptually framed in the feature model. The diversity of feature-based measures relies on the diversity of strategies which have been proposed to characterise concept features, and to take advantage of them in order to assess the similarity. • Measures based on Information Theory. Based on a function used to estimate the amount of information carried by a concept, i.e., its Information Content (IC), these measures assess the similarity w.r.t the amount of information which is shared and distinct between compared concepts. This approach is framed in information theory. However, in some cases, it can be seen as a derivative of the feature-based approach in which features are not compared using a boolean featurematching evaluation (shared/not shared), but also incorporate their saliency, i.e. their degree of informativeness. • Hybrid measures. Measures which are based on multiple paradigms. The broad classification of measures that we propose is interesting as an introduction to basic approaches defined to assess the similarity of two concepts – and to put them in perspective with the models of similarity proposed by cognitive sciences. It is however challenging to constrain the diversity of measures to this broad classification. It is important to understand that these four main approaches are highly interlinked and cannot be seen as disjoint categories. As an example, all measures rely in some sense on the analysis of the structure of the taxonomy, i.e., they all take advantage of the partial ordering defined by the (structure of the) taxonomy. These categories must be seen as devices used by designers of semantic measures to introduce approaches and to highlight relationships between several proposals. Indeed, as we will see, numerous approaches can be regarded as hybrid measures which take advantage of techniques and paradigms used to characterise measures of a specific approach. Therefore, the affiliation of a specific measure to a particular category is often subject to debate, e.g., as it is exposed in (Batet, 2011). This can be partially explained by the fact that several measures can be redefined or approximated using reformulations, in a way that further challenge the classification. Indeed, the more you analyse semantic measures, the harder it is to restrict them to specific boxes; the analogy can be made with the relationship between cognitive models of similarity26 . 26 Refer to dedicated Section 1.2.1 and more particularly to efforts made for the unification of the various models. 60 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Several classifications of measures have been proposed. The most common one is to distinguish measures according to the elements of the graph that they take into account (Pesquita et al., 2009a). This classification distinguishes three approaches: (i) edge-based – measures focusing on relationship analysis, (ii) node-based – measures based on node analysis, and (iii) hybrid measures – measures which mix both approaches. In the literature, edge-based measures often refer to structural measures, nodebased measures refer to measures framed in the feature-model and those based on information theory. Hybrid measures are those which implicitly or explicitly mix several paradigms. Another interesting way to classify measures is to study whether they are (i) intentional, i.e., based on the explicit definition of the concepts expressed by the taxonomy, (ii) extensional, i.e., based on the analysis of the realisations of the concepts (i.e., instances), or (iii) hybrid, measures which mix both intentional and extensional information about concepts. Refer to (Gandon et al., 2005; Aimé, 2011)27 for examples of such classifications. In some cases, authors will mix several types of classifications to present measures. In this section, we will introduce the measures according to the four approaches presented above: (i) structural, (ii) feature-based, (iii) framed in information theory, and (iv) hybrid. We will also specify the extensional, intentional, or hybrid nature of the measures. Numerous concept-to-concept measures have been defined for trees, i.e. special taxonomies which correspond to graphs without multiple inheritances. In the literature, these measures are generally considered to be applied as it is on taxonomies (which are DAGs). However, in DAGs, some adaptations deserve to be made and several components of measures generally need to be redefined in order to avoid ambiguity, e.g., to be implemented on computer software. For the sake of clarity, we first highlight the diversity of proposals by introducing the most representative measures defined according to the different approaches. In most cases, measures will be presented according to their original definitions. When the measures have been defined for trees, we will not necessarily stress the modifications which must be taken into account for them to be used on DAGs. These modifications will be discussed after the introduction of the diversity of measures. For convenience, subClassOf relationships will be denoted isa – there is no ambiguity with isA since GT only contains concepts. 3.4.1 Structural approach Structural measures rely on graph-traversal approaches presented in Section 3.2.1 (e.g., shortest path techniques, random walk approaches). They focus on the analysis of the interconnection between concepts to estimate their similarity. However, most of the time, they consider specific tuning in order to take into account specific properties and interpretations induced by the transitivity of the taxonomic relationships. In this context, some authors, e.g., (Hliaoutakis, 2005), have linked this approach to the spreading activation theory (Collins and Loftus, 1975). The similarity is in this case seen as a function of propagation between concepts through the graph. Back in the eighties, Rada et al. (1989) expressed the taxonomic distance of two concepts defined in a taxonomic tree as a function of the shortest path linking them28 . We denote sp(u, isa∗ , v) the shortest path between two concepts u and v, i.e., the path of minimal length in {u, isa∗ , v}. Remember that the length of a path has been defined as the sum of the weights associated to the edges which compose the path. When the edges are not weighted we refer to the edge-counting strategy – the length of the shortest path is the number of edges it contains. The taxonomic distance is therefore defined by29 : distRada (u, v) = sp(u, isa∗ , v) (3.12) Distance-to-similarity conversions can also be applied to express a similarity from a distance. A semantic similarity can therefore be defined in a straightforward manner: simRada (u, v) = 1 distRada (u, v) + 1 (3.13) Notice the importance of considering the transitive reduction of the tree/graph to obtain coherent results using measures based on the shortest path. In the following presentation, we consider that the 27 In french. is worth noting that they didn’t invent the notion of shortest path in a graph. In addition, in Foo et al. (1992), the authors refer to a measure proposed by Gardner et al. (1987) to compare concepts defined in a conceptual graph using the shortest path technique. 29 In this chapter, equations named dist refer to taxonomic distances. 28 It 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 61 taxonomy GT doesn’t contain redundant relationships (here redundancies refer to relationships which can be inferred due to the transitivity of taxonomic relationships). In a tree, the shortest path sp(u, isa∗ , v) contains a unique common ancestor of u and v. This common ancestor is the Least Common Ancestor (LCA)30 of the two concepts according to any function θ (since the θ function is monotonically decreasing)31 . Therefore, in trees, we obtain distRada (u, v) = sp(u, isa, LCA(u, v)) + sp(v, isa, LCA(u, v)). Several issues with the shortest path techniques have been formulated. The edge-counting strategy, or more generally any shortest path approach with uniform edge weight, has been criticised for the fact that the distance represented by an edge linking two concepts does not take concept specificities/salience into account32 . Several modifications have therefore been proposed to break this constraining uniform appreciation of edges. Implicit or explicit models defining non-uniform strength of connotation between concepts have therefore been introduced e.g., (Young Whan and Kim, 1990; Sussna, 1993; Richardson et al., 1994). One of the main challenges of designers of semantic measures over the years has therefore been to refine measures by taking advantage of semantic evidence related to concept specificity and the strength of connotation between concepts. The different strategies and factors used to appreciate concept specificity as well as strength of connotations have already been introduced in Section 3.3. Another use of the various semantic evidence which can be extracted from GT has been to normalise the measures. As an example, Resnik (1995) suggested considering the maximal depth of the taxonomy to bound the edge-counting strategy: simResnik−eb (u, v) = 2 · depth(GT ) − sp(u, isa, LCA(u, v)) − sp(v, isa, LCA(u, v)) (3.14) To simulate non uniform edge weighing, Leacock and Chodorow (1998)33 introduced a logarithmic transformation of the edge counting strategy:   N = log(2 · depth(GT )) − log(N ) (3.15) simLC (u, v) = −log 2 · depth(GT ) with N the cardinality of the union of the sets of nodes involved in the shortest paths sp(u, isa, LCA(u, v)) and sp(v, isa, LCA(u, v)). Authors have also proposed taking into account the specificity of compared concepts, e.g., (Mao and Chu, 2002), sometimes as a function of the depth of their LCA, e.g.,(Wu and Palmer, 1994; Pekar and Staab, 2002; Wang et al., 2012b). As an example, Wu and Palmer (1994) proposed expressing the similarity of two concepts as a ratio taking into account the shortest path linking the concepts as well as the depth of their LCA. simW P (u, v) = 2 · depth(LCA(u, v)) 2 · depth(LCA(u, v)) + sp(u, isa, LCA(u, v)) + sp(v, isa, LCA(u, v)) This function is of the form: f (x, y, z) = (3.16) x (x + (y + z)/2) with x the depth of the LCA of the two concepts u, v and y + z the length of the shortest path linking u, v. It is easy to see that for any given non-null length of the shortest path, this function increases with x; otherwise stated, to a given shortest path length, simW P (u, v) increases with the depth of LCA(u, v). In addition, as expected, for a given depth of the LCA, the longer the shortest path which links u, v, less similar they will be considered. Based on a specific expression of the notion of depth, a parametrised expression of simW P has been proposed in Wang and Hirst (2011). A variation was also proposed by Pekar and Staab (2002): simP S (u, v) = depth(LCA(u, v)) sp(u, isa, LCA(u, v)) + sp(v, isa, LCA(u, v)) + depth(LCA(u, v)) (3.17) 30 The Least Common Ancestor is also denoted as the Last Common Ancestor (LCA), the Most Specific Common Ancestor (MSCA), the Least Common Subsumer/Superconcept (LCS) or Lowest SUPER-ordinate (LSuper) in the literature. 31 Here relies the importance of applying the transitive reduction of the taxonomic graph/tree, redundant taxonomic relationships can challenge this statement and therefore heavily impact the semantics of the results. 32 As an example, Foo et al. (1992) quotes remarks made in Sowa personal communication. 33 Note that according to Resnik (1995), this approach was already proposed in an 1994 unpublished paper by the same authors (Leacock and Chodorow, 1994). 62 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Zhong et al. (2002) also proposed comparing concepts taking into account the notion of depth: distZhong (u, v) = 2 · 1 2k depth(LCA(u,v)) − 1 2k depth(u) − 1 2k depth(v) (3.18) with k > 1 a factor defining the contribution of the depth. In a similar fashion, Li et al. (2003, 2006) defined a parametric function in which both the length of the shortest path and the depth of the LCA are taken into account: simLB (u, v) = e−αdistRada (u,v) × df (u, v) (3.19) with, eβh − e−βh eβh + e−βh The parameter h corresponds to the depth of the LCA of the compared concepts, i.e. h = depth(LCA(u, v)). The parameter β > 0 is used to tune the depth factor (df ) and to set the importance given to the degree of specificity of concepts. The function used to express df corresponds to the hyperbolic tangent which is normalised between 0 and 1. It defines the degree of non-linearity to associate to the depth of the LCA. In addition, α ≥ 0 controls the importance of the taxonomic distance expressed as a function of the length of the shortest path linking the two concepts. Approaches have also been proposed to modify existing measures in order to obtain particular properties. As an example, Slimani et al. (2006) proposed an adaptation of the measure proposed by Wu and Palmer (1994) (Equation 3.16) in order to avoid the fact that, in some cases, neighbour concepts can be estimated as more similar than ordered concepts. To this end, the authors introduced simtbk which is based on a factor used to penalise concepts defined in the neighbourhood: df (u, v) = simtbk (u, v) = simW P (u, v) × pf (u, v) (3.20) with, pf (u, v) = (1 − λ)(min(depth(u), depth(v)) − depth(GT )) + λ(depth(u) + depth(v) + 1)−1 In the same vein (Ganesan et al., 2012; Shenoy et al., 2012) recently proposed alternative measures answering the same problem. The approach proposed by Shenoy et al. (2012) is presented34 : simShenoy (u, v) = 2 · depth(GT ) · e−λL/depth(GT ) depth(u) + depth(v) (3.21) with L the weight of the shortest path computed by penalising paths with multiple changes of type of relationships, e.g. a path following the pattern hisa, isa− , isa, . . .i. Note that the penalisation of paths inducing complex semantics, e.g., which involves multiple types of relationships, was already introduced in (Hirst and St-Onge, 1998; Bulskov et al., 2002). Several approaches have also been proposed to consider density of concepts, e.g., through analysis of cluster of concepts (Al-Mubaid and Nguyen, 2006). Other adaptations also proposed taking into account concepts’ distance to leaves (Wu et al., 2006), and variable strengths of connotation considering particular strategies (Lee et al., 1993; Zhong et al., 2002), e.g., using IC variability among two linked concepts or multiple topological criteria (Jiang and Conrath, 1997; Alvarez et al., 2011). In terms of the spreading activation theory, measures have also been defined as a function of transfer between the compared concepts (Schickel-Zuber and Faltings, 2007). Wang et al. (2007) use a similar approach based on a specific definition of the strength of connotation. Finally, pure graph-based approaches defined for the comparison of nodes can also be used to compare concepts defined in a taxonomy (refer to Section 3.2.1). As an example, Garla and Brandt (2012) and Yang et al. (2012) define semantic similarity measures using random walk techniques such as the personalised page rank approach. As we have seen, most structural semantic similarity measures are extensions or refinements of the intuitive shortest path distance considering intrinsic factors to consider both the specificity of concepts and variable strengths of connotations. Nevertheless, the algorithmic complexity of the shortest path algorithms hampers the suitability of these measures for large semantic graphs35 . To remedy this problem, we have seen that shortest path computation can be substituted by approximation based on the 34 Note that we assume that the paper contains an error in the equation defining the measure. The formula is considered to be X/(Y + Z), not X/Y + Z as written in the paper. 35 A linear algorithm in O(C + E) exists for DAGs; nevertheless search for sp(u, isa∗ , v) requires the consideration of cyclic graphs for which algorithms, such as Dijkstra’s, are in O(C 2 ) or O(E + C · logC) using sophisticated implementation. 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 63 depth of the LCA of the compared concepts36 , and that several measures proposed by graph theory can be used instead. Towards other estimators of semantic similarity Most criticisms related to the initial edge-counting approach were linked to the uniform consideration of edge weights. As we have seen, to remedy this, several authors proposed considering a great deal of semantic evidence to differentiate strengths of connotation between concepts. One of the central findings conveyed by early developments in structure-based measures is that the similarity function can be broken down into several components, in particular those distinguished by the feature model: commonality and difference. Indeed, the shortest path between two concepts can be seen as the difference between the two concepts (considering that all specialisation add properties to a concept). More particularly, in trees, or under specific constraints in graphs, we have seen that the shortest path linking two concepts contains their LCA. It can therefore be broken down into two parts corresponding to the shortest paths which link compared concepts to their LCA: in most cases, sp(u, isa∗ , v) = sp(u, isa, LCA(u, v)) + sp(v, isa, LCA(u, v)). Therefore, the LCA can be seen as a proxy which partially summarises the commonality of compared concepts37 . Distances between compared concepts and their LCA can therefore be used to estimate their differences. The fact that measures can be broken down into specific components evaluating commonalities and differences is central in the design of the approaches which will further be introduced: the featurebased strategy and the information theoretical strategy. As we will see, they mainly define alternative strategies to characterise compared concepts in order to express semantic measures as a function of their commonalities and differences. 36 The algorithmic complexity of the LCA computation is significantly lower than the computation of the shortest path: constant after linear preprocessing (Harel and Tarjan, 1984). 37 The LCA only partially summarises commonality. Indeed, it can only be considered as an upper-bound of the commonality since highly similar concepts (Man, Women) may have a general concept for LCA (LivingBeing). This LCA will only encompass a partial amount of their commonalities. Please refer to Section 3.3.2. In addition, notice that in some cases the set of NCCAs contains other concepts than the LCA. 64 3.4.2 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Feature-based approach The feature-based approach generally refers to measures which rely on a taxonomic interpretation of the feature model proposed by Tversky (1977) (introduced in Section 1.2.1). However, as we will see, contrary to the original definition of the feature model, this approach is not necessarily framed in set theory38 . The main idea is to represent concepts as collections of features, i.e., characteristics describing the concepts, to further express measures based on the analysis of their common and distinct features. The score of the measures will only be influenced by the strategy adopted to characterise concept features39 , and the strategy adopted for their comparison. As we will see, the reduction of concepts to collections of features makes it possible to set the semantic similarity estimation back in the context of classical binary similarity or distance measures (e.g., set-based measures). An approach commonly used to represent the features of a concept is to consider its ancestors as features40 . We denote A(u) the set of ancestors of the concept u. Since the Jaccard index that was proposed 100 years ago, numerous binary measures have been defined in various fields. A survey of these measures distinguishes 76 of them in Choi et al. (2010). Considering that the features of a concept u are defined by A(u), an example of a semantic similarity measure expressed from the Jaccard index was proposed in Maedche and Staab (2001)41 : simCM atch (u, v) = |A(u) ∩ A(v)| |A(u) ∪ A(v)| (3.22) Another example of a set-based expression of the feature-based approach is proposed in Bulskov et al. (2002): |A(u) ∪ A(v)| |A(u) ∪ A(v)| + (1 − α) (3.23) simBulskov (u, v) = α |A(u)| |A(v)| with α ∈ [0, 1] a parameter used to tune the symmetry of the measure. Rodrı́guez and Egenhofer (2003) also proposed a formulation derived from the ratio model defined by Tversky (introduced in Section 1.2.1): simRE (u, v) = |A(u) ∩ A(v)| γ|A(u) \ A(v)| + (1 − γ)|A(v) \ A(u)| + |A(u) ∩ A(v)| (3.24) with γ ∈ [0, 1], a parameter that enables the tuning of the symmetry of the measure. Sánchez et al. (2012) define the taxonomic distance of two concepts as a function of the ratio between their distinct and shared features:   |A(u) \ A(v)| + |A(v) \ A(u)| (3.25) distSanchez (u, v) = log2 1 + |A(u) \ A(v)| + |A(v) \ A(u)| + |A(u) ∩ A(v)| Various refinements of these measures have been proposed, e.g., to enrich concept features by taking their descendants into account (Ranwez et al., 2006). The feature-based measures may not be intentional, i.e., they are not expected to solely rely on the knowledge defined in the taxonomy. When instances of the concepts are known, the feature of a concept can also be seen by extension and be defined on the basis of instances associated to concepts. As an example, the Jaccard index can be used to compare two ordered concepts according to their shared and distinct features, here characterised by extension: simJacExt (u, v) = |I(u) ∩ I(v)| |I(u) ∪ I(v)| (3.26) with I(u) ⊆ I the set of instances of the concept u. Note that this approach makes no sense if the desire is to compare concepts which are not ordered – the set I(u) ∩ I(v) will tend to be empty. 38 You will recall that the feature matching function on which the feature model is based, relies on binary evaluations of the features “In the present theory, the assessment of similarity is described as a feature-matching process. It is formulated, therefore, in terms of the set-theoretical notion of a matching function rather than in terms of the geometric concept of distance” (Tversky and Itamar, 1978). 39 As stressed in Schickel-Zuber and Faltings (2007), there is a narrow link with the multi-attribute utility theory (Keeney, 1993) in which the utility of an item is a function of the preference on the attributes of the item. 40 Its implicit senses if the concept refers to a synset. 41 This is actually a component of a more refined measure. 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS D’Amato et al. (2008) also define an extensional measures considering:    min(|I(u)|, |I(v)|) |I(LCA(u, v))| min(|I(u)|, |I(v)|) simD0 Amato (u, v) = 1− 1− |I(LCA(u, v))| |I| |I(LCA(u, v))| 65 (3.27) Classical feature-based measures summarise the features of a concept through a set representation which generally corresponds to a set of concepts or instances. However, alternative approaches can also be explored. Therefore, even if, to our knowledge, such approaches have not been defined, the features of a concept could also be represented as a set of relationships, as a subgraph, etc. In addition, regardless of the strategy adopted to characterise the features of a concept (other concepts, relationships, instances), the comparison of the features is not necessarily driven by a set-based measure. Indeed, the collections of features can also be seen as vectors. As an example, a concept u can be represented by a vector U in a chosen real space of dimension |C|, e.g., considering that each dimension associated to an ancestor of u is set to 1. Vector-based measures will evaluate the distance of two concepts by studying the coordinates of their respective projections. In this vein, Bodenreider et al. (2005) proposed the comparison of two concepts according to their representation through the Vector Space Model. Considering a concept-to-instance matrix, a weight corresponding to the IC42 of the concept u is associated to the cell (u, i) of the matrix if the instance i ∈ I(u). The vectors representing two concepts are then compared using the classical dot product of the vectors presented in Section 2.3.2. 3.4.3 Information theoretical approach The information theoretical approach relies on Shannon’s information theory (Shannon, 1948). As with the feature-based strategy, these measures rely on the comparison of two concepts according to their commonalities and differences, here defined in terms of information. This approach formally introduces the notion of salience of concepts through the definition of their informativeness Information Content (IC) – Section 3.3.2 introduces the notion of IC. Resnik (1995) defines the similarity of a couple of concepts as a function of the IC of their common ancestor which maximises an IC function (originally eIC), i.e., their Most Informative Common Ancestor (MICA). simResnik (u, v) = IC(M ICA(u, v)) (3.28) Resnik’s measure doesn’t explicitly capture the specificities of compared concepts. Indeed, pairs of concepts with an equivalent MICA will have the same semantic similarity, whatever their respective ICs. To correct this limitation, several authors refined the measure proposed by Resnik to incorporate specificities of compared concepts. We here present the measures proposed by Lin (1998a)43 – simLin , (Jiang and Conrath, 1997) – distJC , (Mazandu and Mulder, 2013) – simN univers , (Pirró and Seco, 2008; Pirró, 2009) – simP Sec and (Pirró and Euzenat, 2010b) – simF aith : simLin (u, v) = 2 · IC(M ICA(u, v)) IC(u) + IC(v) distJC (u, v) = IC(u) + IC(v) − 2 · IC(M ICA(u, v)) simN univers (u, v) = IC(M ICA(u, v)) max(IC(u), IC(v)) simP Sec (u, v) = 3 · IC(M ICA(u, v)) − IC(u) − IC(v) simF aith (u, v) = IC(M ICA(u, v)) IC(u) + IC(v) − IC(M ICA(u, v)) (3.29) (3.30) (3.31) (3.32) (3.33) Taking into account specificities of compared concepts can lead to high similarities (low distances) when comparing general concepts. As an example, when comparing general concepts using simLin , the maximal similarity will be obtained comparing a (general) concept to itself. In fact, the identity of the indiscernibles is generally ensured (except for the root which generally has an IC equal to 0). However, 42 Originally 43 Originally the authors used the IDF but we saw that both the IC and the IDF are similar (Section 3.3.2). 2×log(M ICA(u,v)) defined as: simLin (u, v) = log(u)+log(v) 66 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES some treatments require this property not to be respected. Authors have therefore proposed to lower the similarity of two concepts according to the specificity of their MICA, e.g. (Schlicker et al., 2006; Li et al., 2010). The measure proposed by Schlicker et al. (2006) is presented: simRel (u, v) = simLin (u, v) × (1 − p(M ICA(u, v))) (3.34) with p(M ICA(u, v)) the probability of occurrence of the MICA. An alternative approach proposed by Li et al. (2010) relies on the IC of the MICA and can therefore be used without extensional information on concepts, i.e., using an intrinsic expression of the IC. Authors have also proposed to characterise the information carried by a concept by summing the ICs of its ancestors (Mazandu and Mulder, 2011; Cross and Yu, 2011): P 2 · c∈A(u)∩A(v) IC(c) P simM azandu (u, v) = P (3.35) c∈A(u) IC(c) + c∈A(v) IC(c) P c∈A(u)∩A(v) IC(c) c∈A(u)∪A(v) IC(c) simJacAnc (u, v) = P (3.36) These measures can also be considered as hybrid strategies between the feature-based and information theory approaches. One can consider that these measures rely on a redefinition of the way to characterise the information conveyed by a concept (by summing the IC of the ancestors). Other interpretations can simply consider that features are weighted. Thus, following the set-based representations of features, authors have also studied these measures as fuzzy measures (Cross, 2004; Popescu et al., 2006; Cross, 2006; Cross and Sun, 2007; Cross and Yu, 2010, 2011), e.g., defining the membership function of a feature corresponding to a concept as a function of its IC. Finally, other measures based on information theory have also been proposed, e.g., (Maguitman and Menczer, 2005; Maguitman et al., 2006; Cazzanti and Gupta, 2006). As an example, in Maguitman and Menczer (2005) the similarity is estimated as a function of prior and posterior probability regarding instances and concept membership. 3.4.4 Hybrid approach Other techniques take advantage of the various aforementioned paradigms. Among the numerous proposals, (Jiang and Conrath, 1997; Bin et al., 2009) defined measures in which density, depth, strength of connotation and ICs of concepts are taken into account. We present the measure proposed by Jiang and Conrath (1997)44 . The strength of association w(u, v) between two concepts u, v is defined as follows: dens w(u, v) = (β + (1 − β)) × |children(v)|  depth(v) + 1 depth(v) α × (IC(u) − IC(v)) × T (u, v) The factor dens refers to the average density of the whole taxonomy, see Jiang and Conrath (1997) for details. The factors α ≥ 0 and β ∈ [0, 1] control the importance of the density factor and the depth respectively. T (u, v) defines weights associated to predicates. Finally, the similarity is defined by the weight of the shortest path which links compared concepts and which contains their LCA: X distJC−Hybrid (u, v) = w(s, o) (s,p,o)∈sp(u,isa,LCA(u,v))∪sp(v,isa,LCA(u,v)) Defining α = 0, β = 1 and T (u, v) = 1, we obtain the information theoretical measure proposed by the same authors, i.e., distJC (u, v) = IC(u) + IC(v) − 2 · IC(M ICA(u, v)) (Equation 3.30). Singh et al. (2013) proposed a mixing strategy based on (Jiang and Conrath, 1997) IC-based measure distJC . They consider transition probabilities between concepts relying on a depth-based estimation of the strength of connotation. Rodrı́guez and Egenhofer (2003) also proposed mixing a feature-based approach considering structural properties such as the concepts’ depth. Finally, Paul et al. (2012) defined multiple measures based on an aggregation of several existing measures. 44 This measure is a parametric distance. Couto et al. (2003) discuss the implementation, Othman et al. (2008) propose a genetic algorithm which can be used to tune the parameters and Wang and Hirst (2011) propose a redefinition of the notion of depth and density initially proposed. 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 67 Figure 3.5: The graph composed of the plain (blue) edges is a taxonomic tree, i.e., it doesn’t contain concepts with multiple parents. If the (red) dotted relationships are also considered, the graph is a directed acyclic graph (e.g., a taxonomic graph) 3.4.5 Considerations when comparing concepts in semantic graphs Several measures introduced in the previous sections were initially defined to compare concepts expressed in a tree. However, despite the fact that this subject is almost never discussed in the literature, several considerations must be taken into account in order to estimate the similarity of concepts defined in a semantic graph in which multiple inheritances can exist – please refer to notations introduced in Section 3.1. Shortest path A tree is a specific type of graph in which multiple inheritances cannot be encountered, i.e. ∀c ∈ C, |parents(c)| < 2. This implies that two concepts u, v which are not ordered will have no common − descendants, i.e., G− T (u) ∩ GT (v) = ∅. Therefore, if there is no redundant taxonomic relationship, the shortest path which links u, v always contains a single common ancestor of u, v: LCA(u, v). However, − in a graph, since two non-ordered concepts u, v can have common descendants, i.e., G− T (u) ∩ GT (v) 6= ∅, the shortest path which links u, v can in some cases not contain one of their common ancestors. Figure 3.5 illustrates the modifications induced by multiple inheritances. In Figure 3.5, the shortest path linking the two non-ordered concepts C5 and C7 in the tree (i.e. without considering red dotted edges) is [C5 − C3 − C1 − Root − C2 − C4 − C7]. However, if we consider multiple inheritances (red dotted edges), it is possible to link C5 and C7 through paths which do not contain one of their common ancestors, e.g., [C5 − C3 − C6 − C4 − C7] or even [C5 − C8 − C7]. The shortest path which contains a common ancestor of the compared concepts is defined in the search + space corresponding to the graph G+ T (u) ∪ GT (v). In practice, despite the fact that in most graphs − − GT (u) ∩ GT (v) 6= ∅ (for two non-ordered concepts), it is commonly admitted that the shortest path must contain a single ancestor of the two compared concepts. Given this constraint, the edge-counting + 45 taxonomic distance of u and v in G+ T (u) ∪ GT (u) is generally (implicitly ) defined by: distSP (u, v) = 45 Generalisation of measures defined from trees to graphs is poorly documented in the literature. 68 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES sp(u, isa, LCA(u, v)) + sp(v, isa, LCA(u, v)). Note that when non comparable common ancestors (NCCAs) are shared between compared concepts, the ancestor which maximises the similarity is expected to be considered. Depending on the θ function which is used, the shortest path doesn’t necessarily involve the concept of the NCCAs which maximise θ, e.g. the deeper in the taxonomy. As an example, in order to distinguish which NCCA to consider, Schickel-Zuber and Faltings (2007) took into account a mix between depth and reinforcement (number of different paths leading from one concept to another). Nevertheless, the shortest path techniques can also be relaxed to consider paths which do not involve common ancestors or which involve multiple common ancestors: simSP −R (u, v) = 1 sp(u, isa∗ , v) + 1 Notion of depth The definition of the notion of depth must also be reconsidered when the taxonomy is not a tree. Remember that, in a tree without redundancies, the depth of a concept has been defined as the length of the shortest path linking the concept to the root. The depth of a concept is a simple example of specificity estimator. In a tree, this estimator makes perfect sense since the depth of a concept is directly correlated to its number of ancestors since depth(c) = |A(c)| − 1. In a graph, or in a tree with redundant taxonomic relationships, we must ensure that the depth is monotonically decreasing according to the ordering of concepts. As an example, to apply depth-based measures to graphs, we must ensure that depth(LCA(u, v)) is lower or equal to both depth(u) and depth(v). To this end, the maximal depth of a concept must be used, i.e., the length of the longest path in {u, isa, >}, denoted lp(u, isa, >). As an example, the measure proposed by Pekar and Staab (2002) – Equation 3.17 – is therefore implicitly generalised to: simP S−G (u, v) = lp(LCA(u, v), isa, >) lp(u, isa, LCA(u, v)) + lp(v, isa, LCA(u, v)) + lp(LCA(u, v), isa, >) Notion of least common ancestors Most measures which have been presented take advantage of the notions of LCA or MICA. However, in graphs, these measures do not consider the whole set of NCCAs – denoted Ω(u, v) for the concepts u and v. To remedy this, several authors have proposed adaptations of existing measures. As an example, Couto et al. (2005); Couto and Silva (2011) proposed GraSM and DiShIn strategies. In (Couto et al., 2005) the authors proposed the modification of information theoretical measures based on the notion of MICA. The authors recommended substituting the IC of the MICA by the average of the ICs of the concepts which compose the set of NCCAs. A redefinition of the measure proposed by (Lin, 1998a) – Equation 3.29 – is presented: simLin−GraSM (u, v) = = 2· P IC(c) |Ω(u,v)| c∈Ω(u,v) IC(u) + IC(v) P 2 · c∈Ω(u,v) IC(c) (3.37) |Ω(u, v)| × (IC(u) + IC(v)) Wang et al. (2012b) also proposed averaging the similarity between the concepts according to their multiple NCCAs: P 2·depth(a)2 simW ang (u, v) = a∈Ω(u,v) da (>,u)×da (>,v) |Ω(u, v)| With da (>, u) the average length of the set of paths which contain the concept a and which link the concept u to the root of the taxonomy (>). As we have underlined, numerous approaches have been defined to compare pairs of concepts defined in a taxonomy, these measures can be used to compare any pair of nodes defined in a poset. Table 3.2 to Table 3.5 present some properties of a selection of measures defined to compare pairs of concepts. 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 3.4.6 69 List of pairwise semantic similarity measures Several semantic measures which can be used to compare concepts defined in a taxonomy or any pair of elements defined in a poset. Measures are ordered according to their date of publication. Other contributions studying some properties of pairwise measures can be found in Yu (2010); Slimani (2013). IOI: Identify of the Indiscernibles. Some of the values associated to specific measures have not been complete yet. This is generally because the reference associated to the measure was not available or because the properties of the measure are still under study. x Sim Richardson et al. (1994) Wu and Palmer (1994) x x Dist Dist (ISA) Rada et al. (1989) Young Whan and Kim (1990) Lee et al. (1993) Sussna (1993) Type Sim / Rel Name Shortest Path strategy RDAG x x x RDAG DAG [0,1] x x x R+ R+ Yes x x x Yes Yes Structural Measures Const. Range IOI None R+ Yes Comment Measures are defined as a function of the weight of the shortest path linking compared concepts. Several modifications can be considered depending on the strategy adopted, e.g., weighing of the relationships (according to their predicate), constraints on the inclusion of a common ancestor of the compared concepts, etc. Specific shortest path strategy with uniform edge weight. The shortest path is constrained to containing the LCA of the compared concepts. x x Originally defined as a parametric semantic relatedness. Under specific constraints, this measure can be used as a semantic similarity. Shortest path technique which take into account non-uniform strengths of connotation. This latter is tuned according to the depth of the compared concepts and to the weights associated to predicates. The authors propose several intrinsic metrics (e.g., depth, density) to weigh the relationships and define hybrid measures by mixing the structural and information theoretical approach. No measure explicitly is defined. The similarity is assessed as a function of the depth of the compared concepts and the depth of their LCA. 70 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Dist Sim Sim x Sim Sim Sim Zhong et al. (2002) Pekar and Staab (2002) Mao and Chu (2002) Li et al. (2003) Li et al. (2006) Ganesan et al. (2003) Yu et al. (2005) Sim / Rel Sim Resnik (1995) Hirst and St-Onge (1998) Sim Leacock and Chodorow (1994, 1998) RDAG x x RDAG DAG RDAG RDAG None RDAG RDAG [0,1] x Yes x x No No R+ x R+ Yes [0,1] Yes Yes R+ [0,max[ Yes Yes [0, 2D] R+ Rada et al. (1989) formulation penalising long shortest path between the compared concepts according to the depth of the taxonomy. Similarity based on the shortest path technique which has been bound by (twice) the depth of the taxonomy (D). Shortest path penalising multiple changes of predicate. Can be used as a similarity or relatedness measure depending on the relationships which are considered. Taxonomic distance taking into account the depth of the compared concepts. With max defined as max = 1/k depth(LCA(u,v)) with k a given constant. Shortest path technique which takes into account the depth of the LCA of the compared concepts. Modification of Rada et al. (1989) formulation taking into account concept specificity as a non-linear function of the number of descendants a concept has. x Measure considering both the length of the shortest path linking the compared concepts and their depth. Refer to the function named leafsim in the publication. Measure allowing non-null similarity only to ordered pairs of concepts. 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 71 Sim Sim Sim Blanchard et al. (2006) Nagar and Al-Mubaid (2008) Cho et al. (2003) Sim Sim Wang et al. (2012b) Shenoy et al. (2012) Sim / Rel Sim Slimani et al. (2006) Alvarez and Yan (2011) (SSA) Sim Wu et al. (2006) RDAG RDAG RDAG DAG DAG RDAG RDAG RDAG No R+ x [0,1] x Yes No Yes R+ [0,1] No Yes No [0,1] [0,1] [0,1] Take into account compared concepts (i) commonality (length of the longest shared path from the concepts to the root), (ii) specificity (defined as a function of the shortest path from the concept to the leaves it subsumes) and (iii) local distance (Rada et al. (1989) distance). Modification of Wu and Palmer (1994) measure to avoid cases in which neighbours of a concept might have higher similarity values than concepts which are ordered with it. Measure which compare two concepts w.r.t their depth and the depth of their LCA. Originally defined for trees and extended for DAG in (Blanchard, 2008) Use a modification of shortest path constrained by the LCA. Multiple factors are considered to take into account the specificity of the compared concepts. This measure relies on three components evaluating (i) the shortest path linking the compared concepts (a weighing scheme is applied to the graph), (ii) their LCA, and (iii) their literal definitions. Approach taking into account the depth of the compared concepts, as well as the depth of all their DCAs. Modification of Wu and Palmer (1994) measure to avoid cases in which neighbours of a concept might have higher similarity values than concepts which are ordered with it. 72 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Ganesan et al. (2012) RDAG x x Modification of Wu and Palmer (1994) measure to avoid cases in which neighbours of a concept might have higher similarity values than concepts which are ordered with it. Table 3.2: Semantic similarity measures or taxonomic distances defined using a structural approach. These measures can be used to compare a pair of concepts defined in a taxonomy or any pair of elements defined in a partially ordered set Sim 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 73 Pirró and Euzenat (2010b) Li et al. (2010) Pirró and Seco (2008); Pirró (2009) Yu et al. (2007b) Couto et al. (2007) Schlicker et al. (2006) Lin (1998a) Jiang and Conrath (1997) Name Resnik (1995) Information theoretical Measures Type Const. Range IOI Comment Sim DAG [0, 1], [0, +∞[ No The similarity is defined as the IC of MICA. The range of the measure depends on the IC. Dist DAG [0,1] Yes The taxonomic distance computed as a function of the IC of the compared classes and their MICA. Sim DAG [0,1] Yes The similarity is computed as a ratio between the IC of the MICA of compared classes and the sum of their respective ICs. Sim DAG [0,1] No Modification of Lin (1998a) in order to take into account the specificity of the MICA, i.e., to avoid high score of similarity comparing two general classes (due to the ratio). Sim DAG [0,1] No Derivative of Lin (1998a) measure in which all the DCAs of the compared classes are taken into account. Sim DAG [0, +∞[ No Total Ancestry Measure (TAM) – measure based on a specific definition of the LCA. Sim DAG [0, x] No With x the maximal IC value. Formulation similar to Jiang and Conrath (1997) but which gives more importance to the informativeness of the MICA. Sim DAG [0,1] No Lin (1998a) measure modified to take specificity into account, i.e. to avoid high score of similarity comparing two general classes. Sim DAG [0,1] Yes Ratio formulation similar to the measure proposed by Lin (1998a) but which gives more importance to the difference between the compared concepts. 74 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Sim DAG [0,1] Yes Measure similar to Lin (1998a) but which uses a new approach to characterise the IC of a concept. Mazandu and Mulder (2013) Sim Sim DAG [0,1] Yes IC of the MICA of the compared classes Nuniver divided by the maximal IC of the compared classes. Table 3.3: Semantic similarity measures or taxonomic distances defined using an information theoretical approach. These measures can be used to compare a pair of concepts defined in a taxonomy or any pair of elements defined in a partially ordered set Mazandu and Mulder (2011) simDIC 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 75 Type Sim Feature-based Measures Const. Range IOI Comment DAG [0,1] Yes Feature-based expression relying on the Jaccard index. Bodenreider et al. (2005) Sim DAG [0,1] x Cosine similarity on a vector-based representation of the classes. The vector representation is built according to the set of instances of the classes. Ranwez et al. (2006) Dist DAG R+ Yes The distance is defined as a function of the number of descendants of the LCA of the compared concepts. This measure respects distance axioms (i.e., positivity, symmetry, triangle inequality). Jain and Bader (2010) Sim DAG [0,1] No Build a meta-graph reducing the original ontology into cluster of related concepts. Similarity is assessed through a specific function evaluating LCA information content. Batet et al. (2010b) Sim DAG R+ Yes Comparison of the classes according to their ancestors. Formulation expressed as a distance converted to a similarity using negative log. Table 3.4: Semantic similarity measures or taxonomic distances designed using a feature-based approach. These measures can be used to compare a pair of concepts defined in a taxonomy or any pair of elements defined in a partially ordered set Name Maedche and Staab (2001) 76 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Type Sim / Dist Hybrid Measures Const. Range IOI RDAG [0,1] Var. Comment Strategy based on the shortest path constrained by the LCA of the compared classes. Relationships are weighted according to the difference of IC of the classes they link. Al-Mubaid and Nguyen (2006) Sim DAG [0, +∞[ Yes Assigns cluster(s) to classes. The similarity is computed considering multiple metrics. Wang et al. (2007) Sim/Rel RDAG [0,1] Yes This measure as originally been defined as a semantic relatedness. It can also be used to compute semantic similarity. It relies on a non-linear approach to characterise the strength of connotation and a specific approach to characterise the informativeness of a concepts. Alvarez and Yan (2011) Sim / Rel RDAG [0,1] No Exploits three components evaluating concepts, their shortest path (a weighting scheme is applied to the graph), their LCA, and their literal definitions. Paul et al. (2012) Sim x x x Multiple approaches are mixed Table 3.5: Semantic similarity measures or taxonomic distances designed using an hybrid approach. These measures can be used to compare a pair of concepts defined in a taxonomy or any pair of elements defined in a partially ordered set Name Jiang and Conrath (1997); Couto et al. (2003); Othman et al. (2008) 3.4. SEMANTIC SIMILARITY BETWEEN A PAIR OF CONCEPTS 77 78 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES 3.5 Semantic similarity between groups of concepts Two main approaches are commonly distinguished to introduce semantic similarity measures designed for the comparison of two sets of concepts, i.e., groupwise measures: • Direct approach, the measures which can be used to directly compare the sets of concepts according to information characterising the sets w.r.t the information defined in the taxonomy. • Indirect approach, the measures which assess the similarity of two sets of concepts using one or several pairwise measures, i.e. measures designed for the comparison of a pair of concepts. They are generally simple aggregations of the scores of similarities associated to the pairs of concepts defined in the Cartesian product of the two compared sets. Note that the sets are generally expected to not contain semantically redundant concepts, i.e., they do not contain any pair of ordered concepts – ∀(u, v) ∈ X, u  v ∧ v  u. Once again, a large diversity of measures have been proposed, some of which are presented in the next subsections. 3.5.1 Direct approach The direct approach corresponds to a generalisation of the approaches defined for the comparison of pairs of concepts in order to compare two sets of concepts. It is worth noting that classical set-based approaches can be used. The sets can also be compared through their vector representations, e.g., using the cosine similarity measure. Nevertheless, these measures are in most cases not relevant to be used considering the semantics they convey – they do not take into account the similarity of the elements composing compared sets46 , e.g., sim({Man, Girl}, {Women, Boy}) = 0. Structural approach Considering G+ T (X) as the graph induced by the union of the ancestors of the concepts which compose the set X, Gentleman (2007) defined the similarity of two sets of concepts (U, V ) according to the length + of the longest sp(c, isa, >) which links the concept c ∈ G+ T (U ) ∩ GT (V ) to the root (>). Feature-based approach The feature-based measures are characterised by the approach adopted to express the features of a set of concepts. Several measures have been proposed from set-based measures. We introduce simU I (Gentleman, 2007)47 , and the Normalised Term Overlap measure simN T O (Mistry and Pavlidis, 2008). For convenience, we consider CT+ (X) as the set of concepts contained in G+ T (X): simU I (U, V ) = simN T O (U, V ) = |CT+ (U ) ∩ CT+ (V )| |CT+ (U ) ∪ CT+ (V )| |CT+ (U ) ∩ CT+ (V )| min(|CT+ (U )|, |CT+ (V )|) (3.38) (3.39) Information theoretical measures Among others, Pesquita et al. (2007) proposed considering the information content of the concepts (originally an eIC expression): P + c∈C + (U )∩CT (V ) IC(c) simGIC (U, V ) = P T (3.40) c∈C + (U )∪C + (V ) IC(c) T 3.5.2 T Indirect approach In Section 3.4, we introduced numerous measures for comparing a pair of concepts (pairwise measures). They can be used to drive the comparison of sets of concepts. 46 These 47 Also simple approaches are generally used when the compared sets contain semantically redundant concepts. published through the name Term Overlap (TO) in Mistry and Pavlidis (2008). 3.5. SEMANTIC SIMILARITY BETWEEN GROUPS OF CONCEPTS 79 Improvements of direct measures using concept similarity One of the main drawbacks of basic vector-based measures is that they consider dimensions as mutually orthogonal and do not exploit concept relationships. In order to remedy this, vector-based measures have been formulated to: • Weigh dimensions considering concept specificity evaluations (e.g., IC) (Huang et al., 2007; Chabalier et al., 2007; Benabderrahmane et al., 2010b). • Exploit an existing pairwise measure to perform vector products (Ganesan et al., 2003; Benabderrahmane et al., 2010b). Therefore, pairwise measures can be used to refine the measures proposed to compare sets of concepts using a direct approach. Aggregation strategies A two-step indirect strategy can also be adopted in order to take advantage of pairwise measures to compare sets of concepts: 1. The similarity of pairs of concepts obtained from the Cartesian product of the two compared sets has to be computed. 2. Pairwise scores are then summarised using an aggregation strategy, also called mixing strategy in the literature. Classic aggregation strategies can be applied (e.g. max, min, average); more refined strategies have also been proposed. Among the most commonly used we present: Max average (Max-Avg), Best Match Max – BMM (Schlicker et al., 2006) and Best Match Average – BMA (Pesquita et al., 2008): P P sim(u, v) (3.41) simAvg (U, V ) = u∈U v∈V |U | × |V | simM ax−Avg (U, V ) = 1 X maxv∈V sim(u, v) |U | (3.42) u∈U simBM M (U, V ) = max(simM ax−Avg (U, V ), simM ax−Avg (V, U )) simBM A (U, V ) = 3.5.3 simM ax−Avg (U, V ) + simM ax−Avg (V, U ) 2 List of groupwise semantic similarity measures (3.43) (3.44) Type Sim Sim Sim Sim Sim Sim Sim Sim Sim Name (Ganesan et al., 2003) Optimistic Genealogy Measure (Popescu et al., 2006) A (Popescu et al., 2006) B (Chabalier et al., 2007) (Gentleman, 2007) SimLP (Cho et al., 2007) (Pesquita et al., 2008) SimGIC (Sheehan et al., 2008) SSA (Ali and Deane, 2009) Featurebased Featurebased Featurebased Featurebased Structural Featurebased Featurebased Featurebased (Vector) DAG RDAG DAG RDAG [0,1] [0,1] No Yes Yes No R+ [0,1] Yes Yes x yes IOI Yes [0,1] [0,1] RDAG RDAG [0,1] [0,1] DAG DAG Direct Groupwise Measures Approach Const. Range Hybrid RDAG [0,1] Groups of concepts are represented using the Vector Space Model and compared using the cosine similarity. Similarity as a function of the longest common path found in the graph induced by the compared groups of concepts. Feature-based measure taking into account the specificity of the compared concepts. Jaccard measure in which a set of concepts is represented by the concepts contained in the graph it induces. Extends the notion of MICA to pair of groups of concepts then redefine the Dice coefficient. Commonality is assessed considering shared nodes in the graph induced by the ancestors of the compared sets of concepts. Fuzzy Measure Comment Feature-based approach taking into consideration structural properties during the comparison. Weighted Jaccard 80 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Sim Featurebased Structural RDAG [0,1] No Max Strategy considering a specific pairwise measure (Diaz-Diaz and Aguilar-Ruiz, Sim RDAG [0,1] Yes Distance taking into account 2011) the shortest path between the concepts and the depths of the compared concepts. (Alvarez and Yan, 2011) Sim/Rel Structural None R+ Yes Measure based on the analysis of structural properties of the graph. (Alvarez et al., 2011) SPGK Sim Structural None Yes The set of concepts is represented by the graph induced by the concepts it subsumes. A similarity measure is used to compare the two graphs. (Teng et al., 2013) Sim x x x x x Table 3.6: Semantic similarity measures or taxonomic distances designed using a direct approach. These measures can be used to compare a pair of groups of concepts defined in a taxonomy or any pair of group of elements defined in a partially ordered set (Jain and Bader, 2010) TCSS 3.5. SEMANTIC SIMILARITY BETWEEN GROUPS OF CONCEPTS 81 Indirect Groupwise Measures based on a direct approach Name Type Approach Const. Range IOI Comment (Ganesan et al., 2003) GCSM Sim FeatureRDAG [0,1] Yes GCSM: Generalised Cosinebased Similarity Measure. Groups of concepts are represented using the Vector Space Model. Dimensions are not considered independent, i.e. the similarity of two dimensions is computed using an approach similar to the one proposed by Wu and Palmer (1994) measure. The similarity between the vector representations of two groups of concepts is estimated using to the cosine similarity. (Huang et al., 2007) x x RDAG [0,1] Yes x (Benabderrahmane et al., 2010b) Sim FeatureRDAG [0,1] Yes Groups of classes are repreIntelligo based (Vecsented using the Vector Space tor) Model - Also consider (Benabderrahmane et al., 2010a). The dimensions are not considered to be independent. Table 3.7: Semantic similarity measures or taxonomic distances designed using an indirect approach. These measures can be used to compare a pair of groups of concepts defined in a taxonomy or any pair of group of elements defined in a partially ordered set 82 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES 3.6. OTHER KNOWLEDGE-BASED MEASURES 83 Indirect Groupwise Measures (Mixing strategy) Mixing strategies Range IOI Classic approaches Max/Min/AVG, etc. Best Match Max (BMM) depends depends Best Match Average (Azuaje et al., 2005) Table 3.8: Semantic similarity measures or taxonomic distances designed using an indirect approach (mixing strategy). These measures can be used to compare a pair of groups of concepts defined in a taxonomy or any pair of group of elements defined in a partially ordered set 3.6 3.6.1 Other knowledge-based measures Semantic measures based on logic-based semantics Semantic measures based on the relational setting cannot be used to directly compare complex descriptions of classes or instances which rely on logic-based semantics, e.g. description logics (DLs). To this end, semantic measures which are capable of taking into account logic-based semantics have been proposed. They are for instance used to compare complex concept definitions expressed in OWL. Among the diversity of proposals, measures based on simple DLs, e.g., only allowing concept conjunction (logic A), were initially proposed through extensions of semantic measures based on graph analysis (Borgida et al., 2005). More refined semantic measures have since been designed to exploit high expressiveness of DLs, e.g. ALC, ALN , SHI, ELH description logics (D’Amato et al., 2005a; Fanizzi and D’Amato, 2006; Janowicz, 2006; Hall, 2006; Araújo and Pinto, 2007; D’Amato et al., 2008, 2005b; Janowicz and Wilkes, 2009; Stuckenschmidt, 2009; Lehmann and Turhan, 2012). As an example D’Amato et al. (2005a) proposed to compare complex concept descriptions by aggregating functions which consider various components of their ALC normal forms48 . These measures rely mostly on extensions of the feature model proposed by Tversky. They have been extensively covered in the thesis of D’Amato (2007). 3.6.2 Semantic measures for multiple ontologies Several approaches have been designed to estimate the relatedness of concepts or instances using multiple ontologies. These approaches are sometimes named cross-ontology semantic similarity/relatedness measures in the literature, e.g., (Petrakis et al., 2006). Their aim is twofold: • To enable the comparison of elements which have not been defined in the same ontology (the ontologies must model a subset of equivalent elements). • To refine the comparison of elements by incorporating a larger amount of information during the process. These measures are in some senses related to those commonly used for the task of ontology alignment/mapping and instance matching (Euzenat and Shvaiko, 2013). Therefore, prior to their introduction we will first highlight the relationship between these measures and those designed for the aforementioned processes. Comparison with ontology alignment/mapping and instance matching The task of ontology mapping aims at finding links between the classes and predicates defined in a collection of ontologies. These mappings are further used to build an alignment between ontologies. Instance matching focuses on finding similar instances defined in a collection of ontologies. These approaches generally rely on multiple matchers which will be aggregated for evaluating the similarity of the compared elements (Euzenat and Shvaiko, 2013; Shvaiko and Euzenat, 2013). The commonly distinguished matchers are: • Terminological – based on string comparison of the labels or definitions. • Structural – mainly based on the structuration of classes and predicates. • Extensional – based on instance analysis. 48 Primitives and restrictions (both existential and universal) are considered. 84 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES • Logic-based – rely on logical constructs used to define the elements of the ontologies. The score produced by these matchers is generally aggregated; a threshold is used to estimate if two (groups of) elements are similar enough to define a mapping between them. In some cases, the mapping will be defined between an element and a set of elements, e.g., depending on the difference of granularity of the compared ontologies, a concept can be mapped to a set of concepts. The problem of ontology alignment/mapping and instance matching is a field of study in itself. The techniques used for this purpose involve semantic similarity measures for the design of structural, extensional and logic-based matchers (terminological matchers are not semantic). However, the measures used in this context aim to find exact matches and are therefore generally not suited for the comparison of non-equivalent elements defined in different ontologies. Indeed, techniques used for ontology alignment are for instance not suited to answering questions such as: to which degree are the two concepts Coffee and Cup related? In every instance, technically speaking, nothing prevents the use of matching techniques to estimate the similarity between elements defined in different ontologies. Indeed, the problem of knowing if two elements must be considered as equivalent can be reformulated as a function of their degree of semantic similarity. Nevertheless, a clear distinction of the problem of ontology alignment and semantic measure design exists in the literature. This can be partially explained by the fact that, in practice, compared to approaches used for ontology alignment and instance matching, semantic measures based on multiple ontologies: • Can be used to estimate the semantic relatedness and not only the semantic similarity of compared elements. • Sometimes rely on strong assumptions and approximations which cannot be considered to derive alignments, e.g., measures based on shortest path techniques. • Focus on the design of techniques for the comparison of elements defined in different ontologies which generally consider a set of existing mappings between ontologies. In short, ontology alignment and instance matching are complex processes which use specific types of (semantic) similarity measures and which can be used to support the design of semantic measures involving multiple ontologies. We briefly present the main approaches which have been proposed for the definition of semantic measures based on multiple ontologies. Main approaches for the definition of semantic measures using multiple ontologies The design of semantic measures for the comparison of elements defined in different ontologies have attracted less attention than classical semantic measures designed for single ontologies. They have been successfully used to support data integration (Rodrı́guez and Egenhofer, 2003; Lange et al., 2007), clustering (Batet et al., 2010b), or information retrieval tasks (Xiao and Cruz, 2005), to cite a few. In this context, several contributions have focused on the design of semantic measures based on multiple ontologies without focusing on specific application contexts. The measures proposed in the literature can be distinguished according to the approach they adopt – we consider the same classification used for semantic measures defined for a single ontology (the list of references may not be exhaustive): • Structural approach: (Al-Mubaid and Nguyen, 2009). • Feature-based approach: (Petrakis et al., 2006; Batet et al., 2010b, 2013; Solé-Ribalta et al., 2014; Sánchez and Batet, 2013). • Information Theoretical approach: (Saruladha, 2011; Saruladha and Aghila, 2011; Saruladha et al., 2010a; Sánchez and Batet, 2013; Batet et al., 2014). • Hybrid approach: (Rodrı́guez and Egenhofer, 2003). 3.7 Advantages and limits of knowledge-based measures Advantages 3.8. MIXING KNOWLEDGE-BASED AND CORPUS-BASED APPROACHES 85 • They can be used to compare all types of elements defined in an ontology, i.e., terms, concepts, instances. These measures can therefore be used to compare entities which cannot be compared using text analysis. Indeed, knowledge-based measures can be used to compare any entities which is defined into an ontology through their semantic representations. As an example, knowledge-based semantic measures can be used to compare gene products according to conceptual annotations corresponding to their molecular functions, the biological processes in which they are involved or their cellular location. • They give access to fine control on the semantic relationships taken into account to compare the elements. This aspect is important to understand the semantics associated to a score of semantic measures, e.g., semantic similarity/relatedness. • Generally easier and less complex to compute than corpus-based measures measures. Indeed, knowledge-based semantic measures do not require complex and time-consuming preprocessing, such as the semantic model building in corpus-based measures. In addition, several efficient measures have been proposed and efficient implementation enable the use of some knowledge-based measures in computational intensive applications. Some problems can however be encountered in using measures which take into account complex logic constructors (e.g. some measures introduced in Section 3.6.1). Limits • Require an ontology describing the elements to compare. This is a strong limitation if no ontology is available for the domain to consider. Nevertheless, we stress that a large body of literature is dedicated to knowledge base generation/enrichment from text analysis (e.g., refer to the field of ontology learning and Information extraction). Several knowledge base semantic measures could therefore be applied on knowledge base generated by aforementioned text analysis techniques. • The use of logic-based measures can be challenging to compare elements defined in large ontologies (high computational complexity). • Measures based on graph analysis generally require the knowledge to be modelled in a specific manner in the graph and are not designed to take non-binary relationships into account. Such relationships are used in specific ontologies and play an important role in defining specific properties to relationships/statements. This can be an issue when reification techniques are used to express such knowledge49 . However, most measures based on graph analysis are not adapted to this case. This aspect is relative to the mapping of an ontology to a semantic graph. 3.8 Mixing knowledge-based and corpus-based approaches As stated in Chapter 2, corpus-based semantic measures are of particular interest for comparing units of language by taking into account (quantitative) evidence of semantic similarity/relatedness encompassed in texts. In addition to these measures, this chapter has introduced knowledge-based measures that can be used to compare resources characterized by knowledge bases (concepts, instances, annotated objects). A spectrum of solutions may be envisaged to deal with either heterogeneous and unstructured texts on one hand and well-structured and annotated resources on the other hand. This section presents measures that propose to combine the two approaches presented so far, i.e. corpus-based and knowledge-based, into hybrid solutions. Section 3.8.1 introduces generalities about hybrid measures and briefly presents the different approaches that can be used for their definition. In Section 3.8.2, we will in particular focus on Wikipedia-based measures; by relying on the well-known Wikipedia encyclopedia they have the interesting property to take advantage of both a rich corpus of texts and a conceptual organization of categories. 3.8.1 Generalities Hybrid measures have been proposed to take advantage of both corpus-based and knowledge-based semantic measures to compare units of language and entities defined into ontologies. They will not be presented in detail, only references are provided. Most of the time hybrid measures combine several 49 This is done by defining a ternary relationship, i.e., the (binary) relationship is expressed by a node of the graph. 86 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES single semantic similarity (Panchenko and Morozova, 2012). Among the various mixing strategies, two broad types of approaches can be distinguished: Pure-hybrid measures and Aggregated measures. • Pure-hybrid measures correspond to measures which are not based on the aggregation of several measures; they are designed by defining a strategy which takes advantage of both corpus and ontology analysis. First and most common examples of pure-hybrid measures are semantic measures based on the information theoretical approach. As an example, (Resnik, 1995) proposed to estimate the amount of information carried by a concept as the inverse of the probability of the concept occurring in texts (refer to Section 3.3.2 for more information). The information content is the cornerstone of information theoretical measures, it can therefore be used to take advantage of several knowledge-based measures by considering corpus-based information. Other authors have also proposed to mix text analysis and structure-based (knowledge-based) measures. The extended gloss overlap measure introduced by (Banerjee and Pedersen, 2002), and the two measures based on context vectors proposed by (Patwardhan, 2003) are good examples. Another interesting approach is proposed in (Mohammad and Hirst, 2006). The authors propose a framework to exploit a thesaurus in order to derive word-concept distributional models that have the interesting property to be very compressed while finely characterising words. In (Alvarez and Lim, 2007), the authors propose to use WordNet and to adopt an hybrid approach in order to build a semantic model represented as a graph. The approach mixes gloss analysis as well as the analysis of WordNet structure. Interested readers may also consider (Li et al., 2003; Patwardhan et al., 2003; Banerjee and Pedersen, 2003; Patwardhan and Pedersen, 2006; Muller et al., 2006). • Aggregated measures derive from the aggregation combining corpus-based, knowledge-based and even hybrid semantic measures50 . Scores of selected measures are aggregated according to the average, min, max, median or any aggregation function which can be designed to aggregate matrix of scores51 . Several studies have demonstrated the gain of performance mixing knowledge-based and corpus-based approaches (Panchenko and Morozova, 2012) – see also the work of (Petrakis et al., 2006). 3.8.2 Wikipedia-based measure: how to benefit from structured encyclopaedia knowledge Started in 2001, the Wikipedia52 initiative rapidly aroused great interest and became a reference encyclopaedia for all Internet users, including (self-proclaimed) experts that do not hesitate to share and organise valuable knowledge covering a variety of subjects. Then, it is not surprising that, in the middle of the 2000’s, many efforts have been made to exploit this organised and free knowledge source in order to achieve information retrieval, classification, mining, or even business intelligence to mention a few. Indeed with more than 4.5 million articles53 providing free-access to textual definitions in many languages, that are linked together and associated with structured categories54 , Wikipedia constitutes a stimulating playground for scientists involved in Computational Linguistics. Several Wikipedia-based initiatives have been proposed in order to assess the semantic relatedness between words or Wikipedia topics (sometimes denoted concepts). These measures take advantage of the various facets of Wikipedia. They generally jointly rely on corpus-based measures exploiting textual information and approaches that analyse Wikipedia topics organisations or structured representations extracted from Wikipedia, e.g. structures defined by the hyperlinks between the articles. This diversity prevents precisely positioning Wikipedia-based approaches all together at a unique place the measure classification provided in Figure 1.2 (page 17). In addition, as we will see, a particularity of Wikipediabased measures is that a large majority of them exploit hyperlink relationships between topics – a kind of proxy that, even if structured and informative, cannot be regarded as knowledge models (i.e. ontologies)55 . 50 Pure-hybrid measures can also be part of the aggregation. aggregations will be discussed in the introduction of semantic similarity measures which can be used to compare groups of concepts – Section 3.5.2 52 https://www.wikipedia.org 53 4 675 000 articles on 2015, January. 54 Since May 2004. 55 Contrary to texts and knowledge bases that have been denoted semantic proxies in Section 1.3.1, this proxy do not always convey semantics. 51 Several 3.8. MIXING KNOWLEDGE-BASED AND CORPUS-BASED APPROACHES 87 As far as the definition of semantic measures based on Wikipedia covers a lot of scientific works, for reading convenience, this section is organised with respect to the various techniques that have been proposed and the background knowledge they exploit: 1. The graph structure that rely on hyperlink relationships defined between articles, 2. The text content of these articles 3. The underlying structured categories that are associated to each article. It should be noted that all of these approaches aim at quantifying semantic relatedness between words, texts or Wikipedia topics (as we said, topics, also denoted articles, are sometimes considered as concept definitions). Measuring semantic relatedness by exploiting Wikipedia’s hyperlink relationships Each hyperlink of an article pointing towards another article indicates a relation between them. The semantics of this relationship is unknown but the target article is often assumed to help understanding the source article. This graph of hyperlinks between topics thus represents a substantial amount of (human) knowledge that is embodied into Wikipedia (Yazdani and Popescu-Belis, 2013)56 . Several approaches have been proposed to extract information analysing this graph; some works consider the original orientation of links while other consider that they only traduce an association between topics and therefore consider the graph to be undirected. According to (Milne and Witten, 2008), leaving aside textual and hierarchical contexts to focus on hyperlinks (more than 90 million links), leads to intermediate solutions, faster than text-based ones and having quite good accuracy compared to knowledge-based measures. Wikipedia Link-based Measure (WLM57 ), the solution proposed by Milne and Witten, only takes into account hyperlinks among articles to assess the relatedness of two words. Using anchors found in the body of Wikipedia articles, they identify candidate article/word relations in the aim of characterising a word through a set of articles. Each article is represented by a list of incoming and outgoing links. Then, by comparing links, they deduce the semantic relatedness between articles. To achieve this, they defined the following measure: sr(a, b) = log(max(|A|, |B|)) − log(|A ∩ B|)) log(|W |) − log(min(|A|, |B|)) (3.45) Where a and b are the two articles of interest, A and B are the sets of articles linked to a and b respectively, and W is the entire set of Wikipedia articles. The relatedness between two words is then computed using sr to compare the sets of articles they are associated to. The approach of (Turdakov and Velikhov, 2008) also proposes to compute relatedness58 between articles based on hyperlink analysis. The measure relies on the Dice coefficient; it also uses heuristics and statistical properties on the links included in the articles. The semantic relatedness between two articles is assessed according to their shared and distinct hyperlinks (i.e. linked articles): dice(a, b) = 2 × |A ∩ B| |A| + |B| (3.46) Where A (resp. B) is the set of articles linked to article a (resp. b) considering both incoming and outgoing links. In this approach the links are weighted according to some characteristics (e.g. symmetry) and some weights are related to the category structure associated with the articles (the category structure of Wikipedia will be discussed in Section 3.8.2). The heuristics they use proposes to reduce the search space according to the number of (incoming/outgoing) links an article has – this is done to avoid comparing all articles if the more similar have to be found. This relatedness measure leads to good results when applied to word sense disambiguation59 . To this end, they proposed the following approach. For each word, the set of articles that contain the word in their title is identified (including disambiguation pages). The semantic relatedness between two words is then assessed according to the links their corresponding 56 Note that some of these links are automatically generated based on disambiguation techniques. measure is one of the more cited in the literature. 58 The authors also use the term similarity to describe their work but even if the distinction between similarity and relatedness is not clearly made in their contribution and may be discussed, we here consider that their approach assesses relatedness. 59 Good enough for (Rui-Qin, 2012) to simply copy this approach for words relatedness estimation. 57 This 88 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES articles share – only articles with the highest relatedness are taken into account. Despite the good results of these methods, it should be noticed that a previous phase including text analysis is needed to ensure word disambiguation. This may sometimes leads to high computation time due to the large number of articles to process. For (Yeh et al., 2009), Wikipedia encyclopaedia contains articles in a variety of topics wide enough to allow some association between words that are apparently not related only considering a simple text analysis. They go further by claiming that the graph structure of Wikipedia provides some relatedness information not present in the text of the articles. Contrary to previous cited works that only consider the links included in the articles that are compared, they consider the whole graph composed of all the links within Wikipedia to assess the relatedness between texts. This graph is extracted using a random walk strategy. Vertices refer to articles while edges are defined by the hyperlinks among articles. Three types of links are distinguished: 1. Infobox links – articles often contains infoboxes that enumerate attributes and characteristics for a given topic, 2. Categorical links – links that refer to the category associated to a topic/article and thus provide hyponymic and meronymic information, this will be discussed in Section 3.8.2 below. 3. Content links – all the other links. This measure also relies on a generality attribute that encodes how much an article is more general than another. This attribute is computed by comparing the number of their incoming links – an article that is more specific than another one is assumed to have less incoming links. The semantic relatedness is then computed using personalised PageRank (random walk) algorithm (Hughes and Ramage, 2007), see Section 3.4. To apply personalized PageRank, it is necessary to construct a custom teleport vector representing the initial mass distribution over the article nodes. Two strategies are proposed to build this vector. The first one is based on a dictionary built either by using the article titles or extracted anchors given by WMiner (Lokeshkumar and Sengottuvelan, 2014). This dictionary is then filtered in different ways for their tests. They observed that smaller graphs might lead to information loss: by pruning the dictionary, some entities are isolated and will not be taken into account during the relatedness calculus. The second strategy proposes to initialise the random walk by using Explicit Semantic Analysis (ESA) (Gabrilovich and Markovitch, 2009) and to analyse the whole set of articles. This latter strategy gives the best results and slightly improves the ESA method (that will be discussed in the next section). In the meantime, Wubben and Van den Bosch argue that the graph extracted from Wikipedia is well adapted to relatedness assessment. They propose FLP (Free Link Path), a semantic relatedness metric based on the notion of shortest-path between two Wikipedia articles – the graph is composed60 of 2 million nodes (articles) and 55 million edges (internal links - links outside Wikipedia are ignored) (Wubben, 2008; Wubben and van den Bosch, 2009). All the articles are parsed to extract their titles and the outgoing links they contain. In the same time, an inverted index is built to associate to each article the incoming links and thus to extract the whole hyperlink graph. Using a breadth-first search over this graph, the shortest-path between articles is computed and the relatedness is derived from it. The results they obtained are interesting but are outperformed by vector-based approaches that will be presented in the next section. A similar approach is adopted by Yazdani et al. to compare texts using a random walk strategy on a generated graph61 (Yazdani and Popescu-Belis, 2011, 2013). In this graph the nodes are Wikipedia articles62 , they are intended to represent concepts; links are either hyperlinks between articles or derived from similarity of content. For the latter, a word co-occurrence approach is used to represent text articles by vectors, a cosine similarity is then used to assess vector similarity. Each article is linked with the k most similar articles, with a weight that reflects this similarity score (k is set to 10 in their evaluation). The semantic relatedness of two concepts is then assessed by analysing their distance into the graph. To do this, an adaptation of the random walk method denoted Visiting Probability is used. Therefore, when two texts are compared, they are projected onto a set of nodes (Wikipedia articles) by using 60 In 2008. distinction may be done here between what (Yazdani and Popescu-Belis, 2013) call concept network extracted from Wikipedia (each node is an article associated to a concepts and the links are the hyperlinks content in them) and a formal conceptual model (formalized taxonomy or ontology) that may be associated to Wikipedia but that will be discussed in Section 3.8.2. 62 As many other Wikipedia-based approaches, some pruning is done to keep only articles that correspond to proper concepts. Here all articles from the following categories are removed: Talk, Image, Template, Category, Portal and List, and also disambiguation pages. 61 A 3.8. MIXING KNOWLEDGE-BASED AND CORPUS-BASED APPROACHES 89 aforementioned vector-based similarity. The semantic relatedness of these texts is then deduced based on the distances of their corresponding nodes. This method has been applied for text clustering with success – this, using several sets of parameters (e.g. weights attributed to the types of links). That makes the author underline the relevance of hyperlinks within this process. They also claim that, in the context of document clustering, random walk methods clearly outperform other methods, namely cosine similarity between the TF-IDF vectors of documents. However by mixing various strategies (vector-based measure, random walks and probabilistic adjustments) their method requires a lot of memory space and computational time. This approach has been improved, as exposed in (Yazdani and Popescu-Belis, 2013), in order to address this problem, among other things. Two truncation methods are proposed to make the algorithm tractable. In addition they propose to improve the Visiting Probability approach by integrating additional factors, such as the density of connections associated to articles. They also enlarge the scope of their evaluation and applied their work to word similarity, text similarity, document clustering/classification and information retrieval. By this way they demonstrate the generality of the knowledge resource associated to their approach and that this method provides a unified and robust answer to measuring semantic relatedness. Recently, (West et al., 2009; Singer et al., 2013) studied an original strategy that does not use the links themselves but the human navigational path on them. The authors argue that while many hyperlinks correspond to semantic links in Wikipedia, many other do not. “Links are often added based on the inclination of the author, rather than because the concepts are related ” (West et al., 2009). Therefore, other approaches only capture semantics from a limited set of people (Wikipedia editors) and neglect pragmatics, i.e. how Wikipedia is used (Singer et al., 2013). For the authors: “Humans tend to find intuitive paths instead of necessarily short paths, while contrary an automatic algorithm would try to find a shortest path between two concepts that may not be as semantically rich and intuitive as navigational path conducted by a human”. Their second argument lies in the nature of compared entities. Using such a method allows, for example, assessing semantic relatedness between an image and a textual page. Their experiments are based on the way people navigate on Wikipedia network. Observations have been gathered from online games played on Wikipedia; players have to reach an article from another unrelated article, only by clicking links in the articles that are encountered – the games that have been used are Wikispeedia63 for (West et al., 2009) or from Wikigame64 for (Singer et al., 2013). The measure proposed by West et al. is based on information theory after calculating a probability distribution over out-links of a current page. This method has some benefits, in particular its asymmetry may be interesting for some treatments. But it has also a major limit: only the distance between nodes (articles) that belong to a path that has been encountered during a game may be calculated. The authors argue that it is incremental but it is however limited to a small subset of Wikipedia. To overcome this limitation, (Singer et al., 2013) proposes a new way of calculating semantic relatedness between two concepts (articles) by using the similarity between their corresponding co-occurrence vectors. The underlying assumption is that word are semantically related if they share similar neighbours. Henceforth, two concepts may be compared even if they do not appear in the same path. The semantic relatedness between any Wikipedia concepts may hence be calculated; moreover, they have identified characteristics of navigational path that are most useful for its computing. An interesting thought about semantics of navigational path is described in (Singer et al., 2013). We will not report it here since it is a bit far from our purpose but we encourage the reader to refer to the original contribution for more details. In a general manner, considering complexity, time calculus and correlation with human expert judgments, link-based Wikipedia semantic measures seem to be very efficient solutions. However they suffer from a noise problem. Indeed, as underlined by (Yeh et al., 2009), similar methods based, for example, on WordNet does not need pruning (i.e. cleaning) to compete with text-based methods. Yet, this pruning is necessary when using Wikipedia. It is due to the fact that links in Wikipedia may convey to marginal information with regard to the subject they are related to. A previous step of ad-hoc pruning is thus always needed before applying link-based methods. Therefore, (Yeh et al., 2009) argue that texts of Wikipedia provide a stronger signal than their link structure, which is in line with (Yazdani and Popescu-Belis, 2011) that recommends using both hyperlinks and lexical similarity links in order to take into account linguistic as well as extra-linguistic dimensions of texts. 63 http://cs.mcgill.ca/ ~rwest/wikispeedia/ 64 http://www.thewikigame.com 90 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Text analysis of Wikipedia content and vector-based approaches As explained in Chapter 2, corpus-based approaches estimate semantic relatedness using statistical analysis of collection of texts that must be large enough to ensure a correct characterisation of words. Wikipedia offers such a large corpus. Inspired by Vector Space Models used in information retrieval, (Gabrilovich and Markovitch, 2007) proposed Explicit Semantic Analysis (ESA)65 to measure the semantic relatedness between words and texts (e.g. queries and documents) – this approach has briefly been presented in Section 2.3.2. In ESA, text meaning is represented into a high-dimensional space of concepts. Those concepts are derived from Wikipedia, once again each article of the encyclopaedia is considered to match a concept. Texts are processed to be represented as a vectors of Wikipedia concepts called interpretation vectors. To achieve this, ESA exploits a weighted inverted index extracted from Wikipedia articles, where weighted concepts are attached to words (the weights are function of TF-IDF measures). This inverted index allows, when parsing an input text, to associate to it a weighted vector of Wikipedia concepts by merging the concepts associated to each of the words it contains. The semantic relatedness between two texts is then assessed thanks to vector similarity measures applied to the interpretation vectors of the two texts. For two words a and b and their corresponding ESA vectors ~a and ~b, the relatedness is for instance given by their cosine similarity. This semantic interpretation of texts leads to disambiguate word senses since it takes into account the context of the neighbourhood of words. However, even if the results are very close to human judgements, when processing some datasets, the main drawback of this method is time calculus. Indeed, since all the articles have to be compared, the computation complexity is really high. This method has been extended in (Radinsky et al., 2011) where the authors present a new semantic relatedness model, Temporal Semantic Analysis (TSA). This method captures temporal information in addition to knowledge extracted from Wikipedia. While ESA represents word semantics as a vector of concepts, TSA uses a more refined representation. Each concept is no longer a scalar, but is instead represented as time series over a corpus of temporally-ordered documents. This attempt to incorporate temporal evidence into models of semantic relatedness is quite innovative and their evaluation shows that TSA provides consistent improvements over state-of-the-art results of ESA on multiple benchmarks. In line with ESA, Zesch et al. suggested to apply concept vector based measure to assess semantic relatedness (Zesch et al., 2008). In their proposal, several popular resources are compared: Wiktionary, Wikipedia, English and German WordNets. Several approaches are studied, one relying on a pathbased approach, another one generalising the vector-based approach described above. We will focus here on the latter since it is the one used by the authors of (Zesch et al., 2008) to deal with Wikipedia content. They propose to capture the meaning of a word w using a high dimensional concept vector ~v = (v1 , v2 , . . . , v|W | ), where |W | is the number of Wikipedia documents. The value vi depends on the number of occurrences of the word w in the article numbered i (e.g. using TF-IDF score). Each word being represented in this concept vector space, vector measures may be used to assess the relatedness of two words (e.g. cosine). The authors claim that this approach ”may be applied to any lexical semantic resource that offers a textual representation of a concept”. Using Wikipedia, they only take into account the first paragraph of the article considering that it contains shorter and more focussed information. From their comparative works, vector-based measures have proved to better perform than path-length ones when operating on collaboratively constructed resources. The choice of the resource is also discussed – it is showed that Wiktionary outperforms Wikipedia when ranking word pairs, even if it leads to lower performances on a German dataset. To take into account the semantic wealth offered by the multiple languages spoken around the word would be of particular interest in many domains. In information retrieval, for example, one can search for images related to a specific subject and characterised in different language (e.g. a given dermatologic manifestation in the medical domain). The growing need for cross-lingual solutions for information retrieval, text classification or annotation, to cite a few, has been underlined in (Hassan and Mihalcea, 2009). The authors propose to address this challenge by exploiting the interlanguage links contained into Wikipedia (250 language versions exist). In order to achieve this, they propose an extension of the ESA approach (in which each article is considered to match a concept). To calculate the cross-lingual relatedness of two words, they measure the closeness of their concept vector representations, which are built from Wikipedia using an extension of ESA. Three major changes of ESA have been proposed. The first one concerns the relatedness metric. Instead of the cosine calculus between the vectors, they chose to apply a Lesk-like metric (briefly discussed in Section 2.4). This choice has been made to take into 65 This work is also one of the more cited in the Wikipedia-based measure literature. Due to the high quality of its results, it is often used as a way to derive a semantic representation of articles or words(Singer et al., 2013). 3.8. MIXING KNOWLEDGE-BASED AND CORPUS-BASED APPROACHES 91 ~ and B ~ their ESA account the possible asymmetry between languages. With a and b two words and A ~ and concept vectors, we denote A and B the sets of concepts with a non-zero weight encountered in A ~ ~ ~ B respectively. The coverage of A by B is defined by: X ~ B) ~ = G(A| ωci (a) (3.47) t∈B ~ The relatedness between two words a With ωci (a) the weight associated to the concept ci in vector A. and b is defined by: ~ A) ~ + G(A| ~ B) ~ G(B| (3.48) relHassan (a, b) = 2 The second change they suggest is to modify the weight calculus of ESA in order to take into account the length of the articles that are associated to a concept. Instead of giving as weight the TF-IDF value associated with a concept ci they propose to use: ωci (a) = tfi (a) × log( M ) |ci | (3.49) With tfi (a) the term frequency of the word a in the concept ci (i.e. in the related article), M a constant representing the maximum vocabulary size on Wikipedia concepts and |ci | the size of the vocabulary used in the description of the concept ci . The last change concerns the use of Wikipedia category graph (see following section). The weight is scaled by the inverse of the distance di of the concept category (category associated with the concept ci ) to the root one. tfi (a) × log( |cMi | ) (3.50) ωci (a) = di The cross-lingual relatedness is then computed as follows. Given Cx and Cy the sets of all Wikipedia concepts in languages x and y. If trxy : Cx → Cy is a translation function that maps a concept ci ∈ Cx to a concept c0i ∈ Cy via the interlanguage links. The projection of the ESA vector ~t from the language vec ~ (t) = {ωtrxy (c1 ) , . . . , ωtrxy (cn ) }. The relatedness between two x to the language y can be written: trxy words ax and bx in given languages x, y is then defined by: relcrossl ingual (ax , by ) = vec ~ vec ~ ~ ~ xy (B)) (B)|A) + G(A|tr G(trxy 2 (3.51) If the relation described by the interlanguage links is assumed to be reflexive, in practice it is not always the case since users are accredited with the responsibility of maintaining these links. A pretreatment is applied to detect the missing links and enforces the reflexivity property. Even if the results vary from a language to another according to the coverage conveyed by Wikipedia in these languages (the number of pages and the number of interlanguage links), the correlations obtained by this method on well-known benchmarks slightly outperforms results obtained by monolingual measures. A recent work bridges the two research streams presented in both previous sections. It consists in using frequency occurrences and link probability to assess relatedness between words (and by extension between texts) (Jabeen et al., 2013). This CPRel method (Context Profile based Relatedness) relies on a context profile extracted from Wikipedia and that is associated to each word. Wikipedia articles are filtered to keep only relevant words and links that point towards another Wikipedia article. The match between a word and article titles is done using Link Probability (LP) [Mihalcea et al. 2007]. Once a set of articles is associated to a word, they are weighted according to their term frequency (based on TF calculus) and link probability. These weights define a vector representation of the word into the space of articles. The relatedness between two words is then computed using cosine similarity. On some benchmark their results are comparable with other Wikipedia-based approaches but ESA performs best overall. Wikipedia relies on a category organisation that may be used to measure semantic relatedness As we saw, in addition to text articles, Wikipedia stores a great deal of information about the relationships between the articles in the form of hyperlinks, info boxes and category pages (Yeh et al., 2009). In the contributions presented in the previous sections, authors often assimilate Wikipedia articles to 92 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES concepts since articles are considered to define a particular entity. However, the structure offered by the hyperlink relationships between them cannot be regarded as knowledge models (i.e. ontologies). In this section, we are really talking about a knowledge organisation that is composed of Wikipedia categories structured through conceptual relationships (e.g. hyponymy, meronymy). Wikipedia’s categories have been collaboratively developed and used to tag Wikipedia articles. They are assigned to pages in order to group together those discussing similar subjects. They are next used to help readers to find an article or to navigate on related ones. Wikipedia’s categories have been standardised and organised by unambiguous relationships – the structure organizing the categories can indeed be regarded as a light ontology. These categories are therefore of particular interest for semantic similarity calculus since they provide a way to compare topic articles not only using corpus-based measures, but also using semantic measures based on knowledge organization (in particular those introduced in Section 3.4). The first authors that have used the structure of Wikipedia’s categories to assess semantic similarity or relatedness of words were (Strube and Ponzetto, 2006). In their WikiRelate! method, words are first mapped to articles; this is done by analysing the titles and the hyperlinks of articles. Then words are compared considering two features of the texts they are associated to: (i) their content overlap (using an adaptation of aforementioned Lesk’s measure) and (ii) the relatedness of their Wikipedia categories – several measures have been tested (Rada, Leacock and Chodorow, Wu and Palmer, Resnik measures, please refer to Section 3.4 for an introduction to these measures). They obtain good results on datasets of human judgements, which make them stress the benefits of using the categories organisation for designing Wikipedia-based semantic measures. Within their BabelRelate! method, (Navigli and Ponzetto, 2012) further explore the hybrid approach of semantic relatedness between two words by using BabelNet, a very large multilingual lexical knowledge resource that integrates Wikipedia and WordNet (Navigli and Ponzetto, 2010). This solution combines the analysis of the graph of word senses by using a graph-based algorithm (a kind of node counting strategy). By using the whole graph containing word translations, they are able to prune parts of the graph that are the result of ambiguity and polysemy in the input language (infrequent senses, noisy relations). This strategy helps to rapidly characterise the subgraph that represents the core semantic of words, i.e. the most frequent translations, senses, in all languages. The relatedness is then assessed by analysing these graphs. Interestingly, the authors argue that, contrary to the method defined by (Hassan and Mihalcea, 2009), their proposal does not suffer from unbalanced performance across languages since it is based on a unique and common resource (BabelNet). They also observed that the more languages are used, the better the results. Finally, in (Taieb et al., 2013), a system combining all semantic information in the different components of Wikipedia (articles, graph of hyperlinks, category organisation) is presented to compute the semantic relatedness between words. A pre-processing step provides for each Wikipedia category a semantic description vector (named CSD for Category Semantic Depiction). It is computed by considering the weights of stems extracted from the articles assigned to the target category. Then, a vector representation of a word is derived analysing the CSDs of the set of all categories it is associated to. Finally, the semantic relatedness of two words is assessed according to the similarity of their respective vectors (e.g. using Dice, overlap and cosine measures). This approach performs well and even sometimes outperforms ESA. With an increasing quality and coverage, Wikipedia is an undeniable worldwide success. As we saw in this section, by providing a free multi-language encyclopaedia in which topics are interlinked, organised by structured categories and finely characterised (e.g., using infoboxes), the several facets of Wikipedia are of particular interest and have proved to be particularly helpful in the design of accurate semantic measures. Wikipedia has always been a catalyser of new semantic measure design and will, for sure, continue to be. Research tracks related to this unique resource are numerous. As an example, through the definition of DBpedia (Auer et al., 2007), recent contributions in Knowledge Representation and Information Extraction have proved that Wikipedia can also be used to generate large knowledge bases. This will help us to finely structure and characterise Wikipedia content, and to better capture the semantic interactions between the underlying concepts associated to articles. Interestingly, by obtaining such a large knowledge base and its associated natural language counterpart, a new kind of hybrid semantic proxy will arise and will probably open both interesting and promising perspectives for semantic 3.9. CONCLUSION 93 measures. Software solutions and source code libraries that provide knowledge-based semantic measures implementations are presented in Appendix D. Information about evaluation protocols and datasets that can be used to compare these measures are also provided in Chapter 4. 3.9 Conclusion This chapter introduced the reader to the diversity of knowledge-based measures which can be used to compare concepts or instances defined into ontologies. We focused in particular on the measures which are based on the analysis of a graph representation of the ontology, i.e. the strategy commonly adopted to define knowledge-based measures. We proposed an in-depth analysis of the measures which can be used to assess the similarity of concepts defined in a taxonomy. By analysing these measures we distinguished the semantic evidence which can be extracted from ontologies. We next presented in detail the three main types of measures, i.e., structure-based, feature-based and those based on informationtheoretical approaches. This helped us to highlight the foundation of knowledge-based semantic measures and to discuss the core elements of these measures. Next, we briefly introduced the measures which rely on complex logic-based construct analysis and those which rely on the analysis of several ontologies. Finally, we defined the advantages and limits of knowledge-based measures and we introduced some hybrid-measures which have been proposed to mix corpus-based and knowledge-based measures. 94 CHAPTER 3. KNOWLEDGE-BASED SEMANTIC MEASURES Chapter 4 Methods and datasets for the evaluation of semantic measures This chapter is dedicated to semantic measure evaluation and discusses in particular two important topics: (i) how to objectively evaluate measures and (ii) how to guide their selection with regard to specific needs. To tackle these central questions, we propose technical discussions on both methodological and practical aspects related to semantic measure evaluation. This will help us to underline, among others, the properties of measures that must be considered for their analysis. An overview of the underlying mathematical frameworks that can support measure evaluation and a detailed discussion of existing evaluation protocols are also provided. Concrete examples of datasets used to evaluate semantic measures in the literature are next introduced. The various topics discussed in this chapter are suited for both research and practical purposes, e.g. they are adapted to measure designers willing to evaluate new proposals, as well as users seeking for existing solutions adapted to their needs. Despite its central importance – considering the large diversity and the widespread use of semantic measures – the topic of measure evaluation is far from being extensively discussed in the literature. To overcome this substantial lack, this chapter proposes to aggregate a large body of literature in order to provide an overview of state-of-the-art approaches and resources available. However, considering the width of this topic and the diversity of approaches that have been explored to evaluate measures, this chapter will not propose an in-depth analysis of all relevant aspects of measures that can be discussed for their evaluations. In addition, even if some references to interesting state-of-the-art comparisons are provided, we will not analyse, cross and aggregate existing results to summarize measure performances in different evaluation settings. The first section of this chapter discusses the problems of semantic measure evaluation and selection in a general manner. Section 2 presents several criteria of measures that can be considered for their evaluations. Section 3 introduces the protocols and datasets that are commonly used to evaluate measure accuracy. Finally, Section 4 concludes this chapter by highlighting its important teaching and by discussing, among others, the open challenges related to this important topic. 4.1 A general introduction to semantic measure evaluation In general terms, any evaluation aims to distinguish the benefits and drawbacks of the compared alternatives according to specific criteria. Such comparisons are most of the time used to rank the relevance of using an alternative in a specific usage context regarding a set of criteria – in our case the alternatives are the measures. Semantic measures can be evaluated with regard to theoretical or empirical properties. Based on these evaluations, comparison will be made possible considering a way to (i) compare the values of considered properties and (ii) to aggregate these comparisons. This underlines the strong dependency that exists between the criteria that are considered for the evaluation and the conclusions that can be obtained. Indeed, as we will see in this chapter, an important notion to understand is that there is no best semantic measure in absolute. There are only measures that outperform others in specific conditions. Even if this does not prevent the fact that specific measures may outperform other measures in most of (experimental) conditions, it makes clear that conclusions about measure performance will be difficult to generalise. Indeed the set of criteria to consider and the way to interpret the values taken for each of these criteria strongly depend on the purpose of the comparison, e.g. comparing measures in 95 96 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES order to distinguish the one which is the best adapted to a specific use case. Considering that measure evaluation can only be made considering specific aspects of them, prior to compare a set of alternatives, a user which is searching for a measure must pay attention to carefully analyse his needs. It will for instance not be possible to distinguish the measure a user must use “to compare two concepts defined into an ontology”, or “to compare two terms” without defining: the constraint the measure must respect (e.g. symmetry), the information which is available (e.g., corpora, knowledge bases), and what the elusive objective to compare two concepts/terms means for him, i.e. are we talking about semantic similarity / relatedness, etc. Users must understand that answering these questions may be critical to distinguish a measure that is adapted to their needs. The comparison of measures is therefore only possible considering a set of criteria and a way to compare and to aggregate these criteria. The latter are defined by the use case that motivates the comparison. Considering this intuitive but important remark, three important questions arise in the aim of comparing semantic measures: 1. What are the criteria that can be used? 2. How to evaluate the relevance of a measure regarding a specific set of criteria? 3. Which criteria must be considered to evaluate measures in a specific context? Even if a complete answer to these three questions cannot be provided only considering existing research contributions –, and could alone justify a complete textbook –, this section proposes substantial material and reflections in the aim of contributing and better understanding semantic measure evaluation and comparison. 4.2 Criteria for semantic measure evaluation Several criteria can be used to analyse semantic measures. Some can be studied theoretically while others require empirical analyses. Among the criteria that are the most frequently considered evaluating semantic measures, we distinguish their: • Accuracy, precision and robustness. • Computational complexity, e.g., algorithmic complexity. • Mathematical properties. • Semantics. • Characterisation regarding technical details. These criteria can be used to discuss numerous facets of semantic measures. They are detailed in corresponding subsections. 4.2.1 Accuracy, Precision and Robustness The accuracy of a measure can only be discussed according to predefined expectations regarding the results produced by the measure. Indeed, as defined in the field of metrology, the science of measurement, the accuracy of a measurement must be understood as the closeness of the measurement of a quantity regarding the (actual) true value of that quantity (BIPM et al., 2012). As we have seen when defining semantic measures, the quantities estimated by semantic (similarity, relatedness, etc.) measures, even if they may be intuitive, are today only weakly characterised by abstract terms – in comparison to quantities commonly measured in other fields, e.g. inertial mass in Physics. In addition, as stressed when semantic measures have been introduced in Chapter 1, formal definitions may only be considered when a system of formal definitions will be accepted and adopted by the various researchers studying this broad topic. The possibility to reach such an objective is still an open research topic. As we will see, this intuitive and volatile nature of semantic measures has deep implications for their evaluation. Indeed, it is important to stress that evaluating accuracy of semantic measures is made difficult by the fact that the true value of a semantic measure (similarity, relatedness, etc.) is unknown; and, more importantly, may not exist. The notion of similarity of terms or concepts is by nature a subjective notion. As an example, there is no, per se, true value associated to the semantic relatedness between the two 4.2. CRITERIA FOR SEMANTIC MEASURE EVALUATION 97 concepts Communism and Freedom. Disregarding as much as possible philosophical considerations, it can be said that concepts are in our mind and that there are as many true values of semantic measures as concept representations of pairs of compared concepts (i.e. individuals). Therefore, the accuracy of semantic measures is generally evaluated by considering averaged expectations regarding their values, that is to say, by considering consensual values of the quantities they try to capture. This is generally made by analysing human expectations of semantic similarity/relatedness/etc., and by considering averaged values of these expectations. As an example, measures will be compared to scores of semantic relatedness of word pairs that have been assessed by humans into a specific scale, e.g. 0-4 – several datasets of this kind will be introduced in Section 4.3.2 . Thus, according to the implicit considerations made in the literature, the accuracy of a semantic measure is often considered as the closeness of its measurement with the averaged human expectations. Correlations are preferred to distances between measurements and average experts’ assessments because they only take into account the way the two signals behave instead of too arbitrary absolute values. In this case, the accuracy is generally defined as the Pearson’s correlation coefficient r. Considering that expected and measured values are contained into two vectors x and y of size n, the Pearson correlation r is defined by: Pn (xi − x)(yi − y) pPn (4.1) r(x, y) = pPn i=1 2 2 i=1 (xi − x) i=1 (yi − y) Pearson’s correlation is a linear correlation; less frequently, non-linear correlations are studied, e.g. in (Shen et al., 2010). Sometimes, the accuracy of a measure is only evaluated by analysing the ordering of the pairs that is induced by their scores of similarity/relatedness. In this case evaluations are made using Spearman’s correlation, e.g. in (Huynh et al., 2014; Maguitman and Menczer, 2005; Pedersen et al., 2007; Pesaranghader et al., 2014). Considering two vectors x and y of size n that specify respectively the expected and estimated rank of each pair, Spearman’s correlation ρ is defined by: Pn 6 i=1 (xi − yi )2 (4.2) ρ(x, y) = 1 − n(n2 − 1) Adaptations of this definition are also often considered in order to evaluate measure accuracy indirectly, that is to say, using datasets that do not directly refer to human expectations regarding measured notions. In this case, the accuracy of a measure is often indirectly evaluated by evaluating (the accuracy of) a system that depends on it. As an example, the aim of such a system may be to resolve a classification problem – e.g. by considering (i) that the degree of membership of an item to a class is defined as a function of its similarity with the gravity centre of the class, and (ii) that the class to which an item will be affected to is the class for which the item has the highest membership degree. Using this approach, systems are generally evaluated studying their accuracy, using the traditional formula of accuracy: accuracy = #(true positive) + #(true negative) #(true positive, true negative, f alse positive, f alse negative) (4.3) With #(X) the number of elements assigned to class X, e.g. #(true positive) is the number of elements which have been correctly classified by the system. In all cases, the notion of accuracy of a measure is per se defined according to a context, e.g., the true values considered, the semantic proxy (specific corpus, ontology, etc.), the tuning of the measure parameters (if any). Indeed, there is no guarantee that a measure that has been proved accurate in a specific evaluation setting will be accurate in other settings. The accuracy of a particular semantic measure tuning can therefore only be discussed with regard to a specific usage context, without absolute guarantee that the results that are obtained can be generalized to other usage contexts – even if empirical analyses have shown that specific measures tend to outperform others in many contexts. The precision of a measure (or more generally any system of measurement) corresponds to the degree of reproducibility or repeatability of the score produced by the measure under unchanged conditions. Since most semantic measures are based on deterministic algorithms, and therefore produce the same result given a specific input, evaluating the precision of a measure generally makes no sense. Evaluations of semantic measures therefore focus most of the time on the notion of accuracy. We will further discuss the precision of a measure as a mathematical property. Nevertheless, when a measure is evaluated analysing the precision of a system depending on it, e.g. a classification system, the precision will be defined by: precision = #(true positive) #(true positive, f alse positive) (4.4) 98 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES Accuracy and precision can be used to estimate the performance of a measure according to expected results. As we said, these results are only valid in a very specific evaluation setting – which depends on the dataset, measure parameters and resources (text corpora, knowledge base, etc.) that are considered. Nevertheless, these criteria alone may not be sufficient to analyse measure performance. For instance, most of the time, nobody will be able to ensure that expected results that are considered into a specific dataset are not impacted by uncertainty – and that they will be the same if the benchmark was obtained using other participants. Therefore, intuitively, rather than only considering the measure which best performs according to specific expected results (provided by humans), most system designers will prefer to use a simply satisfying measure which, in revenge, would still ensure a good performance even if human assessments were slightly different. Imprecision and variability in human evaluations, as well as any disturbances that may affect the human assessment process support this cautious behaviour. Put another way, evaluation protocols must also take into account the capacity for a measure to produce robust scores considering the uncertainty related to the way the human expected similarity values have been obtained, or disturbances of the semantic proxies on which relies the measure (modification of the ontologies, corpora). In this context, it is important to know how sensible/robust measure performances are to perturbation of evaluation settings. This aspect of a measure can be evaluated by analysing its robustness. It has been studied in (Janaqi et al., 2014); the authors propose a framework that can be used to evaluate semantic measure robustness, e.g. by disturbing expected results by an uncertainty model – technical details are not provided herein. To date, the robustness of semantic measures has only faintly been analysed and only few comparisons have been proposed. 4.2.2 Computational complexity The computational complexity of semantic measures is of major importance in most applications. Indeed, considering the growing volumes of datasets processed in semantic analysis (large corpus of texts and knowledge bases), this aspect is most often critical for concrete usages of semantic measures. As an example, considering alternatives with equivalent performances in a specific evaluation setting, most system designers will prefer to make moderate concessions on measure accuracy for a significant reduction of computational time. Indeed, reducing the expectation on measure accuracy may lower the final performance of a system, although using a measure with a strong computational complexity may simply prevent its use, e.g. information retrieval systems often depend on semantic measure computations that are made on-the-fly. However, the literature relative to the computational complexity of semantic measures is very limited. In particular, the algorithmic complexity of semantic measures, i.e. the amount of resources required (e.g. time, storage), is most of the time never analysed – the paper of Turney and Pantel (2010) is among the exceptions. It is therefore difficult to discuss algorithmic implications of current proposals. This hampers non-empirical evaluations of measures and burdens measure selection. It is nevertheless difficult to blame semantic measure designers for not providing detailed algorithmic analyses of their proposal. First, these extensive analyses are both technical and difficult to make. Second, they are only possible for specific cases as they depend on technical considerations that exceed semantic measure definitions, e.g., the type of data structures used to represent the semantic proxy on which rely the measures, the algorithm used in specific treatments (e.g. graph traversals). This later point may create a gap between theoretical capabilities of measures and computational complexity of their practical implementations into software. The reader must therefore understand that, to date, and despite the major importance of the computational complexity of measures, evaluation and comparison of measures regarding this criterion is difficult and most of the time not possible. Nowadays, comparisons of measures regarding this specific aspect most often rely on empirical evaluation of specific measure implementations. For an example of such a comparison in a specific setting you can refer to https://github.com/sharispe/sm-tools-evaluation. 4.2.3 Mathematical properties Several mathematical properties that are of interest for characterising semantic measures have been distinguished in Section 1.2.3, e.g., symmetry, identity of the indiscernibles1 , precision (for non-deterministic measures), and normalization. These properties enable to deeply characterize semantic measures and to select proposals adapted to specific usage contexts. Indeed, specific properties may be required to ensure the coherency of treatments depending on semantic measures. As an example, considering that 1 i.e. does not return the maximal similarity when comparing a term/concept to itself. 4.2. CRITERIA FOR SEMANTIC MEASURE EVALUATION 99 a measure is not symmetric or does not respect the identity of the indiscernibles can lead to undesired results and therefore may be inappropriate for some applications.2 Some of these mathematical properties are also essential to apply specific optimization techniques in order to reduce the computational complexity of measures while ensuring valid results. In addition, and this is a critical point that will be discussed hereafter, these properties play an important role to finely characterise the semantics carried by measures, i.e., the meaning of the results the measures produced. 4.2.4 Semantics The meaning (semantics) of the results obtained by a measure must be carefully considered when selecting a measure. This semantics is defined by the assumptions on which relies the algorithmic design of the measure. Some of these assumptions can be understood through the mathematical properties of the measure. The others are defined by the cognitive model on which the measure is based, the semantic proxy in use and the semantic evidence analysed. As saw in Section 1.3.1, the semantic evidence taken into account by the measure defines its type and therefore its general semantics (e.g., the measure evaluates semantic similarity, relatedness, etc.) – it therefore largely impacts the results. It is however difficult to finally compare measures regarding the semantics they carry. Nevertheless, it is essential for end-users to understand that measure selection may in some case strongly impact the conclusions that can be supported by the measurement (e.g. semantic similarity, relatedness, etc.). As an example, designing a recommendation system that will return items considering the focal concept Coffee may return completely different results depending on the semantic of the measure; if it is a semantic similarity the system will favour results that can (partially) substitute Coffee, e.g.Arabica, Tea, Hot Chocolate, while using a semantic proximity it will not only return beverages but also close concepts, e.g. Cup, Coffee bean. 4.2.5 Technical details What we denote technical details are the several extra-parameters that have to be considered when choosing semantic measures for a specific usage context. Some of them are not relevant for comparing measure proposals but may play an important role when a measure has to be used in specific applications. They may therefore be of interest for designers of systems that rely on semantic measures. Among the numerous technical details that have to be considered we distinguish: • The availability of supported implementations of the measure and the license associated to these implementations. Some measures require technical and substantial work in order to be implemented. When comparing measures for a specific application, it may therefore be important to reduce the set of alternatives that are considered according to this practical aspect. Appendix D presents numerous software tools that provide implementations of state-of-the-art-measures. • The dependency of the measure to specific resources (knowledge base, corpora, training datasets). Are these resources freely available in the domain of interest? In addition, the end-user must consider the sensibility of measure accuracy on these resources (if reported). • The availability of several evaluations that support the performance of the measure in multiple evaluation settings. Some aspects of measures that have been discussed in this section (e.g. accuracy) may be evaluated empirically using specific datasets. The following section details protocols that are generally adopted to evaluate semantic measures. Datasets that are commonly used are next presented. 2 It is however the case using particular measures in specific contexts. As an example using Resnik’s measure to compare concepts defined into a taxonomy (c.f. Section 3.4.3), the similarity of a general concept (near to the root) to itself will be low. 100 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES Figure 4.1: Example of a direct evaluation in which a semantic measure is evaluated by comparing the scores obtained by the measure to human expectations (e.g. average of human scores). 4.3 Existing protocols and datasets In the literature, accuracy of semantic measures is generally considered as the de-facto metric to evaluate and compare measure performance. It can be evaluated using a direct or an indirect approach depending on the expected scores (true values) that are considered. In this section, we detail the protocols commonly used to evaluate measures using the two approaches. Then, we present numerous datasets that can be used to compare measures. 4.3.1 Protocols used to compare measures In most cases, accuracy of measures is evaluated using a direct approach, i.e., based on expected scores of measurement (e.g., similarity, relatedness) of pairs of terms/concepts. In other cases, measures are evaluated indirectly, by analysing results of treatments which depend on semantic measures. In all cases, the evaluation of measure accuracy is performed regarding specific expectations/assumptions of expected results: • Direct evaluation: based on the correlation sures are generally evaluated regarding their larity/relatedness. In this case, the accuracy with gold standard benchmarks composed of ings. Results are commonly evaluated using illustrates the direct evaluation approach. of semantic measures with expected scores. Meacapacity to mimic human ratings of semantic simiof measures is discussed based on their correlations pairs of terms/concepts associated to expected ratPearson’s and Spearman’s correlations. Figure 4.1 • Indirect evaluation: This evaluation highly depends on the domain of study, e.g. NLP, Bioinformatics. Figure 4.2 illustrates the approach. Two strategies can be applied: 1. The first one evaluates measure accuracy analysing the performance of applications or algorithms which depend on semantic measures, e.g., accuracy of term disambiguation techniques, performance of a classifier or a clustering approach relying on semantic measures to mention a few. As an example, considering that the measure is evaluated through the analysis of disambiguation algorithm, the object of study would be the terms in specific (sentential) contexts; the expected results would be the mappings between the terms and their disambiguated forms and the results obtained would be produced by a disambiguation system based on the evaluated measure. In this scenario, the performance of the measure will be discussed with regard to the performance of the disambiguation process, i.e. the semantic measure that permits to obtain the best results (fixing the other parameters) will be considered to be the best in this context. Therefore, the method used to compare expected and obtained results depends on the type of the results considered. 2. The second strategy works by analysing the correlation of measures with domain-specific metrics that are expected to behave like semantic measures in specific contexts. As an example, in Bioinformatics, semantic measures are designed to compare gene products according to their conceptual annotations. Evaluations have been made by comparing correlations between 4.3. EXISTING PROTOCOLS AND DATASETS 101 Figure 4.2: General illustration of an indirect evaluation approach. scores of measures and the similarity of gene evaluated according to their DNA sequences (Lord et al., 2003). In the following section different datasets that can be used to compare semantic measures are presented in a syntactic manner. Then each one is detailed with regard to specific properties. 4.3.2 Datasets Most of datasets are based on human-ratings and are composed of pairs of terms/concepts for which humans have been asked to assign scores of semantic similarity or relatedness. The instructions provided to the participants vary among the datasets. These variations may impact the notion of similarity or relatedness considered by the participants. Generally, the quality of a dataset is assessed by analysing inter-agreement of participants, i.e. how scores of participants correlate. This inter-agreement also defines the level of accuracy measure designers may go after. These datasets can be used to evaluate measures according to a direct approach, i.e. regarding the (Pearson’s or Spearman’s) correlations of measures with averaged scores provided by humans. In some cases, cleaning techniques are applied to exclude abnormal ratings (outliers) from the datasets prior to the evaluation. Several datasets are listed in Table 4.1 – they are organised in chronological order. The large majority of them are in English. Some have been manually or automatically translated into other languages or mapped to knowledge bases (e.g. WordNet). In this case, word pairs are (manually) mapped to unambiguous pairs of concepts in order to be used to evaluate knowledge-based semantic measures3 . Some datasets are also dedicated to specific domains (e.g., medicine) and other focus on specific type of words (e.g. verbs, rare words). 3 In most cases, the concepts associated to the terms are not communicated in contributions related to knowledgebased semantic measures. In some cases, words are mapped to multiple concepts and the best score is considered for the evaluation, in accordance with the fact that annotators seem to consider the closest sense pair when evaluating the similarities (Mohammad and Hirst, 2012b). Nevertheless, these particular cases are poorly documented in the literature. (Pakhomov et al., 2010) ZG222 dataset (Zesch and Gurevych, 2006) (Pedersen et al., 2007) Gur350 dataset5 Gur65 (Gurevych, 2005) (Turney et al., 2003) SAT analogy questions (Jarmasz and Szpakowicz, 2003a) (Boyd-Graber et al., 2006) ρ = 0.661 Two sets 153/200 50 Cf. paper4 100000 For 101 pairs r = 0.51 For 29 pairs r = 0.68(physicians) r = 0.78 (coders) r = 0.50 (sim) r = 0.47 (rel) 29 566 (sim) 587 (rel) r = 0.49 5 Described r = 0.69 350 222 r = 0.81 Not found 300 65 Not found 374 Not found 52.7 Inter-agreement Pearson (r), Spearman (ρ) r = 0.99 on avg. values of two groups. Intra-agreement r = 0.85 r = 0.8848 80 30 65 Size details have to be considered. in https://www.ukp.tu-darmstadt.de/data/semantic-relatedness/german-relatedness-datasets 6 A subset of 29 pairs with higher inter-agreement is generally considered among the 101 pairs. 4 Specific Semantic similarity of pairs of nouns Semantic Similarity of words using synonymy questions Semantic relatedness of pairs of nouns. Semantic similarity of word pairs based on synonymy questions Semantic similarity of words based on analogy questions Semantic similarity based on synonym detection problems Semantic relatedness of pairs of WordNet Synsets German version of Rubeinstein & Goodenough benchmark Semantic relatedness of German word pairs Semantic relatedness of German word pairs Semantic relatedness between medical words6 (Miller and Charles, 1991) Semantic similarity and relatedness of pairs of UMLS concepts (medical domain) Semantic similarity of pairs of nouns (Rubenstein and Goodenough, 1965) TOEFL (Landauer and Dumais, 1997) WordSim353 (Finkelstein et al., 2002) ESL (Turney, 2001) Type of evaluation References 102 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES 7 Uniform Semantic relatedness of pairs of rare words Semantic similarity of pairs of WordNet synsets. Disambiguate the pairs of nouns of Rubenstein & Goodenough (RG), Miller & Charles (MC) and WordSim353 (WS) Semantic relatedness of pairs of nouns Semantic relatedness of pairs of nouns Semantic relatedness of pairs of nouns which are disambiguated by DBpedia URIs7 Semantic relatedness of pairs of words in context Not found 2003 Not found r = 0.71 and r = 0.70 25 and 30 2034 r = 0.89 Not found r = 0.93 (RG) r = 0.89 (MC) r = 0.86 (WS) 771 280 28 (MC) 65 (RG) 97 (WS) Resource Identifiers are used to refer to concept without ambiguity. Semantic relatedness of pairs of 3000 ρ = 0.84 words Semantic similarity of pairs of 999 ρ = 0.67 words Semantic relatedness of pairs of 143 Not found verbs Table 4.1: Summary of datasets that are commonly used for comparing semantic measures. Inter-agreement: refer to the details provided in the description of the dataset and/or to the original publications to understand how these values have been computed. Each result has specificities that must be considered for further analyses – comparison between values is not always directly possible. Stanford’s Contextual Word Similarities (SCWS) (Huang et al., 2012) The Stanford Rare Word (RW) Similarity Dataset (Luong et al., 2013) MEN test Collection (Bruni et al., 2014) SimLex-999 (Hill et al., 2014) (Baker et al., 2014) Mturk-771 (Halawi et al., 2012) (Ziegler et al., 2012) (Radinsky et al., 2011) ConceptSim (Schwartz and Gomez, 2011) 4.3. EXISTING PROTOCOLS AND DATASETS 103 104 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES Noun 1 cord noon food forest automobile Noun 2 smile string fruit woodland car Average similarity [0, 4] 0.02 0.04 2.69 3.65 3.92 Table 4.2: Example of entries of the Rubenstein and Goodenough dataset. The reader can also consider these interesting websites about datasets (that may be updated in the future): • Manaal Faruqi8 website maintains a list of various datasets that can be used to evaluate semantic measures. • The ACL website9 and the Semantic Measure Library website10 also provide information about datasets. In the following, we detail several aspects of each aforementioned datasets. We discuss in particular the specific aims of the datasets. We also introduce the protocols and settings that have been used during acquisition. This will help us to underline the semantics which is associated to the expected scores that have been provided by the participants. (Rubenstein and Goodenough, 1965) – noun similarity The procedure used to obtain this dataset is well documented in the associated paper. The dataset is composed of 65 pairs of nouns (ordinary English nouns), e.g. cord/smile – pairs were introduced as theme pairs in the experiment. Each pair was written into a card in order to obtain a shuffled deck of 65 cards for each participant. Next, participants were asked to order the cards according to the similarity of the pairs of nouns written on them. Finally, participants were asked to evaluate the (semantic) similarity of each pair using a 0-4 scale – the higher the number associated to the card, the greater the “similiarity of meaning”. This experiment was designed to evaluate semantic similarity, which was defined as the “amount of similarity of meaning” (i.e. degree of synonymy) to the participants. Participants were 51 paid college undergraduates. Two groups of 15 and 36 subjects were considered – respectively called group 1 and 2. The intra-subject reliability was computed using group 1 on 36 pairs of nouns for which participants were asked to assign the similarity twice, two weeks apart. The intra-subject reliability was computed using Pearson’s correlation: a score of r = 0.85 was obtained. Inter-subject correlation is not communicated in this experiment but the reported correlation of mean judgements of the two different groups was impressively high (r = 0.99). This encouraged the authors to merge the results of the two groups to finally only consider a single group of 51 participants. For each pair of nouns, only the average similarity of the scores provided by all the participants is available. Examples of results are provided in Table 4.2. The benchmark of Rubenstein and Goodenough is largely used in the evaluation of semantic similarity measures. It has also been translated into German by Gurevych (2005). (Miller and Charles, 1991) – noun similarity Miller & Charles benchmark is a subset of Rubenstein and Goodenough’s benchmark composed of a selection of 30 pairs. Three sets of 10 pairs of nouns with high, intermediate and low levels of similarity were chosen; for each set of pairs of nouns, the scores in the original Rubenstein and Goodenough’s benchmark were respectively 3 or 4, between 1 and 3, and 0 or 1. The similarities of the 30 pairs of nouns were then assessed by 38 participants. These participants received the instructions provided by Rubenstein and Goodenough. Inter-subject correlation is 0.8848. Interestingly, human rating obtained by Miller and Charles, and Rubenstein and Goodenough are highly correlated, with a Pearson’s correlation 8 http://www.cs.cmu.edu/ ~mfaruqui/suite.html 9 http://www.aclweb.org/aclwiki 10 http://www.semantic-measures-library.org 4.3. EXISTING PROTOCOLS AND DATASETS 105 of 0.97, e.g. reported by Bollegala (2007a). Note that, as stressed by Budanitsky and Hirst (2006), due to a typographical error, the pair cord/smile was changed to chord/smile. This seems to have no impact on the overall evaluation since both pairs have low levels of similarity. Only the averaged similarities are provided in the dataset. This benchmark has also been translated into Arabic, Romanian and Spanish (Hassan and Mihalcea, 2009). TOEFL (Landauer and Dumais, 1997) – word similarity This dataset is designed to evaluate semantic similarity of words. It evaluates the degree of synonymy of pairs of nouns, verbs, and adjectives. It is composed of 80 multiple-choice synonymy questions that have been selected from the Test of English as a Foreign Language (TOEFL). Each question provides a problem word and 4 choices of synonyms with a single expected answer – an example of question is provided below. For each question, participants were asked to select the synonym with the “most similar meaning” with the problem word associated to the question. Averaged result obtained from a large sample of applicants to U.S colleges from non-English countries is 51.6 correct answers (64.5%) – reduced to 52.7% when these scores are corrected by penalizing errors to lower the impact of correct answers that could have been obtained by guessing. Additional information about this dataset can be found at: http://lsa.colorado.edu/papers/plato/ plato.annote.html#evaluate Example of question11 : considering the focal word levied and the following choices (a) imposed, (b) believed, (c) requested, (d) correlated, the expected solution is (a) imposed. WordSim353 (Finkelstein et al., 2002) – word relatedness Two sets of English pairs of words along with human ratings of semantic relatedness. The first set contains 153 pairs including the 30 nouns pairs contained in (Miller and Charles, 1991) dataset. 13 participants evaluated it. The second set contains 200 pairs evaluated by 16 participants. Participants were asked to assess the “relatedness” of words in a 0-10 discrete scale associated to the semantics “totally unrelated words” (0) to “very much related or identical words” (10). A correlation of 0.95 is reported between the scores proposed by the participants of WordSim353 and those assessed in Miller and Charles experiment. Row results, as well as mean scores are provided for the two sets. A concatenation of the sets composed of 353 pairs with averaged scores is also provided. (Hill et al., 2014) reports an inter-agreement of ρ = 0.661 using Spearman’s correlation. The benchmark is available at http: //www.cs.technion.ac.il/~gabr/resources/data/wordsim353. WordSim353 have also been translated into French (Joubarne and Inkpen, 2011), Arabic, Romanian and Spanish (Hassan and Mihalcea, 2009). ESL (Turney, 2001) – word similarity ESL, English as a Second Language, is similar to the TOEFL dataset (Landauer and Dumais, 1997). It proposes to evaluate the semantic similarity of pairs of nouns, verbs or adjectives by providing 50 multiple-choice synonym questions (4 choices by question). These questions have been selected from a collection of questions for students of ESL. Inter-agreement between student results is not provided. This dataset is available on request from Peter Turney. Additional information about this dataset can be found at: http://a4esl.org/q/j/dt/mc-2000-01syn. html Providing the definition “A rusty nail is not as strong as a clean, new one.” and the following choices (a) corroded, (b) black, (c) dirty, (d) painted, the expected solution is (a) corroded.12 SAT Analogy questions (Turney and Littman, 2003) – similarity of word relationships This dataset is composed of 374 multiple-choice analogy questions collected by Michael Littman from the Scholastic Aptitude Test (SAT). It has been used to evaluate contextual semantic similarity of semantic relationship between words (Turney, 2006). This notion is evaluated studying the analogy between the 11 Example 12 Example from http://www.aclweb.org/aclwiki/index.php?title=TOEFL_Synonym_Questions_(State_of_the_art) from http://www.aclweb.org/aclwiki/index.php?title=ESL_Synonym_Questions_(State_of_the_art) 106 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES Figure 4.3: Screenshot of the interface and scale used to obtain the score of evocation for a pair of synsets. From (Nikolova et al., 2012). relationships that link words. Each question is composed of a problem pair of words with a single valid answer among 5 choices of pair of words. As an example, considering the problem pair cat:meow and the 5 choices mouse:scamper, bird:peck, dog:bark, horse:groom, lion:scratch, the expected answer is dog:bark since the semantic relationships which link these words and the words of the problem pair (cat:meow ) are the same “the name of the sound made by the animal ”. Another example of question is provided below. This benchmark is available on request from Peter Turney. Human performances are not provided. Providing the stem mason:stone and the following choices (a) teacher:chalk, (b) carpenter:wood, (c) soldier:gun, (d) photograph:camera, (e) book:word, the expected solution is (b) carpenter:wood.13 300 RDWP – (Jarmasz and Szpakowicz, 2003a) word similarity This dataset is composed of 300 synonym detection problems. They have been selected for the Word Power game of the Canadian edition proposed at Reader’s Digest Word (2000, 2001) – refer to the work of Jarmasz and Szpakowicz (2003a) for details about the original dataset. Each question is composed of a problem word, and 4 candidate answers. Participants have been asked to “Check the word or phrase you believe is nearest in meaning”. The following example is provided by Jarmasz and Szpakowicz (2003a). Providing the problem word: ode and the following choices (a) heavy debt, (b) poem, (c) sweet smell, (d) surprise, the expected solution is (b) poem. (Boyd-Graber et al., 2006) – WordNet synset relatedness This benchmark provides human appreciation of semantic relatedness for a large number of pairs of WordNet synsets. It is composed of two datasets of about 100K randomly selected pairs of synsets. Trained undergraduates were used to build the first dataset. The second dataset was made from participants selected on the Amazon Mechanical Turk platform. It is reported to contain noise – refer to the original documentation for more details. Figure 4.3 presents the scale proposed to the participants. Additional information about this dataset can be found at: http://wordnet.cs.princeton.edu/downloads. html (Yang and Powers, 2006) – verb relatedness This dataset provides semantic similarities for 144 pairs of verbs. According to the authors this is the first benchmark dedicated to the evaluation of verb semantic similarity. The verbs have been selected from TOEFL (Test of English as a Foreign Language) and ESL (English as a second Language) tests – details on how the pairs of verbs have been obtained from these tests are provided in the contribution of Yang and Powers (2006). 2 academic staffs and 4 postgraduate students have assessed the semantic similarities – 4 were native Australian English speakers and 2 were near-native speakers. A 0 (not at all related ) to 4 (inseparably related ) discrete scale has been used. A Pearson’s correlation of r = 0.866 is reported among the participants. (Pedersen et al., 2007) – concept relatedness This dataset is composed of pairs of medical concepts represented by pairs of non-ambiguous words. Similarly to the definition of Rubenstein and Goodenough, 120 pairs of terms equally divided into four classes of degree of relatedness from practically synonymous to unrelated were chosen. Participants were 3 physicians and 9 medical coders. They annotated each pair using the following discrete scale: practically synonymous (4.0), related (3.0), marginally related (2.0) and unrelated (1.0). A low correlation of 0.51 between the participant scores was obtained. Therefore, a subset of this set composed of 30 pairs with 13 Example from http://www.aclweb.org/aclwiki/index.php?title=SAT_Analogy_Questions_(State_of_the_art) 4.3. EXISTING PROTOCOLS AND DATASETS Concept 1 Renal failure Heart Stroke Delusion Concept 2 Kidney failure Myocardium Infarct Schizophrenia 107 Physician Avg. 4 3.3 3 3 Coder Avg. 4 3 2.8 2.2 Table 4.3: Example of entries of Pedersen et al. dataset. Values are in the interval [0, 4]. higher inter-agreement is generally considered – one pair was later deleted since no correspondence with a concept was found into the SNOMED-CT (structured terminology). Using the subset of 29 pairs, the average correlation among physicians and medical coders is 0.68 and 0.78 respectively. Considering average scores of each member of each group, the correlation between physicians and medical coders is 0.85. 10 medical coders also assessed the similarity of the pairs of words of the Rubenstein and Goodenough and Miller and Charles benchmarks. They obtained an inter-agreement of 0.84 and 0.88 with the values obtained in the original experiments. Only averaged similarities of both physicians and medical coders are available. Table 4.3 presents some of the entries that compose the dataset. This dataset has also been used to compare concepts defined into MeSH or SNOMED-CT – correspondences between labels and concept identifiers are provided by Batet et al. (2014) and Harispe et al. (2013c). WS Sim (Agirre et al., 2009) – cross-lingual word similarity This dataset is used to evaluate Spanish/English cross-lingual semantic similarity and relatedness. It is composed of the set of pairs of words of Rubenstein & Goodenough and WordSim 353 datasets, in which the second word of each pair has been translated into Spanish. The two translators agreed on translating 72% and 84% of Rubenstein & Goodenough and WordSim 353 pairs respectively. Information about this benchmark is available at http://alfonseca.org/eng/research/wordsim353.html. (Pakhomov et al., 2010) – word similarity/relatedness This dataset provides scores of semantic similarity and relatedness between pairs of medical terms – terms refer to UMLS concepts. Two sets of concept pairs are studied. The first contains 566 pairs and is dedicated to semantic similarity. The second is composed of 587 pairs rated for semantic relatedness. Scores were obtained from 8 medical of the University of Minnesota Medical School, 4 participated to the similarity task and 4 to the relatedness task. This work can also be used to compare concepts defined into medical knowledge-base, e.g. MeSH or SNOMED-CT (Batet et al., 2014). ConceptSim (Schwartz and Gomez, 2011) – concept similarity ConceptSim disambiguates WordSim 353, Rubenstein & Goodenough (and therefore Miller & Charles) datasets by mapping each word to a unique synset of WordNet 3.0. Two annotators with an interagreement that ranged from 86 to 93% made the disambiguation. The final version of the benchmark contains the mapped pairs after annotator agreement. Original mapping of the two annotators are provided. Even if differences could be observed between the similarity of the ambiguous and disambiguated pairs, the similarities of the original experiments are generally considered when evaluating measures using this dataset. The benchmark is available to download at http://www.seas.upenn.edu/~hansens/ conceptSim. (Radinsky et al., 2011) – word relatedness This dataset is composed of 280 pairs of words with associated semantic relatedness scores. Participants were Amazon Mechanical Turk workers. Each participant evaluated 50 pairs and an average of 23 rating is reported for each pair. Outliers were removed using correlations with ten pairs of WordSim353 datasets. A version of this dataset is available at: http://tx.technion.ac.il/~kirar/Datasets.html 108 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES Concept 1 artillery cement pyramid Concept 2 gun glue speculation Relatedness Avg. [1, 5] 3.542 3 1.7 Table 4.4: Example of entries of Halawi et al. dataset. Word 1 EasyJet Eminem Microsoft Periodic Table Word 2 Cheap Flight Music Internet Explorer Toyota Relatedness Avg. [1, 5] 4.294 4.137 4.314 1.176 Standard deviation 0.749 0.971 0.727 0.55 Table 4.5: Example of entries of Ziegler et al. dataset. Mturk-771 (Halawi et al., 2012) – word relatedness This dataset is composed of 771 pairs of English words along with their semantic relatedness. Each pair of words has been evaluated by at least 20 participants from the Amazon Mechanical Turk platform. Inter-correlation of the results was assessed to 0.89 with small variance. Participants were asked to assign the relatedness of batch of 50 pairs of words using a 1-5 discrete scale ranging to “not related ” to “highly related ”. In order to assess the quality and reliability of the evaluation, each batch of 50 word pairs contained 10 pairs known to have extreme relatedness values. This was used to control dataset quality. Evaluations which contained more than one error on the control quality pairs were not considered for building the final benchmark. Both raw and mean scores are available for download at http://www2.mta.ac.il/~gideon/mturk771.html14 . Examples of entries of this dataset are provided in Table 4.4. (Ziegler et al., 2012) – concept relatedness Two sets of concept/instance pairs denoted by English words. Contrary to most of existing benchmarks, the compared word refers to concepts or instances such as name of artists, brand names, qualified concepts. The first set contains 25 pairs, the second 30. Participants were asked to assign the relatedness of pairs of concepts using a 1-5 discrete scale ranging to the semantics “no proximity” to “synonymy”. The scores of relatedness were assessed based on an online survey. Most participants were not native people (Germans, Italians, Turkish). Inter-subject correlations based on Pearson’s correlation are about 0.70 for the two sets – which is good considering the facts that the benchmark is composed of names of brands, artists, making the comparison more difficult, e.g. the label has to be understood by the participants. In addition, contrary to most experiments the majority of the participants were not native people. Both average similarities and associated standard deviations are provided. Examples of entries are given in Table 4.5. SCWS (Huang et al., 2012) – word similarity in context Stanford’s Contextual Word Similarities (SCWS) provides the semantic similarity of 2003 pairs of words in sentential contexts to ensure that the meaning of words is not ambiguous. Each pair has been evaluated by 10 participants taken on the Amazon Mechanical Turk platform. Details about the dataset are provided in (Huang et al., 2012). It can be downloaded at: http://www-nlp.stanford.edu/~ehhuang/ SCWS.zip. Example of results that have been obtained for the comparison of the words activity (n) and inaction (n) considering the following contexts: 14 Contrary to the details provided in the paper, the documentation specified that each pair was evaluated by ten people. 4.3. EXISTING PROTOCOLS AND DATASETS Word 1 omnipotence calcify dwarfish prescriptions Word 2 state change fish medicine 109 Relatedness Avg. [0, 10] 0.86 4.83 8.38 9.11 Table 4.6: Example of entries of Luong et al. dataset. Word 1 Sun River Green Garage Word 2 Sunlight Water Grey Garder Relatedness Avg. [0, 50] 50 49 36 18 Table 4.7: Example of entries of Bruni et al. dataset. activity (n): “tons of poultry and 61 million tons of eggs were produced worldwide. Chickens account for much of human poultry consumption, though turkeys, ducks, and geese are also relatively common. Many species of birds are also hunted for meat. Bird hunting is primarily a recreational activity except in extremely undeveloped areas. The most important birds hunted in North and South America are waterfowl ; other widely hunted birds include pheasants, wild turkeys, quail, doves , partridge , grouse , snipe , and woodcock . Muttonbirding is also popular in Australia and”. inaction (n): “respect which always marked his communications with the court. It has been insinuated both by contemporary and by later critics that being disappointed at his loss of popularity, and convinced of the impossibility of co-operating with his colleagues, he exaggerated his malady as a pretext for the inaction that was forced upon him by circumstances. But there is no sufficient reason to doubt that he was really, as his friends represented, in a state that utterly unfitted him for business. He seems to have been freed for a time from the pangs of”. The average relatedness is 6. Details of the 10 scores are: 10, 9, 8 (×3), 7, 5, 3, 2, 0. RW (Luong et al., 2013) – Rare word relatedness This benchmark provides the semantic similarity for 2034 pairs of rare words. Details about the dataset and its construction are provided in (Luong et al., 2013). Participants were recruited from the Amazon Mechanical Turk platform. For each pair, 10 ratings have been obtained using a 0-10 discrete scale. The benchmark can be downloaded at: http://www-nlp.stanford.edu/~lmthang/morphoNLM. Examples of entries are provided in Table 4.6. MEN Test (Bruni et al., 2014) – word relatedness The MEN Test Collection provides scores of semantic relatedness for 3000 pairs of words. Scores were obtained from English native speaker available from the Amazon Mechanical Turk platform. Contrary to other experiments, participants did not rate the semantic relatedness of pairs of terms using a discrete scale but rather used comparative tests. They were asked to distinguish the most related pair of words among two candidate word pairs. For each pair, 50 binary scores (more or less related than the other pair) have been obtained and used to compute the score of relatedness in a 0-50 discrete scale. Since candidate pairs were randomly generated no score of inter-agreement between participants has been reported. However, as a control, a ρ = 0.68 Spearman correlation between the scores of relatedness provided by two of the authors in a 0-7 discrete scale is reported. In addition, a Spearman correlation of ρ = 0.84 between the average values of these scores and those obtained using participants is reported. Details and downloads are provided at http://clic.cimec.unitn.it/~elia.bruni/MEN.html. Examples of entries are provided in Table 4.7. 110 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES Figure 4.4: Instructions provided to participants of Sim-Lex-9999 experiments. From (Hill et al., 2014). Verb 1 organising form showing Verb 2 developed employ showed Relatedness Avg. [0, 10] 3.6 1.9 7.8 Standard deviation 0.35 0.19 0.7 Table 4.8: Example of entries of Baker et al. dataset. Sim-Lex-999 (Hill et al., 2014) – word similarity Sim-Lex-999 is dedicated to the evaluation of the semantic similarity between words. It provides semantic similarity scores for 999 pairs of words that have been assessed by participants selected from the Amazon Mechanical Turk platform. Words refer to concepts selected from the University of South Florida (USF) Norms dataset – a dataset that provides ratings for the concreteness of several concepts (Nelson et al., 2004). However, contrary to (Huang et al., 2012) which disambiguates words by providing a sentential context, in this case only labels are provided to the participants – instructions are presented in Figure 4.4. Each participant had to provide similarity ratings in a 0-7 discrete scale for 20 pairs of words. Each pair was evaluated by an average of 50 participants. The Spearman correlation between participants is 0.67. Refer to the work of Hill et al. (2014) for details about the protocol used to obtain this benchmark. Sim-Lex-999 can be downloaded at: http://www.cl.cam.ac.uk/~fh295/simlex.html. (Baker et al., 2014) – verb similarity This dataset provides score of semantic relatedness for 143 pairs of verbs. For each pair, 10 participants have a relatedness score in a 0-10 discrete scale. The dataset can be downloaded from http://ie. technion.ac.il/~roiri/. Examples of entries are provided in Table 4.8. The Semantic Textual Similarity campaign and related datasets The Semantic Textual Similarity (STS) campaign provides state-of-the-art resources and methods for comparing measures and systems dedicated to sentence semantic similarity evaluations – defined as the 4.3. EXISTING PROTOCOLS AND DATASETS Sentence 1 The bird is bathing in the sink The woman is playing violin Sentence 2 Birdie is washing itself in the water basin The young lady enjoys listening to the guitar 111 Similarity [1, 5] 5 – The two sentences are completely equivalent, as they mean the same thing. 1 – The two sentences are not equivalent, but are on the same topic. Table 4.9: Pairs of sentences from the STS dataset. “degree of semantic equivalence” between two sentences. Detailed information about STS, the resources it proposes and the community it federates can be found at http://ixa2.si.ehu.es/stswiki/index.php. The STS campaign is proposed since 2012 at SemEval – a series of evaluations dedicated to computer systems related to semantics (Agirre et al., 2012). The datasets used in this campaign are composed of pairs of sentences from specific or existing paraphrase and machine translation datasets. The similarity between the sentences of each pair is defined by participants into a 0 to 5 discrete scale – considering that 5 means “The two sentences are completely equivalent, as they mean the same thing” while 0 means “The two sentences are on different topics”. Details are provided in the associated documentation. The challenge is to design a system that will assign a score of relatedness with an optional score of confidence when comparing two sentences. Example of expected results are presented in Table 4.9. Some datasets provided by STS are also available in Spanish. Specific evaluations have also been proposed. As an example, in 2014, a Cross-Level Semantic Similarity Task proposed to evaluate measures able to compare semantic similarity across different sizes of texts (paragraph to sentence, phrase to word. . . ). Among the benchmarks used to evaluate text relatedness, users can also consider: • (Li et al., 2006) – sentence similarity benchmark which is based on the definitions of the terms that compose (Rubenstein and Goodenough, 1965) dataset. 32 participants assessed similarity using a 0 to 4 scale (unrelated to alike). A subset of 30 pairs of definitions is generally considered. • (Lee et al., 2005) – text to text similarity which is based on pairs of documents built from a collection of 50 short documents presenting news (source: Australian Broad-casting Corporation’s news mail service). For each pairs, ten participants have proposed relatedness scores into a 1 to 5 discrete scale (unrelated – alike). The final benchmark contains similarity for all the 2500 document pairs. • Microsoft research paraphrase benchmark15 (MSR Paraphrase) can also be used to compare the similarity of texts. This manually created benchmark contains next to 6K pairs of sentences from diverse Web sources – Inter-agreement was evaluated between 82 and 84%. In the context of STS evaluation, this benchmark has been enriched by specifying how related are the sentences which are not considered to be paraphrased. • Microsoft research Video Paraphrase Corpus. Built using Amazon Mechanical Turk to obtain a sentence description of the video – 120k descriptions have been collected for 2000 videos. Based on this dataset 1500 pairs of sentences have been generated considering sentences describing the same video or different videos – details are provided in the work of Agirre et al. (2012). • Other datasets can be adapted to evaluate semantic similarity or relatedness, e.g. benchmarks used to evaluate distributional semantic models (Baroni and Lenci, 2011) or domain-specific datasets (Hassan et al., 2012). Other evaluations not based on human ratings We have presented numerous datasets that can be used to evaluate semantic measures with regard to expected scores of similarity or relatedness of compared elements (terms, concepts, sentences). These datasets can be used to assess measure accuracy by directly analysing their ability to mimic human appreciation of semantic similarity or relatedness. Using indirect evaluations, the accuracy of measures 15 http://research.microsoft.com/en-us/downloads/607D14D9-20CD-47E3-85BC-A2F65CD28042/default.aspx 112 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES can also be evaluated by analysing the impact of a specific choice of measure on the performance of systems. Accuracy and precision measures introduced in Section 4.2.1 are generally used in this case. As an example of indirect evaluation, McInnes and Pedersen (2013) evaluated measures by analysing the performance of a disambiguation system. Particular strategies are defined for specific domains. In Bioinformatics, evaluated systems can be used to obtain expected groups of genes or proteins, e.g. protein families, genes involved in similar metabolic pathways, or to distinguish pairs of proteins that will interact. In other cases, semantic measures will be evaluated by analysing the correlation between the semantic similarity of gene conceptual annotations (groups of concepts defined into an ontology) and the score of similarity of gene DNA sequences. Please refer to the work of Guzzi et al. (2012) and Pesquita et al. (2009a,b) for details related to evaluations in Bioinformatics. 4.4 Discussions In this chapter, we have introduced several important aspects related to the evaluation and the selection of semantic measures. First, we have discussed multiple characteristics of measures that can be discussed in order to select the measures that are adapted to a specific usage context: accuracy, precision, robustness, computational complexity, mathematical properties, semantics, as well as other technical details such as the availability of free concrete implementations. Next, we have presented state-of-the-art methodologies and datasets commonly used to empirically evaluate measure accuracy. Using this information, users will be able (i) to deeply analyse a specific choice of measure and (ii) to better understand the implication of this choice on the system he develops. In the process of selecting a specific measure, end-users must first characterise as much as possible the properties his ideal measure must respect, the resources which are available and other constraints that will be useful to orient the selection (e.g. computational complexity, computer resources, and implementation availability). These points are dependant on the usage context and therefore prevent the definition of a generic turnkey solution. However, once this work has been performed, we have introduced and identified a variety of datasets that can be used to empirically evaluate measures with regard to particular applications. Existing comparisons can be analysed from the literature or publicly available results published onto the Web16 . An important point to stress – that has voluntary not been discussed in this chapter – is that for most datasets measure proposals equalling human inter-agreement have been proposed. This stresses that efficient solutions have already been proposed and that, in most cases, ad-hoc solutions are not required. Using existing implementations of measures and tools dedicated to evaluation presented in Appendix D, as well as publicly available benchmarks, specific empirical analysis can also be done to perform fine-grained analysis of measures and eventually tune studied alternatives. Finally, if the datasets that have been presented are not representative of a specific use case of interest, the reader can refer to the benchmarks descriptions provided in this chapter to design new ones. Despite the numerous datasets and evaluation approaches presented in this chapter, evaluating semantic measures is both conceptually and practically an open challenge. Many biases are yet to be excluded from future datasets to improve evaluation process. For instance we stress that: • Uncertainty in expected values could be better managed if individual assessments were provided instead of average values as a summary of the collected evaluations. • Similarity expected scores are imprecise values and should be modelled as such whereas they are currently defined on a linearly ordered finite scale, e.g. 0-4. • Providing similarity scores for individual pairs of words is probably less natural for participants than providing pairwise comparison of the similarity of word pairs. • The difficulty of evaluation depends on the pairs of concepts to be compared; hence, all the required scores should not contribute equally to the overall assessment of the measure accuracy. In this context, research on how to better evaluate semantic measures must be made. Initiatives defining systematic and reproducible approaches for comparing measures, such as the Semantic Textual Similarity campaign (Agirre et al., 2012), must also be encouraged. Indeed, nowadays, this field of study suffers from the lack of reproducible results and shared evaluation platform – they could greatly ease the comparison of existing proposals, and help us to better understand both benefits and drawbacks of 16 As an example ACL website provides provides several results for numerous approaches. Consult: http://www.aclweb. org/aclwiki 4.4. DISCUSSIONS 113 existing proposals – initiatives such as (Faruqui and Dyer, 2014; Pesquita et al., 2009b) must also be encouraged, supported, improved and adopted. This is necessary to enable the emergence of general knowledge about semantic measures from existing comparison results. More analysis of existing benchmarks must also be performed in order to criticise their relevance and to underline their strengths and limits. Differences between contextualised semantic similarity and semantic similarity of ambiguous words must deeply be studied. To date, by only providing pairs of words, most datasets delegate sense selection to the participants, which necessarily impact the quality of the evaluation (Budanitsky, 2001), and probably the whole meaning of the evaluation. Difference between the semantic similarity/relatedness of different types of words, e.g. nouns, verbs, adjectives must also be better understood. Better understanding expected scores of semantic similarity or relatedness will, without doubt, help us to improve and better define semantic measures. A large number of state-of-the-art evaluation results related to semantic measures are based on reduced datasets that only contain a few dozens of pairs of elements, e.g. Miller and Charles dataset. This highly reduces and even questions the conclusions that can be derived from them, e.g. are these results biased? Additional evaluations must be performed using the various larger datasets recently proposed. All these contributions will help us to better compare semantic measures and to precise more finely the quantities estimated by these measures. This will be required to characterise the various dimensions today encompassed into the notions of semantic similarity, proximity or distance. 114 CHAPTER 4. EVALUATION OF SEMANTIC MEASURES Chapter 5 Conclusion and research directions The capacity of assessing the similarity of objects or stimuli has long been characterised as a central component for establishing numerous cognitive processes. It is therefore not surprising that measures of similarity or distance play an important role in a large variety of treatments and algorithms, and are of particular interest for the development of Artificial Intelligence. In this context, this book focused on the complex notion of semantic similarity and more generally on semantic measures: how to compare units of languages (words, paragraphs, texts) or conceptualised entities, i.e. concepts or instances defined in ontologies, by taking into account their semantics and therefore their meaning. We first introduced numerous applications in which approaches for the estimation of semantic similarity, relatedness or distance play an important role, as well as the numerous communities involved in their study. We also introduced important contributions related to the notion of similarity: the various models of similarity proposed and studied by Psychology and the formal axiomatic definitions of distance and similarity considered in Mathematics. This helped us identifying the depth of this interdisciplinary area of research, a depth which has been in particular illustrated by highlighting and organizing the large and often poorly defined vocabulary introduced in the literature, i.e. semantic similarity, semantic relatedness, semantic distance. Next, we introduced a general classification of semantic measures and the two broad families of semantic measures: corpus-based measures used to compare units of languages from natural language analysis and knowledge-based measures used to compare concepts and instances defined into ontologies. The foundations of these two approaches have been detailed and several examples of approaches have been introduced. We hope this introduction helped the reader to understand the concept of semantic measure and to discover the variety of approaches proposed so far. Indeed, even if this book only propose an introduction to semantic measures, and do not discuss in detail all types of measures proposed in the literature, as well as important topics such as the evaluation of measures or the selection of context-specific measures, we are convinced it provides enough material and references to give the reader access to a deep understanding of this topic. We also hope that this overview of the field will help researchers identifying research directions to galvanise this topic. To conclude, we propose to discuss some of the challenges we have identified based on the analysis of a large body of literature dedicated to semantic measures: • Better characterise semantic measures and their semantics; • Provide theoretical and software tools for the study of semantic measures; • Standardise ontology handling; • Improve models for compositionality; • Study current models of semantic measures w.r.t language specificities; • Promote interdisciplinary; • Study the algorithmic complexity of measures. • Support context-specific selection of semantic measures. 115 116 CHAPTER 5. CONCLUSION AND RESEARCH DIRECTIONS Research directions Better characterise semantic measures and their semantics Throughout the introduction of semantic measures, we have stressed the importance of controlling their semantics, i.e., the meaning of the scores they produce. This particular aspect is of major importance since the semantics of measures must explicitly be understood by end-users: it conditions the relevance to use a specific measure in a particular context. Nevertheless, the semantics of semantic measures is generally not discussed in proposals (except some broad distinction between the notion of semantic similarity and relatedness). However, semantic similarity based on taxonomies can have different meanings depending on the assumptions on which they rely. In this introduction, we have underlined that the semantics associated to semantic measures can only be understood w.r.t: (i) the semantic proxy used to support the comparison, (ii) the mathematical properties associated to the measures, and (iii) the semantic evidence and assumptions on which the measures are based. The semantics of the measures can therefore only be captured if a deep characterisation of semantic measures is provided. In recent decades, researchers have mainly focused on the design of semantic measures, and despite the central role of the semantics of semantic measures, few contributions have focused on this specific aspect. This can be partially explained by the fact that numerous semantic measures have been designed in order to mimic human appreciation of semantic similarity/relatedness. In this case, the semantics to be carried by the measures is expected to be implicitly constrained by the benchmarks used to evaluate the accuracy of measures. Nevertheless, despite evaluation protocols based on ad hoc benchmarks being relevant to compare semantic measures in specific contexts of use, they do not give access to a deep understanding of measures. Indeed, even if their usefulness is not to discuss, they often do not provide enough general knowledge on semantic measures, e.g. to predict the behaviour of measures in other usage contexts. There are numerous implications involved in a better characterisation of semantic measures. We have already stressed its importance for the selection of semantic measures in specific contexts of use. Such a characterisation could also benefit cognitive sciences. Indeed, as we saw in Section 1.2.1, cognitive models aiming to explain human appreciation of similarity have been supported by the study of properties expected by the measures. As an example, remember that spatial models have been challenged according to the fact that human appreciation of similarity has proven not to be in accordance with axioms of distance. Therefore, characterising (i) which semantic measures best performed according to human expectations of semantic similarity/relatedness and (ii) the properties satisfied by these measures could help cognitive scientists to improve existing models of similarity or to derive more accurate ones. In Chapter 1, we have presented an overview of the various semantic measures which have been proposed to compare units of language, concepts or instances which are semantically characterised. In particular, in Section 1.3, we distinguished various aspects of semantic measures which must be taken into account for their broad classification: (i) The types of elements which can be compared, (ii) The semantic proxies used to extract semantic evidence on which the measures will be based and (iii) The canonical form adopted to represent the compared elements and therefore enable the design of algorithms for their comparison. In Section 1.2.2, based on several notions introduced in the literature, we proposed a characterisation of the general semantics which can be associated to semantic measures (e.g., similarity, relatedness, distance, taxonomic distance). In Section 1.2.3, we recalled some of the mathematical properties which can be used to further characterise semantic measures. Finally, throughout this introduction, and particularly in Section 2.2 and Section 3.3, we distinguished extensive semantic evidence on which corpus-based and knowledge-based semantic measures can be defined. We also underlined the assumptions associated to their consideration. We encourage designer of semantic measures to provide an in-depth characterisation of measures they propose. To this end, they can use, among others, the various aspects and properties of the measures distinguished in this book and briefly summarised above. We also encourage the communities involved in the study of semantic measures to better define what a good semantic measure is and to define exactly what makes one measure better than another. Within this goal, the study of the role of usage context seems to be of major importance. Indeed, the accuracy of measures can only be discussed w.r.t specific expectations of measures. Several other properties of measures could also be taken into account and further investigated: 117 • Algorithmic complexity, which is of major importance for most of concrete use cases, but so far only poorly discussed in the literature. • Degree of control on the semantics of the scores produced by the measures. A measure could be evaluated according to the understanding of its semantics. It could also be interesting to consider the degree of control a end-user can have on the semantics of the results. Indeed, this aspect is important in several applications based on semantic measures, e.g. synonymy detection. • The trust which can be associated to a score. Is it possible to evaluate the trust we can have on a specific similarity or relatedness assessment, e.g. based on prior analysis of the semantic proxy which is used. • The robustness of a measure, i.e., the capacity for a measure to produce robust scores considering the uncertainty associated to expected scores, or disturbances of the semantic proxies on which the measure relies (modification of the ontologies, corpus modifications). As an example, we proposed an approach for studying the robustness of a semantic measure in (Janaqi et al., 2014). • The discriminative power of the measure, i.e., the distribution of the scores produced by a measure. Provide tools for the study of semantic measures The communities studying and using semantic measures require software solutions, benchmarks, and theoretical tools to compute, compare and analyse semantic measures. Develop datasets There are a host of benchmarks for evaluating semantic similarity and relatedness (Rubenstein and Goodenough, 1965; Miller and Charles, 1991; Finkelstein et al., 2002; Pedersen et al., 2007; Pakhomov et al., 2010; Halawi et al., 2012; Ziegler et al., 2012) – several references and additional information are provided in Chapter 4. Most of them aim at evaluating the accuracy of semantic measures according to human appreciation of similarity/relatedness. For the most part, they are composed of a reduced number of entries, e.g., pairs of words/concepts, and have been computed using a reduced pool of subjects. Initiatives for the development of benchmarks must be encouraged in order to obtain larger benchmarks in various domains of study. Word-to-word benchmarks must be conceptualised (as much as possible)1 in order for them to be used to evaluate knowledge-based semantic measures. It is also important to propose benchmarks which are not based on human appreciation of similarity, i.e., benchmarks relying on an indirect evaluation strategy – evaluations based on the analysis of the performance of processes which rely on semantic measures. Nevertheless, we underline that important efforts have recently been made to propose valuable evaluation campaigns related to semantic measures. Thus, at SemEval conferences2 , SEM tasks have been organised in 2012, 2013, 2014 and 2015 in order to compare systems in several task related to semantic similarity, e.g. text similarity, cross-level semantic similarity3 (Agirre et al., 2012). Develop generic open-source software An overview of the main software solutions dedicated to semantic measures is provided in Appendix D. They are of major importance to: (i) ease the use of the theoretical contributions related to semantic measures, (ii) support large scale comparisons of measures and therefore (iii) better understand the measures and (iv) develop new proposals. Software solutions dedicated to distributional measures are generally developed without being restricted to a specific corpus of texts. They can therefore be used in a large diversity of contexts of use, as long as the semantic proxy considered corresponds to a corpus of texts, e.g. DKPro (Bär et al., 2013), Semilar (Rus et al., 2013), Disco (Kolb, 2008) among others (Harispe et al., 2013b). Conversely, software solutions dedicated to knowledge-based semantic measures are generally developed for a specific domain, e.g., WordNet (Pedersen et al., 2004), UMLS (McInnes et al., 2009) – you can also refer to the large number of solutions developed for the Gene Ontology alone (Harispe et al., 2013b). Such a diversity of software is limiting for designers of semantic measures since implementations made for 1 E.g. using DBpedia URIs. 2 http://en.wikipedia.org/wiki/SemEval 3 When language units of different sizes are compared. 118 CHAPTER 5. CONCLUSION AND RESEARCH DIRECTIONS a specific ontology cannot be reused in applications relying on others ontologies. In addition, it hampers the reproducibility of results since some of our experiments have shown that specific implementations tend to produce different results4 . In this context, we encourage the development of generic open-source software solutions which are not restricted to specific ontologies. This is challenging since the formalism used to express ontologies is not always the same and specificities of particular ontologies sometimes deserve to be taken into account in order to develop semantic measures. However, there are several cases in which generic software can be developed. As an example, numerous knowledge-based semantic measures rely on data structures corresponding to poset or more generally semantic graphs. Other measures are designed to take advantage of ontologies expressed in standardised languages such as RDF(S), OWL. Generic software solutions can be developed to encompass these cases. Reaching such a goal could open interesting perspectives. Indeed, based on such generic and robust software supported by several communities, domain specific tools and various programming language interfaces can subsequently be developed to support specific use cases and ontologies. In this context, we initiated the Semantic Measures Library project which aims to develop open source software solutions dedicated to semantic measures, e.g. the Semantic Measures Library (SML) and Toolkit (Harispe et al., 2014b). These software solutions can be used for large-scale computation and analysis of semantic similarities, proximities or distances between terms or concepts defined in ontologies, e.g., structured vocabularies, taxonomies, RDF graphs. The comparison of instances (e.g., documents, patient records, genes) annotated by concepts is also supported. An important aspect of these software solutions is that they are generic and are therefore not tailored to a specific application context. They can thus be used with various controlled vocabularies and knowledge representation languages (e.g. OBO, RDF, OWL). The project targets both designers and practitioners of semantic measures providing a Java source code library, as well as a command-line toolkit which can be used on personal computers or computer clusters. More information about this project can be found in the Appendix D and at http://www.semantic-measures-library.org. The diversity of software solutions is also beneficial as it generally stimulates the development of robust solutions. Therefore, another interesting initiative, complementary to the development of generic software solutions dedicated to semantic measures, could be to provide generic and domain specific tests to facilitate both the development and the evaluation of software solutions. Such tests could for instance inventory expected scores of semantic measures for a reduced example of a corpus/ontology. This specific aspect is important in order to standardise software solutions dedicated to semantic measures and to ensure the users of specific solutions that the score produced by measure implementations are in accordance with the original definitions of the measures. As discussed in (Harispe et al., 2013b) and other contributions, the evaluation of semantic measures is mainly governed by empirical studies used to assess their accuracy according to expected scores/behaviours of the measures. Therefore, the lack of open-source software solutions implementing a large diversity of measures hampers their study. It explains, for instance, that evaluations of measures available in the literature only involve the comparison of a subset of measures which is not representative of the diversity of semantic measures available today. Initiatives aiming at developing robust open-source software solutions which give access to a large catalogue of measures must therefore be encouraged. It is worth noting the importance of these solutions being open-source. Our communities also lack open-source software dedicated to the evaluation of semantic measures. Indeed, despite some initiatives such as DKPro Similar and CESSM (Collaborative Evaluation of Semantic Similarity Measures) - please refer to Appendix D -, evaluations are not made through a common framework as it is done in most communities, e.g. information retrieval (Voorhees and Harman, 2005; NIST, 2012), ontology alignment (Grau et al., 2013; Euzenat and Shvaiko, 2013). Large efforts have therefore to be made to ease the systematic use of the evaluation protocols presented in Chapter 4. This is mandatory to finely compare and evaluate semantic measures in a large scale fashion. Complementary to evaluation campaign such as SemEval, the development of such tools must ensure fair comparison of results, as well as experiment reproducibility - one of the aim of three recent tools: DKPro Similarity, Semilar and Semantic Measures Library. Develop theoretical tools It is currently difficult to study the overwhelming amount of proposed semantic measures, e.g., deriving the interesting properties of measures requires the analysis of each measure independently, which is 4 You can refer to the evaluation proposed at https://github.com/sharispe/sm-tools-evaluation. 119 limiting and hampers both theoretical and empirical analyses of measures. However, several initiatives have proposed theoretical tools to ease the characterisation of measures, for instance by means of measure unification (Cross et al., 2013; Cross, 2006; Cross and Yu, 2010; Pirró and Euzenat, 2010a; Sánchez and Batet, 2011; Mazandu and Mulder, 2013; Cross et al., 2013; Harispe et al., 2013c), and by means of semantic model unification in distributional semantics, e.g. (Baroni and Lenci, 2010). As an example, in (Harispe et al., 2013c), we show how several knowledge-based measures can be unified through a limited number of abstract core elements – this highlights that several measure expressions which have been proposed independently in the literature are only particular expressions of more general measures. Therefore, based on this theoretical characterisation of measures, we further illustrate how thousands of specific semantic measure expressions can be analysed in detail. In particular, we demonstrate how such an approach, based on a theoretical framework and implemented using SML open-source library, can be used to analyse the core elements of semantic measures which best impact measure accuracy in a specific context of use. More efforts must be done to use existing theoretical tools and to propose new ones and to analyse semantic measures. Indeed, these contributions open interesting perspectives on studying groups of measures and enable to obtain more thoughtful results on semantic measures. They are also essential to better understand limitations of existing measures and the benefits of new proposals. Finally, they are central to distinguish the main components on which measures rely, and to improve our understanding of semantic measures based on detailed characterisation of family of measures. Standardise ontology handling Several knowledge-based semantic measures are based on the transformation of an ontology into a semantic graph. However, this process of transformation is currently overly subject to interpretations and deserves to be carefully discussed and formalised. Indeed, we stress that numerous measures consider ontologies as semantic graphs despite the fact that the formalism on which some ontologies rely cannot be mapped to semantic graphs without reductions – this is the case for some expressive logic-based ontologies (e.g. numerous ontologies which are expressed into OWL). The impact of such a reduction of ontologies is of major importance since it can highly affect semantic measure results5 . Therefore, the treatment performed to map an ontology into a semantic graph is generally not documented, which explains some of the difficulties encountered to reproduce the results of some experiments6 . In this context, we think that ontology handling must be carefully discussed and standardized if possible. This is important to ensure that theoretical contributions such as measure definitions can indeed be compared without the comparison being dependent on the implementation of the measure. Compositionality for comparing large units of language One of the most important challenges offered to semantic measure designer is to integrate and to adapt existing approaches in order to compare large units of language such as sentences, paragraphs or documents. To this end, important research efforts are made and are required to study semantic compositionality w.r.t semantic similarity: (i) how to evaluate the semantics of larger units of language than words or concepts, (ii) how to capture this semantics into semantic models and (iii) how to design measures adapted to these models. As we saw in Chapter 2 and more particularly in C, several attempts have been proposed to adapt distributional models and new original approaches are designed (Kamp et al., 2014; Baroni et al., 2014) – challenges related to this field of study aim to take advantage of more refined language analysis to improve existing models, e.g. by considering linguistic expressions, e.g., anaphora, negation or named entity recognition to cite a few. Corpus-based semantic measures and language specificities It is important to analyse semantic measures in order to ensure that accurate models of semantic similarity and semantic relatedness are available to process resources which are not expressed in English. Among others, open problems are related to: (i) the evaluation of the use of exiting models in different languages, (ii) the definition of measures which are accurate for multiple languages and (iii) the definition and study of language-specific processes which can be used to improve measure accuracy. 5 Consider, for instance, a taxonomy in which redundant relationships have been defined – redundancies highly impact shortest path computation. Should they be considered? 6 Refer to the evaluation proposed at: https://github.com/sharispe/sm-tools-evaluation 120 CHAPTER 5. CONCLUSION AND RESEARCH DIRECTIONS Promote interdisciplinarity From cognitive sciences to biomedical informatics, the study of semantic measures involves numerous communities. Efforts have to be made to promote interdisciplinary studies and to federate the contributions made in the various fields. We briefly provide a non-exhaustive list of the main communities involved in semantic measure study and the communities/fields of study which must be relevant to solicit to further analyse semantic measures. The list is alphabetically ordered and may not be exhaustive: • Biomedical Informatics and Bioinformatics are very active in the definition and study of semantic measures; these communities are also active users of semantic measures. • Cognitive Sciences propose cognitive models of similarity and mental representations which can be used to (i) improve the design of semantic measures and (ii) better understand human expectations w.r.t similarity/relatedness. This community can also use empirical evaluation studies of semantic measures to discuss the cognitive models it proposes. • Complexity Theory is an important field of study which is essential to analyse complexity of semantic measures. • Geoinformatics defines and studies numerous semantic measures. Members of this community are also active users of semantic measures. • Graph Theory proposed several major contributions relative to graph processing. Such theoretical works are essential for the optimisation of measures relying on network-based ontologies. This community will probably play an important role on knowledge-based semantic measures in the near future, since large semantic graphs composed of billions of relationships are now available – processing such graphs requires the development of optimised techniques. • Information Retrieval defines and studies semantic measures taking advantage of corpus of texts or ontologies. They also actively contribute to the development of topic models which are central for the design of corpus-based distributional measures. • Information Theory plays an important role in better understanding the notion of information and in defining metrics which can be used to capture the amount of information which is conveyed, shared and distinct between compared elements, e.g., notion of information content. • Knowledge Engineering studies and defines ontologies which will further be used in applications involving semantic measure calculus. It could, for instance, play an important role in characterising the assumptions made by semantic measures. • Linguistics and Natural Language Processing are actively involved in the definition of distributional measures. They propose models to characterise corpus-based semantic proxies and to define measures for the comparison of units of language. • Logic defines formal methods to express and take advantage of knowledge. This community can play an important role in characterising the complexity of knowledge-based semantic measures, for instance. • Machine Learning plays an important role in the definition of techniques and parameterised functions which can be used for the definition and tuning of semantic measures. • Measure Theory defines a mathematical framework to study and define the notion of measure. It is essential for deriving properties of measures, better characterising semantic measures and taking advantage of theoretical contributions proposed by this community. • Metrology studies both theoretical and practical aspects of measurements. 121 • Optimisation area may lead to important contributions in order to optimise measures, to study their complexity and to improve their tuning. • Philosophy also plays an important role in the definition of essential concepts on which semantic measures rely, e.g., definition of the notions of Meaning, Context. • Semantic Web and Linked Data define standards (e.g., languages, protocols) and processes to take advantage of ontologies. The problem of ontology alignment and instance matching are actively involved in the definition of (semantic) measures based on ontologies. • Statistics and Data Mining propose several data analysis techniques which can be used to better characterise and understand semantic measures. Study the algorithmic complexity of semantic measures Most contributions have focused on the definition of semantic measures. However, their algorithmic complexity is near inexistent despite the fact that this aspect is essential for practical applications to be efficient and tractable. Therefore, to date, no comparative studies can be made to discuss the benefits of using computationally expensive measures. However, these aspects are essential for comparing semantic measures. Indeed, in most application contexts, users will prefer to reduce measure accuracy for a significant reduction of the computational time and resources required to use a measure. To this end, designers of semantic measures must as much as possible provide the algorithmic complexity of their proposals. In addition, as the theoretical complexity and the practical efficiency of an implementation may differ, developers of software tools must provide metrics to discuss and compare the performance of measure implementations. Support context-specific selection of semantic measures Both theoretical and software tools must be proposed to orient end-users of semantic measures in the selection of measures according to the needs defined by their application contexts. Indeed, despite the fact that most people only (blindly) consider benchmark results in order to select a measure, efforts have to be made in order to orient end-users in the selection of the best suited approaches according to their usage context – understanding the implications (if any) of using one approach compared to another. To this end, the numerous properties of the measures presented in this book can be used to guide the selection of semantic measures. However, numerous large-scale comparative studies have to be performed in order to better understand the benefits of selecting a specific semantic measure in a particular context of use. 122 CHAPTER 5. CONCLUSION AND RESEARCH DIRECTIONS Appendix A Examples of syntagmatic contexts To illustrate examples of syntagmatic context we will consider the raw text extracted from the Wikipedia article which refers to the topic Tree1 – sentences are numbered: ”(1) In botany, a tree is a perennial plant with an elongated stem, or trunk, supporting branches and leaves in most species. (2) Trees play a significant role in reducing erosion and moderating the climate. (3) They remove carbon dioxide from the atmosphere and store large quantities of carbon in their tissues. (4) Trees and forests provide a habitat for many species of animals and plants.” For convenience, in this example only nouns are considered; we obtain the following surface representation of the text: (1) botany tree plant stem trunk branch leaf species. (2) tree role erosion climate. (3) carbon dioxide atmosphere quantity carbon tissue. (4) tree forest habitat species animal plant. We will now present three examples of syntagmatic context definitions and examples of processing which can be done to represent words w.r.t their syntagmatic contexts. To reduce the size of the matrices which are used to characterise the words, not all the nouns which compose the surface representation presented above will be represented in matrices. To each context definition we present: • The corresponding word-context matrix which characterises the words w.r.t the context definition which has been defined. • A Figure showing the similarity of the vector representation of each word according to a two dimensional projection – the aim is to intuitively appreciate the impact that the notion of context can have on the definition of words representation and therefore on the estimation of word similarity. Technically speaking the figure is generated using a MultiDimensional Scaling (MDS) algorithms (Borg and Groenen, 2005) on a similarity matrix between the word vector representations2 . The results will not be discussed in detail but we invite the reader to compare the results which have been obtained using those reduced examples. Three examples are presented: 1. The context is defined as a sentence, sj refers to Sentence j. The semantic model is a word-sentence matrix and a word is therefore represented by a vector in which each dimension refers to a sentence – therefore, if the word wi composes the sentence sj the cell (wi ,sj ) will be set to 1. 2. The context is defined as a sentence – the semantic model is a word-word matrix which highlights the number of time two words co-occured in sentences. The co-occurrences are computed counting all pairs of words which can be made from each sentence. Note that this matrix can be computed from the matrix which have been obtained in Example 1. 3. The semantic model is a word-word matrix. The context is defined as a five word window, i.e. two words to the left and the right of the focal word. For instance, considering Sentence 1, the 1 http://en.wikipedia.org/wiki/Tree 2 The (accessed 26/06/14) similarity between the vectors is computed using the cosine similarity – presented in Section 2.3.2, Equation 2.4. 123 124 APPENDIX A. EXAMPLES OF SYNTAGMATIC CONTEXTS atmosphere botany branch climate forest habitat leaf plant species stem tree trunk w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 s1 0 1 1 0 0 0 1 1 1 1 1 1 s2 0 0 0 1 0 0 0 0 0 0 1 0 s3 1 0 0 0 0 0 0 0 0 0 0 0 s4 0 0 0 0 1 1 0 1 1 0 1 0 Figure A.1: MDS of a similarity matrix computed from the vector representation of words extracted from a word-sentence matrix. window associated to the focal word stem would be: botany tree plant stem trunk branches leaves species. The sliding step of the window is defined as one word. Finally for each iteration, the current window is processed and the co-occurrences associated to the focal word are updated, i.e. by counting the pairs of words which can be built with the focal word and the words which compose the window. 125 atmosphere botany branch climate forest habitat leaf plant species stem tree trunk w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w1 1 0 0 0 0 0 0 0 0 0 0 0 w2 0 1 1 0 0 0 1 1 1 1 1 1 w3 0 1 1 0 0 0 1 1 1 1 1 1 w4 0 0 0 1 0 0 0 0 0 0 1 0 w5 0 0 0 0 1 1 0 1 1 0 1 0 w6 0 0 0 0 1 1 0 1 1 0 1 0 w7 0 1 1 0 0 0 1 1 1 1 1 1 w8 0 1 1 0 1 1 1 2 2 1 2 1 w9 0 1 1 0 1 1 1 2 2 1 2 1 w10 0 1 1 0 0 0 1 1 1 1 1 1 w11 0 1 1 1 1 1 1 2 2 1 3 1 w12 0 1 1 0 0 0 1 1 1 1 1 1 Figure A.2: MDS of a similarity matrix computed from the vector representation of words extracted from a word-word matrix. atmosphere botany branch climate forest habitat leaf plant species stem tree trunk w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w1 1 0 0 0 0 0 0 0 0 0 0 0 w2 0 1 0 0 0 0 0 2 0 0 2 0 w3 0 0 1 0 0 0 2 0 2 2 0 2 w4 0 0 0 1 0 0 0 0 0 0 0 0 w5 0 0 0 0 1 2 0 0 2 0 2 0 w6 0 0 0 0 2 1 0 0 2 0 2 0 w7 0 0 2 0 0 0 1 0 2 0 2 2 w8 0 2 0 0 0 0 0 2 2 2 2 2 w9 0 0 2 0 2 2 2 2 2 0 2 0 w10 0 0 2 0 0 0 0 2 0 1 2 2 w11 0 2 0 0 2 2 2 2 2 2 3 0 w12 0 0 2 0 0 0 2 2 0 2 0 1 126 APPENDIX A. EXAMPLES OF SYNTAGMATIC CONTEXTS Figure A.3: MDS of a similarity matrix computed from the vector representation of the words extracted from a word-word matrix which has been computed using a sliding window. Appendix B A brief introduction to Singular Value Decomposition Singular Value Decomposition (SVD) is one of the fundamental algorithms of linear algebra. It is largely used to factorize matrices in many field related to data analysis. In Computational Linguistics, SVD has been made popular through its use in distributional models that aim to derive (word) meaning representations through the analysis of (word) co-occurrence matrices, e.g. Latent Semantic Analysis (LSA) – refer to Section 2.3 for an introduction to these models. The main motivation of SVD is to factorize matrices. This is interesting since several distributional models rely on highly dimensional but very sparse spaces. Therefore, their sizes tend to be very large which can be limiting for their processing in practice. SVD is therefore used as a way to reduce model sizes. In addition, since the process of factorization identifies and orders the dimensions along which data points exhibit the most variation, the reduction has the interesting property to reduce noise as well as sparsity. This contributes to improve the quality of the vector representations by focusing on informative dimensions. To this end, SVD consider that the optimal reduction, is the lower dimensional subspace onto which the original data have to be projected while preserving maximal data variability. This is done by grouping dimensions with highly correlated values – generally 300 dimensions are considered to build vector representation of words. It is however important to stress that the semantics of newly created dimensions can only be explained as a linear combination of the original dimensions this why, when applied to distributional models, SVD are often considered as a method able to reveal latent concepts and high-order co-occurrences. Figure B.1 illustrates the process which is performed by SVD. Nevertheless, one of the limits of this technique is that, as for any projection/factorization method, the reduction will necessarily imply some loss of information. Indeed, two points (e.g. words) that were originally differentiated into an highly dimensional space can both be projected into the same coordinates in the lower dimensional subspace that has been selected, i.e. they can be both reduced to the same vector representation. Another limit of SVD is their high algorithmic complexity. It can be limiting for processing large models - it must also be computed each time the model is updated. Technical aspects of SVD are largely covered in the literature. We recommend referring to the seminal book of (Golub and Van Loan, 2012). The articles of (Deerwester et al., 1990; Landauer et al., 1998; Turney and Pantel, 2010) are also very good introductions to SVD applied to distributional models. 127 128 APPENDIX B. A BRIEF INTRODUCTION TO SINGULAR VALUE DECOMPOSITION Figure B.1: Illustration of the process of singular value decomposition on a word-word matrix. The figure shows how the matrix space is reduced by detecting correlated dimensions, finding subspace directions with high variability of values, and factorizing this dimensions through linear composition. Appendix C A brief overview of other models for representing units of language The definition of models from which the meaning of units of language can be derived is a vibrant and prolific topic in the literature since several decades. This problematic is indeed central for Computational Linguistics and plays an important role for the design of corpus-based semantic measures. As we saw, most corpus-based measures that can be used for comparing words only differ regarding the approach they adopt to represent word meaning, generally through vector-based representations. The way those vectors are next compared is most often unchanged, e.g. using the well-known cosine similarity measure. The large literature related to the definition and combination of models that can be used to manipulate the semantics of complex units of language is therefore central to deeply understand corpus-based semantic measures. Nevertheless, as the reader will understand, this book cannot provide an in-depth presentation of all the models that have been proposed so far. An introduction to several models that rely on the distributional hypothesis has already been proposed in Chapter 2, e.g., VSM, LDA, ESA. Understanding more sophisticated models most often requires technical knowledge about specific machine learning techniques (e.g. neural networks), statistics and linear algebra; this makes more complex their introduction to a large audience. In addition, these sophisticated models are most often not proposed in the aim of assessing semantic similarity/relatedness of units of language, or to generate explicit representations of their meaning. They rather envision a large goal, to model language. These models, denoted language models, can however generally be used to derive useful representations of units of language – if they do not explicitly integrate such representations in their modeling. Here, we propose a brief introduction to several popular language models. Our main goals are to (i) underline the intuitions that motivate their definitions and (ii) to stress how they can be used in the aim of defining semantic measures – most of the time to compare words. We will next briefly discuss some of the models that have been proposed to capture the semantics of larger units of language. Technical details of the contributions that we will present can be found on provided references. Language models The distributional models we have seen so far can be used to derive word meaning representations based on the analysis of statistics on their usage – they rely on direct or indirect implementations of the distributional hypothesis (cf. Chapter 2). As from now, you can retain that both distributional and language models proposed in the literature, without exception, only differ on the way they capture and take advantage of this information. The aim of distributional models was generally to build word representations in a real space of n dimensions, by representing words through real-value vectors. The language models we will now introduce propose to model language for answering specific tasks in Computational Linguistics or related fields, e.g. machine translation, speech recognition or handwriting recognition to mention a few. These approaches aim to model languages in order to enable predictions such as (i) what are the words that are more likely to appear after a given sequence of continuous words, or (ii) what is the more probable context (e.g. sequence of words) considering a specific word. Designing models that are efficient in answering those questions can for instance be used for question answering, spellchecking or disambiguation. 129 130 APPENDIX C. OTHER MODELS FOR REPRESENTING UNITS OF LANGUAGE N-gram models A simple and popular language model that has been proposed to predict the next word according to given context is the n-gram model (Manning and Schütze, 1999) – since several variations have been proposed we can say that n-gram is a generic approach, a class of models. Depending on the design of the model, a n-gram can be a sequence of n contiguous words, syllables, letters, etc. – here we only consider ngrams of words; n is generally set between 1 and 5 in this case. N-gram models rely on the analysis of the statistical properties of n-grams in texts. These statistical properties are derived by scanning large corpora composed of billions of words using a sliding window of size n with a specific step.1 Therefore, using those statistics about word sequence observations, it is possible to predict the word wn based on the context of its n − 1 preceding words (w1 , . . . , wn−1 ). More precisely, we can compute the probability that a specific word w will occur after a given sequence S of n − 1 words; this is defined by p(w|S) : p(w|S) = o(S, w) o(S) (C.1) With o(S) the number of time the sequence S has been observed and o(S, w) the number of time S was directly followed by the word w. Using basics of Information Theory, n-gram models have the ability to predict sequential data by estimating the probability p(wn |w1 , . . . , wn−1 ). As any Markov model, these models assume the independence hypothesis, i.e. that wn only depends on w1, . . . , wn−1 .2 A n-gram model can therefore be used to compute the conditional probability distribution of words knowing a word sequence of size n − 1. This can be used to derive the likelihood of a word knowing a specific n − 1 sequence of words. More importantly for our concern, the conditional probabilities of a word for all the sequences that have been observed can be used to obtain a vector representation of a word. Once again, this representation encompasses information about the usage of the word, and is therefore assumed to give access to some of its meaning. Note that this representation is built considering a specific type of syntagmatic context (refer to Section 2.2). Nevertheless, this approach can be difficult to implement in practice because of the large number of sequences that are observed; this number corresponds to the number of dimensions of the space into which words will be represented. Indeed, due to the high variability of n-grams in language, the n-gram model suffers the curse of dimensionality. Otherwise stated, the number of parameters of n-gram models (i.e. number of n − 1 sequences that have been observed) grows exponentially with n. Nevertheless, most of the dimensions will be set to zero and only very sparse vectors will have to be compared. In (Joubarne and Inkpen, 2011) the authors adopt two other approaches that study the distribution of words among n-grams. The first approach estimates the relatedness of two words by considering their PMI (Point-wise Mutual Information), i.e. the probability that the two words occur in the same n-gram divided by the probabilities they occur. The second approach relies on the Second Order Co-occurrence PMI (SOC-PMI) that have been defined in (Islam and Inkpen, 2006). N-gram statistics have also been used in the design of semantic measures dedicated to the comparison of sentences (Bär et al., 2012). N-gram models provide good results when trained with large corpus. However, one of the main drawbacks of this probabilistic model is that, per definition, it poorly performs with n-grams that are not observed in the learning corpus. As an example, consider the following sequence of words: “he was driven his bike’. If the model is built using a 4-gram strategy, the likelihood associated to the word bike considering the context “he was driving” will be derived from the amount of time the association context+“bike” has been encountered in the corpus. Therefore, if the association never occurs, the likelihood of the word bike knowing aforementioned context will de facto be set to zero. Since the model suffers the curse of dimensionality, this problem increases the larger n is set. This stresses the second limit of these models: their dependency to very large datasets. Several strategies have therefore been studied to overstep these limits. As an example, several forms of smoothing techniques have been studied to avoid and prevent problems induced by unseen n-grams. These techniques are essential to ensure good performance. Several other adaptations have been proposed to overcome the data sparsity issue, i.e. the fact that input data will only give access to a reduce set of the language diversity; skip-gram is one of these proposals (Guthrie et al., 2006). This model generalises n-gram by allowing words to be skipped in order to generate n-gram that would not have been seen while they could improve language modeling. As an example, considering the phrase “France is a beautiful country...”, a 1-skip-3gram will generate the following 3-grams : “France is a”, “France a beautiful ”, “is a beautiful ”, “is beautiful country”, “a 1 Google provides interesting results on n-gram statistics over time at: https://books.google.com/ngrams fact that this assumption is rough for language modeling is not questioned. This restriction is however required to ensure tractable algorithmic complexity. 2 The 131 beautiful country”, “a country”. Another interesting variation of n-gram models are cache models (Kuhn and De Mori, 1990). They rely on the simple idea that words recently observed are more likely to appear again in the short term. Consider for instance the case of rare words that will often occur in a specific text, e.g. the word Paris will often occur in a text talking about the French capital. Therefore, cache models propose to keep track of recent contexts when estimating the probability distributions of words. Others variants are class-based models (Brown et al., 1992); they propose to replace words by classes of words sharing specific features. By reducing the number of n-grams that are possible, they reduce the number of parameters of the model (i.e. fighting the curse of dimensionality). This approach can also be used to derive probability distributions for unseen contexts. Contribution and results related to n-gram models are numerous; we have here introduced basics of this popular class of models. We have also discussed how they can be used to compute the relatedness of words. Despite their limits, n-gram models (including variants) are still very popular and competitive language models. They are used in numerous practical applications. This is especially true considering that improvements that are achieved using more complex models are often made at the cost of a significant increase of computational complexity – an increase that is often unacceptable considering the constraints of real world applications. Even if adaptations have been proposed to solve drawbacks of n-gram models, the dependency of this approach to very large corpora is still considered as incompatible with several contexts – remind that we are talking about billions of words, constituting such a dataset can be problematic in specific domains. This has encouraged the study of models that are less greedy and that can be used considering significantly smaller input datasets. We can therefore say that by being very costly in terms of input datasets but very cheap in terms of computational complexity, n-gram models implement a kind of nobrain or brute force approach in modeling language. Alternative language models, by being cheap in terms of input dataset requirement but costly in terms of computational complexity, propose to adopt an opposite strategy using more refined learning approaches. Some of these models are now briefly introduced. Some statistical learning models have been studied to overcome the intrinsic limitations of n-gram models. During the learning phase, these models directly learn and process representations of units of language – once again, for convenience, we will here focus on word representation. Based on word usage analysis, these approaches build (implicit) word representations by optimizing the performance of a statistical learning algorithm with respect to a specific goal. As an example, such a model can be a neural network that, similarly to n-gram, will be able to predict the most probable word considering a given context. Such language models implicitly or explicitly rely on word modeling. A representation of word, often in the form of a vector, can generally be derived from them. Therefore, compared to classical distributional models that will simply build word representations by considering a deterministic approach, learning methods will implicitly learn word representations using heuristics that will optimize models – that internally encompass or depend on these word representations. This is why these methods are generally said to learn word representations, or more explicitly learn models from which word representations can be extracted. It is important to stress that, as we said, the primary source of information available to all methods for learning word representations is still word usage in a corpus – they therefore also extensively rely on the distributional hypothesis. Several type of learning approaches can be used to derive language models. Among the most popular, we will discuss the language models that are based on neural networks. Other types of models will next be cited. Neural network models The main rationale of Neural Network Language based Models (NNLM) is to take advantage of similarities between contexts for assessing the probability distribution of words considering a given context. Indeed, as we saw, when assessing the likelihood of words for a specific context, simplest n-gram models will only consider observations in which this exact context has been observed.3 However, even if the sequence “he was driven his bike” has never been observed, it is intuitive to say that the context “he was driven his” is more likely to generate the words car, bike or truck than the words mountain or house. This can once again simply be explained by the distributional hypothesis: words that frequently occur with the word drive are more likely to be referring to things that can be driven (i.e. vehicle). It could therefore be interesting to provide a way to represent contexts in such a way that, by learning the probability distribution associated to a context, knowledge for similar contexts will be generalized – 3 We have seen that smoothing have next been proposed to correct this limit but put this aside for now. 132 APPENDIX C. OTHER MODELS FOR REPRESENTING UNITS OF LANGUAGE i.e. to design an approach that will be robust to slight variations of contexts. This is the main aim of NNLMs. Similar contexts are, in some sense, processed similarly in order to generalize knowledge that can be extracted from occurrences. As an example, the observation “he was driven his bike” will not only contributes to improve the likelihood to see bike after the context “he was driven his”. It will also improve the likelihood to see the words car, truck, etc. after this specific context. Technically, the generalization is made possible by projecting observations onto a low-dimensional space, and by building a model that will generate word conditional distribution probabilities from this projection. Therefore, two observations that are similar will (hopefully) be projected the same way. Thus, similar sets of parameters will be learned for similar observations. Parameters of the model are in some sense shared among similar observations. This is an important point: NNLMs share parameters among similar observations in order to overcome the exponential increase of parameters when considering large contexts. A variety of NNLM architectures have been proposed. For language models that aim to compute conditional probabilities of words from a vocabulary V knowing a specific context (i.e. sequence of continuous words), several NNLMs adopt the following setting. They consider that input words are represented by vectors – such representations can simply be built by considering that each word is associated to a unique identifier between 0 and |V | − 1, and that its corresponding vector is a vector of size |V | filled with 0 values, expect for the dimension associated to its identifier which is set to 1. These representations are used to derive the representation of a n-word context (sequence observation) – generally setting n between 5 and 10. This is done by building a n × |V | matrix that contains the vectors of the words of the context. Finally, considering numerous contexts and expected next word probability distribution provided by the input dataset, the NNLM learn optimal parameters of the model and optimal word representations. The aim is to set these variables such as the model will generate word probability distributions best fitting expectations. This setting has first been defined in (Bengio et al., 2003). In this case, word representations are simply learned by the model and can therefore be used in a straightforward manner to compare words using measures designed for comparing vectors. Contributions on NNLMs have led to many results. Numerous contributions have for instance focused on designing recurrent NNLMs, e.g. to avoid the fact that in (Bengio et al., 2003) the context size had to be defined manually (Mikolov et al., 2013). Among them we invite the reader to refer to the numerous contributions of Mikolov. In conclusion, NNLMs are generally considered to be complex models with regard to their computational requirements. Nevertheless, they have the interesting property of achieving efficient results with reduced input datasets. More generally we encourage the reader to refer to embedding-based methods that can be used to build elaborated representations of units of language from which semantic similarity and relatedness measures can be defined. In addition, other types of language models have been proposed and will not be introduced in this book. Among others we can cite: conditional restricted Boltzmann machine, (hierarchical) log-bilinear models, global log-bilinears (Pennington et al., 2014). A brief introduction of several models can be found in (Mikolov, 2012). Compositionality: representing complex units of language As we saw, a substantial literature is dedicated to the definition and analysis of models that aim to represent word meaning. An important area of research is also dedicated to the study of how larger units of language such as compound words, noun-adjective pairs or sentences can be represented. This challenge aim to define compositional approaches that represent meaning of units of language by combining different models representing meaning of their constituents. Compositional approaches assume that, since complex units of language are built by compositions (of simpler units) – sentences are sequences of words -, their meaning is also formed by composition. It is here considered that “the meaning of complex expression is a function of the meaning of its parts and of their syntactic mode of combination”.4 Central questions faced by compositionality are therefore (i) how to finely capture the semantics of short units of language through representations and (ii) how to combine them to derive meaning of their combination. A large number of contributions related to the former question have already been introduced, we now expose how they can be combined to derive compositional models; once again the following introduction is far to cover the diversity of the literature on this topic. Simple models of compositionality have for instance proposed to give access to the meaning of a sentence by aggregating vector representations of its words using linear models. As an example (Landauer 4 http://plato.stanford.edu/entries/compositionality – we strongly encourage the reader to refer to this resource for a complete and historical introduction to the notion of compositionality. 133 and Dumais, 1997) propose to represent a sentence by averaging the vector representations of its word. More generally, (Mitchell and Lapata, 2010) present a framework to combine word representations in order to represent the meaning of phrase or sentence into a vector space. This framework can be used to generate models by defining composition through the aggregation of representations by vector functions such as addition and multiplication. Another approach that has been tested by several authors proposes to model composition in terms of matrix multiplication. In (Baroni and Zamparelli, 2010) the authors define a compositional model for pairs of adjective-words by multiplying vector representations of words by matrix representations of adjectives. Several operations that can be performed on vector model to derive compositional models are discussed in (Widdows, 2008). An original approach that defines compositionality in terms of similarity composition is also exposed in (Turney, 2012). Simplest approaches based on linear models fail to model the complexity of the semantics of large units of languages. This is mainly because word ordering is not taken into account. More generally, any model that only relies on commutative operations such as addition or multiplication will not take into account syntax, order of language constituents, and negation. More complex models have therefore been proposed; some of them are limiting as they generate highly dimensional representations that depend on a large number of parameters. In (Socher et al., 2011), an interesting model based on a nonlinear function is studied to overcome limits of simple compositional models. In (Socher et al., 2012) the authors propose to model compositionality by considering learning models in which words of a sentence, represented by vectors, are structured through a parse tree; matrices are also used to model the effect of the sequential ordering of words on the global semantics of the sentence. Designing efficient models that are able to capture the meaning of large units of language is an important challenge faced by Computational linguistics. This is also central for the design of accurate semantic measures that will be able to compare complex units of language by finely analysing their semantics. Thanks to an increasing interest on compositional models, and to a better understanding of the perspectives they open, a large number of contributions have recently been made; they have lead to more efficient models but have also underlined the wideness of this complex field of study. We advise interested readers to consult (Kamp et al., 2014) and the website of the Composes project5 that is dedicated to this vibrant topic (Baroni et al., 2014) – the website references important documentations and publications, as well as software, models and datasets used for evaluation. 5 Compositional Operations in Semantic Space, European Research Council project (nr. 283554): http://clic.cimec. unitn.it/composes 134 APPENDIX C. OTHER MODELS FOR REPRESENTING UNITS OF LANGUAGE Appendix D Software tools and source code libraries This appendix provides an overview of existing software solutions and source code libraries dedicated to semantic measure computation and analysis. These contributions are important to both usage and evaluations of semantic measures. First, they provide implementations of existing proposals to end-users and therefore contribute to the large adoption of semantic measures - this is not a little thing considering that implementations are most often very technical. Second, by providing common platforms for measure evaluation, these development projects are also essential to support research contributions in the field. They enable to reproduce experiments and provide easy-way for researchers to test and evaluate new proposals. This aspect is particularly important since evaluation of semantic measures extensively relies on empirical analyses (c.f. Chapter 4). Throughout this book we have underlined that numerous groups of researchers are deeply involved in the study of semantic measures, e.g. Natural Language Processing, Artificial Intelligence, Semantic Web and Bioinformatics, to mention a few. Moreover, due to their popularity, numerous proposals exist for a wide range of applications - refer to the large collection of measures presented in chapters 2 and 3. Nevertheless, no extensive software tool today federates the various communities through a common development and application framework. Most of the contributions are supported by few developers and only exist thank to their will to develop, correct and support useful tools for the community. A few popular and robust solutions exist for computing corpus-based measures. These tools can most often be used on any (english) corpora. Specific distributional models build from popular corpora are also generally provided. However, for a long time, most software solutions dedicated to knowledge-based measures were developed for particular applications and ontologies, e.g. in the biomedical domain. The aim of this appendix is not to provide an extensive comparison of the tools that are presented. Ordering of tools is therefore made considering subjective criteria such as popularity of the tool in the community, functionalities provided, source code base, documentation available, support. We invite the reader to refer to the official websites for more information about these tools. The information presented hereafter has been obtained in January 2015, improvements could have been made and the developer base may have also change. In addition, the authors of this book are related to the Semantic Measures Library a project that will be presented hereafter. Nevertheless, even if we provide slightly more information about this project compared to the others, we will not provide detailed information about the project since our objective is to introduce the reader to the diversity of tools available to date. Since the large majority of projects focus on corpus-based or knowledge-based measures, but do not cover both types, we first present those dedicated to the former to next discuss those related to the latter. Finally, we discuss the tools that have been proposed to ease measure evaluation. Tools for corpus-based semantic measures Table D.1 presents several free source code libraries and software solutions that can be used to compute the semantic similarity/relatedness between pairs of words and/or sentences. Most of the measures implemented in these tools evaluate semantic relatedness analysing syntagmatic relationships. Note also that the documentation of the tools sometimes refers to the notion of semantic similarity without considering the definition adopted in this book – and therefore semantic similarity most often refer to 135 136 APPENDIX D. SOFTWARE TOOLS AND SOURCE CODE LIBRARIES Name Compare Types Language DKPro Similarity Words/Sentences LIB Java Words/Sentences LIB, GUI Java Words LIB, CLI Java Words LIB Python Words LIB Python Words/Wikipedia Topics LIB Java Sentences Sentences LIB LIB Java Python Words LIB Java (Bär et al., 2013) Semilar (Rus et al., 2013) Disco (Kolb, 2008) NLTK (Bird, 2006) GenSim (Rehurek and Sojka, 2010) WikiBrain (Sen et al., 2014) Mechaglot Takelab sts (Sarić et al., 2012) SemSim Table D.1: Examples of existing software solutions dedicated to corpus-based semantic measures. URLs are provided in the dedicated sections. LIB: source code library, CLI: Command Line Interface, GUI: Graphical User Interface. semantic relatedness. For each tool we provide: its name, associated reference (and starting date), the type of objects that can be compared and the type of the tool: LIB refers to source code library, CLI to command-line tool1 , and GUI to Graphical User Interface. The programming language used for the development is also specified. A brief description of each tool is also provided hereafter. DKPro Similarity is a framework dedicated to the comparison of pairs of words and pairs of texts (Bär et al., 2013). It provides numerous implementations of state-of-the-art semantic relatedness measures in Java - some knowledge-based measures are also available to compare WordNet synsets. This project is part of the DKPro Core2 project which develops a collection of software components dedicated to NLP. These components have the interesting properties to be based on the Apache UIMA framework. The last version of DKPro Similarity has been release in October 2013 (version 2.1.0), it is distributed under the open-source Apache Software Licence. The source code and extensive documentation are available from the dedicated website. Website: https://code.google.com/p/dkpro-similarity-asl Semilar proposes a software and development environment dedicated to corpus-based semantic measures (Rus et al., 2013). It provides both a Java library and a GUI-based interface. Semilar can be used to compare words and sentences. Numerous measures have been implemented, and several distributional models are made available. Semilar is still in alpha version (2014), consult the website for licence information. Website: http://www.semanticsimilarity.org Disco is an open-source Java library dedicated to the semantic similarity computation between words (Kolb, 2008, 2009). The tool is distributed under the Apache License, version 2.0. Several measures are implemented. Interestingly, numerous languages are also supported: Arabic, Czech, Dutch, English, French, German, Italian, Russian, and Spanish. Last version available to date is version 1.4 (released in 2013). Website: http://www.linguatools.de/disco/disco_en.html NLTK is a popular and elegant NLP platform developed in Python (Bird, 2006). It contains a module dedicated to WordNet which provides specific semantic measures for comparing two synsets (no extensive list of measures available). In addition, (Tomasik and Sutherland, 2008) present a NLTK module for large-scale computation of specific corpus-based measures. NLTK is distributed under the Apache 2.0 1 Most of tools provide a way to execute source code using command lines. CLI refers to interfaces that are used to guide the user by providing documentation, multiple parameter tuning, batch computation capabilities, etc. 2 https://code.google.com/p/dkpro-core-asl 137 license. Website: http://www.nltk.org GenSim is a Python platform dedicated to statistical semantics (Rehurek and Sojka, 2010). It is well documented and provides several efficient distributional models and measures implementations. Gensim is distributed under the LGPL Licence. Both open-source and business supports are provided. The last release has been developed in 2014. Website: https://radimrehurek.com/gensim WikiBrain is a well-documented Java project that proposes Wikipedia-based algorithms for semantic relatedness computation (Sen et al., 2014). It can be used to compare both sentences and Wikipedia pages (topics). According to the documentation, efforts have been made to ensure efficiency and shorten computational time. WikiBrain is distributed under the Apache 2.0 license. The project is today actively maintained. WikiBrain is also a nice project to consider for those interested in interacting with Wikipedia Website: http://shilad.github.io/wikibrain TakeLab Semantic Text Similarity System is a Python code that can be used to compare two sentences (Sarić et al., 2012). It is licensed under a derivative of a BSD-license that requires proper attribution (c.f. website). This source code corresponds to a submission proposed to the SemEval evaluation campaign (cf. to Chapter 4 for more information). Website: http://takelab.fer.hr/sts SemSim is a Java library that can be used to evaluate the semantic relatedness of words and to compute distributional models from texts. It can also be used to compute distributional models. The source code is distributed under licence LGPL v3. The last version has been released in 2013. Website: https://github.com/marekrei/semsim Mechaglot can be used to compare sentences. It is distributed under the Creative Commons AttributionShareAlike 4.0 International License. This project is still under development and to date only provides an alpha version for developers. Website: http://mechaglot.sourceforge.net Numerous web services and web interfaces can be used to compute semantic relatedness between words and texts. Since these links may change and/or the services may not be supported in the future, we orient the reader to the updated list of links provided at Wikipedia: http://en.wikipedia.org/ wiki/Semantic_similarity. Tools for knowledge-based semantic measures Most software solutions dedicated to knowledge-based semantic measures have been developed for a specific usage context and are dedicated to a specific ontology/ structured terminology, e.g., Wordnet (Pedersen et al., 2004), Unified Medical Language System (UMLS) (McInnes et al., 2009), the Gene Ontology (GO)3 , the Disease Ontology (DO) (Li et al., 2011), Medical Subject Headings (MeSH) (Pirró and Euzenat, 2010a). By supporting Web Ontology Language (OWL), Resource Description Framework (RDF) and Open Biomedical Ontologies (OBO) format, some tools have also been developed in a generic manner. They can be used with any ontology defined in these formats. Table D.2 summarises some characteristics of existing libraries/tools. We present the name of the tool, the ontologies and formats that are supported, the type of tools, command-line tool (CLI) and/or source code library (LIB). We also specify the programming language and if the measure can be used to compare pairs of concepts (P) and/or pairs of groups of concepts (G). In the following, for convenience, semantic similarity/relatedness refers to knowledge-based semantic similarity/relatedness. We also recall that DKPro Similarity and NLTK implement measures that can be used to compare two synsets. 3 Note that half a dozen libraries/tools are dedicated to the Gene Ontology: http://www.geneontology.org/GO.tools_ by_type.semantic_similarity.shtml 138 APPENDIX D. SOFTWARE TOOLS AND SOURCE CODE LIBRARIES Name ontology Types Measures Language SML OWL, RDF, OBO, etc. CLI, LIB P, G Java OBO and others CLI, LIB P, G Python OWL, RDF LIB P Java OWL, RDF LIB P, G Java OWL, RDF LIB P Java SEE DOC LIB P, G Java Wordnet,MeSH,GO CLI, LIB P, G Java WordNet CLI, LIB P, G Perl WordNet UMLS LIB LIB P P Java Perl OWL, RDF, OBO LIB P Java DO CLI, LIB P, G R DO CLI, LIB P, G R (Harispe et al., 2014a) FastSemSim (Guzzi et al., 2012) SimPack (Bernstein et al., 2005) SemMF (Oldakowski and Bizer, 2005) OntoSim (David and Euzenat, 2008) Ytex Semantic Similarity (Garla and Brandt, 2012) Similarity Library (Pirró and Euzenat, 2010a) WordNet-Similarity (Pedersen et al., 2004) WS4J UMLS-Similarity (McInnes et al., 2009) OWLSim (Washington et al., 2009) DOSim (Li et al., 2011) DOSE Table D.2: Some characteristics of a selection of libraries/software tools that can be used to compute knowledge-based semantic measures. Types: Command Line Interface (CLI), Library (LIB). Measures: pair of concepts (Pairwise – P), pair of groups of concepts (Groupwise – G). A brief description of each tool presented in Table D.2 is also provided: SML stands for Semantic Measures Library (Harispe et al., 2014a). This is a Java library dedicated to semantic measure computation, development and analysis. It is developed by Sébastien Harispe, one of the author of this book. SML implements numerous measures for comparing concepts and groups of concepts defined into ontologies. Numerous formats (OBO, RDF, OWL) and domain-specific ontologies are supported (e.g., WordNet, MesH, SNOMED-CT). Fine tuning is made available to control measure parameters and data pre-processing. In addition to the library, a command-line toolkit is also developed for non-developers. Both the library and the toolkit are optimized to handle large dataset and to ensure fast computation4 . They are distributed under a GPL compatible license. Last release: 2014. Website: http://www.semantic-measures-library.org FastSemSim is a Python library dedicated to semantic similarity computation (Guzzi et al., 2012). It can be used to compare pairs of concepts and pairs of groups of concepts. Any OBO ontology can be loaded. Other formats can also manually be loaded into specific data structures that can be considered as data sources by the library. FastSemSim is designed to provide efficient implementation of measures. It is distributed under the GPL Licence. Last version: 2014 Website: https://sites.google.com/site/fastsemsim/ SimPack is a Java library that can be used to compare pairs of concepts defined into ontologies (Bernstein et al., 2005). It implements a large variety of measures and can load RDF/OWL ontologies. SimPack is distributed under the LGPL license. SimPack has not been updated since 2008. Website: https://files.ifi.uzh.ch/ddis/oldweb/ddis/research/simpack/ SemMF is a Java library that can be used to compare objects defined into RDF graphs. It is distributed under LGPL licence(Oldakowski and Bizer, 2005). Website: http://semmf.ag-nbi.de/doc/index.html 4A comparison with other tools is provided at: https://github.com/sharispe/sm-tools-evaluation 139 OntoSim is an efficient Java library dedicated to the comparison of ontologies (David and Euzenat, 2008). Several measures provided in this library can also be used to compare objects defined into RDF graphs. Website: http://ontosim.gforge.inria.fr/ YTEX Semantic Similarity is a Java library that can be used to compare two concepts or two groups of concepts defined into an ontology (Garla and Brandt, 2012). The library can be used with UMLS, SNOMED-CT and MeSH. It is also possible to load other ontologies through SQL queries. Website: https://code.google.com/p/ytex/wiki/SemanticSim_V06 The Similarity Library is Java library that can be used to compare pairs of concepts defined into several ontologies (WordNet, MesH, GO) (Pirró and Euzenat, 2010a). The library is made available on request. Website: https://simlibrary.wordpress.com/ WordNet-Similarity is a Perl module dedicated to semantic similarity and relatedness measures between WordNet synsets (Pedersen et al., 2004). This package has been largely used in the literature. Last version: 2008. Website: http://wn-similarity.sourceforge.net/ WS4J is a Java library dedicated to the development of semantic measures for WordNet. It is distributed under the GPL licence. Last version: 2013 Website: http://code.google.com/p/ws4j/ UMLS-Similarity is a Perl module that can be used to compare concepts defined into UMLS (McInnes et al., 2009) Website: http://umls-similarity.sourceforge.net/ OWLSim is a Java Library for the comparison of pairs of concepts defined in OBO or OWL format (Washington et al., 2009). Last version: 2013. Website: http://code.google.com/p/owltools/wiki/OwlSim DOSim is an R package dedicated to semantic similarity computation for the Disease Ontology (Li et al., 2011). DOSim is distributed under the GPL licence. Last version: 2010 Website: http://210.46.85.150/platform/dosim/ DOSE is another R package dedicated to semantic similarity computation for the Disease Ontology. DOSE is distributed under the Artistic-2.0 licence. Website: http://www.bioconductor.org/packages/release/bioc/html/DOSE.html Tools for the analysis of semantic measures Tools and source code libraries implementing numerous measures have been presented in the previous section. They represent important contributions for those interested in comparing new proposals, and can be used to select measures adapted to a specific domain. We now provide specific information relative to four tools that provide interesting functionalities for measure evaluation. Recall that protocols and dataset evaluation have been introduced in Chapter 4. DKPro Similarity provides several functionalities that can ease the evaluation of semantic measures. It gives access to several evaluation datasets and experiments that are commonly used to compare corpusbased semantic measures, e.g. it contains several word pair similarity/relatedness datasets5 . DKPro similarity can also be used to reproduce SemEval-2012 best system6 – more information about this tool can be found in Section D. 5 https://code.google.com/p/dkpro-similarity-asl/wiki/WordPairSimilarity 6 https://code.google.com/p/dkpro-similarity-asl/wiki/SemEval2013 140 BIBLIOGRAPHY Figure D.1: Evaluation of measures that have been made using SML. From (Harispe et al., 2013c). SML provides numerous knowledge-based measures implementation that can be used through parametric functions. These implementations and additional code included into the library provide an easy way to compare semantic measure, e.g. regarding their accuracy. As an example, in Figure D.1, the surfaces represent the accuracy of large configuration of measures – each point in the surface corresponds to the accuracy of a specific measure configuration. Tsversky ratio and contrast models abstract functions were used; these measures can be expressed through parametric functions depending on two parameters alpha and beta – here represented by the abscissa and the ordinate in the figures. Therefore, each figure corresponds to a specific expression of other parameters of the measures that are fixed. The evaluation is made by comparing estimated similarity with human expected values. This experiment underlines the benefits of efficient tools dedicated to semantic measure computation and to analysis semantic measures – details are provided in (Harispe et al., 2013c). More information about SML are also given in Section D. SemEval is an evaluation campaign related to semantic analysis in which several tracks are related to semantic measures. We encourage the reader to consult the resources that are made available for these tasks. Tools and source codes are generally provided to ease measure evaluation. More information can be found on the wiki maintained by the IXA Group from the University of the Basque Country: http://ixa2.si.ehu.es/stswiki. CESSM is a platform that can be used to evaluate semantic measures over the Gene Ontology (Pesquita et al., 2009b). Several evaluation strategies are implemented. New measures can thus be compared to existing results. Datasets used in the evaluations can also be downloaded. The source code is not available to download but can be requested to the platform maintainers. Website: http://xldb.di.fc.ul.pt/tools/cessm Bibliography Achananuparp, P., Hu, X., and Shen, X. (2008). The evaluation of sentence similarity measures. Proceedings of the 10th International Conference on Data Warehousing and Knowledge Discovery, pages 305–316. Adedimeji, M. A. (2007). Semiotics: the science of signs. In Olu, Obafemi, Ajadi, G., and Alabi, V., editors, Critical Perspectives on English Language and Literature, pages 145–161. Department of English, University of Ilorin. Agirre, E., Alfonseca, E., Hall, K., Kravalova, J., Paca, M., and Soroa, A. (2009). A study on similarity and relatedness using distributional and WordNet-based approaches. In Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL 09), pages 19–27, Boulder, Colorado, USA. Association for Computational Linguistics, Stroudsburg, PA, USA. Agirre, E., Diab, M., Cer, D., and Gonzalez-Agirre, A. (2012). SemEval-2012 task 6: a pilot on semantic textual similarity. In Proceedings of the First Joint Conference on Lexical and Computational Semantics-Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation, pages 385–393, Montréal, Canada. Association for Computational Linguistics, Stroudsburg, PA, USA. Aimé, X. (2011). Gradients de prototypicalité, mesures de similarité et de proximité sémantique: une contribution à l’Ingénierie des Ontologies. Ph.d. thesis, Université de Nantes (France). Aitchison, J. (2012). Words in the mind: An introduction to the mental lexicon. John Wiley & Sons. Akoka, J., Liddle, S. W., Song, I.-Y., Bertolotto, M., and Comyn-Wattiau, I., editors (2005). Perspectives in Conceptual Modeling - ER 2005 Workshop AOIS, BP-UML, CoMoGIS, eCOMO, and QoIS Proceedings, volume 3770 of Lecture Notes in Computer Science. Springer-Verlag, Berlin-Heidelberg, Klagenfurt (Austria). Al-Mubaid, H. and Nguyen, H. A. (2006). A cluster-based approach for semantic similarity in the biomedical domain. In IEEE, editor, Annual International Conference of the IEEE Engineering in Medicine and Biology Society, volume 1, pages 2713–2717. Al-Mubaid, H. and Nguyen, H. A. (2009). Measuring semantic similarity between biomedical concepts within multiple ontologies. Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE Transactions, 39(4):389–398. Albertoni, R. and De Martino, M. (2006). Semantic similarity of ontology instances tailored on the application context. In On the Move to Meaningful Internet Systems 2006: CoopIS, DOA, GADA, and ODBASE, volume 4275 of Lecture Notes in Computer Science, pages 1020–1038, Berlin, Heidelberg. Springer. Ali, W. and Deane, C. M. (2009). Functionally guided alignment of protein interaction networks for module detection. Bioinformatics (Oxford, England), 25(23):3166–3173. Alvarez, M. and Lim, S. (2007). A graph modeling of semantic similarity between words. In International Conference on Semantic Computing, 2007 (ICSC 2007), pages 355–362. IEEE. Alvarez, M., Qi, X., and Yan, C. (2011). A shortest-path graph kernel for estimating gene product semantic similarity. Journal of biomedical semantics, 2(3). 141 142 BIBLIOGRAPHY Alvarez, M. and Yan, C. (2011). A graph-based semantic similarity measure for the gene ontology. Journal of bioinformatics and computational biology, 9(6):681–695. Andrea Rodrı́guez, M. and Egenhofer, M. J. (2004). Comparing geospatial entity classes: an asymmetric and context-dependent similarity measure. International Journal of Geographical Information Science, 18(3):229–256. Andrejko, A. and Bieliková, M. (2013). Comparing instances of ontological concepts for personalized recommendation in large information spaces. Computing and Informatics, 28(4):429–452. Araújo, R. and Pinto, H. S. (2007). SEMilarity: towards a model-driven approach to similarity. In International Workshop on Description Logics (DL), pages 155–162. Bolzano University Press. Araujo, S., Hidders, J., Schwabe, D., and de Vries, A. P. (2011). SERIMI - Resource description similarity, RDF instance matching and interlinking. arXiv preprint arXiv:1107.1104. Ashburner, M., Ball, C. A., Blake, J. A., Botstein, D., Butler, H., and ... (2000). Gene ontology: tool for the unification of biology. The gene ontology consortium. Nature Genetics, 25(1):25–29. Ashby, F. G. and Perrin, N. A. (1988). Toward a unified theory of similarity and recognition. Psychological review, 95(1):124–150. Auer, S., Bizer, C., Kobilarov, G., Lehmann, J., Cyganiak, R., and Ives, Z. (2007). DBpedia: a nucleus for a web of open data. In Proceedings of the 6th International Semantic Web Conference (ISWC 2007), pages 722–735. Springer-Verlag. Azuaje, F., Wang, H., and Bodenreider, O. (2005). Ontology-driven similarity approaches to supporting gene functional assessment. In Proceedings of the ISMB’2005 SIG meeting on Bio-ontologies, pages 9–10. Baader, F., Calvanese, D., McGuinness, D., Nardi, D., and Patel-Schneider, P., editors (2010). The description logic handbook: theory, implementation, and applications. Cambridge university press, 2nd edition. Baker, S., Reichart, R., and Korhonen, A. (2014). An unsupervised model for instance level subcategorization acquisition. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 278–289, Doha (Qatar). Association for Computational Linguistics. Ballatore, A., Bertolotto, M., and Wilson, D. C. (2012). Geographic knowledge extraction and semantic similarity in OpenStreetMap. Knowledge and Information Systems, 37(1):61–81. Banerjee, S. and Pedersen, T. (2002). An adapted lesk algorithm for word sense disambiguation using WordNet. In Gelbukh, A., editor, Computational Linguistics and Intelligent Text Processing, volume 2276, pages 136–145. Springer Berlin Heidelberg. Banerjee, S. and Pedersen, T. (2003). Extended gloss overlaps as a measure of semantic relatedness. In Proceedings of the 18th international joint conference on Artificial intelligence (IJCAI 2003), pages 805–810, Acapulco (Mexico). Bär, D., Biemann, C., Gurevych, I., and Zesch, T. (2012). Ukp: computing semantic textual similarity by combining multiple content similarity measures. In Proceedings of the First Joint Conference on Lexical and Computational Semantics-Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation, pages 435–440. Association for Computational Linguistics. Bär, D., Zesch, T., and Gurevych, I. (2013). DKPro Similarity: an open source framework for text similarity. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (System Demonstrations) (ACL 2013), pages 121–126. Association for Computational Linguistics. Baroni, M., Bernardi, R., and Zamparelli, R. (2014). Frege in space: a program of compositional distributional semantics. Linguistic Issues in Language Technology, 9:5–110. Baroni, M. and Lenci, A. (2010). Distributional memory: a general framework for corpus-based semantics. Computational Linguistics, 36(4):673–721. BIBLIOGRAPHY 143 Baroni, M. and Lenci, A. (2011). How we BLESSed distributional semantic evaluation. In GEMS 11 Proceedings of the GEMS 2011 Workshop on GEometrical Models of Natural Language Semantics, pages 1–10. Association for Computational Linguistics. Baroni, M. and Zamparelli, R. (2010). Nouns are vectors, adjectives are matrices: Representing adjectivenoun constructions in semantic space. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing (EMNLP 2010), pages 1183–1193. Association for Computational Linguistics. Batet, M. (2011). Ontology-based semantic clustering. AI Communications, 24:291–292. Batet, M., Harispe, S., Ranwez, S., Sánchez, D., and Ranwez, V. (2014). An information theoretic approach to improve the semantic similarity assessment across multiple ontologies. Information Sciences, 283:197–210. Batet, M., Sánchez, D., and Valls, A. (2010a). An ontology-based measure to compute semantic similarity in biomedicine. Journal of biomedical informatics, 4(1):39–52. Batet, M., Sánchez, D., Valls, A., and Gibert, K. (2010b). Exploiting taxonomical knowledge to compute semantic similarity: an evaluation in the biomedical domain. In Lecture Notes in Computer Science, volume 6096/2010, pages 274–283. Batet, M., Sánchez, D., Valls, A., and Gibert, K. (2013). Semantic similarity estimation from multiple ontologies. Applied Intelligence, 38(1):29–44. Baziz, M., Boughanem, M., Pasi, G., and Prade, H. (2007). An information retrieval driven by ontology: from query to document expansion. In Large Scale Semantic Access to Content (Text, Image, Video, and Sound) - Open research Areas in Information Retrieval / Recherche d’Information Assistée par Ordinateur (OAIR / RIAO’07), pages 301–313. Bell, D. E., Raiffa, H., and Tversky, A., editors (1988). Decision making: descriptive, normative, and prescriptive interactions. Cambridge University Press. Bellot, P., Bonnefoy, L., Bouvier, V., Duvert, F., and Kim, Y.-M. (2014). Large scale text mining approaches for information retrieval and extraction. In Faucher, Colette and Jain, L. C., editor, Innovations in Intelligent Machines (4), chapter 1, pages 3–45. Springer International Publishing. Benabderrahmane, S., Devignes, M.-D., Smail-Tabbone, M., Poch, O., and Napoli, A. (2010a). IntelliGO: towards a new synthetic semantic similarity measure by considering metadata of gene functional annotations quality. Technical report, Université Henri Poincaré - Nancy I. Benabderrahmane, S., Smail-Tabbone, M., Poch, O., Napoli, A., and Devignes, M.-D. (2010b). IntelliGO: a new vector-based semantic similarity measure including annotation origin. BMC Bioinformatics, 11(1):588. Bengio, Y., Ducharme, R., Vincent, P., and Janvin, C. (2003). A neural probabilistic language model. The Journal of Machine Learning Research, 3:1137–1155. Berners-Lee, T., Hendler, J., and Lassila, O. (2001). The semantic web. Scientific american, 284(5):28– 37. Bernstein, A., Kaufmann, E., Kiefer, C., and Bürki, C. (2005). SimPack: a generic java library for similarity measures in ontologies. Technical report, University of Zurich Department of Informatics. Berry, M. W., Dumais, S., and O’Brien, G. W. (1995). Using linear algebra for intelligent information retrieval. Society for Industrial and Applied Mathematics (SIAM) review, 37(4):573–595. Bin, S., Liying, F., Jianzhuo, Y., Pu, W., and Zhongcheng, Z. (2009). Ontology-based measure of semantic similarity between concepts. In Software Engineering, 2009. WCSE’09. WRI World Congress, pages 109–112. IEEE. BIPM, IEC, IFCC, ILAC, IUPAC, IUPAP, ISO, and OIML (2012). International vocabulary of metrology – Basic and general concepts and associated terms (VIM) JCGM 200:2012. 144 BIBLIOGRAPHY Bird, S. (2006). NLTK: the natural language toolkit. In Proceedings of the COLING/ACL on Interactive presentation sessions, pages 69–72. Association for Computational Linguistics. Bisson, G. (1992). Conceptual clustering in a first order logic representation. In Proceeding of the 10th European Conference on Artificial Intelligence (ECAI 1992), volume 92, pages 458–462. Bisson, G. (1995). Why and how to define a similarity measure for object based representation systems. In Mars, N. J. I., editor, Towards Very Large Knowledge Bases, pages 236–246. IOS Press, 1st edition. Blanchard, E. (2008). Exploitation d’une hiérarchie de subsomption par le biais de mesures sémantiques. PhD thesis, Université de Nantes. Blanchard, E., Harzallah, M., and Kuntz, P. (2008). A generic framework for comparing semantic similarities on a subsumption hierarchy. 18th European Conference on Artificial Intelligence (ECAI 2008), pages 20–24. Blanchard, E., Kuntz, P., Harzallah, M., and Briand, H. (2006). A tree-based similarity for evaluating concept proximities in an ontology. In 10th conference of the International Fedederation of Classification Societies, pages 3–11. Springer, Ljubljana (Slovenia). Blei, D. M., Ng, A. Y., and Jordan, M. I. (2003). Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022. Blondel, V. D. (2002). Automatic extraction of synonyms in a dictionary. In in Proceedings of the SIAM Text Mining Workshop. Bodenreider, O., Aubry, M., and Burgun, A. (2005). Non-lexical approaches to identifying associative relations in the gene ontology. In Pacific Symposium on Biocomputing., volume 102, page 91. NIH Public Access. Bollegala, D. (2007a). An integrated approach to measuring semantic similarity between words using information available on the web. Proceedings of the 16th international conference on World Wide Web - WWW 07, page 757. Bollegala, D. (2007b). Measuring semantic similarity between words using web search engines. Proceedings of the 16th international conference on World Wide Web - WWW 07, page 757. Booij, G., Lehmann, C., Mugdan, J., Kesselheim, W., and Skopeteas, S. (2000). Morphology. An international handbook on inflection and word-formation. Borg, I. and Groenen, P. J. F. (2005). Modern multidimensional scaling: theory and applications. Springer. Borgida, A., Walsh, T., and Hirsh, H. (2005). Towards measuring similarity in description logics. In International Workshop on Description Logics (DL2005), volume 147, Edinburgh, Scotland. Botafogo, R. A., Rivlin, E., and Shneiderman, B. E. N. (1992). Structural analysis of hypertexts: hierarchies and useful metrics identifying. Human-Computer Interaction, 10(2):142–180. Boyd-Graber, J., Fellbaum, C., Osherson, D., and Schapire, R. (2006). Adding dense, weighted, connections to WordNet. In Proceedings of the Third International WordNet Conference, pages 29–36. Brown, P. F., DeSouza, P. V., Mercer, R. L., Pietra, V. J. D., and Lai, J. C. (1992). Class-based n -gram models of natural language. Computational Linguistics, 18(4):467–479. Bruni, E., Tran, N.-K., and Baroni, M. (2014). Multimodal distributional semantics. J. Artif. Intell. Res.(JAIR), 49:1–47. Budanitsky, A. (2001). Semantic distance in WordNet: an experimental, application-oriented evaluation of five measures. Workshop on WordNet and Other Lexical. Budanitsky, A. and Hirst, G. (2006). Evaluating WordNet-based Measures of Lexical Semantic Relatedness. Computational Linguistics, 32(1):13–47. Bullinaria, J. A. and Levy, J. P. (2007). Extracting semantic representations from word co-occurrence statistics: a computational study. Behavior research methods, 39(3):510–526. BIBLIOGRAPHY 145 Bulskov, H., Knappe, R., and Andreasen, T. (2002). On measuring similarity for conceptual querying. In Proceedings of the 5th International Conference on Flexible Query Answering Systems, volume 1, pages 100–111, London, UK. Springer-Verlag. Buscaldi, D., Le Roux, J., Flores, J. J. G., and Popescu, A. (2013). LIPN-CORE: semantic text similarity using n-grams, WordNet, syntactic analysis, ESA and information retrieval based features. * SEM 2013. Cazzanti, L. and Gupta, M. (2006). Information-theoretic and set-theoretic similarity. In 2006 IEEE International Symposium on Information Theory, pages 1836–1840. IEEE. Cha, S. (2007). Comprehensive survey on distance/similarity measures between probability density functions. International Journal of Mathematical Models and Methods in Applied Sciences, 1(4):300– 307. Chabalier, J., Mosser, J., and Burgun, A. (2007). A transversal approach to predict gene product networks from ontology-based similarity. BMC Bioinformatics, 8(235). Chaffin, R. and Herrmann, D. J. (1984). The similarity and diversity of semantic relations. Memory & Cognition, 12(2):134–141. Chandler, D. (2007). Semiotics: the basics. Routledge; 2 edition (March 8, 2007). Chater, N. and Hahn, U. (1997). Representational distortion, similarity and the universal law of generalization. In Proceedings of the Interdisciplinary Workshop on Similarity and Categorization (SimCat 1997), pages 31–36, Edinburgh University, Edinburgh. Department of Artificial Intelligence, Edinburgh University. Chebotarev, P. and Shamis, E. (2006a). A matrix-forest theorem and measuring relations in small social group. Automation and Remote Control, 58(9):1505–1514. Chebotarev, P. and Shamis, E. (2006b). On proximity measures for graph vertices. Automation and Remote Control, 59(10):1443–1459. Chen, H.-H., Lin, M.-S., and Wei, Y.-C. (2006). Novel association measures using web search with double checking. In Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the Association for Computational Linguistics, pages 1009–1016. Association for Computational Linguistics. Cho, M., Choi, J., and Kim, P. (2003). An efficient computational method for measuring similarity between two conceptual entities. In 4th International Conference on Advances in Web-Age Information Management (WAIM 2003), pages 381–388, Chengdu (China). Springer. Cho, Y.-R., Hwang, W., Ramanathan, M., and Zhang, A. (2007). Semantic integration to identify overlapping functional modules in protein interaction networks. BMC Bioinformatics, 8:265. Choi, S.-s., Cha, S.-h., and Tappert, C. C. (2010). A survey of binary similarity and distance measures. Journal on Systemics, Cybernetics and Informatics, 0(1):43–48. Church, K. W. and Hanks, P. (1990). Word association norms, mutual information, and lexicography. Computational linguistics, 16(1):22–29. Cilibrasi, R. and Vitanyi, P. (2007). The Google similarity distance. IEEE Transactions on Knowledge and Data Engineering, 19(3):370–383. Cohen, T. and Widdows, D. (2009). Empirical distributional semantics: methods and biomedical applications. Journal of Biomedical Informatics, 42(2):390–405. Collins, A. M. and Loftus, E. F. (1975). A spreading-activation theory of semantic processing. Psychological review, 82(6):407. Collins, A. M. and Quillian, M. R. (1969). Retrieval time from semantic memory. Journal of verbal learning and verbal behavior, 8(2):240–247. 146 BIBLIOGRAPHY Corley, C. and Mihalcea, R. (2005). Measuring the semantic similarity of texts. In Proceedings of the Association for Computational Linguistics Workshop on Empirical Modeling of Semantic Equivalence and Entailment, pages 13–18. Association for Computational Linguistics. Couto, F. M., Silva, M., and Coutinho, P. M. (2003). Implementation of a functional semantic similarity measure between gene-products. Technical Report DI/FCUL TR, Department of Informatics, University of Lisbon. Couto, F. M. and Silva, M. J. (2011). Disjunctive shared information between ontology concepts: application to Gene Ontology. Journal of Biomedical Semantics, 2(1):5. Couto, F. M., Silva, M. J., and Coutinho, P. M. (2005). Semantic similarity over the Gene Ontology: family correlation and selecting disjunctive ancestors. In Conference in Information and Knowledge Management (CIKM 2005), pages 343–344. ACM. Couto, F. M., Silva, M. J., and Coutinho, P. M. (2007). Measuring semantic similarity between Gene Ontology terms. Data & Knowledge Engineering, 61(1):137–152. Couto, F. M., Silva, M. J., Lee, V., Dimmer, E., Camon, E., Apweiler, R., Kirsch, H., and RebholzSchuhmann, D. (2006). GOAnnotator: linking protein GO annotations to evidence text. Journal of Biomedical Discovery and Collaboration, 1(1):19. Cover, T. M. and Thomas, J. A. (2006). Elements of information theory. John Wiley & Sons. Cross, V. (2004). Fuzzy semantic distance measures between ontological concepts. In IEEE Annual Meeting of the Fuzzy Information, 2004 (NAFIPS 2004), volume 2, pages 635–640. Ieee. Cross, V. (2006). Tversky’s parameterized similarity ratio model: a basis for semantic relatedness. In Fuzzy Information Processing Society, 2006 (NAFIPS 2006). Annual meeting of the North American, pages 541–546, Montreal, Quebec. Cross, V. and Sun, Y. (2007). Semantic, fuzzy set and fuzzy measure similarity for the gene ontology. IEEE International Conference on Fuzzy Systems, pages 1951–1956. Cross, V. and Yu, X. (2010). A fuzzy set framework for ontological similarity measures. In Fuzzy Systems (FUZZ-IEEE), IEEE International Conference, pages 1–8. Cross, V. and Yu, X. (2011). Investigating ontological similarity theoretically with fuzzy Set theory, information content, and Tversky similarity and empirically with the Gene Ontology. In Benferhat, S. and Grant, J., editors, Scalable Uncertainty Management, volume 6929 of Lecture Notes in Computer Science, pages 387–400. Springer Berlin Heidelberg. Cross, V., Yu, X., and Hu, X. (2013). Unifying ontological similarity measures: a theoretical and empirical investigation. International Journal of Approximate Reasoning, 54(7):861–875. Cruse, D. A. (2011). Meaning in language: an introduction to semantics and pragmatics. Oxford University Press; 3 edition (January 22, 2011). Culler, J. D. (1986). Ferdinand de Saussure. Cornell University Press. Curran, J. R. (2004). From distributional to semantic similarity. Phd thesis, University of Edinburgh. College of Science and Engineering. School of Informatics. Dagan, I., Lee, L., and Pereira, F. C. N. (1999). Similarity-based models of word cooccurrence probabilities. Machine Learning, 34(1-3):43–69. D’Amato, C. (2007). Similarity-based learning methods for the semantic Web. PhD thesis, Università degli Studi di Bari (Italy). D’Amato, C., Fanizzi, N., and Esposito, F. (2005a). A semantic dissimilarity measure for concept descriptions in ontological knowledge bases. The Second International Workshop on Knowledge Discovery and Ontologies. D’Amato, C., Fanizzi, N., and Esposito, F. (2005b). A semantic similarity measure for expressive description logics. Proceedings of Convegno Italiano di Logica Computazionale (CILC 2005). BIBLIOGRAPHY 147 D’Amato, C., Staab, S., and Fanizzi, N. (2008). On the influence of description logics ontologies on conceptual similarity. In Knowledge Engineering: Practice and Patterns, pages 48–63. Springer. David, J. and Euzenat, J. (2008). Comparison between ontology distances (preliminary results). In Proceedings of the International Semantic Web Conference (ISWC 2008), pages 245–260. Springer Berlin Heidelberg. De Saussure, F. (1989). Cours de linguistique générale, volume 1. Otto Harrassowitz Verlag. Deerwester, S., Dumais, S., Furnas, G., Thomas, L., and Richard, H. (1990). Indexing by latent semantic analysis. Journal of the American Society of Information Science, 41(6):391–407. Delugach, H. (1993). An exploration into semantic distance. In Pfeiffer, H. and Nagle, T., editors, Conceptual Structures: Theory and Implementation, volume 754 of Lecture Notes in Computer Science, pages 119–124. Springer Berlin Heidelberg. Deza, M. M. and Deza, E. (2013). Encyclopedia of distances. Springer Berlin Heidelberg, 2nd edition. Diaz-Diaz, N. and Aguilar-Ruiz, J. S. (2011). GO-based functional dissimilarity of gene sets. BMC Bioinformatics, 12(1):360. Dinu, G. (2011). Word meaning in context: a probabilistic model and its application to question answering. PhD thesis, Saarlan University. Dinu, G. and Lapata, M. (2010). Measuring distributional similarity in context. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing (EMNLP 2010), pages 1162–1172. Association for Computational Linguistics. Du, Z., Li, L., Chen, C.-F., Yu, P. S., and Wang, J. Z. (2009). G-SESAME: web tools for GO-term-based gene similarity analysis and knowledge discovery. Nucleic acids research, 37(Web Server issue):W345– W349. Dumais, S., Furnas, G., Landauer, T., and Deerwester, S. (1988). Latent semantic indexing. In Proceedings of the Conference on Human Factors in Computing Systems (CHI 1988), pages 281–285. Ehrig, M., Haase, P., Hefke, M., and Stojanovic, N. (2004). Similarity for ontologies - a comprehensive framework. In Workshop Enterprise Modelling and Ontology: Ingredients for Interoperability, at Practical Aspects of Knowledge Management (PAKM), Vienna (Austria). Euzenat, J., Loup, D., Touzani, M., and Valtchev, P. (2004). Ontology alignment with OLA. In 3rd International Semantic Web Conference (ISWC2004) workshop on Evaluation of Ontology-based tools (EON), pages 59–68. Euzenat, J. and Shvaiko, P. (2013). Ontology matching. Springer-Verlag, Heidelberg (DE), 2nd edition. Euzenat, J. and Valtchev, P. (2004). Similarity-based ontology alignment in OWL-lite. In 16th european conference on artificial intelligence (ECAI), pages 333–337. Fanizzi, N. and D’Amato, C. (2006). A similarity measure for the ALN description logic. Italian Conference on Computational Logic (CILC 2006), pages 26–27. Fano, R. M. (1961). Transmission of information: a statistical theory of communications. American Journal of Physics, 29:793–794. Faruqui, M. and Dyer, C. (2014). Community evaluation and exchange of word vectors at wordvectors.org. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations. Fellbaum, C. (2010). WordNet. Springer, New-York. Fernandez-Lopez, M. and Corcho, O. (2010). Ontological engineering: with examples from the areas of knowledge management, e-commerce and the semantic web. Springer Publishing Company, Incorporated. Fernando, S. and Stevenson, M. (2008). A semantic similarity approach to paraphrase detection. Computational Linguistics UK (CLUK 2008) 11th Annual Research Colloqium. 148 BIBLIOGRAPHY Ferret, O. (2010). Similarité sémantique et extraction de synonymes à partir de corpus. In Actes de TALN 2010 Traitement Automatique des Langues Naturelles-TALN 2010. Finkelstein, L., Gabrilovich, E., Matias, Y., Rivlin, E., Solan, Z., Wolfman, G., and Ruppin, E. (2002). Placing search in context: the concept revisited. ACM Transactions on Information Systems (TOIS), 20(1):116–131. Fiorini, N., Ranwez, S., Montmain, J., and Ranwez, V. (2014). Coping with Imprecision During a Semiautomatic Conceptual Indexing Process. In 15th International Conference on Information Processing and Management of Uncertainty in Knowledge-Based Systems (IPMU 2014), pages 11–20. Springer. Firth, J. R. (1935). Meaning by collocation. Transactions of the philological society, 34(1):36–73. Firth, J. R. (1957). A synopsis of linguistic theory, 1930-1955. Studies in Linguistic Analysis, pages 1–32. Foo, N., Garner, B. J., Rao, A., and Tsui, E. (1992). Semantic distance in conceptual graphs. Conceptual Structures: Current Research and Practice, pages 149–154. Formica, A. (2008). Concept similarity in formal concept analysis: an information content approach. Knowledge-Based Systems, 21(1):80–87. Fouss, F., Pirotte, A., Renders, J.-m., and Saerens, M. (2007). Random-walk computation of similarities between nodes of a graph with application to collaborative recommendation. IEEE Transactions on Knowledge and Data Engineering, 19(3):355–369. Freitas, A., Oliveira, J. a. G., O’Riain, S., Curry, E., and Da Silva, J. a. C. P. (2011). Querying Linked Data using semantic relatedness: a vocabulary independent approach. In Muñoz, Rafael and Montoyo, Andrés and Métais, E., editor, Natural Language Processing and Information Systems, pages 40–51. Springer Berlin Heidelberg. Gabrilovich, E. and Markovitch, S. (2007). Computing Semantic Relatedness Using Wikipedia-based Explicit Semantic Analysis. In International Joint Conference on Artificial Intelligence 2007 (IJCAI 2007), volume 7, pages 1606–1611, Hyderabad (India). Gabrilovich, E. and Markovitch, S. (2009). Wikipedia-based Semantic Interpretation for Natural Language Processing. Journal of Artificial Intelligence Research (JAIR), 34:443–498. Gandon, F., Corby, O., Dieng-Kuntz, R., and Giboin, A. (2005). Proximité conceptuelle et distances de graphes. Raisonner le Web Sémantique avec des Graphes - Journée thématique de la plate-forme Association Française pour l’Intelligence Artificielle. Ganesan, P., Garcia-Molina, H., and Widom, J. (2003). Exploiting hierarchical domain structure to compute similarity. Association for Computing Machinery - Transactions on Information Systems, 21(1):64–93. Ganesan, V., Swaminathan, R., and Thenmozhi, M. (2012). Similarity Measure Based On Edge Counting Using Ontology. International Journal of Engineering Research and Development, 3(3):40–44. Gardner, B., Lukose, D., and Tsui, E. (1987). Parsing Natural Language through Pattern Correlation and Modification. In Proceedings of the 7th International Workshop on Expert Systems & Their Applications, pages 1285–1299, Avignon (France). Garla, V. N. and Brandt, C. (2012). Semantic similarity in the biomedical domain: an evaluation across knowledge sources. BMC bioinformatics, 13(1):261. Gentleman, R. (2007). Visualizing and distances using GO. Technical report. Gentner, D. (2001). Exhuming similarity. Behavioral and Brain Sciences, 24(04):669. Gentner, D. and Markman, A. B. (1994). Structural alignment in comparison: No difference without similarity. Psychological science, 5(3):152–158. Gentner, D. and Markman, A. B. (1997). Structure mapping in analogy and similarity. American psychologist, 52(1):45–56. BIBLIOGRAPHY 149 Goldstone, R. L. (1994a). Similarity, interactive activation, and mapping. Journal of Experimental Psychology: Learning, Memory, and Cognition, 20(1):3–28. Goldstone, R. L. (1994b). The role of similarity in categorization: Providing a groundwork. Cognition, 52(2):125–157. Goldstone, R. L. (1996). Alignment-based nonmonotonicities in similarity. Journal of Experimental Psychology: Learning, Memory, and Cognition, 22(4):988–1001. Goldstone, R. L. and Son, J. Y. (2004). Similarity. Psychological Review, 100:254–278. Golub, G. H. and Van Loan, C. F. (2012). Matrix computations, volume 3. Johns Hopkins University Press; fourth edition edition (December 27, 2012). Goodman, N. (1972). Problems and projects. Bobbs-Merrill Indianapolis. Gracia, J. and Mena, E. (2008). Web-based measure of semantic relatedness. In Web Information Systems Engineering (WISE 2008), pages 136–150. Springer. Grau, B. C., Dragisic, Z., Eckert, K., Euzenat, J., Ferrara, A., Granada, R., Ivanova, V., Jiménez-Ruiz, E., Kempf, A. O., and Lambrix, P. (2013). Results of the Ontology Alignment Evaluation Initiative 2013. In Proceeding of the 8th International Semantic Web Conference workshop on ontology matching (OM), pages 61–100. Grefenstette, G. (1994). Explorations in automatic thesaurus discovery. Springer. Gruber, T. R. (1993). A translation approach to portable ontology specifications. Knowledge acquisition, 5.2(April):199–220. Gruber, T. R. (1995). Toward principles for the design of ontologies used for knowledge sharing? International journal of human-computer studies, 43(5):907–928. Guarino, N. and Giaretta, P. (1995). Ontologies and knowledge bases - towards a terminological clarification. In Mars, N., editor, Towards very large knowledge bases: knowledge building & knowledge sharing 1995, pages 25–32. IOS Press. Guarino, N., Oberle, D., and Staab, S. (2009). What is an Ontology? In Handbook on ontologies, pages 1–17. Springer. Guo, X., Liu, R., Shriver, C. D., Hu, H., and Liebman, M. N. (2006). Assessing semantic similarity measures for the characterization of human regulatory pathways. Bioinformatics (Oxford, England), 22(8):967–973. Gurevych, I. (2005). Using the structure of a conceptual network in computing semantic relatedness. In Proceedings of the 2nd International Joint Conference on Natural Language Processing, pages 767–778, Jeju Island (South Korea). Springer. Guthrie, D., Allison, B., Liu, W., Guthrie, L., and Wilks, Y. (2006). A closer look at skip-gram modelling. In Proceedings of the 5th international Conference on Language Resources and Evaluation (LREC 2006), pages 1–4. Guzzi, P. H., Mina, M., Guerra, C., and Cannataro, M. (2012). Semantic similarity analysis of protein data: assessment with biological features and issues. Briefings in Bioinformatics, 13(5):569–585. Hagedoorn, M. (2000). Pattern matching using similarity measures. PhD thesis, Utrecht University (The Netherlands). Hahn, U. (2011). What makes things similar? (Invited speacker). In 1st International Workshop on Similarity-Based Pattern Analysis and Recognition. Hahn, U., Chater, N., and Richardson, L. B. (2003). Similarity as transformation. Cognition, 87(1):1–32. Hahn, U. and Ramscar, M. (2001). Conclusion: mere similarity? Similarity and categorization, pages 257–272. 150 BIBLIOGRAPHY Halawi, G., Dror, G., Gabrilovich, E., and Koren, Y. (2012). Large-scale learning of word relatedness with constraints. In Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining - KDD’12, pages 1406–1414, New York, New York, USA. ACM Press. Hall, M. (2006). A semantic similarity measure for formal ontologies. Master thesis, Fakultat fur Wirtschaftswissenschaften und Informatik, Alpen-Adria Universitat Klagenfurt, Klagenfurt (Austria). Han, L., Finin, T., McNamee, P., Joshi, A., and Yesha, Y. (2013). Improving word similarity by augmenting PMI with estimates of word polysemy. Knowledge and Data Engineering, IEEE Transactions on, 25(6):1307–1322. Harary, F., Norman, R. Z., and Cartwright, D. (1965). Structural models: an introduction to the theory of directed graphs. John Willey & Sons, Inc. Harel, D. and Tarjan, R. E. (1984). Fast algorithms for finding nearest common ancestors. Society for Industrial and Applied Mathematics (SIAM) Journal on Computing, 13(2):338–355. Harispe, S., Ranwez, S., Janaqi, S., and Montmain, J. (2013a). Semantic measures based on RDF projections: application to content-based recommendation systems. In On the Move to Meaningful Internet Systems: OTM 2013 Conferences, pages 606–615. Springer Berlin Heidelberg, Graz (Austria). Harispe, S., Ranwez, S., Janaqi, S., and Montmain, J. (2013b). Semantic measures for the comparison of units of language, concepts or entities from text and knowledge base analysis. ArXiv, 1310.1285:140. Harispe, S., Ranwez, S., Janaqi, S., and Montmain, J. (2014a). The Semantic Measures Library and Toolkit: fast computation of semantic similarity and relatedness using biomedical ontologies. Bioinformatics, 30(5):740–742. Harispe, S., Ranwez, S., Janaqi, S., and Montmain, J. (2014b). The Semantic Measures Library: assessing semantic similarity from knowledge representation analysis. In 19th International Conference on Applications of Natural Language to Information Systems (NLDB 2014), pages 254–257. Harispe, S., Sánchez, D., Ranwez, S., Janaqi, S., and Montmain, J. (2013c). A framework for unifying ontology-based semantic similarity measures: a study in the biomedical domain. Journal of Biomedical Informatics, 48:38–53. Harris, Z. S. (1954). Distributional structure. Word, 10:146–162. Harris, Z. S. (1981). Distributional structure. Springer. Hassan, S., Banea, C., and Mihalcea, R. (2012). Measuring semantic relatedness using multilingual representations. In Association for Computational Linguistics (ACL 2012), pages 20–29. Association for Computational Linguistics. Hassan, S. and Mihalcea, R. (2009). Cross-lingual semantic relatedness using encyclopedic knowledge. In Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing: Volume 3-Volume 3, pages 1192–1201. Association for Computational Linguistics. Hatzivassiloglou, V. and McKeown, K. R. (1993). Towards the automatic identification of adjectival scales: Clustering adjectives according to meaning. In Proceedings of the 31st annual meeting on Association for Computational Linguistics, pages 172–182. Association for Computational Linguistics. Heylen, K., Peirsman, Y., Geeraerts, D., and Speelman, D. (2008). Modelling word similarity: an evaluation of automatic synonymy extraction algorithms. Proceedings of the Sixth International Language Resources and Evaluation (LREC’08), pages 3243–3249. Hill, F., Reichart, R., and Korhonen, A. (2014). SimLex-999: evaluating semantic models with (genuine) similarity estimation. arXiv preprint arXiv:1408.3456. Hindle, D. (1990). Noun classification from predicate-argument structures. In Proceedings of the 28th annual meeting on Association for Computational Linguistics, pages 268–275. Association for Computational Linguistics. Hirschman, L., Grishman, R., and Sager, N. (1975). Grammatically-based automatic word class formation. Information Processing & Management, 11(1):39–57. BIBLIOGRAPHY 151 Hirst, G. and St-Onge, D. (1998). Lexical chains as representations of context for the detection and correction of malapropisms. In Christiane Fellbaum, editor, WordNet: An electronic lexical database., pages 305–332, Cambridge, MA. MIT Press. Hitzler, P., Krotzsch, M., and Rudolph, S. (2011). Foundations of semantic web technologies. Chapman and Hall/CRC. Hliaoutakis, A. (2005). Semantic similarity measures in MeSH ontology and their application to information retrieval on Medline. Master thesis, Technical University of Crete, Greek. Hliaoutakis, A., Varelas, G., Voutsakis, E., Petrakis, E., and Milios, E. (2006). Information retrieval by semantic similarity. International Journal on Semantic Web and Information Systems (IJSWIS), 2(3):55–73. Ho, N. D. and Cédrick, F. (2004). Lexical similarity based on quantity of information exchangedsynonym extraction. Proceedings of the Research Informatics Vietnam-Francophony, Hanoi, Vietnam, pages 193–198. Hofmann, T. (1999). Probabilistic latent semantic indexing. In Proceedings of the 22nd annual international ACM SIGIR conference on Research and development in information retrieval, pages 50–57. ACM. Holyoak, K. J. and Koh, K. (1987). Surface and structural similarity in analogical transfer. Memory & Cognition, 15(4):332–340. Huang, D. W., Sherman, B. T., Tan, Q., Collins, J. R., Alvord, W. G., Roayaei, J., Stephens, R., Baseler, M. W., Lane, H. C., and Lempicki, R. a. (2007). The DAVID gene functional classification tool: a novel biological module-centric algorithm to functionally analyze large gene lists. Genome biology, 8(9). Huang, E. H., Socher, R., Manning, C. D., and Ng, A. Y. (2012). Improving word representations via global context and multiple word prototypes. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics, pages 873–882. Association for Computational Linguistics. Hughes, T. and Ramage, D. (2007). Lexical semantic relatedness with random graph walks. Computational Linguistics, 7(June):581–589. Huynh, D., Tran, D., and Ma, W. (2014). Combination features for semantic similarity measure. In Proceedings of the International MultiConference of Engineers and Computer Scientists. Iordanskaja, L., Kittredge, R., and Polguere, A. (1991). Lexical selection and paraphrase in a meaningtext generation model. In Natural language generation in artificial intelligence and computational linguistics - The Kluwer International Series in Engineering and Computer Science, volume 119, pages 293–312. Springer. Iosif, E. and Potamianos, A. (2012). SemSim: resources for normalized semantic similarity computation using lexical networks. In Eighth International Conference on Language Resources and Evaluation (LREC-2012), pages 3499–3504, Istanbul (Turkey). European Language Resources Association (ELRA). Islam, A. and Inkpen, D. (2006). Second order co-occurrence PMI for determining the semantic similarity of words. In Proceedings of the International Conference on Language Resources and Evaluation (LREC 2006), pages 1033–1038. Jabeen, S., Gao, X., and Andreae, P. (2013). CPRel: semantic relatedness computation using Wikipedia based context profiles. Research in Computing Science, 70:55–66. Jain, A. K., Murty, M. N., and Flynn, P. J. (1999). Data clustering: a review. ACM computing surveys (CSUR), 31(3):264–323. Jain, S. and Bader, G. D. (2010). An improved method for scoring protein-protein interactions using semantic similarity within the gene ontology. BMC Bioinformatics, 11(1):562. 152 BIBLIOGRAPHY Janaqi, S., Harispe, S., Ranwez, S., and Montmain, J. (2014). Robust Selection of Domain-specific Semantic Similarity Measures from Uncertain Expertise. In Laurent, A., Strauss, O., Bouchon-Meunier, B., and Yager, R., editors, 15th International Conference on Information Processing and Management of Uncertainty in Knowledge-Based Systems (IPMU 2014) - Series: Communications in Computer and Information Science, pages 1–10, Montpellier (France). Springer. Janowicz, K. (2006). Sim-dl: Towards a semantic similarity measurement theory for the description logic ALCNR in geographic information retrieval. In On the Move to Meaningful Internet Systems 2006: OTM 2006 Workshops, pages 1681–1692. Springer. Janowicz, K., Raubal, M., and Kuhn, W. (2011). The semantics of similarity in geographic information retrieval. Journal of Spatial Information Science, 2:29–57. Janowicz, K., Raubal, M., Schwering, A., and Kuhn, W. (2008). Semantic Similarity Measurement and Geospatial Applications. Transactions in GIS, 12(6):651–659. Janowicz, K. and Wilkes, M. (2009). Sim-dla: A novel semantic similarity measure for description logics reducing inter-concept to inter-instance similarity. In The Semantic Web: Research and Applications, pages 353–367. Springer. Jarmasz, M. and Szpakowicz, S. (2003a). Rogets thesaurus and semantic similarity. In Conference on Recent Advances in Natural Language Processing (RANLP-2003), pages 212–219. Jarmasz, M. and Szpakowicz, S. (2003b). Using Rogets thesaurus to measure semantic similarity. In Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP2003), pages 212–219. Jeh, G. and Widom, J. (2002). SimRank: a measure of structural-context similarity. In Proceedings of the eighth ACM SIGKDD international conference on Knowledge Discovery and Data mining, pages 538–543, New York, USA. ACM Press. Jiang, J. and Conrath, D. (1997). Semantic similarity based on corpus statistics and lexical taxonomy. In International Conference Research on Computational Linguistics (ROCLING X), pages 19–33. Jones, K. S. (1972). A statistical interpretation of term specificity and its application in retrieval. Journal of Documentation, 28:11–21. Joubarne, C. and Inkpen, D. (2011). Comparison of semantic similarity for different languages using the Google n-gram corpus and second- order co-occurrence measures. In Proceedings of the 24th Canadian conference on Advances in artificial intelligence, pages 216–221. Springer-Verlag. Jurgens, D., Pilehvar, M. T., and Navigli, R. (2014). SemEval-2014 Task 3: cross-level semantic similarity. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval-2014), Dublin, Ireland. Kamp, H., Lenci, A., and Pustejovsky, J. (2014). Computational models of language meaning in context (Dagstuhl Seminar 13462). Dagstuhl Reports, 3(11):79–116. Kanerva, P., Kristofersson, J., and Holst, A. (2000). Random indexing of text samples for latent semantic analysis. In Proceedings of the 22nd annual conference of the cognitive science society, volume 1036. Karlgren, J. and Sahlgren, M. (2001). From words to understanding. In Uesaka, Y., KanervaP., Asoh, H. E., editor, Foundations of Real-World Intelligence, pages 294–308. CSLI Publications. Keeney, R. L. (1993). Decisions with multiple objectives: preferences and value tradeoffs. Cambridge University Press (July 1, 1993), Cambridge, UK. Kiefer, C., Bernstein, A., and Stocker, M. (2007). The fundamentals of iSPARQL: a virtual triple approach for similarity-based semantic web tasks. The Semantic Web, 4825:295–309. Kolb, P. (2008). Disco: a multilingual database of distributionally similar words. Proceedings of a conference on natural language processing (KONVENS 2008), pages 37–44. Kolb, P. (2009). Experiments on the difference between semantic similarity and relatedness. In Proceedings of the 17th Nordic Conference on Computational Linguistics-NODALIDA09. BIBLIOGRAPHY 153 Kondor, R. I. and Lafferty, J. (2002). Diffusion kernels on graphs and other discrete input spaces. In Proceedings of the Nineteenth International Conference (ICML 2002), volume 2, pages 315–322, Sydney (Australia). Kozima, H. (1993). Text segmentation based on similarity between words. Proceedings of the 31st annual meeting on Association for Computational Linguistics (ACL), pages 286–288. Kozima, H. and Furugori, T. (1993). Similarity between words computed by spreading activation on an English dictionary. In Proceedings of the sixth conference on European chapter of the Association for Computational Linguistics (EACL), pages 232–239, Morristown, NJ, USA. Association for Computational Linguistics. Kozima, H. and Ito, A. (1997). Context-sensitive word distance by adaptive scaling of a semantic space. In Recent Advances in Natural Language Processing: Selected Papers from RANLP 1995, pages 111–124. Kuhn, R. and De Mori, R. (1990). A cache-based natural language model for speech recognition. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 12(6):570–583. Landauer, T. and Dumais, S. (1997). A solution to Plato’s problem: the Latent Semantic Analysis theory of the acquisition, induction, and representation of knowledge. Psychological Review, 104:211–240. Landauer, T., Foltz, P. W., and Laham, D. (1998). An introduction to latent semantic analysis. Discourse processes, 25(2-3):259–284. Lange, M., Lemay, D., and German, B. (2007). A multi-ontology framework to guide agriculture and food towards diet and health. Journal of the science of food and agriculture, 87:1427–1434. Lao, N. (2012). Efficient random walk inference with knowledge bases. PhD thesis, Pennsylvania State University. Leacock, C. and Chodorow, M. (1994). Filling in a sparse training space for word sense identification. Leacock, C. and Chodorow, M. (1998). Combining local context and WordNet similarity for word sense identification. In Fellbaum, C., editor, WordNet: An electronic lexical database., chapter 13, pages 265–283. MIT Press. Lee, J. H., Kim, M. H., and Lee, Y. J. (1993). Information retrieval based on conceptual distance in is-a hierarchies. Journal of Documentation, 49(2):188–207. Lee, L. (1999). Measures of distributional similarity. In Proceedings of the 37th annual meeting of the Association for Computational Linguistics, pages 25–32. Association for Computational Linguistics. Lee, L. (2001). On the effectiveness of the skew divergence for statistical language analysis. In Artificial Intelligence and Statistics (AISTATS), pages 65–72. Lee, M., Pincombe, B., and Welsh, M. (2005). An empirical evaluation of models of text document similarity. In Proceedings of the 27th Annual Conference of the Cognitive Science Society, pages 1254–1259. Lehmann, K. and Turhan, A.-Y. (2012). A framework for semantic-based similarity measures for ELHconcepts. In Logics in Artificial Intelligence, pages 307–319. Springer. Lemaire, B. and Denhière, G. (2008). Effects of high-order co-occurrences on word semantic similarities. arXiv preprint arXiv:0804.0143. Lenci, A. (2008). Distributional semantics in linguistic and cognitive research. Italian journal of linguistics, 20(1):1–31. Lesk, M. (1986). Automatic sense disambiguation using machine readable dictionaries. In Proceedings of the 5th annual international conference on Systems documentation (SIGDOC ’86), pages 24–26, New York, USA. ACM Press. Li, B., Wang, J. Z., Feltus, F. A., Zhou, J., and Luo, F. (2010). Effectively integrating information content and structural relationship to improve the GO-based similarity measure between proteins. arXiv preprint arXiv:1001.0958, pages 1–54. 154 BIBLIOGRAPHY Li, J., Gong, B., Chen, X., Liu, T., Wu, C., Zhang, F., Li, C., Li, X., Rao, S., and Li, X. (2011). DOSim: An R package for similarity between diseases based on Disease Ontology. BMC Bioinformatics, 12(1):266. Li, M. and Vitányi, P. (2008). An introduction to Kolmogorov complexity and its applications. Springer, New York, 3rd edition. Li, Y., Bandar, Z. A., and McLean, D. (2003). An approach for measuring semantic similarity between words using multiple information sources. IEEE Transactions on Knowledge and Data Engineering, 15(4):871–882. Li, Y., McLean, D., Bandar, Z. A., O’Shea, J., and Crockett, K. (2006). Sentence similarity based on semantic nets and corpus statistics. IEEE Transactions on Knowledge and Data Engineering, 18(8):1138–1150. Lin, D. (1998a). An information-theoretic definition of similarity. In 15th International Conference of Machine Learning (ICML 1998), pages 296–304, Madison,WI. Lin, D. (1998b). Automatic retrieval and clustering of similar words. In Proceedings of the 17th international conference on Computational linguistics - Volume 2, COLING ’98, pages 768–774, Stroudsburg, PA, USA. Association for Computational Linguistics. Lin, D. and Pantel, P. (2001). DIRT - discovery of inference rules from text. In Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining, pages 323– 328. ACM. Lintean, M., Moldovan, C., Rus, V., and McNamara, D. S. (2010). The role of local and global weighting in assessing the semantic similarity of texts using latent semantic analysis. In Proceedinf of the 23rd International Conference of the Florida Artificial Intelligence Research Society (FLAIRS 2010), pages 235–240. Lokeshkumar, R. and Sengottuvelan, P. (2014). An intuitive approach for web scale mining using WMiner for web personalization. International Journal of Engineering & Technology (IJET), 6(4). Lord, P., Stevens, R. D., Brass, A., and Goble, C. a. (2003). Semantic similarity measures as tools for exploring the gene ontology. In Pacific Symposium on Biocomputing, volume 8, pages 601–612. Lund, K. and Burgess, C. (1996). Producing high-dimensional semantic spaces from lexical co-occurrence. Behavior Research Methods, Instruments & Computers, 28(2):203–208. Luong, M.-T., Socher, R., and Manning, C. D. (2013). Better word representations with recursive neural networks for morphology. In Conference on Computational Natural Language Learning (CoNLL13), pages 104–113. Maedche, A. and Staab, S. (2001). Comparing ontologies - similarity measures and a comparison study (internal report). Technical report, Institute AIFB, University of Karlsruhe, Karlsruhe (Germany). Maguitman, A. G. and Menczer, F. (2005). Algorithmic detection of semantic similarity. In WWW 05: Proceedings of the 14th International Conference on World Wide Web, pages 107–116, New York, USA. ACM Press. Maguitman, A. G., Menczer, F., Erdinc, F., Roinestad, H., and Vespignani, A. (2006). Algorithmic computation and approximation of semantic similarity. World Wide Web, 9(4):431–456. Manning, C. D. and Schütze, H. (1999). Foundations of statistical natural language processing. MIT press. Mao, W. and Chu, W. W. (2002). Free-text medical document retrieval via phrase-based vector space model. In AMIA Symposium. American Medical Informatics Association, pages 489–493. Markman, A. B. and Gentner, D. (1990). Analogical mapping during similarity judgments. In In Proceedings of the Twelfth Annual Conference of the Cognitive Science Society. Markman, A. B. and Gentner, D. (1993). Structural alignment during similarity comparisons. Cognitive Psychology, 25(4):431–467. BIBLIOGRAPHY 155 Mazandu, G. K. and Mulder, N. J. (2011). IT-GOM: an integrative tool for IC-based GO semantic similarity measures. Technical report, University of Cape Town (South Africa). Mazandu, G. K. and Mulder, N. J. (2013). Information content-based Gene Ontology semantic similarity approaches: Toward a unified framework theory. BioMed Research International, 2013. McCarthy, D., Koeling, R., Weeds, J., and Carroll, J. (2007). Unsupervised acquisition of predominant word senses. Computational Linguistics, 33(4):553–590. McCarthy, J., Minsky, M. L., Rochester, N., and Shannon, C. (2006). A proposal for the dartmouth summer research project on artificial intelligence, august 31, 1955. AI Magazine, 27(4):12–14. McDonald, S. and Ramscar, M. (2001). Testing the distributional hypothesis: the influence of context on judgements of semantic similarity. In Proceedings of the 23rd Annual Conference of the Cognitive Science Society, pages 611–616. McInnes, B. and Pedersen, T. (2013). Evaluating measures of semantic similarity and relatedness to disambiguate terms in biomedical text. Journal of biomedical informatics, 46(6):1116–1124. McInnes, B., Pedersen, T., and Pakhomov, S. V. S. (2009). UMLS-interface and UMLS-similarity: open source software for measuring paths and semantic similarity. AMIA Annual Symposium proceedings, 2009:431–435. Mihalcea, R., Corley, C., and Strapparava, C. (2006). Corpus-based and knowledge-based measures of text semantic similarity. In 21st national conference on Artificial intelligence (AAAI’06), volume 1, pages 775–780. AAAI Press. Mikolov, T. (2012). Statistical language models based on neural networks. PhD thesis, Brno University of Technology. Mikolov, T., Chen, K., Corrado, G., and Dean, J. (2013). Efficient estimation of word representations in vector space. In Proceedings of Workshop at International Conference on Learning Representations (ICLR). Miller, G. A. (1998). WordNet: a lexical database for English. Communications of the ACM, 38(11):39– 41. Miller, G. A. and Charles, W. G. (1991). Contextual correlates of semantic similarity. Language & Cognitive Processes, 6(1):1–28. Milne, D. and Witten, I. (2008). An effective, low-cost measure of semantic relatedness obtained from Wikipedia links. In AAAI Workshop on Wikipedia and Artificial Intelligence: an Evolving Synergy, pages 25–30, Chicago (USA). AAAI Press. Mistry, M. and Pavlidis, P. (2008). Gene Ontology term overlap as a measure of gene functional similarity. BMC Bioinformatics, 9:327. Mitchell, J. and Lapata, M. (2010). Composition in distributional models of semantics. Cognitive Science, 34(8):1388–1429. Mohammad, S., Dorr, B., and Hirst, G. (2008). Computing word-pair antonymy. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, pages 982–991. Association for Computational Linguistics. Mohammad, S. and Hirst, G. (2006). Distributional measures of concept-distance: A task-oriented evaluation. In Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing, pages 35–43. Association for Computational Linguistics. Mohammad, S. and Hirst, G. (2012a). Distributional measures as proxies for semantic relatedness. CoRR, abs/1203.1. Mohammad, S. and Hirst, G. (2012b). Distributional measures of semantic distance: a survey. ArXiv, 1203.1889. 156 BIBLIOGRAPHY Muller, P., Hathout, N., and Gaume, B. (2006). Synonym extraction using a semantic distance on a dictionary. In Proceedings of the First Workshop on Graph Based Methods for Natural Language Processing, pages 65–72. Association for Computational Linguistics. Murphy, G. L. and Medin, D. L. (1985). The role of theories in conceptual coherence. Psychological review, 92(3):289. Nagar, A. and Al-Mubaid, H. (2008). A new path length measure based on GO for gene similarity with evaluation using SGD pathways. In 21st IEEE International Symposium on Computer-Based Medical Systems (CBMS ’08), pages 590–595, Jyväskylä (Finland). IEEE Computer Society. Navigli, R. and Ponzetto, S. P. (2010). BabelNet: building a very large multilingual semantic network. In Proceedings of the 48th annual meeting of the association for computational linguistics, pages 216–225. Association for Computational Linguistics. Navigli, R. and Ponzetto, S. P. (2012). BabelRelate! A joint multilingual approach to computing semantic relatedness. In 26th AAAI Conference on Artificial Intelligence, pages 108–114. Nelson, D. L., McEvoy, C. L., and Schreiber, T. A. (2004). The University of South Florida free association, rhyme, and word fragment norms. Behavior Research Methods, Instruments, & Computers, 36(3):402–407. Nikolova, S., Boyd-Graber, J., and Fellbaum, C. (2012). Collecting semantic similarity ratings to connect concepts in assistive communication tools. In Modeling, Learning, and Processing of Text Technological Data Structures, pages 81–93. Springer. NIST (2012). TREC 2012. In The Twenty-First Text REtrieval Conference. Nitta, Y. (1988). The referential structure of the word definitions in ordinary dictionaries. In Proceedings of lhe Workshop on rite Aspects of Lexicon for Natural Language Processing, LNL88-8, JSSST, pages 1–21. Niwa, Y. and Nitta, Y. (1994). Co-occurrence vectors from corpora vs. distance vectors from dictionaries. In Proceedings of the 15th conference on computational linguistics, volume 1, pages 304–309, Morristown, NJ, USA. Association for Computational Linguistics. Nosofsky, R. M. (1992). Similarity scaling and cognitive process models. Annual review of Psychology, 43(1):25–53. Novick, L. R. (1988). Analogical transfer, problem similarity, and expertise. Journal of Experimental Psychology: Learning, Memory, and Cognition, 14(3):510. Oldakowski, R. and Bizer, C. (2005). SemMF: a framework for calculating semantic similarity of objects represented as RDF graphs. Poster at the 4th International Semantic Web Conference. Olsson, C., Petrov, P., Sherman, J., and Perez-Lopez, A. (2011). Finding and explaining similarities in Linked Data. In Semantic Technology for Intelligence, Defense, and Security (STIDS 2011), pages 52–59. Osgood, C. E. (1952). The nature and measurement of meaning. Psychological Bulletin, 49(3):197–237. Othman, R. M., Deris, S., and Illias, R. M. (2008). A genetic similarity algorithm for searching the Gene Ontology terms and annotating anonymous protein sequences. Journal of biomedical informatics, 41(1):65–81. Oxford Dict., editor (2012). Oxford dictionaries. Oxford University Press, 7 edition. Pakhomov, S., McInnes, B., Adam, T., Liu, Y., Pedersen, T., and Melton, G. B. (2010). Semantic similarity and relatedness between clinical terms: an experimental study. American Medical Informatics Association (AMIA) annual symposium proceedings, pages 572–576. Panchenko, A. (2013). Similarity measures for semantic relation extraction. PhD thesis, Université catholique de Louvain. BIBLIOGRAPHY 157 Panchenko, A. and Morozova, O. (2012). A study of hybrid similarity measures for semantic relation extraction. In Proceedings of the Workshop on Innovative Hybrid Approaches to the Processing of Textual Data, pages 10–18. Association for Computational Linguistics. Pantel, P. and Lin, D. (2002). Discovering word senses from text. In Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 613–619. ACM. Passant, A. (2010). Dbrec - music recommendations using DBpedia. In The Semantic Web - International Semantic Web Conference (ISWC 2010), pages 209–224. Springer. Patwardhan, S. (2003). Incorporating dictionary and corpus information into a context vector measure of semantic relatedness. Master thesis, Minnesota (USA). Patwardhan, S., Banerjee, S., and Pedersen, T. (2003). Using measures of semantic relatedness for word sense disambiguation. In In Proceedings of the Fourth International Conference on Intelligent Text Processing and Computational, pages 241–257. Patwardhan, S. and Pedersen, T. (2006). Using WordNet-based context vectors to estimate the semantic relatedness of concepts. In EACL Workshop Making Sense of Sense - Bringing Computational Linguistics and Psycholinguistics Together, pages 1–8. Paul, R., Groza, T., Zankl, A., and Hunter, J. (2012). Semantic similarity-driven decision support in the skeletal dysplasia domain. In Proceeding of the International Semantic Web Conference (ISWC 2012), pages 164–179. Pedersen, T., Pakhomov, S. V. S., Patwardhan, S., and Chute, C. G. (2007). Measures of semantic similarity and relatedness in the biomedical domain. Journal of biomedical informatics, 40(3):288– 299. Pedersen, T., Patwardhan, S., and Michelizzi, J. (2004). WordNet::Similarity: measuring the relatedness of concepts. In Demonstration Paper at Conference of the North American Chapter of the Association for Computational Linguistics Human Language Technologies (NAACL HLT 2004), pages 38–41, Stroudsburg, PA, USA. Pekar, V. and Staab, S. (2002). Taxonomy learning: factoring the structure of a taxonomy into a semantic classification decision. In Proceedings of the 19th international conference on Computational linguistics (COLING’02 ), volume 2, pages 1–7. Association for Computational Linguistics. Pennington, J., Socher, R., and Manning, C. D. (2014). Glove: global vectors for word representation. In Proceedings of the Empiricial Methods in Natural Language Processing (EMNLP 2014), volume 12, pages 1532–1543. Pesaranghader, A., Rezaei, A., and Pesaranghader, A. (2014). Adapting gloss vector semantic relatedness measure for semantic similarity estimation: an evaluation in the biomedical domain. In Kim, W., Ding, Y., and Kim, H.-G., editors, Semantic Technology Third Joint International Conference (JIST 2013), volume 8388 of Lecture Notes in Computer Science, pages 129–145. Springer International Publishing. Pesquita, C., Faria, D., and Bastos, H. (2007). Evaluating go-based semantic similarity measures. Proceeding of the 10th Annual Bio-Ontologies Meeting, 2007:37–40. Pesquita, C., Faria, D., Bastos, H., Ferreira, A. E. N., Falcão, A. O., and Couto, F. M. (2008). Metrics for GO-based protein semantic similarity: a systematic evaluation. BMC Bioinformatics, 9 Suppl 5:S4. Pesquita, C., Faria, D., Falcão, A. O., Lord, P., and Couto, F. M. (2009a). Semantic similarity in biomedical ontologies. PLoS Computational Biology, 5(7):12. Pesquita, C., Pessoa, D., Faria, D., and Couto, F. M. (2009b). CESSM: collaborative evaluation of semantic similarity measures. In JB2009: Challenges in Bioinformatics. Petrakis, E., Varelas, G., Hliaoutakis, A., and Raftopoulou, P. (2006). X-Similarity: computing semantic similarity between concepts from different ontologies. Journal of Digital Information Management, 4(4):233–237. 158 BIBLIOGRAPHY Pilehvar, M. T., Jurgens, D., and Navigli, R. (2013). Align, disambiguate and walk: a unified approach for measuring semantic similarity. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (ACL 2013), pages 1341–1351. Pirró, G. (2009). A semantic similarity metric combining features and intrinsic information content. Data & Knowledge Engineering, 68(11):1289–1308. Pirró, G. (2012). REWOrD: semantic relatedness in the web of data. In AAAI Conference on Artificial Intelligence. Pirró, G. and Euzenat, J. (2010a). A feature and information theoretic framework for semantic similarity and relatedness. In Proceedings of the 9th International Semantic Web Conference (ISWC 2010), pages 615–630. Springer. Pirró, G. and Euzenat, J. (2010b). A semantic similarity framework exploiting multiple part-of-speech. In Meersman, R., Dillon, T., and Herrero, P., editors, On the Move to Meaningful Internet Systems (OTM 2010), volume 6427 of Lecture Notes in Computer Science, pages 1118–1125. Springer Berlin Heidelberg. Pirró, G. and Seco, N. (2008). Design, implementation and evaluation of a new semantic similarity metric combining features and intrinsic information content. In Meersman, R. and Tari, Z., editors, On the Move to Meaningful Internet Systems (OTM 2008), volume 5332 of Lecture Notes in Computer Science, pages 1271–1288. Springer Berlin Heidelberg. Popescu, M., Keller, J. M., and Mitchell, J. A. (2006). Fuzzy measures on the Gene Ontology for gene product similarity. IEEE ACM Transactions on Computational Biology and Bioinformatics, 3(3):263– 274. Pothos, E. M., Busemeyer, J. R., and Trueblood, J. S. (2013). A quantum geometric model of similarity. Psychological Review, 120(3):679–696. Rada, R., Mili, H., Bicknell, E., and Blettner, M. (1989). Development and application of a metric on semantic nets. IEEE Transactions On Systems Man And Cybernetics, 19(1):17–30. Radinsky, K., Agichtein, E., Gabrilovich, E., and Markovitch, S. (2011). A word at a time: computing word relatedness using temporal semantic analysis. In Proceedings of the 20th international conference on World wide web - WWW ’11, pages 337–346, Hyderabad (India). ACM Press, New York (USA). Ramage, D., Rafferty, A. N., and Manning, C. D. (2009). Random walks for text semantic similarity. In Proceedings of the 2009 Workshop on Graph-based Methods for Natural Language Processing, pages 23–31, Suntec (Singapore). Association for Computational Linguistics. Ranwez, S., Ranwez, V., Villerd, J., and Crampes, M. (2006). Ontological distance measures for information visualisation on conceptual maps. Lecture notes in computer science, 4278/2006(On the Move to Meaningful Internet Systems 2006: OTM 2006 Workshops):1050–1061. Redington, M., Chater, N., and Finch, S. (1998). Distributional information: a powerful cue for acquiring syntactic categories. Cognitive Science, 22(4):425–469. Rehurek, R. and Sojka, P. (2010). Software framework for topic modelling with large corpora. In Proceeding of the Language Resources and Evaluation Conference (LREC 2010) - Workshop on New Challenges for NLP Frameworks, pages 45–50. University of Malta. Reisinger, J. and Mooney, R. J. (2010). Multi-prototype vector-space models of word meaning. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 109–117. Association for Computational Linguistics. Resnik, P. (1995). Using information content to evaluate semantic similarity in a taxonomy. In Proceedings of the 14th International Joint Conference on Artificial Intelligence (IJCAI 1995), volume 1, pages 448–453. Resnik, P. (1999). Semantic similarity in a taxonomy: an information-based measure and its application to problems of ambiguity in natural language. Journal of Artificial Intelligence Research, 11:95–130. BIBLIOGRAPHY 159 Richardson, R., Smeaton, A. F., and Murphy, J. (1994). Using WordNet as a knowledge base for measuring semantic similarity etween Words. Technical report, Dublin City University, School of Computer Applications, Dublin (Ireland). Rissland, E. (2006). AI and Similarity. IEEE Intelligent Systems, 21(3):39–49. Robinson, I., Webber, J., and Eifrem, E. (2013). Graph Databases. O’Reilly. Rodrı́guez, A. and Egenhofer, M. J. (2003). Determining semantic similarity among entity classes from different ontologies. IEEE Transactions on Knowledge and Data Engineering, 15(2):442–456. Rodrı́guez, M. A., Cruz, I., Levashkin, S., and Egenhofer, M. J., editors (2005). GeoSpatial Semantics, volume 3799 of Lecture Notes in Computer Science. Springer Berlin Heidelberg. Rohde, D. L. T., Gonnerman, L. M., and Plaut, D. C. (2006). An improved model of semantic similarity based on lexical co-occurrence. Communications of the ACM, 8:627–633. Ross, B. H. (1987). This is like that: the use of earlier problems and the separation of similarity effects. Journal of Experimental Psychology: Learning, Memory, and Cognition, 13(4):629–639. Ross, B. H. (1989). Distinguishing types of superficial similarities: different effects on the access and use of earlier problems. Journal of Experimental Psychology: Learning, Memory, and Cognition, 15(3):456–468. Rubenstein, H. and Goodenough, J. B. (1965). Contextual correlates of synonymy. Communications of the ACM, 8(10):627–633. Rui-Qin, W. (2012). Measuring of Semantic Relatedness between Words based on Wikipedia Links. International Proceedings of Computer Science & Information Technology, 50. Rus, V., Lintean, M., Banjade, R., Niraula, N., and Dan, S. (2013). SEMILAR: the semantic similarity toolkit. In 51st Annual Meeting of the Association for Computational Linguistics, Sofia (Bulgaria). Russell, S. and Norvig, P. (2009). Artificial Intelligence: a modern approach. Prentice Hall Series In Artificial Intelligence. Prentice Hall, 3 edition. Saerens, M., Fouss, F., Yen, L., and Dupont, P. (2004). The principal components analysis of a graph, and its relationships to spectral clustering. In European Conference on Machine Learning (ECML 2004), pages 371–383. Springer. Saffran, J. R., Aslin, R. N., and Newport, E. L. (1996). Statistical learning by 8-month-old infants. Science, 274(5294):1926–1928. Sahami, M. and Heilman, T. D. (2006). A web-based kernel function for measuring the similarity of short text snippets. In Proceedings of the 15th international conference on World Wide Web, pages 377–386. ACM. Sahlgren, M. (2006). The word-space model. PhD thesis, University of Stockholm (Sweden). Sahlgren, M. (2008). The distributional hypothesis. Italian Journal of Linguistics, 20(1):33–54. Salton, G. and McGill, M. J. (1983). Introduction to modern information retrieval. McGraw - Hill Book Company, New York. Sánchez, D. and Batet, M. (2011). Semantic similarity estimation in the biomedical domain: an ontologybased information-theoretic perspective. Journal of biomedical informatics, 44(5):749–759. Sánchez, D. and Batet, M. (2013). A semantic similarity method based on information content exploiting multiple ontologies. Expert Systems with Applications, 40(4):1393–1399. Sánchez, D., Batet, M., and Isern, D. (2011). Knowledge-Based Systems, 24(2):297–303. Ontology-based information content computation. Sánchez, D., Batet, M., Isern, D., and Valls, A. (2012). Ontology-based semantic similarity: a new feature-based approach. Expert Systems with Applications, 39(9):7718–7728. 160 BIBLIOGRAPHY Sarić, F., Glavaš, G., Karan, M., Šnajder, J., and Bašić, B. D. (2012). Takelab: systems for measuring semantic text similarity. In Proceedings of the First Joint Conference on Lexical and Computational Semantics-Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation, pages 441–448. Association for Computational Linguistics. Sarkar, P., Moore, A. W., and Prakash, A. (2008). Fast incremental proximity search in large graphs. In Proceedings of the 25th international conference on Machine learning (ICML’08), pages 896–903, New York, New York, USA. ACM Press. Saruladha, K. (2011). Information content based semantic similarity for cross ontological concepts. Science And Technology, 3(6):5132–5140. Saruladha, K. and Aghila, G. (2011). COSS : Cross Ontology Semantic Similarity Measure - an information content based approach. In International Conference on Recent Trends in Information Technology (ICRTIT), pages 485–490, Chennai (India). Saruladha, K., Aghila, G., and Bhuvaneswary, A. (2010a). Computation of semantic similarity among cross ontological concepts for biomedical domain. Journal of Computing, 2(8):111–118. Saruladha, K., Aghila, G., and Raj, S. (2010b). A survey of semantic similarity methods for ontology based information retrieval. In Second International Conference on Machine Learning and Computing, pages 297–301. Ieee. Schickel-Zuber, V. and Faltings, B. (2007). OSS : A semantic similarity function based on hierarchical ontologies. In International Joint Conferences on Artificial Intelligence (ICAI 2007), pages 551–556, Hyderabad, India. Schlicker, A., Domingues, F. S., Rahnenführer, J., and Lengauer, T. (2006). A new measure for functional similarity of gene products based on Gene Ontology. BMC Bioinformatics, 7(302). Schütze, H. (1993). Word space. In Advances in Neural Information Processing Systems 5. Morgan Kaufmann Publishers. Schütze, H. (1998). Automatic word sense discrimination. Computational Linguistics, 24(1):97–123. Schütze, H. and Pedersen, J. O. (1997). A cooccurrence-based thesaurus and two applications to information retrieval. Information Processing & Management, 33(3):307–318. Schwartz, H. A. and Gomez, F. (2011). Evaluating semantic metrics on tasks of concept similarity. In Proceedings of the Twenty-Fourth International Florida Artificial Intelligence Research Society Conference, pages 299–304. Schwering, A. (2008). Approaches to semantic similarity measurement for geo-spatial data: a survey. Transactions in GIS (Geographic Information System), 12(1):5–29. Seco, N. (2005). Computational models of similarity in lexical ontologies. Master thesis, University College, Dublin (Ireland). Seco, N., Veale, T., and Hayes, J. (2004). An intrinsic information content metric for semantic similarity in WordNet. In 16th European Conference on Artificial Intelligence (ECAI 2004), pages 1–5. IOS Press. Sen, S., Li, T. J.-J., Team, W., and Hecht, B. (2014). WikiBrain: democratizing computation on Wikipedia. In Proceedings of the International Symposium on Open Collaboration, pages 1–10. ACM. Shannon, C. (1948). A mathematical theory of communication. Bell System Technical Journal, 27(3):379– 423. Sheehan, B., Quigley, A., Gaudin, B., and Dobson, S. (2008). A relation based measure of semantic similarity for Gene Ontology annotations. BMC Bioinformatics, 9. Shen, Y., Zhang, S., and Wong, H.-S. (2010). A new method for measuring the semantic similarity on gene ontology. In IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pages 533–538. IEEE. BIBLIOGRAPHY 161 Shenoy, M., Shet, K. C., Acharya, D., Shenoy K, M., and Dinesh Acharya, U. (2012). A new similarity measure for taxonomy based on edge counting. Computing Research Repository (CoRR), abs/1211.4. Shepard, R. N. (1962). The analysis of proximities: multidimensional scaling with an unknown distance function. Psychometrika, 27(2):125–140. Shepard, R. N. (1987). Toward a universal law of generalization for psychological science. Science, 237(4820):1317–1323. Shvaiko, P. and Euzenat, J. (2013). Ontology matching: state of the art and future challenges. IEEE Transactions on Knowledge and Data Engineering, 25(1):158–176. Singer, P., Niebler, T., Strohmaier, M., and Hotho, A. (2013). Computing semantic relatedness from human navigational paths: a case study on wikipedia. International Journal on Semantic Web and Information Systems (IJSWIS), 9(4):41–70. Singh, J., Saini, M., and Siddiqi, S. (2013). Graph-based computational model for computing semantic similarity. In Emerging Research in Computing, Information, Communication and Applications (ERCICA 2013), pages 501–507. Elsevier. Singhal, A. (2012). Introducing the Knowledge Graph: things, not (http://googleblog.blogspot.fr/2012/05/introducing-knowledge-graph-things-not.html). Google Blog, May. strings Official Slimani, T. (2013). Description and evaluation of semantic similarity measures approaches. International Journal of Computer Applications, 80(10):25–33. Slimani, T., Boutheina, B. Y., and Mellouli, K. (2006). A new similarity measure based on edge counting. In World academy of science, engineering and technology, pages 34–38. Socher, R., Huval, B., Manning, C. D., and Ng, A. Y. (2012). Semantic compositionality through recursive matrix-vector spaces. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, pages 1201–1211. Association for Computational Linguistics. Socher, R., Pennington, J., Huang, E. H., Ng, A. Y., and Manning, C. D. (2011). Semi-supervised recursive autoencoders for predicting sentiment distributions. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, pages 151–161. Association for Computational Linguistics. Solé-Ribalta, A., Sánchez, D., Batet, M., and Serratosa, F. (2014). Towards the estimation of featurebased semantic similarity using multiple ontologies. Knowledge-Based Systems, 55(0):101–113. Spitzer, F. (1964). Principles of random walk. Springer, 2001. Strube, M. and Ponzetto, S. P. (2006). WikiRelate! computing semantic relatedness using Wikipedia. In The Twenty-first National Conference on Artificial Intelligence (AAAI 2006), pages 1419–1424, Boston, MA. Stuckenschmidt, H. (2009). A semantic similarity measure for ontology-based information. In 8th International Conference of Flexible Query Answering Systems, pages 406–417, Roskilde (Denmark). Sussna, M. (1993). Word sense disambiguation using a massive of computer for free-text semantic indexing network. In Proceedings of the Second International Conference on Information and Knowledge Management (CIKM 1993), Arlington, Virginia. ACM. Sy, M.-F., Ranwez, S., Montmain, J., Regnault, A., Crampes, M., and Ranwez, V. (2012). User centered and ontology based information retrieval system for life sciences. BMC bioinformatics, 13:S4. Taieb, M. A. H., Aouicha, M. B., and Hamadou, A. B. (2013). Computing semantic relatedness using Wikipedia features. Knowledge-Based Systems, 50:260–278. Takenobu, T., Makoto, I., and Hozumi, T. (1995). Automatic thesaurus construction based on grammatical relations. In International Joint Conference on Artificial Intelligence (IJCAI 1995), volume 14, pages 1308–1313. Lawrence Erlbaum Associates LTD. 162 BIBLIOGRAPHY Tenenbaum, J. B. and Griffiths, T. L. (2001). Generalization, similarity, and Bayesian inference. Behavioral and brain sciences, 24(4):629–640. Teng, Z., Guo, M., Liu, X., Dai, Q., Wang, C., and Xuan, P. (2013). Measuring gene functional similarity based on groupwise comparison of GO terms. Bioinformatics (Oxford, England), 29(11):1424–1432. Terra, E. and Clarke, C. L. A. (2003). Frequency estimates for statistical word similarity measures. In Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology - NAACL’03, volume 1, pages 165–172, Morristown, NJ, USA. Association for Computational Linguistics. Thomas, P. D., Wood, V., Mungall, C. J., Lewis, S. E., and Blake, J. A. (2012). On the use of Gene Ontology annotations to assess functional similarity among orthologs and paralogs: a short report. PLoS computational biology, 8(2):e1002386. Tomasik, B. and Sutherland, D. (2008). An efficient Python module for lexical distributional similarity. Technical report, Swarthmore College, Department of Computer Science, Swarthmore, PA. Turdakov, D. and Velikhov, P. (2008). Semantic relatedness metric for wikipedia concepts based on link analysis and its application to word sense disambiguation. In Colloquium on Databases and Information Systems (SYRCoDIS). Turney, P. (2001). Mining the web for synonyms: PMI-IR versus LSA on TOEFL. In Proceedings of the Twelfth European Conference on Machine Learning (ECML 2001), pages 491–502, Freiburg, Germany. Springer Berlin Heidelberg. Turney, P. (2006). Similarity of semantic relations. Computational Linguistics, 32(3):379–416. Turney, P. (2012). Domain and function: a dual-space model of semantic relations and compositions. Journal of Artificial Intelligence Research, 44:533–585. Turney, P. and Littman, M. (2003). Measuring praise and criticism: Inference of semantic orientation from association. In ACM Transactions on Information Systems, pages 315–346. Turney, P., Littman, M., Bigham, J., and Shnayder, V. (2003). Combining independent modules to solve multiple-choice synonym and analogy problems. In Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP-03), pages 482–489, Borovets, Bulgaria. Turney, P. and Pantel, P. (2010). From frequency to meaning: vector space models of semantics. Journal of artificial intelligence research, 37(1):141–188. Tversky, A. (1977). Features of similarity. Psychological Review, 84(4):327–352. Tversky, A. (2004). Preference, belief, and similarity: selected writings. MIT Press. Tversky, A. and Gati, I. (1982). Similarity, separability, and the triangle inequality. Psychological review, 89(2):123. Tversky, A. and Itamar, G. (1978). Studies of similarity. In Rosh, E. and Lloyd, B., editors, Cognition and categorization, pages 79–98. Lawrence Erlbaum, Hillsdale, NJ. Valtchev, P. (1999a). Building classes in object-based languages by automatic clustering. In Advances in Intelligent Data Analysis, pages 303–314. Springer. Valtchev, P. (1999b). Construction automatique de taxonomies pour l’aide à la représentation de connaissances par objets. PhD thesis, Joseph Fourier - Grenoble 1. Valtchev, P. and Euzenat, J. (1997). Dissimilarity measure for collections of objects and values. In Advances in Intelligent Data Analysis Reasoning about Data, pages 259–272. Springer. Van Der Plas, L. and Bouma, G. (2004). Syntactic contexts for finding semantically related words. In van der Wouden, T., Poß, M., Reckman, H., and Cremers, C., editors, Meeting of Computational Linguistics in the Netherlands (CLIN’04). BIBLIOGRAPHY 163 Varelas, G., Voutsakis, E., Raftopoulou, P., Petrakis, E., and Milios, E. E. (2005). Semantic similarity methods in wordNet and their application to information retrieval on the web. Proceedings of the seventh ACM international workshop on Web information and data management - WIDM’05, pages 10–16. Volz, J., Bizer, C., Gaedke, M., and Kobilarov, G. (2009). Silk - A link discovery framework for the web of data. In Proceedings of the 2nd Linked Data on the Web Workshop, pages 1–6, Madrid (Spain). von Luxburg, U., Radl, A., and Hein, M. (2011). Hitting and commute times in large graphs are often misleading. ArXiv, 1003.1266. Voorhees, E. and Harman, D. K. (2005). TREC: Experiment and evaluation in information retrieval, volume 63. MIT press Cambridge. Vosniadou, S. and Ortony, A. (1989). Similarity and analogical reasoning. Cambridge University Press. Wang, C., Kalyanpur, A., Fan, J., Boguraev, B. K., and Gondek, D. C. (2012a). Relation extraction and scoring in DeepQA. IBM Journal of Research and Development, 56(3.4):1–9. Wang, J., Xie, D., Lin, H., Yang, Z., and Zhang, Y. (2012b). Filtering Gene Ontology semantic similarity for identifying protein complexes in large protein interaction networks. Proteome Science, 10(Suppl 1):S18. Wang, J. Z., Du, Z., Payattakool, R., Yu, P. S., and Chen, C.-F. (2007). A new method to measure the semantic similarity of GO terms. Bioinformatics (Oxford, England), 23(10):1274–1281. Wang, T. and Hirst, G. (2011). Refining the notions of depth and density in WordNet-based semantic similarity measures. Computational Linguistics, pages 1003–1011. Washington, N. L., Haendel, M. A., Mungall, C. J., Ashburner, M., Westerfield, M., and Lewis, S. E. (2009). Linking human diseases to animal models using ontology-based phenotype annotation. PLoS biology, 7(11):e1000247. Watanabe, S. and Donovan, S. K. (1969). Knowing and guessing: a quantitative study of inference and information. Wiley New York. Weaver, W. (1955). Translation. Machine translation of languages, 14:15–23. Weeds, J. E. (2003). Measures and applications of lexical distributional similarity. PhD thesis, University of Sussex. West, R., Pineau, J., and Precup, D. (2009). Wikispeedia: an online game for inferring semantic distances between concepts. In Proceedings of the 21st International Joint Conference on Artificial Intelligence (IJCAI 2009), pages 1598–1603, Pasadena, California (USA). Whetzel, P. L., Noy, N. F., Shah, N. H., Alexander, P. R., Nyulas, C., Tudorache, T., and Musen, M. A. (2011). BioPortal: enhanced functionality via new Web services from the National Center for Biomedical Ontology to access and use ontologies in software applications. Nucleic Acids Research, 39(Web Server issue):541–545. Widdows, D. (2008). Semantic vector products: some initial investigations. In Second AAAI Symposium on Quantum Interaction, volume 26, page 28th. Wittgenstein, L. (2010). Philosophical investigations. John Wiley & Sons, revised fo edition. Wu, W., Li, H., Wang, H., and Zhu, K. Q. (2012). Probase: a probabilistic taxonomy for text understanding. In Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data, pages 481–492. ACM. Wu, X., Zhu, L., Guo, J., Zhang, D.-Y., and Lin, K. (2006). Prediction of yeast protein-protein interaction network: insights from the Gene Ontology and annotations. Nucleic acids research, 34(7):2137–2150. Wu, Z. and Palmer, M. (1994). Verb semantics and lexical selection. In 32nd Annual Meeting of the Association for Computational Linguistics (ACL 1994), pages 133–138. 164 BIBLIOGRAPHY Wubben, S. (2008). Using free link structure to calculate semantic relatedness. Master thesis, Tilburg University Faculty of Humanities (Netherlands). Wubben, S. and van den Bosch, A. (2009). A semantic relatedness metric based on free link structure. In Proceedings of the Eighth International Conference on Computational Semantics, pages 355–358. Association for Computational Linguistics. Xiao, H. and Cruz, I. (2005). A multi-ontology approach for personal information management. In proceedings of the Semantic Desktop Workshop at the International Semantic Web Conference (ISWC 2005), Galway (Ireland). Xu, T., Du, L., and Zhou, Y. (2008). Evaluation of GO-based functional similarity measures using S. cerevisiae protein interaction and expression profile data. BMC Bioinformatics, 9(1):472. Xu, T., Gu, J., Zhou, Y., and Du, L. (2009). Improving detection of differentially expressed gene sets by applying cluster enrichment analysis to Gene Ontology. BMC Bioinformatics, 10(1):240. Yang, D. and Powers, D. M. W. (2006). Verb similarity on the taxonomy of WordNet. In Proceedings of the 3rd International WordNet Conference (GWC-06), pages 121–128, Jeju Island (Korea). Yang, H., Nepusz, T., and Paccanaro, A. (2012). Improving GO semantic similarity measures by exploring the ontology beneath the terms and modelling uncertainty. Bioinformatics (Oxford, England), 28(10):1383–1389. Yazdani, M. and Popescu-Belis, A. (2011). Using a Wikipedia-based semantic relatedness measure for document clustering. In Proceedings of TextGraphs-6: Graph-based Methods for Natural Language Processing, pages 29–36. Association for Computational Linguistics. Yazdani, M. and Popescu-Belis, A. (2013). Computing text semantic relatedness using the contents and links of a hypertext encyclopedia. Artificial Intelligence, 194:176–202. Yeh, E., Ramage, D., Manning, C. D., Agirre, E., and Soroa, A. (2009). WikiWalk: random walks on Wikipedia for semantic relatedness. In Proceedings of the 2009 Workshop on Graph-based Methods for Natural Language Processing, pages 41–49. Association for Computational Linguistics. Yih, W.-t., Zweig, G., and Platt, J. C. (2012). Polarity inducing latent semantic analysis. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, pages 1212–1222. Association for Computational Linguistics. Yoshida, S., Yukawa, T., and Kuwabara, K. (2003). Constructing and Examining Personalized Cooccurrence-based Thesauri on Web Pages. In The Twelfth International World Wide Web Conference (WWW 2003) (Posters). Young Whan, K. and Kim, J. H. (1990). A model of knowledge based information retrieval with hierarchical concept graphs. Journal of documentation, 46(2):113–136. Yu, G., Pei, Y.-j., Zhu, Z.-y., and Chen, H.-y. (2006). Research of text similarity based on word similarity computing. Computer Engineering and Design, 2:67–70. Yu, H., Gao, L., Tu, K., and Guo, Z. (2005). Broadly predicting specific gene functions with expression similarity and taxonomy similarity. Gene, 352:75–81. Yu, H., Jansen, R., and Gerstein, M. (2007a). Developing a similarity measure in biological function space. Bioinformatics, online:1–18. Yu, H., Jansen, R., Stolovitzky, G., and Gerstein, M. (2007b). Total ancestry measure: quantifying the similarity in tree-like classification, with genomic applications. Bioinformatics (Oxford, England), 23(16):2163–2173. Yu, X. (2010). Mathematical and experimental investigation of ontological similarity measures and their use in biomedical domains. Master thesis, Miami University. Zesch, T. and Gurevych, I. (2006). Automatically creating datasets for measures of semantic relatedness. In Proceedings of the Workshop on Linguistic Distances, pages 16–24. Association for Computational Linguistics. BIBLIOGRAPHY 165 Zesch, T., Müller, C., and Gurevych, I. (2008). Using wiktionary for computing semantic relatedness. In Proceedings of AAAI, pages 861–866. AAAI Press. Zhila, A., Yih, W.-t., Meek, C., Zweig, G., and Mikolov, T. (2013). Combining heterogeneous models for measuring relational similarity. In HLT-NAACL, pages 1000–1009. Zhong, J., Zhu, H., Li, J., and Yu, Y. (2002). Conceptual graph matching for semantic search. In ICCS’02 Proceedings of the 10th International Conference on Conceptual Structures: Integration and Interfaces, pages 92–196. Springer-Verlag. Zhou, Z., Wang, Y., and Gu, J. (2008). A new model of information content for semantic similarity in WordNet. In FGCNS’08 Proceedings of the 2008 Second International Conference on Future Generation Communication and Networking Symposia - Volume 03, pages 85–89. IEEE Computer Society. Ziegler, C.-N., Simon, K., and Lausen, G. (2012). Automatic computation of semantic proximity using taxonomic knowledge. In Mining for Strategic Competitive Intelligence, volume 406 of Studies in Computational Intelligence, pages 167–187. Springer Berlin Heidelberg. 166 BIBLIOGRAPHY Author’s Biography Sébastien Harispe Sébastien Harispe holds a Master and a PhD in Computer Science from the University of Montpellier II (France). His research focuses on Artificial Intelligence and more particularly on the diversity of methods which can be used to support decision making from text and knowledge base analysis, e.g. Information Extraction and Knowledge inference. Sébastien Harispe proposed several theoretical and practical contributions related to semantic measures. He dedicated his thesis to an in-depth analysis of knowledge-based semantic similarity measures from which he proposed a unifying theoretical framework for these measures. He is also the project leader and main developer of the Semantic Measures Library project, a project dedicated to the development of open-source software solutions for semantic measures computation and analysis. Sylvie Ranwez Sylvie Ranwez is an Associate Professor in the LGI2P Research Center of the engineering school Ecole des Mines d’Alès, in France. Since 2000, she has been interested in the research endeavor of one part of the Artificial Intelligence, i.e. Knowledge engineering. Her research is dedicated to ontologies used as a guideline in conceptual annotation process and information retrieval systems, navigation over numerous resources and visualization. Since semantic measures underlie all of these processes, she also directs research in this domain. She holds a PhD (2000) and a habilitation (2013) in Computer Science (University of Montpellier 2, France). Stefan Janaqi Stefan Janaqi is a research member of the LGI2P Research Center team of the Ecole des Mines d’Alès (France). He holds a PhD in Computer Science from University Joseph Fourier, Grenoble (France), dealing with geometric properties of graphs. His research focuses on mathematical models for optimization, image treatment, evolutionary algorithms and convexity in discrete structures such as graphs. Jacky Montmain Jacky Montmain received the Master’s degree from the Ecole Nationale Supérieure d’Ingénieurs Electriciens de Grenoble, Grenoble, France, in 1987 and the PhD degree from the National Polytechnic Institute, France, in 1992, both in control theory. He was a research engineer at the French Atomic Energy Commission from 1991 to 2005 where he was appointed as Senior Expert in the field ”Mathematics, Computer Sciences, Software and System Technologies” in 2003. He is currently a Professor at the Ecole des Mines d’Alès, Nı̂mes, France. His research interests include the application of artificial intelligence techniques to model-based diagnosis and supervision, industrial performance improvement, multicriteria and fuzzy approaches to decision-making. 167
2cs.AI
”This work has been submitted to IEEE PIMRC 2017 conference for possible publication. Copyright may be transferred without prior notice, after which this version may no longer be accessible” arXiv:1705.09098v1 [cs.IT] 25 May 2017 Performance Optimization of Co-Existing Underlay Secondary Networks Pratik Chakraborty Shankar Prakriya Bharti School of Telecom. Technology and Management Indian Institute of Technology Delhi New Delhi-110016, India Email: [email protected] Department of Electrical Engineering and Bharti School of Telecom. Technology and Management Indian Institute of Technology Delhi New Delhi-110016, India Email: [email protected] Abstract—In this paper, we analyze the throughput performance of two co-existing downlink multiuser underlay secondary networks that use fixed-rate transmissions. We assume that the interference temperature limit (ITL) is apportioned to accommodate two concurrent transmissions using an interference temperature apportioning parameter so as to ensure that the overall interference to the primary receiver does not exceed the ITL. Using the derived analytical expressions for throughput, when there is only one secondary user in each network, or when the secondary networks do not employ opportunistic user selection (use round robin scheduling for example), there exists a critical fixed-rate below which sum throughput with co-existing secondary networks is higher than the throughput with a single secondary network. We derive an expression for this critical fixedrate. Below this critical rate, we show that careful apportioning of the ITL is critical to maximizing sum throughput of the coexisting networks. We derive an expression for this apportioning parameter. Throughput is seen to increase with increase in number of users in each of the secondary networks. Computer simulations demonstrate accuracy of the derived expressions. I. I NTRODUCTION A rapid increase in wireless devices and services in the past decade or so has led to a demand for very high data rates over the wireless medium. With such prolific increase in data traffic, mitigating spectrum scarcity and more efficient utilization of under-utilized spectrum has drawn attention of researchers both in academia and in the industry. Cognitive radios (CR) are devices that have shown promise in alleviating these problems of spectrum scarcity and low spectrum utilization efficiencies. In underlay mode of operation of cognitive radios, both secondary (unlicensed) and primary (licensed) users co-exist and transmit in parallel such that the total secondary interference caused to the primary user is below a predetermined threshold [1] referred to as the interference temperature limit (ITL). This ensures that primary performance in terms of throughput or outage is maintained at a desired level. Most of the analysis to date in underlay CR literature is confined to one secondary node transmitting with full permissible power and catering to its own set of receivers, while maintaining service quality of the primary network. For such secondary networks, performance improvement is achieved by exploiting diversity techniques [2], [3], resource allocation [4], increasing the number of hops [5], etc. Cognitive radios have attracted research interest due to the possibility of great increase in spectrum utilization efficiency. Researchers have proposed the idea of concurrent secondary transmissions to further increase throughput (and therefore spectrum utilization efficiency), where two or more cognitive femtocells reuse the spectrum of a macrocell either in a overlay, interweave or underlay manner [6]. By deploying femtocells, operators can reduce the traffic on macro base stations and also improve data quality among femtocell mobile stations due to short range communication. To implement such an underlay scheme, the major hindrance is mitigation of interferences among inter-femtocell users and careful handling of interferences from femtocell transmitters to the users of the macro cell [7]. A comprehensive survey of such heterogeneous networks, their implementation and future goals can be found in [8] (and references therein). In this paper, we consider two co-existing downlink multiuser underlay networks. We show that throughput with two co-existing secondary networks is larger than with one secondary network in some situations. Since throughput performance is ensured, this implies the possibility of increase in spectrum utilization efficiency. The main contributions of our paper are as follows: 1) Unlike other works on co-existing secondary networks that focus on optimization [9] and game theoretic approaches [10], we present an analytical closed form sum throughput expression for two co-existing secondary multiuser downlink networks using fixed-rate transmissions by the secondary nodes. 2) We evaluate analytically the maximum secondary fixed rate by sources that yields higher throughput with concurrent transmissions in two co-existing secondary networks. Beyond this rate, switching to a single secondary transmission is better. 3) We propose an optimal ITL apportioning parameter to further improve the sum throughput performance when two secondary sources transmit at the same time. 4) We show that sum throughput improves with user selection in individual secondary networks. The derived expressions and insights are a useful aid to system designers. II. S YSTEM M ODEL AND P ROBLEM F ORMULATION We consider two cognitive underlay downlink networks1, where two secondary transmitters S1 and S2 transmit symbols concurrently in the range of a primary network by selecting their best receivers R1i∗ (among R1i receivers, i ∈ [1, L]) and R2i∗ (among R2i receivers, i ∈ [1, M ]) respectively, from their cluster of users (Fig. 1). We assume that the two secondary networks are located relatively far apart so that the same frequency can be reused by S1 and S2 concurrently. We ensure that the total secondary interference caused to the primary receiver RP is below ITL by careful apportioning of power between S1 and S2 . All channels are assumed to be indepenWƌŝŵĂƌLJZĞĐĞŝǀĞƌZ ^ŝŐŶĂůůŝŶŬƐ /ŶƚĞƌĨĞƌĞŶĐĞůŝŶŬƐ >^ĞĐŽŶĚĂƌLJZĞĐĞŝǀĞƌƐ ŐϭW ŐϮW D ^ĞĐŽŶĚĂƌLJZĞĐĞŝǀĞƌƐ ^ϭ Ś ϭi Ő ϭi Zi ůƵƐƚĞƌϭ Z ŚϮi ŐϮi ^Ϯ ůƵƐƚĞƌϮ Fig. 1: System model of co-existing underlay cognitive radio network dent, and of quasi-static Rayleigh fading type. The channels between S1 and R1i are denoted by h1i ∼ CN (0, 1/λ11 ), i ∈ [1, L]. The channels between S2 and R2i are denoted by h2i ∼ CN (0, 1/λ22 ), i ∈ [1, M ]. Due to concurrent secondary transmissions, each transmitter interferes with the receivers of the other cluster. The interference channels between S1 and R2i are denoted by g1i ∼ CN (0, 1/µ12 ), i ∈ [1, M ], with g1i∗ being the channel to the intended receiver R2i∗ . The interference channels between S2 and R1i are denoted by g2i ∼ CN (0, 1/µ21), i ∈ [1, L], with g2i∗ being the channel to the intended receiver R1i∗ . The channels to RP from S1 and S2 are denoted by g1P ∼ CN (0, 1/µ1P ) and g2P ∼ CN (0, 1/µ2P ) respectively. We neglect primary interference at the secondary nodes assuming the primary transmitter to be located far away from the secondary receivers, which is a common assumption in CR literature, and well justified on information theoretic grounds [11], [12]. Zero-mean additive white Gaussian noise of variance σn2 is assumed at all terminals. As in all underlay networks, it is assumed that S1 and S2 1 Although primary and secondary networks are often assumed to be licensed and unlicensed users respectively, this need not always be the case. They can indeed be users of the same network transmitting concurrently to increase spectrum utilization efficiency. The same logic extends to two coexisting secondary networks. This eliminates most of the difficulties associated with interference channel estimation, security, etc. can estimate |g1P |2 and |g2P |2 respectively by observing the primary reverse channel, or using pilots transmitted by RP . In every signaling interval, S1 transmits unit energy symbols x with power PS1 = αIP /|g1P |2 and S2 transmits unit energy symbols z with power PS2 = (1 − α)IP /|g2P |2 , where IP denotes the ITL, and 0 < α < 1 denotes the power allocation parameter which apportions IP between S1 and S2 respectively. We use peak interference type of power control at S1 and S2 instead of limiting the transmit powers with a peak power due to the following reasons: 1) It is well known that the performance of CR networks exhibits an outage floor after a certain peak power and does not improve beyond a point when transmit powers are limited by interference constraints. 2) Since sufficient peak power is typically available, this assumption is quite reasonable. It is in this regime where cognitive radios are expected to operate. Such an assumption is also common in prior underlay CR literature [13], [14], [15]. 3) It keeps the analysis tractable, leading to precise performance expressions that offer useful insights. It also allows us to derive expressions for important parameters of practical interest in the normal range of operation of secondary networks, and can yield insights of interest to system designers. The received signals (yR1i and yR2i ) at R1i and R2i can be written as follows: s s αIP (1 − α)IP h1i x + g2i z + nR1i , i ∈ [1, L] yR1i = 2 |g1P | |g2P |2 s s (1 − α)IP αIP yR2i = h2i z + g1i x + nR2i , i ∈ [1, M ], |g2P |2 |g1P |2 (1) where nR1i , nR2i ∼ CN (0, σn2 ) are additive white Gaussian noise samples at R1i and R2i respectively. When transmitters S1 and S2 select the receivers R1i∗ and R2i∗ with strongest link to them in their individual cluster, the instantaneous signal-to-interference-plus-noise ratios (SINRs) Γ1 and Γ2 at R1i∗ and R2i∗ can be written as follows: Γ1 = max [|h1i |2 ] i∈[1,L] αIP |g1P |2 |g2i∗ |2 (1 − α)IP |g2P |2 + σn2 max [|h2i |2 ] Γ2 = (1 i∈[1,M] − α)IP |g2P |2 |g1i∗ |2 αIP |g1P |2 + σn2 . (2) We note that the random variables |hij |2 and |gij |2 in (2) follow the exponential distribution with mean values 1/λii and 1/µij respectively. In the following section, we derive sum throughput expression for this co-existing secondary network. It gives a measure of spectrum utilization with or without concurrent transmissions by sources in co-existing secondary networks. III. S UM T HROUGHPUT OF THE S ECONDARY N ETWORK FOR F IXED R ATE T RANSMISSION S CHEME When secondary nodes transmit with a fixed rate R, the sum throughput τsum is given by: τsum = (1 − pout1 )R + (1 − pout2 )R, (3) where pout1 and pout2 are outage probabilities of the two secondary user pairs S1 -R1i∗ and S2 -R2i∗ respectively. Due to the identical nature of SINR-s of Γ1 and Γ2 , pout2 in (6) can be derived in the same manner as pout1 , whose final closed form expression is shown as follows:   M  X 1 M k+1 pout2 = 1 − (−1) 2 λ kγth σn 22 k 1 + µ2P (1−α)I k=1 P    2 λ22 kγth σn 1+ µ (1−α)I µ1P λ22 α 2P P ln )γ k( µ1P λ22 α µ2P µ12 1−α th µ2P µ12 k( 1−α )γth − 2 λ kγth σn α 1P λ22 2 − µµ2P [1 + µ2P22(1−α)I µ12 k( 1−α )γth ] P  µ1P λ22   α µ2P µ12 k( 1−α )γth + −1 . (7) 2 λ kγth σn 1 + µ2P22(1−α)I P IV. O PTIMAL P OWER A LLOCATION AND C RITICAL TARGET R ATE A. Derivation of pout1 : The outage probability pout1 is defined as follows: pout1 = Pr{Γ1 < γth }, where γth = 2R − 1. For notational convenience, we define random variable X = max [|h1i |2 ]. Clearly, it has cumulative i∈[1,L] distribution function (CDF) FX (x) = (1 − eλ11 x )L . Thus, pout1 can be rewritten and evaluated as under:     1−α |g1P |2 γth σn2 2 2 pout1 = Pr X< γth |g2i∗ | + |g1P | α |g2P |2 αIP L   2 γth σn |g1P |2 |g2i∗ |2 + αI |g1P |2 } −λ11 {( 1−α α )γth |g |2 P 2P =E 1−e  L   X L (−1)j+1 =E 1− j j=1 e Our objective is to find the optimum α (denoted by α∗ ) that maximizes τsum . From (3), it is clear that α∗ = arg max(τsum ). In normal mode of operation, the interference α channel variances are small (µ1P and µ2P are large) so that λ11 << µ1P IP and λ22 << µ2P IP . Hence, the terms 2 2 λ11 jγth σn λ kγth σn and µ2P22(1−α)I in (5) and (7) respectively are µ1P αIP P small quantities for practical values of target rates and can be ignored. (Computing α∗ for high target rates is not required, as would become apparent in subsequent discussions.) Thus pout1 2P λ11 1−α and pout2 reduce to the following form with x = µµ1P µ21 ( α ) µ1P λ22 α and y = µ2P µ12 ( 1−α ): L   X (γth xj − ln(γth xj) − 1) L (−1)j+1 γth xj , j (1 − γth xj)2 j=1  M  X (γth yk − ln(γth yk) − 1) M . ≈ (−1)k+1 γth yk (1 − γth yk)2 k pout1 ≈ |g |2 1P −λ11 j{( 1−α |g2i∗ |2 + α )γth |g |2 2P 2 γth σn αIP |g1P |2 }  , (4) pout2 k=1 where E[.] denotes the expectation over random variables |g1P |2 , |g2P |2 and |g2i∗ |2 . We evaluate pout1 by successive averaging over random variables |g2i∗ |2 , |g2P |2 and |g1P |2 using standard integrals [16, eq.(3.353.5)] and [17, eq.(4.2.17)]. A final closed form expression for pout1 can be derived as follows (details omitted due to space limitations):  L   X 1 L (−1)j+1 pout1 = 1 − 2 λ jγth σn 11 j 1 + µ1P αI j=1 P    2 λ11 jγth σn 1+ µ µ2P λ11 1−α 1P αIP µ2P λ11 1−α µ1P µ21 j( α )γth ln µ1P µ21 j( α )γth − 2 λ jγth σn 1−α 2P λ11 2 − µµ1P [1 + µ111P αI µ21 j( α )γth ] P  µ2P λ11 1−α   µ µ j( α )γth + 1P 21λ jγ σ2 −1 . (5) th n 1 + µ111P αI P B. Derivation of pout2 : (8) Using the first order rational approximation for logarithm [18] ln(z) ≈ 2(z−1) (z+1) in (8), which is close to (or follows) the logarithm function for a large range of z (and also used z . Hence, ≈ z+1 in underlay literature [15]), z (z−ln(z)−1) (1−z)2 pouti , i ∈ {1, 2} in (8) can further be approximated as: L   X 1 L (−1)j+1 pout1 ≈ 1 − , j γ xj +1 th j=1  M  X 1 M . (9) pout2 ≈ 1 − (−1)k+1 γth yk + 1 k k=1 Obtaining α∗ for general L and M is mathematically tedious, and can be evaluated offline by numerical search2 . However, we present a closed form α∗ for the special case when L = M = 1. By taking the first derivative of τsum with respect to α using pout1 and pout2 in (9), and equating it to zero, a The outage probability pout2 is defined as follows: pout2 = Pr{Γ2 < γth }. (6) 2 We note that there is no dependence on instantaneous channel estimates. closed form α∗ can be obtained3 with the root in [0,1] being: 1+ µ1P µ2P λ22 µ21 λ11 µ12 . When R < Rc , τsum is concave with respect to α and concurrent transmission offers higher throughput. When R > Rc , switching to single secondary transmission is optimal, as τsum is convex with respect to α. For a generalized L and M users, Rc and α∗ can be evaluated by an offline numerical search2 . For larger L and M (multiple secondary users in each network), when a round robin scheduling scheme is used, the channel characteristics are exponential (same as when L = M = 1), and (10) and (11) are valid for α∗ and Rc . We emphasize that Rc and α∗ both depend only on statistical channel parameters and do not require real-time computation. V. S IMULATION R ESULTS In this section, we present simulation results to validate the derived expressions and bring out useful insights. We assume E[|hij |2 ] ∝ d−φ ii , dii being the normalized distance between the transmitter and intended receiver in cluster i, where i ∈ −φ {1, 2} and j ∈ {L, M }. Again, E[|gij |2 ] ∝ rij is assumed, where rij is the normalized distance between the transmitter of cluster i to the receiver of cluster j, where, i ∈ {1, 2} and j ∈ {L, M, P }. The pass-loss exponent is denoted by φ (assumed to be 3 in this paper). In Fig. 2 we plot τsum vs α for different target rates. The system parameters chosen are as follows: d11 = 2 units, d22 = 1 unit, r1P = r2P = 3 units, r12 = 4 units, r21 = 3 units. L = M = 1 and IP = 20dB is assumed. When target rates are below Rc = 3.9724 (as calculated from (11)), there is an improvement in sum throughput of the order of 1 bpcu when optimum α is chosen using concurrent transmission. If R exceeds Rc , switching to single secondary network is best. This happens because with high target rates, both user pairs suffer link outages, and mutual interferences further degrades performance. Switching to a single network not only improves transmit power, but also nullifies the interference from the other network, which cumulatively improve outage and throughput performance. In Fig. 3 we plot τsum vs α assuming L = M = 1 for varying channel parameters, target rates and ITL to show that α∗ as evaluated in (10) gives a fairly accurate and robust measure of optimal ITL apportioning between S1 and S2 , and will present a detailed proof in the extended version of this paper. simulations analysis R=5 (10) By taking the second derivative of τsum with respect to α, and upon substitution of α∗ from (10), an expression is obtained, which can either be positive or negative depending on the value of γth (details are omitted due to space constraints). By equating the expression to zero and solving for γth (or equivalently for R), a closed form expression of critical target rate R = Rc (for L = M = 1) can be obtained3 as:   r µ12 µ21 . (11) Rc ≈ log2 1 + λ11 λ22 3 We 5 4 R = Rc = 3.9724 3 τsum α ≈ 1 q R=2 2 R=1 1 α∗ = 0.8132 0 0 0.2 0.4 α 0.6 0.8 1 Fig. 2: τsum vs α for R = 1, 2, Rc , 5. 3 simulations analysis 2.5 2 τsum ∗ 1.5 1 α∗ = 0.9117 α∗ = 0.1058 0.5 0 0.2 0.4 α 0.6 0.8 1 Fig. 3: τsum vs α with optimum power allocation for different channel parameters, target rates and ITL improves sum throughput performance. The system parameters chosen for the first plot are as follows: d11 = 1 unit, d22 = 2 units, r1P = 4 units, r2P = 3 units, r12 = 3 units, r21 = 3.5 units and IP is chosen as 10dB. R = 1 is assumed to ensure that R < Rc = 3.7037 (so that concurrent transmission is advantageous). α∗ = 0.1058 is obtained from (10). In the second plot, we assume the following parameters: d11 = 2 unit, d22 = 1 units, r1P = 3 units, r2P = 4 units, r12 = 4 units, r21 = 3 units and IP is chosen as 25dB. R = 2 is assumed to ensure that R < Rc = 3.9724 (so that concurrent transmission is advantageous). α∗ = 0.9117 is obtained from (10). We note, for symmetric channel conditions, ie λ11 = λ22 , µ12 = µ21 and µ1P = µ2P , α∗ = 0.5, implying equal resource allocation between S1 and S2 . In addition we have the following observations: 1) α decreases when the ratio µ1P µ2P increases, or when S2 is closer to the primary than S1 . This implies throughput can be maximized if more power is allocated to S2 (thereby improving its outage), as S1 has a 8 interference temperature apportioning, can increase throughput performance. 7 VII. ACKNOWLEDGMENT 6 This work was supported by Information Technology Research Academy through sponsored project ITRA/15(63)/Mobile/MBSSCRN/01. The authors thank Dr. Chinmoy Kundu for his inputs on this work. τsum 5 4 R EFERENCES L = M = 1, 3, 5, 7, 10 3 2 simulations analysis 1 0 0 2 4 R 6 8 10 Fig. 4: τsum vs R with L = M = 1, 3, 5, 7, 10. weaker channel to primary (has more available power) and can meet its outage requirement with less transmit power. 2) . In other words, when S1 α decreases with increase in λλ22 11 R1i∗ channel is better than S2 -R2i∗ , S1 is able to meet its outage requirement with less power, and more power needs to be allocated to S2 to improve performance. 3) α decreases 21 with the ratio µµ12 , or when the channel between S1 to R2i∗ is better than the channel between S2 to R1i∗ . Thus, allocating more power to S2 causes less interference to users of S1 , which improves the overall throughput. In Fig. 4, we plot τsum in (3) vs R and show the effect of number of users in the two networks on sum throughput performance with concurrent transmissions. We choose parameters as follows: d11 = d22 = 1 unit, r1P = r2P = 3 units and r12 = r21 = 3 units. α = 0.5 and IP = 20dB is chosen. Clearly, τsum increases with L and M . From (11), it is also clear that Rc increases with user selection (this Rc refers to a network having generalized L and M users, which is not derived in this paper. However, intuitively it is clear that user selection statistically improves the main channels, thereby increasing Rc as in (11)), which causes a rightward shift of the peaks of τsum . As also evident from earlier discussions, τsum first increases and then decreases after a certain critical rate as both S1 -R1i∗ and S2 -R2i∗ links start to suffer from outages, thereby decreasing the overall throughput performance with concurrent transmissions. VI. C ONCLUSION In this paper we analyze the sum throughput performance of two co-existing underlay multiuser secondary downlink networks utilizing fixed-rate transmissions. In the single user scenario, or in a multiuser scenario without opportunistic user selection, we establish that there exists a fixed critical rate beyond which co-existing secondary networks results in lower throughput. During concurrent secondary transmissions, we establish that user selection as well as judicious [1] L. B. Le and E. Hossain, “Resource allocation for spectrum underlay in cognitive radio networks,” IEEE Trans. Wireless Commun., vol. 7, no. 12, pp. 5306–5315, Dec. 2008. [2] J. Lee, H. Wang, J. G. Andrews, and D. Hong, “Outage probability of cognitive relay networks with interference constraints,” IEEE Trans. Wireless Commun., vol. 10, no. 2, pp. 390–395, Feb 2011. [3] P. L. Yeoh, M. Elkashlan, K. J. Kim, T. Q. Duong, and G. K. Karagiannidis, “Transmit antenna selection in cognitive MIMO relaying with multiple primary transceivers,” IEEE Trans. Veh. Technol., vol. 65, no. 1, pp. 483–489, Jan 2016. [4] J. V. Hecke, P. D. Fiorentino, V. Lottici, F. Giannetti, L. Vandendorpe, and M. Moeneclaey, “Distributed dynamic resource allocation for cooperative cognitive radio networks with multi-antenna relay selection,” IEEE Trans. Wireless Commun., vol. 16, no. 2, pp. 1236–1249, Feb 2017. [5] H. K. Boddapati, M. R. Bhatnagar, and S. Prakriya, “Ad-hoc relay selection protocols for multi-hop underlay cognitive radio networks,” in 2016 IEEE GC Wkshps, Dec 2016, pp. 1–6. [6] S. M. Cheng, W. C. Ao, F. M. Tseng, and K. C. Chen, “Design and analysis of downlink spectrum sharing in two-tier cognitive femto networks,” IEEE Trans. Veh. Technol, vol. 61, no. 5, pp. 2194–2207, Jun 2012. [7] S. M. Cheng, S. Y. Lien, F. S. Chu, and K. C. Chen, “On exploiting cognitive radio to mitigate interference in macro/femto heterogeneous networks,” IEEE Wireless Commun., vol. 18, no. 3, pp. 40–47, Jun 2011. [8] M. Peng, C. Wang, J. Li, H. Xiang, and V. Lau, “Recent advances in underlay heterogeneous networks: Interference control, resource allocation, and self-organization,” IEEE Commun. Surveys Tuts., vol. 17, no. 2, pp. 700–729, Secondquarter 2015. [9] Y. Xing, C. N. Mathur, M. A. Haleem, R. Chandramouli, and K. P. Subbalakshmi, “Dynamic spectrum access with QoS and interference temperature constraints,” IEEE Trans. Mobile Comput., vol. 6, no. 4, pp. 423–433, Apr 2007. [10] X. Kang, R. Zhang, and M. Motani, “Price-based resource allocation for spectrum-sharing femtocell networks: A stackelberg game approach,” IEEE J. Sel. Areas Commun., vol. 30, no. 3, pp. 538–549, Apr 2012. [11] A. Jovicic and P. Viswanath, “Cognitive radio: An information-theoretic perspective,” IEEE Trans. Inf. Theory, vol. 55, no. 9, pp. 3945–3958, Sep. 2009. [12] M. Vu, N. Devroye, and V. Tarokh, “On the primary exclusive region of cognitive networks,” IEEE Trans. Wireless Commun., vol. 8, no. 7, pp. 3380–3385, Jul. 2009. [13] T. Q. Duong, D. B. da Costa, M. Elkashlan, and V. N. Q. Bao, “Cognitive amplify-and-forward relay networks over Nakagami-m fading,” IEEE Trans. Veh. Technol., vol. 61, no. 5, pp. 2368–2374, Jun 2012. [14] K. Tourki, K. Qaraqe, and M.-S. Alouini, “Outage analysis for underlay cognitive networks using incremental regenerative relaying,” IEEE Trans. Veh. Technol., vol. 62, no. 2, pp. 721–734, Feb. 2013. [15] P. Chakraborty and S. Prakriya, “Secrecy outage performance of a cooperative cognitive relay network,” IEEE Commun. Lett., vol. 21, no. 2, pp. 326–329, Feb 2017. [16] I. S. Gradshteyn and I. M. Ryzhik, Table of integrals, series, and products, 7th ed. Academic, 2007. [17] M. Geller and E. W. Ng, “A table of integrals of the exponential integral,” J. Res. Nat. Bureau Std., vol. 73B, no. 3, pp. 191–210, Sep. 1969. [18] F. Topsøe, “Some bounds for the logarithmic function,” RGMIA Res. Rep. Collection, vol. 7, no. 2, 2004.
7cs.IT
arXiv:1803.09686v1 [math.PR] 26 Mar 2018 Strict monotonicity of pc under covering maps Sébastien Martineau∗ and Franco Severo† March 28, 2018 Abstract We answer a question of Benjamini and Schramm by proving that under reasonable conditions, quotienting a graph with pc < 1 strictly increases the value of pc . More precisely, let G = (V, E) be a quasi-transitive graph with pc (G) < 1, and let G be a nontrivial group that acts freely on V by graph automorphisms. Assume that H := G/G is quasi-transitive. Then, one has pc (G) < pc (H). We also investigate the same question beyond this setting: we explain why no condition in the above result can be removed, which more general result can though be obtained, and ask a question on quotients by non-free group actions. The proof makes use of a coupling built by lifting the exploration of the cluster, and an essential (exploratory) enhancement. 1 Introduction Bernoulli percolation is a simple model for problems of propagation in random media that was introduced in 1957 by Broadbent and Hammersely [HB57]: take a graph G, a parameter p ∈ [0, 1], and erase every edge independently with probability 1 − p. Studying the connected components of this graph (which are referred to as clusters) has been since then an active field of research: see the books [Gri99, LP16]. A prominent quantity in this theory is the so-called critical parameter pc (G), which is characterised by the following dichotomy: for every p < pc (G), there is almost surely no infinite cluster, while for every p > pc (G), there is almost surely at least one infinite cluster. Initially, the main focus was on the Euclidean lattice Zd . In 1996, Benjamini and Schramm initiated the systematic study of Bernoulli percolation on more general graphs, namely quasi-transitive graphs [BS96]. A graph is quasi-transitive (resp. transitive) if the action of its automorphism group on its vertices yields finitely many orbits (resp. a single orbit). Intuitively, a graph is quasi-transitive ∗ † Université Paris-Sud, [email protected] Institut des Hautes Études Scientifiques, [email protected] 1 if it has finitely many types of vertices, and transitive if all the vertices look the same. The paper [BS96] contains, as its title suggests, many questions and a few answers: in their Theorem 1 and Question 1, they investigate the monotonicity of pc under quotients. Their Question 1 is precisely the topic of the present paper. It goes as follows. Setting of [BS96] Let G = (V, E) be a locally finite connected graph. Let G be a group acting on V by graph automorphisms. A vertex of the quotient graph G/G is an orbit of G y V , and two distinct orbits are connected by an edge if and only if there is an edge of G intersecting both orbits. Theorem 1 of [BS96] asserts that pc (G) ≤ pc (G/G). It is proved by lifting the exploration of a spanning tree of the cluster of the origin from G/G to G. They then ask the following natural question. Recall that a group action G y X is free if the only element of G that has a fixed point is the identity element: ∀g ∈ G\{1}, ∀x ∈ X, gx 6= x. Question 1.1 (Benjamini-Schramm). Consider the quotient graph H := G/G. Assume that pc (G) < 1, G 6= {1} acts freely on V (G), and both G and H are quasi-transitive. Is it necessarily the case that pc (G) < pc (H)? The main result of the present paper is a positive answer to this question: see Corollary 2.2. We use an exploratory version of Aizenman-Grimmett’s essential enhancements [AG91], and build a coupling between p-percolation on G and enhanced percolation on H by lifting the exploration of the cluster of the origin. The part of our work devoted to essential enhancements (Section 6) follows the Aizenman-Grimmett strategy, thus making crucial use of differential inequalities [Men87]. Our coupling (Section 5) improves on that used in [BS96]. 2 Definitions and results To avoid any ambiguity, let us review the relevant vocabulary. Convention Graphs are taken to be non-empty, locally finite (every vertex has finitely many neighbours) and connected. Subgraphs (e.g. percolation configurations) may not be connected. Our graphs are also taken to be simple (no multiple edges, no self-loops, edges are unoriented), though we will also use multigraphs in some proofs: hence, both graphs and multigraphs appear in this paper. A graph may be written in the form (V, E), where V = V (G) denotes its set of vertices and E = E(G) its set of edges. An edge is a subset of V with precisely two elements. Graphs are endowed with their respective graph distance, denoted by d. The ball of centre x and radius r is Br (x) := {y ∈ V : d(x, y) ≤ r}. It is considered as a set of vertices, but it may also be considered as a graph 2 — with the structure the ambient graph induces on it. For r ∈ N, the sphere of centre x and radius r is Sr (x) := {y ∈ V : d(x, y) = r}. We also set Sr+ 1 (x) := {e ∈ E : e ∩ Sr (x) 6= ∅ and e ∩ Sr+1 (x) 6= ∅}. Finally, percola2 tion is taken to mean Bernoulli bond percolation, but our proofs can be adapted to Bernoulli site percolation. In Question 1.1, the graphs G and H are related via the quotient map π : x 7→ Gx. This map is a weak covering map, meaning that it is 1-Lipschitz for the graph distance and that it has the weak lifting property: for every x ∈ V (G) and every neighbour u of π(x), there is a neighbour of x that maps to u. This fact does not use the freeness of the action of G or quasi-transitivity. Weak covering maps are by definition able to lift edges, but it turns out they can also lift trees, meaning that for every subtree of the target space and every vertex in the preimage of the tree, there is a lift of the tree that contains this vertex. Recall that given a subtree1 T of H, a lift of T is a subtree T ′ of G such that π induces a graph isomorphism from T ′ to T , i.e. it induces well-defined bijections from V (T ′ ) to V (T ) and from E(T ′ ) to E(T ). The map π satisfies a second property, namely disjoint tree-lifting: if T is a subtree of H and if x and y are distinct vertices of G such that π(x) = π(y) belongs to the tree, then one can find two vertex-disjoint lifts of T such that one of them contains x and the other y. This fact uses the freeness of G, and is established in Lemma 7.1. Finally, the map π has tame fibres: there is some R such that for every x ∈ V (G), there is some y ∈ π −1 ({x}) satisfying 0 < d(x, y) ≤ R. See Lemma 7.2. It turns out that these three properties of π suffice to prove strict inequality, so that there is no need in general for group actions and quasi-transitivity. Theorem 2.1. Let G and H be graphs of bounded degree. Assume that there is a weak covering map π : V (G) → V (H) with tame fibres and the disjoint-tree lifting property. If pc (G) < 1, then one has pc (G) < pc (H). Corollary 2.2. Let G be a graph. Let G 6= {1} be a group acting on V (G) by graph automorphisms, and let H denote the quotient graph G/G. Assume that the following conditions hold: 1. the action G y V (G) is free, 2. G is quasi-transitive, 3. H is quasi-transitive, 4. pc (G) < 1. Then, one has pc (G) < pc (H). Theorem 2.1 yields a second corollary. Say that a map π : V (G) → V (H) is a strong covering map if it is 1-Lipschitz for the graph distance and has the 1 i.e. a tree with V (T ) ⊂ V (H) and E(T ) ⊂ E(H). 3 strong lifting property: for every x ∈ V (G), for every neighbour u of π(x), there is a unique neighbour of x that maps to u. Recall that for many authors, the definition of a “covering map” is taken to be even stricter: a classical covering map is a graph homomorphism with the strong lifting property. By Theorem 2.1 and Lemma 7.3, the following result holds. Corollary 2.3. Let G and H be graphs of bounded degree. Assume that there is a strong covering map π : V (G) → V (H) with tame fibres. If pc (G) < 1, then one has pc (G) < pc (H). Our proofs are explicit in that they actually yield explicit (poor) lower bounds on pc (H) − pc (G). Structure of the paper The remaining of the paper is organised as follows. Section 3 discusses the hypotheses of Corollaries 2.2 and 2.3. Section 4 exposes the strategy of proof of Theorem 2.1, reducing it to the proof of Propositions 4.1 and 4.2. They are respectively established in Sections 5 and 6. Section 7 explains why Corollaries 2.2 and 2.3 follow from Theorem 2.1. All these sections can be read in any order, except that Sections 5 and 6 should be read after Section 4. 3 On the hypotheses of our results None of the four assumptions of Corollary 2.2 can be removed. This is clear for Hypothesis 4. For Hypothesis 1, take G0 to be a quasi-transitive graph with pc < 1 — e.g. the square lattice or the 3-regular tree — and define G by setting: V (G) := V (G0 ) × {0, 1, 2}, E(G) := (E(G0 ) × {0}) ∪ (V (G) × {{0, 1}, {0, 2}}) , where one identifies E(G0 )× {0} with {{(x, 0), (y, 0)} : {x, y} ∈ E(G0 )} and V (G)× {{0, 1}, {0, 2}} with {{(x, 0), (x, i)}} : x ∈ V (G0 ), i ∈ {1, 2}}. It suffices then to take G := Z/2Z with the non-trivial element acting via (x, i) 7→ (x, σ(i)), where σ is the (12)-transposition. For Hypothesis 2, take once again G0 to be a quasi-transitive graph with pc < 1, and pick some vertex o in G0 . The graph G is defined by taking two disjoint copies of G0 and putting an additional edge between the two copies of o. The group G := Z/2Z acts by swapping copies. As for Hypothesis 3, take G to be the square lattice Z2 , and G to be Z/2Z acting via the reflection (x, y) 7→ (x, 1 − y). Still, we do not know what happens if freeness is relaxed to the absence of trivial G-orbit. Question 3.1. Let G be a graph. Let G be a group acting on V (G), and let H denote the quotient graph G/G. Assume that the following conditions hold: 4 – ∀x ∈ V (G), ∃g ∈ G, gx 6= x, – G is quasi-transitive, – H is quasi-transitive, – pc (G) < 1. Is it necessarily the case that pc (G) < pc (H)? Remark. An interesting particular case (which we also do not know how to solve) is when G is normal in a quasi-transitive subgroup of Aut(G). In that setting, H is automatically quasi-transitive, and the map π always has tame fibres. As for Theorem 2.1 and Corollary 2.3, notice that the assumption that fibres are tame cannot be replaced by non-triviality of the fibres (namely ∀u ∈ V (H), |π −1 ({u})| = 6 1), even if π is taken to be a classical covering map. Indeed, one can take H to be a graph with bounded degree and pc < 1, and pick some edge e in H. To define G, start with two copies of H, and denote by {x, y} and {x′ , y ′ } the two copies of e. Then, replace these edges by {x′ , y} and {x, y ′ }, thus yielding a connected graph. Take π to be the natural projection from G to H. We do not know how to answer the following question, which investigates a generalisation of Theorem 2.1/Corollary 2.3. Question 3.2. Let G and H be graphs of bounded degree. Assume that there is a weak covering map π : V (G) → V (H) with tame fibres and that pc (G) < 1. Is it necessarily the case that pc (G) < pc (H)? 4 Proof of Theorem 2.1 Let G, H and π be as in Theorem 2.1. Let r be a positive integer. Pick a root o in H, and some o′ ∈ π −1 ({o}). For p, s ∈ [0, 1], define the following random process on H. Independently, each edge is open with probability p and each vertex is activated with probability s. To insist on the difference between these two states, we will often speak of p-open edges and s-activated vertices. Formally, take (ω, α) a random variable of distribution Pp,s := Ber(p)⊗E(H) ⊗ Ber(s)⊗V (H) . Set C0 := {o}. We define inductively a sequence (Cn )n≥0 as follows. For n ≥ 0, let C2n+1 be the union of the p-clusters of the vertices of C2n (let us call it the p-closure of C2n ). Then, let C2n+2 be the union of C2n+1 and the vertices v such that there is some u ∈ C2n+1 satisfying the following conditions: 1. d(u, v) = r + 1, 2. all the edges in Br (u) are p-open, 3. u is s-activated. 5 The random sequence of sets (Cn ) is non-decreasing, and we define Co := S p,s (o) := n Cn to be the cluster of the origin in the (p, s)Co (ω, α) := CH model. In a similar way, one could define Cu (ω, α) by the same procedure but starting the process at the vertex u. Say that an edge e is s-open if there is some u ∈ Co (ω, α) satisfying the following conditions: 1. e ∈ Sr+ 1 (u), 2 2. all the edges in Br (u) are p-open, 3. u is s-activated. Remark. Note that Co (ω, α) does not coincide with the cluster of o for the following model: declare an edge to be open if “it is p-open or there is some s-activated vertex u such that the edge belongs to Sr+ 1 (u) and all the edges in Br (u) are p-open”. 2 This would be an instance of the classical essential enhancement introduced by Aizenman and Grimmett — see [AG91]. Indeed, the model we consider here is an exploratory version of their model (in particular, the former is stochastically dominated by the latter). For example, in our model the assertion v ∈ Cu (ω, α) does not necessarily imply u ∈ Cv (ω, α). We can also set CGp (o′ ) to be the cluster of o′ in bond percolation of parameter p on G. We will prove the following two propositions. The proof of Proposition 4.1 proceeds by lifting some exploration process from H to G: in that, it is similar to the proof of Theorem 1 of [BS96]. The proof of Proposition 4.2 uses an exploratory variation of the techniques of Aizenman and Grimmett [AG91]. Even though essential enhancements are delicate in general [BBR], it turns out that our particular enhancement can be handled for general graphs, even for site percolation. Proposition 4.1. There is some choice of r ≥ 1 such that the following holds: p,s (o) is for every ε > 0, there is somes ∈ (0,1) such that for every p ∈ [ε, 1], CH p ′ 2 stochastically dominated by π CG (o ) . Proposition 4.2. Assume further that pc (H) < 1. Then, for any choice of r ≥ 1, the following holds: for every s ∈ (0, 1], there exists ps < pc (H) such that for every p,s (o) is infinite with positive probability. p ∈ [ps , 1], the cluster CH Assuming these propositions, let us establish Theorem 2.1. First, notice that if pc (H) = 1, then the conclusion holds trivially. We thus assume that pc (H) < 1, so that we can use both propositions. We pick r so that the conclusion of Proposition 4.1 holds. Since boundedness of the degree of H implies that pc (H) > 0, we can pick some ε in (0, pc (H)). By Proposition 4.1, we There is a coupling such that the (H, p, s)-cluster is a subset of the π-image of the (G, p)cluster. 2 6 p,s can pick  s ∈ (0, 1) such that for every p ∈ [ε, 1], CH (o) is stochastically dominated by π CGp (o′ ) . By Proposition 4.2, there is some ps < pc (H) such that for every p,s p ∈ [ps , 1], the cluster CH (o) is infinite with positive probability. Fix such a ps , p,s (o) is infinite and set p := max(ps , ε) < pc (H). By definition of ps , the cluster CH p,s with positive probability. As  p ≥ ε, the definition of s implies  that CH (o) is stochastically dominated by π CGp (o′ ) . As a result, π CGp (o′ ) is infinite with positive probability. In particular, CGp (o′ ) is infinite with positive probability, so that pc (G) ≤ p < pc (H). 5 Proof of Proposition 4.1 The choice of a suitable value of r is given by the following lemma. Lemma 5.1. There are some finite r ≥ 1 and d ≥ 1 such that for every x ∈ V (G), the set Z = Z(x, r, d) defined as the connected component3 of x in π −1 (Br (π(x))) ∩ Bd (x) satisfies that for any u ∈ Sr+1 (π(x)), the fibre π −1 ({u}) contains at least two vertices adjacent to Z. Proof. Let R be given by the fact that π has tame fibres. Set r := ⌈ R2 ⌉ and d := R + r. Let x be any vertex of G. Take some y ∈ V (G) such that π(x) = π(y) and 0 < d(x, y) ≤ R. Let T be a spanning tree of Br+1 (π(x)) obtained by adding first the vertices at distance 1, then at distance 2, etc. As π has the disjoint treelifting property, one can pick two vertex-disjoint lifts Tx and Ty of T such that x ∈ V (Tx ) and y ∈ V (Ty ). Let γ be a geodesic path from x to y, thus staying inside π −1 (Br (π(x))). The set Z ′ consisting in the union of the span of γ and (V (Tx ) ∪ V (Ty )) ∩ π −1 (Br (π(x))) is a connected subset of Z(x, r, d): its connectedness results from the choice of the spanning tree T . It thus suffices to prove that for any u ∈ Sr+1 (π(x)), the fibre π −1 ({u}) contains at least two vertices adjacent to Z ′ . But this is the case as every ⊓ such u admits a lift in Tx and another one in Ty . ⊔ Take (r, d) to satisfy the conclusion of Lemma 5.1. Let ε > 0. Set M and s to be so that the following two conditions hold: ∀e = {x, y} ∈ E(H), M ≥ |Br (x) ∪ Br (y)|,  ∀x ∈ V (G), s ≤ 1 − (1 − ε)1/M |E(Bd+1 (x))| . For instance, one may take M := Dr+2 and s := (1 − (1 − ε)1/M )D the maximal degree of a vertex of G. Let p ∈ [ε, 1]. 3 d+2 , where D be Here π −1 (Br (π(x))) ∩ Bd (x) is seen as endowed with the graph structure induced by G. 7 We define the multigraph Ĝ as follows: the vertex-set is V (G), the edge-set is E(G) × {1, . . . , M }, and ({x, y}, k) is interpreted as an edge connecting x and y. The multigraph Ĥ is defined in the same way, with H instead of G. The purpose of this multigraph is to allow multiple use of each edge for a bounded number of “sbonus”. They will play no role as far as p-exploration is concerned: concretely, for “p-exploration”, each edge will be considered together with all its parallel copies. Let ω be a Bernoulli percolation of parameter p̂ := 1 − (1 − p)1/M on Ĥ, so that p̂-percolation on Ĥ corresponds to p-percolation on H. Let ω ′ be a Bernoulli percolation of parameter p̂ on Ĝ that is independent of ω. Choose an injection from E(H) to N, so that E(H) is now endowed with a well-ordering. Do the same with E(G), V (G) and V (H). We now define algorithmically an exploration process. This dynamical process will construct edge after edge a Bernoulli percolation η of parameter p̂ on Ĝ and an α with distribution Ber(s)⊗V (H) . The random variables η, α, and ω will be coupled in a suitable way and η will be independent of α. Structure of the process In the exploration, edges in Ĝ may get explored in two different ways, called p-explored and s-explored. Edges in H may get p-explored, and vertices in H may get s-explored. No vertex or edge will get explored more than once; in particular, no edge of Ĝ will get p- and s-explored. For every ℓ > 0, during Step ℓ, we will define inductively a sequence (Cℓ,n )n ′ ) of subsets of V (G). At the end of each of subsets of V (H) and a sequence (Cℓ,n n iteration of the process, it will be the case that the following conditions hold: (A) if an edge e in H is unexplored, then none of its lifts in Ĝ is p-explored, otherwise there is a lift e′ of e in G such that the set of the p-explored lifts of e is precisely {e′ } × {1, . . . , M }. (B) if an unexplored edge e ∈ E(H) has at most one endpoint in the current Cℓ,n , then none of its lifts is s-explored. ′ is connected to o′ by an η-open path. (C) every element of Cℓ,n (D) for every edge e in H and each lift e′ of e in G, the number of s-explored edges of the form (e′ , k) is at most the number of s-explored vertices u in H at distance at most r from some endpoint of e. ′ to C . (E) the map π induces a well-defined surjection from Cℓ,n ℓ,n Step 0 Set C0 = o and C0′ = o′ . Initially, nothing is considered to be p- or s-explored. ′ ′ . Step 2K + 1 Set C2K+1,0 := C2K and C2K+1,0 := C2K While there is an unexplored edge in the edge-boundary of C2K+1,n in H, do the following (otherwise finish this step): 8 1. 2. 3. 4. take e to be the smallest such edge, call u its unique endpoint in C2K+1,n and v its other endpoint, pick e′ some lift of e intersecting πn−1 ({u}) 6= ∅, declare e and all (e′ , k)’s to be p-explored (they were unexplored before because of Conditions (A) and (B)), 5. for every k ≤ M , define η(e′ ,k) := ω(e,k) , ′ ′ 6. set (C2K+1,n+1 , C2K+1,n+1 ) to be (C2K+1,n , C2K+1,n ) if all the (e, k)’s are ω′ ′ closed; otherwise, set (C2K+1,n+1 , C2K+1,n+1 ) to be (C2K+1,n ∪{v}, C2K+1,n ∪ ′ e ) — note that (E) continues to hold. When this step is finished, which occurs after finitely or countably many iterS S ′ ′ ations, set C2K+1 := C2K+1,n and C2K+1 := C2K+1,n . ′ ′ Step 2K + 2 Set C2K+2,0 := C2K+1 and C2K+2,0 := C2K+1 . While there is at least one s-unexplored vertex in C2K+1 whose r-ball is “fully open”4 in ω, do the following (otherwise finish this step): 1. take u to be the smallest such vertex, ′ 2. pick some x ∈ C2K+1 ∩ π −1 ({u}) 6= ∅, 3. This is paragraph is not an algorithmic substep, but gathers a few relevant observations. Call an edge in G p-explored if one (hence every by (A)) of its copies in Ĝ is p-explored; call a p-explored edge of G open if at least one of its copies is η-open. Notice that by construction and as the r-ball of u is “fully open” in ω, all p-explored edges in π −1 (Br (u)) are open. Also note that for each edge lying in Z(x, r, d), Condition (D) and the value of M guarantee that at least one of its copies in Ĝ has not been s-explored. As a result, for every edge in Z(x, r, d), either all its copies have a well-defined η-status and one of them is open, or at least one of these copies has a still-undefined η-status. This is what makes Substep 4 possible. 4. For each p-unexplored edge e′ in Z(x, r, d), take its s-unexplored copy (e′ , k) in ′ Ĝ of smallest label k, set η(e′ ,k) := ω(e ′ ,k) , and switch its status to s-explored. 5. If all these newly s-explored edges are open (so that Z is “fully η-open”), then perform this substep. By (A) and Lemma 5.1, for every H-edge e ∈ Sr+ 1 (u), 2 there is at least one lift e′ of e that is adjacent to Z(x, r, d) and p-unexplored: pick the smallest one. By (D) and the value of M , one of its copies (e′ , k) is s-unexplored: pick that with minimal k =: ke . Declare all these edges to be ′ ′ ′ s-explored and set η(e′ ,ke ) := ω(e ′ ,k ) . If all these (e , ke )’s are ω -open, then e say that this substep is successful. 6. Notice that conditionally on everything that happened strictly before the current Substep 4, the event “Substep 5 is performed and successful” has some (random) probability q ≥ p̂|E(Z(x,r,d))| ≥ p̂|E(Bd (x))| ≥ s. If the corresponding 4 In the sense that for each H-edge inside, at least one of its copies in Ĥ is open. 9 event does no occur, set αu := 0. If this event occurs, then, independently on (ω, ω ′ ) and everything that happened so far, set αu := 1 with probability s/q ≤ 1 and αu := 0 otherwise. Declare u to be s-explored. ′ 7. If αu = 1, then set C2K+2,n+1 := C2K+2,n ∪ Sr+1 (u) and C2K+2,n+1 to be ′ the union of C2K+2,n , Z(x, r, d), and the e ’s of Substep 5. Notice that Condition (C) continues to hold as in this case Z is “fully η-open” and η-connected ′ ′ to C2K+2,n . Otherwise, set C2K+2,n+1 := C2K+2,n and C2K+2,n+1 := C2K+2,n . When this step is finished, set C2K+2 := S ′ C2K+2,n and C2K+2 := S ′ C2K+2,n . ′ := ′ ′ Step ∞ Set C∞ := K CK and C∞ K CK . Take η independent of everything done so far, with distribution Ber(p̂)⊗E(Ĝ) . Wherever η is undefined, define it to be equal to η ′ . In the same way, wherever α is undefined, toss independent Bernoulli random variables of parameter s, independent of everything done so far. S S By construction, C∞ has the distribution of the cluster of the origin for the (p, s)-process on H: it is the cluster of the origin of ((∨k ωe,k )e , α) which has distribution Ber(p)⊗E(H) ⊗Ber(s)⊗V (H) . Recall that ∨ stands for the maximum operator, ′ is included thus corresponding to the union of the corresponding sets. Besides, C∞ in the cluster of o′ for (∨k ηe,k )e , which is a p-bond-percolation on G. Finally, the ′ onto C . Proposition 4.1 follows. coupling guarantees that π surjects C∞ ∞ Remark. This construction adapts to site percolation. The lift is the same as in [BS96] while the “multiple edges” trick now consists of defining Ĝ as follows: each vertex has M possible states, and it is p-open if one of its p̂-states says so. 6 Proof of Proposition 4.2 In this proof, we follow the strategy of Aizenman and Grimmett [AG91, BBR]. There is essentially no difficulty in adapting their ideas to our specific context, but we provide the details for the sake of completeness. Let θL (p, s) be the Pp,s-probability of the event EL := {Co (ω, α) ∩ SL (o) 6= ∅}, p,s and θ(p, s) = limL→∞ θL (p, s) be the probability that Co (ω, α) = CH (o) is infinite. We claim that in order to prove Proposition 4.2, we only need to show that for any ε > 0, there exist c = c(ε) > 0 and L0 (ε) ≥ 1 such that for any p, s ∈ [ε, 1 − ε] and L ≥ L0 , we have ∂ ∂ θL (p, s) ≥ c θL (p, s). (1) ∂s ∂p Indeed, assume that (1) is true. It is easy to see that, since pc (H) ∈ (0, 1), for any s > 0, there is some ε > 0 such that we can find a curve — actually a line seg′ (t) ment — (p(t), s(t))t∈[0,s] inside [ε, 1 − ε]2 satisfying ps′ (t) = −c for all t ∈ [0, s] and p0 := p(0) > pc (H), ps := p(s) < pc (H), s(s) = s. But now note that (1) implies 10 that t 7→ θL (p(t), s(t)) is a non-decreasing function for all L ≥ L0 . In particular we have θ(ps , s) = θ(p(s), s(s)) = limL θL (p(s), s(s)) ≥ limL θL (p(0), s(0)) = θ(p(0), s(0)) ≥ θ(p0 , 0) > 0, where in the last inequality we use p0 > pc (H). By monotonicity, we conclude that for every p ∈ [ps , 1], we have θ(p, s) > 0 as desired. Now, note that, since the event EL , which depends only on finitely many coordinates, is increasing in both ω and α, the Margulis-Russo formula gives us X ∂ θL (p, s) = Pp,s(e is p-pivotal for EL ), ∂p e X ∂ Pp,s (x is s-pivotal for EL ). θL (p, s) = ∂s x Recall that an edge e is said to be p-pivotal for an increasing event E in a configuration (ω, α) if (ω ∪ {e}, α) ∈ E but (ω \ {e}, α) ∈ / E. Similarly, a vertex x is said to be s-pivotal for an increasing event E in a configuration (ω, α) if (ω, α ∪ {x}) ∈ E but (ω, α \ {x}) ∈ / E. It follows from the above formulas that in order to derive (1), it is enough to prove that for some R, L0 > 0, for every ε > 0, there is some c′ > 0 such that for any edge e and any p, s ∈ [ε, 1 − ε], one has X Pp,s(x is s-pivotal for EL ) ≥ c′ Pp,s(e is p-pivotal for EL ), (2) x∈BR (e) where for e = {x, y}, we set BR (e) := BR (x) ∪ BR (y). Indeed, since each vertex can be in BR (e) for at most C := maxx |BR (x)| × maxx degree(x) different e’s, summing (2) over e gives: X CPp,s(x is s-pivotal for EL ) ≥ c′ X Pp,s(e is p-pivotal for EL ) e x which implies (1) for c := c′ /C. The following deterministic lemma directly implies (2). Lemma 6.1. There are constants L0 and R such that the following holds. If L ≥ L0 and an edge e is p-pivotal for EL in a configuration (ω, α), then there exist a configuration (ω ′ , α′ ) differing from (ω, α) only inside BR (e) and a vertex z in BR (e) such that z is s-pivotal for EL in (ω ′ , α′ ). Proof. Take R := 3r + 1 and L0 := 2r + 2. Let (ω, α) and e be as in Lemma 6.1 and assume without loss of generality that (ω, α) ∈ EL . Now, remove from α all the vertices in BR (e) one by one. If at some point we get, for the first time, a configuration (ω, α′ ) which is not in EL anymore, then it means that the last vertex z that was removed is s-pivotal for that configuration (ω, α′ ), thus yielding the conclusion of the lemma. Therefore we can assume that (ω, α′ ) ∈ EL where α′ := α \ BR (e). In particular, e is still p-pivotal for (ω, α′ ). We now have two cases. 11 Case a) The edge e = {x, y} is far from the origin o, namely d(o, e) > r. Since e is pivotal for EL , we have e ⊂ BL (o) and e 6⊂ SL (o). So we can assume without loss of generality that x ∈ BL−1 (o). Take z to be a vertex such that x ∈ Br (z) ⊂ BL−1 (o) and o ∈ / Br (z).5 Now, take some vertex u ∈ Sr+1 (z) such ′ that u ∈ Co (ω̃, α ), where ω̃ is given by closing in ω all the edges inside Br+1 (z), i.e. ω̃ := ω \ {f ∈ E(H) ; f ⊂ Br+1 (z)}. Such a vertex can be obtained as follows. Let n be the first step of the exploration that contains some vertex of Sr+1 (z), i.e. such that Cn (ω, α′ ) ∩ Sr+1 (z) 6= ∅. The previous step n − 1 does not depend on the state of the edges inside Br+1 (z). In particular, one has Cn−1 := Cn−1 (ω, α′ ) = Cn−1 (ω̃, α′ ). Notice that as α′ ∩ B2r+1 (z) = ∅, the step n is actually an odd one (in which we only explore things in ω). Therefore Cn−1 is ω-connected to Sn+1 (z). In particular, there is some u ∈ Sr+1 such that Cn−1 is ω-connected to u outside Br+1 (z), thus also ω̃-connected. All of this implies that u ∈ Cn (ω̃, α′ ) ⊂ Co (ω̃, α′ ). Let v be any neighbour of u in Br (z). Finally, define ω ′ by closing in ω all the edges inside Br+1 (z) and then opening {u, v} together with all the edges inside Br (z). Formally, one has ω ′ := (ω \ {f ∈ E(H) ; f ⊂ Br+1 (z)}) ∪ ({f ∈ E(H) ; f ⊂ Br (z)} ∪ {{u, v}}. Case b) The edge e is close to the origin, namely d(o, e) ≤ r. Without loss of generality, assume d(o, x) ≤ r. Then simply take z = x and ω ′ given by closing in ω all the edges inside Br+1 (x) and then opening all the edges inside Br (x), i.e. ω ′ := (ω \ {f ∈ E(H) ; f ⊂ Br+1 (x)}) ∪ {f ∈ E(H) ; f ⊂ Br (x)}. We claim that, in both cases above, z is s-pivotal for the event EL in the configuration (ω ′ , α′ ). We are only going to treat Case a). We leave the slightly simpler Case b) to the reader. Remind that by the definition of u, we have u ∈ Co (ω̃, α′ ). Since α′ ∩B2r+1 (z) = ∅, we see that after opening in ω̃ all the edges inside Br (z) together with {u, v} (therefore yielding ω ′ ), we do not create new s-open edges, so that Co (ω ′ , α′ ) = Co (ω̃, α′ )∪Br (z). In particular, one has Co (ω ′ , α′ )∩SL (o) = ∅, so that (ω ′ , α′ ) ∈ / EL . Recall that z ∈ Co (ω ′ , α′ ) ⊂ Co (ω ′ , α′ ∪ {z}) and that Br (z) is p-open. It implies that Br+1 (z) is contained in Co (ω ′ , α′ ∪ {z}). Together with ω ⊂ ω ′ ∪ Br+1 (z) and B2r+1 (z) ∩ α′ = ∅, it implies that Co (ω, α′ ) ⊂ CBr+1 (z)∪{o} (ω, α′ ) ⊂ CBr+1 (z)∪{o} (ω ′ , α′ ∪ {z}) = Co (ω ′ , α′ ∪ {z}), where CBr+1 (z)∪{o} (ω, α) is defined as Co (ω, α) but with C0 = Br+1 (z) ∪ {o}. As a result, Co (ω ′ , α′ ∪ {z}) ∩ SL (o) 6= ∅, ⊓ so that (ω ′ , α′ ∪ {z}) ∈ EL . ⊔ Remark. As in the previous section, the proof above can be adapted to site percolation in a straightforward way. Just take a suitable vertex in some geodesic from x to o. In the case where d(x, SL−1 (o)) ≥ r one can simply take z = x. Here we are using that L ≥ L0 = 2r + 2. 5 12 7 Deriving corollaries from Theorem 2.1 Corollary 2.2 follows from Theorem 2.1 and Lemmas 7.1 and 7.2. Lemma 7.1. Let G be a graph, and let G be a group acting on V (G) by graph automorphisms. Let H be the quotient graph G/G and π : V (G) → V (H) denote the quotient map x 7→ Gx. If G y V (G) is free, then π has the disjoint tree-lifting property. Proof. With the notation of Lemma 7.1, let x and y be two distinct vertices of G such that π(x) = π(y). Let T be a subtree of H, and let Tx be a lift of T that contains x: recall that such a lift exists, as π is a weak covering map. As Gx = Gy, let us take some g ∈ G such that gx = y. Since x and y are distinct, g is not the identity element. Therefore, by freeness of the action, g has no fixed point. We claim that Ty := gTx is a lift of T that is vertex-disjoint from Tx . It is indeed a lift, as ∀z ∈ V (G), π(z) = π(gz). To prove vertex-disjunction, let z ∈ V (Tx ) ∩ gV (Tx ). Thus, one can pick z⋆ in V (Tx ) such that z = gz⋆ . As π(z) = π(gz⋆ ) = π(z⋆ ), one has z = z⋆ . Therefore, one has z = gz, which ⊓ contradicts the fact that g has no fixed point. ⊔ Lemma 7.2. Let G be a graph, and let G be a group acting on V (G) by graph automorphisms. Let H be the quotient graph G/G and π : V (G) → V (H) denote the quotient map x 7→ Gx. Assume that G y V (G) is free, that G is not equal to {1}, and that both G and H are quasi-transitive. Then, π has tame fibres. Proof. Let (G, G, H, π) satisfy the assumptions of Lemma 7.2. First, assume additionally that there is some r such that for every x ∈ V (G), one has |Br (x)| > |Br (π(x))|. Fix such an r. Let x be any vertex of G. As π(Br (x)) = Br (π(x)), by the pigeonhole principle, one can pick two vertices y and z in Br (x) such that π(y) = π(z). Pick a path of length at most r from π(y) to π(x) in Br (π(x)). As paths are trees, by Lemma 7.1, one can obtain two vertex-disjoint lifts of this path with one starting at y and the other at z. Each of these paths ends inside π −1 ({π(x)}) ∩ B2r (x): therefore, this set contains at least one vertex distinct from x, thus establishing the tameness of fibres with R := 2r. Let us now prove that the assumptions of the lemma imply the existence of such an r. Pick one vertex in each Aut(G)-orbit, thus yielding a finite set {x1 , . . . , xm } ⊂ V (G). Define {u1 , . . . , un } ⊂ V (H) by doing the same in H. Proceeding by contradiction and as π is a weak covering map, we may assume that for every r, there is some x ∈ V (G) such that Br (x) and Br (π(x)) are isomorphic as rooted graphs. As a result, for every r, there are some i and j such that Br (xi ) and Br (uj ) are isomorphic as rooted graphs. As i and j can take only finitely many values, there is some (i0 , j0 ) such that for arbitrarily large values of r — hence all values of r —, the rooted graphs Br (xi0 ) and Br (uj0 ) are isomorphic. It results from local finiteness and diagonal extraction (or equivalently from the fact that 13 the local topology on locally finite connected rooted graphs is Hausdorff) that G and H are isomorphic. This is a contradiction for the following reason. Let g ∈ G\{1} = 6 ∅, and let γ be a path from x1 to gx1 6= x1 . For r0 large enough, for all i ≤ m, the r0 -ball centred at xi contains the support of γ. Pick such an r0 and pick i such that the cardinality of Br0 (xi ) is minimal: as π(x1 ) = π(gx1 ), the cardinality of Br0 (π(xi )) is strictly less than that of Br0 (xi ). Therefore, the minimal cardinality of an r0 -ball ⊓ is not the same for H and G. ⊔ Corollary 2.3 results from Theorem 2.1 and the following lemma. Lemma 7.3. Any strong covering map has the disjoint tree-lifting property. Proof. Let π : G → H denote a strong covering map. Let x and y be two vertices of G such that π(x) = π(y). Let T be a subtree of H, and let Tx and Ty be lifts of T such that x belongs to V (Tx ) and y to V (Ty ). Assume that V (Tx ) ∩ V (Ty ) 6= ∅. Let us prove that x = y. As Tx is connected, it suffices to prove that if z0 belongs to V (Tx ) ∩ V (Ty ), then all its Tx -neighbours belong to V (Tx ) ∩ V (Ty ). But this is the case: indeed, any Tx -neighbour z1 of z0 is, by the strong lifting property, the unique neighbour z⋆ of z0 such that π({z0 , z⋆ }) = π({z0 , z1 }), so that π −1 ({π(z1 )}) ∩ V (Ty ) = {z1 }. ⊓ ⊔ Acknowledgements We are indebted to Hugo Duminil-Copin, Vincent Tassion, and Augusto Teixeira for many valuable discussions. We are grateful to Vincent Beffara, Hugo Duminil-Copin, and Aran Raoufi for comments on an earlier version of this paper. SM is funded by the ERC grant GeoBrown: he is thankful to his postdoctoral hosts Nicolas Curien and Jean-François Le Gall, the Laboratoire de Mathématiques d’Orsay, and GeoBrown for excellent working conditions. FS is thankful to his PhD advisor Hugo Duminil-Copin and IHES for excellent working conditions as well. 14 References [AG91] Michael Aizenman and Geoffrey Grimmett. Strict monotonicity for critical points in percolation and ferromagnetic models. Journal of Statistical Physics, 63(56):817–835, 1991. [BBR] Paul Balister, Béla Bollobás, and Oliver Riordan. Essential enhancements revisited. ArXiv 1402.0834. [BS96] Itai Benjamini and Oded Schramm. Percolation beyond Zd , many questions and a few answers. Electron. Comm. Probab., 1:71–82, 1996. [Gri99] Geoffrey Grimmett. Percolation, volume 321 of Grundlehren der Mathematischen Wissenschaften. Springer-Verlag, Berlin, second edition, 1999. [HB57] John Hammersley and Simon Broadbent. Percolation processes: I. Crystals and mazes. In Proc. Cambridge Philos. Soc, volume 53, pages 629–641, 1957. [LP16] Russell Lyons and Yuval Peres. Probability on trees and networks, volume 42. Cambridge University Press, 2016. [Men87] Mikhail Men’shikov. Quantitative estimates and strong inequalities for critical points of a graph and its subgraph. Teoriya Veroyatnostei i ee Primeneniya, 32(3):599–602, 1987. 15
4math.GR
Document Listing on Repetitive Collections with Guaranteed Performance∗ Gonzalo Navarro Center for Biotechnology and Bioengineering, Dept. of Computer Science, University of Chile, Beauchef 851, Santiago, Chile. [email protected] arXiv:1707.06374v1 [cs.DS] 20 Jul 2017 Abstract We consider document listing on string collections, that is, finding in which strings a given pattern appears. In particular, we focus on repetitive collections: a collection of size N over alphabet [1, σ] is composed of D copies of a string of size n, and s single-character or block edits are applied on ranges of copies. We introduce the first document listing index with size Õ(n + s), precisely O((n lg σ + s lg2 N ) lg D) bits, and with useful worst-case time guarantees: Given a pattern of length m, the index reports the ndoc strings where it appears in time O(m2 +m lg1+ N ·ndoc), for any constant  > 0. Our technique is to augment a range data structure that is commonly used on grammar-based indexes, so that instead of retrieving all the pattern occurrences, it computes useful summaries on them. We show that the idea has independent interest: we introduce the first grammar-based index that, on a text T [1, N ] with a grammar of size r, uses O(r lg N ) bits and counts the number of occurrences of a pattern P [1, m] in time O(m2 + m lg2+ r), for any constant  > 0. 1998 ACM Subject Classification E.1 Data Structures; E.4 Coding and Information Theory; H.3 Information Storage and Retrieval Keywords and phrases Repetitive string collections; Document listing; Grammar compression; Grammar-based indexing; Range minimum queries; Range counting; Succinct data structures Digital Object Identifier 10.4230/LIPIcs... 1 Introduction Document retrieval on general string collections is an area that has recently attracted attention [40]. On the one hand, it is a natural generalization of the basic Information Retrieval tasks carried out on search engines [3, 9], many of which are also useful on Far East languages, collections of genomes, code repositories, multimedia streams, etc. It also enables phrase queries on natural language texts. On the other hand, it raises a number of algorithmic challenges that are not easily addressed with classical pattern matching approaches. In this paper we focus on one of the simplest document retrieval problems, document listing [36]. Let D be a collection of D documents of total length N . We want to build an index on D such that, later, given a search pattern P of length m, we report the identifiers of all the ndoc documents where P appears. Given that P may occur occ  ndoc times in D, resorting to pattern matching, that is, finding all the occ occurrences and then listing the distinct documents where they appear, can be utterly inefficient. Optimal O(m + ndoc) time document listing solutions appeared only in 2002 [36], although they use too much space. There are also more recent statistically compressed indices [46, 25], which are essentially space-optimal with respect to the statistical entropy and pose only a small time penalty. ∗ Supported in part by Fondecyt grant 1-170048 and Basal Funds FB0001, Conicyt, Chile. A preliminary version of this article appeared in Proc. CPM 2017. © Gonzalo Navarro; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany XX:2 Document Listing on Repetitive Collections We are, however, interested in highly repetitive string collections [39], which are formed by a few distinct documents and a number of near-copies of those. Such collections arise, for example, when sequencing the genomes of thousands of individuals of a few species, when managing versioned collections of documents like Wikipedia, and in versioned software repositories. Although many of the fastest-growing datasets are indeed repetitive, this is an underdeveloped area: most succinct indices for string collections are based on statistical compression, and these fail to exploit repetitiveness [30]. 1.1 Modeling repetitiveness There are few document listing indices that profit from repetitiveness. A simple model to analyze them is as follows [33, 20, 39]: Assume there is a single document of size n on alphabet [1, σ], and D − 1 copies of it, on which s single-character edits (insertions, deletions, substitutions) are distributed arbitrarily, forming a collection of size N ≈ nD. This models, for example, collections of genomes and their single-point mutations. For versioned documents and software repositories, a better model is a generalization where each edit affects a range of copies, such as an interval of versions if the collection has a linear versioning structure, or a subtree of versions if the versioning structure is hierarchical. We also permit more general block edit operations, where a whole block of symbols can be deleted, moved, inserted, or replaced (in the last two cases, with a new content or with a content copied from elsewhere in the document). In this case, n accounts also for the amount of new content created. The gold standard to measure space usage on repetitive collections is the size of the Lempel-Ziv parsing [31]. If we parse the concatenation of the strings in a repetitive collection under any of the models above, we obtain at most z = n/ lgσ n + O(s)  N phrases. Therefore, while a statistical compressor would require basically N lg σ bits if the base document is incompressible [30], we can aim to reach as little as O(n lg σ + s lg N ) bits by expoiting repetitiveness via Lempel-Ziv compression (that is, we assume an arbitrary Lempel-Ziv pointer requires O(lg N ) bits, but those in the first document could use O(lg n)). This might be too optimistic for an index, however, as there is no known way to extract substrings efficiently from Lempel-Ziv compressed text. Instead, grammar compression allows extracting any text symbol in logarithmic time using O(r lg N ) bits, where r is the size of the grammar [8, 51]. It is possible to obtain a grammar of size r = O(z lg(N/z)) [10, 27], which using standard methods [45] can be tweaked to r = n/ lgσ N + s lg N under our repetitiveness model. Thus the space we might aim at for indexing is O(n lg σ + s lg2 N ) bits. 1.2 Our contributions Although they perform reasonably well in practice, none of the existing structures for document listing on repetitive collections [13, 20] offer good worst-case time guarantees combined with worst-case space guarantees that are appropriate for repetitive collections, that is, growing with n + s rather than with N . In this paper we present the first document listing index offering good guarantees in space and time for repetitive collections: our index 1. uses O((n lg σ + s lg2 N ) lg D) bits of space, and 2. performs document listing in time O(m2 + m lg1+ N · ndoc), for any constant  > 0. That is, at the price of being an O(lg D) space factor away from what could be hoped from a grammar-based index, our index offers document listing with useful time bounds per listed document. The result is summarized in Theorem 2 for single-character edits and Theorem 3 for block edits. G. Navarro We actually build on a grammar-based document listing index [13] that stores lists of the documents where each nonterminal appears, and augment it by rearranging the nonterminals in different orders, following a wavelet tree [24] deployment that guarantees that only O(m lg r) ranges of lists have to be merged at query time. We do not store the lists themselves in various orders, but just succinct range minimum query (RMQ) data structures [17] that allow implementing document listing on ranges of lists [46]. Even those RMQ structures are too large for our purposes, so they are further compressed exploiting the fact that their underlying data has long increasing runs, so the structures are reduced with techniques analogous to those developed for the ILCP data structure [20]. The space reduction brings new issues, however, because we cannot afford storing the underlying RMQ sequences. These problems are circumvented with a new, tailored, technique to extract the distinct elements in a range that might have independent interest (see Lemma 6 in Appendix A). Extensions The wavelet tree [24] represents a two-dimensional grid with points. It is used in grammarbased indexes [14, 15] to enumerate all the occurrences of the pattern: a number of secondary occurrences are obtained from each point that qualifies for the query. At a high level, our idea above is to compute summaries of the qualifying points instead of enumerating them one by one. We show that this idea has independent interest by storing the number of secondary occurrences that can be obtained from each point. The result is an index of O(r lg N ) bits, similar to the size of previous grammar-based indexes [14, 15], and able to count the number of occurrences of the pattern in time O(m2 + m lg2+ r), for any constant  > 0, see Theorem 5. Current grammar-based indexes are unable to count the occurrences without generating them one by one, so for the first time a grammar-based index can offer efficient counting. As a byproduct, we improve an existing result [42] on computing summaries of twodimensional points in ranges, when the points have associated values from a finite group. We show in Theorem 4 that, within linear space, the time to operate all the values of the points in a given range of an r × r grid can be reduced from O(lg3 r) to O(lg2+ r), for any constant  > 0. 2 Related work The first optimal-time and linear-space solution to document listing is due to Muthukrishnan [36], who solves the problem in O(m + ndoc) time using an index of O(N lg N ) bits of space. Later solutions [46, 25] improved the space to essentially the statistical entropy of D, at the price of multiplying the times by low-order polylogs of N (e.g., O(m + lg N · ndoc) time with O(N ) bits on top of the entropy [46, 7]). However, statistical entropy does not capture repetitiveness well [30], and thus these solutions are not satisfactory in repetitive collections. There has been a good deal of work on pattern matching indices for repetitive string collections [43, Sec 13.2]: building on regularities of suffix-array-like structures [33, 37, 38, 5, 21], on grammar compression [14, 15], on Lempel-Ziv compression and variants [30, 18, 16], and on combinations [18, 19, 26, 52, 6]. However, there has been little work on document retrieval structures for repetitive string collections. One precedent is Claude and Munro’s index based on grammar compression [13]. It builds on a grammar-based pattern-matching index [15] and adds an inverted index that explicitly indicates the documents where each nonterminal appears; this inverted index is XX:3 XX:4 Document Listing on Repetitive Collections also grammar-compressed. To obtain the answer, an unbounded number of those lists of documents must be merged. No relevant worst-case time or space guarantees are offered. Another precedent is ILCP [20], where it is shown that an array formed by interleaving the longest common prefix arrays of the documents in the order of the global suffix array, ILCP, has long increasing runs on repetitive collections. Then an index of size bounded by the runs in the suffix array [33] and in the ILCP array performs document listing in time O(search(m) + lookup(N ) · ndoc), where search and lookup are the search and lookup time, respectively, of a run-length compressed suffix array [33, 21]. Yet, there are only average-case bounds for the size of the structure in terms of s: If the base document is generated at random and the edits are spread at random, then the structure uses O(n lg N + s lg2 N ) bits. The last previous work is PDL [20], which stores inverted lists at sampled nodes in the suffix tree of D, and then grammar-compresses the set of inverted lists. For a sampling step b, it requires O((N/b) lg N ) bits plus the (unbounded) space of the inverted lists. Searches that lead to the sampled nodes have their answers precomputed, whereas the others cover a suffix array range of size O(b) and are solved by brute force in time O(b · lookup(N )). To be fair, those indexes perform well in many practical situations [1]. However, in this article we are interested in whether theoretical worst-case guarantees can be provided. 3 3.1 Basic Concepts Listing the different elements in a range Let A[1, t] be an array of integers in [1, D]. Muthukrishnan [36] gives a structure that, given a range [i, j], lists all the ndoc distinct elements in A[i, j] in time O(ndoc). He defines an array C[1, t] storing in C[k] the largest position l < k where A[l] = A[k], or C[k] = 0 if no such position exists. Note that the leftmost positions of the distinct elements in A[i, j] are exactly those k where C[k] < i. He then stores a data structure supporting range-minimum queries (RMQs) on C, rmqC (i, j) = argmini≤k≤j C[k] [17]. Given a range [i, j], he computes k = rmqC (i, j). If C[k] < i, then he reports A[k] and continues recursively on A[i, k − 1] and A[k + 1, j]. Whenever it turns out that C[k] ≥ i for an interval [x, y], there are no leftmost occurrences of A[i, j] within A[x, y], so this interval can be abandoned. It is easy to see that the algorithm takes O(ndoc) time and uses O(t lg t) bits of space; the RMQ structure uses just 2t + o(t) bits and answers queries in constant time [17]. Furthermore, the RMQ structure does not even access C. Sadakane [46] replaces C by a bitvector V [1, D] to mark which elements have been reported. He sets V initially to all zeros and replaces the test C[k] < i by V [A[k]] = 0, that is, the value A[k] has not yet been reported (these tests are equivalent only if we recurse left and then right in the interval [40]). If so, he reports A[k] and sets V [A[k]] ← 1. Overall, he needs only O(t + D) bits of space on top of A, and still runs in O(ndoc) time (V can be reset to zeros by rerunning the query or through lazy initialization). Hon et al. [25] further reduce the extra space to o(t) bits, yet increasing the time, via sampling the array C. In this paper we introduce a variant of Sadakane’s document listing technique that might have independent interest, see Section 4.2 and Lemma 6 in Appendix A. 3.2 Wavelet trees A wavelet tree [24] is a sequence representation that supports, in particular, two-dimensional orthogonal range queries [11, 41]. Let (1, y1 ), (2, y2 ), . . . , (r, yr ) be a sequence of points with yi ∈ [1, r], and let S = y1 y2 . . . yr be the y coordinates in order. The wavelet tree is a G. Navarro perfectly balanced binary tree where each node handles a range of y values. The root handles [1, r]. If a node handles [a, b] then its left child handles [a, µ] and its right child handles [µ + 1, b], with µ = b(a + b)/2c. The leaves handle individual y values. If a node handles range [a, b], then it represents the subsequence Sa,b of y coordinates that belong to [a, b]. Thus at each level the strings Sa,b form a permutation of S. What is stored for each such node is a bitvector Ba,b so that Ba,b [i] = 0 iff Sa,b ≤ µ, that is, if that value is handled in the left child of the node. Those bitvectors are provided with support for rank and select queries: rankv (B, i) is the number of occurrences of bit v in B[1, i], whereas selectv (B, j) is the position of the jth occurrence of bit v in B. The wavelet tree has height lg r, and its total space requirement for all the bitvectors Ba,b is r lg r bits. The extra structures for rank and select add o(r lg r) further bits and support the queries in constant time [12, 35]. With the wavelet tree one can recover any yi value by tracking it down from the root to a leaf, but let us describe a more general procedure. Range queries Let [x1 , x2 ] × [y1 , y2 ] be a query range. The number of points that fall in the range can be counted in O(lg r) time as follows. We start at the root with the range S[x1 , x2 ] = S1,r [x1 , x2 ]. Then we project the range both left and right, towards S1,µ [rank0 (B1,r , x1 − 1) + 1, rank0 (B1,r , x2 )] and Sµ+1,r [rank1 (B1,r , x1 − 1) + 1, rank1 (B1,r , x2 )], respectively, with µ = b(r + 1)/2c. If some of the ranges is empty, we stop the recursion on that node. If the interval [a, b] handled by a node is disjoint with [y1 , y2 ], we also stop. If the interval [a, b] is contained in [y1 , y2 ], then all the points in the x range qualify, and we simply sum the length of the range to the count. Otherwise, we keep splitting the ranges recursively. It is well known that the range [y1 , y2 ] is covered by O(lg r) wavelet tree nodes, and that we traverse O(lg r) nodes to reach them (see Gagie et al. [22] for a review of this and more refined properties). If we also want to report all the corresponding y values, then instead of counting the points found, we track each one individually towards its leaf, in O(lg r) time. At the leaves, the y values are sorted. In particular, if they are a permutation of [1, r], we know that the ith left-to-right leaf is the value y = i. Thus, extracting the nocc results takes time O((1 + nocc) lg r). Faster reporting By using O(r lg r) bits, it is possible to track the positions faster in upward direction, and associate the values to their root positions. By using O((1/)r lg r) bits, on can reach the root position of a symbol in time O((1/) lg r), for any  > 0 [11, 41]. Therefore, the nocc results can be extracted in time O(lg r + nocc lg r) for any constant . Summary queries Navarro et al. [42] showed how to perform summary queries on wavelet trees, that is, instead of listing all the points that belong to a query range, compute some summary on them faster than listing the points one by one. For example, if the points are assigned values in [1, N ], then one can use O(r lg N ) bits and compute the sum, average, or variance of the values associated with points in a range in time O(lg3 r), or their minimum/maximum in O(lg2 r) time. The idea is to associate further data to the sequences Sa,b and carry out range queries on the O(lg r) ranges into which two-dimensional queries are decomposed, in order to compute the desired summarizations. To save space, one may sample the levels for which the extra data is stored. XX:5 XX:6 Document Listing on Repetitive Collections In this paper we show that the O(lg3 r) time can be improved to O(lg2+ r), for any  > 0, within the same asymptotic space. See Theorem 4 in Section 6. 3.3 Range minimum queries on arrays with runs Let A[1, t] be an array that can be cut into ρ runs of nondecreasing values. Then it is possible to solve RMQs in O(lg lg t) time plus O(1) accesses to A using O(ρ lg(t/ρ)) bits. The idea is that the possible minima (breaking ties in favor of the leftmost) in A[i, j] are either A[i] or the positions where runs start in the range. Then, we can use a sparse bitvector M [1, t] marking with M [k] = 1 the run heads. We also define an array A0 [1, ρ], so that if M [k] = 1 then A0 [rank1 (M, k)] = A[k]. We do not store A0 , but just an RMQ structure on it. Hence, the minimum of the run heads in A[i, j] can be found by computing the range of run heads involved, i0 = rank1 (M, i − 1) + 1 and j 0 = rank1 (M, j), then finding the smallest value among them in A0 with k 0 = rmqA0 (i0 , j 0 ), and mapping it back to A with k = select1 (M, k 0 ). Finally, the RMQ answer is either A[i] or A[k], so we access A twice to compare them. This idea was used by Gagie et al. [20, Sec 3.2] for runs of equal values, but it works verbatim for runs of nondecreasing values. They show how to store M in ρ lg(t/ρ) + O(ρ) bits so that it solves rank in O(lg lg t) time and select in O(1) time, by augmenting a sparse bitvector representation [44]. This dominates the space and time of the whole structure. The idea was used even before by Barbay et al. [4, Thm. 2], for runs of nondecreasing values. They represented M using ρ lg(t/ρ) + O(ρ) + o(t) bits so that the O(lg lg t) time becomes O(1), but we cannot afford the o(t) extra bits in this paper. 3.4 Grammar compression Let T [1, N ] be a sequence of symbols over alphabet [1, σ]. Grammar compressing T means finding a context-free grammar that generates T and only T . The grammar can then be used as a substitute for T , which provides good compression when T is repetitive. We are interested, for simplicty, in grammars in Chomsky normal form, where the rules are of the form A → BC or A → a, where A, B, and C are nonterminals and a ∈ [1, σ] is a terminal symbol. For every grammar, there is a proportionally sized grammar in this form. A Lempel-Ziv parse [31] of T cuts T into z phrases, so that each phrase T [i, j] appears earlier in T [i0 , j 0 ], with i0 < i. It is known that the smallest grammar generating T must have at least z rules [45, 10], and that it is possible to convert a Lempel-Ziv parse into a grammar with r = O(z lg(N/z)) rules [45, 10, 47, 28, 29]. Furthermore, such grammars can be balanced, that is, the parse tree is of height O(lg N ). By storing the length of the string to which every nonterminal expands, it is easy to access any substring T [i, j] from its compressed representation in time O(j − i + lg N ) by tracking down the range in the parse tree. This can be done even on an unbalanced grammar [8]. The total space used by this representation, with a grammar of r rules, is O(r lg N ) bits. 3.5 Grammar-based indexing The pattern-matching index of Claude and Navarro [14] builds on a grammar in Chomsky normal form that generates a text T [1, N ], with r + 1 rules. Let s(A) be the string generated by nonterminal A. Then they collect the strings s(A) for all those nonterminals, except the initial symbol S. Let C1 , . . . , Cr be the nonterminals sorted lexicographically by s(A) and let B1 , . . . , Br be the nonterminals sorted lexicographically by the reverse strings, s(A)rev . They create a set of points in [1, r] × [1, r] so that (i, j) is a point (corresponding to nonterminal A) if the rule that defines A is A → Bi Cj . Those points are stored in a wavelet tree. G. Navarro To search for a pattern P [1, m], they first find the primary occurrences, that is, those that appear when B is concatenated with C in a rule A → BC. The secondary occurrences, which appear when A is used elsewhere, are found in a way that does not matter for this paper. To find the primary occurrences, they cut P into two nonempty parts P = P1 P2 , in the m − 1 possible ways. For each cut, they binary search for P1rev in the sorted set s(B1 )rev , . . . , s(Br )rev and for P2 in the sorted set s(C1 ), . . . , s(Cr ). Let [x1 , x2 ] be the interval obtained for P1 and [y1 , y2 ] the one obtained for P2 . Then all the points in [x1 , x2 ] × [y1 , y2 ], for all the m − 1 partitions of P , are the primary occurrences. To search for P1rev or for P2 , the grammar is used to extract the required substrings of T in time O(m + lg N ), so the overall search time to find the nocc primary occurrences is O(m lg r(m + lg N ) + lg r · nocc). Let us describe the fastest possible variant that uses O(r lg N ) bits, disregarding constant factors in the space. Within O(r lg N ) bits, one can store Patricia trees [34] on the strings s(Birev ) and s(Ci ), to speed up binary searches and reduce the time to O(m(m + lg N ) + lg r · nocc). Also, one can use the structure of Gasieniec et al. [23] that, within O(r lg N ) further bits, allows extracting any prefix/suffix of any nonterminal in constant time per symbol (see Claude and Navarro [15] for more details). Since in our search we only access prefixes/suffixes of whole nonterminals, this further reduces the time to O(m2 + lg r · nocc). Finally, we can use the technique described at the end of Section 3.2 to obtain time O(m2 + lg r · nocc), for any constant  > 0. Counting This index locates the occurrences of P one by one, but cannot count them without locating them all. This is a feature easily supported by suffix-array-based compressed indexes [33, 21] in O(m lg N ) time or less, but so far unavailable in grammar-based or Lempel-Ziv-based compressed indexes. In Theorem 5 of Section 6 we offer for the first time efficient counting for grammar-based indexes. Within their same asymptotic space, we can count in time O(m2 + m lg2+ r) for any constant  > 0. Document listing The original structure was also unable to perform document listing without locating all the occurrences and determining the document where each belongs. Claude and Munro [13] showed how to extend it in order to support document listing on a collection D of D string documents, which are concatenated into a text T [1, N ]. To each nonterminal A they associate the increasing list `(A) of the identifiers of the documents (integers in [1, D]) where A appears. To perform document listing, they find all the primary occurrences A → BC of all the partitions of P , and merge their lists. There is no useful worst-case time bound for this operation other than O(nocc · ndoc), where nocc can be much larger than ndoc. To reduce space, they also grammar-compress the sequence of all the r lists `(A). They also give no worst-case space bound for the compressed lists (other than O(rD lg D) bits). At the end of Section 5.1 we show that, under our repetitiveness model, this index can be made to occupy O(n lg σ +s lg2 N ) bits, which is what can be expected from a grammar-based index according to our discussion. Still, it gives no worst-case guarantees for the document listing time. In Theorems 2 and 3 we show that, by multiplying the space by an O(lg D) factor, document listing is possible in time O(m2 + m lg1+ N · ndoc) for any constant  > 0. XX:7 XX:8 Document Listing on Repetitive Collections 4 Our Document Listing Index We build on the basic structure of Claude and Munro [13]. Our main idea is to take advantage of the fact that the nocc primary occurrences to detect in Section 3.5 are found as points in the two-dimensional structure, along O(lg r) ranges within wavelet tree nodes (recall Section 3.2) for each partition of P . Instead of retrieving the nocc individual lists, decompressing and merging them [13], we will use the techniques to extract the distinct elements of a range seen in Section 3.1. This will drastically reduce the amount of merging necessary, and will provide useful upper bounds on the document listing time. 4.1 Structure We store the grammar of T in a way that it allows direct access for pattern searches, as well as the wavelet tree for the points (Bi , Cj ), the Patricia trees, and extraction of prefixes/suffixes of nonterminals, all in O(r lg N ) bits. Consider any sequence Sa,b [1, q] at a wavelet tree node handling the range [a, b] (recall that those sequences are not explicitly stored). Each element Sa,b [k] = Ak corresponds to a point (i, j) associated with a nonterminal Ak → Bi Cj . Then let La,b = `(A1 ) · `(A2 ) · · · `(Aq ) be the concatenation of the inverted lists associated with the nonterminals in Sa,b , and let Ma,b = 10|`(A1 )|−1 10|`(A2 )|−1 . . . 10|`(Aq )|−1 mark where each list begins in La,b . Now let Ca,b be the C-array corresponding to La,b , as described in Section 3.1. As in that section, we do not store La,b nor Ca,b , but just the RMQ structure on Ca,b , which together with Ma,b will be used to retrieve the unique documents in a range Sa,b [i, j]. Since Ma,b has only r 1s out of (at most) rD bits across all the wavelet tree nodes of the same level, it can be stored with O(r lg D) bits per level [44], and O(r lg r lg D) bits overall. On the other hand, as we will show, Ca,b is formed by a few increasing runs, say ρ across the wavelet tree nodes of the same level, and therefore we represent its RMQ structure using the technique of Section 3.3. The total space used by those RMQ structures is then O(ρ lg r lg(rD/ρ)) bits. Finally, we store the explicit lists `(Bi ) aligned to the wavelet tree leaves, so that the list of any element in any sequence Sa,b is reached in O(lg r) time by tracking down the element. Those lists, of maximum total length rD, are grammar-compressed as well, just as in the basic scheme [13]. If the grammar has r0 rules, then the total compressed size is O(r0 lg(rD)) bits to allow for direct access in O(lg(rD)) time, see Section 3.4. In total, our structure uses O(r lg N + r lg r lg D + ρ lg r lg(rD/ρ) + r0 lg(rD)) bits. 4.2 Document listing A document listing query proceeds as follows. We cut P in the m − 1 possible ways, and for each way identify the O(lg r) wavelet tree nodes (and ranges) where the desired points lie. Overall, we have O(m lg r) ranges and need to take the union of the inverted lists of all the points inside those ranges. We extract the distinct documents in each range and then compute their union. If a range has only one element, then we can track it to the leaves, where its list `(·) is stored, and recover it by decompressing the whole list. Otherwise, we use in principle the document listing technique of Section 3.1. Let Sa,b [i, j] be a range from where to obtain the distinct documents. We compute i0 = select1 (Ma,b , i) and j 0 = select1 (Ma,b , j + 1) − 1, and obtain the distinct elements in La,b [i0 , j 0 ], by using RMQs on Ca,b [i0 , j 0 ]. Recall that, as in Section 3.3, we use a run-length compressed RMQ structure on Ca,b . With this arrangement, every RMQ operation takes time O(lg lg(rD)) G. Navarro plus the time to accesses two cells in Ca,b . Those accesses are made to compare a run head with the leftmost element of the query interval, Ca,b [i0 ]. The problem is that we have not represented the cells of Ca,b , and cannot easily compute them on the fly. Barbay et al. [4, Thm. 3] give a representation that determines the position of the minimum in Ca,b [i0 , j 0 ] without the need to perform the two accesses on Ca,b . They need ρ lg(rD) + ρ lg(rD/ρ) + O(ρ) + o(rD) bits, which unfortunately is too high for us1 . Instead, we modify the way the distinct elements are obtained, so that comparing the two cells of Ca,b is unnecessary. In the same spirit of Sadakane’s solution (see Section 3.1) we use a bitvector V [1, D] where we mark the documents already reported. Given a range Sa,b [i, j] = Ai . . . Aj , we first track Ai down the wavelet tree, recover and decompress its list `(Ai ), and mark all of its documents in V . Note that all the documents in the list `(·) are different. Now we do the same with Ai+1 , decompressing `(Ai+1 ) left to right and marking the documents in V , and so on, until we decompress a document `(Ai+d )[k] that is already marked in V . Only now we use the RMQ technique of Section 3.3 on the interval Ca,b [i0 , j 0 ], where i0 = select1 (Ma,b , i + d) − 1 + k and j 0 = select1 (Ma,b , j + 1) − 1, to obtain the next document to report. This technique, as explained, yields two candidates: one is La,b [i0 ] = `(Ai+d )[k] itself, and the other is some run head La,b [k 0 ] whose identity we can obtain from the wavelet tree leaf. But we know that La,b [i0 ] was already reported, so we act as if the RMQ was always La,b [k 0 ]: If the RMQ answer was La,b [i0 ] then, since it is already reported, we should stop. But in this case, La,b [k 0 ] is also already reported and we do stop anyway. Hence, if La,b [k 0 ] is already reported we stop, and otherwise we report it and continue recursively on the intervals Ca,b [i0 , k 0 − 1] and Ca,b [k 0 + 1, j 0 ]. On the first, we can continue directly, as we still know that La,b [i0 ] is already reported. On the second interval, instead, we must restore the invariant that the leftmost element was already reported. So we find out with M the list and position `(At )[u] corresponding to Ca,b [k 0 + 1] (i.e., t = rank1 (Ma,b , k 0 + 1) and u = k 0 + 1 − select1 (M, t) + 1), track At down to its leaf in the wavelet tree, and traverse `(At ) from position u onwards, reporting documents until finding one that has been reported. The correctness of this document listing algorithm is proved in Appendix A. The m − 1 searches for partitions of P take time O(m2 ). In the worst case, extracting each distinct document in the range requires an RMQ computation without access to Ca,b (O(lg lg(rD)) time), tracking an element down the wavelet tree (O(lg r) time), and extracting an element from its grammar-compressed list `(·) (O(lg(rD) time). This adds up to O(lg(rD)) time per document extracted in a range. In the worst case, however, the same documents are extracted over and over in all the O(m lg r) ranges, and therefore the final search time is O(m2 + m lg r lg(rD) · ndoc). 5 Analysis in a Repetitive Scenario Our structure uses O(r lg N + r lg r lg D + ρ lg r lg(rD/ρ) + r0 lg(rD)) bits, and performs document listing in time O(m2 + m lg r lg(rD) · ndoc). We now specialize those formulas under our repetitiveness model. Note that our index works on any string collection; we use the simplified model of the D − 1 copies of a single document of length n, plus the s edits, to obtain analytical results that are easy to interpret in terms of repetitiveness. We also assume a particular strategy to generate the grammars in order to show that it is possible to obtain the complexities we give. This involves determining the minimum 1 Even if we get rid of the o(rD) component, the ρ lg(rD) term becomes O(s lg3 N ) in the final space, which is larger than what we manage to obtain. Also, using it does not make our solution faster. XX:9 XX:10 Document Listing on Repetitive Collections number of edits that distinguishes each document from the previous one. We first consider the model where each of the s edits is a single-character insertion, deletion, or substitution. If the s edit positions are not given explicitly, the optimal set of s edits can still be obtained at construction time, with cost O(N s), using dynamic programming [50]. Later, we consider a generalized case where each edit involves a block of characters. 5.1 Space Consider the model where we have s single-character edits affecting a range of document identifiers. This includes the model where each edit affects a single document, as a special case. The model where the documents form a tree of versions, and each edit affects a whole subtree, also boils down to the model of ranges by numbering the documents according to their preorder position in the tree of versions. An edit that affects a range of documents di , . . . , dj will be regarded as two edits: one that applies the change at di and one that undoes it at dj (if needed, since the edit may be overriden by another later edit). Thus, we will assume that there are at most 2s edits, each of which affects all the documents starting from the one where it applies. We will then assume s ≥ (D − 1)/2, since otherwise there will be identical documents, and this is easily reduced to a smaller collection with multiple identifiers per document. Our grammar The documents are concatenated into a single text T [1, N ], where N ≤ D(n + s). Let us make our grammar for T contain the O(N 1/3 ) nonterminals that generate all the strings of length up to 13 lgσ N , which we will call “metasymbols”. Then the grammar replaces the first document with Θ(n/ lgσ N ) such nonterminals, and builds a balanced binary parse tree of height h = Θ(lg n) on top of them. All the internal nodes of this tree are distinct nonterminal symbols (even if they generate the same text), and end up in a root symbol S1 . Now we regard the subsequent documents one by one. For each new document d, we start by copying the parse tree from the previous one, d − 1, including the start symbol Sd = Sd−1 . Then, we apply the edits that start at that document. Let h be the height of its parse tree. A character substitution requires replacing the metasymbol covering the position where the edit applies, and then renaming the nonterminals A1 , . . . , Ah = Sd in the path from the parent of the metasymbol to the root. Each Ai in the path is replaced by a new nonterminal A0i . The nonterminals that do not belong to the path are not affected. A deletion proceeds similarly: we replace the metasymbol of length k by one of length k − 1 (we leave the metasymbol of length 0, the empty string, unchanged if it appears as a result of deletions). Finally, an insertion into a metasymbol of length k replaces it by one of length k + 1, unless k was already the maximum metasymbol length, 13 lgσ N . In this case we replace the metasymbol leaf by an internal node with two leaves, which are metasymbols of length around 13 lgσ N . To maintain a balanced tree, we use the AVL insertion mechanism, which may modify O(h) nodes toward the root. This ensures that, even in documents receiving s insertions, the height of the parse tree will be O(lg(n + s)). Since each edit creates O(lg(n + s)) new nonterminals, the final grammar size is r = 1/3 Θ(N + n/ lgσ N + s lg(n + s)) = Θ(n/ lgσ N + s lg N ), where we used that either n or s is √ Ω( N ) because N ≤ D(n + s) ≤ (2s + 1)(n + s). Once all the edits are applied, we add a balanced tree on top of those O(r) symbols, which asymptotically does not change r (we may also avoid this final tree and access the documents individually, since our accesses never cross document borders). G. Navarro Inverted lists Our model makes it particularly easy to bound r0 . Each nonterminal occurs at most once in a document, since we either create it when parsing the initial copy or when applying an edit. Thus it appears for the first time in a document d (which is 1 if it is in the initial copy). Later, when an edit replaces it by another nonterminal, it does never appear again: note that each new document starts by copying those appearing the previous copy, destroying some of them, and creating new ones. Even when an edit is “undone”, we do not restore the previous nonterminal, but rather create a new one that might happen to expand to the same string of the original one. Therefore, each nonterminal spans a range of documents [d, d0 ], which might be stored without resorting to grammars in O(r lg D) bits. Any element of the list is obviously accessed in O(1) time, faster than on the general scheme we described. Run-length compressed arrays C Finally, let us now bound ρ. When we have only the initial copy, all the existing nonterminals mention document 1, and thus C has a single nondecreasing run. Now consider the moment where we process document d. We will insert the value d at the end of the lists of all the nonterminals A that appear in document d. As long as document d uses the same parse tree of document d − 1, no new runs are created in C. I Lemma 1. If document d uses the same nonterminals as document d − 1, inserting it in the inverted lists does not create any new run in the C arrays. Proof. The positions p1 , . . . , pk where we insert the document d in the lists of the nonterminals that appear in it, will be chained in a list where C[pi+1 ] = pi and C[p1 ] = 0. Since all the nonterminals A also appear in document d − 1, the lists will contain the value d − 1 at positions p1 −1, . . . , pk −1, and we will have C[pi+1 −1] = pi −1 and C[p1 −1] = 0. Therefore, the new values we insert for d will not create new runs: C[p1 ] = C[p1 − 1] = 0 does not create a run, and neither can C[pi+1 ] = C[pi+1 − 1] + 1, because if C[pi+1 + 1] < C[pi+1 ] = pi , then we are only creating a new run if C[pi+1 + 1] = pi − 1, but this cannot be since C[pi+1 − 1] = pi − 1 = C[pi+1 + 1] and in this case C[pi+1 + 1] should have pointed to pi+1 − 1. J Now, each edit we apply on d makes O(lg N ) nonterminals appear or disappear, and thus O(lg N ) values of d appear or disappear in C. Each such change may break a run. Therefore, C may have at most ρ = O(s lg N ) runs per wavelet tree level. Total Therefore, the total size of the index can be expressed as follows. The O(r lg r lg D) bits coming from the sparse bitvectors M , is O(r lg N lg D) (since lg r = Θ(lg(ns)) = Θ(lg N )), and thus it is O(n lg σ lg D + s lg2 N lg D). This subsumes the O(r lg N ) bits of the grammar and the wavelet tree. The O(ρ lg r lg(rD/ρ)) bits of the structures C are monotonically increasing with ρ, so since ρ = s lg N = O(r), we can upper bound it by replacing ρ with r, obtaining O(r lg r lg D) as in the space for M . Finally, the inverted lists can be represented with just O(r lg D) bits. Overall, the structures add up to O((n lg σ + s lg2 N ) lg D) bits. Note that we can also analyze the space required by Claude and Munro’s structure [13], which is O(r lg N ) = O(n lg σ + s lg2 N ) bits. Although smaller than ours by an O(lg D) factor, their search time has no useful bounds. XX:11 XX:12 Document Listing on Repetitive Collections 5.2 Time Our search time is O(m2 + m lg r lg(rD) · ndoc) = O(m2 + m lg2 N · ndoc). The O(lg(rD)) cost corresponds to accessing a list `(A) from the wavelet tree, and includes the O(lg r) time to reach the leaf and the O(lg D) time to access a position in the grammar-compressed list. Since we have replaced the grammar-compressed lists by a simple range, this cost is now simply O(lg r). As seen in Section 3.2, it is possible to reduce this O(lg r) tracking time to O((1/) lg n) for any  > 0, within O((1/)r lg N ) bits. In this case, the lists `(A) are associated with the symbols at the root of the wavelet tree, not the leaves. I Theorem 2. Let collection D, of total size N , be formed by an initial document of length n plus D − 1 copies of it, with s single-character edit operations performed on ranges or subtrees of documents. Then D can be represented within O((n lg σ + s lg2 N ) lg D) bits, so that the ndoc documents where a pattern of length m appears can be listed in time O(m2 + m lg1+ N · ndoc), for any constant  > 0. We can also obtain other tradeoffs. For example, with  = 1/ lg lg r we obtain O((n lg σ + s lg2 N )(lg D + lg lg N )) bits of space and O(m2 + m lg N lg lg N · ndoc) search time. 5.3 Block edits Let us now consider that each edit involves removing a block of characters, inserting a block that exists somewhere else, or inserting a completely new block. Other operations, like replacing a block by another existing or new block, or moving a block to another position, are simulated with a constant number of operations from the set we are considering. Let us first consider the process of removing a block S[i, j] from a document S, for which we have an AVL parse tree T of height h. Let v be the lowest common ancestor of the leaves i and j. Then, we must remove from T every right child in the path from v to the leaf i and every left child in the path from v to the leaf j (v not included, in either case). The remaining tree is obtained by merging up to 2h subtrees of T : (1) from each node u in the path from the root of T to the leaf i, if the leaf descends from the right child of u, then the left child of u is the root of a new subtree to merge; (2) for each node u in the path from the leaf j to the root of T , if the leaf descends from the left child of u, then the right child of u is the root of a new subtree to merge. All the selected subtrees are AVL trees, and they form two series whose consecutive height differences add up to h. Rytter [45] shows how to merge those sets of subtrees into a new AVL using O(h) new nodes. We can therefore accommodate the deletion of a block using O(lg N ) new nonterminal symbols. Consider now an insertion between the leaves i and j = i + 1. We cut T into 2h subtrees as before. We also create a new AVL with the parse tree of the inserted block. If this is a new text of length `, then we create the O(`/ lgσ n) new nonterminals necessary to create a perfectly balanced tree on the new text. If, instead, it is a text copied from elsewhere in the previous document, then we obtain the O(lg N ) internal nodes in the parse tree that cover the source block. Rytter [45] also shows how to create an AVL from the nodes that cover an arbitrary substring of this type, using O(lg `) new nodes. In any case, we have the first h AVL subtrees of T , then the AVL tree of the block to be inserted, and then the second h AVL subtrees of T . Those can be, again, merged into a single AVL using O(lg N ) new nonterminal symbols. Summarizing, we can accomodate edits of whole blocks at the cost of O(lg N ) created or removed nonterminals per edit, plus O(`/ lgσ n) new nonterminals when a new block of length ` is created. As explained, we charge to n not only the size of the initial document, G. Navarro but also that of all the new blocks that are created upon insertions (i.e., not from copies of other parts of the text). If we call ` the maximum size of a block edit and enforce ` ≤ n, then N ≤ D(n + s`) ≤ Dn(s + 1). We can therefore use 14 lgσ N as our maximum metasymbol size, so that the grammar is of size at most O(N 1/4 + n/ lgσ N + s lg N ) = O(n/ lgσ N + s lg N ), where we used that, since N ≤ D(n + s`) ≤ (2s + 1)n(s + 1), then either s or n must be Ω(N 1/3 ). All the rest of our calculations stays unchanged. I Theorem 3. Let collection D, of total size N , be formed by an initial document of length n plus D − 1 copies of it, with s block edit operations performed on ranges or subtrees of documents. The blocks can be of length up to n, and the sizes of the blocks created with new text are also counted in n. Then D can be represented within O((n lg σ + s lg2 N ) lg D) bits, so that the ndoc documents where a pattern of length m appears can be listed in time O(m2 + m lg1+ N · ndoc), for any constant  > 0. The only word of caution about this model is that, if we are not given the edits explicitly, then obtaining the minimum number of block edits needed to convert the previous document to the current one may be costly. Depending on the edit operations permitted, finding the optimal set of block edits can be reasonably easy or NP-complete [49, 32, 48, 2]. 6 Counting Pattern Occurrences Our idea of associating augmented information with the wavelet tree of the grammar has independent interest. We illustrate this by developing a variant where we can count the number of times a pattern P occurs in the text without having to enumerate all the occurrences, as is the case with all the grammar-based indexes [14, 15]. In these structures, the primary ocurrences are found as points in m − 1 ranges of a grid (recall Section 3.5). Each primary occurrence then triggers a number of secondary occurrences, distinct from those triggered by other primary occurrences. These secondary occurrences depend only on the point: if P occurs when B and C are concatenated in the rule A → BC, then every other occurrence of A or of its ancestors in the parse tree produces a distinct secondary occurrence. We can therefore associate with each point the number of secondary occurrences it produces, and thus the total number of occurrences of P is the sum of the numbers associated with the points contained in the m − 1 ranges. By augmenting the wavelet tree (recall Section 3.2) of the grid, the sum in each range can be computed in time O(lg3 r), using O(r lg N ) further bits of space for the grid [42, Thm. 6].2 We now show how this result can be improved to time O(lg2+ r) for any constant  > 0. Instead of only sums, we consider the more general case of a finite group [42], so our particular case is ([0, N ], +, −, 0). I Theorem 4. Let a grid of size r × r store r points with associated values in a group (G, ⊕,−1 , 0) of N = |G| elements. For any  > 0, a structure of O((1/)r lg N ) bits can compute the sum ⊕ of the values in any rectangular range in time O((1/) lg2+ r). Proof. We modify the proof Navarro et al. [42, Thm. 6]. They consider, for the sequence Sa,b of each wavelet tree node, the sequence of associated values Va,b . They store a cumulative array Aa,b [0] = 0 and Aa,b [i + 1] = Aa,b [i] ⊕ Va,b [i + 1], so that any range sum ⊕i≤k≤j Va,b [k] = Aa,b [j] ⊕ Aa,b [i − 1]−1 is computed in constant time. The space to store Aa,b across all the levels is O(r lg r lg N ) bits. To reduce it to O(r lg N ), they store instead the cumulative sums 2 Although the theorem states that it must be t ≥ 1, it turns out that one can use t = lg r/ lg N (i.e., τ = lg r) to obtain this tradeoff (our r is their n and our N is their W ). XX:13 XX:14 Document Listing on Repetitive Collections 0 0 of a sampled array Va,b , where Va,b [i] = ⊕(i−1) lg r<k≤i lg r Va,b [k]. They can then compute 0 any range sum over V , with which they can compute any range sum over V except for up to lg r elements in each extreme. Each of those extreme elements can be tracked up to the root in time O((1/) lg r), for any  > 0, using O((1/)r lg r) bits, as described at the end of Section 3.2. The root sequence V1,r is stored explicitly, in r lg N bits. Therefore, we can sum the values in any range of any wavelet tree node in time O((1/) lg1+ r). Since any two-dimensional range is decomposed into O(lg r) wavelet tree ranges, we can find the sum in time O((1/) lg2+ r). J This immediately yields the first grammar-compressed index able to count pattern occurrences without locating them one by one. I Theorem 5. Let text T [1, N ] be represented by a grammar of size r. Then there exists an index of O(r lg N ) bits that can count the number of occurrences of a pattern P [1, m] in T in time O(m2 + m lg2+ r), for any constant  > 0. 7 Conclusions We have presented the first document listing index with worst-case space and time guarantees that are useful for repetitive collections. On a collection of size N formed by an initial document of length n and D − 1 copies it, with s single-character or block edits applied on individual documents, or ranges of documents (when there is a linear structure of versions), or subtrees of documents (when there is a hierarchical structure of versions), our index uses O((n lg σ + s lg2 N ) lg D) bits and lists the ndoc documents where a pattern of length m appears in time O(m2 + m lg1+ N · ndoc), for any constant  > 0. We also prove that a previous index that had not been analyzed [13], but which has no useful worst-case time bounds for listing, uses O(n lg σ + s lg2 N ) bits. As a byproduct, we offer a new variant of a structure that finds the distinct values in an array range [36, 46]. The general technique we use, of augmenting the range search data structure used by grammar-based indexes, can be used for other kind of summarization queries. We illustrate this by providing the first grammar-based index that uses O(r lg N ) bits, where r is the size of a grammar that generates the text, and counts the number of occurrences of a pattern in time O(m2 + m lg2+ r), for any constant  > 0. As a byproduct, we improve a previous result [42] on summing values over two-dimensional point ranges. Future work The space of our document listing index is an O(lg D) factor away from what can be expected from a grammar-based index. An important question is whether this space factor can be removed or reduced while retaining worst-case time guarantees for document listing. Another interesting question is whether there exists an index (or a better analysis of this index) whose space and time can be bounded in terms of more general repetitiveness measures of the collection, for example in terms of the size r of a grammar that represents the text, as is the case of grammar-based pattern matching indexes that list all the occurrences of a pattern [14, 15], and of our own index that counts the number of occurrences of a pattern. Yet another question is whether we can apply the idea of augmenting the two-dimensional data structure in order to handle other kinds of summarization queries that are of interest in pattern matching and document retrieval [40], for example counting the number of distinct documents where the pattern appears, or retrieving the k most important of those documents, or retrieving the occurrences that are in a range of documents. G. Navarro A Proof of Correctness We prove that our new document listing algorithm is correct. We remind that the algorithm proceeds as follows, to find the distinct elements in A[sp, ep]. It starts recursively with [i, j] = [sp, ep] and remembers the documents that have already been reported, globally. To process interval [i, j], it considers A[i], A[i + 1], . . . until finding an already reported element at A[d]. Then it finds the minimum C[k] in C[d, j]. If A[k] has been reported already, it stops; otherwise it reports A[k] and proceeds recursively in A[d, k − 1] and A[k + 1, j], in this order. (The actual algorithm is a slight variant of this procedure, and its correctness is established at the end.) I Lemma 6. The described algorithm reports the ndoc distinct elements in A[sp, ep] in O(ndoc) steps. Proof. We prove that the algorithm reports the leftmost occurrence in A[sp, ep] of each distinct element. In particular, we prove by induction on j −i that, when run on any subrange [i, j] of [sp, ep], if (1) every leftmost occurrence in A[sp, i − 1] is already reported before processing [i, j], then (2) every leftmost occurrence in A[sp, j] is reported after processing [i, j]. Condition (1) holds for [i, j] = [sp, ep], and we need to establish that (2) holds after we process [i, j] = [sp, ep]. The base case i = j is trivial: the algorithm checks A[i] and reports it if it was not reported before. On a larger interval [i, j], the algorithm first reports d − i occurrences of distinct elements in A[i, d − 1]. Since these were not reported before, by condition (1) they must be leftmost occurrences in [sp, ep], and thus, after reporting all the leftmost occurrences of A[i, d − 1], condition (1) holds for any range starting at d. Now, we compute the position k with minimum C[k] in C[d, j]. Note that A[k] is a leftmost occurrence iff C[k] < sp, in which case it has not been reported before and thus it should be reported by the algorithm. The algorithm, indeed, detects that it has not been reported before and therefore recurses on A[d, k − 1], reports A[k], and finally recurses on A[k + 1, j].3 Since those subintervals are inside [i, j], we can apply induction. In the call on A[d, k − 1], the invariant (1) holds and thus by induction we have that after the call the invariant (2) holds, so all the leftmost occurrences in A[sp, k − 1] = A[sp, d − 1] · A[d, k − 1] have been reported. After we report A[k] too, the invariant (1) also holds for the call on A[k + 1, j], so by induction all the leftmost occurrences in A[sp, j] have been reported when the call returns. In case C[k] ≥ sp, A[k] is not a leftmost occurrence in A[sp, ep], and moreover there are no leftmost occurrences in A[d, j], so we should stop since all the leftmost occurrences in A[sp, j] = A[sp, d − 1] · A[d, j] are already reported. Indeed, it must hold sp ≤ C[k] < d, since otherwise C[C[k]] < C[k] and d ≤ C[C[k]] ≤ j, contradicting the definition of k. Therefore, by invariant (1), our algorithm already reported A[k] = A[C[k]], and hence it stops. Then the algorithm is correct. As for the time, clearly the algorithm never reports the same element twice. The sequential part reports d − i documents in time O(d − i + 1). The extra O(1) can be charged to the caller, as well as the O(1) cost of the subranges that do not produce any result. Each calling procedure reports at least one element A[k], so it can absorb those O(1) costs, for a total cost of O(ndoc). J 3 Since A[k] does not appear in A[d, k − 1], the algorithm also works if A[k] is reported before the recursive calls, which makes it real-time. XX:15 XX:16 Document Listing on Repetitive Collections The actual algorithm we use proceeds slightly differently, though. When it takes the minimum C[k] in C[d, j], if k = d, it ignores that value and takes instead k = k 0 , where k 0 is the second minimum in C[d, j]. Note that, when processing C[d, j] in the algorithm of Lemma 6, A[d] is known to occur in A[sp, d − 1]. Therefore, C[d] ≥ sp, and if k = d, the algorithm of Lemma 6 will stop. The actual algorithm chooses instead position k 0 , but C[k 0 ] ≥ C[d] ≥ sp, and therefore, as seen in the proof, the algorithm has already reported A[k 0 ], and thus the actual algorithm will also stop. Then the actual algorithm behaves identically to the algorithm of Lemma 6, and thus it is also correct. References 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Document retrieval on repetitive collections. Information Retrieval, 20:253–291, 2017. H.-Y. Ann, C.-B. Yang, Y.-H. Peng, and B.-C. Liaw. Efficient algorithms for the block edit problems. Information and Computation, 208(3):221–229, 2010. R. Baeza-Yates and B. Ribeiro. Modern Information Retrieval. Addison-Wesley, 1999. J. Barbay, J. Fischer, and G. Navarro. LRM-trees: Compressed indices, adaptive sorting, and compressed permutations. Theoretical Computer Science, 459:26–41, 2012. D. Belazzougui, F. Cunial, T. Gagie, N. Prezza, and M. Raffinot. Composite repetitionaware data structures. In Proc. 26th Annual Symposium on Combinatorial Pattern Matching (CPM), LNCS 9133, pages 26–39, 2015. D. Belazzougui, T. Gagie, S. Gog, G. Manzini, and J. Sirén. Relative FM-indexes. In Proc. 21st International Symposium on String Processing and Information Retrieval (SPIRE), LNCS 8799, pages 52–64, 2014. D. Belazzougui and G. Navarro. Alphabet-independent compressed text indexing. ACM Transactions on Algorithms, 10(4):article 23, 2014. P. Bille, G. M. Landau, R. Raman, K. Sadakane, S. S. Rao, and O. Weimann. Random access to grammar-compressed strings and trees. SIAM Journal on Computing, 44(3):513– 539, 2015. S. Büttcher, C. L. A. Clarke, and G. V. Cormack. Information Retrieval: Implementing and Evaluating Search Engines. MIT Press, 2010. M. Charikar, E. Lehman, D. Liu, R. Panigrahy, M. Prabhakaran, A. Sahai, and A. Shelat. The smallest grammar problem. IEEE Transactions on Information Theory, 51(7):2554– 2576, 2005. B. Chazelle. A functional approach to data structures and its use in multidimensional searching. SIAM Journal on Computing, 17(3):427–462, 1988. D. R. Clark. Compact PAT Trees. PhD thesis, University of Waterloo, Canada, 1996. F. Claude and J. I. Munro. Document listing on versioned documents. In Proc. 20th SPIRE, LNCS 8214, pages 72–83, 2013. F. Claude and G. Navarro. Self-indexed grammar-based compression. Fundamenta Informaticae, 111(3):313–337, 2010. F. Claude and G. Navarro. Improved grammar-based compressed indexes. In Proc. 19th Symposium on String Processing and Information Retrieval (SPIRE), LNCS 7608, pages 180–192, 2012. H. H. Do, J. Jansson, K. Sadakane, and W.-K. Sung. Fast relative Lempel-Ziv self-index for similar sequences. Theoretical Computer Science, 532:14–30, 2014. J. Fischer and V. Heun. Space-efficient preprocessing schemes for range minimum queries on static arrays. SIAM Journal on Computing, 40(2):465–492, 2011. T. Gagie, P. Gawrychowski, J. Kärkkäinen, Y. Nekrich, and S. J. Puglisi. A faster grammarbased self-index. In Proc. 6th International Conference on Language and Automata Theory and Applications (LATA), LNCS 7183, pages 240–251, 2012. G. Navarro 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 T. Gagie, P. Gawrychowski, J. Kärkkäinen, Y. Nekrich, and S. J. Puglisi. LZ77-based self-indexing with faster pattern matching. In Proc. 11th Latin American Theoretical Informatics Symposium (LATIN), LNCS 8392, pages 731–742, 2014. T. Gagie, K. Karhu, G. Navarro, S. J. Puglisi, and J. Sirén. Document listing on repetitive collections. In Proc. 24th Annual Symposium on Combinatorial Pattern Matching (CPM), LNCS 7922, pages 107–119, 2013. T. Gagie, G. Navarro, and N. Prezza. Optimal-time text indexing in BWT-runs bounded space. CoRR, abs/1705.10382, 2017. T. Gagie, G. Navarro, and S.J. Puglisi. New algorithms on wavelet trees and applications to information retrieval. Theoretical Computer Science, 426-427:25–41, 2012. L. Gasieniec, R. Kolpakov, I. Potapov, and P. Sant. Real-time traversal in grammar-based compressed files. In Proc. 15th Data Compression Conference (DCC), page 458, 2005. R. Grossi, A. Gupta, and J. S. Vitter. High-order entropy-compressed text indexes. In Proc. 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 841–850, 2003. W.-K. Hon, R. Shah, and J. Vitter. Space-efficient framework for top-k string retrieval problems. In Proc. 50th IEEE Annual Symposium on Foundations of Computer Science (FOCS), pages 713–722, 2009. S. Huang, T. W. Lam, W.-K. Sung, S.-L. Tam, and S.-M. Yiu. Indexing similar DNA sequences. In Proc. 6th International Conference on Algorithmic Aspects in Information and Management (AAIM), LNCS 6124, pages 180–190, 2010. D. Hucke, M. Lohrey, and C. P. Reh. The smallest grammar problem revisited. In Proc. 23rd Annual Symposium on Combinatorial Pattern Matching (CPM), LNCS 9954, pages 35–49, 2016. A. Jez. Approximation of grammar-based compression via recompression. Theoretical Computer Science, 592:115–134, 2015. A. Jez. A really simple approximation of smallest grammar. Theoretical Computer Science, 616:141–150, 2016. S. Kreft and G. Navarro. On compressing and indexing repetitive sequences. Theoretical Computer Science, 483:115–133, 2013. A. Lempel and J. Ziv. On the complexity of finite sequences. IEEE Transactions on Information Theory, 22(1):75–81, 1976. D. Lopresti and A. Tomkins. Block edit models for approximate string matching. Theoretical Computer Science, 181(1):159–179, 1997. V. Mäkinen, G. Navarro, J. Sirén, and N. Valimäki. Storage and retrieval of highly repetitive sequence collections. Journal of Computational Biology, 17(3):281–308, 2010. D. Morrison. PATRICIA – practical algorithm to retrieve information coded in alphanumeric. Journal of the ACM, 15(4):514–534, 1968. I. Munro. Tables. In Proc. 16th Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), LNCS 1180, pages 37–42, 1996. S. Muthukrishnan. Efficient algorithms for document retrieval problems. In Proc. 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 657–666, 2002. J. C. Na, H. Park, M. Crochemore, J. Holub, C. S. Iliopoulos, L. Mouchard, and K. Park. Suffix tree of alignment: An efficient index for similar data. In Proc. 24th International Workshop on Combinatorial Algorithms (IWOCA), LNCS 8288, pages 337–348, 2013. J. C. Na, H. Park, S. Lee, M. Hong, T. Lecroq, L. Mouchard, and K. Park. Suffix array of alignment: A practical index for similar data. In Proc. 20th International Symposium on String Processing and Information Retrieval (SPIRE), LNCS 8214, pages 243–254, 2013. G. Navarro. Indexing highly repetitive collections. In Proc. 23rd International Workshop on Combinatorial Algorithms (IWOCA), LNCS 7643, pages 274–279, 2012. XX:17 XX:18 Document Listing on Repetitive Collections 40 41 42 43 44 45 46 47 48 49 50 51 52 G. Navarro. Spaces, trees and colors: The algorithmic landscape of document retrieval on sequences. ACM Computing Surveys, 46(4):article 52, 2014. G. Navarro. Wavelet trees for all. Journal of Discrete Algorithms, 25:2–20, 2014. G. Navarro, Y. Nekrich, and L. Russo. Space-efficient data-analysis queries on grids. Theoretical Computer Science, 482:60–72, 2013. Gonzalo Navarro. Compact Data Structures – A practical approach. Cambridge University Press, 2016. D. Okanohara and K. Sadakane. Practical entropy-compressed rank/select dictionary. In Proc. 9th Workshop on Algorithm Engineering and Experiments (ALENEX), pages 60–70, 2007. W. Rytter. Application of Lempel-Ziv factorization to the approximation of grammar-based compression. Theoretical Computer Science, 302(1-3):211–222, 2003. K. Sadakane. Succinct data structures for flexible text retrieval systems. Journal of Discrete Algorithms, 5(1):12–22, 2007. H. Sakamoto. A fully linear-time approximation algorithm for grammar-based compression. Journal of Discrete Algorithms, 3(2–4):416–430, 2005. D. Shapira and J. A. Storer. Edit distance with move operations. Journal of Discrete Algorithms, 5(2):380–392, 2007. W. Tichy. The string-to-string correction problem with block moves. ACM Transactions on Computer Systems, 2(4):309–321, 1984. E. Ukkonen. Algorithms for approximate string matching. Information and Control, 64(1):100–118, 1985. E. Verbin and W. Yu. Data structure lower bounds on random access to grammarcompressed strings. In Proc. 24th Annual Symposium on Combinatorial Pattern Matching (CPM), LNCS 7922, pages 247–258, 2013. X. Yang, B. Wang, C. Li, J. Wang, and X. Xie. Efficient direct search on compressed genomic data. In Proc. 29th IEEE International Conference on Data Engineering (ICDE), pages 961–972, 2013.
8cs.DS
Algebraic characterisations of negatively-curved special groups and applications to graph braid groups Anthony Genevois September 6, 2017 arXiv:1709.01258v1 [math.GR] 5 Sep 2017 Abstract In this paper, we introduce a combinatorial formalism to study (virtually) special groups, introduced by Haglund and Wise. As a first application, we recover a result due to Caprace and Haglund: if the universal cover of a compact special cube complex X contains an n-dimensional flat, then π1 (X) contains a subgroup isomorphic to Zn . This implies that a virtually special group is hyperbolic if and only if it does not contain Z2 . As a second application, we characterize algebraically the acylindrical hyperbolicity of virtually special groups. More precisely, a virtually special group (which is not virtually cyclic) turns out to be acylindrically hyperbolic if and only if it does not virtually split as a direct product of two infinite groups if and only if it contains an infinite-order element whose centraliser is virtually cyclic. Finally, we prove that a special group is relatively hyperbolic if and only if it contains a finite collection of proper subgroups which is malnormal and such that any non cyclic abelian subgroup is included into a conjugate of some subgroup of this collection. As a consequence, it follows that a special group is hyperbolic relatively to abelian subgroups if and only if it does not contain F2 × Z. In the second part this paper, applications of our formalism to graph braid groups are given. Contents 1 Introduction 2 2 Nonpositively-curved cube complexes 6 3 Formalism: special colorings 10 4 Embedding into a right-angled Artin group 14 5 Periodic flats 16 6 Cartesian decomposition 18 7 Rank-one isometries 19 8 Malnormal subgroups and relative hyperbolicity 23 9 Applications to graph braid 9.1 Cubical geometry . . . . . 9.2 Gromov hyperbolicity . . 9.3 Acylindrical hyperbolicity 9.4 Relative hyperbolicity . . groups . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 31 36 40 44 51 1 1 Introduction The fundamental observation of the geometric group theory is that there exists a strong link between the algebraic properties of a given group and its geometric properties. Among the first historical results motivating this idea, one can mention Stallings’ theorem stating that a finitely generated group has at least two ends if and only if it splits non trivially over a finite subgroup; and Gromov’s theorem stating that a finitely generated group has polynomial growth if and only if it is virtually nilpotent. These results are even stronger: they characterize exactly and purely algebraically some geometric properties. In the same spirit, the goal of this paper is to state and prove algebraic characterizations of negatively curved properties in the class of (virtually) special groups. This family of groups, introduced by Haglund and Wise in [HW08a], became famous thanks to the fundamental role it has played in the proof of the Virtual Haken Conjecture [Ago13], and includes a large quantity of groups, such as right-angled Artin and Coxeter groups, small cancellation groups, hyperbolic free-by-cyclic groups, and many 3-manifolds groups. The starting point of our work is the introduction of a new combinatorial formalism to study special groups. Our motivation comes from Guba and Sapir’s diagram groups [GS97], which we studied in [Gen17b, Gen15, Gen16b, Gen17a]. Formally, the key observation is that a path in a special cube complex is uniquely determined by its origin and the sequence of (oriented) hyperplanes it crosses, which allows us to color the hyperplanes of a given special cube complex in order to describe the elements of its fundamental groupoid as words of colors (modulo a natural equivalence) relation. Such a coloring is called a special coloring. As a direct consequence of this formalism, we reprove naturally the following statement, originally proved in [HW08a]. We recall that the crossing graph of a cube complex is the graph whose vertices are its hyperplanes and whose edges link two transverse hyperplanes. Theorem 1.1. Let X be a special cube complex. If ∆ denotes its crossing graph, then π1 (X) embeds into the right-angled Artin group A(∆). The first negatively-curved property we consider is the famous Gromov’s hyperbolicity [Gro87]. A famous open problem is to determine whether or not a CAT(0) group which does not contain Z2 is necessarily hyperbolic. Even in the context of CAT(0) cube complexes, this problem remains open, although partial results were found in [CH09, SW11, NTY14]. In particular, a positive answer was proved in [CH09] for (virtually) special groups by studying Davis complexes and their convex subspaces. Thanks to our formalism, we are able to give a simpler and shorter proof of [CH09, Corollary 4]. More precisely, we prove: Theorem 1.2. Let X be a compact special cube complex. If its universal cover contain an n-dimensional combinatorial flat for some n ≥ 1, then π1 (X) contains Zn . Since the fundamental group of a nonpositively-curved cube complex X is hyperbolic if and only if the universal cover of X does not contain a (combinatorial) two-dimensional flat, it follows that: Corollary 1.3. A virtually cocompact special cube complex is hyperbolic if and only if it does not contain Z2 . The next negatively-curved property we are interested in is the acylindrical hyperbolicity, introduced by Osin in [Osi16] unifying several previously studied properties under a common formalism. Our first result in this direction provides a decomposition theorem, generalising a similar decomposition we proved for cocompact diagram groups in [Gen16b] (which are indeed special according to [Gen15]). 2 Theorem 1.4. A virtually special group virtually splits as a direct product Zn × G1 × · · · × Gm , where n, m ≥ 0 and where G1 , . . . , Gm are acylindrically hyperbolic special groups. It is worth noticing that this statement does not hold for arbitrary groups acting geometrically on CAT(0) cube complexes. Indeed, Burger and Mozes constructed in [BM97] torsion-free simple groups acting geometrically on products of trees, and such groups neither virtually split nor are acylindrically hyperbolic. Our second result on the acylindrical hyperbolicity of special groups characterizes algebraically their rank-one elements, or equivalently, their contracting isometries (which are precisely their generalized loxodromic elements, as defined in [Osi16]). Theorem 1.5. Let X be a compact special cube complex and let G denote its fundamental group. A loxodromic isometry g ∈ G is contracting if and only if its centraliser in G is virtually cyclic. We also noticed this result for cocompact diagram groups in [Gen16b]. However, we do not know counterexamples among groups acting geometrically on CAT(0) cube complexes. Question 1.6. Let G be a group acting geometrically on a CAT(0) cube complex X and S g ∈ G an infinite-order element. Define V CG (g) as the union of centralisers CG (g n ). n≥1 Is it true that g is a rank-one element of X if and only if V CG (g) is virtually cyclic? By combining the previous two theorems, one gets the following algebraic characterization of acylindrically hyperbolic (virtually) special groups: Corollary 1.7. Let G be a virtually special group. The following assertions are equivalent: • G is acylindrically hyperbolic; • G is not virtually cyclic and does not virtually split as a direct product of two infinite groups; • G is not virtually cyclic and contains an infinite-order element whose centraliser is virtually cyclic. Between Gromov’s hyperbolicity and acylindrical hyperbolicity, there is a third negatively-curved property that we did not mention yet: relative hyperbolicity. The main criterion we obtain is: Theorem 1.8. Let G be a virtually special group and H a finite collection of subgroups. Then G is hyperbolic relatively to H if and only if the following conditions are satisfied: • each subgroup of H is convex-cocompact; • H is an almost malnormal collection; • every non virtually cyclic abelian subgroup of G is contained into a conjugate of some group of H. It is worth noticing that the characterisation of relatively hyperbolic right-angled Coxeter groups (proved in [BHS17, Gen16a]), and more generally the characterisation of relatively hyperbolic graph products of finite groups (which is a particular case of [Gen17a, Theorem 8.33]), follows easily from Theorem 8.1. However, this criterion does 3 not provide a purely algebraic characterisation of relatively hyperbolic virtually special groups, since the subgroups need to be convex-cocompact. But, convex-cocompactness is not an algebraic property: with respect to the canonical action Z2 y R2 , the cyclic subgroup generated by (0, 1) is convex-cocompact, whereas the same subgroup is not convex-cocompact with respect to the action Z2 y R2 defined by (0, 1) : (x, y) 7→ (x + 1, y + 1) and (1, 0) : (x, y) 7→ (x + 1, y). On the other hand, we do not know whether or not a finitely generated malnormal subgroup is automatically convex-cocompact. Nevertheless, the previous statement provides an algebraic criterion if one restricts our attention to a collection of subgroups which we know to be convex-cocompact. In this spirit, we show the following beautiful characterisation of virtually special groups which are hyperbolic relatively to virtually abelian subgroups. Theorem 1.9. A virtually special group is hyperbolic relatively to a finite collection of virtually abelian subgroups if and only if it does not contain F2 × Z as a subgroup. We do not know if the same conclusion holds for any group acting geometrically on some CAT(0) cube complex. Probably the question is as hard as determining whether groups acting on CAT(0) cube complexes are hyperbolic if and only if they do not contain Z2 . In the second part of the paper, we apply our formalism to graph braid groups, which seem to have been introduced for the first time in group theory in [Abr00]. (Although topology of configuration spaces on graphs were studied before.) So far, the main problems which have been considered are: the links between graph braid groups and right-angled Artin groups [CW04, CD14, KKP12, Sab07, FS08]; computing presentations of graph braid groups [FS12, Kur12]; (co)homological properties of graph braid groups [KP12, KKP12, FS08]. However, their geometry remains essentially unknown. Here, we apply the formalism described above to investigate their negatively-curved properties. First of all, we are able to determine precisely when a graph braid group is hyperbolic. More precisely, we obtain the following characterisation: Theorem 1.10. Let Γ be a compact and connected one-dimensional CW-complex. • The braid group B2 (Γ) is hyperbolic if and only if Γ does not contain a pair of disjoint induced cycles. • The braid group B3 (Γ) is hyperbolic if and only if Γ is a tree, or a sun graph, or a rose graph, or a pulsar graph. • For every n ≥ 4, the braid group Bn (Γ) is hyperbolic if and only if Γ is a rose graph. Interestingly, the graph braid group of a rose graph turns out to be free, so that the (cohomologic or asymptotic) dimension of a hyperbolic graph braid group must be at most three. Finding non free hyperbolic graph braid groups is an interesting problem; see Problem 9.20 and its related discussion. Next, we are able to show that essentially all braid groups are acylindrically hyperbolic. Roughly speaking, a graph braid group (which is not cyclic) is acylindrically hyperbolic if and only if the corresponding graph is connected. For the implication, see Lemma 9.5 and the observation which follows; for the converse, we prove: Theorem 1.11. Let Γ be a connected compact one-dimensional CW-complex and n ≥ 2 an integer. The braid group Bn (Γ) is either cyclic or acylindrically hyperbolic. 4 Finally, we turn to the relative hyperbolicity of graph braid groups. Interestingly, it is not difficult to determine when a grah braid group contains F2 × Z as a subgroup. Therefore, Theorem 1.9 applies, and one gets the following criterion: Theorem 1.12. Let Γ be a connected compact one-dimensional CW-complex. • The braid group B2 (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ does not contain an induced cycle which is disjoint from two other induced cycles. • The braid group B3 (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ does not contain an induced cycle disjoint from two other induced cycles; nor a vertex of degree at least four disjoint from an induced cycle; nor a segment between two vertices of degree three which is disjoint from an induced cycle; nor a vertex of degree three which is disjoint from two induced cycles; nor two disjoint induced cycles one of those containing a vertex of degree three. • The braid group B4 (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ is a rose graph, or a segment linking two vertices of degree three, or a cycle containing two vertices of degree three, or two cycles glued along a non trivial segment. • For every n ≥ 5, the braid group Bn (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ is a rose graph. If so, Bn (Γ) is a free group. Interestingly, it follows that the (asymptotic or cohomologic) dimension of a graph braid group which is hyperbolic relatively to abelian subgroups must be at most four; in particular, such a group cannot contain Z5 as a subgroup. Unfortunately, we were not able to apply Theorem 1.8 in order to determine precisely when a graph braid group is relatively hyperbolic in full generality. Nevertheless, we are able to prove the following sufficient criterion for braid groups on graphs with two particles. (For a description of the associated peripheral subgroups, see the more precise statement of Theorem 9.41 below. Theorem 1.13. Let Γ be a connected compact one-dimensional CW-complex, and let G be a collection of subgraphs of Γ satisfying the following conditions: • every pair of disjoint simple cycles of Γ is contained into some Λ ∈ G; • for every distinct Λ1 , Λ2 ∈ G, the intersection Λ1 ∩ Λ2 is either empty or a disjoint union of segments; • if γ is a reduced path between two vertices of some Λ ∈ G which is disjoint from some cycle of Λ, then γ ⊂ Λ. If G is a collection of proper subgraphs, then B2 (Γ) is relatively hyperbolic. In all our discussion dedicated to graph braid groups, we illustrate our criteria by giving examples. Also, we leave several open questions which we think to be of interest. The organisation of our paper is as follows. In Section 2, we give some preliminary definitions and properties about nonpositively-curved cube complexes. In Section 3, we describe our combinatorial formalism. The next sections are dedicated to the proofs of the theorems mentioned above. More precisely, Theorem 1.1 is proved in Section 4; Theorem 1.2 in Section 5; Theorem 1.4 in Section 6; Theorem 1.5 in Section 7; and finally Theorems 1.8 and 1.8 in Section 8. Our last section, namely Section 9, is dedicated to graph braid groups. Acknowledgments. ... 5 2 Nonpositively-curved cube complexes Special cube complexes. A cube complex is a CW-complex constructed by gluing together cubes of arbitrary (finite) dimension by isometries along their faces. Furthermore, it is nonpositively curved if the link of any of its vertices is a simplicial flag complex (ie., n + 1 vertices span a n-simplex if and only if they are pairwise adjacent), and CAT(0) if it is nonpositively curved and simply-connected. See [BH99, page 111] for more information. A fundamental feature of cube complexes is the notion of hyperplane. Let X be a nonpositively curved cube complex. Formally, a hyperplane J is an equivalence class of edges, where two edges e and f are equivalent whenever there exists a sequence of edges e = e0 , e1 , . . . , en−1 , en = f where ei and ei+1 are parallel sides of some square in X. Notice that a hyperplane is uniquely determined by one of its edges, so if e ∈ J we say that J is the hyperplane dual to e. Geometrically, a hyperplane J is rather thought of as the union of the midcubes transverse to the edges belonging to J. Similarly, one may define oriented hyperplanes as classes of oriented edges. If J is the hyperplane dual to an edge e and if we fix an orientation ~e, we will note J~ the oriented hyperplane dual to ~e. It may be thought of as an orientation of J, and we will note −J~ the opposite orientation of J. Definition 2.1. Let X be a cube complex. The crossing graph ∆X is the graph whose vertices are the hyperplanes of X and whose edges link two transverse hyperplane. ~ Similarly, the oriented crossing graph ∆X is the graph whose vertices are the oriented hyperplanes of X and whose edges link two oriented hyperplanes whenever their underlying unordered hyperplanes are transverse. Roughly speaking, special cube complexes are nonpositively-curved cube complexes which do not contain “pathological configurations” of hyperplanes. Let us define precisely what these configurations are. ~ We say that J is: Definition 2.2. Let J be a hyperplane with a fixed orientation J. ~ • 2-sided if J~ = 6 −J, • self-intersecting if there exist two edges dual to J which are non-parallel sides of some square, • self-osculating if there exist two oriented edges dual to J~ with the same initial points or the same terminal points, but which do not belong to a same square. Moreover, if H is another hyperplane, then J and H are: • tangent if there exist two edges dual to J and H respectively which are non-parallel sides of some square, 6 • inter-osculating if they are transverse, and if there exist two edges dual to J and H respectively with one common endpoint, but which do not belong to a same square. Sometimes, one refers 1-sided, self-intersecting, self-osculating and inter-osculating hyperplanes as pathological configurations of hyperplanes. The last three configurations are illustrated on Figure 1. Figure 1: (a) Self-intersection, (b) Self-osculation, (c) Inter-osculation. Definition 2.3. A special cube complex is a nonpositively curved cube complex whose hyperplanes are two-sided and which does not contain self-intersecting, self-osculating or inter-osculating hyperplanes. A group which can be described as the fundamental group of a compact special cube complex is special. A virtually special group is a group which contains a finite-index subgroup which is special. Homotopy. Let X be a cube complex (not necessarily nonpositively-curved). For us, a path in X is the data of a sequence of successively adjacent edges. What we want to understand is when two such paths are homotopic (with fixed endpoints). For this purpose, we need to introduce the following elementary transformations. One says that: • a path γ ⊂ X contains a backtrack if the word of oriented edges read along γ contains a subword ee−1 for some oriented edge e; • a path γ 0 ⊂ X is obtained from another path γ ⊂ X by flipping a square if the word of oriented edges read along γ 0 can be obtained to corresponding word of γ by replacing a subword e1 e2 with e02 e01 where e01 , e02 are opposite oriented edges of e1 , e2 respectively in some square of X. We claim that these elementary transformations are sufficient to determine whether or not two paths are homotopic. More precisely: Proposition 2.4. Let X be a cube complex and γ, γ 0 ⊂ X two paths with the same endpoints. The paths γ, γ 0 are homotopic (with fixed endpoints) if and only if γ 0 can be obtained from γ by removing or adding backtracks and flipping squares. This statement follows from the fact that flipping squares provide the relations of the fundamental groupoid of X; see [Bro06, Statement 9.1.6] for more details. Contracting subcomplexes. In Sections 7 and 8, we will need several statements proved in [Gen16b] about contracting subcomplexes in CAT(0) cube complexes. Below, we recall basic definitions and state the results which we will use later. Definition 2.5. Let S be a metric space. A subspace C ⊂ S is contracting if there exists some constant d ≥ 0 such that the nearest-point projection onto C of any ball disjoint from C has diameter at most d. An isometry g ∈ Isom(S) is contracting if, for some basepoint x ∈ S, the map n 7→ g n · x induces a quasi-isometric embedding Z → S whose image is contracting. 7 In CAT(0) cube complexes, the nearest-point projection onto a given convex subcomplex has nice properties. For instance, according to [Gen17b, Lemma 1] and [Gen16a, Lemmas 2.8 and 2.10], one has: e be a CAT(0) cube complex and C ⊂ X e a convex subcomplex. Proposition 2.6. Let X e there exists a unique vertex of C minimising the distance to For every vertex x ∈ X, x. This vertex, denoted by projC (x), is the projection of x onto C. Moreover, the map e any hyperplane separating projC : X → C is 1-Lipschitz, and, for every vertex x ∈ X, x from its projection onto C must separate x from C. The next characterisation of contracting convex subcomplexes in CAT(0) cube complexes was essentially proved in [Gen16b]. Before, we need to introduce several definitions: • A facing triple is the data of three hyperplanes such that no one separates the two others. • A join of hyperplanes (H, V) is the data of two collections of hyperplanes H, V which do not contain any facing triple and such that any hyperplane of H is transverse to any hyperplane of V; it is L-thin for some L ≥ 0 if min(#H, #V) ≤ L. If moreover H, V are collections of pairwise disjoint hyperplanes, (H, V) is a grid of hyperplanes. e it is • A flat rectangle is a combinatorial isometric embedding [0, p] × [0, q] ,→ X; L-thin for some L ≥ 0 if min(p, q) ≤ L. Most of the time, a flat rectangle is identified with its image. Moreover, given a subset Y in some CAT(0) cube complex, we denote by H(Y ) the set of the hyperplanes separating at least two vertices of Y . e be a finite-dimensional CAT(0) cube complex and C ⊂ X e a convex Theorem 2.7. Let X subcomplex. The following statements are equivalent: (i) C is contracting; (ii) the join of hyperplanes (H, V) satisfying H ∩ H(C) = ∅ and V ⊂ H(C) are uniformly thin; (iii) the grid of hyperplanes (H, V) satisfying H ∩ H(C) = ∅ and V ⊂ H(C) are uniformly thin; e satisfying R∩C = [0, p]×{0} are uniformly (iv) the flat rectangles R : [0, p]×[0, q] ,→ X thin. Proof. The equivalence (i) ⇔ (ii) is proved by [Gen16b, Theorem 3.6]. The implication e is finite(ii) ⇒ (iii) is clear, and the converse follows from the assumption that X dimensional and from Ramsey’s theorem (see for instance [Gen16a, Lemma 3.7]). The implication (iii) ⇒ (iv) is clear. It remains to prove the converse (iv) ⇒ (iii). So let (H, V) be a grid of hyperplanes satisfying H ∩ H(C) = ∅ and V ⊂ H(C). Write V as {V1 , . . . , Vp } such that Vi separates Vi−1 and Vi+1 for every 2 ≤ i ≤ p − 1; and H as {H1 , . . . , Hq } such that Hi separates Hi−1 and Hi+1 for every 2 ≤ i ≤ q − 1 e be a disc diagram of minimal and such that Hq separates H1 and C. Let D → X complexity bounded by the cycle of subcomplexes C = (N (V1 ), C, N (Vp ), N (H1 )). (We refer to [Gen16a, Gen16b] and references therein for more information on disc diagrams e is a flat in CAT(0) cube complexes.) According to [Gen16a, Corollary 2.17], D → X rectangle; write D = [0, a] × [0, b] such that [0, a] × {0} ⊂ C, {a} × [0, b] ⊂ N (Vp ), 8 [0, a] × {b} ⊂ N (H1 ) and {0} × [0, b] ⊂ N (V1 ). Suppose that the vertex (c, d) ∈ D belongs to C. Since C is convex, the intervals between (0, 0) and (c, d), and (a, 0) and (c, d), have to be included into C. As a consequence, [0, a] × [d, b] defines a disc diagram bounded by C. By minimality of D, necessarily d = 0. Thus, we have proved that D ∩ C = [0, a] × {0}, which implies that there exists a uniform constant L ≥ 0 such that min(a, b) ≤ L. But the hyperplanes H2 , . . . , Hq separate H1 and C, so they must intersect {0} × [0, b], hence b ≥ q − 1; similarly, the hyperplanes V2 , . . . , Vp−1 separate V1 and Vp , so they must intersect [0, a] × {0}, hence a ≥ p − 2. Therefore, min(p, q) ≤ min(a, b) + 2 ≤ L + 2. This proves (iii). The previous statement justifies the following definition: e be a CAT(0) cube complexes, C ⊂ X e a convex subcomplex and Definition 2.8. Let X L ≥ 0 a constant. Then C is L-contracting if every join of hyperplanes (H, V) satisfying H ∩ H(C) = ∅ and V ⊂ H(C) is L-thin. We conclude this section with a statement which will be useful in Section 8 (and which is inspired from [CS15, Lemmas 4.4 and 4.5]). Lemma 2.9. Let X be a CAT(0) cube complex and C a contracting subcomplex. There exists a constant L ≥ 0 such that, if x, y ∈ X are two vertices such that the distance between their projections onto C is at least L, then, for every geodesic [x, y] between x and y, the unique vertex of [x, y] at distance d(x, C) from x must be at distance at most L from the projection of x onto C. Proof. Let K ≥ 0 be such that the projection onto C of every ball disjoint from C has diameter at most K. We begin by proving the following fact: Fact 2.10. For every vertices x, y ∈ X whose projections onto C are at distance at least 2(K + 1) apart, then |d(x, y) − d(x, p) − d(p, q) − d(q, y)| ≤ 2(K + 1) where p and q denote respectively the projections of x and y onto C. Let x, y ∈ X be two vertices whose respective projections p, q onto C are at least at distance 2(K + 1) apart. Fix a geodesic [x, y] between x and y. Notice that, if d(x, y) ≤ d(x, p), then the open ball B(x, d(x, y)) is disjoint from C, hence d(p, q) ≤ K + 1, contradicting our assumption. Therefore, [x, y] contains a unique vertex x0 at distance d(x, p) from x; notice that, since the open ball B(x, d(x, x0 )) is disjoint from C, the distance between the projection of x0 onto C, say p0 , and p is at most K + 1. Similarly, [x, y] contains a unique vertex y 0 at distance d(y, q) from y; moreover, the distance between the projection of y 0 onto C, say q 0 , and q is at most K + 1. Next, notice that, if d(x, y 0 ) < d(x, x0 ), then y 0 belongs to the open ball B(x, d(x, x0 )), then d(p, q 0 ) ≤ K, which implies that d(p, q) ≤ d(p, q 0 ) + d(q 0 , q) ≤ K + K + 1 = 2K + 1 < 2(K + 1), contradicting our assumption. Therefore, d(x, y 0 ) ≥ d(x, x0 ), which implies that d(x, y) = d(x, x0 ) + d(x0 , y 0 ) + d(y 0 , y) = d(x, p) + d(x0 , y 0 ) + d(q, y). Because the projection onto C is 1-Lipschitz, we know that d(x0 , y 0 ) ≥ d(p0 , q 0 ). But d(p0 , q 0 ) ≥ d(p, q) − d(p, p0 ) − d(q, q 0 ) ≥ d(p, q) − 2(K + 1). The inequality d(x, y) ≥ d(x, p) + d(p, q) + d(q, y) − 2(K + 1) 9 follows. Finally, the triangle inequality shows that d(x, y) ≤ d(x, p) + d(p, q) + d(q, y), which concludes the proof of our fact. Now we are ready to prove our lemma. Let x, y ∈ X be two vertices whose projections onto C are at least at distance 4(K + 1) apart. Let p, q ∈ C denote the projections onto C of x, y respectively. By reproducing the beginning of the proof of the previous fact, one shows that there exists a unique pair of vertices x0 , y 0 ∈ [x, y] satisfying d(x, x0 ) = d(x, C) and d(y, y 0 ) = d(y, C), and that d(x, y) = d(x, x0 ) + d(x0 , y 0 ) + d(y 0 , y). From the triangle inequality, we know that d(x, y) ≤ d(x, p) + d(p, q) + d(q, y), which implies together with the previous inequality, that d(x0 , y 0 ) ≤ d(p, q) since d(x, x0 ) = d(x, p) and d(y, y 0 ) = d(y, q). Let p0 , q 0 denote the projections onto C of x0 , y 0 respectively. Notice that d(p0 , q 0 ) ≥ 2(K + 1). Indeed, because the open ball B(x, d(x, x0 )) is disjoint from C, necessarily d(p, p0 ) ≤ K + 1; and similarly d(q, q 0 ) ≤ K + 1. Hence d(p0 , q 0 ) ≥ d(p, q) − d(p, p0 ) − d(q, q 0 ) ≥ 2(K + 1). Therefore, our previous fact applies, so that d(p, q) ≥ d(x0 , y 0 ) ≥ d(x0 , p0 ) + d(p0 , q 0 ) + d(q 0 , y 0 ) − 2(K + 1) ≥ d(x0 , p) + d(p, q) + d(q, y 0 ) − 2(K + 1) − 2d(p, p0 ) − 2d(q, q 0 ) ≥ d(x0 , p) + d(p, q) + d(q, y 0 ) − 6(K + 1) hence d(x0 , p) ≤ 6(K + 1). Consequently, L = 6(K + 1) is the constant we are looking for, concluding the proof of our lemma. 3 Formalism: special colorings In this section, we introduce the formalism which we will use in the next sections to prove the statements mentioned in the introduction. Our central definition is the following: Definition 3.1. Let X be a cube complex. A special coloring (∆, φ) is the data of a graph ∆ and a coloring map   ~ φ : V ∆X → V (∆) t V (∆)−1 satisfying the following conditions: • for every oriented hyperplane J, the equality φ(J −1 ) = φ(J)−1 holds; • two transverse oriented hyperplanes have adjacent colors; • no two oriented hyperplanes adjacent to a given vertex have the same color; • two oriented edges with same origin whose dual oriented hyperplanes have adjacent colors must generate a square. Essentially, a cube complex admits a special coloring if and only if it is special. We will not use this observation in this paper, so we only give sketch a proof at the end of this section. The main point to keep in mind is that any special cube complex admits at least one special coloring. Lemma 3.2. A cube complex X admits a special coloring if and only if there exists a special cube complex Y such that X (2) = Y (2) . 10 From now on, we fix a (non necessarily compact) special cube complex X endowed with a special coloring (∆, φ). Given a vertex x0 ∈ X, a word w = J1 · · · Jr , where J1 , . . . , Jr ∈ V (∆) t V (∆)−1 are colors, is x0 -legal if there exists a path γ in X starting from x0 such that the oriented hyperplanes it crosses have colors J1 , . . . , Jr respectively. We say that the path γ represents the word w. Fact 3.3. An x0 -legal word is represented by a unique path in X. Proof. Let γ be a path representing a given x0 -legal word w = J1 · · · Jr . By definition, the starting vertex of γ must be x0 . Also, we know that there exists at most one edge containing x0 which has color J1 . Such an edge exists since w is x0 -legal by assumption. A fortiori, this edge must be the first edge of γ. The conclusion follows by iterating the argument to the next edges. The previous fact allows us to define the terminus of an x0 -legal word w, denoted by t(w), as the ending point of the unique path representing w. Set L(X) = {x-legal words | x ∈ X} the set of all legal words. (If x1 , x2 ∈ X are two distinct points, we consider the empty x1 -legal and x2 -legal words as distinct.) We consider the equivalence relation ∼ on L(X) generated by the following transformations: (cancellation) if a legal word contains JJ −1 or J −1 J, remove this subword; (insertion) given a color J, insert JJ −1 or J −1 J as a subword of a legal word; (commutation) if a legal word contains J1 J2 where J1 , J2 are two adjacent colors, replace this subword with J2 J1 . So two x-legal words w1 , w2 are equivalent with respect to ∼ if there exists a sequence of x-legal words m1 = w1 , m2 , . . . , mr−1 , mr = w2 such that mi+1 is obtained from mi by a cancellation, an insertion or a commutation for every 1 ≤ i ≤ r − 1. Define D(X) = L(X)/ ∼ as a set of diagrams. The following observation allows us (in particular) to define the terminus of a diagram as the terminus of one of the legal words representing it. Fact 3.4. Let w0 be an x0 -legal word obtained from another x0 -legal word w by a cancellation / an insertion / a commutation. If γ 0 , γ are paths representing w0 , w respectively, then γ 0 is obtained from γ by removing a backtrack / adding a backtrack / flipping a square. Proof. Suppose that w0 is obtained from w by a cancellation. So we can write w = J1 · · · Jr JJ −1 Jr+1 · · · Jr+s and w0 = J1 · · · Jr+s for some colors J, J1 , . . . , Jr+s . Let γ1 denote the subpath of γ representing the x0 -legal word J1 · · · Jr . Let e denote the oriented edge following γ1 along γ. So the oriented hyperplane dual to e has color J. After e, the oriented edge of γ must be dual to an oriented hyperplane with color J −1 , as e−1 . But, because there exists at most one edge containing the terminus of e which is dual to such a hyperplane, the only possibility is that γ1 ee−1 is the subpath of γ representing J1 · · · Jr JJ −1 . Now, if γ2 denotes the subpath of γ representing the x1 -legal word Jr+1 · · · Jr+s , where x1 is the terminus of γ1 , then clearly γ1 γ2 represents J1 · · · Jr+s . It follows from Fact 3.3 that γ 0 = γ1 γ2 . Consequently, γ 0 is obtained from γ by removing a backtrack. 11 By symmetry, we deduce that, if w0 is obtained from w by an insertion, then γ 0 is obtained from γ by adding a backtrack. Now, suppose that w0 is obtained from w by a commutation. So we can write w = J1 · · · Jr HV Jr+1 · · · Jr+s and w0 = J1 · · · Jr · · · V HJr+1 · · · Jr+s , for some colors H, V, J1 , . . . , Jr+s with H and V adjacent. Let γ1 denote the subpath of γ representing the x0 -legal word J1 · · · Jr ⊂ w. As a consequence of Fact 3.3, this is also the subpath of γ 0 representing the x0 -legal word J1 · · · Jr ⊂ w0 . Let x1 denote the terminus of γ1 . Because w and w0 are both legal, we know that there exist two hyperplanes A and B which adjacent to x1 and which have colors H and V respectively. Since H and V are adjacent colors, it follows that x1 is the corner of a square Q whose dual hyperplanes are precisely A and B. If x2 denotes the vertex of Q opposite to x1 , let `1 denote the path of length two in Q from x1 to x2 passing through A and then through B, and similarly `2 the path of length two in Q from x1 to x2 passing through B and then through A. According to Fact 3.3, `1 (resp. `2 ) is the unique x1 -legal word representing HV (resp. V H), so γ1 `1 (resp. γ1 `2 ) must be the subpath of γ (resp. γ 0 ) representing J1 · · · Jr HV (resp. J1 · · · Jr V H). Now, let γ2 denote the subpath of γ representing the x2 -legal word Jr+1 · · · Jr+s ⊂ w; this is also the subpath of γ 0 representing the x2 -legal word Jr+1 · · · Jr+s ⊂ w0 . Because γ1 `1 γ2 represents w by construction, it follows from Fact 3.3 that γ = γ1 `1 γ2 . Similarly, γ 0 = γ1 `2 γ2 . The conclusion follows since `2 is obtained from `1 by flipping the square Q. In the sequel, an (x, y)-diagram will refer to a diagram represented by an x-legal word with terminus y, or just an (x, ∗)-diagram if we do not want to mention its terminus. A diagram which is an (x, x)-diagram for some x ∈ X is spherical. If w is an x0 -legal word and w0 a t(w)-legal word, we define the concatenation w · w0 as the word ww0 , which x0 -legal since it is represented by the concatenation γγ 0 where γ, γ 0 represent respectively w, w0 . Because we have the natural identifications L(X) ∼ ↔ ↔ paths in X homotopy with fixed endpoints (Fact 3.3) (Fact 3.4, Proposition 2.4) it follows that the concatenation in L(X) induces a well-defined operation in D(X), making D(X) isomorphic to the fundamental groupoid of X. As a consequence, if we denote by M (X) the Cayley graph of the groupoid D(X) with respect to the generating set V (∆) t V (∆)−1 , and, for every x ∈ X, M (X, x) the connected component of M (X) containing the trivial path (x) based at x, and D(X, x) the vertex-group of D(X) based at (x), then the previous identifications induce the identifications D(X) D(X, x) M (X, x) ↔ ↔ ↔ fundamental groupoid of X π1 (X, x) e (1) universal cover X More explicitly, D(X, x) is the group of (x, x)-diagrams endowed with the concatenation, and M (X, x) is the graph whose vertices are the (x, ∗)-diagrams and whose edges link two diagrams w1 and w2 if there exists some color J such that w2 = w1 J. e (1) will be fundamental in the sequel, so below The identification between M (X, x) and X is a more precise description of it. It worth noticing that, if we color the oriented edges of X as their dual hyperplanes, e are naturally labelled by colors and vertices of ∆, just then the (oriented) edges of X by considering their images in X. A consequence of the previous paragraph is that the 12  e x e M (X, x) ←→ X,  e of γ ending (x, ∗)-diagram represented path γ ⊂ X lift γe ⊂ X 7→ 7→ 7→ point of γe by an x-legal word w representing w e starting from x e (x, ∗)-diagram represented by the image path γe ⊂ X ←[ y ←[ ←[ x-legal word corresponding to γ γ ⊂ X of γ e to y from x generator labelling a given oriented edge of M (X, x) is the same as the color labelling e Below are two observations which we record for future the corresponding edge of X. use. e dual to the same oriented hyperplane are labelled Lemma 3.5. Two oriented edges of X by the same color. e are dual to the same hyperplane as well, Proof. The images in X of two such edges of X so that they must be labelled by the same color. The conclusion follows. e are transverse, then these Lemma 3.6. If the hyperplanes dual to two given edges of X edges are labelled by adjacent colors. e must be transverse as well, so Proof. The images in X of these two hyperplanes of X they are labelled by adjacent colors. The conclusion follows. A diagram may be represented by several legal words. Such a word is reduced if it has minimal length, ie., it cannot be shortened by applying a sequence of cancellations, insertions and commutation. It is worth noticing that, in general, a diagram is not represented by a unique reduced legal word, but two such reduced words differ only by some commutations. (For instance, consider the homotopically trivial loop defined by the paths representing two of our reduced legal words, consider a disc diagram of minimal area bounded by this loop, and follow the proof of [Sag95, Theorem 4.6]. Alternatively, use the embedding proved in the next section (which does not use the present discussion) and conclude by applying the analogous statement which holds in right-angled Artin groups.) As a consequence, we can define the length of a diagram as the length of any reduced legal word representing it. It is worth noticing that our length coincides with the length which is associated to the generating set V (∆) t V (∆)−1 in the groupoid D(X). The next lemma follows from this observation. Lemma 3.7. Let D1 , D2 ∈ M (X, x) be two (x, ∗)-diagrams. If J1 · · · Jn is a reduced legal word representing D1−1 D2 , then D1 , D1 J1 , D1 J1 J2 , . . . , D1 J1 · · · Jn is a geodesic from D1 to D2 in M (X, x). Conversely, any geodesic between D1 and D2 arises in this way. We end this section with a sketch of proof of Lemma 3.2, as promised. Sketch of proof of Lemma 3.2. Let Y be a special cube complex. Since its hyperplanes ~ ) with V (∆Y ) t V (∆Y )−1 . are two-sided, we can orient them in order to identify V (∆Y We claim that (∆Y, id) is a special coloring of Y . The first two points in the definition of a special coloring are clearly satisfied; the third point is satisfied since Y does not contain self-intersecting and self-osculating hyperplanes; and the last one follows from the fact that Y does not contain inter-osculating hyperplanes. Now, if X (2) = Y (2) , 13 then the hyperplanes of X can be naturally identified with those of Y , so that a special coloring of Y induces a special coloring of X. Conversely, suppose that X admits a special coloring (∆, φ). From now on, we fix a e of X with basepoint x ∈ X and we identify the one-skeleton of the universal cover X the graph M (X, x). We claim that M (X, x) is a median graph. One possibility is to show that M (X, x) is a triangle-free quasi-median graph by following the proof of [Gen17a, Proposition 8.1]. The conclusion follows from [Mul80, (25) p. 149]. One may notice that the median point of three (x, ∗)-diagrams D1 , D2 , D3 is D1 M where M is the maximal common prefix of D1−1 D2 and D1−1 D3 , ie., an (t(D1 ), ∗)-diagram of maximal length appearing as a common prefix in some reduced legal words representing D1−1 D2 and D1−1 D3 . Therefore, it follows from [Che00, Theorem 6.1] that filling in the cubes of M (X, x) proe is obtained from (its one-skeleton) M (X, x) duces a CAT(0) cube complex Ye . Since X e by filling in by filling in some cubes of M (X, x), necessarily Ye is also obtained from X e extends to an action π1 (X) y Ye , its cubes. As a consequence, the action π1 (X) y X e e so that Y = Y /π1 (X) is obtained from X = X/π1 (X) by adding some cubes. On the e is simply connected, any cycle of length four in its one-skeleton other hand, since X e (2) , and a fortiori Y (2) = X (2) . must bound a square, so that Ye (2) = X So remaining point to show is that Y is special. Notice that one can naturally identify the hyperplanes of Y with those of X since Y (2) = X (2) , so that the special coloring of X induces a special coloring of Y . The first point in the definition of a special coloring implies that the hyperplanes of Y are two-sided (since the two orientations of a given hyperplanes have different colors); the third point implies that Y does not contain self-intersecting and self-osculating hyperplanes; and the fourth point implies that it does not contain inter-osculating hyperplanes. Consequently, Y is indeed a special cube complex. 4 Embedding into a right-angled Artin group This section is dedicated to the proof of the following statement. Theorem 4.1. Let X be a special cube complex and x ∈ X a basepoint. If (φ, ∆) is a special coloring of X, then the canonical map D(X, x) → A(∆) induces an injective morphism. In particular, the fundamental group of X embeds into the right-angled Artin group A(∆). We begin by proving the following preliminary lemma. Lemma 4.2. If w0 is a word obtained from an x-legal word w by a commutation or a cancellation, then w0 is again an x-legal word. Proof. Suppose first that w0 is obtained from w by a commutation. So we can write w = J1 · · · Jr HV Jr+1 · · · Jr+s and w0 = J1 · · · Jr V HJr+1 · · · Jr+s for some colors H, V, J1 , . . . , Jr+s with H and V adjacent. The path γ representing w can be written as γ1 e1 e2 γ2 where γ1 is the subpath of γ representing the x-legal word J1 · · · Jr , e1 and e2 the next two edges along γ, respectively dual to oriented hyperplanes A and B which have colors H and V respectively, and γ2 the subpath of γ representing the t(J1 · · · Jr HV )-legal word Jr+1 · · · Jr+s . Because H and V are adjacent colors, necessarily the edges e1 and e2 must generate a square Q whose dual hyperplanes 14 are precisely A and B. If e01 e02 is the path obtained from e1 e2 by flipping Q, then γ1 e01 e02 γ2 is a path representing w0 . Therefore, w0 is x-legal. Now, suppose that w0 is obtained from w by a cancellation. So we can write w = J1 · · · Jr JJ −1 Jr+1 · · · Jr+s and w0 = J1 · · · Jr Jr+1 · · · Jr+s for some colors J, J1 , . . . , Jr+s . Let γ denote the path representing w, and let γ1 denote the subpath of γ representing the x-legal word J1 · · · Jr and e the next edge along γ. So e is dual to J. The edge following e along γ must be dual to a hyperplane which has color J −1 ; since we know that there may exist at most one such edge, it follows that this edge must be e−1 . Therefore, γee−1 is the subpath of γ representing the x-legal word J1 · · · Jr JJ −1 . Let γ2 denote the subpath of γ representing the t(J1 · · · Jr )-legal word Jr+1 · · · Jr+s , so that γ = γ1 ee−1 γ2 . Then γ1 γ2 is a path representing w0 , so w0 is an x-legal word. Proof of Theorem 4.1. Consider the canonical map L(X) → A(∆). By noticing that this map is invariant under cancellations, insertions, and commutations, we get a welldefined morphism D(X, x) → A(∆), where x ∈ X is a vertex we fix. The injectivity of this morphism follows from the following fact, which we record for future use: Fact 4.3. Let X be a special cube complex, x ∈ X a basepoint and (φ, ∆) a special coloring of X. Two x-legal words of colors are equal in D(X, x) if and only if they are equal in A(∆). Indeed, it follows from the normal form in right-angled Artin groups (see for instance [Gre90, Theorem 3.9]) that two x-legal words are equal in A(∆) if and only if their reductions (obtained by applying commutations and cancellations) differ only by applying commutations. Similarly, we know that these words are equal in D(X, x) if and only if their reductions (obtained by applying commutations and cancellations) differ only by applying commutations, with the restriction that all these transformations must produce, at each step, another legal word. Therefore, our fact follows from the previous lemma. This shows that our morphism D(X, x) → A(∆) is injective. Remark 4.4. As a particular case of Theorem 4.1, it follows that the fundamental group of a special cube complex X embeds into A(∆X), where ∆X denotes the crossing graph of X. This statement was originally proved in [HW08a]. In fact, our theorem also follows from the same arguments. Indeed, if S(∆) denotes the Salvetti complex associated to the graph ∆, it is not difficult to deduce from the definition of a special coloring that the map sending an oriented edge e of X to the (unique) oriented edge of S(∆) labelled by the color of e induces a local isometric embedding X ,→ S(∆). Since a local isometric embedding between nonpositively curved cube complexes turns out to be π1 -injective, the conclusion follows. Moreover, we get exactly the same injective morphism π1 (X) ,→ A(∆). The interest of Theorem 4.1 compared to the original statement in [HW08a] is that finding a good special coloring of a some special cube complex allows us to embed its fundamental group into a smaller right-angled Artin group. We give an example below. See also Section 9.1 where a similar situation occurs for graph braid groups. Example 4.5. Let X denote the Squier cube complex associated to the semigroup presentation * a = a2 , a2 = a3 , a3 = a1 a1 , a2 , a3 , b1 , b2 , b3 , p a1 = a1 p, b1 = pb1 , 1 b1 = b2 , b2 = b3 , b3 = b1 15 + and the baseword a1 b1 . We refer to [GS97, Gen15] for more details on Squier complexes. The sequel is largely based on [Gen15, Example 3.17]. The fundamental group of X is Z • Z = ha, b, z | [a, z n bz −n ] = 1, n ≥ 0i. Moreover, X is a special cube complex with eight hyperplanes, denoted by Ai = [1, ai → ai+1 , b1 ], Bi = [a1 , bi → bi+1 , 1], C = [1, a1 , a1 p, b1 ] and D = [a1 , b1 → pb1 , 1] where i ∈ Z3 . The crossing graph of X is a complete bipartite graph K4,4 , so that the corresponding right-angled Artin group is the product of free groups F4 × F4 = hA1 , A2 , A3 , C | i ∗ hB1 , B2 , B3 , D | i. One obtains the embedding   Z•Z →    a 7→  b 7→    z F4 × F4 A1 A2 A−1 3 B1 B2 B3−1 7 → CD−1 Now, let ∆ be a square with vertices A, B, C, D (in a cyclic order), and consider the coloring φ sending the Ai ’s to A, the Bi ’s to B, the oriented hyperplane C to the vertex C, and the oriented hyperplane D to the vertex D. So the corresponding right-angled Artin group becomes the product of free groups F2 × F2 = hA, C | i × hB, D | i, and the embedding one gets is   Z•Z →    a 7→  b 7→    z F2 × F2 A3 B3 7 → CD−1 Moreover, by noticing that the subgroup hA3 , B 3 , C, D−1 i ≤ F2 × F2 is naturally isomorphic to F2 × F2 itself, if follows that the subgroup hA, B, CDi of F2 × F2 is isomorphic to the infinitely presented group Z • Z. 5 Periodic flats This section is dedicated to the proof of the following statement. Theorem 5.1. Let X be a compact special cube complex. If its universal cover contain an n-dimensional combinatorial flat for some n ≥ 1, then π1 (X) contains Zn . Proof. Suppose that, for some n ≥ 1, there exists a combinatorial embedding [0, +∞)n ,→ e where X e denotes the universal cover of X. For convenience, we identify [0, +∞)n X, e From now on, we fix a basepoint x ∈ X which admits x e = (0, . . . , 0) with its image in X. e e as a lift in X, and we identify the one-skeleton of X with the graph M (X, x). For every 1 ≤ i ≤ n and j ≥ 0, set xi (j) = (0, . . . , 0, j, 0, . . . , 0), | {z } i−1 zeros and write xi (j) as a word H1i · · · Hji , where H1i , . . . , Hji are colors, which is represented e to xi (j) in [0, +∞)n . Let by the image in X of the unique geodesic segments from x i i A1 , . . . , Aj denote the corresponding sequence of hyperplanes. Let us begin by proving two preliminary facts. 16 Fact 5.2. For every distinct 1 ≤ i, j ≤ n and every p, q ≥ 1, the colors Hpi and Hqj are adjacent. e separating x e and xi (p) By construction, Aip (resp. Ajq ) has a lift Bpi (resp. Bqj ) in X j i i e and x (q)). Since the hyperplanes Bp and Bq are transverse to distinct factors (resp. x of our combinatorial flat, they must be transverse, so that Aip and Ajq must be transverse as well. Thus, it follows from Lemma 3.6 that Hpi and Hqj are adjacent colors, proving our fact. Fact 5.3. For every p1 , . . . , pn ≥ 1, one has (p1 , . . . , pn ) = H11 · · · Hp11 · · · H1n · · · Hpnn . Consider the following path from (0, . . . , 0) to (p1 , . . . , pn ): ([0, p1 ] × {(0, . . . , 0)}) ∪ ({p1 } × [0, p2 ] × {(0, . . . , 0)}) ∪ · · · ∪ ({p1 , . . . , pn−1 } × [0, pn ]) . The word obtained by reading the colors labelling the edges of this path defines a diagram representing (p1 , . . . , pn ). By noticing that the edge {(p1 , . . . , pk )} × [i, i + 1] × {(pk+2 , . . . , pn )} is dual to the same hyperplane as {(0, . . . , 0)} × [i, i + 1] × {(0, . . . , 0)}, it follows from k+1 Lemma 3.5 that they are both labelled by Hi+1 . Our fact follows. Now, since X is compact, for every 1 ≤ i ≤ n, there exist pi < qi such that xi (pi ) and xi (qi ) have the same terminus, say ti ∈ X. Set o = (p1 , . . . , pn ), and ai = (p1 , . . . , pi−1 , qi , pi+1 , . . . , pn ) for every 1 ≤ i ≤ n. It follows from Fact 5.3 that, for every 1 ≤ i ≤ n, o−1 ai = xi (pi )−1 xi (qi ) = Hpi i+1 · · · Hqii ; moreover, since xi (pi ) and xi (qi ) have the same terminus, it follows that o−1 ai is spherical. Consequently, the diagrams o−1 a1 , . . . , o−1 an are non trivial elements of D(X, t), where t denotes the terminus of o. Thus, we have proved the following statement: Fact 5.4. Let X be a special coloring, x ∈ X a basepoint and (∆, φ) a special coloring. If the universal cover of X contains an n-dimensional combinatorial flat, then D(X, x) contains n non trivial diagrams g1 , . . . , gn such that, as words of colors, any color of gi is adjacent to any color of gj for every distinct 1 ≤ i, j ≤ n. Clearly, hg1 , . . . , gn i defines a subgroup of D(X, x) ' π1 (X) which is isomorphic to Zn , proving our theorem. Corollary 5.5. A virtually cocompact special group is hyperbolic if and only if it does not contain Z2 . Proof. Let G be a group containing a finite-index subgroup Ġ which is the fundamental group of a compact special cube complex X. One already knows that, if G is hyperbolic, then it does not contain Z2 . Conversely, if G is not hyperbolic, then Ġ cannot be e must contain a two-dimensional combinatorial hyperbolic, so that the universal cover X + flat (see for instance [CDE , Corollary 5] or [Gen16a, Theorem 3.3]). As a by-product, notice that the previous observation, together with Fact 5.4, produces the following statement, which we record for future use: Fact 5.6. Let X be a cube complex and (∆, φ) a special coloring. If π1 (X) is not hyperbolic, then there exist two commuting spherical diagrams J1 · · · Jn and H1 · · · Hm such that Ji and Hj are adjacent colors for every 1 ≤ i ≤ n and 1 ≤ j ≤ m. Anyway, it follows from Theorem 5.1 that Ġ, and a fortiori G, contains Z2 , proving our corollary. 17 6 Cartesian decomposition This section is dedicated to the following decomposition theorem. Theorem 6.1. A virtually special group virtually splits as a direct product Zn × G1 × · · · × Gm , where G1 , . . . , Gm are acylindrically hyperbolic special groups and n, m ≥ 0. Proof. Let X be a compact special cube complex and (∆, φ) a special coloring of X. Let G denote the fundamental group of X. According to [CS11, Proposition 3.5], we may e is essential, and according to suppose without loss of generality that the action G y X e as a Cartesian product Y1 × · · · × Yk of [CS11, Proposition 2.6], we can decompose X irreducible and unbounded CAT(0) cube complexes. For every 1 ≤ i ≤ k, let Hi denote the set of hyperplanes of X lifting to a hyperplane transverse to Yi in X, and Ci the e which belongs e∈X corresponding set of colors. Fix a basepoint x ∈ X which has a lift x e e corresponds to Y1 ∩ · · · ∩ Yk . From now on, we identify X with M (X, x); in particular, x to the empty x-legal word. For every 1 ≤ i ≤ k, let Di denote the subgroup of D(X, x) of the x-legal words written using only colors of Ci . Notice that, for any distinct 1 ≤ i, j ≤ k, every hyperplane of Hi is transverse to every hyperplane of Hj , and Hi ∩ Hj = ∅ because X does not contain self-intersecting hyperplanes; consequently, any color of Ci is adjacent to any color of Cj , and Ci ∩ Cj = ∅. Therefore, Fact 6.2. The subgroup hD1 , . . . , Dk i ≤ D(X, x) is naturally isomorphic to D1 ×· · ·×Dk . Next, let us prove the following statement. e whose color belongs to Ci is dual to Yi . Fact 6.3. A hyperplane of X e Let H be such a hyperplane. By definition, the image of H in X has a lift H 0 in X 0 which intersects Yi . Because H and H have the same image in X, it follows that there e it follows that H exists an element of G sending H to H 0 . Since G acts specially on X, and H 0 cannot be transverse. In particular, H cannot intersect Yj for some j 6= i, so that H must intersect Yi . This proves our fact. Now, we want to prove the following assertion: Fact 6.4. For every 1 ≤ i ≤ k, the vertices of Yi are precisely the diagrams written only with colors of Ci . e to v, we know that v, as a diagram, Fix a vertex v ∈ Yi . Considering a geodesic γ from x is represented by the word obtained by reading the colors labelling the edges of γ. But γ ⊂ Yi by convexity, so it follows that v can be written only with colors of Ci , since all the edges of Yi have colors which belong to Ci . Conversely, let v ∈ M (X, x) be a vertex e of the path µ representing such that v = H1 · · · Hs where H1 , . . . , Hs ∈ Ci . The lift µ e crosses only hyperplanes of Yi according to the this x-legal word which starts from x e must be included into Yi . A fortiori, v ∈ Yi . This proves our previous fact, so that µ claim. An immediate consequence of the previous fact is that Yi is Di -invariant. Another consequence is that, if a, b ∈ Yi are two diagrams with the same terminus, then ba−1 ∈ D(X, x) sends a to b and belongs to Di . Because X is compact, the terminus of a diagram can take only finitely many values, so it follows that Di acts geometrically on Yi . Combined with Fact 6.2, we deduce that: Fact 6.5. The subgroup hD1 , . . . , Dk i acts geometrically on M (X, x). 18 An immediate consequence is that hD1 , . . . Dk i ' D1 ×· · ·×Dk is a finite-index subgroup of D(X, x) ' π1 (X, x). So far, we know that each Di acts freely, geometrically and specially on the irreducible e is essential, CAT(0) cube complex Yi . Moreover, we assumed that the action G y X which implies that the action D1 × · · · × Dk y Y1 × · · · × Yk is also essential, and from which we deduce that the action Di y Yi is essential as well. According to [CS11, Theorem 6.3], Di must contain a contracting isometry, so that Di is either acylindrically hyperbolic or virtually cyclic as a consequence of [Sis11]. Corollary 6.6. A virtually cocompact special group is acylindrically hyperbolic if and only if it does not virtually split as a direct product of two infinite groups and is not virtually cyclic. Proof. Let G be a virtually cocompact special group. According to Theorem 6.1, G virtually splits as a direct product Zn ×G1 ×· · ·×Gm where G1 , . . . , Gm are acylindrically hyperbolic cocompact special groups and n, m ≥ 0. If n = m = 0 then G is finite (and so virtually cyclic); if m = 0 and n = 1, then G is virtually cyclic; if n + m ≥ 2, then G virtually splits a direct product of two infinite groups. In all these cases, G cannot be acylindrically hyperbolic: in the first two cases because a virtually cyclic group is not acylindrically hyperbolic, and in the last case this follows from [Osi16, Corollary 7.3] and from the case that being acylindrically hyperbolic is stable under commensurability. Otherwise, m = 1 and n = 0, so that G is (virtually) acylindrically hyperbolic. 7 Rank-one isometries The purpose of this section is to describe algebraically the elements of the fundamental group of a compact special cube complex which induce contracting isometries on the universal cover. This goal is achieved by Theorem 7.7 below. We begin with a discussion about minimising subspaces. e and let H(X) e denote the set Let G be a group acting on some CAT(0) cube complex X of its hyperplanes. An isometry g ∈ G skewers a hyperplane J if, for every halfspace D delimited by J, there exists an integer n ∈ Z\{0} such that g n D ( D. An alternative description is: Lemma 7.1. Let γ be a combinatorial axis of g. Then g skewers a hyperplane J if and only if J intersects γ. e is finite-dimensional, there must exist two Proof. Suppose that J intersects γ. Since X p q p ≥ q such that g J and g J are disjoint. Equivalently, g p−q J is not transverse to J. Let D denote the halfspace delimited by J which contains g p−q J. Since g acts by translation on γ, it follows that g p−q D ( D. This also implies that g q−p Dc ( Dc . Conversely, suppose that g skewers J. So there exists a halfspace D delimited by J and S −kn an integer n ≥ 1 such that g n D ( D. Fix some z ∈ γ. Because X = g D, there k≥0 must exist some p ∈ Z such that z ∈ g pn D. Hence g −pn z ∈ D ∩ γ. Similarly, since T kn g D = ∅, there must exist some q ∈ Z such that z ∈ / g qn D. Hence g −qn z ∈ Dc ∩ γ. k≥0 Because the geodesic γ intersects both D and Dc , it follows that J must intersect γ. Let sk(g) denote the hyperplanes skewered by g, P (g) the hyperplanes transverse to e (sk(g) ∪ P (g)). Let M (g) denote the all the hyperplanes of sk(g), and O(g) = H(X)\ intersection of all the halfspaces delimited by hyperplanes of O(g) which contain a given axis of g. This convex subcomplex splits as a product M (g) = T (g) × S(g) such that H(T (g)) = P (g) and H(S(g)) = sk(g). See [KS16] for more details. 19 Our first goal is to use the subcomplex M (g) to determine precisely when g is a contracting isometry. e then g is contracting if and only if Proposition 7.2. If G acts geometrically on X, M (g) is a quasi-line, ie., if S(g) is a quasi-line and if T (g) is finite. We begin by showing that S(g) decomposes as a product of quasi-lines r Q Li (g). i=1 e then S(g) is a product of quasi-lines. Lemma 7.3. If G acts geometrically on X, Proof. As a consequence of Lemma 7.1, S(g) contains only finitely many hgi-orbits of hyperplanes, and g skewers every hyperplane intersecting S(g), so there exists some N ≥ 1 such that, for every hyperplane J intersecting S(g), {g kN J0 | k ∈ Z} is a collection of pairwise disjoint hyperplanes. Fix a hyperplane J0 intersecting S(g), and set Jk = g kN J0 for every k ∈ Z\{0}. Notice that Jk separates Jk−1 and Jk+1 for every k ∈ Z. Let J be a hyperplane intersecting S(g). Suppose by contradiction that J is transverse to infinitely many Jk ’s but not all. Without loss of generality, suppose that J is transverse to J0 , J1 , . . . but not to J−1 , J−2 , . . .. For every k ≥ 1, set Hk = g kN J; so Hk is transverse to Jk , Jk+1 , . . . but not to Jk−1 , Jk−1 , . . .. Moreover, we know from our choice of N that H1 , H2 , . . . are pairwise disjoint, so Hk separates Hk−1 and Hk+1 for every k ≥ 2. As a consequence, projN (H1 ) (N (Hk )) ⊂ projN (H1 ) (N (Hk−1 )) for every k ≥ 2. On the other hand, we know Jk−1 is transverse to H1 and Hk−1 but not to Hk , so in fact projN (H1 ) (N (Hk )) ( projN (H1 ) (N (Hk−1 )) for every k ≥ 2. This contradicts [HS16, Theorem B]. Thus, for every hyperplane J intersecting S(g), only two cases may happen: • J is transverse to Jk for every k ∈ Z. • J is transverse to only finitely many Jk ’s. Say that J is included into the subcomplex delimited by J−k and Jk for some k ≥ 1. Since we know that S(g) does not contain facing triple (indeed, any hyperplane of S(g) must cross a fixed axis of g according to Lemma 7.1), it follows that J separates J−k and Jk . We deduce from [CS11, Lemma 2.5] that S(g) splits as a Cartesian product L × Y for some convex subcomplexes L, Y ⊂ S(g) such that the hyperplanes of Y are precise those which are transverse to all the Jk ’s and such that the set of hyperplanes of L is the inseparable closure of {. . . , J−1 , J0 , J1 , . . .}, ie., the set of hyperplanes separating Jp and Jq for some p, q ∈ Z. Notice that, since the collection {. . . , J−1 , J0 , J1 , . . .} is hg N i-invariant, L must be hg N i-invariant as well. We claim that L is a quasi-line. To conclude the proof, it is next sufficient to iterate the argument to Y ; notice that this process must terminate since the dimension decreases. To show that L is indeed a quasi-line, we begin by proving the following claim: Claim 7.4. The hyperplanes of L are uniformly finite. Suppose by contradiction that L contains an infinite hyperplane J. So there exist infinitely many hyperplanes H1 , H2 , . . . transverse to J. We know that, for every k ≥ 1, there exist some pk < qk ∈ Z such that Hk separates Jpk and Jqk ; we choose pk and qk as small as possible, so that Hk is transverse to Ji for every pk < i < qk . Up to translating by a power of g N , we may suppose without loss of generality that (qk + pk )/2 ≤ 1/2; notice that necessarily qk ≥ 0 and pk ≤ 0. Since there exist only finite many hyperplanes separating two given hyperplanes, necessarily qk −→ +∞ and pk −→ −∞, so k→+∞ 20 k→+∞ there exists a subsequence (k(i)) such that (qk(i) ) increases and (pk(i) ) decreases. Now fix two indices i < j. By construction, Hk(i) separates Jpk(i) and Jqk(i) , and Hk(j) is transverse to Jpk(i) and Jqk(i) because pk(j) < pk(i) , qk(i) < qk(j) , so Hk(i) and Hk(j) must be transverse. It follows that Hk(1) , Hk(2) , . . . define a infinite collection of pairwise e is finite-dimensional. transverse hyperplanes, which is impossible since X Thus, we have proved that the hyperplanes of L are all finite. In fact, because L contains only finitely many hg N i-orbits of hyperplanes, these hyperplanes must be uniformly finite, proving our claim. Now we are ready to show that L is a quasi-line. For every i ∈ Z, let Ci ⊂ L denote the subcomplex delimited by Ji and Ji+1 . To conclude, it is sufficient to show that the Ci ’s are uniformly bounded. In fact, by noticing that g N Ci = Ci+1 for every i ∈ Z, we only need to show that C0 is bounded. We know that a hyperplane of C0 is transverse to J0 , or is transverse to J1 , or separates J0 and J1 . But only finitely many hyperplanes may separate two given hyperplanes, and it follows from our previous claim that only finitely many hyperplanes of L may be transverse to J0 or J1 . Therefore, C0 contains only finitely many hyperplanes, and thus must be finite. In the proof of Proposition 7.2 below, we refer to [Gen16a, Gen16b] and references therein for basic definitions and properties of disc diagrams. Proof of Proposition 7.2. Let γ be a combinatorial axis of g. We know from Lemma 7.1 that the hyperplanes of S(g) coincide with the hyperplanes crossing γ. Therefore, S(g) can be naturally identified with the convex hull of γ in X. Therefore, γ is quasiconvex if and only if S(g) is a quasi-line. Suppose that g is not contracting. If γ is not quasi-convex, then S(g) is not a quasiline, and we are done. From now on, we suppose that γ is quasiconvex, so that S(g) must be a quasi-line. According to Theorem 2.7, for every n ≥ 1, there exists a grid of hyperplanes (Hn , Vn ) satisfying Hn ⊂ H(S(g)), Vn ∩ H(S(g)) = ∅ and n n #Hn , #Vn ≥ n. Write Hn = {H1n , . . . , Hrnn } such that Hin separates Hi−1 and Hi+1 for every 1 ≤ i ≤ rn − 1, and similarly Vn = {V1n , . . . , Vsnn }; without loss of generality, we may suppose that V1n separates Vsnn and S(g). Let Cn denote the cycle of convex subcomplexes (N (H1n ), S(g), N (Hrnn ), Vsnn ), and let Dn → X be a disc diagram bounded by Cn of minimal complexity. According to [Gen16b, Corollary 2.15], Dn → X is an isometric embedding, so for convenience we will identify Dn with its image into X; moreover, according to the same corollary, there exist some an , bn ≥ 0 such that Dn is isometric to [0, an ]×[0, bn ], in such a way that [0, an ]×{0} ⊂ S(g), {0}×[0, bn ] ⊂ N (H1n ), {an } × [0, bn ] ⊂ N (Hrnn ), and [0, an ] × {bn } ⊂ N (Vsnn ). As hgi acts cocompactly on S(g), up to translating Dn by a power of g, we may suppose without loss of generality that the distance between a fixed basepoint x0 ∈ γ and the point (an /2, 0) ∈ Dn is uniformly bounded as n varies. Because X is locally finite, up to extracting a subsequence, we may suppose without loss of generality that the intersection between Dn and a given ball around x0 is eventually constant. Thus, the sequence of subcomplexes (Dn ) converges to a subcomplex D∞ isomorphic to R × [0, +∞) such that R × {0} ⊂ S(g). Claim 7.5. Any hyperplane intersecting S(g) crosses R × {0} ⊂ D∞ . Let J be a hyperplane intersecting S(g). According to 7.1, J intersects γ. If J does not cross the geodesic R × {0}, then J must separate this geodesic from a subray r ⊂ γ. A fortiori, J separates r and the subray ρ ⊂ R × {0} which is asymptotic to r. Since only finitely many hyperplanes separates r and ρ, but infinitely hyperplanes crosses r, it follows that infinitely many hyperplanes of S(g) are transverse to J, contradicting Claim 7.4. This proves our claim. 21 Claim 7.6. Only finitely many hyperplanes crossing {0} × R ⊂ D∞ intersects S(g). All the hyperplanes crossing R × {0} intersect S(g), and clearly any hyperplane crossing {0} × R is transverse to any hyperplane crossing {0} × R. Therefore, the existence of infinitely many hyperplanes crossing both {0} × R and S(g) would create an infinite join of hyperplanes in S(g), which is impossible according to [Gen16a, Theorem 3.3] since S(g) is hyperbolic. This proves our claim. It follows from our previous two claims that there exist infinitely many hyperplanes disjoint from S(g) which are transverse to all the hyperplanes of S(g), which precisely means that T (g) must contains infinitely many hyperplanes, and so has to be infinite. Conversely, suppose that g is contracting. It follows from [Gen16b, Lemma 2.20] that γ must be quasiconvex, so that it follows that S(g) has to be a quasi-line. Next, by noticing that, for every collection of hyperplanes H ⊂ H(T (g)) which does not contain any facing triple, (H, H(S(g))) defines a join of hyperplanes satisfying H ∩ H(S(g)) = ∅, it follows from Theorem 2.7 that there exists a uniform constant bounding the cardinality of H. Since X is locally finite, this implies that T (g) must be finite. Now we are ready to state and prove the main result of this section. Theorem 7.7. Let X be a compact special cube complex and let G denote its fundamental group. An isometry of G is contracting if and only if its centraliser is virtually cyclic. Proof. The implication is known. For instance, this follows from [Sis11] and [Osi16]. (But a direct proof is also possible.) Conversely, suppose that an isometry g ∈ G is not contracting. From now on, we follow the notation from the beginning of this section. We also fix a combinatorial e ∈ T (g) ∩ γ ∩ axis γ of g and a basepoint x ∈ X which has a lift x r T Li (g), and we i=1 denote by T , L1 , . . . , Lr the colors of the hyperplanes of X which admit a lift intersecting T (g), L1 (g), . . . , Lr (g) respectively. According to Lemma 7.2, two cases may happen. Suppose first that S(g) is not a quasi-line, ie., r ≥ 2. Let `e be the subsegment of γ e and g · x e, and let ` denote its image in X. Notice that, as a consequence of between x Lemma 7.1, the colors of the hyperplanes intersecting ` all belong to L1 ∪ · · · ∪ Lr . It follows that: Fact 7.8. The element g ∈ D(X, x) can be represented as an x-legal word written over L1 ∪ · · · ∪ Lr . Moreover, as a consequence of Lemma 7.1, notice that any hyperplane of S(g) has a e so the legal word represented by ` contains colors of each Li . translate intersecting `, Therefore, we can write g = A1 · · · An · B1 · · · Bm , where n, m ≥ 1 and where A1 , . . . , An , B1 , . . . , Bm are some colors such that, for every i 6= j, Ai and Bj are transverse. Notice that, for every k ≥ 1, we have g k = (A1 · · · An )k · (B1 · · · Bm )k . Because X is compact, there must exist some p > q ≥ 1 such that (A1 · · · An )p and (A1 · · · An )q have the same terminus, so that (A1 · · · An )p ·(A1 · · · An )−q = (A1 · · · An )p−q is an x-legal word with terminus x. A similar argument holds for B1 · · · Bm , which proves that there exists some k ≥ 1 such that (A1 · · · An )k and (B1 · · · Bm )k have terminus x. As a consequence, h(A1 · · · An )k , (B1 · · · Bm )k i defines a free abelian group of rank two in the centraliser in g k . But we know that, if x and y are two elements of a right-angled Artin groups and if p ≥ 1 is an integer, then x commutes with y p if and only if it 22 commutes with y, so it follows from Theorem 4.1 that our abelian subgroup actually lies in the centraliser of g. A fortiori, g does not have a virtually cyclic centraliser. Next, suppose that T (g) is infinite. Since X is compact, it follows that there exist two distinct vertices a, b ∈ T (g) having the same terminus when thought of as elements of e to a and b, we deduce M (X, x). By looking at the images in X of two geodesics from x that a and b can be represented as x-legal words written over T . So ab−1 is a non trivial element of D(X, x). Since any color of T is adjacent to any color of L1 ∪ · · · ∪ Lr , it follows from Fact 7.8 that hab−1 , gi defines a free abelian group of rank two in the centraliser of g. A fortiori, g does not have a virtually cyclic centraliser. Corollary 7.9. A virtually special group is acylindrically hyperbolic if and only if it contains an infinite-order element whose centraliser is virtually cyclic and if it is not virtually cyclic. Proof. Let G be a virtually special group. So G contains a finite-index subgroup Ġ which is the fundamental group of a compact special cube complex X. If G is acylindrically hyperbolic, then any generalised loxodromic element of G has a centraliser which is virtually cyclic (see [Osi16, Corollary 6.9]). Conversely, if G, and a fortiori Ġ, contains an element whose centraliser is virtually cyclic, it follows from Theorem 7.7 that Ġ acts e of X with a contracting isometry. It follows from [Sis11] that on the universal cover X Ġ, and a fortiori G, is either virtually cyclic or acylindrically hyperbolic. Let us conclude our section with an open question. Question 7.10. Let G be a group acting geometrically on a CAT(0) cube complex and g ∈ G an infinite-order element. Is it true that the centraliser of g acts geometrically on M (g)? By following the proof of Theorem 6.1, a positive answer to this question would imply the following characterization of the centraliser of a non trivial element g in some special group G = π1 (X). If M (g) = T (g) × r Q Li (g), then CG (g) is (virtually) isomorphic to i=1 a product A × Zr where A acts geometrically on T (g). Compare with [GS97, Theorem 15.35] in the context of diagram groups. 8 Malnormal subgroups and relative hyperbolicity In this section, we are interested in relatively hyperbolic special groups. Our main general criterion is the following: Theorem 8.1. Let G be a virtually special group and H a finite collection of subgroups. Then G is hyperbolic relatively to H if and only if the following conditions are satisfied: • each subgroup of H is convex-cocompact; • H is an almost malnormal collection; • every non virtually cyclic abelian subgroup of G is contained into a conjugate of some group of H. First of all, let us mention the definition of relative hyperbolicity which we use. Definition 8.2. A finitely-generated group G is hyperbolic relatively to a collection of subgroups H = {H1 , . . . , Hn } if G acts by isometries on a graph Γ such that: • Γ is hyperbolic, 23 • Γ contains finitely-many orbits of edges, • each vertex-stabilizer is either finite or contains a finite-index subgroup conjugated to some Hi , • any Hi stabilizes a vertex, • Γ is fine, ie., any edge belongs only to finitely-many simple loops (or cycle) of a given length. A subgroup conjugated to some Hi is peripheral. G is just said relatively hyperbolic if it is relatively hyperbolic with respect to a finite collection of proper subgroups. The first step towards the proof of Theorem 8.1 is to understand what the malnormality of our collection of subgroups implies geometrically. Proposition 8.3. Let X be a compact special cube complex, (∆, φ) a special coloring and x ∈ X a basepoint. If H ⊂ D(X, x) is a malnormal convex-cocompact subgroup, then the convex hull of H in M (X, x) is contracting. We begin by proving two preliminary lemmas. e be a finite-dimensional CAT(0) cube complex and G ≤ Isom(X) a Lemma 8.4. Let X e G acts geometrically on the convex hull convex-cocompact subgroup. For every x ∈ X, of the orbit G · x. e on which G acts geometrically. Let Z Proof. Let Y be a convex subcomplex of X denote a neighborhood of Y with respect to the `∞ -metric, ie., the metric obtained e which contains the basepoint by extending the `∞ -norms defined on each cube of X, x. According to [HW08b, Corollary 3.5], Z is a convex subcomplex. Moreover, since e is finite-dimensional, our new metric is quasi-isometric to the old one, necessarily X Z is contained into a neighborhood fo Y , so that G acts geometrically on Z as well. Therefore, there exists a constant K ≥ 0 such that Z is covered by G-translates of the ball B(x, K). Clearly, the convex hull C of the orbit G · x is contained into Z, so C is also covered by G-translates of the ball B(x, K), showing that G acts geometrically on C. Lemma 8.5. Let G be a group acting metrically properly on a geodesic metric space S, {H1 , . . . , Hm } a malnormal collection of subgroups, and x ∈ S a basepoint. Suppose that, for every 1 ≤ i ≤ m, there exists a subspace Si ⊃ Hi · x on which Hi acts geometrically. For every L ≥ 0, there exists some K ≥ 0 such that   diam Si+L ∩ gSj+L ≤ K whenever i 6= j and g ∈ G or i = j and g ∈ G\{Hi }. Proof. Let C ≥ 0 a constant such that, for every 1 ≤ i ≤ m, Si is covered by Hi translates of the ball B(x, C). Fix some L ≥ 0, some 1 ≤ r, t ≤ m and some g ∈ G, and suppose that the diameter of Sr+L ∩ gSt+L is at least n(2C + 1) for some n ≥ 1. As a consequence, there exist a1 , . . . , an ∈ Sr+L ∩ gSt+L such that d(ai , aj ) ≥ 2C + 1 for every distinct 1 ≤ i, j ≤ n. For every 1 ≤ i ≤ n, fix bi ∈ Sr and ci ∈ gSt such that d(ai , bi ) ≤ L and d(ai , ci ) ≤ L. For every 1 ≤ i ≤ n, there exist hi ∈ Hr and hk ∈ Htg such that d(bi , hi x) ≤ C and d(ci , ki x) ≤ C. Notice that, for every 1 ≤ i ≤ n, one has d(hi x, ki x) ≤ d(hi x, bi ) + d(bi , ai ) + d(ai , ci ) + d(ci , ki x) ≤ 2(L + C), or equivalently, d(x, h−1 i ki x) ≤ 2(L + C). Now, because G acts metrically properly on S, there exists some N ≥ 0 such that at most N elements of G may satisfy this inequality. 24 Consequently, if n > N , then {h−1 i ki | 1 ≤ i ≤ n} must contain at least two equal −1 −1 elements, say h−1 k and h k ; equivalently, h1 h−1 = 1. For convenience, set 1 2 1 2 2 k2 k1 g −1 −1 p = h1 h2 = k1 k2 ; notice that p belongs to Sr ∩ St . Next, one has −1 d(pa2 , a2 ) ≥ d(a2 , a1 ) − d(pa2 , a1 ) ≥ d(a2 , a1 ) − d(h−1 2 a2 , x) − d(x, h1 a1 ) ≥ 2C + 1 − C − C = 1 A fortiori, p 6= 1, so that Hi ∩ Hjg 6= {1}. It implies that i = j and g ∈ Hi . We conclude that K = N (2C + 1) is the constant we are looking for. Proof of Proposition 8.3. Let H ⊂ D(X, x) be a subgroup and let Y denote the convex hull of H in M (X, x). For convenience, set L = #V (X) + 1. Suppose that there exists a flat rectangle R : [0, n] × [0, L] ,→ M (X, x) satisfying Y ∩ R = [0, n] × {0} for some n > #V (Γ). Because the terminus of a diagram may take at most #V (X) different values, there must exist 0 ≤ a < b ≤ L such that (0, a) and (0, b) have the same terminus. Let W be the diagram (0, 0), A the diagram labelling the geodesic between (0, 0) and (0, a) in R, and B the diagram labelling the geodesic between (0, a) and (0, b). Notice that B is a (t(W A), t(W A))-diagram, so that g = W ABA−1 W −1 belongs to D(X, x). Now, for every 1 ≤ k ≤ n, let Ck denote the diagram labelling the geodesic between (0, 0) and (k, 0) in R. Notice that, because any hyperplane intersecting [0, n] × {0} is transverse to any hyperplane intersecting {0} × [0, L], any color of the word Ck is adjacent to any color of the words A and B. Consequently, g · W Ck = W ABA−1 W −1 · W Ck = W · ABA−1 · Ck = W · Ck · ABA−1 , so that d(W Ck , gW Ck ) = d((x), ABA−1 ) ≤ length(ABA−1 ) ≤ 3L. It follows that   diam Y +3L ∩ gY +3L ≥ n. But, since H acts geometrically on Y as a consequence of Lemma 8.4, Lemma 8.5 applies, and it implies that n cannot be arbitrarily large. The conclusion follows from Theorem 2.7 Our next lemma will be useful when combined with Lemma 8.5. Lemma 8.6. Let X be a CAT(0) cube complex and A, B ⊂ X two L-contracting convex subcomplexes. Suppose that any vertex of X has at most R ≥ 2 neighbors. If there exist N ≥ max(L, 2) hyperplanes transverse to both A and B, then the inequality   diam A+L ∩ B +L ≥ ln(N − 1)/ ln(R) holds. Proof. Let F denote the projection of A onto B. Then F is a convex subcomplex whose hyperplanes are precisely the hyperplanes transverse to both A and B (see for instance [Gen16a, Proposition 2.9]). Let x ∈ F be a vertex. By definition, there exists some vertex y ∈ A such that x is the projection of y onto B. Let y 0 denote the projection of x onto A and y 00 the projection of y 0 onto B. Suppose that there exists some hyperplane J separating x and y 00 . Because any hyperplane separating y 0 and y 00 must be disjoint from B, necessarily J separates x and y 0 . But, since any hyperplane separating x and y 0 must be disjoint from A, it follows that J separates x and y. On the other hand, a hyperplane separating y and x must be disjoint from B, hence a contradiction. Thus, we have prove that no hyperplane separates x and y 00 , hence x = y 00 . Therefore, y 0 is the projection of x onto A and x is the projection of y 0 onto B. It follows that the 25 hyperplanes separating x and y 0 are precisely the hyperplanes separating A and B. By applying Proposition 7.2 to the collections of the hyperplanes separating A and B, and the hyperplanes intersecting both A and B, we conclude that d(x, A) = d(x, y 0 ) ≤ L. Therefore, F ⊂ A+L ∩ B. On the other hand, we know that F contains at least N hyperplanes, so our lemma is implied by the following claim. Claim 8.7. Let F be a finite CAT(0) cube complex. Suppose that any vertex of F has at most R ≥ 2 neighbors and that F contains at least N ≥ 2 hyperplanes. Then diam(F ) ≥ ln(N − 1)/ ln(R). Let d denote the diameter of F . From our assumptions, it is clear that F contains at most Rd + 1 vertices. On the other hand, the number of hyperplanes of F is bounded above by its number of edges, and a fortiori by its number of vertices. Since F contains at least N hyperplanes, it follows that N ≤ Rd + 1, and the inequality we are looking for follows. The next statement is our last preliminary lemma before proving Theorem 8.1. e be a locally finite CAT(0) cube complex and C a collection of convex Lemma 8.8. Let X subcomplexes which are all P -contracting for some P ≥ 0. Suppose that there exists a e constant K ≥ 0 such that the image of every combinatorial isometric embedding R2 ,→ X lies in the K-neighborhood of some subcomplex C ∈ C. There exist some constants e lies in the B-neighborhood of some A, B ≥ 0 such that every A-thick flat rectangle of X subcomplex of C. Proof. Our lemma will follow from the next claim. e an L-thick Claim 8.9. Let K ≥ 0 and L > 2P be two constants, R : [0, p] × [0, q] ,→ X flat rectangle, and C ∈ C a subcomplex. Either R is included into C +K+2P , or R ∩ C +K has diameter at most 2(P + K).   Suppose that diam R ∩ C +K > 2(P + K). Fix two vertices x, y ∈ R ∩ C +K satisfying d(x, y) > 2(P + K), and let x0 , y 0 ∈ C denote respectively the projections of x, y onto C. Notice that a hyperplane separating x and y separates x and x0 , or y and y 0 , or x0 and y 0 , so that there must exist more than 2P hyperplanes separating x and y and intersecting C. For convenience, let V (resp. H) denote the hyperplanes intersecting [0, p] × {0} (resp. {0} × [0, q]). Our previous observation implies that more than P hyperplanes of V or of H intersect C; up to switching H and V, say that we are in the former case. Since C is P -contracting, at most P hyperplanes of H may be disjoint from C. Next, because R is L-thick with L > 2P , we deduce that H contains more than P hyperplanes intersecting C, so that, once again because C is P -contracting, at most P hyperplanes of V may be disjoint from C. Now, let z ∈ R be a vertex. Notice that a hyperplane separating z from C separates either x and x0 or x and z. But there exist at most K hyperplanes separating x and x0 , and at most 2P hyperplanes disjoint from C separating x and z (these hyperplanes belonging necessarily to H ∪ V). Therefore, d(z, C) ≤ K + 2P . Thus, we have proved that R ⊂ C +K+2P , concluding the proof of our claim. Now we are ready to prove our lemma. Suppose that, for K, L ≥ 0, there exists an L-thick flat rectangle which is not included into the K-neighborhood of any subcomplex of C. As a consequence of our previous claim, we know that, forevery K ≥  0 and every +K L > 2P , there exists an L-thick flat rectangle R satisfying diam R ∩ C ≤ 2(P + K) for every C ∈ C. So, fixing some K ≥ 0, for  every n > 2P , there exists an n-thick e flat rectangle Rn satisfying diam Rn ∩ C +K ≤ 2(P + K) for every C ∈ C. Since X is locally finite, up to taking a subsequence, we may suppose without loss of generality 26 e ie., for every ball B the sequence that (Rn ) converges to some subcomplex R∞ ⊂ X, (Rn ∩ B) is eventually constant to R∞ ∩   B. Notice that R∞ is isometric to the square 2 +K complex R and that diam R∞ ∩ C ≤ 2(P + K) for every C ∈ C. Thus, we have e proved that, for every K ≥ 0, there exists a combinatorial isometric embedding R2 ,→ X whose image is not contained into the K-neighborhood of any subcomplex C ∈ C. This concludes the proof of our lemma. Proof of Theorem 8.1. Suppose that G is hyperbolic relatively to H. Then the subgroups of H are convex-cocompact according to [SW15]; the collection H is almost malnormal according to [Osi06, Theorem 1.4]; and every non cyclic abelian subgroup of G is contained into a conjugate of some group of H according to [Osi06, Theorem 4.19]. Conversely, suppose that our three conditions are satisfied. Let X be a compact special cube complex whose fundamental group Ġ is a finite-index subgroup of G. Set Ḣ = {H ∩ Ġ | H ∈ H}. Notice that it is sufficient to show that Ġ is hyperbolic relatively to Ḣ in order to deduce that G is hyperbolic relatively to H. Our three conditions implies: • each subgroup of Ḣ is convex-cocompact; • the collection Ḣ is malnormal; • every non cyclic abelian subgroup of Ġ is contained into a conjugate of some group of Ḣ. From now on, to simplify the notation, Ġ and Ḣ will be denoted by G and H respectively. Fix a basepoint x ∈ X, and identify G and the (one-skeleton of the) universal cover of X with D(X, x) and M (X, x) respectively. Because D(X, x) is naturally embedded into M (X, x), one may naturally identify subsets of D(X, x) with subsets of M (X, x). Let C denote the set of the convex hulls in M (X, x) of the cosets of the subgroups of H. Claim 8.10. There exists a constant K ≥ 0 such that, for every distinct C1 , C2 ∈ C, at most K hyperplanes intersect both C1 and C2 . Our claim is a consequence of Lemma 8.6, which applies thanks to Proposition 8.3, combined with Lemma 8.5. Claim 8.11. An edge of M (X, x) belongs to only finitely many subcomplexes of C. Suppose by contradiction that there exist infinitely many subcomplexes of C containing a given edge e. Because M (X, x) is locally finite, this implies that, for every n ≥ 1, there exist distinct subcomplexes C1 , C2 ∈ C satisfying C1 ∩ B(n) = C2 ∩ B(n), where B(n) is a ball of radius n centered at an endpoint of e. Bu such a phenomenon would contradict our previous claim. Claim 8.12. There exists some constant K ≥ 0 such that the image of every combinatorial isometric embedding R2 ,→ M (X, x) lies in the K-neighborhood of some subcomplex of C. Let R2 ,→ M (X, x) be a combinatorial isometric embedding. For convenience, we identify R2 with its image in M (X, x). First of all, we consider the orthant [0, +∞)2 . Because the terminus of a diagram may take only finitely many values, the ray [0, +∞) × {0} must contain infinitely many vertices u1 , u2 , . . . having the same terminus; similarly, the ray {0} × [0, +∞) must contain infinitely many vertices v1 , v2 , . . . having the same terminus. For every i ≥ 1, let Ai denote the diagram labelling the unique geodesic in R2 between ui and ui+1 and Bi the diagram labelling the unique geodesic in R2 between vi and vi+1 ; notice that Ai and Bi are spherical diagrams. We also denote by W the diagram corresponding to the vertex of Rn whose projections onto the axes are the u1 and 27 v1 . Because any hyperplane intersecting [0, +∞) × {0} is transverse to any hyperplane intersecting {0} × [0, +∞), it follows that, for every i, j ≥ 1, any color of the word Ai is adjacent to any color of the word Bj . As a consequence, the subgroup W = W · hA1 , B1 , A2 , B2 , . . .i · W −1 naturally decomposes as W hA1 , . . .iW −1 × W hB1 , . . .iW −1 . It follows from the next observation that W is included into a conjugate of some subgroup of H. Fact 8.13. If a subgroup of G decomposes as a direct product of two infinite subgroups, then it must be included into a conjugate of some subgroup of H. Let K1 × K2 ⊂ G be such a subgroup. For every non trivial elements k1 ∈ K1 and k2 ∈ K2 , there exists a conjugate C(k1 , k2 ) of some subgroup of H containing hk1 , k2 i since this subgroup is a free abelian group of rank two. Notice that, for every non trivial elements k1 , k2 ∈ K1 and k3 ∈ K2 , the intersection C(k1 , k3 ) ∩ C(k2 , k3 ) contains hk3 i, hence C(k1 , k3 ) = C(k2 , k3 ) since the collection H is malnormal. A similar statement holds if we switch the roles of K1 and K2 . Therefore, for every non trivial elements k1 , k2 ∈ K1 and k3 , k4 ∈ K2 , one has C(k1 , k3 ) = C(k2 , k3 ) = C(k2 , k4 ). Let H denote this common conjugate. Now, for every non trivial elements k1 ∈ K1 and k2 ∈ K2 , one has k1 = k12 k2 · k1−1 k2−1 ∈ H · H = H and k2 = k1 k22 · k1−1 k2−1 ∈ H · H = H. Therefore, K1 and K2 are included into H, hence K1 × K2 ⊂ H. This concludes the proof of our fact. So there exist some H ∈ H and g ∈ G such that W ⊂ H g . If C denotes the convex hull of the coset gH, so that C belongs to C, notice that W · W ⊂ H g · W ⊂ (H g · g)+d(g,W ) = C +d(g,W ) . Let Y denote the d(g, W )-neighborhood of C with respect to the `∞ -metric, ie., the e According to metric obtained by extending the `∞ -norms defined on each cube of X. e is finite[HW08b, Corollary 3.5], Y is a convex subcomplex. Moreover, because X dimensional, our new metric is quasi-isometric to the old one, so that there exists a constant L ≥ 0 such that Y ⊂ C +L . Finally, since [u1 , +∞) × [v1 , +∞) is clearly included into the convex hull of W ·W , we deduce that [u1 , +∞)×[v1 , +∞) ⊂ Y ⊂ C +L . A fortiori, [0, +∞) × [0, +∞) is included into a neighborhood of C. Similarly, one find some C 0 ∈ C such that [0, +∞) × [0, −∞) is included into a neighbor of C 0 . It   implies that there exists some K ≥ 0 such that diam C +K ∩ (C 0 )+K is infinite, hence C = C 0 as a consequence of Lemma 8.5. Arguing similarly with [0, −∞)2 and next with [0, −∞) × [0, +∞), we deduce that R2 is included into a neighborhood of C. Now, we need to show that the constant defining this neighborhood can be chosen uniformly for every flat subcomplexes. Fix some n ≥ 1 which is sufficiently large so that the distance between the projections of (0, 0) and (0, n) (resp. (0, 0) and (n, 0)) is at least L, where L is the constant provided by Lemma 2.9. (Notice that L can be chosen independently of C since C contains only finitely many G-orbits of subcomplexes.) Therefore, if k denotes the distance from (0, 0) to C, then (0, k) and (k, 0) must be at distance at most L from the projection p of (0, 0) onto C. Therefore, 2k = d((k, 0), (0, k)) ≤ d((k, 0), p) + d(p, (0, k)) ≤ 2L hence d((0, 0), C) = k ≤ L. Consequently, W · (0, 0) ⊂ W · C +L ⊂ H g · C +L ⊂ C +L . 28 Once again according to [HW08b, Corollary 3.5], the L-neighborhood Z of C with respect to the `∞ -metric is a convex subcomplex, so that the convex hull of W · (0, 0) must be included into Z since C +L is contained into Z. On the other hand, because e is finite-dimensional, this new metric is quasi-isometric to the old one, so that there X exists a constant K depending only on L such that Y ⊂ C +K . We conclude that R2 , which is clearly included into the convex hull of W · (0, 0), lies in the K-neighborhood of C, where K does not depend on the flat we consider nor on C. This concludes the proof of our claim. Let C be the graph obtained from M (X, x) by adding a vertex vC for every C ∈ C and an edge between vC and every vertex of C. By combining Claim 8.12 and Lemma 8.8 (which applies thanks to Proposition 8.3), we deduce from [Gen16a, Theorem 4.1] that C is a hyperbolic graph. Moreover, according to Claim 8.10, it follows from [Gen16a, Theorem 5.7] that C is fine. Notice that, because G acts geometrically on M (X, x) and that every subcomplex C ∈ C has a cocompact stabiliser, our graph C contains only finitely many G-orbits of edges. This proves that G is hyperbolic relatively to H. It is worth noticing that the characterisation of relatively hyperbolic right-angled Coxeter groups (proved in [BHS17, Gen16a]), and more generaly the characterisation of relatively hyperbolic graph products of finite groups (which is a particular case of [Gen17a, Theorem 8.33]), follows easily from Theorem 8.1. However, this criterion does not provide a purely algebraic characterisation of relatively hyperbolic virtually special groups, since the subgroups need to be convex-cocompact. But, convex-cocompactness is not an algebraic property: with respect to the canonical action Z2 y R2 , the cyclic subgroup generated by (0, 1) is convex-cocompact, whereas the same subgroup is not convexcocompact with respect to the action Z2 y R2 defined by (0, 1) : (x, y) 7→ (x + 1, y + 1) and (1, 0) : (x, y) 7→ (x + 1, y). On the other hand, we do not know whether or not a finitely generated malnormal subgroup is automatically convex-cocompact. Nevertheless, Theorem 8.1 provides an algebraic criterion if one restricts our attention to a collection of subgroups which we know to be convex-cocompact. In this spirit, we conclude the section with the following beautiful characterisation of virtually special groups which are hyperbolic relatively to virtually abelian subgroups. Theorem 8.14. A virtually special group is hyperbolic relatively to a finite collection of virtually abelian subgroups if and only if it does not contain F2 × Z as a subgroup. The following preliminary lemma will be useful during the proof of our theorem. Lemma 8.15. Let A be a right-angled Artin group and a1 , p1 , . . . , an , pn ∈ A some −1 elements. Suppose that a1 , . . . , an are cyclically reduced and that p1 a1 p−1 1 , . . . , pn an pn pairwise commute. There exists some q ∈ A such that −1 −1 hp1 a1 p−1 1 , . . . , pn an pn i = qha1 , . . . , an iq . We begin by a discussion written in [Ser89]. Let g be an element in a right-angled Artin group A(Γ). Write g = php−1 where h is the cyclic reduction of g, and let Λ1 , . . . , Λr denote the connected components of the complement of the support of h, ie., the subgaph generated by the vertices of Γ corresponding to the generators which appear in the word h. One can write h as a product u1 · · · uk such that, for every 1 ≤ i ≤ k, the support of ui is precisely Λi ; this element ui belongs to a maximal cyclic subgroup whose generator, say hi , is uniquely defined up to sign. So g = phn1 1 · · · hnr r p−1 for some integers n1 , . . . , nr ∈ Z. The hi ’s are the pure factors of g. According to [Ser89, Centralizer Theorem], an element of A(Γ) commutes with g if and only if it mr −1 for some integers m , . . . , m ∈ Z and some element 1 can be written as phm 1 r 1 · · · hr kp k ∈ A(Γ) whose support is disjoint from Λ1 , . . . , Λr in the complement of Γ. 29 Proof of Lemma 8.15. We argue be induction on n. If n = 1, there is nothing to prove. Suppose that n ≥ 2. By applying our induction hypothesis, we know that there exists some q ∈ A such that −1 −1 hp1 a1 p−1 1 , . . . , pn−1 an−1 pn−1 i = qha1 , . . . , an−1 iq . Let h1 , . . . , hr denote all the pure factors which appear in a1 , . . . , an−1 . The Centraliser n1 nr −1 where the support of Theorem implies that pn an p−1 n can be written as qh1 · · · hr kq k is disjoint from the union of the supports of the hi ’s. Write k = aha−1 where h is cyclically reduced. Then n1 nr −1 pn an p−1 n = (qa) · h1 · · · hr h · (qa) because a commutes with all the hi ’s. Notice that an = hn1 1 · · · hnr r h by uniqueness of the cyclic reduction. Moreover, since a commutes with all the pure factors which appear in a1 , . . . , an−1 , which are cyclically reduced, necessarily a commutes with a1 , . . . , an−1 . Consequently, −1 −1 hp1 a1 p−1 1 , . . . , pn−1 an−1 pn−1 i = (qa)ha1 , . . . , an−1 i(qa) . This concludes the proof of our lemma. Proof of Theorem 8.14. Notice that, in order to show that a given group containing a special finite-index subgroup G is hyperbolic relatively to a finite collection of virtually abelian subgroups, it is sufficient to prove that G is hyperbolic relatively to a finite collection of abelian subgroups. Let X be a compact special cube cube complex whose fundamental group is isomorphic to G. Let A denote the collection of maximal abelian subgroups of rank at least two. Fix a set of representatives A0 ⊂ A modulo conjugacy. Claim 8.16. If G does not contain any subgroup isomorphic to F2 × Z, then A0 is a malnormal collection. Suppose that A0 is not malnormal, ie., there exist two subgroups A1 , A2 ∈ A0 and an element g ∈ G, such that either A1 6= A2 or A1 = A2 and g ∈ / A1 , such that A1 ∩ Ag2 6= {1}. We distinguish two cases. • Suppose that A1 6= Ag2 . Since A1 and Ag2 are two distinct maximal abelian subgroups, there must exist two non commuting elements k1 ∈ A1 and k2 ∈ Ag2 . Fix a non trivial element h ∈ A1 ∩ Ag2 and notice that h commutes with both k1 and k2 . By combining Theorem 4.1 with Lemma 8.18 below, we conclude that G contains a subgroup isomorphic to F2 × Z. • Suppose that A1 = Ag2 . This implies that A1 = A2 . Let A denote this common subgroup, so that A = Ag . Because g ∈ / A and that A is a maximal abelian subgroup, necessarily there exists some h ∈ A such that h and g do not commute. By combining Theorem 4.1 and [Bau81], we know that {h, g} is a free basis of hg, hi. On the other hand, ghg −1 ∈ Ag = A must commute with h since A is abelian, contradiction our previous observation. Therefore, this case is impossible. This concludes the proof of our claim. Claim 8.17. If G does not contain any subgroup isomorphic to F2 × Z, then A0 must be finite. −1 Let A ∈ A be an abelian subgroup. Fix a basis p1 a1 p−1 1 , . . . , pn an pn ∈ A where the spherical diagrams a1 , . . . , an (which do not necessarily belong to D(X, x)) are cyclically reduced, and suppose that there exists some 1 ≤ i ≤ n such that the length of ai is 30 greater than #V (X). Up to reordering the generators, we may suppose without loss of generality that i = 1. By considering a path in X representing the diagram a1 , which must pass twice through some vertex of X since it has length greater than #V (X), we deduce that we can write a1 = abc for some diagrams a, b, c such that b is a spherical diagram whose length is less than the length of a1 . Notice that, because b is spherical, aba−1 is a well-defined diagram. Since A0 is a malnormal collection according the previous claim, we deduce from the inclusion D E D E −1 −1 p2 a2 p−1 ⊂ (pa)b(pa)−1 , p2 a2 p−1 ∩A 2 , . . . , p n an p n 2 , . . . , pn an pn that D E D −1 −1 A = p1 a1 p−1 = (pa)b(pa)−1 , p2 a2 p−1 1 , . . . , p n an p n 2 , . . . , p n an p n E −1 where |b| < |a1 |. Consequently, if we choose our basis p1 a1 p−1 1 , . . . , pn an pn ∈ A by minimising the sum |a1 | + · · · + |an |, then |ai | ≤ #V (X) for every 1 ≤ i ≤ n. By applying Lemma 8.15 (combined with Fact 4.3), we conclude that any subgroup of A can be written as qF q −1 where F belongs to ( F= c , . . . , ck ∈ D(X, y) pairwise commute hc1 , . . . , ck i k ≥ 2, y ∈ X, 1 and have length < #V (X) ) . Let t denote the terminus of q. By considering a path of minimal length in X from x to t, we find an (x, t)-diagram s of length at most #V (X). Notice that sq −1 belongs to D(X, x), and that conjugating qF q −1 by sq −1 gives sF s−1 . Thus, we have proved that any subgroup of A is conjugate to some sF s−1 where F ∈ F and where |s| ≤ #V (X). But F is finite and we have only finitely many choices for s. Consequently, A contains only finitely many conjugacy classes, which shows that A0 is indeed finite. Finally, we are ready to apply Theorem 8.1. Suppose that F2 × Z is not a subgroup of G. We know from the two previous claims that A0 is finite malnormal collection. Moreover, it is clear that any non cyclic abelian subgroup of G must be included into a conjugated of some subgroup of A0 , and it is a general fact that abelian subgroups are convex-cocompact in groups acting geometrically on CAT(0) cube complexes, see [Woo16] (although an easy direct proof is possible here). So Theorem 8.1 applies, so that G must be hyperbolic relatively to A0 . Conversely, a group containing F2 × Z as a subgroup cannot be hyperbolic relatively to abelian subgroups since a subgroup which splits as a direct product of two infinite groups must be included into a peripheral subgroup (see for instance [Osi06, Theorem 4.19]). Lemma 8.18. Let A be a right-angled Artin group and g, h, k ∈ A be three non trivial elements satisfying [g, h] = [g, k] = 1 and [h, k] 6= 1. The subgroup hg, h, ki is isomorphic to F2 × Z. Proof. Since g is clearly central in hg, h, ki, necessarily hgi and hh, ki are normal subgroups in hg, h, ki. Moreover, because hh, ki is a non abelian free subgroup of A according to [Bau81], we know that the center of hh, ki is trivial, so that hgi ∩ hh, ki = {1}. A fortiori, hg, h, ki decomposes as hgi × hh, ki. As we already observed that hh, ki is a free group, the desired conclusion follows. 9 9.1 Applications to graph braid groups Cubical geometry In the rest of this paper, we are interested in the negatively-curved properties of graph braid groups. This first section is dedicated to basic definitions and properties of graph braid groups, essentially following [Abr00], and next to their cubical geometry. 31 Definition 9.1. Let Γ be a one-dimensional CW-complex and n ≥ 1 an integer. The topological configuration space of n points in Γ is Cntop (Γ) = Γn /D where D = {(x1 , . . . , xn ) ∈ Γn | xi = xj for some i 6= j}. The nth pure braid group of Γ based at ∗, denoted by Pn (Γ, ∗), is the fundamental group of Cntop (Γ) based at ∗. The symmetric group Sn acts freely on Cntop (Γ) by permuting the coordinates. Let U Cntop (Γ) denote the quotient Cntop (Γ)/Sn . The nth braid group of Γ based at ∗, denoted by Bn (Γ, ∗), is the fundamental group of U Cntop (Γ) based at ∗. A path in Cntop (Γ) or in U Cntop (Γ) can be thought of as moving continuously and without collision n particles in Γ. It may be interesting to move the particles discretely, ie., from a vertex to an adjacent vertex, to get a combinatorial model of the configuration space. More precisely: Definition 9.2. Let Γ be a one-dimensional CW-complex and n ≥ 1 an integer. The combinatorial configuration space of n points in Γ, denoted by Cn (Γ), is the subcomplex of Γn containing all the cubes σ1 × · · · × σn (where the σi ’s are one-cells of Γ) such that, for every distinct 1 ≤ i, j ≤ n, σi and σj do not share an endpoint. The symmetric group Sn acts freely on Cn (Γ) by permuting the coordinates. Let U Cn (Γ) denote the quotient Cn (Γ)/Sn . It is worth noticing that U Cntop (Γ) depends only on the topological type of Γ whereas U Cn (Γ) depends heavily on the CW-structure of Γ. For instance, if Γ is a circle with two vertices, then U C2top (Γ) is an annulus whereas U C2 (Γ) is a single vertex. However, it was proved in [PS14] that U Cntop (Γ) and U Cn (Γ) have the same homotopy type if the “arcs” of Γ are sufficiently subdivided. More precisely: Proposition 9.3. Let n ≥ 1 be an integer and Γ a one-dimensional CW-complex with at least n vertices. If • each edge-path in Γ connecting distinct vertices of degree at least three has length at least n − 1; • each homotopically non trivial edge-path connecting a vertex to itself has length at least n + 1, then U Cntop (Γ) deformation retracts onto U Cn (Γ). An equivalent description of U Cn (Γ) is the following: • the vertices of U Cn (Γ) are the subsets of Γ(0) of cardinality n; • the edges of U Cn (Γ) link two subsets S1 and S2 if the symmetric difference S1 ∆S2 is a pair of adjacent vertices (so an edge of U Cn (Γ) is naturally labelled by a one-cell of Γ); • n edges sharing a common endpoint generate an n-cube if the one-cells labelling them are pairwise disjoint. This description implies easily that the link of any vertex of U Cn (Γ) is a simplicial flag complex, which implies, as noticed in [Abr00], that Proposition 9.4. Let n ≥ 1 be an integer and Γ a one-dimensional CW-complex containing more than n vertices. Then U Cn (Γ) is a disjoint union of nonpositively-curved cube complex. 32 Given a one-dimensional CW-complex Γ and an integer n ≥ 1, we need to fix a basepoint in U Cn (Γ), ie., a subset S ⊂ Γ(0) of cardinality n, in order to define a graph braid group Bn (Γ, S). However, up to isomorphism, our group depends only on the number vertices that S contains in each connected components of Γ. Indeed, if R is another subset of Γ(0) of cardinality n such that |R ∩ Λ| = |S ∩ Λ| for every connected component Λ of Γ, then R and S belong to the same connected component of U Cn (Γ), so that Bn (Γ, S) and Bn (Γ, R) turn out to be isomorphic. As a consequence, if Γ is connected, the choice of the basepoint does not matter, so that the graph braid group can be simply denoted by Bn (Γ). In fact, according to our next lemma, one can always assume that Γ is connected. Lemma 9.5. Let Γ be a one-dimensional CW-complex, n ≥ 2 an integer and S ∈ U Cn (Γ) an initial configuration. Suppose that Γ = Γ1 t Γ2 . If our initial configuration S has p particles in Γ1 and q particles in Γ2 , then Bn (Γ, S) ' Bp (Γ1 , S∩Γ1 )×Bq (Γ2 , S∩Γ2 ). Proof. For every i ∈ {1, 2} and every 0 ≤ k ≤ n, set Di,k = {(x1 , . . . , xk ) ∈ Γki | xr = xs for some distinct 1 ≤ r, s ≤ k}. One has the naturally homeomorphisms U Cn (Γ) = Γn \D '  n F k=0 ' Γk1 × Γ2n−k  \D    n  n F F Γk1 \D1,k × Γ2n−k \D2,n−k = U Ck (Γ1 ) × U Cn−k (Γ2 ) k=0 k=0 Under these homeomorphisms, our initial configuration S belongs to U Cp (Γ1 )×U Cq (Γ2 ), whence the isomorphisms Bn (Γ, S) = π1 (U Cn (Γ), S) ' π1 (U Cp (Γ1 ) × U Cq (Γ2 ), S) ' Bp (Γ1 , S ∩ Γ1 ) × Bq (Γ2 , S ∩ Γ2 ) which concludes our proof. As a consequence of the previous lemma, since hyperbolic groups, and more generally acylindrically hyperbolic groups, do not split as direct products of infinite groups, one can always suppose that our one-dimensional CW-complex is connected when studying these kinds of groups. Now, let us focus on the hyperplanes of U Cn (Γ). It is worth noticing that an oriented edge E of U Cn (Γ) is uniquely determined by the data of an oriented edge e of Γ together with a subset S of Γ(0) of cardinality n such that o(e) ∈ S but t(e) ∈ / S: the E links S to (S\{o(e)}) ∪ {t(e)}. For every such edge (e, S), we denote by [e, S] the hyperplanes dual to it. Lemma 9.6. Two oriented edges (e1 , S1 ) and (e2 , S2 ) of U Cn (Γ) are dual to the same oriented hyperplane if and only if e1 = e2 and S1 \{o(e1 )}, S2 \{o(e2 )} belong to the same connected component of Cn−1 (Γ\e). Proof. Suppose that (e1 , S1 ) and (e2 , S2 ) are dual to the same oriented hyperplane. So there exists a sequence of oriented edges (1 , Σ1 ) = (e1 , S1 ), (2 , Σ2 ), . . . , (n−1 , Σn−1 ), (n , Σn ) = (e2 , S2 ) such that, for every 1 ≤ i ≤ n − 1, the edges (i , Σi ) and (i+1 , Σi+1 ) are parallel in some square Qi ; let (ηi , Σi ) denote the edge of Qi which is adjacent to (i , Σi ) and 33 which contains the starting of (i , Σi ), ie., Σi . From the definition of the squares in Cn (Γ), it follows that i = i+1 , i ∩ ηi = ∅ and Σi+1 = (Σi \{o(ηi )}) ∪ {t(ηi )} for every 1 ≤ i ≤ n − 1. Therefore, the equalities e1 = 1 = 2 = · · · n−1 = n = e2 hold, and the sequence S1 \{o(e1 )} = Σ1 \{o(1 )}, Σ2 \{o(2 )}, . . . , Σn \{o(n )} = S2 \{o(e2 )} defines a path in Cn−1 (Γ\e). Conversely, let e be an oriented edge of Γ and S1 , S2 two vertices of Cn−1 (Γ\e) which belong to the same connected component. So there exists a path Σ1 = S1 , Σ2 , . . . , Σn−1 , Σn = S2 in Cn−1 (Γ\e). For every 1 ≤ i ≤ n − 1, there exists an edge ηi disjoint from e such that (, ηi , Σi ) links Σi to Σi+1 ; notice that, since ηi and e are disjoint, the edges (e, Σi ∪{o(e)}) and (ηi , Σi ∪{o(e)}) generate a square in Cn (Γ), such that (e, Σi+1 ∪{o(e)}) is the opposite edge of (e, Σi ∪ {o(e)}) in that square. From the sequence (e, Σ1 ∪ {o(e)}) = (e, S1 ∪ {o(e)}), (e, Σ2 ∪ {o(e)}), . . . , (e, Σn ∪ {o(e)}) = (e, S2 ∪ {o(e)}), it follows that the oriented edges (e, S1 ∪ {o(e)}) and (e, S2 ∪ {o(e)}) of Cn (Γ) are dual to the same oriented hyperplane, concluding the proof. Now, we are ready to define a special coloring of U Cn (Γ). For that purpose, we denote by ∆ the graph whose vertices are the edges of Γ and whose edges link two disjoint edges of Γ, and we fix an orientation of the edges of Γ in order to identify the set of oriented edges of Γ with E(Γ) t E(Γ)−1 . Proposition 9.7. Let Γ be a one-dimensional CW-complex and n ≥ 1 an integer. If φ denotes the map [e, S] 7→ e, then (∆, φ) is a special coloring of U Cn (Γ). Proof. The first point of Definition 3.1 is clear from the construction of φ. The other three points are also satisfied according the following observations. • If two hyperplanes are transverse, they must cross inside some square. Since two adjacent edges of Cn (Γ) which generate a square must be labelled by disjoint edges, it follows that the images of our two hyperplanes under φ are adjacent in ∆. • It is clear that two distinct edges of Cn (Γ) starting from a common vertex must be labelled by different oriented edges of Γ. A fortiori, two oriented hyperplanes adjacent to a given vertex have different images under φ. • Consider two oriented edges of Cn (Γ) starting from a common vertex such that the images under φ of the dual hyperplanes are adjacent in ∆. This means that the edges of Γ labelling our two edges of Cn (Γ) are disjoint. From the definition of Cn (Γ), it follows that our edges generate a square. This concludes the proof of our proposition. Remark 9.8. Following the proof of Lemma 3.2, the combination of Propositions 9.4 and 9.7 provides an easy proof of the fact that U Cn (Γ) is a disjoint union of special cube complexes, as noticed in [CW04]. 34 Figure 2: Two distinct hyperplanes labelled by the same oriented edge. Fixing a basepoint S ∈ U Cn (Γ), we deduce from Section 3 the following description of the universal cover Xn (Γ, S) of the connected component of U Cn (Γ) containing S, which we denote by U Cn (Γ, S). A word of oriented edges e1 · · · en is S-legal if, for every 1 ≤ i ≤ n, we have o(ei ) ∈ (S\{o(e1 ), . . . , o(ei−1 }) ∪ {t(e1 ), . . . , t(ei−1 )} but t(ei ) ∈ / (S\{o(e1 ), . . . , o(ei−1 }) ∪ {t(e1 ), . . . , t(ei−1 )}. The picture to keep in mind is the following. Start with the configuration S. The oriented edge e1 acts on S by moving the particle of S on o(e1 ) to t(e1 ). Next, apply e2 to this new configuration, and so on. The word e1 · · · en is S-legal if all these operations are well-defined. The terminus of such a word is the final configuration we get. In this context, a cancellation amounts to remove a backtrack in the movement of one particle; an insertion adds such a backtrack; and a commutation switch the order of two independent moves. Therefore, a (S1 , S2 )-diagram can be thought of as n particles moving discretely in Γ without colliding, from a configuration S1 to a configuration S2 , up to the previous operations. The one-skeleton of Xn (Γ, S) can be identified with the graph whose vertices are the (S, ∗)-diagrams and whose edges link two diagrams if one can be obtained from the other by right-multiplicating by an oriented edge of Γ. Moreover, the braid group Bn (Γ, S) can be identified with the set of (S, S)-diagrams endowed with the concatenation. As a direct consequence of Theorem 4.1 and Proposition 9.7, we are able to recover [CW04, Theorem 2]. Proposition 9.9. Let Γ be one-dimensional CW-complex, n ≥ 1 an integer and S ∈ U Cn (Γ) a basepoint. The braid group Bn (Γ, S) embeds into the right-angled Artin group A(∆). It is worth noticing that the graph ∆ does not coincide with the crossing graph of the cube complex U Cn (Γ), so that the previous embedding is different from the usual embedding one gets for special groups. Otherwise saying, a hyperplane [e, S] of U Cn (Γ) is not uniquely determined by the oriented edge e of Γ. Figure 2 provides a one-dimensional CW-complex Γ, an oriented edge of Γ, and two configurations S1 and S2 , so that the hyperplanes [e, S1 ] and [e, S2 ] are distinct. Proposition 9.10. Let Γ be a connected one-dimensional CW-complex and n ≥ 1 an integer. If Λ is a connected induced subgraph of Γ, then Bn (Λ) embeds into Bn (Γ). Moreover, if Λ is a proper subgraph, then Bm (Λ) embeds into Bn (Γ) for every m ≤ n. Proof. Fix an initial configuration S ∈ U Cn (Γ) which is included into Λ, and consider the obvious map U Cn (Λ, S) → U Cn (Γ, S). By applying [CW04, Theorem 1(2)], it follows that this map is a local isometry. Because a local isometry between nonpositively-curved cube complexes turns out to be π1 -injective, we conclude that Bn (Λ) embeds into Bn (Γ). 35 Figure 3: From left to right: a sun graph, a rose graph, a pulsar graph. Now, suppose that Λ ⊂ Γ is a proper subgraph and fix some integer m ≤ n. Up to subdividing Γ, which does not affect the corresponding braid group according to Proposition 9.3, we may suppose without loss of generality that Γ contains at least n − m vertices which do not belong to Λ. Fix an initial configuration S ∈ U Cn (Γ) satisfying #S ∩ Λ = m. As above, apply [CW04, Theorem 1(2)] to show that the obvious map U Cm (Λ, S ∩ Λ) → U Cn (Γ, S) is a local isometry. A fortiori, the braid group Bm (Λ) embeds into Bn (Γ). We conclude this section by setting the following open question: Question 9.11. Let Γ be a connected one-dimensional CW-complex and n ≥ 2 an integer. Is it true that Bm (Γ) embeds into Bn (Γ) for every m ≤ n? 9.2 Gromov hyperbolicity This section is dedicated to the characterization of hyperbolic graph braid groups. We begin by introducing several classes of graphs. • A sun graph is a graph obtained from a cycle by gluing rays to some vertices. • A rose graph is a graph obtained by gluing cycles and rays along a single vertex. • A pulsar graph is a graph obtained by gluing cycles along a fixed segment (not reduced to a single vertex) and rays to the endpoints of this segment. See Figure 3 for examples. We allow degenerate situations; for instance, a single cycle belongs to our three families of graphs. Our characterization is the following: Theorem 9.12. Let Γ be a compact and connected one-dimensional CW-complex. • The braid group B2 (Γ) is hyperbolic if and only if Γ does not contain a pair of disjoint induced cycles. • The braid group B3 (Γ) is hyperbolic if and only if Γ is a tree, or a sun graph, or a rose graph, or a pulsar graph. • For every n ≥ 4, the braid group Bn (Γ) is hyperbolic if and only if Γ is a rose graph. Proof. Let n ≥ 2 be an integer. For convenience, we fix an initial configuration S ∈ U Cn (Γ). Suppose that Bn (Γ, S) is not hyperbolic. By applying Fact 5.6, we find two spherical diagrams e1 · · · ep , 1 · · · q ∈ D(U Cn (Γ), S 0 ), for some S 0 ∈ U Cn (Γ, S), such that ei ∩j = 36 ∅ for every 1 ≤ i ≤ p and 1 ≤ j ≤ q. As a consequence, the subgraphs Λ1 = e1 ∪ · · · ∪ ep and Λ2 = 1 ∪ · · · ∪ q are disjoint. Setting S1 = S 0 ∩ Λ1 (resp. S2 = S 0 ∩ Λ2 ), notice that e1 · · · ep (resp. 1 · · · q ) belongs to D(Cr (Λ1 ), S1 ) (resp. D(Cs (Λ2 ), S2 )), where r (resp. s) denotes the cardinality of S1 (resp. S2 ). Thus, we have found a configuration S 0 = S1 t S2 ∈ Cn (Γ, S), where S1 , S2 have cardinalities r, s respectively, and two subgraphs Λ1 , Λ2 ⊂ Γ containing S1 , S2 respectively, such that Br (Λ1 , S1 ) and Bs (Λ2 , S2 ) are non trivial. Conversely, if there exist a configuration S 0 = S1 t S2 ∈ Cn (Γ, S), where S1 , S2 have cardinalities r, s respectively, and two subgraphs Λ1 , Λ2 ⊂ Γ containing S1 , S2 respectively, such that Br (Λ1 , S1 ) and Bs (Λ2 , S2 ) are non trivial, then Bn (Γ) must contain a subgroup isomorphic to Z2 . Indeed, the subgroup of Bn (Γ) generated by Br (Λ1 , S1 ) and Bs (Λ2 , S2 ) is naturally isomorphic to Br (Λ1 , S1 ) × Bs (Λ2 , S2 ) since Λ1 and Λ2 are disjoint. It follows that Bn (Γ) cannot be hyperbolic. Thus, we have proved that Bn (Γ, S) is hyperbolic if and only if there do not exist a configuration S 0 = S1 t S2 ∈ Cn (Γ, ∗), where S1 , S2 have cardinalities r, s respectively, and two subgraphs Λ1 , Λ2 ⊂ Γ contains S1 , S2 respectively, such that Br (Λ1 , S1 ) and Bs (Λ2 , S2 ) are non trivial. It follows from Lemma 9.13 below that: • B2 (Γ) is hyperbolic if and only if Γ does not contain a pair of disjoint induced cycles; • B3 (Γ) is hyperbolic if and only if Γ does not contain a pair of disjoint induced cycles nor a vertex of degree at least three which is disjoint from some induced cycle; • for every n ≥ 4, Bn (Γ) is hyperbolic if and only if Γ does not contain a pair of disjoint induced cycles, nor a vertex of degree at least three which is disjoint from some induced cycles, nor two distinct vertices of degree at least three. Suppose that Γ is a graph satisfying all the conditions of our previous point. If Γ does not contain a vertex of degree at least three, then it must be either a cycle or a segment. So suppose that Γ contains a vertex of degree at least three. By assumption, Γ contains a unique such vertex. Therefore, Γ can be obtained by gluing along a single vertex some graphs without vertices of degree at least three, ie., segments and cycles. It follows that Γ must be a rose graph. Consequently, Bn (Γ) is hyperbolic if and only if Γ is a rose graph. Now, suppose that Γ does not contain a pair of disjoint induced cycles nor a vertex of degree at least three which is disjoint from some induced cycle. If Γ does not contain induced cycles, then Γ is tree. If Γ contains exactly one induced cycle, then Γ must be a sun graph since all its vertices of degree at least three have to belong to this cycle. From now on, suppose that Γ contains at least two induced cycles; let C1 and C2 be two such cycles. As a consequence, Γ contains at least one vertex of degree at least three (which belongs to a path linking two cycles). If Γ contains a single such vertex, then it follows from the previous paragraph that Γ must be a rose graph. So suppose that Γ contains at least two vertices of degree at least three. First, assume that Γ contains exactly two such vertices, say u and v. So Γ can be constructed from u and v by gluing segments. Only two gluings are possible: identifying the two endpoints to u and v respectively, or identifying a single endpoint to u or v. Indeed, identifying the two endpoints to u (resp. v) is impossible since v (resp. u) would be disjoint from the cycle thus created. Consequently, Γ must be a pulsar graph. Finally, assume that Γ contains at least three vertices of degree at least three, say u, v, w. By assumption, Γ contains at least two induced cycles, say C1 and C2 ; moreover, u, v, w must belong to these cycles. For every 37 x, y ∈ {u, v, w} and i ∈ {1, 2}, let [x, y]i denote the arc of Ci between x and y. Because C1 6= C2 , we can suppose without loss of generality that [u, v]1 6= [u, v]2 . Consequently, [u, v]1 ∪ [u, v]2 contains an induced cycle which is disjoint from w, contradicting our assumptions. Consequently, B3 (Γ) is hyperbolic if and only if Γ is a tree, or a sun graph, or a rose graph, or a pulsar graph. Lemma 9.13. Let Γ be a one-dimensional CW-complex. • For every S ∈ U C1 (Γ), the braid group B1 (Γ, S) is non trivial if and only if the connected component of Γ containing S also contains an induced cycle. • For every n ≥ 2 and every S ∈ U Cn (Γ), the braid group Bn (Γ, S) is non trivial if and only if Γ contains a connected component intersecting S which contains an induced cycle, or a connected component whose intersection with S has cardinality at least two and which contains a vertex of degree at least three. Alternatively, Bn (Γ, S) is trivial if and only if the connected components of Γ whose intersections with S have cardinality one are trees, and those whose intersections with S have cardinality at least two are segments. Proof. The first assertion follows from the observation that the braid group B1 (Γ, S) is isomorphic to the fundamental group of the connected component of Γ containing S. Next, fix some n ≥ 2. Write Γ as A1 t · · · t Ap t B1 t · · · t Bq t C1 t · · · t Cr where the Ai ’s are the connected components of Γ whose intersections with S have cardinality one, where the Bi ’s are the connected components of Γ whose intersections with S have cardinality at least two, and where the Ci ’s are the connected components of Γ which are disjoint from S. As a consequence of Lemma 9.5, it is sufficient to show that, for every 1 ≤ i ≤ p and every 1 ≤ j ≤ q, the braid groups B1 (Ai ) and Bk (Bj ), where k ≥ 2, are trivial if and only if Ai is a tree and Bj is a segment. It is a consequence of the following facts. Fact 9.14. For every connected one-dimensional CW-complex Γ, the braid group B1 (Γ) is trivial if and only if Γ is a tree. Our fact follows directly from the observation that B1 (Γ) is isomorphic to the fundamental group of Γ. Fact 9.15. Let Γ be a connected one-dimensional CW-complex and n ≥ 2 an integer. The braid group Bn (Γ) is trivial if and only if Γ is a segment. Suppose that Γ is not a segment. Then it must contain either an induced cycle or a vertex of degree at least three. If Γ contains a cycle, either Γ is itself a cycle, so that Bn (Γ) must be infinite cyclic, or Γ contains a proper cycle C, so that it follows from Proposition 9.10 that B1 (C) ' Z embeds into Bn (Γ). So, in this case, Bn (Γ) is not trivial. Next, if Γ contains a vertex of degree at least three, up to subdividing Γ (which does not modify the corresponding braid group according to Proposition 9.3), one can apply Proposition 9.10 to deduce that B2 (T ) embeds into Bn (Γ), where is as in Figure 4. Notice that ca−1 bc−1 ab−1 is a non trivial element of B2 (T ), so that Bn (Γ) must be non trivial. Conversely, we leave as an exercise to show that the braid groups of a segment are trivial. An interesting consequence of Theorem 9.12, combined with the next lemma, is that the (cohomologic or asymptotic) dimension of a hyperbolic graph braid group is at most three. 38 Figure 4 Lemma 9.16. Let Γ be a rose graph. For every n ≥ 2, the braid group Bn (Γ) is free. Proof. Let o denote the center of Γ, and e1 , . . . , ek its edges which are adjacent to o. Let J denote the collection of all the hyperplanes of the universal cover Xn (Γ) of U Cn (Γ) which are labelled by one of the edges e1 , . . . , ek . Because the edges labelling two transverse hyperplanes must be disjoint, it follows that J is a collection of pairwise disjoint hyperplanes; as a consequence, J induces an equivariant arboreal structure on Xn (Γ). Notice that a connected component of Xn (Γ) cut along J is naturally isometric to Xn (Γ\{e1 , . . . , ek }, S) for some configuration S ∈ U Cn (Γ\{e1 , . . . , ek }), and its stabiliser is naturally isomorphic to Bn (Γ\{e1 , . . . , ek }, S) for the same S. But the connected components of Γ\{e1 , . . . , ek } are all segments, so that we deduce that these stabilisers must be trivial. Consequently, Bn (Γ) acts freely on the simplicial tree dual to the arboreal structure of Xn (Γ) induced by J , which implies that Bn (Γ) must be free. Remark 9.17. An argument similar to the previous one also implies [FS12, Proposition 5.5], namely: if Γ is a connected one-dimensional CW-complex which contains a vertex belonging to all its induced cycles, then B2 (Γ) is free. Example 9.18. The braid group Bn (Km ) is hyperbolic if and only if n = 1, or n = 2 and m ≤ 5, or m ≤ 3. We already know that B1 (Km ) ' π1 (Km ) is a free group of rank (m − 1)(m − 2)/2. Notice that if m ≤ 3 then Km is either a single vertex, a segment or a cycle, so that Bn (Km ) is either trivial or infinite cyclic. Therefore, the only interesting braid groups in our family are B2 (K4 ) and B2 (K5 ). As a consequence of [Abr00, Example 5.1], B2 (K5 ) is the fundamental group of a closed non orientable surface of genus six. Example 9.19. The braid group Bn (Kp,q ), where we suppose that p ≤ q, is hyperbolic if and only if n = 1, or n = 2 and p ≤ 3, or n = 3 and p ≤ 2, or n ≥ 4 and p = q = 2, or n ≥ 4 and p = 1. In this family, the only braid group which might not be free have the form B2 (K3,n ) and B3 (K2,n ) where n ≥ 3. We do not know whether or not these groups are actually free. (Notice that K2,n is a pulsar graph for every n ≥ 1.) But at least one of them is not free: as a consequence of [Abr00, Example 5.2], B2 (K3,3 ) is the fundamental group of a closed non orientable surface of genus four. Theorem 9.12 is the first step toward the solution of the following interesting problem: Problem 9.20. Which hyperbolic groups arise as graph braid groups? We know from Theorem 9.12 that, when n ≥ 4, there are only free groups. When n = 3, it remains only two cases to study: Question 9.21. Are the graph braid groups of sun graphs and pulsar graphs free? one-ended? surface groups? 3-manifold groups? For n = 2, the situation is less clear. Notice that not all graph braid groups on two particles are free since we gave one-ended hyperbolic graph braid groups in the previous 39 Figure 5: If Γ is one of these graphs, is B2 (Γ) free? examples. Figure 5 gives examples of graphs which do not satisfy the criterion given in Remark 9.17; we do not know whether or not the corresponding braid groups are free. Nevertheless, many hyperbolic graph braid groups turn out to be free, stressing out the following question: Question 9.22. When is a graph braid group free? A possibly easier question, but interesting as well, is: Question 9.23. When is a graph braid group one-ended? As a consequence of Stallings’ theorem, an answer to this question would provide a characterisation of graph braid groups splitting as free products. 9.3 Acylindrical hyperbolicity In this section, our goal is to show that essentially all the braid groups turn out to be acylindrically hyperbolic. More precisely, we want to prove: Theorem 9.24. Let Γ be a connected compact one-dimensional CW-complex and n ≥ 2 an integer. The braid group Bn (Γ) is either cyclic or acylindrically hyperbolic. We begin by introducing some terminology. Let X be a special cube complex and (∆, φ) a special coloring of X. A diagram is cyclically reduced if it cannot be written as a reduced legal word starting with a color and ending with its inverse. Any diagram D is conjugated in D(X) to a unique cyclically reduced diagram: indeed, the analogue statement known for right-angled Artin groups can be transferred to diagrams according to Fact 4.3. This unique diagram is the cyclic reduction of D. Going back to X = U Cn (Γ), fix an (S, ∗)-diagram D ∈ D(X), where S ∈ U Cn (Γ) is some initial configuration, and let R denote its cyclic reduction. Writting R as an S 0 -legal word of oriented edges e1 · · · ek , where S 0 ∈ U Cn (Γ) is some other initial configuration, we define the support of D, denoted by supp(D), as the full support of R, ie., the subgraph e1 ∪ · · · ∪ ek ⊂ Γ; and the set of particles of D, denoted by part(D), as S 0 ∩ supp(D). So, if D is cyclically reduced and if it is thought of as a motion of particles in Γ, then part(D) is the set of particles which really moves, and supp(D) is the subgraph of Γ in which they are confined. These two sets are used in our next statement to construct elements whose centralisers are infinite cyclic. Proposition 9.25. Let Γ be a one-dimensional CW-complex, n ≥ 1 an integer and S ∈ U Cn (Γ) an initial configuration. A non trivial element g ∈ Bn (Γ, S) has a cyclic centraliser if supp(g) is connected and if part(g) has cardinality n. Proof. Let g ∈ Bn (Γ, S) be a non trivial element. According to Fact 4.3 and to [Ser89, Centralizer Theorem], there exist words of oriented edges a, h1 , . . . , hk and integers m1 , . . . , mk ∈ Z\{0} such that our element g (thought of as a diagram) can be writmk −1 1 ten as an S-legal word ahm where h1 · · · hk is the cyclic reduction of g and 1 · · · hk a 40 Figure 6 where any oriented edge of hi is disjoint from any oriented edge of hj for every distinct 1 ≤ i, j ≤ n; moreover, the centraliser of g is the set of (S, S)-legal words of oriented edges which can be written as ahr11 · · · hrkk ha−1 , where r1 , . . . , rk ∈ Z are integers and where h is a word of oriented edges which are disjoint from the edges of the hi ’s. Notice that the support of g is the disjoint union of the full supports of the hi ’s, hence 1 −1 k = 1 since supp(g) is connected by assumption. So g = ahm 1 a . Let p ∈ Bn (Γ, S) be an element of the centraliser of g. From the previous paragraph, we know that p can be written as a legal word ahr11 ha−1 for some integer r1 ∈ Z and some word h of oriented edges which are disjoint disjoint from those of h1 . Notice that supp(p) is the disjoint of the full supports of h and h1 . But the full support of h1 coincides with the support of g, which has cardinality n. Since a full support must have cardinality at most n, it follows that h is trivial, ie., p = ahr11 a−1 . Thus, we have proved that, for every element p ∈ Bn (Γ, S) of the centraliser of g, its power pm1 belongs to hgi. This proves that hgi has finite index in the centraliser of g, and a fortiori that the centraliser of g is infinite cyclic. Proof of Theorem 9.24. If Bn (Γ) is trivial, there is nothing to prove, so we suppose that Bn (Γ) is non trivial. According to Lemma 9.13, Γ must contain either a cycle or a vertex of degree at least three. Suppose that Γ contains a cycle C. Without loss of generality, we may suppose that our initial configuration S ∈ U Cn (Γ) is included into C. Let g ∈ Bn (Γ, S) be the element “rotating all the particles around C”. For instance, if C is as in Figure 6 (i), then g = cba. Since g does not contain an oriented edge and its inverse, it is clearly cyclically reduced. Moreover, its support is C and its set of particles has full cardinality. We deduce from Proposition 9.25 that the centraliser of g is infinite cyclic. Next, suppose that Γ contains a vertex of degree at least three. As a consequence, Γ contains a tripod T . Up to subdividing Γ (which does not modify the braid group according to Proposition 9.3) and extracting subgraph of T , suppose that T is isomorphic to [−n+1, n−1]×{0}∪{0}×[0, 1]. For convenience, let k denote the vertex (k, 0) ∈ T for every −n + 1 ≤ k ≤ n − 1, and let p denote the vertex (0, 1). Without loss of generality, suppose that the n vertices of our initial configuration S ∈ U Cn (Γ) are −n + 1, . . . , 0. Now, let g ∈ Bn (Γ, S) be the element corresponding to the following motion of particles: • move the particle at 0 to p; • for k = −1, −2, . . . , −n + 1, move the particle at k to n + k; • move the particle at p to −n + 1; 41 Figure 7 • for k = 1, 2, . . . , n − 1, move the particle at k to −n + k + 1. For instance, if n = 3, T is as in Figure 6 (ii) and g = e−1 bc−1 d−1 abc−1 eb−1 a−1 cb−1 dc. Notice that the first and last letters of any S-legal word of edges representing g must be [0, p] and [0, 1] respectively. Therefore, g is cyclically reduced. It follows that the support of g is T and that it set of particles has full cardinality. We deduce from Proposition 9.25 that the centraliser of g is infinite cyclic. Thus, we have proved that Bn (Γ) contains an element whose centraliser is infinite cyclic. We conclude from Corollary 7.9 that Bn (Γ) is either cyclic or acylindrically hyperbolic. Remark 9.26. We suspect that, even when Γ is not compact, an application of the criterion [Gen16b, Theorem 4.17] implies that an element as in Proposition 9.25 induces a contracting isometry on the universal cover Xn (Γ). This would show that, for any connected one-dimensional CW-complex Γ and for any integer n ≥ 1, the graph braid group Bn (Γ) is either cyclic or acylindrically hyperbolic. Theorem 9.24 stresses out the following question: when is a graph braid group cyclic? We already know from Lemma 9.13 when it is trivial, so it remains to determine when it is infinite cyclic. This is the goal of our next lemma. Lemma 9.27. Let Γ be a connected one-dimensional CW-complex. • The braid group B2 (Γ) is infinite cyclic if and only if Γ is a cycle or a star with three arms. • For every n ≥ 3, the braid group Bn (Γ) is infinite cyclic if and only if Γ is a cycle. Proof. We begin by proving that various graph braid groups are not infinite cyclic. Our general criterion will follow easily from these observations. Fact 9.28. If Γ is a bouquet of two circles, then B2 (Γ) is not infinite cyclic. 42 Consider Γ as in Figure 7 (i). Set g = bca and h = ef d. For every n, m ∈ Z\{0}, one has g n = (bca)n 6= (ef d)m = hm . This implies that B2 (Γ) is not infinite cyclic. Fact 9.29. If Γ is the wedge of a cycle and a segment, then B2 (Γ) is not infinite cyclic. Consider Γ as in Figure 7 (ii). Set g = bca and h = dbacd−1 . For every n, m ∈ Z\{0}, one has g n = (bca)n 6= d(bac)m d−1 = hm . This implies that B2 (Γ) is not infinite cyclic. Fact 9.30. If Γ is a star with four arms, then B2 (Γ) is not infinite cyclic. Consider Γ as in Figure 7 (iii). Set g = da−1 bd−1 ab−1 and h = dc−1 bd−1 cb−1 . For every n, m ∈ Z\{0}, one has g n = (da−1 bd−1 ab−1 )n 6= (dc−1 bd−1 cb−1 )m = hm . This implies that B2 (Γ) is not infinite cyclic. Fact 9.31. If Γ is a union of two segments whose middle points are linked by a third segments, then B2 (Γ) is not infinite cyclic. Consider Γ as in Figure 7 (iv). Set g = dc−1 a−1 b−1 cad−1 b and h = f −1 ad−1 e−1 f da−1 e. For every n, m ∈ Z\{0}, one has g n = (dc−1 a−1 b−1 cad−1 b)n 6= (f −1 ad−1 e−1 f da−1 e)m = hm . This implies that B2 (Γ) is not infinite cyclic. Now, let Γ be a connected one-dimensional CW-complex such that B2 (Γ) is infinite cyclic. According to Fact 9.31, Γ contains at most one vertex of degree at least three. Therefore, Γ must be a union of n cycles and m segments glued along a single vertex (ie., Γ is a rose graph). Two cases may happen. First, if Γ contains a cycle (ie., n ≥ 1) then it follows from Facts 9.28 and 9.29 that necessarily n = 1 and m = 0, ie., Γ is a cycle. Secondly, if Γ does not contain any cycle (ie., n = 0), then Γ must be a star with m arms. But we know from Fact 9.30 that necessarily m ≤ 3. Since B2 (Γ) is trivial if m ≤ 2, we conclude that Γ must be a star with three arms. Conversely, we left as an exercise to show that B2 (Γ) is indeed infinite cyclic if Γ is a cycle or a star with three arms. Next, let Γ be a one-dimensional CW-complex and n ≥ 3 an integer such that Bn (Γ) is infinite cyclic. If Γ contains a vertex of degree at least three then, up to subdividing Γ (which does not affect the braid group Bn (Γ) according to Proposition 9.3), we can deduce from Proposition 9.10 that Bn (Γ) contains B2 (T ) where T is a star with three arms. According to the fact below, this is impossible. Therefore, Γ must be either a cycle or a segment. We know that Bn (Γ) is trivial if Γ is a segment, so Γ must be a cycle. Conversely, we leave as an exercise to show that Bn (Γ) is infinite cyclic if Γ is a cycle. Fact 9.32. If Γ is a star with three arms, then B3 (Γ) is not infinite cyclic. Consider Γ as in Figure 7 (v). Set the elements g = abe−1 dcb−1 a−1 ec−1 d−1 and h = abc−1 f eb−1 a−1 ce−1 f −1 . For every n, m ∈ Z\{0}, one has g n = (abe−1 dcb−1 a−1 ec−1 d−1 )n 6= (abc−1 f eb−1 a−1 ce−1 f −1 )m = hm . This implies that B2 (Γ) is not infinite cyclic. 43 9.4 Relative hyperbolicity In this section, we are interested in determining when a graph braid group turns out to be relatively hyperbolic. Our first goal is to apply Theorem 8.14, which leads to the following statement: Theorem 9.33. Let Γ be a connected compact one-dimensional CW-complex. • The braid group B2 (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ does not contain three pairwise disjoint induced cycles. • The braid group B3 (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ does not contain an induced cycle disjoint from two other induced cycles; nor a vertex of degree at least four disjoint from an induced cycle; nor a segment between two vertices of degree three which is disjoint from an induced cycle; nor a vertex of degree three which is disjoint from two induced cycles; nor two disjoint induced cycles one of those containing a vertex of degree three. • The braid group B4 (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ is a rose graph, or a segment linking two vertices of degree three, or a cycle containing two vertices of degree three, or two cycles glued along a non trivial segment. • For every n ≥ 5, the braid group Bn (Γ) is hyperbolic relatively to abelian subgroups if and only if Γ is a rose graph. If so, Bn (Γ) is a free group. In order to apply Theorem 8.14, one needs to find subgroups isomorphic to F2 × Z. As a first step we determine when a graph braid group contains a non abelian free subgroup. Lemma 9.34. Let Γ be a compact one-dimensional CW-complex, n ≥ 1 an integer, and S ∈ U Cn (Γ) an initial configuration. The following conditions are equivalent: (i) the braid group Bn (Γ, S) contains a non abelian free subgroup; (ii) the braid group Bn (Γ, S) is not free abelian; (iii) there exists a connected component of Γ containing one particle of S which contains at least two cycles; or a connected component containing two particles of S which is not a segment, a cycle or a star with three arms; or a connected component containing at least three particles of S which is neither a segment nor a cycle. Proof. The equivalence (i) ⇔ (ii) is a consequence of Tits’ alternative for right-angled Artin groups [Bau81], combined with Proposition 9.9. If Λ1 , . . . , Λr denote the connected components of Γ, we know from Lemma 9.5 that Bn (Γ, S) ' Bn1 (Λ1 ) × · · · × Bnr (Λr ), where ni = #S ∩ Λi for every 1 ≤ i ≤ r. Therefore, the braid group Bn (Γ, S) is free abelian if and only if all the Bni (Λi )’s are free abelian themselves, which occurs if and only if they are cyclic according to Theorem 9.24. The equivalence (ii) ⇔ (iii) follows from Lemmas 9.13 and 9.27. Now, we are ready to determine when a graph braid group contains a subgroup isomorphic to F2 × Z. Our theorem will be a direct consequence of the following proposition combined with Theorem 8.14. Proposition 9.35. Let Γ be a connected compact one-dimensional CW-complex. 44 • The braid group B2 (Γ) contains F2 × Z if and only if Γ contains an induced cycle which is disjoint from two other induced cycles. • The braid group B3 (Γ) contains F2 × Z if and only if Γ contains an induced cycle disjoint from two other induced cycles; or a vertex of degree at least four disjoint from an induced cycle; or a segment between two vertices of degree three which is disjoint from an induced cycle; or a vertex of degree three which is disjoint from two induced cycles; or two disjoint induced cycles one of those containing a vertex of degree three. • The braid group B4 (Γ) contains F2 × Z if and only if Γ is not a rose graph, nor a segment linking two vertices of degree three, nor a cycle containing two vertices of degree three, nor two cycles glued along a non trivial segment. • For every n ≥ 5, the braid group Bn (Γ) contains F2 × Z if and only if Γ is not a rose graph. Proof. Let n ≥ 2 be an integer. We claim that Bn (Γ) contains a subgroup isomorphic to F2 × Z if and only if Γ contains two disjoint induced subgraphs Λ1 , Λ2 ⊂ Γ such that Bn (Λ1 , S ∩ Λ1 ) contains a non abelian free subgroup and such that Bn (Λ2 , S ∩ Λ2 ) is non trivial for some initial configuration S ∈ U Cn (Γ). Fix an initial configuration S ∈ U Cn (Γ). Suppose first that Bn (Γ, S) contains a subgroup isomorphic to F2 × Z. Let a, b ∈ Bn (Γ, S) be two S-legal words of edges generating F2 , and z ∈ Z an S-legal word of edges generating Z. Up to conjugating z (and changing the initial configuration), we may suppose that z is cyclically reduced. As a consequence of Proposition 9.9 and [Ser89, Centralizer Theorem], one can write z as a reduced product hn1 1 · · · hnr r such that any edge of the word hi is disjoint from any edge of the word hj if i 6= j; and a and b respectively as hp11 · · · hpr r h and hq11 · · · hqrr k such that the edges of the words h and k are disjoint from the edges of the hi ’s. As a consequence of Lemma 4.2, for every j ≥ 1, one has jpr 1 aj = (hp11 · · · hpr r h)j = hj hjp 1 · · · hr ; a fortiori, hj is an S-legal word. Because the terminus of a word may take only finitely values, there exists two distinct integers i, j ≥ 1 such that hi and hj have the same terminus, so that hi h−j = hi−j must belong to Bn (Γ, S). A similar argument works for k. Therefore, there exist two integers p, q ≥ 1 such that hp and k q belong to Bn (Γ, S). Let Λ1 be the subgraph of Γ generated by the edges of the words h and k, and Λ2 the subgraph generated by the edges of the word z. Notice that Λ1 and Λ2 are disjoint, and that z ∈ Bn (Λ2 , S ∩ Λ2 ) and hp , k q ∈ Bn (Λ1 , S ∩ Λ1 ). A fortiori, Bn (Λ2 , S ∩ Λ2 ) is non trivial, and Bn (Λ1 , S ∩ Λ1 ) contains a non abelian free subgroup. Indeed, because the powers ap and bq do not commute (since a and b generate a non abelian free subgroup), necessarily hp and k q cannot commute, so that hhp , k q i must be a free group as a consequence of [Bau81] (which applies thanks to Proposition 9.9). This is the desired conclusion. The converse follows from Proposition 9.10 and Lemma 9.5, concluding the proof of our claim. Consequently, B2 (Γ) contains F2 × Z if and only if there exist two disjoint (connected) subgraphs Λ1 , Λ2 ⊂ Γ such that B1 (Λ1 ) contains a non abelian free subgroup and B1 (Λ2 ) is non trivial. The conclusion follows from Lemmas 9.13 and 9.34. Next, B3 (Γ, S) contains F2 ×Z if and only if if there exist two disjoint subgraphs Λ1 , Λ2 ⊂ Γ such that either B1 (Λ1 , S ∩Λ1 ) contains a non abelian free subgroup and B2 (Λ2 , S ∩Λ2 ) 45 is non trivial, or B2 (Λ1 , S ∩ Λ1 ) contains a non abelian free subgroup and B1 (Λ2 , S ∩ Λ2 ) is non trivial. According to Lemmas 9.13 and 9.34, the former situation is equivalent to: Γ contains an induced cycle which is disjoint from two other induced cycles or it contains a vertex of degree at least three which is disjoint from two induced cycles; and the latter situation is equivalent to: Γ contains an induced cycle which is disjoint from two other induced cycles or from a connected subgraph which not a segment, a cycle or a star with three arms. The desired conclusion follows from the next observation. Fact 9.36. A connected graph is distinct from a segment, a cycle and a star with three arms if and only if it contains a vertex of degree at least four, or if its contains two distinct vertices of degree three, or if it is a cycle containing a vertex of degree three. Let Λ be a connected graph. If Λ does not contain any vertex of degree at least three, then Λ must be either a segment or a cycle. If Λ contains at least two distinct vertices of degree at least three, we are done, so suppose that Λ contains a unique vertex of degree at least three. If this vertex has degree at least four, we are done, so suppose that it has degree exactly three. Two cases may happen: either Λ is a star with three arms, or Λ is a cycle containing a vertex of degree three. Now, notice that B4 (Γ) contains F2 × Z if Γ contains at least three vertices of degree three or if it contains it contains two distinct vertices respectively of degrees at least three and four. In the former case, Γ contains two disjoint subgraphs Λ1 and Λ2 such that Λ1 is a segment between two vertices of degree three and Λ2 a star with three arms. By fixing an initial configuration S ∈ U C4 (Γ) satisfying #S ∩ Λ1 ≥ 2 and #S ∩ Λ2 ≥ 2, it follows from Lemmas 9.13 and 9.34 that B4 (Λ1 , S ∩ Λ1 ) contains a non abelian free subgroup and that B4 (Λ2 , S ∩ Λ2 ) is non trivial. In the latter case, Γ contains two disjoint subgraphs Λ1 and Λ2 such that Λ1 is a star with at least three arms and Λ2 a star with at least four arms. By fixing an initial configuration S ∈ U C4 (Γ) satisfying #S ∩ Λ1 ≥ 2 and #S ∩ Λ2 ≥ 2, it follows from Lemmas 9.13 and 9.34 that B4 (Λ1 , S ∩ Λ1 ) is non trivial and that B4 (Λ2 , S ∩ Λ2 )contains a non abelian free subgroup. This proves our claim. From now on, suppose that Γ contains at most two vertices of degree at least three, and that it does not contain two vertices respectively of degrees at least three and four. If Γ is a tree, only two cases may happen: Γ is a star (and in particular a rose graph) or a segment between two vertices of degree three. If Γ contains a unique cycle, only three cases may happen: Γ is reduced to a cycle, or Γ is a cycle which contains a vertex of degree at least three, or Γ is a cycle with two vertices of degree three. Notice that, in the first two cases, Γ is a rose graph. From now on, we suppose that Γ contains at least two induced cycles. Next, notice that, if Γ contains a vertex of degree at least three which is disjoint from a cycle containing a vertex of degree at least three, then B4 (Γ) contains F2 × Z as a subgroup. Indeed, when it is the case, Γ contains two disjoint subgraphs Λ1 and Λ2 where Λ1 is an induced cycle with a vertex of degree three and Λ2 a star with three arms. By fixing an initial configuration S ∈ U C4 (Γ) satisfying #S ∩ Λ1 ≥ 2 and #S ∩ Λ2 ≥ 2, it follows from Lemmas 9.13 and 9.34 that B4 (Λ1 , S ∩ Λ1 ) contains a non abelian free subgroup and that B4 (Λ2 , S ∩ Λ2 ) is non trivial. The desired conclusion follows. From now on, we suppose that Γ does not contain any vertex of degree at least three which is disjoint from a cycle containing a vertex of degree at least three. As a consequence, the induced cycles of Γ must pairwise intersect: otherwise, Γ would contain two disjoint induced cycles joined by a segment. Let C1 and C2 be two induced cycles of Γ. According to our previous observation, C1 and C2 intersect. We distinguish two cases. First, suppose that the intersection C1 ∩ C2 is not reduced to a singel vertex. 46 As a consequence of our assumptions, C1 ∩ C2 must be a segment whose endpoints are two vertices of degree three. Because Γ cannot contain any other vertex of degree at least three, it follows that Γ = C1 ∪ C2 , ie., Γ is a union of two induced cycles glued along a non trivial segment. Next, suppose that C1 ∩ C2 is reduced to a single vertex. A fortiori, Γ contains a vertex of degree at least four, so that no other vertex can have degree at least three. It follows that Γ must be a rose graph. Thus, we have proved that, if B4 (Γ) does not contain F2 × Z, then Γ must be • a rose graph; • or a segment linking two vertices of degree three; • or a cycle containing two vertices of degree three; • or two cycles glued along a non trivial segment. Conversely, we claim that if Γ is one of these graphs then B4 (Γ) does not contain F2 × Z. Let S ∈ U C4 (Γ) be an initial configuration and Λ1 , Λ2 ⊂ Γ two subgraphs such that B4 (Λ1 , S ∩ Λ1 ) is non trivial. We distinguish two cases. First, suppose that #S ∩ Λ1 = 1. Because B4 (Λ1 , S ∩ Λ1 ) is non trivial, Λ1 must contain a cycle, so that Λ2 must be included into the complement of a cycle. By looking at our different graphs, this implies that Λ2 must be a disjoint union of segments, so that B4 (Λ2 , S ∩ Λ2 ) has to be trivial. Next, suppose that #S ∩ Λ1 ≥ 2. If Λ1 contains a cycle, the previous argument shows that B4 (Λ2 , S ∩ Λ2 ) is trivial, so suppose that Λ1 does not contain any cycle. Because B4 (Λ1 , S ∩ Λ1 ) is non trivial, necessarily Λ1 must contain a vertex of degree at least three, so that Λ2 is included into the complement of a vertex of degree at least three. By looking at our different graphs, we deduce that Λ2 either is a disjoint union of segments, so that B4 (Λ2 , S ∩ Λ2 ) is trivial, or is included into a star with three arms. In the latter case, Λ2 is either a disjoint union of segments, such that B4 (Λ2 , S ∩ Λ2 ) is trivial, or a disjoint union of segments with a star having three arms, so that B4 (Λ2 , S ∩ Λ2 ) cannot contain a non abelian free subgroup according to Lemma 9.34 since #S ∩ Λ2 ≤ 4 − #S ∩ Λ1 ≤ 2. As a consequence of the equivalence proved at the beginning of this proof, it follows that B4 (Γ) does not contain F2 × Z as a subgroup. Finally, let n ≥ 5 be an integer. Suppose first that Γ contains at least two distinct vertices of degree at least three. Then Γ contains two disjoint subgraphs Λ1 and Λ2 isomorphic to stars with three arms. By fixing an initial configuration S ∈ U Cn (Γ) satisfying #S ∩ Λ1 ≥ 3 and #S ∩ Λ2 ≥ 2, it follows from Lemmas 9.13 and 9.34 that B4 (Λ1 , S ∩ Λ1 ) contains a non abelian free subgroup and that B4 (Λ2 , S ∩ Λ2 ) is non trivial. Therefore, Bn (Γ) contains F2 × Z as a subgroup. Next, if Γ contains at most one vertex of degree at least three, then it must be a rose graph. In this case, we know from Lemma 9.16 that Bn (Γ) is a free group so that Bn (Γ) cannot contain F2 × Z as a subgroup. Proof of Theorem 9.33. Our theorem follows directly from Proposition 9.35, Theorem 8.14 and Lemma 9.16. Example 9.37. The braid group Bn (Km ) is hyperbolic relatively to abelian subgroups if and only if n = 1, or n = 2 and m ≤ 7, or n = 3 and m ≤ 4, or m ≤ 3. The non hyperbolic groups in this family are B2 (K7 ) and B3 (K6 ). Example 9.38. The braid group Bn (Kp,q ) is hyperbolic relatively to abelian subgroups if and only if n = 1, or n = 2 and p, q ≤ 4, or n = 3 and p, q ≤ 3, or n = 4 and p = 2 and q ≤ 3, or p, q ≤ 2. The non hyperbolic groups in this family are B2 (K4,4 ), B3 (K3,3 ) and B4 (K2,3 ). 47 It is worth noticing that there are only finitely many graphs Γ whose braid group on four particles could not be free. Therefore, it would interesting to determine these groups. Question 9.39. What is the braid group B4 (Γ) if Γ is a segment linking two vertices of degree three, or a cycle containing two vertices of degree three, or two cycles glued along a non trivial segment? Are these groups free products? Unfortunately, we were not able to apply Theorem 8.1 in order to determine precisely when a graph braid group is relatively hyperbolic, so this question remains open. Nevertheless, we are able to state and prove directly a sufficient criterion of relative hyperbolicity. Before stating our criterion, we need to introduce the following definition: Definition 9.40. Let Γ be a one-dimensional CW-complex, n ≥ 1 an integer, Λ ⊂ Γ a subgraph and w ∈ D(U Cn (Γ)) a diagram. The coset whΛi is the set of diagrams which can be written as a concatenation w · ` where ` is a diagram represented by a legal word of oriented edges belonging to Λ. Similarly, for every diagrams a, b ∈ D(U Cn (Γ)), we denote by ahΛib the set of diagrams which can be written as a concatenation a · ` · b where ` is a diagram represented by a legal word of oriented edges belonging to Λ. Our main criterion is the following: Theorem 9.41. Let Γ be a connected compact one-dimensional CW-complex, and let G be a collection of subgraphs of Γ satisfying the following conditions: • every pair of disjoint simple cycles of Γ is contained into some Λ ∈ G; • for every distinct Λ1 , Λ2 ∈ G, the intersection Λ1 ∩ Λ2 is either empty or a disjoint union of segments; • if γ is a reduced path between two vertices of some Λ ∈ G which is disjoint from some cycle of Λ, then γ ⊂ Λ. Then B2 (Γ) is hyperbolic relatively to subgroups which are isomorphic to whΛiw−1 for some subgraph Λ ∈ G and some diagram w satisfying t(w) ⊂ Λ. In particular, B2 (Γ) is relatively hyperbolic if G is a collection of proper subgraphs. Proof. Set C = {whΛi | Λ ∈ G, t(w) ⊂ Λ}. We think of C as a collection of convex subcomplexes of the CAT(0) cube complex Xn (Γ). For convenience, set L = #V (Γ)(#V (Γ) − 1)/2 which is also the number of vertices of U C2 (Γ). Recall that a flat rectangle in Xn (Γ) is an isometric combinatorial embedding [0, p] × [0, q] ,→ Xn (Γ); it is K-thick for some K ≥ 0 if p, q > K. Claim 9.42. For every distinct C1 , C2 ∈ C, there exist at most L hyperplanes intersecting both C1 and C2 . Let w1 hΛ1 i, w2 hΛ2 i ∈ C be two cosets both intersected by at least L + 1 hyperplanes. As a consequence of [Gen16a, Corollary 2.17], there exists a flat rectangle [0, p] × [0, q] ,→ Xn (Γ) such that {0} × [0, q] ⊂ w1 hΛ1 i, {p} × [0, q] ⊂ w2 hΛ2 i and q ≥ L + 1. Let Λ0 be the union of the edges of Γ labelling the hyperplanes intersecting the path {0} × [0, q]. Since the edges of w1 hΛ1 i (resp. w2 hΛ2 i) are all labelled by edges of Λ1 (resp. Λ2 ), it follows that Λ0 ⊂ Λ1 ∩ Λ2 . Reading the word labelling the path {0} × [0, q], we deduce that there exists a reduced diagram of length at least L + 1 in hΛ0 i; a fortiori, by looking at the prefixes to the previous word, we know that there exists an initial configuration S ∈ U Cn (Γ) (which is the terminus of (0, 0)) for which there exist at least L + 1 distinct (S, ∗)-diagrams in hΛi. Necessarily, at least two such diagrams, say A and B, must have the same terminus since there are at most L possible terminus. Then AB −1 provides a non trivial spherical diagram in hΛi, showing that B2 (Λ0 , S) is non trivial, and finally 48 that Λ0 is not a union of segments. This implies that Λ1 and Λ2 must be equal; for convenience, let Λ denote this common subgraph of Γ. Let m = m1 · · · mp denote the word labelling the path [0, p] × {0}. We claim that m1 ∪ · · · ∪ mp defines a path in Γ; otherwise saying, thought of as a motion of two particles starting from the initial configuration S which is the terminus of (0, 0), m fixes a particle. Indeed, if e denotes the edge of Γ labelling {0} × [0, 1] (which exists since q ≥ 1), then the mi ’s are disjoint from e since the hyperplane dual to e is transverse to any hyperplane intersecting [0, p] × {0}, so that m must fixes the starting point of e. This proves that m is a path, and even a reduced path since [0, p] × {0} is a geodesic in Xn (Γ). In fact, our argument implies the following more general statement: Fact 9.43. Let [0, p] × [0, q] ,→ X2 (Γ) be a flat rectangle. For every 0 ≤ k ≤ q, the word of edges of Γ labelling the path [0, p] × {k} defines a regular path in Γ when thought of as a sequence of edges of Γ. As a consequence, if p ≥ 1, then the word of edges of Λ0 labelling {0} × [0, q] defines a reduced path in Γ. But this path has length q ≥ L + 1 in a subgraph Λ0 containing at most L vertices. Consequently, Λ0 must contain an induced cycle. Let w1 `1 and w2 `2 denote the vertices (0, 0) and (p, 0) respectively, where `1 ∈ hΛ1 i and `2 ∈ hΛ2 i. Notice that the starting point of m belongs to the terminus of w1 `1 , which is included into Λ; and that the ending point of m belongs to the terminus of w1 `1 p = w2 `2 , which is included into Λ. Therefore, m is a reduced path in Γ between two vertices of Λ, which is disjoint from Λ0 since any hyperplane intersecting [0, p] × {0} is transverse to any hyperplane intersecting {0} × [0, q]. Two cases may happen, either p ≥ 1, so that Λ0 ⊂ Λ contains an induced cycle disjoint from p; or p = 0, so that w1 hΛi and w2 hΛi intersect. In the former case, it follows from our assumptions that m1 , . . . , mp ∈ Λ, so that [0, p] × [0, q] ⊂ w1 hΛi. A fortiori, w1 hΛi and w2 hΛi must intersect as well. Since two distinct cosets associated to the same subgraph of Γ must be disjoint, we deduce that w1 hΛi = w2 hΛi, concluding the proof of our claim. Claim 9.44. Every 2L-thick flat rectangleof X2 (Γ) is contained into the 2L-neighborhood of some element of C. Let [0, p] × [0, q] ,→ X2 (Γ) be an 2L-thick flat rectangle. Let 0 ≤ a < b ≤ L + 1 and p − L − 1 ≤ c < d ≤ p be four integers such that (a, 0) and (b, 0) (resp. (c, 0) and (d, 0)) have the same terminus, and such that two distinct vertices of (a, b) × {0} (resp. (c, d) × {0}) do not have the same terminus. Similarly, let 0 ≤ e < f ≤ L + 1 and q − L − 1 ≤ g < h ≤ q be four integers such that (0, e) and (0, f ) (resp. (0, g) and (0, h)) have the same terminus, and such that two distinct vertices of {0} × (e, f ) (resp. {0} × (g, h)) do not have the same terminus. In order to deduce our claim, it is sufficient to show that there exists some C ∈ C containing [a, d] × [e, h]. Let y be the word of edges of Γ labelling the path [a, d] × {e}. According to Fact 9.43, thought of as a sequence of edges of Γ, y defines a reduced path in Γ; let α denote this path. Notice that, for every 1 ≤ x < y ≤ p, the vertices (x, e) and (y, e) have the same terminus if and only if (x, 0) and (y, 0) have the same terminus themselves since (x, e) = (x, 0) · E and (y, e) = (y, 0) · E where E denotes the diagram labelling the path {0}×[0, e] (which also labels {x}×[0, e] and {y}×[0, e]). A fortiori, (a, e) and (b, e) (resp. (c, e) and (d, e)) have the same terminus, and two distinct vertices of (a, b) × {e} (resp. (c, d) × {e}) do not have the same terminus. Therefore the subpaths of α corresponding to [a, b] × {e} and [c, d] × {e} are simple cycles of Γ. Otherwise saying, if Λ(y) ⊂ Γ) denotes the union of the edges of α, then Λ(y) decomposes as two simple cycles linked by a reduced path. Similarly, if z denotes the word of edges of Γ labelling the path 49 {a} × [e, h], then, thought of as a sequence of edges of Γ, it defines a reduced path β in Γ such that, if Λ(z) denotes the union of the edges of β, then Λ(z) ⊂ Γ decomposes as two simple cycles linked by a reduced path. Notice that [a, d] × [e, h] ⊂ whΛ(y) ∪ Λ(z)i, where w = (a, e); and that Λ(y) ∩ Λ(z) = ∅, since any hyperplane intersecting [a, d] × {e} must be transverse to any hyperplane intersecting {a} × [e, h]. Let convenience, let A, B (resp. C, D) denote our two simple cycles in Λ(y) (resp. in Λ(z)). By assumption, there exist some Λ1 , Λ2 , Λ3 such that A ∪ C ⊂ Λ1 , A ∪ D ⊂ Λ2 and B ∪ D ⊂ Λ3 . By noticing that the intersections Λ1 ∩ Λ2 and Λ2 ∩ Λ3 are not unions of segments (since they contain cycles), it follows that Λ1 = Λ2 = Λ2 ; let Λ denote this common subgraph. So Λ belongs to G and contains A ∪ B ∪ C ∪ D. Moreover, the reduced path between A and B in Λ(y) links two vertices of Λ and is disjoint from D and C (which are included into Λ(z)), so this path must be included into Λ. Similarly, the path between C and D in Λ(y) must be included into Λ. A fortiori, Λ(y) and Λ(z) are both contained into Λ. Consequently, [a, d] × [e, h] ⊂ whΛ(y) ∪ Λ(z)i ⊂ whΛi ∈ C, which concludes the proof of our claim. Claim 9.45. An edge of X2 (Γ) belongs to only finitely many subcomplexes of C. If w1 hΛ1 i, w2 hΛ2 i ∈ C are distinct and both contain a given edge of X2 (Γ), necessarily Λ1 6= Λ2 . Therefore, at most #G ≤ 2#V (Γ) subcomplexes of C contain a given edge of X2 (Γ), proving our claim. Now, we are ready to conclude the proof of our theorem. Let Y denote the cone-off of X2 (Γ) over C. More precisely, Y is the graph obtained from the one-skeleton of X2 (Γ) by adding a vertex for each C ∈ C and by adding an edge between this vertex and any vertex of C. According to [Gen16a, Theorem 4.1], it follows from Claim 9.44 that Y is hyperbolic; and according to [Gen16a, Theorem 5.7], it follows from Claims 9.42 and 9.45 that Y is fine. In only remaining point to show in order to deduce that B2 (Γ) is hyperbolic relatively to {whΛiw−1 | Λ ∈ G, t(w) ⊂ Λ} is that Y contains finitely many orbits of edges. In fact, it is sufficient to prove that, for every Λ ∈ G and every diagram w, the subgroup whΛiw−1 acts cocompactly on whΛi. For that purpose, just notice that if w`1 , w`2 ∈ whΛi have the same terminus −1 is an element of whΛiw −1 sending w` to w` . then w`1 `−1 2 1 2 w Example 9.46. Let Γ be a union of two bouquets of circles (each containing at least one circle) whose centers are linked by a segment (which is not reduced to a single vertex). Notice that Γ contains a pair of disjoint induced cycles, so that B2 (Γ) is not hyperbolic according to Theorem 9.12. Nevertheless, if Λ ⊂ Γ denotes the union of the two bouquets of circles of Γ, then Theorem 9.41 applies to G = {Λ}, so that B2 (Γ) is (non trivially) hyperbolic relatively to subgroups which are isomorphic to B2 (Λ, S) for some configuration S ∈ U C2 (Λ). Notice that B2 (Λ2 , S) is isomorphic to the product of free groups Fr × Fs if S contains a particle in each connected component of Λ, where r and s denotes the number of circles contained in each bouquets; and B2 (Λ, S) is free if S is contained into a single connected component of Λ (as a consequence of Remark 9.17). Consequently, the braid group B2 (Γ) is hyperbolic relatively to a finite collection of groups isomorphic to Fr × Fs . Example 9.47. Let Γ = K2opp ∗ C4 be the graph obtained from a square by adding two new vertices and by linking them by an edge to any vertex of the square. Let G denote the collection of pairs of disjoint triangles of Γ. Then Theorem 9.41 applies, showing 50 that B2 (Γ) is hyperbolic relatively to subgroups which are isomorphic to B2 (Λ, S) for some U C2 (Λ), where Λ is a disjoint union of two triangles. Notice that either S is contained into a single triangle of Λ, so that B2 (Λ, S) ' Z; or S intersects the two connected components of Λ, so that B2 (Λ, S) ' Z2 . Consequently, the braid group B2 (Γ) is hyperbolic relatively to free abelian subgroups of rank two. Example 9.48. Consider the complete graph on six vertices K6 . Let G denote the collection of pairs of disjoint triangles of K6 . Then Theorem 9.41 applies, showing, as in the previous examples, that the braid group B2 (K6 ) is hyperbolic relatively to free abelian subgroups of rank two. It is worth noticing that Theorem 9.41 does not apply to B2 (Kn ) for n ≥ 7. We do not know whether or not these groups are relatively hyperbolic. Example 9.49. Consider the bipartite complete graph K4,4 . Let G denote the collection of pairs of disjoint squares of K4,4 . Then Theorem 9.41 applies, showing that the braid group B2 (K4,4 ) is hyperbolic relatively to free abelian subgroups of rank two. It is worth noticing that Theorem 9.41 does not apply to B2 (Km,n ) for m ≥ 5 or n ≥ 5. We do not know whether or not these groups are relatively hyperbolic. A natural question is: does the converse of Theorem 9.41 hold? But we do not know the answer. So we leave the following open question: Question 9.50. When is a graph braid group (on two particles) relatively hyperbolic? References [Abr00] Aaron D. Abrams. Configuration spaces and braid groups of graphs. PhD thesis, 2000. [Ago13] Ian Agol. The virtual Haken conjecture. Doc. Math., 18:1045–1087, 2013. With an appendix by Agol, Daniel Groves, and Jason Manning. [Bau81] A. Baudisch. Subgroups of semifree groups. Acta Math. Acad. Sci. Hungar., 38(1-4):19–28, 1981. [BH99] Martin R. Bridson and André Haefliger. Metric spaces of non-positive curvature, volume 319 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, 1999. [BHS17] J. Behrstock, M. Hagen, and A. Sisto. Thickness, relative hyperbolicity, and randomness in Coxeter groups. Algebraic & Geometric Topology, 17(2):705– 740, 2017. [BM97] M. Burger and S. Mozes. Finitely presented simple groups and products of trees. C. R. Acad. Sci. Paris, 324(I):747–752, 1997. [Bro06] R. Brown. Topology and groupoids. BookSurge, 2006. [CD14] F. Connolly and M. Doig. On braid groups and right-angled Artin groups. Geometriae Dedicata, 172(1):179–190, Oct 2014. [CDE+ ] V. Chepoi, F. Dragan, B. Estellon, M. Habib, and Y. Vaxès. Diameters, centers, and approximating trees of δ-hyperbolic geodesic spaces and graphs. Symposium on Computational Geometry, SoCG’2008, pages 59–68. 51 [CH09] P.-E. Caprace and F. Haglund. On geometric flats in CAT(0) realization of Coxeter groups and Tits buildings. Canad. J. Math., 61:740–761, 2009. [Che00] V. Chepoi. Graphs of some CAT(0) complexes. 24(2):125–179, 2000. [CS11] Pierre-Emmanuel Caprace and Michah Sageev. Rank rigidity for CAT(0) cube complexes. Geom. Funct. Anal., 21(4):851–891, 2011. [CS15] Ruth Charney and Harold Sultan. Contracting boundaries of CAT(0) spaces. J. Topol., 8(1):93–117, 2015. [CW04] John Crisp and Bert Wiest. Embeddings of graph braid and surface groups in right-angled Artin groups and braid groups. Algebraic & Geometric Topology, 4(1):439–472, 2004. [FS08] Daniel Farley and Lucas Sabalka. On the cohomology rings of tree braid groups. Journal of Pure and Applied Algebra, 212(1):53–71, 2008. [FS12] Daniel Farley and Lucas Sabalka. Presentations of graph braid groups. Forum Mathematicum, 24(4):827–859, 2012. [Gen15] A. Genevois. Hyperplanes of Squier’s cube complexes. arXiv:1507.01667, 2015. Adv. in Appl. Math., [Gen16a] A. Genevois. Coning-off CAT(0) cube complexes. arXiv:1603.06513, 2016. [Gen16b] A. Genevois. Contracting isometries of CAT(0) cube complexes and acylindricaly hyperbolicity of diagram groups. arXiv:1610.07791, 2016. [Gen17a] A. Genevois. Cubical-like geometry of quasi-median graphs and applications. In preparation, 2017. [Gen17b] A. Genevois. Hyperbolic diagram groups are free. Geometriae Dedicata, 188(1):33–50, Jun 2017. [Gre90] E. Green. Graph products of groups. PhD Thesis, 1990. [Gro87] M. Gromov. Hyperbolic groups. Essays in group theory, 8(75-263):2, 1987. [GS97] Victor Guba and Mark Sapir. Diagram groups. Mem. Amer. Math. Soc., 130(620):viii+117, 1997. [HS16] M. Hagen and T. Susse. arXiv:1609.01313, 2016. Hierarchical hyperbolicity of all cubcal groups. [HW08a] Frédéric Haglund and Daniel T. Wise. Special cube complexes. Geom. Funct. Anal., 17(5):1551–1620, 2008. [HW08b] G. Hruska and D. Wise. Packing subgroups in relatively hyperbolic groups. Geometry and Topology, 13:1945–1988, 2008. [KKP12] Jee Hyoun Kim, Ki Hyoung Ko, and Hyo Won Park. Graph braid groups and right-angled Artin groups. Transactions of the American Mathematical Society, 364(1):309–360, 2012. [KP12] Ki Hyoung Ko and Hyo Won Park. Characteristics of graph braid groups. Discrete & Computational Geometry, 48(4):915–963, 2012. 52 [KS16] Aditi Kar and Michah Sageev. Uniform exponential growth for CAT(0) square complexes. arXiv:1607.00052, 2016. [Kur12] Vitaliy Kurlin. Computing braid groups of graphs with applications to robot motion planning. Homology, Homotopy and Applications, 14(1):159–180, 2012. [Mul80] H.M. Mulder. The interval function of a graph, volume 132 of Math. Centre Tracts. Mathematisch Centrum, Amsterdam, 1980. [NTY14] Y. Nakagawa, M. Tamura, and Y. Yamashita. Non-hyperbolic automatic groups and groups acting on CAT(0) cube complexes. International Journal of Algebra and Computation, 24:795–813, 2014. [Osi06] D. 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:851– 888, 2016. [PS14] Paul Prue and Travis Scrimshaw. Abrams’s stable equivalence for graph braid groups. Topology and its Applications, 178:136–145, 2014. [Sab07] Lucas Sabalka. Embedding right-angled Artin groups into graph braid groups. Geometriae Dedicata, 124(1):191–198, 2007. [Sag95] Michah Sageev. Ends of group pairs and non-positively curved cube complexes. Proc. London Math. Soc. (3), 71(3):585–617, 1995. [Ser89] Herman Servatius. Automorphisms of graph groups. Journal of Algebra, 126(1):34–60, 1989. [Sis11] A. Sisto. Contracting elements and random walks. arXiv:1112.2666, 2011. [SW11] M. Sageev and D. Wise. Periodic flats in CAT(0) cube complexes. In Algebraic & and Geometric Topology, volume 11, pages 1793–1820. 2011. [SW15] M. Sageev and D. Wise. Cores for quasiconvex actions. Proc. Amer. Math. Soc., 143:2731–2741, 2015. [Woo16] Daniel J Woodhouse. A generalized axis theorem for cube complexes. arXiv:1602.01952, 2016. 53
4math.GR
arXiv:1602.00213v2 [math.GR] 26 Jul 2016 COMMENSURATED SUBGROUPS IN FINITELY GENERATED BRANCH GROUPS PHILLIP WESOLEK Abstract. A subgroup H ≤ G is commensurated if |H : H ∩gHg −1 | < ∞ for all g ∈ G. We show that a finitely generated branch group is just infinite if and only if every commensurated subgroup is either finite or of finite index. As a consequence, every commensurated subgroup of the Grigorchuk group and many other branch groups of independent interest are either finite or of finite index. 1. Introduction Subgroups H and K of a group G are commensurate if |H : H ∩K| < ∞ and |K : H ∩ K| < ∞. The subgroup H is commensurated in G if H and gHg−1 are commensurate for all g ∈ G. Normal subgroups are obvious examples of commensurated subgroups. However, commensurated subgroups need not be even commensurate with a normal subgroup. Simple groups can admit such commensurated subgroups; for example, Thompson’s group V admits an infinite commensurated proper subgroup. G. Margulis’ celebrated normal subgroup theorem demonstrates that any lattice in a higher rank simple algebraic group is just infinite - i.e. every non-trivial normal subgroup is of finite index; see [4]. Margulis and R. Zimmer then ask if the commensurated subgroups can be classified up to commensurability by a precise family of known commensurated subgroups; this question is sometimes called the Margulis–Zimmer commensurated subgroup problem. Aside from a strengthening of the normal subgroup theorem, the commensurated subgroup problem seems related to many aspects of arithmetic groups, as discussed in [7]. In loc. cit., Y. Shalom and G. Willis classify the commensurated subgroups for a large family of arithmetic groups, making substantial progress on this problem. Considering the analogues of the commensurated subgroup problem for other classes of groups with few normal subgroups seems independently interesting. Using the Shalom–Willis strategy of studying certain completions, we here classify the commensurated subgroups of finitely generated just infinite branch groups. Indeed, we characterize the just infinite property for finitely generated branch groups by commensurated subgroups. Theorem 1.1. Suppose G is a finitely generated branch group. Then G is just infinite if and only if every commensurated subgroup is either finite or of finite index. 1 2 PHILLIP WESOLEK As an immediate consequence of this result, we obtain a description of the commensurated subgroups of various groups of independent interest. Corollary 1.2. The Grigorchuk group and the Gupta–Sidki groups are such that every commensurated subgroup is either finite or of finite index. 2. Preliminaries We use “t.d.”, “l.c.”, and “s.c.” for “totally disconnected”, “locally compact”, and “second countable”, respectively. Recall that a t.d.l.c.s.c. group is a Polish group - i.e. it is separable and admits a complete, compatible metric. 2.1. Branch groups. Our approach to branch groups follows closely R. I. Grigorchuk’s presentation in [3]. A rooted tree T is a locally finite tree with a distinguished vertex r called the root. Letting d be the usual graph metric, the levels of T are the sets Vn := {v ∈ T | d(v, r) = n}. The degree of a vertex v ∈ Vn is the number of w ∈ Vn+1 such that there is an edge from v to w. When vertices k and w lie on the same path to the root and d(k, r) ≤ d(w, r), we write k ≤ w. Given a vertex s ∈ T , the tree below s, denoted by T s , is the collection of t such that s ≤ t along with the induced graph structure. We call a rooted tree spherically homogeneous if all v, w ∈ Vn the degree of v is the same as the degree of w. A spherically homogeneous tree is completely determined by specifying the degree of the vertices at each level. These data are given by an infinite sequence α ∈ NN such that α(i) ≥ 2 for all i ∈ N. The condition α(i) ≥ 2 is to ensure that levels are not redundant; i.e. if α(i) = 1, then we can remove the i-th level without changing the automorphism group. We denote a spherically homogeneous tree by Tα for α ∈ NN ≥2 . When α ≡ k for some k ≥ 2, we write Tk . For G ≤ Aut(Tα ) a subgroup and for a vertex v ∈ Tα , the rigid stabilizer of v in G is defined to be ristG (v) := {g ∈ G | g(w) = w for all w ∈ Tα \ Tαv }. The n-th rigid level stabilizer in G is defined to be ristG (n) := hristG (v) | v ∈ Vn i. Q It is easy to see that ristG (n) ≃ v∈Vn ristG (v). Definition 2.1. A group G is said to be a branch group if there is a rooted tree Tα for some α ∈ NN ≥2 such that the following hold: (i) G is isomorphic to a subgroup of Aut(Tα ). (ii) G acts transitively on each level of Tα . (iii) For each level n, the index |G : ristG (n)| is finite. Let (iii)′ be the the following condition: Every ristG (n) is infinite. A group satisfying (i), (ii), and (iii)′ is called a weakly branch group. Plainly, every branch group is also weakly branch. FINITELY GENERATED BRANCH GROUPS 3 An infinite group is just infinite if all proper quotients are finite. Just infinite branch groups already have a characterization in terms of certain normal subgroups. Theorem 2.2 (Grigorchuk, [3, Theorem 4]). Suppose G ≤ Aut(Tα ) is a branch group. Then G is just infinite if and only if the commutator subgroup ristG (k)′ has finite index in ristG (k) for all levels k. We shall need a fact implicit in the proof of [3, Theorem 4]. Proposition 2.3 (Grigorchuk). Suppose G ≤ Aut(Tα ) acts transitively on each level of Tα . If H E G is non-trivial, then there is a level m such that ristG (m)′ ≤ H. 2.2. Completions and chief blocks. Our proof requires the Schlichting completion. This completion has appeared in various contexts in the literature. See for example [8] or consider [6] for a longer discussion. We here give a brief account Given a countable group G with a commensurated subgroup O, the group G acts by left multiplication on the collection of left cosets G/O. This induces a permutation representation σ : G → Sym(G/O) with kernel the normal core of O in G. The group Sym(G/O) is a topological, indeed Polish, group under the pointwise convergence topology, and we may thus form a completion as follows: Definition 2.4. For a countable group G with a commensurated subgroup O, the Schlichting completion of G with respect to O, denoted by G//O, is defined to be σ(G). The map σ : G → G//O is called the completion map. It is easy to verify that G//O is a t.d.l.c.s.c. group. When G is finitely generated, G//O is additionally compactly generated. We shall also need the theory of chief blocks developed in [5]. A normal factor of a topological group G is a quotient K/L such that K and L are closed normal subgroups of G with L < K. We say that K/L is a chief factor if there are no closed normal subgroups of G strictly between L and K. The centralizer of a normal factor K/L is CG (K/L) := {g ∈ G | [g, K] ≤ L}. Centralizers give a notion of equivalence for chief factors; we restrict this equivalence to non-abelian chief factors for technical reasons. Non-abelian chief factors K1 /L1 and K2 /L2 are associated if CG (K1 /L1 ) = CG (K2 /L2 ). For a non-abelian chief factor K/L, the equivalence class of non-abelian chief factors equivalent to K/L is denoted by [K/L]. The class [K/L] is called a chief block of G. The set of chief blocks of G is denoted by BG . For a chief block a, the centralizer CG (a) is defined to be CG (K/L) for some (equivalently, any) representative K/L. A key property of chief blocks is a general refinement theorem. 4 PHILLIP WESOLEK Theorem 2.5 (Reid–Wesolek, [5, Theorem 1.15]). Let G be a Polish group, a ∈ BG , and {1} = G0 ≤ G1 ≤ · · · ≤ Gn = G be a series of closed normal subgroups in G. Then there is exactly one i ∈ {0, . . . , n − 1} such that there exist closed normal subgroups Gi ≤ B < A ≤ Gi+1 of G for which A/B ∈ a. 3. Commensurated subgroups We first establish the reverse implication of our main theorem. For this implication, we need not assume the group is finitely generated, and the result holds for weakly branch groups. Proposition 3.1. Let G ≤ Aut(Tα ) be a weakly branch group. If every commensurated subgroup of G is either finite or of finite index, then G is just infinite. Proof. Fix a level m. The commutator subgroup H := ristG (m)′ is then a normal subgroup of G and, a fortiori, T commensurated. Suppose for contradiction that H is finite. Since n≥m ristG (n) = {1}, there is some k ≥ m such that ristG (k) ∩ H = {1}. The group ristG (k) then injects into ristG (m)/H, so it is abelian. This is absurd since weakly branch groups do not admit abelian rigid stabilizers. We thus deduce that H is of finite index in G, and it follows that G is a branch group. Appealing to Theorem 2.2, G is just infinite.  We now consider the converse for finitely generated branch groups. Theorem 3.2. Suppose G ≤ Aut(Tα ) is a finitely generated branch group. If G is just infinite, then every commensurated subgroup of G is either finite or of finite index. Proof. Suppose for contradiction O ≤ G is an infinite commensurated subgroup of infinite index. Form the Schlichting completion H := G//O and let σ : G → H be the completion map. Since G is finitely generated, H is a compactly generated t.d.l.c.s.c. group. For all open normal subgroups L E H, the preimage σ −1 (L) is a non-trivial normal subgroup of G, hence it has finite index. It follows that L is a finite index open subgroup of H. Every open normal subgroup of H therefore has finite index. Appealing to [1, Theorem F], we deduce that \ R := {O E H | O is open} is a cocompact characteristic subgroup of H without non-trivial discrete quotients. If R is trivial, then H is a compact group, and O has finite index in G. However, this is absurd, as we assume O has infinite index. The group R is thus an infinite compactly generated t.d.l.c.s.c. group with no non-trivial discrete quotients. Since R is t.d.l.c., any non-trivial FINITELY GENERATED BRANCH GROUPS 5 compact quotient is profinite, and thus, such a quotient produces a nontrivial discrete quotient. We deduce that R additionally has no non-trivial compact quotient. The result [1, Theorem A] now implies that R admits exactly n non-discrete topologically simple quotients where 0 < n < ∞; say that N1 , . . . , Nn lists the kernels of these quotients. The group H acts on {N1 , . . . , Nn } by conjugation, so there is a closed H̃ E H with finite index such that H̃ fixes each Ni . The pre-image σ −1 (H̃) is then a finite index normal subgroup of G. Via Proposition 2.3, there is some level m of the tree such that ristG (m)′ ≤ σ −1 (H̃), and we may assume m > n. Taking E := σ(ristG (m)′ ), we have that E is a finite index subgroup of H and that E normalizes each Ni . Each factor R/Ni is thus a chief factor of E; let ai be the chief block of E given by R/Ni . For each v ∈ Vm , the subgroup Lv := σ(ristG (v)′ ) is a non-abelian closed normal subgroup of E. Letting v1 , . . . , vk list Vm , put Ki := Lv1 . . . Lvi and observe that Ki < Ki+1 . We thus obtain a normal series for E: {1} < K1 < · · · < Kk = E. Repeatedly applying Theorem 2.5, we may refine the series to include a representative for each ai . Since n < k, there is some Kj < Kj+1 such that the refinement puts no subgroups between Kj and Kj+1 . The subgroup Lvj+1 is plainly contained in the centralizer of any al which has a representative which appears in the refined series after Kj+1 . On the other hand, since Lvj+1 centralizes Kj , the group Lvj+1 also centralizes the al with representatives appearing in the refined series before Kj . The group Lvj+1 thus centralizes each block a1 , . . . , an , and therefore, it centralizes each factor R/Ni . T Returning to the setting of H, the subgroup K := ni=1 CH (R/Ni ) is normal in H, and moreover, the previous paragraph ensures Lvj+1 ≤ K. Therefore, K intersects σ(G) non-trivially, so σ −1 (K) is a finite index subgroup of G. We conclude that K has finite index in H, so R ≤ K. Each R/Ni is thus abelian, which is absurd.  Proof of Theorem 1.1. Proposition 3.1 gives the reverse implication. Theorem 3.2 gives the forward implication.  The following example shows that the finite generation hypothesis is necessary in Theorem 3.2: Example 3.3. Let A5 be the alternating group on five elements and take the usual permutation representation (A5 , [5]). For each n ≥ 1, let Kn be the iterated wreath product of n copies of (A5 , [5]). The permutation group given by the imprimitive action (Kn , [5]n ) induces an embedding φn : Kn → Aut(T5 ), where the action of Kn on T5 moves the vertices below the n-th level rigidly. The Kn form a directed system, so we may take the direct limit G. One verifies that the maps φn cohere to induce a map φ : G → Aut(T5 ). The 6 PHILLIP WESOLEK map φ moreover witnesses that G is a branch group. Applying Theorem 2.2, it follows that G is also just infinite. However, G admits infinite commensurated subgroups of infinite index. For example, let F be a proper non-trivial subgroup of A5 and let (F, [5]) be the permutation representation induced by (A5 , [5]). The iterated wreath products of copies of (F, [5]) again form a direct system. Moreover, the direct limit is an infinite commensurated subgroup of infinite index in G. We conclude with an easy observation. The results of Shalom–Willis [7] show that various arithmetic groups, including SLn (Z) for n ≥ 3, have the following strong property, which is sufficient to ensure every commensurated subgroup is either finite or of finite index for a just infinite group. We say that K ≤ G commensurates H ≤ G if |H : H ∩ kHk −1 | < ∞ for all k ∈ K. Definition 3.4. A group G is said to have the outer commensuratornormalizer property if the following holds: for every group H and every homomorphism ψ : G → H, if there is D ≤ H commensurated by ψ(G), e ≤ H commensurate with D and normalized by ψ(G). then there is D Just infinite finitely generated branch groups can fail the outer commensuratornormalizer property. To see this, we recall a standard group-theoretic construction: Definition 3.5. Suppose (Gi )i∈N is a sequence of t.d.l.c. groups and suppose there is a distinguished compact open subgroup Oi ≤ Gi for each i ∈ N. The local direct product of (Gi )i∈N over (Oi )i∈N is defined to be ) ( G Gi | f (i) ∈ Gi , and f (i) ∈ Oi for all but finitely many i ∈ N f :N→ i∈N Q with the group topology such that i∈N Oi continuously embeds as an open L subgroup. We denote the local direct product by i∈N (Gi , Oi ). Local direct products of t.d.l.c. groups are again t.d.l.c. groups. Proposition 3.6. The Grigorchuk group fails the outer commensuratornormalizer property. Proof. The Grigorchuk group G admits an action on a countable set X with a non-transfixed commensurated subset Y ⊆ X. That is to say, there is no Y ′ ⊆ X such that G fixes Y ′ setwise and |Y ∆Y ′ | < ∞; see [2, Section 2.7]. Fix a non-trivial finite group F , let Fx list copies of F indexed by X, and for each x ∈ X, define ( F if x ∈ Y Ux := {1} else. FINITELY GENERATED BRANCH GROUPS 7 L We then formL the local direct product x∈X (Fx , Ux ). The group G obviously acts on x∈X (Fx , Ux ) by shift, so we take M H := (Fx , Ux ) ⋊ G. x∈X Since Y is a commensurated subset of X and F is finite, it follows that H is a t.d.l.c. group. Q The subgroup U := x∈Y Fx is a compact open subgroup of H, and thus, G commensurates it. Suppose for contradiction that V ≤ H is commensurate with U and normalized by G. Passing to the closure if necessary, we may take V to be closed, hence V is also a compact open subgroup. Let Y ′ be the collection of coordinates x such that the projection πx (V ) is nontrivial. It follows that |Y ′ ∆Y | < ∞. However, since G normalizes V , the set Y ′ must be stabilized by G, contradicting our choice of Y .  Acknowledgments. The author thanks Colin Reid for his helpful remarks and the anonymous referee for his or her detailed suggestions. The author was supported by ERC grant #278469. References 1. Pierre-Emmanuel Caprace and Nicolas Monod, Decomposing locally compact groups into simple pieces, Math. Proc. Cambridge Philos. Soc. 150 (2011), no. 1, 97–128. MR 2739075 (2012d:22005) 2. Yves Cornulier, Group actions with commensurated subsets, wallings and cubings, arXiv:1302.5982 [math.GR]. 3. R. I. Grigorchuk, Just infinite branch groups, New horizons in pro-p groups, Progr. Math., vol. 184, Birkhäuser Boston, Boston, MA, 2000, pp. 121–179. MR 1765119 (2002f:20044) 4. G. A. Margulis, Discrete subgroups of semisimple Lie groups, Ergebnisse der Mathematik und ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)], vol. 17, Springer-Verlag, Berlin, 1991. MR 1090825 (92h:22021) 5. Colin D. Reid and Phillip R. Wesolek, Chief factors in Polish groups, arXiv:1509.00719 [math.GR]. , Homomorphisms into totally disconnected, locally compact groups with dense 6. image, arXiv:1509.00156 [math.GR]. 7. Yehuda Shalom and George A. Willis, Commensurated subgroups of arithmetic groups, totally disconnected groups and adelic rigidity, Geom. Funct. Anal. 23 (2013), no. 5, 1631–1683. MR 3102914 8. Kroum Tzanev, Hecke C ∗ -algebras and amenability, J. Operator Theory 50 (2003), 169–178. Université catholique de Louvain, Institut de Recherche en Mathématiques et Physique (IRMP), Chemin du Cyclotron 2, box L7.01.02, 1348 Louvain-laNeuve, Belgium E-mail address: [email protected]
4math.GR
1 A Multi- or Many-Objective Evolutionary Algorithm with Global Loop Update arXiv:1803.06282v1 [cs.NE] 25 Jan 2018 Yingyu Zhang Bing Zeng Abstract—Multior many-objective evolutionary algorithms(MOEAs), especially the decomposition-based MOEAs have been widely concerned in recent years. The decomposition-based MOEAs emphasize convergence and diversity in a simple model and have made a great success in dealing with theoretical and practical multi- or many-objective optimization problems. In this paper, we focus on update strategies of the decomposition-based MOEAs, and their criteria for comparing solutions. Three disadvantages of the decomposition-based MOEAs with local update strategies and several existing criteria for comparing solutions are analyzed and discussed. And a global loop update strategy and two hybrid criteria are suggested. Subsequently, an evolutionary algorithm with the global loop update is implemented and compared to several of the best multi- or many-objective optimization algorithms on two famous unconstraint test suites with up to 15 objectives. Experimental results demonstrate that unlike evolutionary algorithms with local update strategies, the population of our algorithm does not degenerate at any generation of its evolution, which guarantees the diversity of the resulting population. In addition, our algorithm wins in most instances of the two test suites, indicating that it is very competitive in terms of convergence and diversity. Running results of our algorithm with different criteria for comparing solutions are also compared. Their differences are very significant, indicating that the performance of our algorithm is affected by the criterion it adopts. Index Terms—evolutionary algorithms, many-objective optimization, global update strategy, Pareto optimality, decomposition. I. I NTRODUCTION lot of real-world problems such as electric power system reconfiguration problems [1], water distribution system design or rehabilitation problems [2], automotive engine calibration problems [3], land use management problems [4], optimal design problems [5]–[7], and problems of balancing between performance and cost in energy systems [8], etc., can be formulated into multi- or many-objective optimization problems(MOPs) involving more than one objective function. MOPs have attracted extensive attention in recent years and different kinds of algorithms for solving them have been A This work was supported by the National Natural Science Foundation of China under Grant 61773192. Y. Zhang is with the School of Computer Science, Liaocheng University, Liaocheng 252000, China (e-mail:[email protected]). B. Zeng is with the School of Software Engineering, South China University of Technology, Guangzhou 510006, China. Y. Li is with the School of Computer Science, Liaocheng University, Liaocheng 252000, China. J. Li is with the School of information science and engineering, Shandong Normal University, Jinan 250014, China, and also with the School of Computer Science, Liaocheng University, Liaocheng 252000, China. Yuanzhen Li Junqing Li proposed. Although algorithms based on particle swarm optimization [9] and simulated annealing [10] developed to solve MOPs are not ignorable, multi- or many-objective evolutionary algorithms(MOEAs) are more popular and representative in solving MOPs, such as the non-dominated sorting genetic algorithm-II (NSGA-II) [11], the strength pareto evolutionary algorithm 2(SPEA-2) [12], and the multi-objective evolutionary algorithm based on decomposition(MOEA/D) [13],etc. In General, MOEAs can be divided into three categories [14]. The first category is known as the indicator-based MOEAs. In an indication-based MOEA, the fitness of an individual is usually evaluated by a performance indicator such as hypervolume [15]. Such a performance indicator is designed to measure the convergence and diversity of the MOEA, and hence expected to drive the population of the MOEA to converge to the Pareto Front(PF) quickly with good distribution. The second category is the domination-based MOEAs, in which the domination principle plays a key role. However, in the domination-based MOEAs, other measures have to be adopted to maintain the population diversity. In NSGA-II, crowding distances of all the individuals are calculated at each generation and used to keep the population diversity , while reference points are used in NSGA-III [16]. The third category is the decompositionbased MOEAs. In a decomposition based MOEA, a MOP is decomposed into a set of subproblems and then optimized simultaneously. A uniformly generated set of weight vectors associated with a fitness assignment method such as the weighted sum approach, the Tchebycheff approach and the penalty-based boundary intersection(PBI) approach, is usually used to decompose a given MOP. Generally, a weight vector determines a subproblem and defines a neighborhood. Subproblems in a neighborhood are expected to own similar solutions and might be updated by a newly generated solution. The decomposition-based MOEA framework emphasizes the convergence and diversity of the population in a simple model. Therefore, it was studied extensively and improved from different points of view [17]–[23] since it was first proposed by Zhang and Li in 2007 [13]. Recently, some efforts have been made to blend different ideas appeared in the domination-based MOEAs and the decomposition-based MOEAs. For examples, an evolutionary many-objective optimization algorithm based on dominance and decomposition(MOEA/DD) is proposed in [21], and a reference vector guided evolutionary algorithm is proposed in [20]. In MOEA/DD, each individual is associated with a subregion uniquely determined by a weight vector, and each weight vector (or subregion) is assigned to a neighborhood. In an iterative step, mating parents is chosen from 2 the neighboring subregions of the current weight vector with a given probability δ, or the whole population with a low probability 1 − δ. In case that no associated individual exists in the selected subregions, mating parents are randomly chosen from the whole population. And then serval classical genetic operators such as the simulated binary crossover(SBX) [24] and the polynomial mutation [25],etc., are applied on the chosen parents to generate an offspring. Subsequently, the offspring is used to update the current population according to a complicated but well-designed rule based on decomposition and dominance. In this paper, we focus on update strategies of the decomposition-based evolutionary algorithms and the criteria for comparing solutions. Three disadvantages of the decomposition-based MOEAs with local update strategies and several existing criteria for comparing solutions are analyzed and discussed. And a global loop update (GLU) strategy and two hybrid criteria are suggested. Also, we propose an evolutionary algorithm with the GLU strategy for solving multior many-objective optimization problems(MOEA/GLU). The GLU strategy is designed to try to avoid the shortcomings of the decomposition-based MOEAs with local update strategies and eliminate bad solutions in the initial stage of the evolution, which is expected to force the population to converge faster to the PF. The rest of the paper is organized as follows. In section II, we provide some preliminaries used in MOEA/GLU and review serval existing criteria for comparing solutions, i.e., PBI criterion, dominance criterion and distance criterion. And then two hybrid criteria for judging the quality of two given solutions are suggested. The disadvantages of the decompositionbased MOEAs with local update strategies are also analyzed in this section. In section III, the algorithm MOEA/GLU is proposed. A general framework of it is first presented. Subsequently, the initialization procedure, the reproduction procedure, and the GLU procedure are elaborated. Some discussions about advantages and disadvantages of the algorithm are also made. In section IV, empirical results of MOEA/GLU on DTLZ1 to DTLZ4 and WFG1 to WFG9 are compared to those of several other MOEAs, i.e., NSGA-III, MOEA/D, MOEA/DD and GrEA. Running results of MOEA/GLU with different criteria are also compared in this section. The paper is concluded in section V. II. P RELIMINARIES AND M OTIVATIONS A. MOP Without loss of generality, a MOP can be formulated as a minimization problem as follows: M inimize F (x) = (f1 (x), f2 (x), ..., fM (x))T Subject to x ∈ Ω, (1) where M ≥ 2 is the number of objective functions, x is a decision vector, Ω is the feasible set of decision vectors, and F (x) is composed of M conflicting objective functions. F (x) is usually considered as a many-objective optimization problems when M is greater than or equal to 4. A solution x of Eq.(1) is said to dominate the other one y (x 4 y), if and only if fi (x) ≤ fi (y) for i ∈ (1, ..., M ) and fj (x) < fj (y) for at least one index j ∈ (1, ..., M ). It is clear that x and y are non-dominated with each other, when both x 4 y and y 4 x are not satisfied. A solution x is Paretooptimal to Eq.(1) if there is no solution y ∈ Ω such that y 4 x. F(x) is then called a Pareto-optimal objective vector. The set of all the Pareto optimal objective vectors is the PF [26]. The goal of a MOEA is to find a set of solutions, the corresponding objective vectors of which are approximate to the PF. B. Criteria for Comparing Solutions 1) Dominance criterion: Dominance is usually used to judge whether or not one solution is better than the other in the dominance-based MOEAs. As a criterion for comparing two given solutions, dominance can be described as follows. Dominance criterion:A solution x is considered to be better than the other one y when x 4 y. As it is discussed in [27], the selection pressure exerted by the dominance criterion is weak in a dominance-based MOEA, and becomes weaker as the number of the objective functions increases. It indicates that such a criterion is too stringent for MOEAs to choose the better one from two given solutions. Therefore, in practice, the dominance criterion is usually used together with other measures. 2) PBI criterion: In a decomposition-based MOEA, approaches used to decompose a MOP into subproblems can be considered as criteria for comparing two solutions, such as the weighted sum approach, the Tchebycheff approach and the PBI approach [13]. Here, we describe the PBI approach as a criterion for comparing two given solutions. PBI criterion:A solution x is considered to be better than the other one y when P BI(x) < P BI(y) , where P BI(•) is defined as P BI(x) = g P BI (x|w, z ∗ ), ω is a given weight vector, and z ∗ is the ideal point. The PBI function can be elaborated as [13]: M inimize g P BI (x|w, z ∗ ) = d1 + θd2 Subject to x ∈ Ω (2) where (F (x) − z ∗ )T w kwk   w , d2 = F (x) − z ∗ + d1 kwk d1 = (3) and θ is a used-defined constant penalty parameter. In a decomposition-based MOEA with the PBI criterion, the set of the weight vectors is usually generated at the initialization stage by the systematic sampling approach and remains unchanged in the running process of the algorithm. The ideal point is also set at the initialization stage, but can be updated by every newly generated offspring. 3) Distance criterion: In [28], a criterion with respect to the two Euclidean distances d1 and d2 defined by Eq.(3) are used to judge whether or not a solution is better than the other. Denote the two Euclidean distances of x and y as {d1x , d2x } and {d1y , d2y } ,respectively. A criterion for comparing two 3 given solutions with respect to the two distances can be written as follows. Distance criterion:A solution x is considered to be better than the other one y when d2x < d2y . In the case that d2x = d2y , x is considered to be better than y when d1x < d1y . 4) Two Hybrid Criteria: It has been shown that the dominance criterion can be a good criterion for choosing better solutions in conjunction with other measures [11], [16] . And likely, the PBI criterion has achieved great success in MOEAs [13], [21]. However, there are two facts with respect to these two criteria respectively can not be ignored. The first one is that using dominance comparison alone can not exert too much selection pressure on the current population, and hence, can not drive the population to converge to the PF of a given MOP quickly. The second one is that it is not necessarily P BI(x) < P BI(y) when x 4 y, and vice versa. Therefore, it might be natural to combine these two criteria in consideration of the two facts. Here, we suggest two hybrid criteria. H1 criterion: One solution x is considered to be better than the other one y when x 4 y. In the case that the two solutions do not dominate with each other, x is considered to be better than y when P BI(x) < P BI(y). H2 criterion: One solution x is considered to be better than the other one y when x 4 y. In the case that the two solutions do not dominate with each other, x is considered to be better than y when d2x < d2y . It is clear that the H1 criterion combines dominance with the PBI criterion, while the H2 criterion associates dominance with the Euclidean distance d2. C. The Systematic Sampling Approach The systematic sampling approach proposed by Das and Dennis [29] is usually used to generate weight vectors in MOEAs. In this approach, weight vectors are sampled from a unit simplex. Let ω = (ω1 , ..., ωM )T is a given weight vector, ωj (1 6 j 6 M ) is the jth component of ω, δj is the uniform spacing between two consecutive ωj values, and 1/δj is an integer. The possible values of ωj are sampled Pj−1 from {0, δj , ..., Kj δj }, where Kj = (1 − i=1 ωi )/δj . In a special case, all δj are equal to δ. To generate a weight vector, the systematic sampling approach starts with sampling from {0, δ, 2δ, ..., 1} to obtain the first component ω1 , and then from {0, δ, 2δ, ..., K2δ} to get the second component ω2 and so forth, until the M th component ωM is generated. Repeat such a process, until a total of   D+M −1 N (D, M ) = (4) M −1 different weight vectors are generated, where D > 0 is the number of divisions considered along each objective coordinate. The approach can be illustrated by Fig.1, in which each level represents one component of ω, and each path from the root to one of the leaves represents a possible weight vector. 0 0 1 0.5 1 0.5 0 0 1 0.5 0.5 0 0 0 0.5 Fig. 1. Generating weight vectors for δ = 0.5 and M = 3 using the systematic sampling approach. Therefore, all weight vectors included in the tree can be listed as follows. (0, 0, 1) (0, 0.5, 0.5) (0, 1, 0) (5) (0.5, 0, 0.5) (0.5, 0.5, 0) (1, 0, 0) A recursive algorithm for MOEAs to generate weight vectors using the systematic sampling approach can be found in section III. Here, we consider two cases of D taking a large value and a small value respectively. As discussed in [21] and [29], a large D would add more computational burden to a MOEA, and a small D would be harmful to the population diversity. To avoid this dilemma, [16] and [21] present a two-layer weight vector generation method. At first, a set of N1 weight vectors in the boundary layer and a set of N2 weight vectors in the inside layer are generated, according to the systematic sampling approach described above. Then, the coordinates of weight vectors in the inside layer are shrunk by a coordinate transformation as vij = 1−τ + τ × ωij , M (6) where ωij is the ith component of the jth weight vectors in the inside layer, and τ ∈ [0, 1] is a shrinkage factor set as τ = 0.5 in [16] and [21]. At last, the two sets of weight vectors are combined to form the final set of weight vectors. Denote the numbers of the weight vectors generated in the boundary layer and the inside layer as D1 and D2 respectively. Then, the number of the weight vectors generated by the two-layer weight vector generation method is N (D1, M ) + N (D2, M ). D. Local update and its advantages Most of the decomposition-based MOEAs update the population with an offspring generated by the reproduction operators to replace the individuals worse than the offspring in the current neighborhood. Such an update strategy can be named as a local update(LU) strategy since it involves only the individuals in the current neighborhood. The decomposition-based MOEAs with the LU strategy have at least two advantages. The first one is that the LU strategy can help the algorithms to converge to the PF faster than other algorithms with non-local update strategies, which helps them achieve great success on 4 a lot of MOPs in the past ten years. The second one is that the time complexities of the decomposition-based MOEAs are usually lower than those of MOEAS with non-local update strategies. This allows them to have a great advantage in solving complicated problems or MOPs with many objectives, since the running time taken by a MOEA to solve a given MOP becomes much longer as the number of the objective functions increases. In spite of the above advantages, the decomposition-based MOEAs with the LU strategy have their own disadvantages. The first disadvantage is that when the algorithms deal with some problems such as DTLZ4, the population may lose its diversity. As we can see from Fig.2, a running instance of MOEA/D on DTLZ4 with 3 objectives generates welldistributed results, while the solution set of the other one degenerates nearly to an arc on a unit circle. What’s worse, the solution set of some running instances of MOEA/D even degenerates to a few points on a unit circle in our experiments. to decide which one individual is to be replaced when there are multiple individuals worse than the newly generated offspring. One of the simplest replacement policies is to randomly choose one individual in the current neighborhood and judge whether or not the offspring is better than it. If the selected individual is worse, it will be replaced by the offspring. Or else, the offspring will be abandoned. Fig.3 shows the results of the original MOEA/D and its modified version with the modified LU strategy described above on DTLZ1 with 3 objectives. As it can been seen from Fig.3, the modified LU strategy lowers down the convergence speed of the algorithm, indicating that it is not a good update strategy. 0.6 0.5 0.4 0.3 0.2 1.2 0.1 1 0.8 0 0 0.2 0.6 0.4 0.6 0.6 0.4 0.2 0 0.4 (a) 0.2 0 0 0 0.5 0.5 0.6 1 1 1.5 1.5 0.5 (a) 0.4 0.3 0.2 1 0.1 0.5 0 0 0 0.2 0.4 0.60 0.2 0.4 0.6 -0.5 (b) -1 0 0 0.5 0.5 1 1 1.5 1.5 (b) Fig. 2. Two running instances of MOEA/D on DTLZ4. The first one obtained a well distributed set of solutions, and the second one obtained a degenerate set of solutions locating on an arc of a unit circle. Notice that a call of the LU procedure replaces all individuals worse than the newly generated offspring within the current neighborhood, which might be the reason resulting in the loss of the population diversity. Therefore, to avoid the loss of the population diversity, one can modify the LU procedure to replace at most one individual at a call. But the problem is how Fig. 3. Running results of the original MOEA/D and its modified version with a modified LU on the DTLZ1 problem with 3 objectives. The red dots are the resulting solutions of the original MOEA/D, and the blue ones are the resulting solutions of its modified version. Rotate (a) around the Z axis by about 90 degrees to get (b). The second disadvantage of the decomposition-based MOEAs with the LU strategy is that they don’t consider the individuals beyond the current neighborhood. As we can see, such a LU strategy allows the MOEAS to update the population with less time, but it might ignore some important information leading to better convergence. Fig.4 illustrates this viewpoint. Although the newly generated individual is better than individual A, it will be abandoned by the decompositionbased MOEAs with the LU strategy, since it is only compared to the individuals in the current neighborhood. 5 A current neighborhood Fig. 4. Illustration of the second disadvantage of the decomposition-based MOEAs with the LU strategy. The black dots represents the individuals in the current population, the red dot is a newly generated individual. Asafuddoula et al have noticed this disadvantage of the decomposition-based MOEAs with the LU strategy [28]. The update strategy of their algorithm involves all of the individuals in the current population, which has been demonstrated to be effective on the DTLZ and WFG test suites to some extent. We call such an update strategy a global update(GU) strategy, since each call of the update procedure considers all the individuals in the population, and replaces at most one individual. In Fig.4, individual A will be replaced by the newly generated individual if a decomposition-based MOEA adopts the GU strategy instead of the LU strategy. The third disadvantage of the decomposition-based MOEAs with the LU strategy relates to the individuals and their attached weight vectors. As a simple example, consider the case where an individual x and a newly generated offspring c are attached to a weight vector ωx , and an individual y is attached to ωy , so that g P BI (c|wx , z ∗ ) < g P BI (x|wx , z ∗ ) and g P BI (x|wy , z ∗ ) < g P BI (y|wy , z ∗ ) are satisfied. In other words, c is better than x and x is better than y, when the weight vector ωx and the weight vector ωy are considered as the reference weight vector respectively. Therefore, x will be replaced by c in a typical decomposition-based MOEA. But so far, there is no decomposition-based MOEA considering x as a replacement for y. In order to deal with the three disadvantages of the decomposition-based MOEAs with the LU strategy, we propose a MOEA with the GLU strategy(i.e. MOEA/GLU) mentioned before, which is presented in Section III. III. P ROPOSED A LGORITHM -MOEA/GLU A. Algorithm Framework The general framework of MOEA/GLU is presented in Algorithm 1. As it is shown in the general framework, a while loop is executed after the initiation procedure, in which a f or loop is included. In the f or loop, the algorithm runs over N weight vectors ,generates an offspring for each weight vector in the reproduction procedure, and updates the population with the offspring in the GLU procedure. B. Initialization Procedure The initialization procedure includes four steps. In the first step, a set of uniformly distributed weight vectors are Algorithm 1 General Framework of MOEA/GLU Output: Final Population. 1: Initialization Procedure. 2: while The stop condition is not stisfied do 3: for i = 1 to N do 4: Reproduction Procedure. 5: The GLU procedure 6: end for 7: end while generated using the systematic approach proposed in [29]. A recursive algorithm for generating the weight vectors is presented in algorithm 2 and 3. Algorithm 2 The systematic sampling approach Input: D:the number of divisions, M:the number of objectives. Output: A set of uniform weight vectors. 1: ω = (0, ..., 0); 2: Gen ith Level(ω, 0, 0, D, M ); Algorithm 2 calls the recursive function Gen ith Level described in algorithm 3 with ω = (0, ..., 0), K = 0, and i = 0, to generate weight vectors. At the ith level of the recursive function, the ith component of a weight vector is generated. As discussed before, the value of each component of a weight vector ranges from 0 to 1 with the step size 1/D, and all components of a weight vector sum up to 1. In other words, all components of a weight vector share D divisions. Therefore, if K=D(K is the number of divisions that have been allocated), then the rest of the components are all set to zero. In addition, if ω[i] is the last component, i.e., i = M − 1, then all the remaining divisions are assigned to it. Both the two cases indicate the end of a recursive call, and a generated weight vector is output. Algorithm 3 Gen ith Level(ω, K, i, D, M ) 1: if k==D then 2: ω[i], ..., ω[M − 1] ← 0; 3: output(ω); 4: return; 5: end if 6: if i==M-1 then 7: ω[i] ← (D − K)/D; 8: output(ω); 9: return; 10: end if 11: for j=0 to D-K do 12: ω[i] ← j/D; 13: Gen ith Level(ω, K + j, i + 1, D, M ); 14: end for One of the main ideas of MOEA/GLU is that each individual is attached to a weight vector and a weight vector owns only one individual. Meanwhile, each weight vector determines a neighborhood. In the second step, the neighborhoods of all weight vectors are generated by calculating the 6 Euclidean distances of the weight vectors using Eq.(3). Subsequently, a population of N individuals is initialized randomly and attached to N weight vectors in order of generation in the third step. Finally, the ideal point is initialized in the fourth step, which can be updated by every offspring in the course of evolution. shortest perpendicular distance. Supposed that the minimum value of {di1 , di2 , ..., diN } is still dij at a certain generation, and the offspring c is better than P [i] . Then, P [i] will be replaced out by c, and considered as a candidate to take the place of the individual hold by the jth weight vector, i.e., P [j]. C. Reproduction Procedure E. Discussion The reproduction procedure can be described as follows. Firstly, a random number r between 0 and 1 is generated. If r is less than a given selection probability Ps , then choose two individuals from the neighborhood of the current weight, or else choose two individuals from the whole population. Secondly, the SBX operator is applied on the two individuals to generate two intermediate individuals. Notice that, if both of the two individuals are evaluated and used to update the population, then the number of individuals evaluated at each generation will be twice as many as that of the individuals in the whole population. However, the number of individuals evaluated at each generation in many popular MOEAs such as NSGA-III and MOEADD etc., is usually the same as the size of the population. Therefore, one of the two intermediate individuals is abandoned at random for the sake of fairness. Finally, the polynomial mutation operator is applied on the reserved intermediate individual to generate an offspring, which will be evaluated and used to update the current population in the following GLU procedure. This section gives a simple discussion about the similarities and differences of MOEA/GLU, MOEA/D, and MOEA/DD. 1) Similarities of MOEA/GLU, MOEA/D, and MOEA/DD. MOEA/GLU and MOEA/DD can be seen as two variants of MOEA/D to some extent, since all of the three algorithms employ decomposition technique to deal with MOPs. In addition, a set of weight vectors is used to guide the selection procedure, and the concept of neighborhood plays an important role in all of them. 2) Differences between MOEA/GLU and MOEA/D. Firstly, MOEA/D uses a LU strategy, and MOEA/GLU employs the so-called GLU strategy, which considers all of the individuals in the current population at each call of the update procedure. Secondly, to judge whether or not an individual is better than the other, MOEA/D compares the fitness values of them, while other criteria for comparing individuals can also be used in MOEA/GLU. Thirdly, once a individual is generated in MOEA/D, all the individuals in the current neighborhood that worse than it will be replaced. However, each individual is attached to one weight vector in MOEA/GLU, and a newly generated individual is only compared to the old one attached to the same weight vector. The replacement operation occurs only when the new individual is better than the old one. 3) Differences between MOEA/GLU and MOEA/DD. In the first place, one weight vector in MOEA/DD not only defines a subproblem, but also specifies a subregion that can be used to estimate the local density of a population. In principle, a subregion owns zero, one, or more individuals at any generation. In MOEA/GLU, each individual is attached only to one weight vector, and a weight vector can hold only one individual. In the second place, the dominance criterion can be taken into account in MOEA/GLU, the way that it is used is different from that of MOEA/DD. In MOEA/GLU, the dominance between the newly generated individual and the old one attached to the same weight vector can be used to judge which of the two is better, while the dominance criterion is considered among all individuals within a subregion in MOEA/DD. D. The GLU procedure Algorithm 4 The GLU procedure Input: a new offspring c, the current population P. 1: bFlag=true; 2: while bFlag do 3: F ind Attathed W eight(c) → i; 4: if c is better than P[i] then 5: Swap(c,P[i]); 6: else 7: bFlag=false; 8: end if 9: end while The GLU procedure is illustrated in Algorithm 4, which can described as follows. Each individual is attached to a weight vector, which has the shortest perpendicular distance to the weight vector. F ind Attathed W eight(c) is designed to find the attached weight of c, in which the perpendicular distance is calculated by Eq.(3). Denote the perpendicular distance of the ith individual P [i] to the jth weight vector as dij . A given weight vector maintains only one slot to keep the best individual attached to it generated so far from the beginning of the algorithm. The minimum value of {di1 , di2 , ..., diN } can be expected to be dii after the algorithm evolves enough generations. However, in the initialization stage, all the individuals are generated randomly, and attached to the weight vectors in order of generation. In other words, the ith weight vector may not be the one, to which its attached individual P [i] has the F. Time Complexity The function Find Attathed Weight in the GLU procedure runs over all weight vectors, calculates the perpendicular distances between the newly generated offspring and all weight vectors, and finds the weight vector, to which the offspring has the shortest perpendicular distance. Therefore, it takes O(M N ) times of floating-point calculations for the function 7 Find Attathed Weight to find the attached weight vector of the offspring, where M is the number of the objective functions and N is the size of the population. As it is indicated before, the while loop is designed to help the individuals in the initial stage of the algorithm to find their attached weight vectors quickly. The fact that the individuals at a certain generation do not attach to their corresponding weight vectors causes extra entries into the function Find Attathed Weight. However, once all of the individuals are attached to their corresponding weight vectors, the function Find Attathed Weight will be entered at most two times. Let the entries into the function Find Attathed Weight be (1+Ni ) times at each call of the GLU procedure, P and denote the number of the generations as G. Since i Ni ≤ N and the GLU procedure is called N G times in the whole process of MOEA/GLU, the time complexity of the algorithm is O(M N 2 G), which is the same as that of MOEA/DD, but worse than that of MOEA/D. IV. E XPERIMENTAL R ESULTS A. Performance Metrics 1) Inverted Generational Distance(IGD): Let S be a result solution set of a MOEA on a given MOP. Let R be a uniformly distributed representative points of the PF. The IGD value of S relative to R can be calculated as [30] P d(r, S) (7) IGD(S, R) = r∈R |R| where d(r,S) is the minimum Euclidean distance between r and the points in S, and |R| is the cardinality of R. Note that, the points in R should be well distributed and |R| should be large enough to ensure that the points in R could represent the PF very well. This guarantees that the IGD value of S is able to measure the convergence and diversity of the solution set. The lower the IGD value of S, the better its quality [21]. 2) HyperVolume(HV): The HV value of a given solution set S is defined as [31] ! [ HV (S) = vol [f1 (x), z1 ] × . . . × [fM (x), zM ] , (8) x∈S where vol(·) is the Lebesgue measure,and z r = (z1 , . . . , zM )T is a given reference point. As it can be seen that the HV value of S is a measure of the size of the objective space dominated by the solutions in S and bounded by z r . As with [21], an algorithm based on Monte Carlo sampling proposed in [32] is applied to compute the approximate HV values for 15-objective test instances, and the WFG algorithm [33] is adopted to compute the exact HV values for other test instances for the convenience of comparison. In addition, QM all the HV values are normalized to [0, 1] by dividing i=1 zi . B. Benchmark Problems 1) DTLZ test suite: Problems DTLZ1 to DTLZ4 from the DTLZ test suite proposed by Deb et al [34] are chosen for our experimental studies in the first place. One can refer to [34] to find their definitions. Here, we only summarize some of their features. DTLZ1:The global PF of DTLZ1 is the linear hyper-plane PM k i=1 fi = 0.5. And the search space contains (11 − 1) local PFs that can hinder a MOEA to converge to the hyper-plane. PM 2 • DTLZ2:The global PF of DTLZ2 satisfys i fi = 1. Previous studies have shown that this problem is easier to be solved by existing MOEAs, such as NSGA-III, MOEADD, etc., than DTLZ1, DTLZ3 and DTLZ4. • DTLZ3:The definition of the glocal PF of DTLZ3 is the same as that of DTLZ2. It introduces (3k − 1) local PFs. All local PFs are parallel to the global PF and a MOEA can get stuck at any of these local PFs before converging to the global PF. It can be used to investigate a MOEA’s ability to converge to the global PF. • DTLZ4:The definition of the global PF of DTLZ4 is also the same as that of DTLZ2 and DTLZ3. This problem can be obtained by modifying DTLZ2 with a different meta-variable mapping, which is expected to introduce a biased density of solutions in the search space. Therefore, it can be used to investigate a MOEA’s ability to maintain a good distribution of solutions. To calculate the IGD value of a result set S of a MOEA running on a MOP, a set R of representative points of the PF needs to be given in advance. For DTLZ1 to DTLZ4, we take the set of the intersecting points of weight vectors and the PF ∗ surface as R. Let f ∗ = (f1∗ , ..., fM ) be the intersecting point of a weight vector w = (w1 , ..., wM )T and the PF surface. Then fi∗ can be computed as [21] wi (9) fi∗ = 0.5 × PM j=1 wj • for DTLZ1, and wi fi∗ = qP M j=1 (10) wj for DTLZ2, DTLZ3 and DTLZ4. 2) WFG test suite [35], [36]: This test suite allows test problem designers to construct scalable test problems with any number of objectives, in which features such as modality and separability can be customized as required. As discussed in [35], [36], it exceeds the functionality of the DTLZ test suite. In particular, one can construct non-separable problems, deceptive problems, truly degenerative problems, mixed shape PF problems, problems scalable in the number of positionrelated parameters, and problems with dependencies between position- and distance-related parameters as well with the WFG test suite. In [36], several scalable problems, i.e., WFG1 to WFG9, are suggested for MOEA designers to test their algoritms, which can be described as follows. M inimize F (X) = (f1 (X), ..., fM (X)) fi (X) = xM + 2ihi (x1 , ..., xM−1 ) (11) T X = (x1 , ..., xM ) where hi is a problem-dependent shape function determining the geometry of the fitness space, and X is derived from a vector of working parameters Z = (z1 , ..., zn )T , zi ∈ [0, 2i] , by employing four problem-dependent transformation 8 functions t1 , t2 , t3 and t4 . Transformation functions must be designed carefully such that the underlying PF remains intact with a relatively easy to determine Pareto optimal set. The WFG Toolkit provides a series of predefined shape and transformation functions to help ensure this is the case. One can refer to [35], [36] to see their definitions. Let ′′ T Z ′′ = (z1′′ , ..., zm ) = t4 (t3 (t2 (t1 (Z ′ )))) Z ′ = (z1 /2, ..., zn /2n)T . TABLE I N UMBER OF P OPULATION S IZE M 3 5 8 10 15 D1 12 6 3 3 2 D2 2 2 1 Population Size 91 210 156 275 135 (12) Then xi = zi′′ (zi′′ − 0.5) + 0.5 for problem WFG3, whereas X = Z ′′ for problems WFG1, WFG2 and WFG4 to WFG9. The features of WFG1 to WFG9 can be summarized as follows. • WFG1:A separable and uni-modal problem with a biased PF and a convex and mixed geometry. • WFG2:A non-separable problem with a convex and disconnected geometry, i.e., the PF of WFG2 is composed of several disconnected convex segments. And all of its objectives but fM are uni-modal. • WFG3:A non-separable and uni-modal problem with a linear and degenerate PF shape, which can be seen as a connected version of WFG2. • WFG4:A separable and multi-modal problem with large ”hill sizes”, and a concave geometry. • WFG5:A separable and deceptive problem with a concave geometry. • WFG6:A nonseparable and uni-modal problem with a concave geometry. • WFG7:A separable and uni-modal problem with parameter dependency, and a concave geometry. • WFG8:A nonseparable and uni-modal problem with parameter dependency, and a concave geometry. • WFG9:A nonseparable, deceptive and uni-modal problem with parameter dependency, and a concave geometry. As it can be seen from above, WFG1 and WFG7 are both separable and uni-modal, and WFG8 and WFG9 have nonseparable property, but the parameter dependency of WFG8 is much harder than that caused of WFG9. In addition, the deceptiveness of WFG5 is more difficult than that of WFG9, since WFG9 is only deceptive on its position parameters. However, when it comes to the nonseparable reduction, WFG6 and WFG9 are more difficult than WFG2 and WFG3. Meanwhile,problems WFG4 to WFG9 share the same EF shape in the objective space, which is a part of a hyper-ellipse with radii ri = 2i, where i ∈ {1, ..., M }. C. Parameter Settings The parameter settings of MOEA/GLU are listed as follows. 1) Settings for Crossover Operator:The crossover probability is set as pc = 1.0 and the distribution index is ηc = 30. 2) Settings for Mutation Operator:The mutation probability is set as pm = 0.6/n, and is different from that of MOEA/DD, which is 1/n. The distribution index is set as ηm = 20. 3) Population Size:The population size of MOEA/GLU is the same as the number of the weight vectors that TABLE II N UMBER OF G ENERATIONS problem DTLZ1 DTLZ2 DTLZ3 DTLZ4 4) 5) 6) 7) 8) 9) 10) M =3 400 250 1000 600 M =5 600 350 1000 1000 M =8 750 500 1000 1250 M = 10 1000 750 1500 2000 M = 15 1500 1000 2000 3000 can be calculated by Eq.(4). Since the divisions for 3and 5-objective instances are set to 12 and 6, and the population sizes of them are 91 and 210, respectively. As for 8-, 10- and 15-objective instances, two-layer weight vector generation method is applied. The divisions and the population sizes of them are listed in Table I. Number of Runs:The algorithm is independently run 20 times on each test instance, which is the same as that of other algorithms for comparison. Number of Generations: All of the algorithms stopped at a predefined number of generations. The number of generations for DTLZ1 to DTLZ4 is listed in Table II, and the number of generations for all the instances of WFG1 to WFG9 is 3000. Penalty Parameter in PBI: θ = 5.0. Neighborhood Size: T = 20. Selection Probability: The probability of selecting two mating individuals from the current neighborhood is set as ps = 0.9. Settings for DTLZ1 to DTLZ4:As in papers [21], [28], the number of the objectives are set as M ∈ {3, 5, 8, 10, 15} for comparative purpose. And the number of the decision variables is set as n = M + r − 1, where r = 5 for DTLZ1, and r = 10 for DTLZ2, DTLZ3 and DTLZ4. To calculate the HV value we set the reference point to (1, ..., 1)T for DTLZ1, and (2, ..., 2)T DTLZ2 to DTLZ4. Settings for WFG1 to WFG9: The number of the decision variables is set as n = k + l, where k = 2 × (M − 1) is the position-related variable and l = 20 is the distance-related variable. To calculate the HV values for problems WFG1 to WFG9, the reference point is set to (3, ..., 2M + 1)T . D. Performance Comparisons on DTLZ1 to DTLZ4 We calculate the IGD values and HV values of the same solution sets found by MOEA/GLU, and compare the calculation results with those of MOEA/DD, NSGA-III, MOEA/D and GrEA obtained in [21]. 9 3 DTLZ1 5 8 10 15 3 DTLZ2 5 8 10 15 MOEA/GLU 1.073E-4 3.608E-4 1.669E-3 1.732E-4 2.115E-4 2.395E-4 1.457E-3 2.069E-3 3.388E-3 1.429E-3 2.030E-3 3.333E-3 2.261E-3 3.652E-3 6.111E-3 4.418E-4 5.738E-4 7.510E-4 9.513E-4 1.075E-3 1.231E-3 2.553E-3 3.038E-3 3.375E-3 2.917E-3 3.701E-3 4.104E-3 4.394E-3 6.050E-3 7.623E-3 MOEA/DD 3.191E-4 5.848E-4 6.573E-4 2.635E-4 2.916E-4 3.109E-4 1.809E-3 2.589E-3 2.996E-3 1.828E-3 2.225E-3 2.467E-3 2.867E-3 4.203E-3 4.669E-3 6.666E-4 8.073E-4 1.243E-3 1.128E-3 1.291E-3 1.424E-3 2.880E-3 3.291E-3 4.106E-3 3.223E-3 3.752E-3 4.145E-3 4.557E-3 5.863E-3 6.929E-3 NSGA-III 4.880E-4 1.308E-3 4.880E-3 5.116E-4 9.799E-4 1.979E-3 2.044E-3 3.979E-3 8.721E-3 2.215E-3 3.462E-3 6.896E-3 2.649E-3 5.063E-3 1.123E-2 1.262E-3 1.357E-3 2.114E-3 4.254E-3 4.982E-3 5.862E-3 1.371E-2 1.571E-2 1.811E-2 1.350E-2 1.528E-2 1.697E-2 1.360E-2 1.726E-2 2.114E-2 MOEA/D 4.095E-4 1.495E-3 4.743E-3 3.179E-4 6.372E-4 1.635E-3 3.914E-3 6.106E-3 8.537E-3 3.872E-3 5.073E-3 6.130E-3 1.236E-2 1.431E-2 1.692E-2 5.432E-4 6.406E-4 8.006E-4 1.219E-3 1.437E-3 1.727E-3 3.097E-3 3.763E-3 5.198E-3 2.474E-3 2.778E-3 3.235E-3 5.254E-3 6.005E-3 9.409E-3 GrEA 2.759E-2 3.339E-2 1.351E-1 7.369E-2 3.363E-1 4.937E-1 1.023E-1 1.195E-1 3.849E-1 1.176E-1 1.586E-1 5.110E-1 8.061E-1 2.057E+0 6.307E+1 6.884E-2 7.179E-2 7.444E-2 1.411E-1 1.474E-1 1.558E-1 3.453E-1 3.731E-1 4.126E-1 4.107E-1 4.514E-1 5.161E-1 5.087E-1 5.289E-1 5.381E-1 DTLZ4 m DTLZ3 TABLE III B EST, M EDIAN AND W ORST IGD VALUES BY MOEA/GLU, MOEA/DD, NSGA-III, MOEA/D AND G R EA ON DTLZ1, DTLZ2, DTLZ3 AND DTLZ4 INSTANCES WITH D IFFERENT N UMBER OF O BJECTIVES . T HE VALUES IN RED ARE THE BEST, AND THE VALUES IN GRAY ARE THE SECOND BEST. MOEA/IUP 1.598E-4 1.257E-3 8.138E-3 2.965E-4 8.390E-4 2.543E-3 1.987E-3 4.478E-3 1.759E-2 2.173E-3 2.663E-3 4.795E-3 5.299E-3 8.732E-3 1.912E-2 9.111E-5 1.105E-4 1.385E-4 7.218E-5 9.255E-5 1.115E-4 3.540E-4 4.532E-4 5.823E-4 8.397E-4 1.156E-3 1.482E-3 9.325E-4 1.517E-3 2.427E-3 MOEA/DD 5.690E-4 1.892E-3 6.231E-3 6.181E-4 1.181E-3 4.736E-3 3.411E-3 8.079E-3 1.826E-2 1.689E-3 2.164E-3 3.226E-3 5.716E-3 7.461E-3 1.138E-2 1.025E-4 1.429E-4 1.881E-4 1.097E-4 1.296E-4 1.532E-4 5.271E-4 6.699E-4 9.107E-4 1.291E-3 1.615E-3 1.931E-3 1.474E-3 1.881E-3 3.159E-3 NSGA-III 9.751E-4 4.007E-3 6.665E-3 3.086E-3 5.960E-3 1.196E-2 1.244E-2 2.375E-2 9.649E-2 8.849E-3 1.188E-2 2.082E-2 1.401E-2 2.145e-2 4.195E-2 2.915E-4 5.970E-4 4.286E-1 9.849E-4 1.255E-3 1.721E-3 5.079E-3 7.054E-3 6.051E-1 5.694E-3 6.337E-3 1.076E-1 7.110E-3 3.431E-1 1.073E+0 MOEA/D 9.773E-4 3.426E-3 9.113E-3 1.129E-3 2.213E-3 6.147E-3 6.459E-3 1.948E-2 1.123E+0 2.791E-3 4.319E-3 1.010E+0 4.360E-3 1.664E-2 1.260E+0 2.929E-1 4.280E-1 5.234E-1 1.080E-1 5.787E-1 7.348E-1 5.298E-1 8.816E-1 9.723E-1 3.966E-1 9.203E-1 1.077E+0 5.890E-1 1.133E+0 1.249E+0 GrEA 6.770E-2 7.693E-2 4.474E-1 5.331E-1 8.295E-1 1.124E+0 7.518E-1 1.024E+0 1.230E+0 8.656E-1 1.145E+0 1.265E+0 9.391E+1 1.983E+2 3.236E+2 6.869E-2 7.234E-2 9.400E-1 1.422E-1 1.462E-1 1.609E-1 3.229E-1 3.314E-1 3.402E-1 4.191E-1 4.294E-1 4.410E-1 4.975E-1 5.032E-1 5.136E-1 3 DTLZ1 5 8 10 15 3 DTLZ2 5 8 10 15 MOEA/GLU 0.973657 0.973576 0.973279 0.998981 0.998976 0.998970 0.999948 0.999925 0.999888 0.999991 0.999981 0.999971 0.999986 0.999923 0.999826 0.926698 0.926682 0.926652 0.990545 0.990533 0.990513 0.999341 0.999326 0.999296 0.999921 0.999920 0.999919 0.999998 0.999997 0.999993 MOEA/DD 0.973597 0.973510 0.973278 0.998980 0.998975 0.998968 0.999949 0.999919 0.999887 0.999994 0.999990 0.999974 0.999882 0.999797 0.999653 0.926674 0.926653 0.926596 0.990535 0.990527 0.990512 0.999346 0.999337 0.999329 0.999952 0.999932 0.999921 0.999976 0.999954 0.999915 NSGA-III 0.973519 0.973217 0.971931 0.998971 0.998963 0.998673 0.999975 0.993549 0.966432 0.999991 0.999985 0.999969 0.999731 0.999686 0.999574 0.926626 0.926536 0.926359 0.990459 0.990400 0.990328 0.999320 0.978936 0.919680 0.999918 0.999916 0.999915 0.999975 0.999939 0.999887 MOEA/D 0.973541 0.973380 0.972484 0.998978 0.998969 0.998954 0.999943 0.999866 0.999549 0.999983 0.999979 0.999956 0.999695 0.999542 0.999333 0.926666 0.926639 0.926613 0.990529 0.990518 0.990511 0.999341 0.999329 0.999307 0.999922 0.999921 0.999919 0.999967 0.999951 0.999913 GrEA 0.967404 0.964059 0.828008 0.991451 0.844529 0.500179 0.999144 0.997992 0.902697 0.999451 0.998587 0.532348 0.172492 0.000000 0.000000 0.924246 0.923994 0.923675 0.990359 0.990214 0.990064 0.999991 0.999670 0.989264 0.997636 0.996428 0.994729 0.999524 0.999496 0.998431 DTLZ4 m DTLZ3 TABLE IV B EST, M EDIAN AND W ORST HV VALUES BY MOEA/GLU, MOEA/DD, NSGA-III, MOEA/D AND G R EA ON DTLZ1, DTLZ2, DTLZ3 AND DTLZ4 INSTANCES WITH D IFFERENT N UMBER OF O BJECTIVES . T HE VALUES IN RED ARE THE BEST, AND THE VALUES IN GRAY ARE THE SECOND BEST. MOEA/GLU 0.926717 0.926457 0.924931 0.990565 0.990532 0.990451 0.999345 0.999322 0.999252 0.999922 0.999921 0.999919 0.999996 0.999994 0.999990 0.926731 0.926729 0.926725 0.990570 0.990570 0.990569 0.999364 0.999363 0.999362 0.999919 0.999914 0.999910 0.999990 0.999979 0.999959 MOEA/DD 0.926617 0.926346 0.924901 0.990558 0.990515 0.990349 0.999343 0.999311 0.999248 0.999923 0.999922 0.999921 0.999982 0.999951 0.999915 0.926731 0.926729 0.926725 0.990575 0.990573 0.990570 0.999364 0.999363 0.998360 0.999921 0.999920 0.999917 0.999915 0.999762 0.999680 NSGA-III 0.926480 0.925805 0.924234 0.990453 0.990344 0.989510 0.999300 0.924059 0.904182 0.999921 0.999918 0.999910 0.999910 0.999793 0.999780 0.926659 0.926705 0.799572 0.991102 0.990413 0.990156 0.999363 0.999361 0.994784 0.999915 0.999910 0.999827 0.999910 0.999581 0.617313 MOEA/D 0.926598 0.925855 0.923858 0.990543 0.990444 0.990258 0.999328 0.999303 0.508355 0.999922 0.999920 0.999915 0.999918 0.999792 0.999628 0.926729 0.926725 0.500000 0.990569 0.990568 0.973811 0.999363 0.998497 0.995753 0.999918 0.999907 0.999472 0.999813 0.546405 0.502115 GrEA 0.924652 0.922650 0.621155 0.963021 0.808084 0.499908 0.953478 0.791184 0.498580 0.962168 0.735934 0.499676 0.000000 0.000000 0.000000 0.924613 0.924094 0.500000 0.990514 0.990409 0.990221 0.999102 0.999039 0.998955 0.999653 0.999608 0.999547 0.999561 0.999539 0.999521 10 1) DTLZ1:From the calculation results listed in Table III and Table IV, it can be seen that MOEA/GLU and MOEA/DD perform better than the other three algorithms on all of the IGD values and most of the HV values. Specifically, MOEA/GLU wins in the best and median IGD values of the 3-, 8-, 10- and 15-objective instances, and MOEA/DD wins in the worst IGD values of the 3-, 8-, 10- and 15-objective instances. As for the 5-objective instance, MOEA/GLU wins in all of the IGD values. When it comes to the HV values, MOEA/GLU performs the best on the 3-, 5- and 15-objective instances, and MOEA/DD shows the best performance on the 10-objective instance as listed in Table IV. In addition, MOEA/GLU wins in the median and worst HV values of the 8-objective instance, and NSGA-III wins in the best HV value of it. Although all of the values obtained by MOEA/GLU and MOEA/DD are close, MOEA/GLU wins in most of the IGD and HV values. Therefore, MOEA/GLU can be considered as the best optimizer for DTLZ1. 2) DTLZ2:As it can be seen from Table III, MOEA/D, MOEA/GLU and MOEA/DD are significantly better than the other two on all of the IGD values of DTLZ2. As for the IGD values, MOEA/GLU performs the best on the 3-, 5- and 8-objective instances, and MOEA/D performs the best on the 10-objective instance. In addition, MOEA/GLU wins in the best value of the 15objective instance, and MOEA/DD wins in the median and worst values of it. When it comes to the HV values, MOEA/GLU performs the best on the 3-, 5- and 15objective instances, MOEA/DD performs the best on the 10-objective instance and wins in the worst value of the 8-objective instance, and GrEA wins in the best and median values of the 8-objective instance. On the whole, the differences of MOEA/GLU, MOEA/DD and MOEA/D are not significant on DTLZ2, but MOEA/GLU wins in more values than both MOEA/D and MOEA/DD. Therefore, MOEA/GLU can also be considered as the best optimizer for DTLZ2. 3) DTLZ3:Again, MOEA/GLU and MOEA/DD are the best two optimizer for DTLZ3, and their performances are also close. As for the IGDvalues, MOEA/GLU performs the best on the 5- and 8-objective instances, MOEA/DD performs the best on the 10-objective instance, MOEA/GLU wins in the best and median values of the 3-objective instance and the best value of the 15objective instance, MOEA/DD wins in the median and worst values of the 15-objective instance, and the worst value of the 3-objective. As far as the HV values are concerned, MOEA/GLU performs the best on the 3-, 5-, 8- and 15-objective instances, and MOEA/DD performs the best on the 10-objective instance. Since MOEA/GLU wins in more values than the other four algorithms, it can be considered as the best optimizer for DTLZ3. 4) DTLZ4:It is clear that MOEA/GLU performs the best on all of the IGD values of DTLZ4. However, it is hard to distinguish the better one from MOEA/GLU and MOEA/DD when it comes to the HV values. Interest- ingly, the performance of MOEA/GLU and MOEA/DD are so close that all of the HV values of the 3-objective instance, the best and median HV values of the 8objective instance obtained by them are equal in terms of 6 significant digits. But taking the performance on the IGD values into consideration, MOEA/GLU is the best optimizer for DTLZ4. E. Performance Comparisons on WFG1 to WFG9 The HV values of MOEA/GLU, MOEA/DD, MOEA/D and GrEA on WFG1 to WFG5 are listed in Table V, and the HV values on WFG6 to WFG9 are listed in Table VI. The comparison results can be concluded as follows. 1) WFG1:MOEA/DD wins in all the values of WFG1 except the worst value of the 3-objective instance, and hence be regarded as the best optimizer for WFG1. 2) WFG2:MOEA/GLU shows the best performance on the 3-objective instance, while MOEA/DD performs the best on the 8-objective instance. In addition, MOEA/GLU wins in the best and median values of 5- and 10objective instances, while MOEA/DD wins in the worst values of them. Obviously, MOEA/GLU and MOEA/DD are the best two optimizer for WFG2, but it is hard to tell which one is better, since the differences between them are not significant. 3) WFG3:MOEA/GLU performs the best on the 10objective instance, MOEA/DD shows the best performance on the 3-objective instance, and GrEA wins in the 5- and 8-objective instances. The values obtained by the three algorithms are very close. They all have their own advantages. 4) WFG4:MOEA/GLU shows the best in all values of WFG4, and is considered as the winner. 5) WFG5:Like in WFG4, MOEA/GLU is the winner of WFG5, since it wins in all values except the median and worst values of the 3-objective instance. 6) WFG6:MOEA/GLU and GrEA are the best two optimizer of WFG. The values obtained by them are not significant with ups and downs on both sides. Specifically, MOEA/GLU wins in the 3-objective instance, the best values of the 5- and 8-objective instances, the median and worst values of the 10-objective instance. GrEA wins in all the other values. 7) WFG7:MOEA/GLU wins in all the values of WFG7, and is considered as the best optimizer. 8) WFG8:MOEA/GLU wins in most of the values of WFG8 except the best value of the 5-objective instance and the median value of the 8-objective instance. Therefore, it can also be regarded as the best optimizer for WFG8. 9) WFG9:The situation of WFG9 is a little bit complicated, but it is clear that MOEA/GLU, MOEA/DD and GrEA are all better than MOEA/D. To be specific, GrEA wins in the 8-objective instance, and it might be said that MOEA/DD performs the best on the 3- and 5-objective instance although the worst value of it on the 3-objective instance is slightly worse than that of MOEA/GLU. In 11 TABLE V B EST, M EDIAN AND W ORST HV VALUES BY MOEA/GLU, MOEA/DD, MOEA/D AND G R EA ON WFG1 TO WFG5 INSTANCES WITH D IFFERENT N UMBER OF O BJECTIVES . T HE VALUES IN RED ARE THE BEST, AND THE VALUES IN GRAY ARE THE SECOND BEST. TABLE VI B EST, M EDIAN AND W ORST HV VALUES BY MOEA/GLU, MOEA/DD, MOEA/D AND G R EA ON WFG6 TO WFG9 INSTANCES WITH D IFFERENT N UMBER OF O BJECTIVES . T HE VALUES IN RED ARE THE BEST, AND THE VALUES IN GRAY ARE THE SECOND BEST. m 8 10 WFG2 3 5 8 10 WFG3 3 5 8 10 WFG4 3 5 8 10 WFG5 3 5 8 10 GrEA 0.794748 0.692567 0.627963 0.876644 0.831814 0.790367 0.811760 0.681959 0.616006 0.866298 0.832016 0.757841 0.950084 0.942908 0.800186 0.980806 0.976837 0.808125 0.980012 0.840293 0.778291 0.964235 0.959740 0.956533 0.699502 0.672221 0.662046 0.695221 0.684583 0.671553 0.657744 0.649020 0.638147 0.543352 0.513261 0.501210 0.723403 0.722997 0.722629 0.881161 0.879484 0.877642 0.787287 0.784141 0.679178 0.896261 0.843257 0.840257 0.689784 0.689177 0.688885 0.836232 0.834726 0.832212 0.838183 0.641973 0.571933 0.791725 0.725198 0.685882 3 WFG6 MOEA/D 0.932609 0.929839 0.815356 0.918652 0.915737 0.912213 0.918252 0.911586 0.808931 0.922484 0.915715 0.813928 0.951685 0.803246 0.796567 0.982796 0.978832 0.807951 0.963691 0.800333 0.787271 0.962841 0.957434 0.773474 0.697968 0.692355 0.679281 0.669009 0.662925 0.654729 0.529698 0.457703 0.439274 0.382068 0.337978 0.262496 0.724682 0.723945 0.723219 0.870868 0.862132 0.844219 0.784340 0.737386 0.718648 0.747485 0.712680 0.649713 0.693135 0.687378 0.681305 0.829696 0.826739 0.812225 0.779091 0.753486 0.705938 0.730990 0.715161 0.673789 5 8 10 3 WFG7 5 MOEA/DD 0.937694 0.933402 0.899253 0.963464 0.960897 0.959840 0.922284 0.913024 0.877784 0.926815 0.919789 0.864689 0.958287 0.952467 0.803397 0.986572 0.985129 0.980035 0.981673 0.967265 0.789739 0.968201 0.965345 0.961400 0.703664 0.702964 0.701624 0.673031 0.668938 0.662951 0.598892 0.565609 0.556725 0.552713 0.532897 0.504943 0.727060 0.726927 0.726700 0.876181 0.875836 0.875517 0.920869 0.910146 0.902710 0.913018 0.907040 0.888885 0.693665 0.693544 0.691173 0.833159 0.832710 0.830367 0.852838 0.846736 0.830338 0.848321 0.841118 0.829547 5 8 10 3 WFG8 WFG1 3 MOEA/GLU 0.937116 0.928797 0.915136 0.906874 0.899351 0.862874 0.839662 0.831208 0.781919 0.887565 0.843225 0.794202 0.959834 0.958155 0.808454 0.995169 0.993049 0.813859 0.978775 0.795215 0.778920 0.981398 0.978021 0.779176 0.700589 0.695748 0.689587 0.679497 0.675726 0.662165 0.572932 0.554256 0.526689 0.572593 0.554042 0.531208 0.731535 0.731180 0.730558 0.883419 0.881701 0.880210 0.939271 0.933853 0.926261 0.967623 0.963674 0.951068 0.698469 0.692607 0.685518 0.844325 0.841781 0.838402 0.892830 0.889458 0.884971 0.919163 0.916148 0.911875 5 8 10 3 WFG9 m 5 8 10 MOEA/GLU 0.710228 0.701988 0.698358 0.858096 0.846655 0.840335 0.912150 0.901300 0.880581 0.938343 0.927854 0.914464 0.731908 0.731809 0.731691 0.888158 0.887856 0.887592 0.948854 0.947862 0.946082 0.976171 0.975644 0.974641 0.678825 0.677146 0.674987 0.806626 0.805050 0.803366 0.895652 0.845761 0.823666 0.961919 0.923244 0.881384 0.695369 0.642755 0.642240 0.809717 0.751592 0.749481 0.828505 0.809564 0.746497 0.843321 0.830062 0.803744 MOEA/DD 0.708910 0.699663 0.689125 0.850531 0.838329 0.828315 0.876310 0.863087 0.844535 0.884394 0.859986 0.832299 0.727069 0.727012 0.726907 0.876409 0.876297 0.874909 0.920763 0.917584 0.906219 0.927666 0.923441 0.917141 0.672022 0.670558 0.668593 0.818663 0.795215 0.792900 0.876929 0.845975 0.730348 0.896317 0.844036 0.715250 0.707269 0.687401 0.638194 0.834616 0.797185 0.764723 0.772671 0.759369 0.689923 0.717168 0.717081 0.696061 MOEA/D 0.702840 0.695081 0.684334 0.846015 0.813844 0.754054 0.692409 0.661156 0.567108 0.643198 0.582342 0.409210 0.725252 0.724517 0.723449 0.859727 0.843424 0.811292 0.729953 0.708701 0.605900 0.706473 0.625828 0.596189 0.671355 0.669927 0.664120 0.808204 0.793773 0.771763 0.537772 0.446544 0.347990 0.508652 0.350409 0.270931 0.688940 0.681725 0.636355 0.798069 0.789998 0.727728 0.633476 0.604016 0.548119 0.572925 0.546451 0.516309 GrEA 0.699876 0.693984 0.685599 0.855839 0.847137 0.840637 0.912095 0.902638 0.885712 0.943454 0.927443 0.884145 0.723229 0.722843 0.722524 0.884174 0.883079 0.881305 0.918742 0.910023 0.901292 0.937582 0.902343 0.901477 0.671845 0.669762 0.667948 0.797496 0.792692 0.790693 0.803050 0.799986 0.775434 0.841704 0.838256 0.830394 0.702489 0.638103 0.636575 0.823916 0.753683 0.747315 0.842953 0.831775 0.765730 0.860676 0.706632 0.686917 addition, the median and worst values of MOEA/GLU on the 10-objective instance are far better than those of other algorithms, while the best value is sightly worse than that of GrEA. On the whole, MOEA/GLU shows a very competitive performance on the WFG test suite, especially WFG4, WFG5, WFG7 and WFG8, of which MOEA/GLU wins almost all the HV values. 12 F. Performance Comparisons of Algorithms with Different Criteria for Comparison In this subsection, we compare the HV values of MOEA/GLU with different criteria for comparing solutions on WFG1 to WFG9 with different objectives. The HV values are listed in Table VII. The comparison results can be concluded as follows. For the sake of convenience, we denote MOEA/GLU with the PBI, H1, and H2 criteria as MOEA/GLU-PBI, MOEA/GLU-H1, and MOEA/GLU-H2, respectively. • • • • • • • • • WFG1:MOEA/GLU-H2 is the best optimizer since it performs the best on all instances of WFG1. WFG2:MOEA/GLU-H2 wins in all values of WFG2 except the best value of the 3-objective instance. Therefore, it is considered to be the best optimizer for WFG2. WFG3:The situation is a little bit complicated for WFG3. Specifically, MOEA/GLU-PBI wins on the worst value of the 5-objective instance and the best value of the 8-objective instance. And MOEA/GLU-H1 wins in the best and median values of the 3-objective instance, while MOEA/GLU-H2 is the best on other values. Therefore, MOEA/GLU-H2 can be considered the best optimizer for WFG3. WFG4: MOEA/GLU-H1 is the best optimizer that wins in all the values of WFG4. WFG5: MOEA/GLU-PBI has the best median value for the 3-objective instance of WFG5, and MOEA/GLUH2 wins in the worst value of the 3-objective instance, while MOEA/GLU-H1 performs the best on all the other values. Therefore, MOEA/GLU-H1 is considered the best optimizer for WFG5. WFG6: MOEA/GLU-PBI has the best median value for the 5-objective instance of WFG6, and MOEA/GLUH2 wins in the best value of the 8-objective instance and the worst value of the 10-objective instance, while MOEA/GLU-H1 performs the best on all other values. Therefore, MOEA/GLU-H1 is considered the best optimizer for WFG6. WFG7: Since MOEA/GLU-H1 wins in all the values of WFG7 except the worst value of its 3-objective instance, it is considered the best optimizer. WFG8: MOEA/GLU-PBI performs the worst on all the values of WFG8. MOEA/GLU-H1 wins in its 3objective instance, while MOEA/GLU-H2 wins in the 10-objective instance. As for 5- and 8-objective instance, MOEA/GLU-H1 wins in the median and worst value, and MOEA/GLU-H2 wins in the best value. It is clear that MOEA/GLU-PBI is the worst optimizer for WFG8. However, as for MOEA/GLU-H1 and MOEA/GLU-H2, it is still hard to say which one of the two is better for WFG8. WFG9: MOEA/GLU-PBI wins in the best value of the 5-objective instance, the worst value of the 8-objective instance , and the median value of 10-objective instance of WFG9. MOEA/GLU-H2 only wins in the worst value of the 10-objective instance, while MOEA/GLU-H1 wins in all the other values of WFG9. Therefore, MOEA/GLUH1 can be considered the best optimizer for WFG9. On the whole, MOEA/GLU-H1 is the best optimizer for WFG4 to WFG7, and MOEA/GLU-H2 is the best for WFG1 to WFG3, and WFG9. As for WFG8, Both MOEA/GLU-H1 and MOEA/GLU-H2 are better than MOEA/GLU-PBI, but it is hard to say which one of the two is better. These indicate that the running results of MOEA/GLU are affected by the criterion for comparing solutions it adopts. V. C ONCLUSION In this paper, we propose a MOEA with the so-called GLU strategy, i.e., MOEA/GLU. The main ideas of MOEA/GLU can be concluded as follows. Firstly, MOEA/GLU employs a set of weight vectors to decompose a given MOP into a set of subproblems and optimizes them simultaneously, which is similar to other decomposition-based MOEAs. Secondly, each individual is attached to a weight vector and a weight vector owns only one individual in MOEA/GLU, which is the same as that in MOEA/D, but different from that in MOEA/DD. Thirdly, MOEA/GLU adopts a global update strategy, i.e. the GLU strategy. Our experiments indicate that the GLU strategy can overcome the disadvantages of MOEAs with local update strategies discussed in section II, although it makes the time complexity of the algorithm higher than that of MOEA/D. These three main ideas make MOEA/GLU a different algorithm from other MOEAs, such as MOEA/D, MOEA/DD, and NSGA-III, etc. Additionally, the GLU strategy is simpler than the update strategies of MOEA/DD and NSGA-III. And the time complexity of MOEA/GLU is the same as that of MOEA/DD, but worse than that of MOEA/D. Our algorithm is compared to several other MOEAs, i.e., MOEA/D, MOEA/DD, NSGA-III, GrEA on 3, 5, 8, 10, 15objective instances of DTLZ1 to DTLZ4, and 3, 5, 8, 10objective instances of WFG1 to WFG9. The experimental results show that our algorithm wins in most of the instances. In addition, we suggest two hybrid criteria for comparing solutions, and compare them with the PBI criterion. The empirical results show that the two hybrid criteria is very competitive in 3, 5, 8, 10-objective instances of WFG1 to WFG9. Our future work can be carried out in the following three aspects. Firstly, it is interesting to study the performances of MOEA/GLU on other MOPs, such as the ZDT test problems, the CEC2009 test problems, combinatorial optimization problems appeared in [37], [38], and especially some real-world problems with a large number of objectives. Secondly, it might be valuable to apply the two hybrid criteria for comparing solutions to other MOEAs. Thirdly, improve MOEA/GLU to overcome its shortcomings. As we can see, the algorithm contains at least two shortcomings. One is that all of its experimental results on WFG1 are worse than those of MOEA/DD except for the best HV value of the 3-objective instance. The other is that its time complexity is worse than that of MOEA/D. Further research is necessary to be carried out to try to overcome these two shortcomings. ACKNOWLEDGMENT The authors would like to thank Qingfu Zhang and Ke Li for their generously giving the java codes of MOEA/D and 13 10 WFG4 3 5 8 10 WFG7 3 5 8 10 MOEA/DD. R EFERENCES [1] S. Panda, “Multi-objective evolutionary algorithm for sssc-based controller design,” Electric Power Systems Research, vol. 79, no. 6, pp. 937 – 944, 2009. [2] G. Fu, Z. Kapelan, J. R. Kasprzyk, and P. Reed, “Optimal design of water distribution systems using many-objective visual analytics,” Journal of Water Resources Planning & Management, vol. 139, no. 6, pp. 624–633, 2013. [3] R. J. Lygoe, M. Cary, and P. J. Fleming, “A real-world application of a many-objective optimisation complexity reduction process,” in International Conference on Evolutionary Multi-Criterion Optimization, 2013, pp. 641–655. [4] O. Chikumbo, E. Goodman, and K. Deb, “Approximating a multidimensional pareto front for a land use management problem: A modified moea with an epigenetic silencing metaphor,” in Evolutionary Computation, 2012, pp. 1–9. [5] T. Ganesan, I. Elamvazuthi, and P. Vasant, “Multiobjective design optimization of a nano-cmos voltage-controlled oscillator using game theoretic-differential evolution,” Applied Soft Computing, vol. 32, pp. 293 – 299, 2015. [6] T. Ganesan, I. Elamvazuthi, K. Z. K. Shaari, and P. Vasant, Hypervolume-Driven Analytical Programming for Solar-Powered Irrigation System Optimization. Heidelberg: Springer International Publishing, 2013, pp. 147–154. H1 0.958855 0.884332 0.810262 0.994851 0.993575 0.815756 0.976819 0.970539 0.773388 0.980088 0.788371 0.770895 0.698434 0.695167 0.685562 0.845047 0.844616 0.843364 0.895639 0.893686 0.887629 0.920249 0.918867 0.916739 0.678718 0.676451 0.674706 0.808181 0.805537 0.804091 0.889190 0.844953 0.8248850 0.934571 0.908858 0.885137 H2 0.958309 0.955588 0.811369 0.997409 0.996668 0.816768 0.992986 0.983890 0.800754 0.995465 0.993171 0.801428 0.698400 0.693015 0.692078 0.844654 0.842033 0.838127 0.892399 0.888761 0.882556 0.917481 0.915163 0.911581 0.677100 0.675703 0.671803 0.821287 0.804396 0.801026 0.902643 0.842148 0.819766 0.948360 0.924340 0.886750 WFG3 PBI 0.957614 0.955452 0.810162 0.994983 0.993170 0.814648 0.978952 0.961105 0.776725 0.982992 0.978054 0.781965 0.697911 0.695548 0.690822 0.843774 0.840175 0.833143 0.891617 0.888071 0.882510 0.917412 0.916424 0.909849 0.672998 0.671628 0.666242 0.805790 0.804308 0.803095 0.877491 0.844134 0.811508 0.942152 0.905199 0.877100 WFG6 8 H2 0.944690 0.939554 0.922585 0.931487 0.922682 0.895859 0.918863 0.867385 0.851531 0.918984 0.877223 0.869973 0.731411 0.730869 0.730343 0.883788 0.881128 0.878642 0.938517 0.928525 0.920050 0.963828 0.959950 0.953305 0.731854 0.731742 0.731573 0.887789 0.887662 0.887201 0.947672 0.946120 0.944323 0.976109 0.975063 0.974119 WFG9 5 H1 0.937488 0.924179 0.903350 0.908070 0.898754 0.873925 0.844850 0.787144 0.706517 0.876852 0.846479 0.746061 0.731777 0.731550 0.731255 0.885457 0.884489 0.882801 0.940762 0.937541 0.930123 0.971182 0.968851 0.964127 0.731874 0.731773 0.731506 0.888112 0.888013 0.887752 0.948562 0.947616 0.945989 0.976717 0.975950 0.975258 WFG5 WFG1 3 PBI 0.932478 0.919064 0.907255 0.909324 0.897364 0.860576 0.843381 0.831511 0.743512 0.849143 0.844050 0.785389 0.727187 0.726180 0.724841 0.881501 0.879884 0.876368 0.934740 0.930307 0.921402 0.967500 0.961761 0.951755 0.729737 0.728050 0.727450 0.887632 0.887157 0.886747 0.946957 0.945634 0.944550 0.976190 0.975073 0.974186 WFG8 m WFG2 TABLE VII B EST, M EDIAN AND W ORST HV VALUES BY MOEA/GLU WITH T HREE D IFFERENT C RITERIA : PBI, H1 AND H2 ON INSTANCES OF WFG1 TO WFG9 WITH 3,5,8 AND 10 O BJECTIVES . T HE VALUES IN RED FONT ARE THE BEST. PBI 0.690390 0.685735 0.675661 0.679563 0.673978 0.669298 0.586041 0.550607 0.532548 0.574988 0.549540 0.529822 0.708928 0.699913 0.692277 0.859456 0.847747 0.832130 0.916292 0.900157 0.883341 0.937329 0.923721 0.911045 0.689751 0.641612 0.638641 0.806133 0.750934 0.748504 0.816273 0.803022 0.761689 0.837137 0.825754 0.762914 H1 0.700632 0.696145 0.684853 0.681048 0.676910 0.666466 0.578472 0.552667 0.540043 0.565746 0.548960 0.508638 0.713367 0.703288 0.699125 0.856809 0.849112 0.840610 0.913827 0.902256 0.893311 0.941969 0.928654 0.915935 0.697593 0.642693 0.642119 0.799793 0.753767 0.749479 0.824253 0.803785 0.740563 0.839769 0.825240 0.757464 H2 0.699646 0.692045 0.685778 0.682644 0.676994 0.666298 0.605893 0.592805 0.581368 0.574100 0.555640 0.534696 0.713228 0.702914 0.694282 0.858598 0.848262 0.838766 0.916850 0.897580 0.884989 0.938397 0.926283 0.916056 0.693049 0.642552 0.641827 0.790106 0.750096 0.746307 0.823161 0.797496 0.741695 0.835042 0.823727 0.764740 [7] F. Domingo-Perez, J. L. Lazaro-Galilea, A. Wieser, E. Martin-Gorostiza, D. Salido-Monzu, and A. de la Llana, “Sensor placement determination for range-difference positioning using evolutionary multi-objective optimization,” Expert Systems with Applications, vol. 47, pp. 95 – 105, 2016. [8] B. Najafi, A. Shirazi, M. Aminyavari, F. Rinaldi, and R. A. Taylor, “Exergetic, economic and environmental analyses and multi-objective optimization of an sofc-gas turbine hybrid cycle coupled with an {MSF} desalination system,” Desalination, vol. 334, no. 1, pp. 46 – 59, 2014. [9] J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Neural Networks, 1995. Proceedings., IEEE International Conference on, vol. 4, Nov 1995, pp. 1942–1948 vol.4. [10] B. Suman and P. Kumar, “A survey of simulated annealing as a tool for single and multiobjective optimization,” Journal of the Operational Research Society, vol. 57, no. 10, pp. 1143–1160, 2006. [11] K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan, “A fast and elitist multiobjective genetic algorithm: Nsga-ii,” IEEE Transactions on Evolutionary Computation, vol. 6, no. 2, pp. 182–197, Apr 2002. [12] E. Zitzler, M. Laumanns, and L. Thiele, “Spea2: Improving the strength pareto evolutionary algorithm for multiobjective optimization,” in Evolutionary Methods for Design, Optimisation, and Control. CIMNE, Barcelona, Spain, 2002, pp. 95–100. [13] Q. Zhang and H. Li, “Moea/d: A multiobjective evolutionary algorithm based on decomposition,” IEEE Transactions on Evolutionary Computation, vol. 11, no. 6, pp. 712–731, Dec 2007. [14] A. Trivedi, D. Srinivasan, K. Sanyal, and A. Ghosh, “A survey of 14 [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] multiobjective evolutionary algorithms based on decomposition,” IEEE Transactions on Evolutionary Computation, vol. PP, no. 99, pp. 1–1, 2016. M. Emmerich, N. Beume, and B. Naujoks, An EMO Algorithm Using the Hypervolume Measure as Selection Criterion. Berlin, Heidelberg: Springer Berlin Heidelberg, 2005, pp. 62–76. K. Deb and H. Jain, “An evolutionary many-objective optimization algorithm using reference-point-based nondominated sorting approach, part i: Solving problems with box constraints,” IEEE Transactions on Evolutionary Computation, vol. 18, no. 4, pp. 577–601, Aug 2014. R. Carvalho, R. R. Saldanha, B. N. Gomes, A. C. Lisboa, and A. X. Martins, “A multi-objective evolutionary algorithm based on decomposition for optimal design of yagi-uda antennas,” IEEE Transactions on Magnetics, vol. 48, no. 2, pp. 803–806, Feb 2012. T. Ray, M. Asafuddoula, and A. Isaacs, “A steady state decomposition based quantum genetic algorithm for many objective optimization,” in 2013 IEEE Congress on Evolutionary Computation, June 2013, pp. 2817–2824. H. H. Tam, M. F. Leung, Z. Wang, S. C. Ng, C. C. Cheung, and A. K. Lui, “Improved adaptive global replacement scheme for moea/d-agr,” in 2016 IEEE Congress on Evolutionary Computation (CEC), July 2016, pp. 2153–2160. R. Cheng, Y. Jin, M. Olhofer, and B. Sendhoff, “A reference vector guided evolutionary algorithm for many-objective optimization,” IEEE Transactions on Evolutionary Computation, vol. 20, no. 5, pp. 773–791, Oct 2016. K. Li, K. Deb, Q. Zhang, and S. Kwong, “An evolutionary manyobjective optimization algorithm based on dominance and decomposition,” IEEE Transactions on Evolutionary Computation, vol. 19, no. 5, pp. 694–716, Oct 2015. J. Chen, J. Li, and B. Xin, “Dmoea- varepsilontextC : Decomposition-based multiobjective evolutionary algorithm with the varepsilon -constraint framework,” IEEE Transactions on Evolutionary Computation, vol. 21, no. 5, pp. 714–730, Oct 2017. A. Trivedi, D. Srinivasan, K. Sanyal, and A. Ghosh, “A survey of multiobjective evolutionary algorithms based on decomposition,” IEEE Transactions on Evolutionary Computation, vol. 21, no. 3, pp. 440–462, June 2017. K. Deb and R. B. Agrawal, “Simulated binary crossover for continuous search space,” vol. 9, no. 3, pp. 115–148, 2000. K. Deb and M. Goyal, “A combined genetic adaptive search (geneas) for engineering design,” 1999, pp. 30–45. K. Miettinen, Nonlinear Multiobjective Optimization. Norwell, MA:Kluwer, 1999. H. Ishibuchi, N. Tsukamoto, and Y. Nojima, “Evolutionary manyobjective optimization: A short review,” pp. 2419–2426, 2008. M. Asafuddoula, T. Ray, and R. Sarker, “A decomposition-based evolutionary algorithm for many objective optimization,” IEEE Transactions on Evolutionary Computation, vol. 19, no. 3, pp. 445–460, June 2015. I. Das and J. E. Dennis, “Normal-boundary intersection: A new method for generating the pareto surface in nonlinear multicriteria optimization problems,” Siam Journal on Optimization, vol. 8, no. 3, pp. 631–657, 2006. P. A. N. Bosman and D. Thierens, “The balance between proximity and diversity in multiobjective evolutionary algorithms,” IEEE Transactions on Evolutionary Computation, vol. 7, no. 2, pp. 174–188, April 2003. E. Zitzler and L. Thiele, “Multiobjective evolutionary algorithms: a comparative case study and the strength pareto approach,” IEEE Transactions on Evolutionary Computation, vol. 3, no. 4, pp. 257–271, Nov 1999. J. Bader and E. Zitzler, “Hype: An algorithm for fast hypervolume-based many-objective optimization,” Evolutionary Computation, vol. 19, no. 1, pp. 45–76, 2011. L. While, L. Bradstreet, and L. Barone, “A fast way of calculating exact hypervolumes,” IEEE Transactions on Evolutionary Computation, vol. 16, no. 1, pp. 86–95, Feb 2012. K. Deb, L. Thiele, M. Laumanns, and E. Zitzler, “Scalable test problems for evolutionary multiobjective optimization,” pp. 105–145, 2001. S. Huband, L. Barone, L. While, and P. Hingston, “A scalable multiobjective test problem toolkit,” Lecture Notes in Computer Science, vol. 3410, pp. 280–295, 2005. S. Huband, P. Hingston, L. Barone, and L. While, “A review of multiobjective test problems and a scalable test problem toolkit,” IEEE Transactions on Evolutionary Computation, vol. 10, no. 5, pp. 477–506, Oct 2006. E. Zitzler and L. Thiele, “Multiobjective evolutionary algorithms: a comparative case study and the strength pareto approach,” IEEE Transactions on Evolutionary Computation, vol. 3, no. 4, pp. 257–271, 1999. [38] H. Ishibuchi, Y. Hitotsuyanagi, N. Tsukamoto, and Y. Nojima, “Manyobjective test problems to visually examine the behavior of multiobjective evolution in a decision space,” in International Conference on Parallel Problem Solving From Nature, 2010, pp. 91–100. Yingyu Zhang received the B.Eng. degree in computer science and technology from Changsha University of Science and Technology, Changsha, China, in 2002, and the M.Eng. and Ph.D. degrees in computer science from Huazhong University of Science and Technology, Wuhan, China, in 2007, and 2011, respectively. He is now a lecturer with the School of Computer Science, Liaocheng University, Liaocheng, China. His research interests includes quantum optimization, evolutionary multi-objective optimization, machine learning, and cloud computing. Bing Zeng received the B.Econ. degree in economics from Huazhong Agricultural University, Wuhan, China, in 2004, and received the B.Eng. degree in computer science and technology, the M.Eng. and Ph.D. degrees in information security from Huazhong University of Science and Technology, Wuhan, China, in 2004, 2007 and 2012, respectively. He is currently an Assistant Professor at South China University of Technology, Guangzhou, China. His research interests are in cryptography and network security, with a focus on secure multiparty computation. Yuanzhen Li received his PhD degree from Beijing University of Posts and Telecommunications in 2010. He is now an associate professor in the Department of Computer Science and Technology, Liaocheng University, China. His research interests include wireless communications, evolutionary computation and Multi-objective optimization. Junqing Li received the B.Sc. and Ph.D. degrees from Shandong Economic University, Northeastern University in 2004 and 2016, respectively. Since 2004, he has been with the School of Computer Science, Liaocheng University, Liaocheng, China, where he became an Associate Professor in 2008. He also works with the School of information and Engineering, Shandong Normal University, Jinan, Shandong, China, where he became the doctoral supervisor. His current research interests include intelligent optimization and scheduling.
9cs.NE
Experimental Evaluation of Residential Demand Response in California arXiv:1710.03190v3 [physics.soc-ph] 10 Jan 2018 Datong P. Zhou∗ , Maximilian Balandat† , and Claire J. Tomlin† Abstract— We evaluate the causal effect of hour-ahead price interventions on the reduction of residential electricity consumption, using a large-scale experiment on 7,000 households in California. In addition to this experimental approach, we also develop a non-experimental framework that allows for an estimation of the desired treatment effect on an individual level by estimating user-level counterfactuals using time-series prediction. This approach crucially eliminates the need for a randomized experiment. Both approaches estimate a reduction of ≈0.10 kWh (11%) per Demand Response event and household. Using different incentive levels, we find a weak price elasticity of reduction. We also evaluate the effect of an adaptive targeting scheme, which discriminates users based on their estimated responses in order to increase the per-dollar reduction ratio by 30%. Lastly, we find that households with smart home automation devices reduce significantly more than households without, namely 0.28 kWh (37%). I. I NTRODUCTION This paper studies the causal effect of incentivizing residential households to participate in Demand Response (DR) to temporarily reduce electricity consumption. DR has been promoted by the introduction of demand-side management programs (DSM) after the 1970s energy crisis [1], enabled by the integration of information and communications technology in the electric grid. The rationale behind DSM is the inelasticity of energy supply due to the slowness of power plants’ output adjustment, which causes small increases and decreases in demand to result in a price boom or bust, respectively. Since utilities are obligated to provide end-users with electricity at a quasi-fixed tariff at all times [2], e.g. Time-of-Use pricing, they have to bear price risks. Therefore, DSM attempts to protect utilities against such price risks by partially relaying them to end-users, which increases market efficiency according to the economic consensus [3]. In 2015, the California Public Utilities Commission (CPUC) launched a Demand Response Auction Mechanism (DRAM) [4], requiring utilities to procure a certain amount of reduction capacity from DR providers. These aggregators incentivize their customers (also called “Proxy Demand Resource” (PDR) [5]) under contract to temporarily reduce their consumption relative to their projected usage without intervention, referred to in this context as counterfactual or baseline, based on which compensations for (non-)fulfilled reductions are settled: If the consumer uses less (more) energy than the baseline, she receives a reward (incurs a penalty). Figure 1 illustrates the interactions between agents. The estimation of the materialized reduction arguably is the most critical component of the DR bidding process. If ∗ Department of Mechanical Engineering, University of California, Berkeley. † Department of EECS, University of California, Berkeley. [datong.zhou, balandat, tomlin]@berkeley.edu Wholesale Market Scheduling Coordinator DR Provider Electric Utility PDR End-Use Customers Fig. 1: Interactions of Agents in Residential Demand Response the reductions are estimated with a biased counterfactual, either the DR provider or the utility clearing the bids is systematically discriminated against. If the baseline is unbiased but plagued by high variance, the profit settlement is highly volatile. Existing baselines employed by major power grid operators in the United States (e.g. California Independent System Operator (CAISO), New York ISO) are calculated with simple arithmetic averages of previous observations [5] and therefore are inaccurate. The estimation of more accurate baselines is a significant contribution of this paper. A. Contributions We estimate the average treatment effect (ATE) of hourahead notifications on the reduction of electricity consumption by evaluating a Randomized Controlled Trial (RCT) on ≈ 5000 residential households in California serviced by the three main electric utilities (PG&E, SDG&E, SCE). This experiment is funded by the California Energy Commission, which − to the best of our knowledge − is the first one to experiment with hour-ahead notifications on a residential household level. We estimate an ATE of −0.10 kWh per DR Event and user and further discover notable geographic and temporal heterogeneity among users, as the largest estimated reductions occur in summer months as well as in regions with warmer climate. In addition to this experimental approach, we also develop a non-experimental method for estimating this causal effect on an individual user level, which is easily aggregated into an ATE. Importantly, we find that the identified ATEs in both cases are close to each other. Interestingly, the non-experimental approach even achieves tighter confidence intervals of the estimated causal effect. This suggests that our methodology is capable of identifying the causal impact of any intervention in settings with high-frequency data, thereby circumventing financial and ethical constraints which frequently arise in clinical trials, transportation, or education. Lastly, we design an adaptive targeting method to exploit the heterogeneity in users’ responses to incentive signals to assign differing price levels to different subsets of the treatment population. Specifically, we separate users based on their previous responses into two distinct groups, each of which either only receives low or high incentives. This method yields an increase of the per-dollar yield of ≈30%. This paper is structured as follows: Section II explains the experimental setup and provides summary statistics on the RCT data. We then develop the non-experimental estimation framework in Section III, where we pay particular attention to estimation bias and empirical de-biasing methods (Section III-C). Non-experimental estimation results are provided in Section IV. Next, in Section V we estimate the ATE using a classical Fixed-Effects Estimator [6]. Section V-F compares the estimates obtained by both approaches. Lastly, the effect of adaptive targeting is discussed in Section VI. Section VII concludes. Additional figures and numeric data are relegated to the appendix. B. Related Work Causal inference seeks to extrapolate the effect of interventions to general settings, however, many experiments are infeasible or unethical due to budget or ethical factors. With the rapid growth of collected user data, non-experimental estimates become more and more valuable, as the new hope is to use such estimates in place of experiments. These facts have spurred research at the intersection of machine learning and economics, whose general idea is to partition observations under treatment and control in order to fit a nominal model on the latter set, which, when applied on the treatment set, yields the treatment effect of interest. Examples for such models are [7], who evaluates welfare effects of home automation by calculating the KolmogorovSmirnov Statistic between users, or [8], who constructs a convex combination of US states as the counterfactual estimate for tobacco consumption to estimate the effect of a tobacco control program in California on tobacco consumption. In [9], the estimators are random forests trained by recursive partitioning of the feature space and novel cross-validation criteria. [10] develops Bayesian structural time series models combined with a Monte-Carlo sampling method for treatment effect inference of market interventions. Fitting an estimator on smart meter time-series is essentially a short-term load forecasting (STLF) problem, whose goal is to fit estimators on observed data to predict future consumption with the highest possible accuracy. Within STLF, tools employed are ARIMA models with a seasonal component [11] and classic regression models where support vector regression (SVR) and neural networks yield the highest accuracy [12], [13]. A comprehensive comparison between ML techniques for forecasting and differing levels of load aggregation is provided in [14]. In the context of smart meter data mining, much of the existing work focuses on disaggregation of energy consumption to identify contributions of discrete appliances from the total observed consumption [15] and to learn consumption patterns [16], [17]. Studies in applied economics typically emphasize the estimation of ATEs of experimental interventions. To increase precision of the estimates, the employed regression models often employ unit-level fixed effects [18], [19], which is an implicit way of training models for the consumption of individual consumers. In this work, we make these user-level models explicit, allowing for more general ML techniques. Importantly, our approach is original as it permits to perform causal inference on the level of individual treatment effects in a straightforward fashion by employing estimators from STLF. To the best of our knowledge, this paper is the first of its kind to analyze the potential of Demand Response interventions on a residential level, combining ideas at the intersection of causal inference from econometrics and Machine Learning for estimation. II. E XPERIMENTAL S ETUP AND DATA C HARACTERISTICS A. Setup of the Experiment The experiment is carried out by OhmConnect, Inc., using funds provided by the California Energy Commission. Figure 2 draws a flowchart of the experimental setup. All Participants Treatment− Encouraged Treatment− Non-Encouraged Phase 1 (90 days) Control Estimate Responses Targeted-High Targeted-Low Non-Targeted Phase 2 (90 days) Fig. 2: Setup of Experiment Over the course of the experimental time period (Nov. 2016 - Dec. 2017), each consumer that signs up for the study is randomly assigned to one of the following groups: • Treatment−Encouraged: The user receives an average number of 25 DR events in the 90 days following the signup, with incentive levels being randomly chosen from the set R = {0.05, 0.25, 0.50, 1.00, 3.00} USD kWh . Additionally, the user is given a rebate for purchasing a smart home automation device. • Treatment−Non-Encouraged: Same as in TreatmentEncouraged, but without smart home automation rebate. • Control: Users do not receive any notifications for DR events for a period of 90 days after sigup. These three groups form Phase 1 of the experiment. Users in the control group that have reached 90 days of age are removed from the study. Users in either the Treatment−Encouraged or Treatment−Non-Encouraged groups that have reached 90 days of age are pooled and systematically assigned to one of the following groups for Phase 2 interventions: • Targeted-High: The user receives an average number of 25 DR events for a period of 90 days after being rolled over into Phase 2. Each reward level is randomly drawn from the set {1.00, 3.00} USD kWh . • Targeted-Low: Same as in Targeted-High, but rewards are randomly drawn from {0.05, 0.25, 0.50} USD kWh . • Non-Targeted: Same as in targeted groups, with rewards drawn from {0.05, 0.25, 0.50, 1.00, 3.00} USD kWh . Users with completed Phase 2 are removed from the study. In Sections III-V, we evaluate Phase 1 of the experiment whereas Section VI is dedicated to adaptive targeting (Phase 2). In the remainder of this paper, we use the term “treatment users” to refer to users in the “Treatment-Encouraged” and “Treatment-Non-Encouraged” group. Users receive notifications of a DR event with the incentive level up to 20 minutes into an hour, which lasts until the end of the hour. B. Summary Statistics Table I reports the number of users by experiment group and proportion of users for which we were able to scrape historical smart meter reading data. The table shows that the randomized assignment of users to groups roughly follows a 1:2:2 ratio (Control vs. Treatment−Encouraged vs. Treatment−Non-Encouraged). Historical Smart Meter Data Availability by Group Group # Enrolled # With Data # With DR Control 3266 1373 − Treatment−Encouraged 6735 2953 2921 Treatment−Non-Enc. 6689 3014 2985 TABLE I: Number of Total Users Enrolled by Group, Data Availability, and Users with DR Events. Users without DR events or for which we were unable to scrape historical data are omitted from the study. Since the assignment of users into the different experimental groups was randomized (see Section II-D), dropping such users does not affect the evaluation of the experiment. Figure 3 shows the geographic distribution of the remaining users. Geographic Distribution of Users PG&E: 2969 Users SCE: 1675 Users SDG&E: 969 Users D. Balance Checks To verify that users were randomly assigned to control and treatment groups, we perform a balance check on the distribution of observed air temperatures and electricity consumptions across both groups. Notice that the relatively large sample size renders a classical differences-in-means t-test inappropriate. Therefore, we utilize Cohen’s d to estimate the effect size based on the differences between means, which is insensitive to the large sample size. Given two discrete distributions P and Q with sample sizes n1 /n2 and means x̄1 /x̄2 , Cohen’s d is defined as  1/2 (n1 − 1)s21 + (n2 − 1)s22 x̄1 − x̄2 , (1) , s= d= s n1 + n2 − 2 where s1 and s2 are the sample standard deviations for distributions P and Q, respectively. In addition, we use the Hellinger Distance H as a nonparametric comparison to quantify the similarity between the distributions [22]: 1 H(P, Q) = √ 2 k X √ √ ( pi − qi )2 !1/2 (2) i=1 where P = {p1 , . . . , pk } and Q = {q1 , . . . , qk }. To compute (1) and (2), we discretize the temperature and consumption distributions appropriately. Table VI in the Appendix provides these metrics together with the differences in means for a selected subset of hours of the day, which was chosen to coincide with those hours of the day for which DR events were observed (see Figure 10). We omit the metrics for the remaining hours of the day as they are very similar to the listed ones. As the Hellinger Distance H ∈ [0, 1], with 0 corresponding to a perfect similarity and 1 to total dissimilarity, we can assume that the assignment of users into treatment and control group is as good as random. III. N ONEXPERIMENTAL T REATMENT E FFECT E STIMATION A. Potential Outcomes Framework Fig. 3: Geographic Distribution of Users C. Weather Data Hourly measurements of ambient air temperature are scraped from the publicly accessible California Irrigation Management Information System [20]. As there are fewer weather stations than distinct user ZIP codes, we linearly interpolate user-specific temperatures at their ZIP codes from the two closest weather stations in latitude and longitude by calculating geodesic distances with Vincenty’s formulae [21]. To estimate the effect of the DR intervention program, we adopt the potential outcomes framework introduced by Rubin (1974) [23]. Let I = {1, . . . , n} denote the set of users. The indicator Dit ∈ {0, 1} encodes the fact whether or not user i received DR treatment at time t. Each user is endowed with a consumption time series yi = {yi1 , . . . , yiτ } and associated covariates Xi = {xi1 , . . . , xiτ } ∈ ×τi=1 Xi , Xi ⊂ Rnx , where time is indexed by t ∈ T = {1, . . . , τ } 0 and nx is the dimension of the covariate space Xi . Let yit 1 and yit denote user i’s electricity consumption at time t for Dit = 0 and Dit = 1, respectively. Let Ci and Ti denote the set of control and treatment times for user i. That is, Ci = {t ∈ T | Dit = 0}, Ti = {t ∈ T | Dit = 1}. (3) The number of treatment hours is much smaller than the number of non-treatment hours. Thus 0 < |Ti |/|Ci |  1. Di,t = {(xit , yit ) | t ∈ Ti }, Di,c = {(xit , yit ) | t ∈ Ci }. (4) The one-sample estimate of the treatment effect on user i at time t, given the covariates xit ∈ Rnx , is 1 0 βit (xit ) := yit (xit ) − yit (xit ) ∀ i ∈ I, t ∈ T, t∈Ti The average treatment effect on the treated (ATT) follows from (6): 1 X 1 X 1 0 (yit − yit ). (7) ATT := Ei∈I [βi ] = |I| |Ti | t∈Ti Since users were put into different experimental groups in a randomized fashion, the ATT and the average treatment effect (ATE) are identical [24]. Lastly, the conditional average treatment effect (CATE) on x̃ is obtained by marginalizing the conditional distribution of one-sample estimates (5) on x̃ over all users and treatment times, where x̃ ∈ Rñx is a subvector of x ∈ Rnx , 0 < ñx < nx : h i 1 0 CATE(x̃) := Ei∈I Et∈Ti (yit − yit ) x̃it = x̃ . (8) The CATE captures heterogeneity among users, e.g. with respect to specific hours of the day, the geographic distribution of users, the extent to which a user possesses “smart home” appliances, group or peer effects, etc. To rule out the existence of unobserved factors that could influence the assignment mechanism generating the complete observed data set {(xit , yit , Dit ) | i ∈ I, t ∈ T}, we make the following standard assumptions: Assumption 1 (Unconfoundedness of Treatment Assignment). Given the covariates {xit }t∈T , the potential outcomes are independent of treatment assignment: 0 1 (yit , yit ) ⊥ Dit | xit ∀i ∈ I, t ∈ T. 0 1 0 yit = yit + Dit · (yit − yit ) ∀ t ∈ T. (5) which varies across time, the covariate space, and the user population. Marginalizing this one-sample estimate over the set of treatment times Ti and the covariate space Xi yields the user-specific Individual Treatment Effect (ITE) βi i h 1 X 1 0 1 0 yit − yit . (6) xit = βi := EXi Et∈Ti yit − yit |Ti | i∈I outcomes. That is, the conditional distribution of the potential outcomes, given covariates, remains constant. The fundamental problem of causal inference [26] refers to the fact that either the treatment or the control outcome can be observed, but never both (granted there are no missing observations). That is, (9) Thus, the ITE (6) is not identified, because one and only one of both potential outcomes is observed, namely 1 0 {yit | t ∈ Ti } for the treatment times and {yit | t ∈ Ci } for the control times. It therefore becomes necessary to estimate counterfactuals. B. Non-Experimental Estimation of Counterfactuals Consider the following model for the estimation of such counterfactuals: yit = fi (xit ) + Dit · βit (xit ) + εit , ∀i ∈ I, t ∈ T. (10) Assumption 1 is the “ignorable treatment assignment” assumption introduced by Rosenbaum and Rubin [25]. Under this assumption, the assignment of DR treatment to users is implemented in a randomized fashion, which allows the calculation of unbiased ATEs (7) and CATEs (8). Assumption 2, motivated by the time-series nature of the observational data, ensures that the set of observable covariates {xit | t ∈ T} can capture seasonality effects in the estimation of the potential (12) where εit denotes noise uncorrelated with covariates and treatment assignment. fi (·) : Rnx 7→ R is the conditional mean function and pertains to Dit = 0. To obtain an estimate 0 for fi (·), denoted with fˆi (·), control outcomes {yit | t ∈ Ci } are first regressed on {xit | t ∈ Ci }, namely their observable covariates. In a second step, the counterfactual 0 ŷit for any t ∈ Ti can be estimated by evaluating fˆi (·) on its associated covariate vector xit . Finally, subtracting 0 1 ŷit from yit isolates the one-sample estimate βit (xit ), from which the user-specific ITE (6) can be estimated. Figure 4 illustrates this process of estimating the reduction during a 1 DR event by subtracting the actual consumption yit from 0 the predicted counterfactual ŷit = fˆi (xit ). Despite the fact that consumption can be predicted for horizons longer than a single hour, we restrict our estimators fi (·) to a single hour prediction horizon as DR events are at most one hour long. Consumption/Temperature materialized consumption 0 fˆi (xit ) = ŷit Estimated Reduction ambient air actual temperature consumption Assumption 2 (Stationarity of Potential Outcomes). Given the covariates {xit }t∈T , the potential outcomes are independent of time, that is, 0 1 (yit , yit ) ⊥ t | xit (11) Covariates xit for Estimation 1 yit estimated counterfactual DR Event Further, let Di,t and Di,c denote user i’s covariate-outcome pairs of treatment and control times, respectively. That is, t 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 0 using Treatment Covariates x Fig. 4: Estimation of the Counterfactual ŷit it 0 − y1 and Predicted Reduction ŷit it To estimate fi (·), we use the following classical regression methods [27], referred to as estimators: E1: Ordinary Least Squares Regression (OLS) E2: L1 Regularized (LASSO) Linear Regression (L1) E3: L2 Regularized (Ridge) Linear Regression (L2) E4: k-Nearest Neighbors Regression (KNN) E5: Decision Tree Regression (DT) E6: Random Forest Regression (RF) DT (E5) and RF (E6) follow the procedure of Classification and Regression Trees [28]. We compare estimators (E1)-(E6) to the CAISO 10-in-10 Baseline (BL) [5], which, for any given hour on a weekday, is calculated as the mean of the hourly consumptions on the 10 most recent business days during the selected hour. For weekend days and holidays, the mean of the 4 most recent observations is calculated. This BL is further adjusted with a Load Point Adjustment, which corrects the BL by a factor proportional to the consumption three hours prior to a DR event [5]. Since users tend to exhibit a temporary increase in consumption in the hours following the DR intervention [1], we remove nr = 8 hourly observations following each DR event in order to prevent estimators (E1)-(E6) from learning from such spillover effects. This process is illustrated in Figure 5. Consumption t Fig. 5: Separation of consumption time series into training set (green), DR Events (grey), and Periods of Spillover Effects (blue) Hence the training data Di,tr ⊂ Di,t used to estimate the conditional mean function fˆi (·) (12) consists of all observations leading up to a DR event, excluding those that are within 8 hours of any DR event. To estimate user i’s 0 counterfactual outcome ŷit during a DR event t ∈ Ti , we use the following covariates: • 5 hourly consumption values preceding time t • Air temperature at time t and 4 preceding measurements • Hour of the day, an indicator variable for (non-)business days, and month of the year as categorical variables Thus, the covariate vector writes 0 xit = [yit−1 ··· 0 yit−5 Tit C(HoDit ) : C(is Bdayit ) ··· Tit−4 C(MoYit )]. (13) • Seasonal and temporal bias: Due to the experimental design, DR events for a particular user are concentrated within a period of 180 days after signing up. Further, DR events are called only in the afternoon and early evening (see Figure 10). Thus, fitting an estimator on all available historical data is likely to introduce bias during these time periods of interest. To deal with these challenges, we use the de-biasing procedure presented in Algorithm 1, which was first introduced in [29]. We first separate a subset of non-DR events from Algorithm 1 Unbiased Estimation of Counterfactuals Input: Treatment data Di,t , control data Di,c , Estimator, η 1: Split Di,c into training data Di,tr and placebo data Di,pl according to empirical distribution of Ti . Split control times Ci into training times Ci,tr and placebo times Ci,pl 2: Compute weights for Di,tr = {(xit , yit ) | t ∈ Ci,tr } according to (15a)-(15c), using η 3: Fit conditional mean function fˆi on Di,tr with weights 0 4: Estimate placebo counterfactuals {ŷit | t ∈ Ci,pl } 5: Compute bias on placebo treatment set 0 6: Estimate treatment counterfactuals {ŷit | t ∈ Ti } 7: Subtract placebo treatment bias from estimated treatment counterfactuals: X 1 0 0 0 0 ŷit ← ŷit − (ŷiτ − yiτ ) ∀ t ∈ Ti (14) |Ci,pl | τ ∈Ci,pl user i’s control data Di,c , which we call the placebo set Di,pl with associated placebo treatment times Ci,pl (we chose Di,pl to be of size 25). This placebo set is drawn according to user i’s empirical distribution of Phase 1 DR events by hour of day and month of year. Next, the non-experimental estimator of choice is fitted (using cross-validation to find hyperparameters to minimize the mean squared prediction error) on the training set Di,tr . Importantly, to account for temporal bias, we assign weights to the training samples, ensuring that samples in “similar” hours or seasons as actual DR events are assigned larger weights. Specifically, the weights wit are determined as follows: In (13), Tit denotes temperature, HoDit hour of day, is Bdayit an indicator variable for business days, and MoYit the month of year (all for user i at time t). “C” denotes dummy variables and “:” their interaction. HoD MoY wit ∝ wit wit , X HoD wit = η + 1(HoDit = HoDiτ ), C. Placebo Treatments and De-biasing of Estimators MoY wit =η+ As previously mentioned, a crucial element of an estimator is unbiasedness. If an estimator systematically predicts counterfactuals that are too large (small), users receive an excess reward (are paid less) proportional to the amount of prediction bias. For a fair economic settlement, it is thus desirable to minimize the amount of bias. In our application, such prediction bias is caused by the following two factors: • Inherent bias of estimators: With the exception of OLS (E1), (E2)-(E6) are inherently biased, which is justified due to the well-known bias-variance tradeoff. (15a) (15b) τ ∈Ci,tr X 1(MoYit = MoYiτ ), (15c) τ ∈Ci,tr where η > 0 is a constant to be chosen a-priori. Then, the fitted model is used to predict counterfactuals associated with placebo events. This yields a set of |Ci,pl | paired samples from which we can obtain a proxy of the estimation bias that remains even after assigning sample weights according to the previous step. Finally, to obtain an empirically de-biased estimate of actual Phase 1 DR events, we simply subtract this proxy of the estimation bias from predicted Phase 1 DR event outcomes. D. Estimation of Individual Treatment Effects To obtain point estimates for user i’s ITE βi , we simply average all one-sample estimates (5) according to (6). To obtain an estimate of whether or not a given user i has actually reduced consumption, we utilize a nonparametric permutation test with the null hypothesis of a zero ITE: H0 : βi = 0, H1 : βi 6= 0. (16) 0 1 Given user i’s paired samples {zit = ŷit − yit | t ∈ Ti } during DR periods, the p-value associated with H0 (16) is P 1(D̄ ≤ β̂i ) . (17) p = D∈Pi |T | 2 i In (17), D̄ denotes the mean of D. Pi denotes the set of all possible assignments of signs to the pairwise differences in 1 0 the set {zit = yit − ŷit | t ∈ Ti }. That is, Pi = {s1 zi1 , . . . , s|Ti | zi|Ti | | sj ∈ {±1}, 1 ≤ j ≤ |Ti |} (18) which is of size 2|Ti | . Finally, the p-value from (16) is calculated as the fraction of all possible assignments whose means are less than or equal the estimated ITE β̂i . In practice, as the number of DR events per user in Phase 1 is about 25 (see Figure 2), the number of total possible assignments becomes computationally infeasible. Thus, we randomly generate a subset of 105 assignments from Pi to compute the p-value in (17). Moreover, we use the percentile bootstrap method [30] to compute a confidence interval of the estimated ITE for user i around the point estimate β̂i . IV. N ONEXPERIMENTAL E STIMATION R ESULTS A. Average Treatment Effect Figure 6 shows ATE point estimates and their 99% bootstrapped confidence intervals conditional on differing reward levels for all estimators as well as the CAISO BL. Due to the empirical de-biasing procedure (see Section III-C), the point estimates for estimators E1-E6 are close to each other. BL appears to be biased in favor of the DRP, as it systematically predicts smaller reductions than E1-E6. the results give rise to a notable correlation between incentive levels and reductions. To compare the prediction accuracy of the estimators, Table II reports the width of the confidence intervals for each method and incentive level. The inferiority of the CAISO baseline compared to the non-experimental estimators, among which RF achieves the tightest confidence intervals, becomes apparent. Therefore, in the remainder of this paper, we restrict all results achieved with nonexperimental estimators to those obtained with RF. Width of CATE Confidence Intervals (kWh) by Incentive Level BL KNN OLS L1 L2 DT RF 0.25 USD kWh 0.0273 0.0219 0.0217 0.0211 0.0214 0.0251 0.0210 0.50 USD kWh 0.0269 0.0235 0.0230 0.0233 0.0214 0.0247 0.0212 1.00 USD kWh 0.0289 0.0227 0.0219 0.0212 0.0219 0.0241 0.0211 3.00 USD kWh 0.0266 0.0214 0.0219 0.0225 0.0218 0.0250 0.0205 TABLE II: Width of 99 % Confidence Intervals around ATE Point Estimate Conditional on Incentive Level, All Estimators B. Individual Treatment Effects Figure 7 plots ITEs for a randomly selected subset of 800 users who received at least 10 DR events in Phase 1, estimated with RF. Users are sorted by their point estimates (blue), whose 95% bootstrapped confidence intervals are drawn in black. Yellow lines represent users with at least one active smart home automation device. By marginalizing the point estimates over all users with at least 10 events, we obtain an ATE of −0.104 kWh (−11.4%), which is close to −0.105 kWh as reported earlier. The difference ensues from only considering users with at least 10 DR events. The 99% ATE confidence interval is [−0.115, −0.093] kWh. 800 700 Estimated ITEs of 800 Randomly Selected Users with ≥ 10 DR Events, RF 95% ITE Confidence Interval Point Estimate Zero Mean Reduction 99% ATE Confidence Interval 600 Estimated Reductions [kWh] and 99% Confidence Intervals 500 User Number −0.08 Reductions [kWh] 0.05 USD kWh 0.0277 0.0218 0.0214 0.0217 0.0221 0.0255 0.0211 −0.09 −0.10 −0.11 −0.12 400 300 −0.13 BL −0.14 0.05 KNN OLS 0.25 L1 0.50 L2 DT 1.00 RF 3.00 Incentive [USD/kWh] 200 Fig. 6: CATEs by Incentive Level with Bootstrapped Confidence Intervals The ATE averaged over the predictions of estimators E1E6 is 0.105 kWh / 11.5%. The intercept and the slope of the demand curve are −0.099 kWh / −0.013 kWh/USD, meaning that users reduce an additional 0.013 kWh per dollar offered, which is only a small change. Due to the idiosyncratic nature of the CATE for r = 0.5 USD kWh , the slope and intercept have to be interpreted with caution. However, 100 0 −2.5 −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 Absolute Reduction [kWh] Fig. 7: Distribution of ITEs with Bootstrapped Confidence Intervals Table III reports estimated ATEs for users with or without active smart home automation devices, which are obtained by aggregating the relevant estimated ITEs from Figure 7. We notice larger responses as well as a larger percentage of estimated reducers among automated users. ATEs Conditional on Automation Status for Users with ≥ 10 DR Events # Users % Reducers ATE (kWh) ATE (%) Automated 451 79.2 −0.279 −36.7 4491 63.6 −0.087 −9.62 Non-Automated All 4942 65.0 −0.105 −11.5 TABLE III: Estimated CATEs by Automation Status, RF Estimator (E6) C. Estimation by Month of the Year The CATE by month of the year is found in a similar fashion to the CATE by hour of the day: Xit = [is treatit BLit C(MoY) : is DRit ] . (23) Tit D. Role of Smart Home Automation The CATE by automation status is determined by introducing the indicator is autoit : Table IV reports the percentage of significant reducers for different confidence levels, obtained with the permutation test under the null (16). From Tables III and IV, it becomes Xit = [is treatit BLit Tit C(is autoit ) : is DRit ] . (24) clear that automated users show larger reductions than nonE. Effect of Automation Uptake Encouragement automated ones, which agrees with expectations. Lastly, the effect of incentivizing users to purchase a smart Fraction of Significant Reducers (among sample of size 4942) home automation device on energy consumption during DR 1 − α = 0.9 1 − α = 0.95 1 − α = 0.99 # Automated 225 205 159 events is determined as follows: 45.5 1162 25.9 1367 27.7 35.3 829 18.5 988 20.0 Xit = [is encit TABLE IV: Estimated Percentage of Significant Reducers according to Permutation Test, RF Estimator (E6) V. ATE E STIMATION WITH F IXED E FFECTS M ODELS To estimate the ATE of DR interventions on electricity consumption, we consider the following fixed-effects model with raw consumption (kWh) as the dependent variable: kWhit = Xit · β + αit + uit . (19) In (19), subscripts i and t refer to user i at time t, respectively. Xit is a row vector of observable covariates, αit are unobserved fixed effects, and uit is the noise term which is assumed to be uncorrelated with the regressors and Gaussian distributed with zero mean and finite variance. The fixed effects term αit removes persistent differences across users in their hourly and monthly consumption interacted with a business day indicator variable: αit ∼ C(HoDit ) : C(is Bdayit ) + C(MoYit ). (20) A. Estimation by Incentive Level To estimate the CATE by incentive level, the covariate matrix Xit in (19) is specified as follows: Xit = [is treatit BLit Rit = [1(rit = 0.05) Tit ··· Rit ] , 1(rit = 3.00)] . (21a) (21b) In (21a), is treatit is an indicator set to one for all treatment users (and zero for all control users). BLit is the CAISO baseline for user i at time t, which is necessary to control for the non-random assignment of reward levels to users, Tit is the ambient air temperature, and Rit is the reward level. B. Estimation by Hour of the Day To estimate the CATE by hour of the day, we pool all reward levels into the indicator variable is DRit , which is one if user i received treatment at time t and zero otherwise: Xit = [is treatit BLit Tit is nonencit is encit · is DRit C(HoD) : is DRit ] . (22) BLit Tit is nonencit · is DRit ]. (25) In (25), the indicators is enc and is nonenc are 1 for all users in the “Treatment-Encouraged” and in “TreatmentNon-Encouraged”, respectively, and zero otherwise. F. Comparison of Estimation Methods We now benchmark the results obtained from the best nonexperimental estimator (RF) to those from the fixed effects model with specification (20). Figure 8 compares the point CATEs by reward levels and their 95% confidence intervals. It can be seen that the point estimates are close to each other (−0.101 kWh aggregated for fixed effects vs. −0.105 for non-experimental approach with RF, a less than 5% difference), a finding that suggests that our non-experimental estimation technique produces reliable estimates comparable to the experimental gold standard. The fact that the confidence intervals are notably tighter for RF corroborates this notion. Estimated Reductions [kWh] and 95% Confidence Intervals −0.07 Reductions [kWh] 49.9 1382 30.8 1607 32.5 % of Total # Non-Automated % of Total # All % of Total ITE Estimates FE Regression −0.08 −0.09 −0.10 −0.11 −0.12 −0.13 0.05 0.25 0.50 1.00 3.00 Incentive [USD/kWh] Fig. 8: CATEs by Incentive Level with Confidence Intervals, Comparison Fixed Effects Estimators and Non-Experimental Estimators VI. E FFECT OF A DAPTIVE TARGETING The goal of adaptive targeting is to maximize the reduction per dollar paid to the users, which is achieved by either minimizing the payout and/or maximizing users’ reductions. We evaluate the reduction by reward ratios for the targeted (ρt ) and non-targeted (ρn ) groups by averaging the per-event reductions β̂it (xit ) (5) normalized by the reward rit : P P (2) β̂it (xit )/rit i∈St t∈Ti ρt = , (26a) P (2) i∈St |Ti | P P (2) β̂it (xit )/rit i∈Sn t∈Ti ρn = , (26b) P (2) i∈Sn |Ti | (2) where Ti denotes user i’s set of Phase 2 DR events. A. Targeting Assignment Algorithm Algorithm 2 describes the targeting assignment algorithm on a given set of users, which we denote with S. Users are Algorithm 2 Adaptive Targeting of Users Input: Set of users S with completed Phase 1 Output: Groups Sn , Sl , and Sh of proportion 2 : 1 : 1 1: Randomly split S = Sn ∪ St , −1 ≤ |Sn | − |St | ≤ 1 2: Estimate ITE β̂i with E6 for each user i ∈ St . 3: Sort {βi }i∈S in ascending order 4: Split St = Sl ∪ Sh , such that −1 ≤ |Sl | − |Sh | ≤ 1 and β̂i < β̂j ∀ i ∈ Sl , j ∈ Sh 5: Assign users in Sl and Sh to low- and high-targeted, respectively transitioned into Phase 2 on a weekly basis. That is, for a particular week, all users who have reached 90 days of age in Phase 1 form the current weekly cohort, which is randomly split into a non-targeted group Sn and targeted group St of equal size (ties are broken randomly). For each user in St , we calculate the ITE based on Phase 1 events. These ITEs are then sorted in ascending order. The 50% of the largest reducers (with the most negative ITEs) are defined to be the low-targeted group Sl , whereas the other half is assigned to high-targeted group Sh . This targeting scheme appears to be a double-edged sword: On the one hand, the DRP pays less money to large reducers and also achieves larger reductions for previously small reducers, increasing the desired ratio. On the other hand, previously large reducers now reduce less (in response to smaller rewards) and previously small reducers are paid more money for increased reductions, thereby counteracting the desired goal. However, the latter factors are dominated by the gains from the former ones, as we show in Section VI-C. B. Validation of Adaptive Targeting Algorithm 2 exploits the fact that users are relatively price inelastic (indeed Figure 8 only shows a weak negative slope of the demand curve) to assign large incentives to low reducers (and small incentives to high reducers) to minimize the total payout from DRP to users. The attentive reader might wonder why the targeting criterion had been determined to be the estimated ITE rather than any other criterion. Indeed, we performed a targeting exercise to determine which criterion is most suitable for maximizing ρt (26a). The idea is to assign users into one of two targeted groups, based on one of the following criteria estimated from Phase 1 responses: • ITE ITE normalized by average reward level received Intercept of estimated individual demand curve • Slope of estimated individual demand curve Each of these four criteria are computed in kWh and % values, and after a sufficient number of iterations it was determined that the ITE β̂i indeed is the criterion that maximizes ρt (26a). • • C. Results of Adaptive Targeting Table V reports the targeting metrics together with the CATE by treatment group as well as the number of observations for targeted nt and non-targeted users nn . We restrict our analysis to samples obtained after June 27, 2017, as we observe larger effects of targeting in summer months. Estimator BL RF ρt 0.483 0.372 Targeting ρn 0.421 0.287 Metrics for CATEt −0.071 −0.037 Phase 2 CATEn −0.088 −0.056 nt 25438 25438 nn 26488 26488 TABLE V: Targeting Results for 2, 704 users between June 27, 2017 kWh December 31, 2017. [ρ] = USD , [CATE] = kWh. kWh RF predicts a difference of ρt − ρn ≈ 0.085 USD , or an increase of about 30% compared to the non-targeted scheme. For BL, this increase is smaller (15%). However, due to the biasedness of the BL (see Figure 6), the RF estimate is more reliable. We can observe the tradeoff between smaller reductions (indeed RF predicts a CATE for targeted users that is 34% smaller compared to non-targeted users) and a reduced average payout, which decreases by 85% (not reported in Table V). The latter effect dominates the decrease in net reductions, resulting in the 30% increase of the reduction per reward ratio (26a). VII. C ONCLUSION We analyzed Residential Demand Response as a humanin-the-loop cyber-physical system that incentivizes users to curtail electricity consumption during designated hours. Utilizing data collected from a Randomized Controlled Trial funded by the CEC and conducted by a Demand Response provider in the San Francisco Bay Area, we estimated the causal effect of hour-ahead price interventions on electricity reduction. To the best of our knowledge, this is the first major study to investigate DR on such short time scales. We developed a non-experimental estimation framework and benchmarked its estimates against those obtained from an experimental Fixed-Effects Linear Regression Model. Importantly, the former does not depend on the existence of an experimental control group to construct counterfactuals that are necessary to estimate the treatment effect. Instead, we employ off-the-shelf regression models to learn a consumption model on non-DR periods, which can then be used to predict counterfactuals during DR hours of interest. We find that the estimated treatment effects from both approaches are close to each other. The estimated ATE is −0.10 kWh (11%) per Demand Response event and household. Further, we observe a weak positive correlation between the incentive level and the estimated reductions, suggesting that users are only weakly elastic in response to incentives. R EFERENCES [1] P. Palensky and D. Dietrich, “Demand Side Management: Demand Response, Intelligent Energy Systems, and Smart Loads,” IEEE Transactions on Industrial Informatics, vol. 7, no. 3, pp. 381–388, 2011. [2] Federal Energy Regulatory Commission, “Assessment of Demand Response and Advanced Metering,” Tech. Rep., 2016. [3] S. Borenstein, “The Long-Run Efficiency of Real-Time Electricity Pricing,” The Energy Journal, 2005. [4] “Public Utilities Commission of the State of California: Resolution E-4728. Approval with Modifications to the Joint Utility Proposal for a Demand Response Auction Mechanism Pilot,” July 2015. [5] “California Independent System Operator Corporation (CAISO): Fifth Replacement FERC Electric Tariff,” 2014. [6] P. J. Diggle, P. Heagarty, K.-Y. Liang, and S. L. Zeger, Analysis of Longitudinal Data. Oxford University Press, 2013, vol. 2. [7] B. Bollinger and W. R. Hartmann, “Welfare Effects of Home Automation Technology with Dynamic Pricing,” Stanford University, Graduate School of Business Research Papers, 2015. [8] A. Abadie, A. Diamond, and J. Hainmueller, “Synthetic Control Methods for Comparative Case Studies: Estimating the Effect of California’s Tobacco Control Program,” Journal of the American Statistical Association, vol. 105, no. 490, pp. 493–505, 2012. [9] S. Athey and G. W. Imbens, “Recursive Partitioning for Heterogeneous Causal Effects,” Proceedings of the National Academy of Sciences of the United States of America, vol. 113, no. 27, pp. 7353–7360, 2016. [10] K. Brodersen, F. Gallusser, J. Koehler, N. Remy, and S. Scott, “Inferring Causal Impact Using Bayesian Structural Time-Series Models,” The Annals of Applied Statistics, vol. 9, no. 1, pp. 247–274, 2015. [11] J. W. Taylor and P. E. Sharry, “Short-Term Load Forecasting Methods: An Evaluation Based on European Data,” IEEE Transactions on Power Systems, vol. 22, no. 4, pp. 2213–2219, 2007. [12] T. Senjyu, H. Takara, K. Uezato, and T. Funabashi, “One-HourAhead Load Forecasting Using Neural Network,” IEEE Transactions on Power Systems, vol. 17, no. 1, pp. 113–118, 2002. [13] E. E. Elattar, J. Goulermas, and Q. H. Wu, “Electric Load Forecasting Based on Locally Weighted Support Vector Regression,” IEEE Transactions on Systems, Man, and Cybernetics, vol. 40, no. 4, 2010. [14] P. Mirowski, S. Chen, T. K. Ho, and C.-N. Yu, “Demand Forecasting in Smart Grids,” Bell Labs Technical Journal, 2014. [15] F. Chen, J. Dai, B. Wang, S. Sahu, M. Naphade, and C.-T. Lu, “Activity Analysis Based on Low Sample Rate Smart Meters,” Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 240–248, 2011. [16] A. Molina-Markham, P. Shenoy, K. Fu, E. Cecchet, and D. Irwin, “Private Memoirs of a Smart Meter,” Proceedings of the 2nd ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Building, pp. 61–66, 2010. [17] D. Zhou, M. Balandat, and C. Tomlin, “A Bayesian Perspective on Residential Demand Response Using Smart Meter Data,” 54th Allerton Conference on Communication, Control, and Computing, 2016. [18] H. Allcott, “Rethinking Real-Time Electricity Pricing,” Resource and Energy Economics, vol. 33, no. 4, pp. 820–842, 2011. [19] K. K. Jessoe, D. L. Miller, and D. S. Rapson, “Can High-Frequency Data and Non-Experimental Research Designs Recover Causal Effects?” Working Paper, 2015. [20] “California Irrigation Management Information System,” 2017. [21] T. Vincenty, “Geodetic Inverse Solution Between Antipodal Points,” Tech. Rep., 1975. [22] M. S. Nikulin, “Hellinger distance,” ”http://www.encyclopediaofmath. org/index.php?title=Hellinger distance&oldid=16453”. [23] D. B. Rubin, “Estimating Causal Effects of Treatments in Randomized and Non-Randomized Studies,” Journal of Educational Psychology, vol. 66, no. 5, pp. 688–701, 1974. [24] J.-S. Pischke and J. D. Angrist, Mostly Harmless Econometrics, 1st ed. Princeton University Press, 2009. [25] P. R. Rosenbaum and D. B. Rubin, “The Central Role of the Propensity Score in Observational Studies for Causal Effects,” Biometrika, vol. 70, no. 1, pp. 41–55, 1983. [26] P. W. Holland, “Statistics and Causal Inference,” Journal of the American Statistical Association, vol. 81, no. 396, pp. 945–960, 1986. [27] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning. Springer New York, 2009. [28] L. Breiman, J. Friedman, C. Stone, and R. A. Olshen, “Classification and Regression Trees,” CRC Press, 1984. [29] M. Balandat, “New Tools for Econometric Analysis of HighFrequency Time Series Data - Application to Demand-Side Management in Electricity Markets,” University of California, Berkeley, PhD Dissertation, 2016. [30] B. Efron and R. J. Tibshirani, An Introduction to the Bootstrap. CRC Press, 1994. A PPENDIX A. Summary Statistics Figures 9-12 illustrate the distribution of the number of DR events received among users with completed Phase 1, as well as the total number of DR events broken out by hour of the day, day of the week, and month of the year. Number of Phase 1 DR Events Across Completed Phase 1 Users 2000 Number of Users The fact that the estimates obtained from both approaches are close to each other is encouraging, as our non-experimental framework permits to go a step further compared to the experimental method in that it allows for an estimation of individual treatment effects. From an economic perspective, being able to differentiate low from high responders allows for an adaptive targeting scheme, whose goal is to minimize the total payout to users while maximizing total reductions. We utilize this fact to achieve an increase of the reduction-per-reward ratio of 30%. Lastly, we emphasize that our non-experimental estimation framework presented in this paper has to potential to generalize to similar human-in-the-loop cyber-physical systems that require the incentivization of users to achieve a desired objective. This is because our non-experimental framework, whose techniques are general rather than specific to Demand Response, admits results on an individual user level, which could be of particular interest in the incentivization of users in transportation or financial systems. Future work includes the analysis of adversarial user behavior (baseline gaming) and advanced effects including peer and network effects influencing Demand Response. Also, we intend to investigate the effect of moral suasion and other non-monetary incentives on the reduction of electricity consumption of residential households. 1500 1000 25.14 500 0 0 5 10 15 20 25 30 Number of Messages Fig. 9: Distribution of Number of Phase 1 DR Events Across Users with Completed Phase 1 B. Balance Checks Table VI provides the balance metrics introduced in Section II-D. Total Number of DR Dispatches by Hour of Day Count 30000 20000 10000 0 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Hour of Day Fig. 10: Distribution of DR Events by Hour of the Day Across Users with Completed Phase 1 Total Number of DR Dispatches in Phase 1 by Day of the Week Number of Users 20000 15000 10000 5000 0 TABLE VI: Balance Checks for Users in Control and Treatment Group Monday Tuesday Wednesday Thursday Friday Saturday Sunday Day of the Week Fig. 11: Distribution of DR Events by Day of the Week Across Users with Completed Phase 1 C. Fixed Effects Regression Tables Tables VII-IX provide the results of the Fixed Effects Regressions presented in Section V. The point estimates of interest are printed in boldface and are accompanied by the standard errors as well as their 95% confidence intervals. The t-value of the regression gives rise to the p-value, where we use (∗), (∗∗), (∗ ∗ ∗) to denote statistical significance at the 90%, 95%, 99% confidence level, respectively. D. Comparison of Estimation Methods Figure 8 visually compares the ATEs broken out by incentive level, and it can be seen that both methods produce similar estimates. Figure 13 does the same for month of the year. Agreeing with intuition, the reductions are notably larger in summer months compared to winter periods. Conditional on the automation status, Table IX states that the reductions are −0.331 and −0.103 kWh for automated and non-automated users, respectively, compared to −0.332 and −0.121 kWh calculated by the non-experimental case. These values are close to each other. Lastly, no significant difference in the magnitude of reductions can be found between encouraged and non-encouraged users. E. Correlation of Temperature and ITE As mentioned in the previous subsection, larger reductions are estimated in warm summer months. To test the hypothesis Total Number of DR Dispatches by Month of Year Count 40000 30000 20000 10000 0 Balance Metrics for Control and Treatment Group Cohen’s D Hellinger Dist. Diff. Mean kWh, HoD = 13 0.023 0.002 0.022 kWh, HoD = 14 0.026 0.002 0.026 kWh, HoD = 15 0.017 0.002 0.017 kWh, HoD = 16 0.006 0.002 0.006 kWh, HoD = 17 0.002 0.002 0.002 kWh, HoD = 18 0.002 0.002 −0.007 kWh, HoD = 19 0.002 0.002 −0.010 kWh, HoD = 20 0.002 0.002 −0.008 air temp, HoD = 13 0.013 0.005 0.032 0.013 0.005 0.032 air temp, HoD = 14 air temp, HoD = 15 0.015 0.005 0.038 air temp, HoD = 16 0.015 0.005 0.039 0.016 0.004 0.041 air temp, HoD = 17 air temp, HoD = 18 0.016 0.003 0.041 air temp, HoD = 19 0.018 0.003 0.043 0.018 0.002 0.042 air temp, HoD = 20 # historical obs. (hours) 4.632 0.037 303.7 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Month of Year Fig. 12: Distribution of DR Events by Month of the Year Across Users with Completed Phase 1 Effect of DR by Incentive Level on Electricity Consumption Estimate t-Value 95% Conf. Int. p-value (Std. Err.) -0.006 is treatit -2.100 [-0.013, 0] 0.047∗∗ (0.003) 0.879 88.89 [0.859, 0.900] <0.001∗∗∗ BLit (0.010) 0.0205 Tit 10.79 [0.017, 0.024] <0.001∗∗∗ (0.002) 1(is DRit , -0.120 -8.532 [-0.148, -0.091] <0.001∗∗∗ rit = 0.05) (0.014) -0.121 1(is DRit , -6.910 [-0.157, -0.085] <0.001∗∗∗ rit = 0.25) (0.018) 1(is DRit , -0.115 -7.369 [-0.147, -0.083] <0.001∗∗∗ rit = 0.50) (0.016) 1(is DRit , -0.124 -6.219 [-0.166, -0.083] <0.001∗∗∗ rit = 1.00) (0.020) 1(is DRit , -0.136 -12.95 [-0.157, -0.114] <0.001∗∗∗ rit = 3.00) (0.010) Parameter TABLE VII: Fixed Effect Regression Results by Incentive Level Effect of DR by Month Estimate Parameter (Std. Err.) -0.007 is treatit (0.003) 0.879 BLit (0.016) 0.021 Tit (0.006) -0.041 1(is DRit , MoYit = 1) (0.010) 1(is DRit , -0.022 MoYit = 2) (0.009) 1(is DRit , -0.076 MoYit = 3) (0.004) 1(is DRit , -0.062 MoYit = 4) (0.004) 1(is DRit , -0.094 MoYit = 5) (0.005) 1(is DRit , -0.155 MoYit = 6) (0.008) 1(is DRit , -0.227 MoYit = 7) (0.007) 1(is DRit , -0.159 MoYit = 8) (0.008) 1(is DRit , -0.179 MoYit = 9) (0.014) 1(is DRit , -0.029 MoYit = 11) (0.009) 1(is DRit , -0.022 MoYit = 12) (0.010) of Year on Electricity Consumption t-Value 95% Conf. Int. p-value -1.962 [-0.014, 0.001] 0.078∗ 55.52 [0.844, 0.915] <0.001∗∗∗ 3.326 [0.007, 0.034] 0.008∗∗∗ -4.298 [-0.063, -0.020] 0.002∗∗∗ -2.571 [-0.041, -0.003] 0.028∗∗ -18.62 [-0.085, -0.067] 0.002∗∗∗ -15.14 [-0.071, -0.053] <0.001∗∗∗ -20.07 [-0.104, -0.083] <0.001∗∗∗ -20.25 [-0.172, -0.138] <0.001∗∗∗ -32.68 [-0.242, -0.211] <0.001∗∗∗ -19.39 [-0.177, -0.141] <0.001∗∗∗ -9.071 [-0.218, -0.142] <0.001∗∗∗ -3.055 [-0.050, -0.008] 0.012∗∗ -2.172 [-0.045, 0.001] 0.055∗ TABLE VIII: Fixed Effect Regression Results by Month of Year Estimated Reductions [kWh] and 95% Confidence Intervals Electricity Consumption 95% Conf. Int. p-value [-0.013, 0] 0.047∗∗ [0.859, 0.900] <0.001∗∗∗ [0.017, 0.024] <0.001∗∗∗ [-0.418, -0.243] <0.001∗∗∗ [-0.132, -0.074] <0.001∗∗∗ Reductions [kWh] Effect of Home Automation on Estimate t-Value Parameter (Std. Err.) -0.006 is treatit -2.101 (0.003) 0.879 88.94 BLit (0.010) 0.021 Tit 10.79 (0.002) -0.331 1(is DRit , -7.800 is autoit ) (0.042) 1(is DRit , -0.103 -7.310 ¬is autoit ) (0.014) −0.10 −0.15 ITE Estimates FE Regression −0.20 1 2 3 4 5 6 7 8 9 10 11 12 Month of the Year Fig. 13: CATEs by Month of Year with Confidence Intervals, Comparison Fixed Effects Estimators and Non-Experimental Estimators Correlation between Temperature and Individual Treatment Effects TABLE IX: Fixed Effect Regression Results by Automation Status 0.0 Estimated ITE [kWh] Effect of Automation Uptake Incentive on Electricity Consumption Estimate Parameter t-Value 95% Conf. Int. p-value (Std. Err.) -0.005 is encit -1.422 [-0.012, 0.002] 0.168 (0.003) -0.008 is nonencit -2.485 [-0.015, -0.001] 0.021∗∗ (0.003) 0.9366 38.38 [0.886, 0.987] <0.001∗∗∗ BLit (0.024) 0.0206 Tit 10.794 [0.017, 0.024] <0.001∗∗∗ (0.002) 1(is DRit , -0.121 -7.703 [-0.153, -0.088] <0.001∗∗∗ is encit ) (0.016) 1(is DRit , -0.125 -8.304 [-0.156, -0.094] <0.001∗∗∗ is nonencit ) (0.015) 0.00 −0.05 −0.5 −1.0 −1.5 Zero Estimated Slope 5 10 15 20 25 30 35 40 Mean Temperature [◦C] Fig. 14: Correlation between Average Ambient Air Temperature and ITEs. CATT [kWh] by Location, RF TABLE X: Fixed Effect Regression Results by Automation Uptake Encouragement whether or not there exists such a correlation, Figure 14 scatter plots estimated ITEs as a function of the average ambient air temperature observed during the relevant DR events. We can notice a notable positive correlation of ambient air temperature and the magnitude of reductions. Indeed, a subsequent hypothesis test with the null being a zero slope is rejected with a p-value of less than 1e − 9. To support this notion, we marginalize ITEs for each ZIP code to obtain the geographic distribution of CATEs by location, see Figure 15, and it is visually striking that users in coastal areas in California show smaller reductions than users in the Central Valley, where the climate is hotter. 0 −10−2 −10−1 −100 Fig. 15: Correlation between Average Ambient Air Temperature and CATEs.
3cs.SY
arXiv:1702.01271v1 [math.GR] 4 Feb 2017 FINITE ORDER ELEMENTS IN THE INTEGRAL SYMPLECTIC GROUP KUMAR BALASUBRAMANIAN, M. RAM MURTY, AND KARAM DEO SHANKHADHAR Abstract For g ∈ N, let G = Sp(2g, Z) be the integral symplectic group and S(g) be the set of all positive integers which can occur as the order of an element in G. In this paper, we show that S(g) is a bounded subset of R for all positive integers g. We also study the growth of the functions f (g) = |S(g)|, and h(g) = max{m ∈ N | m ∈ S(g)} and show that they have at least exponential growth. 1. Introduction Given a group G and a positive integer m ∈ N, it is natural to ask if there exists k 6= 1 ∈ G such that o(k) = m, where o(k) denotes the order of the element k ∈ G. In this paper, we make some observations about the collection of positive integers which can occur as orders of elements in G = Sp(2g, Z). Before we proceed further we set up some notation and briefly mention the problems studied in this paper. Let G = Sp(2g, Z) be the group of all 2g × 2g matrices with integral entries satisfying A⊤ JA = J where A⊤ is the transpose of the matrix A and J = Ç å 0g Ig . −Ig 0g Throughout we write m = pα1 1 . . . pαk k , where pi is a prime and αi > 0 for all i ∈ {1, 2, . . . , k}. We also assume that the primes pi are such that pi < pi+1 for 1 ≤ i < k. We write π(x) for the number of primes less than or equal to x. Also for A ∈ G we let o(A) denote the order of A. We let φ denote the Euler’s phi function. It is a well known fact that the function φ is multiplicative, i.e., φ(mn) = φ(m)φ(n) if m, n are relatively prime and Research of Kumar Balasubramanian was supported by DST-SERB Grant: YSS/2014/000806. Research of M. Ram Murty was partially supported by an NSERC Discovery grant. 1 satisfies φ(pα ) = pα (1 − 1p ) for all primes p and positive integer α ∈ N (see [2] for a proof). Let S(g) = {m ∈ N | ∃ A 6= 1 ∈ G with o(A) = m}. In this paper we show that S(g) is always a bounded subset of R for all positive integers g. Once we know that S(g) is a bounded set, it makes sense to consider the functions f (g) = |S(g)|, where |S(g)| is the cardinality of S(g) and h(g) = max{m | m ∈ S(g)}, i.e., h(g) is the maximal possible (finite) order in G = Sp(2g, Z). We show that the functions f and h have at least exponential growth. The above problem derives its motivation from analogous problems from the theory of mapping class groups of a surface of genus g. We know that given a surface Sg of genus g, there is a surjective homomorphism ψ : Mod(Sg ) → Sp(2g, Z), where Mod(Sg ) is the mapping class group of Sg . It is a well known fact that for f ∈ Mod(Sg ) (f 6= 1) of finite order, we have ψ(f ) 6= 1. Let S̃(g) = {m ∈ N | ∃f 6= 1 ∈ Mod(Sg ) with o(f ) = m}. The set S̃(g) is a finite set and it makes sense to consider the functions f˜(g) = |S̃(g)| and h̃(g) = max{m ∈ N | m ∈ S̃(g)}. It is a well known fact that both these functions f˜ and h̃ are bounded above by 4g + 2. We refer the reader to [5] for an excellent introduction to the mapping class group and the proofs of some of these facts. 2. Some results we need In this section we mention a few results that we need in order to prove the main results in this paper. Proposition 2.1 (Bürgisser). Let m = pα1 1 . . . pαk k , where the primes pi satisfy pi < pi+1 for 1 ≤ i < k and where αi ≥ 1 for 1 ≤ i ≤ k. There exists a matrix A ∈ Sp(2g, Z) of order m if and only if a) k X b) k X i=2 i=1 φ(pαi i ) ≤ 2g, if m ≡ 2(mod 4). φ(pαi i ) ≤ 2g, if m 6≡ 2(mod 4). Proof. See corollary 2 in [1] for a proof.  Proposition 2.2 (Dusart). Let p1 , p2 , . . . , pn be the first n primes. For n ≥ 9, we have 1 p1 + p2 + · · · + pn < npn . 2 2 Proof. See theorem 1.14 in [3] for a proof. Proposition 2.3 (Dusart). For x ≥ 2, π(x) ≤ x ≥ 599, π(x) ≥ x log x Ç 1+ 1 log x å  x log x Ç 1+ 1.2762 log x å . For . Proof. See theorem 6.9 in [4] for a proof.  Proposition 2.4 (Dusart). For x ≥ 2973, Y p≤x Ç 1 1− p å e−γ 0.2 . > 1− log x (log x)2 Ç å where γ is the Euler’s constant. Proof. See theorem 6.12 in [4] for a proof. Proposition 2.5 (Rosser). For x ≥ 55, we have π(x) >  x log x+2 . Proof. See theorem 29 in [6] for a proof.  3. Main Results In this section we prove the main results of this paper. To be more precise, we prove the following. a) S(g) is a bounded subset of R. b) f (g) = |S(g)| has at least exponential growth. c) h(g) = max{m | m ∈ S(g)} has at least exponential growth. 3.0.1. Boundedness of S(g). For each g ∈ N, let S(g) = {m ∈ N | ∃ A 6= 1 ∈ G with o(A) = m}. In this section we show that S(g) is a bounded subset of R. Let m = pα1 1 . . . pαk k ∈ S(g). Suppose pi > 2g+1 for some i ∈ {1, 2, . . . , k}. This would imply that φ(pαi i ) = pαi i −1 (pi −1) > 2g, which contradicts proposition 2.1. It follows that all primes in the factorization of m should be ≤ 2g + 1 and hence k ≤ g + 1. Theorem 3.1. For g ∈ N, S(g) is a bounded subset of R. Proof. For g ∈ N, fix k = π(2g + 1) and P = {p1 , p2 , . . . , pk } be the set of first k primes arranged in increasing order. The prime factorization of any m ∈ S(g) involves primes only from the set P . The total number of nonempty subsets of P is 2k − 1. Let us denote the collection of these subsets 3 of P as {P1 , P2 , . . . P2k −1 }. For 1 ≤ a ≤ 2k − 1, let Pa denote the subset {q1 , q2 , . . . , qn } of P , where n = n(Pa ) is the number of primes in the subset Pa . For a fixed a (and hence fixed Pa ), define ma = ma (α1 , . . . , αn ) = q1α1 q2α2 . . . qnαn , ra = ra (α1 , . . . , αn ) = n X qiαi i=1 Ç å 1 , 1− qi where αi > 0. The key idea of the proof is to maximize the function ma considered as a function of the real variables (α1 , α2 , . . . αn ) with respect to the inequality constraint ra ≤ 2g + 1. We let Ma denote this maximum. Using the Lagrange multiplier method we see that the function ma attains α the maximum Ma precisely when qiαi (1− q1i ) = qj j (1− q1j ) for all 1 ≤ i, j ≤ n. Under the above condition, the constraint ra ≤ 2g + 1 gives us qiαi (1 − q1i ) ≤ 2g+1 n , for any 1 ≤ i ≤ n. Now ma (α1 , α2 , . . . αn ) = q1α1 1 − Ä 1 q1 ä q2α2 1 − Ä n Y i=1 Ç 1 q2 ä Ä . . . qnαn 1 − 1 1− qi å From this it follows that for 1 ≤ a ≤ 2k − 1, Ma = Ç q1α1 n Y i=1 Ä 1− Ç ä 1 q1 1 1− qi ån å ≤ Ç k Y i=1 2g+1 n Ç 1 1− pi Therefore, for m ∈ S(g), we have m≤ ≤ max Ma max Ç 1≤a≤2k −1 1≤a≤2k −1 k Y i=1 ≤ e k Y i=1 Ç Ç 2g+1 n 1 1− pi 2g+1 e 1 1− pi 4 å ån å ån å. 1 qn ä . In the above computation, we have used the fact that for x > 0, Ç 2g+1 x åx attains the maximum when x = (2g + 1)/e. Observing that k Y i=1 Ç 1 1− pi å Ç åπ(2g+1)−2 12 4 ≥ 23 5 π(2g+1)−2 m ≤ 3(5/4) e 2g+1 e Ä ≤ 3e Corollary 3.2. For g ∈ N, f (g) ≤ h(g) ≤ , we have ä 2g+1 +g−1 e ≤ 3e3g .  3e3g . Proof. For m ∈ S(g), we have m ≤ 3e3g . The result follows.  Remark 3.3. Upper bound for S(g) for g ≥ 1486: The bound obtained in theorem 3.1 is an absolute upper bound for S(g). For g ≥ 1486 , we can improve the above upper bound as follows: Using proposition 2.4, we get k Y i=1 Ç 1 1− pi å > 1 e−γ . 2 log(2g + 1) Therefore it follows that for m ∈ S(g), we have m≤ e k Y i=1 Ç 2g+1 e 1 1− pi γ å ≤ 2e log(2g + 1)e 2g+1 e . 3.0.2. Growth of f (g) and h(g). In the previous section, we computed an upper bound for the functions f (g) and h(g). In this section we show that f (g) and h(g) have at least exponential growth. Lemma 3.4. For x ≥ 23, we have 1 p < xπ(x) 2 p≤x X where the sum is over all primes p ≤ x. Proof. Let n be such that pn ≤ x < pn+1 , where pn denotes the nth prime number. It follows from proposition 2.2, that for x ≥ 23, we have X X 1 1 p < npn ≤ π(x)x. p= 2 2 p≤p p≤x n  Before we proceed further, we set up some notation which we need in the following results. Let K(≥ e) ∈ N be such that for √ K log K ≥ 23. 5 » Lemma 3.5. For g ≥ K, π( g log(g)) < Proof. For y > 1, we have π(y) < y log(y) Ç √ 3 g log(g) log(g log(g)) . 1+ 3 2 log(y) å (see proposition 2.3). Using this estimate we get, » π( g log(g)) < » g log(g) » log( g log(g)) Ç 1+ 3 » 2 log( g log(g)) å Ç å √ g log g 3 √ 1+ ≤ 2 log 23 log( g log g) » 3 g log(g) . = log(g log(g))  Lemma 3.6. Let x = we have m ∈ S(g). » Y g log(g) and m = m(g) = p≤x p. Then for g ≥ K, Proof. By proposition 2.1, it is enough to show that β = X (p − 1) ≤ 2g. 26=p≤x Using lemma 3.4 and lemma 3.5 , we have β< X p< p≤x < » 1 » ( g log(g))π( g log(g)) 2 3 3 g log(g) = g. 2 log(g log(g)) 2  » For g ≥ K, let A(g) = {p ∈ N | p ≤ g log(g)} and m = m(g) be as above. If d is any divisor of m, then it is easy to see that d ∈ S(g). Also it is clear that the divisors d of m are in bijection with the number of subsets of A(g). Since any divisor d of m is an element in S(g) and the number of divisors correspond √ bijectively with subsets of A(g), π( g log(g)) (since number of subsets of it follows that √ f (g) = |S(g)| ≥ 2 π( g log(g)) A(g) = 2 ). 1 4 » g log(g) from which it follows that the We will now show that |S(g)| > e function f (g) = |S(g)| has at least exponential growth. 6 Theorem 3.7. Let L ∈ N such that » 1 e4 g log(g) √ L log L ≥ 55. Then f (g) = |S(g)| > for all g ≥ L. Proof. From proposition 2.5, we have for all g ≥ L, » » g log(g) < π( g log(g)). log(g log(g)) From this it follows that for all g ≥ L, we have √ π( f (g) ≥ 2 g log(g)) √ >2 g log(g) log(g log(g)) >2 1 2 » g log(g) >e 1 4 » g log(g) .  Corollary 3.8. Let L ∈ N be as in the above theorem. Then h(g) > » 1 e4 g log(g) for all g ≥ L. Proof. Since h(g) ≥ f (g), the result follows.  Remark For g log g ≥ (599)2 , we can improve the above lower bound p g 3.9. p g 1 e 4 log g to e 4 log g by using proposition 2.3. References 1. B. Bürgisser, Elements of finite order in symplectic groups, Arch. Math. (Basel) 39 (1982), no. 6, 501–509. MR 690470 (85b:20062) 2. David M. Burton, Elementary number theory, Allyn and Bacon Inc., Boston, Mass., 1980, Revised printing. MR 567137 (81c:10001b) 3. Pierre Dusart, Autour de la fonction qui compte le nombre de nombres premiers, Thesis (1998). 4. , Estimates of some functions over primes without R.H., arxiv:1002.0442v1. 5. Benson Farb and Dan Margalit, A primer on mapping class groups, Princeton Mathematical Series, vol. 49, Princeton University Press, Princeton, NJ, 2012. MR 2850125 6. Barkley Rosser, Explicit bounds for some functions of prime numbers, Amer. J. Math. 63 (1941), 211–232. MR 0003018 Kumar Balasubramanian, Department of Mathematics, IISER Bhopal, Bhopal, Madhya Pradesh 462066, India E-mail address: [email protected] M. Ram Murty, Department of Mathematics and Statistics, Queens University, Kingston, Ontario K7L 3N6, Canada E-mail address: [email protected] Karam Deo Shankhadhar, Department of Mathematics, IISER Bhopal, Bhopal, Madhya Pradesh 462066, India E-mail address: [email protected] 7
4math.GR
Unsupervised Gene Expression Data using Enhanced Clustering Method T.Chandrasekhar K.Thangavel E.Elayaraja E.N.Sathishkumar Dept. of Computer Science Periyar University Salem, India [email protected] Dept. of Computer Science Periyar University Salem, India [email protected] Dept. of Computer Science Periyar University Salem, India [email protected] Dept. of Computer Science Periyar University Salem, India [email protected] Abstract—Microarrays are made it possible to simultaneously monitor the expression profiles of thousands of genes under various experimental conditions. Identification of co-expressed genes and coherent patterns is the central goal in microarray or gene expression data analysis and is an important task in bioinformatics research. Feature selection is a process to select features which are more informative. It is one of the important steps in knowledge discovery. The problem is that not all features are important. Some of the features may be redundant, and others may be irrelevant and noisy. In this work the unsupervised Gene selection method and Enhanced Center Initialization Algorithm (ECIA) with K-Means algorithms have been applied for clustering of Gene Expression Data. This proposed clustering algorithm overcomes the drawbacks in terms of specifying the optimal number of clusters and initialization of good cluster centroids. Gene Expression Data show that could identify compact clusters with performs well in terms of the Silhouette Coefficients cluster measure. Keywords—Clustering; Unsupervised Feature Selection; ECIA; K-Means; Gene expression data I. INTRODUCTION Mining microarray gene expression data is an important research topic in bioinformatics with broad applications. Microarray technologies are powerful techniques for simultaneously monitoring the expression of thousands of genes under different sets of conditions. Gene expression data can be analyzed in two ways: unsupervised and supervised analysis. In supervised analysis, information about the structure/groupings of the object is assumed known or at least partially known. This prior knowledge is used in analysis process. In unsupervised analysis, prior knowledge is unknown. Clustering of gene expression data can be divided into two main categories: Gene-based clustering and Sample-based clustering. In gene based clustering, genes are treated as objects and samples are features or attributes for clustering. The goal of gene-based clustering is to identify differentially expressed genes and sets of genes or conditions with similar expression pattern or profiles, and to generate a list of expression measurements. In Sample based clustering, samples are treated as objects and genes are features for clustering. Sample based clustering can be used to reveal the phenotype structure or substructure of samples. Applying the conventional clustering methods to cluster samples using all the genes as features may degrade the quality and reliability of clustering results. Clustering has been used in a number of applications such as engineering, biology, medicine and data mining. Cluster analysis of gene expression data has proved to be a useful tool for identifying co-expressed genes. DNA microarrays are emerged as the leading technology to measure gene expression levels primarily, because of their high throughput. Results from these experiments are usually presented in the form of a data matrix in which rows represent genes and columns represent conditions or samples [13]. Each entry in the matrix is a measure of the expression level of a particular gene under a specific condition. Analysis of these data sets reveals genes of unknown functions and the discovery of functional relationships between genes [19]. Co-expressed genes can be grouped into clusters based on their expression patterns of gene based clustering and Sample based clustering. In gene based clustering, the genes are treated as the objects, while the samples are the features. In sample based clustering, the samples can be partitioned into homogeneous groups where the genes are regarded as features and the samples as objects [20]. Discriminant analysis is now widely used in bioinformatics, such as distinguishing cancer tissues from normal tissues or one cancer subtype vs. another [4]. A critical issue in discriminant analysis is feature selection: instead of using all available variables (features or attributes) in the data, one selectively chooses a subset of features to be used in the discriminant system. There are number of advantages of feature selection: (1) dimension reduction to reduce the computational cost; (2) reduction of noise to improve the classification accuracy; (3) more interpretable features or characteristics that can help identify and monitor the target diseases or function types. These advantages are typified in DNA microarray gene expression profiles. Of the tens of thousands of genes in experiments, only a smaller number of them show strong correlation with the targeted phenotypes [4, 17]. The most popular clustering algorithms in microarray gene expression analysis are Hierarchical clustering, K-Means clustering [3], and SOM [9]. Of these K-Means clustering is very simple and fast efficient. Numerous methods have been proposed to solve clustering problem. The most popular clustering methods are K-Means clustering algorithm which is developed by Mac Queen [7]. The K-Means algorithm is effective in producing clusters for many practical applications. But the computational complexity of the original K-Means algorithm is very high, especially for large data sets. The KMeans clustering algorithm is a partitioning clustering method that separates data into K groups. For the real life problems, the suitable number of clusters cannot be predicted. To overcome the above drawback the current research focused on developing the clustering algorithms without giving the initial number of clusters [2, 3, 5]. This paper is organized as follows. Section 2 presents and overview of Gene based clustering Techniques. Section 3 describes the Unsupervised Clustering algorithms. Section 4 describes performance of Experimental analysis and discussion. Section 5 conclusion and future work. II. GENE BASED CLUSTERING TECHNIQUES The purpose of clustering gene expression data is to reveal the natural structure inherent data and extracting useful information from noisy data. The two class cancer subtype classification problem, 50 informative genes are usually sufficient. There are studies suggesting that only a few genes are sufficient [4]. Thus, computation is reduced while prediction accuracy is increased via effective feature selection. When a small number of genes are selected, their biological relationship with the target diseases is more easily identified. These "marker" genes provide additional scientific understanding of the problem [8]. Selecting an effective and more representative feature set is the subject of this paper. A. Analysis the Data The gene expression data is min-max normalization by setting min 0 and max 1. Min-max normalization performs a linear transformation on the original data. Suppose that min A and maxA are the minimum and maximum values of an attribute A. Min-max normalization maps a value of A to 𝑣 in the range [new_minA, new_ maxA] by computing 𝑣′ = 𝑣 − 𝑚𝑖𝑛𝐴 𝑛𝑒𝑤_𝑚𝑎𝑥𝐴 − 𝑛𝑒𝑤_𝑚𝑖𝑛𝐴 + 𝑛𝑒𝑤_𝑚𝑖𝑛𝐴 𝑚𝑎𝑥𝐴 − 𝑚𝑖𝑛𝐴 Min-max normalization preserves the relationships among the original data values. It will encounter an “out-of-bounds” error if a future input case for normalization falls outside of the original data range for A. After the normalization of discretized value of gene gi at condition, tj is given the Gene Expression Data are normalizes then run on the discretized data. Discretization is then performed on this normalized expression data. The discretization is done as follows [4]. i. The discretized value of gene gi at condition, t1 (i.e., the first condition) g 𝑖 ,𝑡 1 = 1 𝑖𝑓 𝜀g 𝑖,𝑡 𝑗 > 0 0 𝑖𝑓 𝜀g 𝑖 ,𝑡 1 = 0 −1 𝑖𝑓 𝜀g 𝑖 ,𝑡 1 < 0 ii. The discretized values of gene gi at conditions tj (j = 1, 2, …, T − 1) i.e., at the rest of the conditions (T − {t1}) g 𝑖 ,𝑡 𝑗 +1 = 1 𝑖𝑓 𝜀g 𝑖, 𝑡 𝑗 < 𝜀g 𝑖 ,𝑡 𝑗 +1 0 𝑖𝑓 𝜀g 𝑖 ,𝑡 𝑗 = 𝜀g 𝑖 ,𝑡 𝑗 +1 −1 𝑖𝑓 𝜀g 𝑖 ,𝑡 𝑗 > 𝜀g 𝑖 ,𝑡 𝑗 +1 Where gi, tj is the discretized value of gene gi at conditions tj (j = 1, 2, …, T − 1). The expression value of gene gi at condition tj is given by g i, tj. We see in the above computation that the first condition, t 1, is treated as a special case and its discretized value is directly based on gi, t1 i.e., the expression value at condition t1. For the rest of the conditions the discretized value is calculated by comparing its expression value with that of the previous value. This helps in finding whether the gene is up 1 or down -1 regulated at that particular condition. Each gene will now have a regulation pattern of 0, 1, and -1 across the conditions or time points. This pattern is represented as a string. B. Unsupervised Gene Selection Gene selection is an important problem in the research of Gene expression data analysis. In some cases, too many redundant or missing values are there in gene expression data. In this section, an existing works of Velayutham and Thangavel et al proposed an algorithm of unsupervised feature selection (Unsupervised Quick Reduct algorithms) [21] is applied. This method is based on dependency measure using rough set theory. Rough set theory can be regarded as a new mathematical tool for imperfect data analysis. The theory has found applications in many domains. Objects characterized by the same information are indiscernible (similar) in view of the available information about them. The indiscernibility relation generated in this way is the mathematical basis of rough set theory. Any set of all indiscernible (similar) objects is called an elementary set, and forms a basic granule (atom) of knowledge about the universe [17, 24]. Any union of some elementary sets is referred to as a crisp (precise) set – otherwise the set is rough (imprecise, vague). Rough set is a pair of precise sets, called the lower and the upper approximation of the rough set, and is associated. The lower approximation consists of all objects which surely belong to the set and the upper approximation contains all objects which possibly belong to the set. The difference between the upper and the lower approximation constitutes the boundary region of the rough set. From a data table are called columns of which are labeled by attributes, rows – by objects of interest and entries of the table are attribute values. In data mining applications, decision class labels are often unknown or incomplete. In this situation the unsupervised feature selection is play vital role to select features. C. Unsupervised Quick Reduct Algorithm[21] The USQR algorithm attempts to calculate a reduct without exhaustively generating all possible subsets. It starts off with an empty set and adds in turn, one at a time, those attributes that result in the greatest increase in the rough set dependency metric, until this produces its maximum possible value for the dataset. According to the algorithm, the mean dependency of each attribute subset is calculated and the best candidate is chosen: γ𝑅 𝑎 = 𝑃𝑂𝑆𝑅 (𝑎) , ∀𝑎 ∈ 𝐴 𝑈 Where R is a reduct if and only if K ∀𝑥 𝑅, 𝐾𝑥 𝑎 𝐾𝑐( 𝑎 ) R ({a})=K c ({a}) and Algorithm 1: The USQR algorithm USQR (C) C, the set of all conditional features; (1) R ← {} (2) do (3) T← R (4) ∀ x ∈ (C-R) (5) ∀ y ∈ C (6) γR∪{x} y = POS R ∪{x } (y) U (7) if γR∪{x} y , ∀ y ∈ C > γT y , ∀ y ∈ C (8) T ← R∪{x} (9) R ← T (10) until γR y , ∀ y ∈ C = γC y , ∀ y ∈ C (11) return R III. UNSUPERVISED CLUSTERING ALGORITHMS The reduced data selected by the gene selection algorithm USQR are clustered by using the K-Means algorithms. A. K-Means Clustering The main objective in cluster analysis is to group objects that are similar in one cluster and separate objects that are dissimilar by assigning them to different clusters. One of the most popular clustering methods is K-Means clustering algorithm [3, 9, 12]. It is classifies objects to a pre-defined number of clusters, which is given by the user (assume K clusters). The idea is to choose random cluster centers, one for each cluster. These centers are preferred to be as far as possible from each other. In this algorithm mostly Euclidean distance is used to find distance between data points and centroids [6, 13, 22]. The Euclidean distance between two multi-dimensional data points X = (x1, x2, x3, ..., xm) and Y = (y1, y2, y3, ..., ym) is described as follows D(X, Y) = (𝑥1 − 𝑦1 )2 + (𝑥2 − 𝑦2 )2 + ⋯ + (𝑥𝑚 − 𝑦𝑚 )2 The K-Means method aims to minimize the sum of squared distances between all points and the cluster centre. This procedure consists of the following steps, as described below. Algorithm 2: K-Means clustering algorithm [18] Require: D = {d1, d2, d3, ..., dn } // Set of n data points. K - Number of desired clusters Ensure: A set of K clusters. Steps: 1. Arbitrarily choose k data points from D as initial centroids; 2. Repeat Assign each point di to the cluster which has the closest centroid; Calculate the new mean for each cluster; Until convergence criteria is met. Though the K-Means algorithm is simple, it has some drawbacks of quality of the final clustering, since it highly depends on the arbitrary selection of the initial centroids[1, 14]. B. The Enhanced method Performance of iterative clustering algorithms which converges to numerous local minima depends highly on initial cluster centers. Generally initial cluster centers are selected randomly. In this section, the cluster centre initialization algorithm is studied to improve the performance of the KMeans algorithm. Algorithm 3: Enhanced Centre Initialization Algorithm (ECIA) [25] Require: D = {d1, d2, d3,..., di,..., dn } // Set of n data points. di = { x1, x2, x3,..., xi,..., xm } // Set of attributes of one data point. k // Number of desired clusters. Ensure: A set of k clusters. Steps: 1. In the given data set D, if the data points contains the both positive and negative attribute values then go to Step 2, otherwise go to step 4. 2. Find the minimum attribute value in the given data set D. 3. For each data point attribute, subtract with the minimum attribute value. 4. For each data point calculate the distance from origin. 5. Sort the distances obtained in step 4. Sort the data points accordance with the distances. 6. Partition the sorted data points into k equal sets. 7. In each set, take the middle point as the initial centroid. 8. Compute the distance between each data point di (1 ≤ i ≤ n) to all the initial centroids cj (1 ≤ j ≤ k). 9. Repeat 10. For each data point di, find the closest centroid cj and assign di to cluster j. 11. Set ClusterId[i]=j. // j:Id of the closest cluster. 12. Set NearestDist[i]= d(di, cj). 13. For each cluster j (1 ≤ j ≤ k), recalculate the centroids. 14. For each data point di, 14.1 Compute its distance from the centroid of the present nearest cluster. 14.2 If this distance is less than or equal to the present nearest distance, the data point stays in the same cluster. Else 14.2.1 For every centroid cj (1≤ j ≤ k) compute the distance d(di, cj). End for; Until convergence criteria is met. IV. EXPERIMENTAL ANALYSIS AND DISCUSSION In this section, we describe the data sets used to analyze the methods studied in sections 2 and 3, which are arranged for the listed in Table 1, number of features/genes are in column wise, and number of items/samples are in row wise [23]. TABLE I. ARRANGE ALL THE GENE EXPRESSION D ATA SETS Samples 1 2 … p Condition attributes(genes) Gene 1 Gene 2 Gene n g(1,1) g(1,2) … g(1,q) g(2,1) g(2,2) … g(2,q) … … … … g(p,1) g(p,2) … g(p,q) 1) Serum data: This data set is described and used in [10]. It can be downloaded from: http://www.sciencemag.org/ feature/ data/ 984559.shl and corresponds to the selection of 517 genes whose expression varies in response to serum concentration inhuman fibroblasts [11]. 2) Yeast data: This data set is downloaded from Gene Expression Omnibus-databases. The Yeast cell cycle dataset contains 2884 genes and 17 conditions. To avoid distortion or biases arising from the presence of missing values in the data matrix we removal all the genes that had any missing value. This step results in a matrix of size 2882 * 17. 3) Simulated data: It is downloaded from http:// www.igbmc.ustrasbg.fr/ projects/fcm/y3c.txt. The set contains 300 Genes [3]. 4) Leukemia data: It is downloaded from the website: http://datam.i2r.a-star.edu.sg/datasets/krbd/. The set contains 7129*34. A. Comparative Analysis The ECIA with K-Means used to clustering in the all data sets after the section 2 as Table 2, the distance measure used here is the Euclidean distance. To access the quality of the clusters, we used the silhouette measure proposed by Rousseeuw [11, 15, 16]. In this method the Initial centroid values taken 7 then run as 10 times running to ECIA with Kmeans clusters data into 7 groups as Table 3. C5 C6 C7 Total Gene 7 6 8 0.301 0.397 0.309 49 C1 C2 C3 C4 0.281 0.325 0.391 19 22 21 67 B. Performance Comparison In this various clusters performance is analysis to best cluster such as compact genes as Fig.1 and table 4. Among four data sets, each one produce compact cluster and provide best genes. 0.8 c1 c2 c3 c4 c5 c6 c7 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 Serum Yeast Simulated Leukemia Fig. 1. Clusters Performance comparison chart for all data sets COMPARATIVE ANALYSIS OF GENE EXPRESSION D ATA Data sets Compact cluster Number of Gene Serum C1 6 Yeast C7 12 Serum 517*17 49*17 Simulated C2 9 Yeast 2884*17 118*17 Leukemia C5 19 Simulated 300*17 67*17 Leukemia 7129*34 142*34 COMPARATIVE ANALYSIS OF GENE EXPRESSION D ATA Serum (49*17) No. Meas of ure Gen value e 6 0.629 7 0.532 6 0.439 9 0.347 Yeast (118*17) No. Meas of ure Gen value e 13 0.621 20 0.597 21 0.584 19 0.471 Simulated (67*17) No. Meas of ure Ge value ne 10 0.314 9 0.428 12 0.278 9 0.291 Leukemia (142*34) No. Meas of ure Gen value e 19 0.391 21 0.301 15 0.401 25 0.321 0.491 0.336 0.418 142 After Unsupervised Gene selection TABLE III. Clust er 118 11 8 8 Before Unsupervised Gene Selection Data sets Data sets COMPARATIVE ANALYSIS TO FILTER OF GENE EXPRESSION DATA 0.421 0.327 0.697 In table 3, the comparative analysis of gene expression data represent genes and measure value of four data sets. The Simulated data set produce high measure value comparing to other three data sets. TABLE IV. TABLE II. 16 17 12 V. CONCLUSION In this work, unsupervised gene selections method USQR was studied and applies to avoid too many redundant or missing values in Microarray gene expression data. In this unsupervised gene selection method is based on unsupervised Feature selection using Rough set methods. These methods are used to get minimum number of random gene data sets and then we use K-Means clustering technique to improve the quality of clusters. One of the demerits of K-Means algorithm is random selection of initial seed point of desired clusters. This was overcome with ECIA for finding the initial centroids to avoid the random selection of initial values. Therefore, the ECIA algorithm is not depending upon any choice of the number of cluster and automatic evaluation of initial seed centroids and it produces different better results. Both the algorithms were tested with gene expression data and analysis the performance of cluster values using silhouette measurement. Therefore, finding solution to select the different centroids as clusters seed points and various measures are used to improve the cluster performance is our future endeavor. [18] [19] [20] REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] M. Fahim, A. M. Salem, F. A. Torkey and M. A. Ramadan, “An Efficient enhanced K-Means clustering algorithm”, journal of Zhejiang University, 10 (7): 1626 - 1633, 2006. Bashar Al-Shboul and Sung-Hyon Myaeng, “Initializing K-Means using Genetic Algorithms”, World Academy of Science, Engineering and Technology 54, 2009. Chen Zhang and Shixiong Xia, “ K-Means Clustering Algorithm with Improved Initial center,” in Second International Workshop on Knowledge Discovery and Data Mining (WKDD), pp. 790-792, 2009. Chris Ding and Hanchuna Peng, “Mininmum Redundancy Feature Selection from Microarray Gene Expression Data”, proceedings of the International Bioinformatic Conference, Date on 11-14, August - 2003. F. Yuan, Z. H. Meng, H. X. Zhangz, C. R. Dong, “ A New Algorithm to Get the Initial Centroids”, proceedings of the 3rdInternational Conference on Machine Learning and Cybernetics, pp. 26-29, August 2004. Chaturvedi J. C. A, Green P, “K - Modes clustering,” Journals of Classification, (18):35–55, 2001. Doulaye Dembele and Philippe Kastner, “Fuzzy C means method for clustering microarray data”, Bioinformatics, vol.19, no.8, pp.973- 980, 2003. Daxin Jiang, Jian Pei, and Aidong Zhang “An Interactive Approach to mining Gene Expression Data”. IEEE Transactions on Knowledge and Data Engineering, vol 17, No.10, pp.1363- 1380, October 2005. Dongxiao Zhu, Alfred O Hero, Hong Cheng, Ritu Khanna and Anand Swaroop, “Network constrained clustering for gene microarray Data”, doi:10.1093 /bioinformatics / bti 655, Vol. 21 no. 21, pp. 4014 – 4020, 2005. Fahim A.M, Salem A. M, Torkey A and Ramadan M. A, “An Efficient enhanced K-Means clustering algorithm”, Journal of Zhejiang University, 10(7):1626–1633, 2006. K Karteeka Pavan, Allam Appa Rao, A V Dattatreya Rao, GR Sridhar, “Automatic Generation of Merge Factor for Clustering Microarray Data”, IJCSNS International Journal of Computer Science and Network Security, Vol.8, No.9, September 2008. Kohei Arai and Ali Ridho Barakbah, “ Hierarchical K-Means: an algorithm for centroids initialization for K-Means”, Reports of the Faculty of Science and Engineering, Saga University, Vol. 36, No.1, 25-31, 2007. K.R De and A. Bhattacharya , “Divisive Correlation Clustering Algorithm (DCCA) for grouping of genes: detecting varying Patterns in expression profiles,” bioinformatics, Vol. 24, pp. 1359-1366, 2008. K. A. Abdul Nazeer and M. P. Sebastian, “Improving the accuracy and efficiency of the K-Means clustering algorithm”, international Conference on Data Mining and Knowledge Engineering (ICDMKE), Proceedings of the World Congress on Engineering (WCE- 2009), London, UK. Vol 1, July 2009. Lletí, R., Ortiz, M.C., Sarabia, L.A., Sánchez, M.S. “Selecting variables for K-Means cluster analysis by using a genetic algorithm that optimises the silhouettes”. Analytica Chimica Acta, 2004. Moh'd Belal Al- Zoubi and Mohammad al Rawi, “An Efficient Approach for Computing Silhouette Coefficients”. Journal of Computer Science 4 (3): 252-255, 2008. T.Chandrasekhar, K.Thangavel and E.N.Sathishkumar, “Verdict Accuracy of Quick Reduct Algorithm using Clustering and [21] [22] [23] [24] [25] Classification techniques for gene expression data”, International Journal of Computer Science Issues, Vol.9, Issue 1, No.1, Jan 2012. Madhu Yedla, Srinivasa Rao Pathakota, T M Srinivasa , “Enhancing KMeans Clustering Algorithm with Improved Initial Center” , Madhu Yedla et al. / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 1 (2), pp121-125, 2010. Sunnyvale, Schena M. “Microarray biochip technology”. CA: Eaton Publishing; 2000. Sauravjoyti Sarmah and Dhruba K. Bhattacharyya. “An Effective Technique for Clustering Incremental Gene expression data”, IJCSI International Journal of Computer Science Issues, Vol. 7, Issue 3, No 3, May 2010. Velayutham.C and Thangavel.K, “Unsupervised Quick Reduct Algorithm Using Rough Set Theory”, Journal of Electronic Science and Technology, vol. 9, no. 3, September 2011 Wei Zhong, Gulsah Altun, Robert Harrison, Phang C. Tai, and Yi Pan, “Improved K-Means Clustering Algorithm for Exploring Local Protein Sequence Motifs Representing Common Structural Property”, IEEE transactions on nano bio science, vol. 4, no. 3, september 2005. Xiaosheng Wang, Osamu Gotoh, “Cancer Classification Using Single Genes”, 20th international conference on Genome informatics(GIW 2009), vol.23, pp 179-188 Dec 14 to 16,2009. Y. Lu, S. Lu, F. Fotouhi, Y. Deng, and S. Brown, “Incremental Genetic K-Means Algorithm and its Application in Gene Expression Data Analysis”, BMC Bioinformatics, 2004. Y. Madhu , Srinivasa Rao Pathakota, T M Srinivasa , “Enhancing KMeans Clustering Algorithm with Improved Initial Center” , Madhu Yedla et al. / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 1 (2), pp121-125, 2010.
5cs.CE
Algorithmica manuscript No. (will be inserted by the editor) Efficiently Correcting Matrix Products arXiv:1602.00435v2 [cs.DS] 18 Aug 2016 Leszek Gasieniec ˛ · Christos Levcopoulos · Andrzej Lingas · Rasmus Pagh · Takeshi Tokuyama Abstract We study the problem of efficiently correcting an erroneous product of two n × n matrices over a ring. Among other things, we provide a randomized algorithm for correcting a matrix product with at most k erroneous entries running in Õ(n2 + kn) time and a deterministic Õ(kn2 )-time algorithm for this problem (where the notation Õ suppresses polylogarithmic terms in n and k). Keywords Matrix multiplication · Matrix product verification · Matrix product correction · Randomized algorithms · Time complexity 1 Introduction Matrix multiplication is a basic operation used in many scientific and engineering applications. There are several potential reasons for erroneous results of computation, in particular erroneous matrix products. They include software bugs, computational errors by logic circuits and bit-flips in memory. Or, if the computation is performed by remote computers or by parallel processors, some errors might be introduced due to faulty communication. A preliminary, short version of this paper with weaker bounds in the randomized setting has appeared in Proceedings of 25th International Symposium on Algorithms and Computation (ISAAC 2014), Lecture Notes in Computer Science, Volume 8889, Jeonju, Korea, December 15-17, 2014. L. Gasieniec ˛ Department of Computer Science, University of Liverpool, Ashton Street, L69 38X, U.K. E-mail: [email protected] C. Levcopoulos · A. Lingas Department of Computer Science, Lund University, 22100 Lund, Sweden. E-mail: [email protected] E-mail: [email protected] R. Pagh Theoretical Computer Science section, IT University of Copenhagen, Denmark E-mail: [email protected] T. Tokuyama Graduate School of Information Sciences, Sendai,Tohoku University, Japan. E-mail: [email protected] 2 L. Gasieniec ˛ et al. In 1977, Freivalds presented a randomized algorithm for verifying if a matrix C 0 is the matrix product of two n × n matrices A and B, running in O(n2 ) time [10]. His algorithm has been up today one of the most popular examples showing the power of randomization. In spite of extensive efforts of the algorithmic community to derandomize this algorithm without substantially increasing its time complexity, one has solely succeeded partially, either decreasing the number of random bits to a logarithmic one [5, 15, 19] or using exponentially large numbers and the unrealistic BSS computational model [16]. One can argue that the latter solutions in different ways hide additional O(n) factors. By the way, if one can use quantum devices then even an O(n5/3 )-time verification of an n × n matrix product over an integral domain is possible [2]. Interestingly, the problem of verifying matrix products over the (min, +) semiring seems to be much harder comparing to that over an arbitrary ring. Namely, it admits a truly subcubic algorithm if and only if there is a truly subcubic algorithm for the all-pairs shortest path problem on weighted digraphs (APSP) [24]. Freivalds’ algorithm has also pioneered a new subarea of the so called certifying algorithms [18]. Their purpose is to provide besides the output a certificate or easy to verify proof that the output is correct. The computational cost of the verification should be substantially lower than that incurred by recomputing the output (perhaps using a different method) from scratch. In 1977, when Freivalds published his algorithm, the asymptotically fastest known algorithm for arithmetic matrix multiplication was that due to Strassen running in O(n2.81 ) time [22]. Since then the asymptotic running time of fast matrix multiplication algorithms has been gradually improved to O(n2.3728639 ) at present [6, 11, 23] which is still substantially super-quadratic. In this paper, we go one step further and consider a more complex problem of not only verifying a computational result but also correcting it if necessary. Similarly as Freivalds, as a subject of our study we choose matrix multiplication. Our approach is very different from that in fault tolerant setting, where one enriches input in order to control the correctness of computation (e.g., by check sums in the so called ABFT method) [8, 26, 27]. Instead, we use here an approach resembling methods from Combinatorial Group Testing where one keeps testing larger groups of items in search for multiple targets, see, e.g. [7, 9]. First, we provide a simple deterministic algorithm for correcting an n × n matrix product C 0 over a ring, with at most one erroneous entry, in O(n2 ) time. It can be regarded as a deterministic version of Freivalds’ algorithm (Section 3). Next, we extend the aforementioned algorithm to include the case when C 0 contains at most k erroneous entries. The extension relies on distributing erroneous entries of C 0 into distinct submatrices by deterministically shuffling the columns of C 0 and correspondingly the columns of B. The resulting deterministic algorithm runs in Õ(k 2 n2 ) time, where the notation Õ suppresses polylogarithmic terms in n and k (Section 4). Then we show how to reduce the time bound to Õ(kn2 ) by applying this shuffling approach first with respect to the columns and then with respect to the rows of C 0 . In the same section, we discuss √ also a slightly randomized version of the aforementioned algorithm running in Õ( kn2 ) expected time using O(log2 k + log k log log n) random bits. Next, in Section 5, we present a faster randomized algorithm for correcting Efficiently Correcting Matrix Products # errors = e ≤ k k=1 k known k=e known k=e unknown k=e known k known deterministic/randomized deterministic deterministic O(log2 k + log k log log n) random bits randomized randomized randomized 3 time complexity O(n2 ) 2 Õ(kn √ ) Õ( kn2 ) expected √ √ √ O((n log n + k min{k, n})n log n) almost √ surely O((n log k + k min{k, n})n) expected O((n + k log k log log k)n log n) almost surely Table 1.1: The characteristics and time performances of the algorithms for correcting an n × n matrix product with at most k erroneous entries presented in this paper. The issue of adapting some of our randomized algorithms to unknown k is discussed in Final Remarks. √ √ √ C 0 in O((n log n + k min{k, n})n log n) time almost surely (i.e., with probability at least 1 − n−α for any constant α ≥ 1), where k is the non-necessarily known number of erroneous entries of C 0 . A slight modification of this algorithm √ runs in O((n log k + k min{k, n})n) expected time provided that the number of erroneous entries is known. This is our fastest algorithm for correcting C 0 when k is very small. Importantly, all our algorithms in Sections 3-5 are combinatorial (thus, they do not rely on the known fast algorithms for matrix multiplication or fast polynomial multiplication) and easy to implement. In Section 6, we present a more advanced algebraic approach based on the compressed matrix multiplication technique from [20]. In effect, we obtain a randomized algorithm for correcting C 0 in O((n + k log k log log k)n log n) time almost surely. Roughly, it asymptotically subsumes the randomized algorithms of Section 5 for k larger than n2/3 and asymptotically matches them up to a polylogarithmic factor for the remaining k. We conclude with Final Remarks, where we discuss how some of our randomized algorithms can be also adjusted to the situation when the number of erroneous entries is unknown. For a summary of our results, see Table 1. 2 Preliminaries Let (U, +, ×) be a semi-ring. For two n-dimensional vectors a = (a0 , ..., an−1 ) and Pn−1 b = (b0 , ..., bn−1 ) with coordinates in U their dot product i=0 ai × bi over the semi-ring is denoted by a b. For an p × q matrix A = (aij ) with entries in U, its i-th row (ai1 , ..., ain ) is denoted by A(i, ∗). Similarly, the j-th column (a1j , ..., anj ) of A is denoted by A(∗, j). Given another q × r matrix B with entries in U, the matrix product A × B of A with B over the semi-ring is a matrix C = (cij ), where cij = A(i, ∗) B(∗, j) for 1 ≤ i, j ≤ n. 4 L. Gasieniec ˛ et al. 3 Correcting a matrix product with a single error Given two matrices A, B of size p × q and q × r, respectively, and their possibly erroneous p × r matrix product C 0 over a ring, Freivalds’ algorithm picks uniformly at random a vector in {0, 1}r and checks if A(BxT ) = C 0 xT , where xT stands for a transpose of x, i.e., the column vector corresponding to x [10]. For i = 1, ..., p, if the i-th row of C 0 contains an erroneous entry, the i-th coordinates of the vectors A(BxT ) and C 0 xT will differ with probability at least 1/2. In the special case, when C 0 contains a single error, we can simply deterministically set x to the vector (1, ..., 1) ∈ {0, 1}r in the aforementioned Freivalds’ test. The vectors A(BxT ), C 0 xT will differ in exactly one coordinate whose number equals the number of the row of C 0 containing the single erroneous entry. (Note that the assumption that there is only one error is crucial here since otherwise two or more errors in a row of C 0 potentially could cancel out their effect so that the dot product of the row with x, which in this case is just the sum of entries in the row, would be correct.) Then, we can simply compute the i-th row of the matrix product of A and B in order to correct C 0 . The time complexity is thus linear with respect to the total number of entries in all three matrices, i.e., O(pq + qr + pr). More precisely, it takes time O(p · r) to compute C 0 xT , O(q · r) to compute BxT , and finally O(p · q) to compute the product of A with BxT . Theorem 3.1 Let A, B, C 0 be three matrices of size p × q, q × r and p × r, respectively, over a ring. Suppose that C 0 is different from the matrix product c of A and B exactly in a single entry. We can identify this entry and correct it in time linear with respect to the total number of entries, i.e., in O(pq + qr + pr) time. 4 Correcting a matrix product with at most k errors In this section, we shall repeatedly use a generalization of the deterministic version of Freivalds’ test applied to detecting single erroneous entries in the previous section. Let A, B be two n×n matrices, and let C 0 be their possibly faulty product matrix with at most k erroneous entries, over some ring. Let C ∗ and B ∗ denote matrices resulting from the same permutation of columns in the matrices C 0 and B. Similarly as in the previous section, the generalized deterministic version of Freivalds’ test verifies rows of C ∗ , but only for a selected set of consecutive columns of the matrix. Such a set of columns will be called a strip. We shall check each strip of C ∗ independently for erroneous entries that occur in a single column of the strip. To do this, when we determine the vector v to be used in the coordinate-wise comparison of A(B ∗ v T ) with C ∗ v T , we set the i-th coordinate of v to 1 if and only if the i-th column of the matrix C ∗ belongs to the strip we want to test. Otherwise, we set the coordinate to 0. (See Fig. 4.1.) In this way, for each row in a strip, we can detect whether or not the strip row contains a single error. The time complexity for testing a whole strip in this way is O(n2 ), independently from the number of columns of the strip. If necessary, we can Efficiently Correcting Matrix Products 5 V 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 C* ............ 0 . . . . . . . . . . . . . . . . . . . . 0 0 0 0 0 0 0 0 T v Fig. 4.1: Illustration of using the vector v T in order to “extract” the vertical strip V from the matrix C ∗ . also correct a single row of a strip by recomputing all its entries in time proportional to n times the number of columns in the strip. Our algorithm in this section relies also on the following number theoretical lemma. Lemma 4.1 Let P = {i1 , ..., il } be a set of l different indices in {1, ..., n}. There exists a constant c and for each im ∈ P, a prime pm among the first cl log n/ log log n primes such that for iq ∈ P \ {im }, im mod pm 6= iq mod pm . Proof It follows from the Chinese remainder theorem, the density of primes and the fact that each index in P has O(log n) bits that there is a constant b such that for each pair im , iq of distinct indices in P there are at most b log n/ log log n primes p such that im mod p = iq mod p. Consequently, for each im ∈ P there are at most b(l − 1) log n/ log log n primes p for which there exists iq ∈ P \ {im } such that iq mod p = im mod p. Thus, it is sufficient to set the constant c to b in order to obtain the lemma. t u Given the generalized deterministic version of Freivalds’ test and Lemma 4.1, the idea of our algorithm for correcting C 0 is simple, see Fig. 4.2. For each prime p among the first ck log n/ log log n primes, for j = 1, ..., n, the jth column is moved into a (vertical) strip corresponding to j mod p. Correspondingly, the columns of the matrix B are permuted. Let B ∗ and C ∗ denote the resulting shuffled matrices. Next, for each strip V of C ∗ , we set v to the vector in {0, 1}n whose j-th coordinate is 1 if and only if the j-th column belongs to V. We compute and compare 6 L. Gasieniec ˛ et al. Algorithm 1 Input: three n × n matrices A, B, C 0 such that C 0 differs from the matrix product of A and B in at most k entries. Output: the matrix product of A and B. L ← the set of the first ck log n/ log log n primes; C ∗ ← C 0 ; B ∗ ← B; for each prime p ∈ L do 1. for j = 1, ..., n do (a) Move the j-th column of C ∗ into the j mod p + 1 strip of columns in C ∗ ; (b) Correspondingly move the j-th column of B ∗ into the j mod p + 1 strip of columns in B ∗ ; 2. for each strip V of C ∗ do (a) Set v to the vector in {0, 1}n whose j-th coordinate is 1 if and only if the j-th column of C ∗ belongs to V ; (b) Compute the vectors A(B ∗ v T ) and C ∗ v T ; (c) for each coordinate i in which A(B ∗ v T ) and C ∗ v T are different do i. Compute the entries in the i-th row of the strip of A × B ∗ corresponding to V and correct the i-th row of V in c appropriately. Output C ∗ . Fig. 4.2: A deterministic algorithm for correcting at most k errors coordinate-wise the vectors A(B ∗ v T ) and C ∗ v T . Note that for i = 1, ..., n, if there is a single erroneous entry in the i-th row of V then the vectors A(B ∗ v T ), C ∗ v T are different in this coordinate. Simply, the i-th coordinate of C ∗ v T is just the sum of the entries in the i-th row of V while that coordinate of A(B ∗ v T ) is the sum of the entries in the i-th row of the vertical strip of the product of A and B ∗ corresponding to V. It follows in particular that for each strip which contains only one erroneous column, we shall find all erroneous rows in the strip. Furthermore, we can correct all the erroneous entries in a detected erroneous row of the vertical strip V in O(n2 /p) time by computing O(n/p) dot products of rows of A and columns of B ∗ . Thus, in particular the correction of a single error in a row of V takes O(n2 /p) time. It follows from Lemma 4.1, that for each erroneous column in C 0 , there is such a prime p that the column is a single erroneous column in one of the aforementioned vertical strips of the shuffled matrix C ∗ . Hence, all the k errors can be localized and corrected. Lemma 4.2 Let A, B, C 0 be three n × n matrices over a ring. Suppose that C 0 is different from the matrix product c of A and B in at most k entries. Algorithm 1 identifies these erroneous entries and corrects them in Õ(k 2 n2 ) time. Proof The correctness of Algorithm 1 (see Fig. 4.2) follows from the above discussion and Lemma 4.1. Algorithm 1 iterates over ck log n/ log log n smallest primes. Since an upper bound on the i-th prime number is O(i log i) for any i > 1, it follows that the largest prime considered by the algorithm has size O(ck log n log k), and hence all these primes can be listed in O(c2 k 2 log2 n log k) time. Efficiently Correcting Matrix Products 7 For a given prime p, the algorithm tests p vertical strips V for the containment of rows with single errors by computing the vectors A(B ∗ v T ) and C ∗ v T . It takes O(n2 p) time. By the upper bounds on the number of considered primes and their size, the total time taken by the tests for all considered primes is O(c2 k 2 n2 log2 n log k/ log log n). The correction of an erroneous entry in a detected erroneous row in a vertical strip V takes O(n2 p) time. Hence, the correction of the at most k erroneous entries in C ∗ takes O(ck 2 n2 log n log k) time. The tests and corrections dominate the running time of the algorithm. t u In a practical implementation of the algorithm above, one can of course implement the shuffling of the columns without actually copying data from one column to another. For this purpose one could also define the strips in a different way, i.e., they do not need to consist of consecutive columns. 4.0.1 Reducing the time bound to Õ(kn2 ). In order to decrease the power of k in the upper bound of the time complexity from 2 0 to 1, we make the following observation. Consider any column i of C √ . The number k erroneous of erroneous entries in column i that are in rows that have at least √ entries is at most k. √ We start by applying Algorithm 1 but only using √ the smallest c k log n/ log log n primes. In√this way all rows that have at most k erroneous entries will be found in total Õ(( k)2 n2 ) time, and will be fixed in O(n2 ) time for each detected erroneous row. So the time complexity up to this stage is dominated by Õ(kn2 ). Now, we let C 00 be the partially corrected matrix and we apply the same procedure but reversing the roles of columns and rows, i.e., we work with B T AT and C 00T . Since for√any row of C 00T , all its erroneous entries that were in columns of C 00T with at most k errors were already corrected, now√by the observation, the number of erroneous entries in any row of C 00T is at most k. Thus Algorithm 1 will now find all remaining erroneous rows in time Õ(kn2 ) and we can correct them in additional time O(kn2 ). Hence we obtain the following theorem: Theorem 4.3 Let A, B, C 0 be three n × n matrices over a ring. Suppose that C 0 is different from the matrix product c of A and B in at most k entries. We can identify these erroneous entries and correct them in Õ(kn2 ) time. 4.0.2 Few random bits help. We can decrease the power of k in the upper bound of Theorem 4.3 from 1 to 0.5 by using O(log2 k + log k log log n) random bits as follows and assuming that the exact number k of erroneous entries in C 0 is known. (The removal of this assumption will be discussed later.) The idea is that instead of testing systematically a sequence of primes, we start by producing four times as many primes and then choose randomly among them in order to produce the strips. 0 0 We call √ a faulty entry in C 1-detectable if it lies in a row or column of C with at most 2 k erroneous entries. From this definition it follows that most faulty entries 8 L. Gasieniec ˛ et al. are 1-detectable. More specifically, we call an entry in C 0 1-row-detectable, respec√ tively 1-column-detectable, if it lies in a row, respectively column, with at most 2 k erroneous entries. We will aim at detecting first a constant fraction of the 1-row-detectable (false) entries, and then a constant fraction of the 1-column-detectable entries. √ For this purpose we start by producing, in a preprocessing phase, the smallest 4c k log n/ log log n primes (i.e., four times as many primes as we did in the deterministic algorithm of Theorem 4.3). To detect sufficiently many 1-row-detectable entries we run one iteration of Algorithm √ 1, with the difference that we use a prime chosen randomly among the produced 4c k log n/ log log n smallest primes. In this way, for each 1-row-detectable entry there is at least a probability 1/2 that it will be detected. Then we repeat once more this procedure but reversing the role of columns and rows, i.e., by working with B T AT and C 0T . In this way for each 1-column-detectable entry there is at least a probability 1/2 that it will be detected. In this way, now each 1-detectable entry has been detected with probability at least 1/2. By correcting all these detected entries, we thus reduce the total number of remaining false entries by an expected constant fraction. Thus we can set k to the remaining number of false entries and start over again with the resulting, partially corrected matrix C 0 . We repeat in this way until all erroneous entries are corrected. The expected time bound for the tests and corrections incurred by the first selected primes √ dominate the overall expected time complexity. Note that the bound is solely O(c kn2 log n log k). The number of random bits needed to select such a random prime is only O(log k+log log n). For a small k, this is much less than the logarithmic in n number of random bits used in the best known O(n2 )-time verification algorithms for matrix multiplication obtained by a partial derandomization of Freivalds’ algorithm [5, 15, 19]. The overall number of random bits, if we proceed in this way and use fresh random bits for every new selection of a prime number has to be multiplied by the expected number of the O(log k) iterations of the algorithm. Thus, it becomes O(log2 k + log k log log n). Hence, we obtain the following slightly randomized version of Theorem 4.3. Theorem 4.4 Let A, B, C 0 be three n × n matrices over a ring. Suppose that C 0 is different from the matrix product c of A and B in exactly k entries. There is a randomized algorithm that identifies these erroneous entries and corrects them in √ Õ( kn2 ) expected time using O(log2 k + log k log log n) random bits. If the number k or erroneous entries is not known, then our slightly randomized method can be adapted in order to estimate the number of erroneous columns. Since similar issues arise in connection to another randomized approaches presented in the next chapters, we postpone this discussion to Final Remarks. Efficiently Correcting Matrix Products 9 5 A simple randomized approach In this section, similarly as in the previous one, we shall apply the original and modified Freivalds’ tests. First, we apply repeatedly the original Freivalds’ test to the input n × n matrices A, B, and C 0 and then to their transposes. These tests allow us to extract a submatrix C1 which very likely contains all erroneous entries of C 0 . Finally, we apply modified Freivalds’ tests to (vertical) strips of the submatrix C1 of C 0 . In contrast with the previous section, the tests are randomized. The modified test is just a restriction of Freivalds’ original randomized algorithm [10] to a strip of C1 that detects each erroneous row of a strip with probability at least 1/2 even if a row contains more than one erroneous entry. More precisely, the vector v used to test a strip of C1 by comparing A1 (B1 v T ) with C1 v T , where A1 and B1 are appropriate submatrices of A and B, is set as follows. Suppose that C1 is an q × r matrix. For j = 1, ..., r, the j-th coordinate of v is set to 1 independently with probability 1/2 if and only if the j-th column of C 0 belongs to the strip we want to test, otherwise the coordinate is set to 0. In this way, for each row in the strip, the test detects whether or not the strip row contains an erroneous entry with probability at least 1/2, even if the row contains more than one erroneous entry. The test for a whole strip takes O(n2 ) time, independently of the number of columns of the strip. Using the aforementioned tests, we shall prove the following theorem. Theorem 5.1 Let A, B and C 0 be three n × n matrices over a ring. Suppose that C 0 is different from the matrix product c of A and B in k entries. There is a randomized algorithm that transforms C 0 into the product A × B in √ √ √ O((n log n + k min{k, n})n log n) time almost surely without assuming any prior knowledge of k. Proof Let us assume for the moment that k is known in advance (this assumption will be removed later). Our algorithm (see Algorithm 2 in Fig. 5.1) will successively correct the erroneous entries of C 0 until C 0 will become equal to A × B . Our algorithm consists of two main stages. In the first stage, the standard Freivalds’ algorithm is applied iteratively to A, B, C 0 and then to the transposes of these matrices in order to filter out all the rows and all the columns of C 0 containing erroneous entries almost certainly. If the number of the aforementioned rows or columns is less than log n (e.g., when k < log n) then all the entries in the rows or columns of the product A × B are computed and the algorithm halts. The computation of the aforementioned entries takes O(min{k, n}n2 ) time in total. Otherwise, a submatrix C1 of C 0 consisting of all entries on the intersection of the aforementioned rows and columns is formed. It has at most min{k, n} rows and at most min{k, n} columns. at most q In the second stage, we consider a partition of the columns of C1 intoq d logk n e strips of equal size, i.e., consecutive groups of at most min{k, n}/d logk n e columns of C1 . We treat each such strip separately and independently. For each strip, we apply our modification of Freivalds’ test O(log n) times. In this way, we can identify almost surely which rows of the tested strip contain at least one error. (Recall that for each iteration and for each strip row, the chance of detecting an error, if it 10 L. Gasieniec ˛ et al. exists, is at least 1/2.) Finally, for each erroneous strip row, we compute the correct q values for each one of its O(min{k, n}/ k log n ) entries. Algorithm 2 Input: three n × n matrices A, B, C 0 such that C 0 differs from the matrix product of A and B in at most k entries. Output: the matrix product of A and B, almost surely. Run Freivalds’ algorithm c · log n times on A, B, C 0 ; Set R to the set of indices of at most k rows of C 0 detected to be erroneous; If #R ≤ log n then compute the rows of the product of A and B whose indices are in R, output the product of A and B, and stop; Run Freivalds’ algorithm c · log n times on AT , B T , (C 0 )T ; Set L to the set of indices of at most k columns of C 0 detected to be erroneous; If #L ≤ log n then compute the columns of the product of A and B whose indices are in L, output the product of A and B, and stop; Set C1 to the submatrix of C 0 consisting of all entries occurring in the intersection of rows with indices in R and columns with indices in L; If C1 is empty then return C 0 and stop; Set A1 to the submatrix of A consisting of all rows with indices in R; Set B1 to the submatrix of B consisting of all columns with indices in L; q for i = 1, ..., d k e log n do 1. Run the strip restriction of Freivalds’ algorithm c · log n times on A1 , B1 and the i-th (vertical) strip of C1 ; 2. For each erroneous strip row found in the i-th (vertical) strip of C 0 , compute each entry of this strip row of C1 and update C 0 accordingly; Output C 0 . Fig. 5.1: A randomized algorithm for correcting at most k errors In each iteration of the test in Step 1 in the algorithm, each erroneous row in C 0 will be detected with a probability at least 1/2. Hence, for a sufficiently large constant c (e.g., c=3) all erroneous rows of C 0 will be detected almost surely within c·log n iterations in Step 1. Analogously, all erroneous columns of C 0 will be detected almost surely within c · log n iterations in Step 3. It follows that all the erroneous entries of C 0 will belong to the submatrix C1 consisting of all entries on the intersection of the aforementioned rows and columns of C 0 , almost surely. Recall that C1 has at most min{k, n} rows and at most min{k, n} columns. q Next, similarly, in Step 7 in the algorithm, each erroneous row in each of the d logk n e strips of C1 will be detected almost surely. If we use the straightforward method in order to compute the correct values of an erroneous strip row, then qit will take O(n) time per entry. Since each strip row of C1 contains O(min{k, n}/ logk n ) q entries, the time taken by a strip row becomes O(n min{k, n}/ logk n ). Since there are at most k erroneous strip √ rows, the total time √ for correcting all the erroneous strip rows in all strips of C1 is O( k min{k, n}n log n). The total time taken by the logarithmic number of applications of Freivalds’ tests to A, B, C 0 in Step 1 and to the transposes of these matrices in Step 3 is O(n2 log n). Efficiently Correcting Matrix Products 11 To estimate the total time taken by theq logarithmic number of applications of the restrictions of Freivalds’ tests to the O( k log n ) vertical strips of C1 in and matrices A1 and B1 in Step 7, recall that A1 has at most min{k, n} rows and n columns, B1 has n rows and at most min{k, n} columns, while C1 has at most min{k, n} rows and columns. Hence, in particular p of C1 by the restricted test vectors p multiplications take√O(min{k, n} min{k, n}/ k/ log n × k/ log n log n) time in total, which is √ O( k min{k, n}n log n) since k ≥ log n in the second stage. Similarly, multiplications of B1 by p the restricted p test vectors take k/ log n × k/ log n log n) time in total, which is again O(n min{k, n}/ √ √ O( k min{k, n}n log n). Note that the n-coordinate vectors resulting from multiplications of B1 with the restricted test vectors are not any more restricted and potentially each of their coordinates may be non-zero. Therefore, p the multiplications k/ log n log n) time of A1 with the aforementioned vectors take O(min{k, n}n × √ √ in total, which is O( · log n). All this yields an upper time bound √ k · min{k, n}n √ of O(n2 · log n + k · min{k, n}n · log n) on the total time taken by the tests in both stages.. In the second stage of Algorithm 2, if we use, instead of the correct number k of erroneous entries, a guessed√number k 0 which is √ larger than k, then the time complexity becomes O(n2 ·log n+ k 0 ·min{k 0 , n}n· log n). This would be asymptotically fine as long as k 0 is within a constant factor of k. On the other hand, if we guess k 0 which is much smaller than k, then the length of each erroneous strip row in C1 may become too large. For this reason, first we have to find an appropriate size k 0 for the strips to be used by our algorithm. For this purpose, we perform the first stage of Algorithm 2, i.e., the logarithmic number of original Freivalds’ tests on the input matrices and their transposes. Next, we set k 0 to the maximum k0 of the number of erroneous rows and the number of erroneous columns reported by the aforementioned tests, and a small constant, e.g., 4. Then, we multiply our guess by 4, until we reach a good balance. More precisely, for each such guessed k 0 , without correcting any erq rors, we consider the partition of the submatrix C1 into O( k0 log n ) strips, and apply our modified test to each strip. As soon as we discover more than k 0 erroneous strip rows in C1 , we break the procedure without correcting any errors, and we start over with a four times larger guess k 0 . The aforementioned method of guessing k 0 may result in at most O(log k) wrong guesses until we achieve a good guess. Since we multiply our guess every time with 4, we obtain a geometric progression of the estimated costs of subsequent trials. In this way, the upper bound on the asymptotic complexity of the whole algorithm but the time complexity of the first logarithmic number of original Freivalds’ test is dominated by that of the iteration for the final k 0 . In this iteration, we test each strip c·log n times in order to detect almost surely all erroneous strip rows. t u Algorithm 2 in the proof of Theorem √ 5.1 can be modified in order to achieve an expected time bound of O((n log k + ( k min{k, n})n) for correcting all errors, if k is known in advance. In the first stage, we perform only a single test for the matrices A, B and a single test for their transposes. Note that each erroneous entry of c occurs with probability 12 L. Gasieniec ˛ et al. at least 21 in a detected erroneous row of c as well as with probability at least 21 in a detected erroneous column of C. Hence, an erroneous entry occurs with probability at least 41 in the resulting matrix C1 . It follows that the expected number of erroneous entries in C1 is at least one fourth of those in C. Next, we modify√ the second stage of Algorithm 2 as follows. We set the number of vertical strips to d ke. Next, instead of applying the strip restriction of Freivalds’ algorithm c · log n times for each strip, we apply it only once for each strip and correct all erroneous rows which we detect. By counting how many errors we have corrected, we compute how many errors remain. Then we recurse in the same way on the partially corrected matrix c using as a parameter this new number of errors which remain to be corrected. During each iteration of the algorithm, each remaining error in c will be detected and corrected with probability at least 12 × 14 . Thus, the expected number of remaining errors will decrease at least by the multiplicative factor 87 after each iteration. It follows that the expected number of iterations is O(log k). Consequently, the total cost of the tests in the first stage becomes O(n2 log k). For the total time cost of tests and corrections in the second stage, we obtain a geometric progression on the expected time complexity of each iteration, and so the total expected √ time complexity is dominated by the time taken by the first iteration, which is O( k min{k, n} · n). Thus we obtain the following theorem. Theorem 5.2 Let A, B, C 0 be three n × n matrices over a ring. Suppose that C 0 is different from the matrix product c of A and B in exactly k entries. There is a randomized algorithm that identifies these erroneous entries and corrects them in √ O((n log k + k min{k, n})n) expected time. 6 A fast algebraic approach In this section we present a fast randomized algorithm that makes use of the compressed matrix multiplication technique presented in [20]. We choose to give a selfcontained and slightly simplified description because we do not need the full power of the framework of [20]. For integer parameters s, t to be chosen later, the construction uses t pairs of hash functions g` , h` : {1, . . . , n} → {1, . . . , s}, with ` = 1, . . . , t, chosen independently from a strongly universal family of hash functions [4]. We will make use of the following property: Lemma 6.1 [20] For (i1 , j1 ), (i2 , j2 ) ∈ {1, . . . , n}2 where (i1 , j1 ) 6= (i2 , j2 ) we have Pr [g` (i1 ) + h` (j1 ) = g` (i2 ) + h` (j2 )] ≤ 1/s . Our algorithm first computes the following t polynomials based on the matrices A = (aik ), B = (bkj ), and C 0 = (c0ij ):  ! n n n n X n X X X X p` (x) = aik xg` (i)  bkj xh` (j)  − c0ij xg` (i)+h` (j) , (6.1) k=1 i=1 j=1 i=1 j=1 Efficiently Correcting Matrix Products 13 for ` = 1, . . . , t. Multiplication of the polynomials corresponding to A and B is done efficiently (over any ring) using the algorithm of Cantor and Kaltofen [3], based on the original polynomial multiplication algorithm of Schönhage and Strassen [21]. Let p(x)m denote the coefficient of xm in a polynomial p(x). For each entry i, j of C 0 we assess the error term that must be added to c0ij as the majority element of the sequence p` (x)g` (i)+h` (j) , ` = 1, . . . , t. We will choose s and t such that with high probability the correction term (in most cases zero) appears more than t/2 times in the sequence. If there is no such element for some entry i, j the algorithm fails. 6.1 Correctness Suppose C = AB = (cij ) is the true matrix product. Expanding the sum (6.1) and reordering the order of summation we get: p` (x) = n X n X n X aik xg` (i) bkj xh` (j) − i=1 j=1 k=1 n X n X c0ij xg` (i)+h` (j) i=1 j=1 n X n X = (cij − c0ij ) xg` (i)+h` (j) . i=1 j=1 This means that each coefficient of p` (x) is a sum of error terms: X p` (x)m = cij − c0ij . i,j g(i)+h(j)=m Let K ⊆ {1, . . . , n}2 be the set of positions of errors. For i∗ , j ∗ ∈ {1, . . . , n}: X p` (x)g(i∗ )+h(j ∗ ) = ci∗ j ∗ − c0i∗ j ∗ + cij − c0ij . (6.2) (i,j)∈K\{(i∗ ,j ∗ )} g(i)+h(j)=g(i∗ )+h(j ∗ ) Lemma 6.1 states that g(i)+h(j) = g(i∗ )+h(j ∗ ) holds with probability at most 1/s. By a union bound the probability that the sum in (6.2) has at least one nonzero term is at most k/s. Choosing s ≥ 3k we get that p` (x)g(i∗ )+h(j ∗ ) = ci∗ j ∗ − c0i∗ j ∗ with probability at least 2/3. By Chernoff bounds this implies that after t repetitions the probability that p` (x)g(i)+h(j) = cij − c0ij does not hold for at least t/2 values of ` is exponentially small in t. Choosing t = O(log n) we can achieve an arbitrarily small polynomial error probability in n (even when summed over all entries i, j). 6.2 Time analysis Strongly universal hash functions can be selected in constant time and space [4], and evaluated in constant time. This means that they will not dominate the runPn g` (i) 2 , ning time. Time O(n + ns) is used to compute the polynomials a i=1 ik x Pn Pn Pn h` (j) 0 g` (i)+h` (j) c x in (6.1). This can be seen by noticb x , and i=1 j=1 ij j=1 kj ing that each entry of A, B, and C 0 occur in one polynomial, and that there are 14 L. Gasieniec ˛ et al. 2n + 1 polynomials of degree s. Another component of the running time is the tn multiplications of degree-s polynomials, that each require O(s log s log log s) operations [3]. Finally, time O(tn2 ) is needed to compute the correction term for each entry i, j of C 0 based on the sequence p` (x)g` (i)+h` (j) . With the choices s = O(k), t = O(log n) the combined number of operations (algebraic and logical) is O(n2 log n + kn log n log k log log k). Theorem 6.2 Let A, B and C 0 be three n × n matrices over a ring. Suppose that C 0 is different from the matrix product c of A and B in at most k entries. There is a randomized algorithm that transforms C 0 into the product A × B in O((n + k log k log log k)n log n) time, i.e., Õ(n2 + kn) time, almost surely. While the above assumes prior knowledge of k, we observe in Final Remarks that this assumption can be removed with only a slight increase in running time. Observe that the algorithm of Theorem 6.2 needs O(t log n) bits of space, which is O(log2 n). 7 Final Remarks The majority of our randomized algorithms, in particular that from Section 6, can be efficiently adapted to the case when the number k of errors is unknown, proceeding similarly as in the proof of Theorem 5.1. First, observe that using a parameter value k 0 that is larger than k by a constant factor will yield the same guarantee on correctness and asymptotic running time. This means that we can try geometrically increasing values of k 0 , for example k 0 = 4l for l = 1, 2, 3, . . . until the algorithm returns a correct answer within the stated time bound (using a suitably large constant in place of the big-O notation). Correctness is efficiently checked using Freivalds’ technique. This technique increases the time bound by at most a factor log n compared to the case where k is known. Furthermore, if k ≥ n log n the time will be dominated by the last iteration, and we get time bounds identical to the case of known k. A similar approach can also be used for refining the slightly randomized method of Theorem 4.4 when the number of errors k is not known in advance. However, if there is no knowledge at all concerning the number of errors, it may be difficult to handle the case when no errors are detected: does this happen because there are no errors at all, or because there are too many errors and we chose a random prime from a too small range, thus failing to isolate 1-detectable false entries? For this reason, if there is no known useful upper bound on the remaining number of errors, and we do not detect any errors during a series of iterations, we may have to resort to some of the known algorithms which test whether there are any errors at all [5, 15, 19]. All such known algorithms running in time O(n2 ) may need a logarithmic number of random bits, so if k is very small then this may be asymptotically larger than the low number of random bits stated in Theorem 4.4. Note that the problem of correcting a matrix product is very general. In the extreme case, when all entries of the matrix C 0 may be mistrusted, it includes the problem of computing the matrix product C from scratch. Also, when the matrix c is known to be sparse, i.e., mostly filled with zeros, then we can set C 0 to the all-zeros matrix, and apply our matrix correction algorithms in order to obtain output-sensitive Efficiently Correcting Matrix Products 15 algorithms for matrix multiplication (the number of non-zero entries in c equals the number of erroneous entries in C 0 ). They will be slower than those known in the literature based on fast rectangular matrix multiplication [1, 12, 13, 17] (cf. [25]). Finally, the general idea of using linear sketches to compute compact summaries of matrix products may be useful in general for correcting matrix products. For example, Iwen and Spencer [14] show that for complex-valued matrix products there is an efficiently computable linear sketch that allows recovery of the matrix product if the number of nonzeros in each column is bounded by roughly n0.3 . Using linearity one can subtract the linear sketch for C 0 to get the linear sketch of AB − C 0 , which has k nonzero entries. If the number of nonzeros in each column of AB − C is bounded by n0.3 , they can all be computed in time n2+o(1) . However, it is not clear for which rings this method will work, so while this is an interesting direction for future research we do not pursue it further here. Acknowledgements We thank anonymous referees for helping us to improve preliminary versions of this paper. Christos Levcopoulos and Andrzej Lingas were supported in part by Swedish Research Council grant 621-2011-6179. Takeshi Tokuyama was supported by JSPS Grant Scientific Research (B) 15H02665, JSPS Scientific Research for Innovative Area 24106007, and JST ERATO Kawarabayashi Big-Graph Project. References 1. R.R. Amossen and R. Pagh. Faster join-projects and sparse matrix multiplications. Proc. ICDT 2009, pp. 121-126. 2. H. Buhrman and R. Spalek. Quantum Verification of Matrix Products. Proc. ACM-SIAM SODA 2006, pp. 880–889. 3. D. G. Cantor and E. Kaltofen On fast multiplication of polynomials over arbitrary algebras. Acta Informatica 28 (7), pp. 693–701, 1991. 4. J.L. Carter and M.N. Wegman. Universal Classes of Hash Functions. Journal of Computer and System Sciences 18 (2), pp. 143–154, 1979. 5. Z.-Z. Chen, M.-Y. Kao. Reducing Randomness via Irrational Numbers. Proc. ACM STOC 1997, pp. 200–209. 6. D. Coppersmith, S. Winograd. Matrix Multiplication via Arithmetic Progressions. J. of Symbolic Computation 9, 251–280 (1990) 7. A. De Bonis, L. Gasieniec, ˛ and U. Vaccaro. Optimal Two-Stage Algorithms for Group Testing Problems. SIAM Journal on Computing 34(5), pp. 1253–1270 (2005). 8. C. Ding, C. Karlsson, H. Liu, T. Davies and Z. Chen. Matrix Multiplication on GPUs with OnLine Fault Tolerance. Proc. of the 9th IEEE International Symposium on Parallel and Distributed Processing with Applications (ISPA 2011), Busan, Korea, May 26-28, 2011. 9. D.Z. Du and F.K. Hwang. Combinatorial Group Testing and its Applications World Scientific Publishing, NJ, 1993 10. R. Freivalds. Probabilistic Machines Can Use Less Running Time. IFIP Congress 1977, pp. 839–842. 11. F. Le Gall. Powers of Tensors and Fast Matrix Multiplication. Proc. 39th International Symposium on Symbolic and Algebraic Computation, July 2014. 12. F. Le Gall, Faster Algorithms for Rectangular Matrix Multiplication, In: Proc. of FOCS 2012, pp. 514–523. 13. X. Huang and V. Y. Pan. Fast rectangular matrix multiplications and applications. Journal of Complexity 14(2) , pp. 257–299 (1998) 14. M. A. Iwen and C.V. Spencer. Note on Compressed Sensing and the Complexity of Matrix Multiplication. Information Processing Letters 109 (10), pp. 468–471, 2009. 15. T. Kimbrel and R.K. Sinha. A probabilistic algorithm for verifying matrix products using O(n2 ) time and log2 n + O(1) random bits. Information Processing Letters 45, pp. 107–119 (1993). 16 L. Gasieniec ˛ et al. 16. I. Korec and J. Widermann. Deterministic Verification of Integer Matrix Multiplication in Quadratic Time. SOFSEM 2014: Theory and Practice of Computer Science, Lecture Notes in Computer Science Volume 8327, pp 375–382, 2014. 17. A. Lingas. A fast output-sensitive algorithm for Boolean matrix multiplication. In the special ESA 2009 issue of Algorithmica 61(1), pp. 36–50 (2011). 18. R.M. McConnell, K. Mehlhorn, S. Näher and P. Schweitzer. Certifying algorithms. Computer Science Review 5(2): 119–161 (2011) 19. J. Naor and M. Naor. Small-Bias Probability Spaces: Efficient Constructions and Applications. SIAM J. Comput. 22(4), pp. 838–856, 1993. 20. R. Pagh. Compressed matrix multiplication. ACM Transactions on Computation Theory 5(3), 9, 2013. 21. A. Schönhage and V. Strassen. Fast multiplication of large numbers. Computing 7 (3), pp. 281–292, 1971. 22. V. Strassen. Gaussian elimination is not optimal. Numerische Mathematik 13, pp. 354–356, 1969. 23. V. Vassilevska Williams. Multiplying matrices faster than Coppersmith-Winograd. Proc. ACM STOC 2012, pp. 887–898. 24. V. Vassilevska Williams and R. Williams. Subcubic Equivalences between Path, Matrix and Triangle Problems. Proc. IEEE FOCS 2010, pp. 645–654. 25. R. Williams and H. Yu. Finding orthogonal vectors in discrete structures. Proc. ACM-SIAM SODA 2014, pp. 1867–1877. 26. P. Wu, C. Ding, L. Chen, F. Gao, T. Davies, C. Karlsson and Z. Chen. Fault Tolerant MatrixMatrix Multiplication: Correcting Soft Errors On-Line. Proc. of the 2011 Workshop on Latest Advances in Scalable Algorithms for Large-Scale Systems (ScalA) held in conjunction with the 24th IEEE/ACM International Conference on High Performance Computing, Networking, Storage and Analysis (SC11), 2011. 27. P. Wu, C. Ding, L. Chen, F. Gao, T. Davies, C. Karlsson and Z. Chen. On-Line Soft Error Correction in Matrix-Matrix Multiplication. Journal of Computational Science, Vol. 4(6), 2013, pp. 465–472.
8cs.DS
Acceleration of Histogram-Based Contrast Enhancement Accelerate Histogram-Based Contrast Enhancement by via Selective Downsampling Selective Downsampling Gang Cao1*, Huawei Tian2, Lifang Yu3, Xianglin Huang1 and Yongbin Wang1 1 School of Computer Science, Communication University of China, Beijing, China 2 3 People’s Public Security University of China, Beijing, China School of Information Engineering, Beijing Institute of Graphic Communication, Beijing, China Correspondence author: [email protected] Abstract In this paper, we propose a general framework to accelerate the universal histogram-based image contrast enhancement (CE) algorithms. Both spatial and gray-level selective downsampling of digital images are adopted to decrease computational cost, while the visual quality of enhanced images is still preserved and without apparent degradation. Mapping function calibration is novelly proposed to reconstruct the pixel mapping on the gray levels missed by downsampling. As two case studies, accelerations of histogram equalization (HE) and the state-of-the-art global CE algorithm, i.e., spatial mutual information and PageRank (SMIRANK), are presented detailedly. Both quantitative and qualitative assessment results have verified the effectiveness of our proposed CE acceleration framework. In typical tests, computational efficiencies of HE and SMIRANK have been speeded up by about 3.9 and 13.5 times, respectively. Index terms Image processing, contrast enhancement, acceleration, speed up, downsampling, histogram. 1. Introduction Contrast enhancement (CE) of digital images refers to the operations which improve the perceived contrast. Such contrast is typically defined as the dynamic range of pixel graylevels within global or local image regions. CE is a widely used image enhancement tool in real applications [1]. Generally, a good CE technique is expected to have: 1) more contrast improvement with less image distortion; 2) low computational cost. In consideration of its importance in image processing, plenty of previous works have 1 presented image CE techniques. In terms of the mapping applied to pixel gray-levels, the existing CE algorithms can be generally categorized as global, local and hybrid ones [2]. Global CE modifies an image via an identical pixel value mapping, such that the gray-level histogram of the processed image resembles the desired one and becomes more spread than that of the original image [2, 3]. Local CE improves contrast by altering pixels in terms of local properties, and typically operates in the image transform domains, such as the discrete cosine transform (DCT) [4] and the discrete wavelet transform (DWT) [5]. Local CE can also be enforced by adaptively applying the global CE to local image regions [3]. Hybrid CE, which combines the global and local CE together, can improve the unified perception of both global and local contrasts [6]. Note that most of existing global CE techniques need to use the gray-level or transform coefficient histogram of input images. As summarized in [3], histogram modification-based CE received the most attention due to straightforward and intuitive implementation qualities. One popular global CE method is histogram equalization (HE) [1], which improves contrast by redistributing the probability density of gray-levels towards uniformity. The prominent merit of HE lies in its high computational efficiency. However, HE might incur excessive enhancement and unnatural artifacts on the images with high peaks in histograms. In order to attenuate such deficiency, lots of improved HE algorithms [3, 7-11] have been proposed, where the histogram modification framework (HMF) [3] is an influential one. HMF treats CE as an optimization problem by minimizing a cost function which includes the penalty of the histogram deviation from original to uniform. Gu et al. [10] proposed an optimal histogram mapping for automatic CE based on a novel reduced reference image quality metric for contrast change. In [11], a complete HMF is presented by integrating the automatic parameter selection via saliency preservation. T. Celik [6] proposed spatial entropy based CE (SECE) by novelly incorporating the spatial distribution characteristics of pixels into the design of gray-level mapping function. SECE can always slightly improve image contrast without incurring serious image quality degradation. Recently, T. Celik [2] proposes the state-of-the-art global image CE method, SMIRANK, by using spatial mutual information of pixels and PageRank. Although good enhancement quality is achieved, such a algorithm runs rather slower than most of other CE algorithms including HE, HMF, SECE and the adaptive gamma correction with weighting distribution (AGCWD) [12]. Besides, the transform coefficient histogram has also been used in CE design [4]. Low computational complexity is an important requirement for the real applications of CE techniques, such as those in low-power embedded imaging systems and the internet of 2 y  m' (x) Fig. 1. The proposed CE acceleration framework. The new operations integrated into a general histogram-based CE are plotted in dotted-line boxes. things. Moreover, existing histogram-based CE algorithms may become computationally inefficient in enhancing the images with large spatial resolution and high dynamic range (HDR). In such frequently encountered scenarios, both the one- and two-dimensional gray level histograms involved calculations would become highly time-consuming. Therefore, it is essential and significant to speed up general histogram-based CE algorithms. However, despite some particularly designed fast CE methods [13, 14], to the best of our knowledge, there does not exist any prior work focusing on the acceleration of general histogram-based CE. In this work, we study such a universal problem by proposing a general acceleration framework to improve the existing CE algorithms themselves, instead of applying parallel computing or device-dependent computational strategies [15, 16]. Selective downsampling in both spatial and gray-level domains is employed to decrease computational cost, while the visual quality of enhanced images is still preserved. As case studies, the accelerations of HE and SMIRANK are presented detailedly. The remainder of this paper is organized as follows. Section 2 proposes the acceleration framework for general histogram-based CE techniques. Section 3 presents the detailed case studies on HE and SMIRANK, followed by the experimental results and discussion given in Section 4. The conclusions are drawn in Section 5. 2. Proposed CE Acceleration Framework As illustrated by the solid-line boxes of Fig.1, a general gray level histogram-based CE technique typically consists of three basic steps: histogram computation, mapping function generation and image transform. Specifically, a single global or dense local histogram(s) of an input image is first computed. Then an elaborately designed mapping function is derived from such statistics and the image. Lastly, the pixel gray-level mapping is globally applied to the input image. 3 In order to accelerate such histogram-based CE processing, we propose to speed up the histogram computation by selective spatial and gray level downsampling. The yielded lowresolution histogram would benefit the fast generation of a low-resolution mapping function, which is merely defined in the quantized gray levels. However, such a mapping function is improper to be directly applied to neither downsampled nor primary input images, because the abnormal stratification artifacts are incurred and the function on missed gray levels are undefined. As another contribution of this framework, we novelly propose to calibrate such a low-resolution mapping function so that it reasonably covers the full gray level dynamic range of input images. 2.1 Fast Histogram Computation via Selective Downsampling Histogram construction is an essential and fundamental step in general histogram-based CE methods, which can be accelerated by decreasing the computational costs of histogram computation and histogram-involved operations in mapping function generation. As such, the cost-effective selective spatial and gray-level downsampling is proposed to be used as acceleration strategies, as plotted in the dotted-line boxes of Fig. 1. In order to decrease the number of counted pixels, spatial downsampling is first applied to the B-bit input grayscale image denoted by X(i, j), i=0, 1, …, M-1, j=0, 1, …, N-1, where [M, N] denote the image size. Without loss of generality, the uniform downsampling with the sampling step s is used to diminish the computational cost. The spatially downsampled image Xs is generated as Xs(i, j)=X(s·i, s·j) (1) where i=0, 1, …,  M s  -1, j=0, 1, …,  N s  -1, and  denotes rounding towards zero. If s is limited within a proper range, gray-level histogram of the downsampled image can keep consistent shape as that of the input. The integer, instead of fraction, datatype of s values are adopted to decrease the additional computational cost incurred by downsampling. s can also be larger for large size of images due to the higher correlationship between local pixels. The gray-level histogram of Xs can be obtained as h(k) =  M s  1  N s  1   i 0 j 0   X  i, j    l  s  k        (2) where k=0, 1, ..., Ng-1.  is the quantization step of gray levels. Ng  2 B  is the number of histogram bins. l   is an indicator function. h(k) would be used to yield the mapping function, where post operations typically run on such a histogram. As such, the histogram 4 dimension, Ng, also affects the computational cost of CE algorithms. Here, we propose to decrease the statistical precision of histograms properly by reducing the number of bins. Such histogram coarsening can be treated as the gray-level downsampling of images. Overall, we can see that spatial downsampling benefits CE of large size of images, and gray-level downsampling accelerates histogram-dependent mapping function generation. 2.2 Calibration of Mapping Function Let the low-resolution mapping function derived from h(k) be denoted by y=m(k), k=0, 1, ..., Ng-1. Mapping function calibration aims to reconstruct a proper full dynamic mapping function y=m’(x), x=0, 1, ..., 2B-1 from y=m(k). Generally, there exist two candidate image transform schemes which are discussed detailedly as follows. 1) As Matlab function imhisteq, y=m(k), k=0, 1, ..., Ng-1 is upsampled into y=m’(x)= m(  x   ), x=0, 1, ..., 2B-1 by nearest neighboring interpolation. Then y=m’(x) is applied to Xs, and the result is reversely upsampled to yield an enhanced image Y with the same size as X. Note that in some CE algorithms, such as SMIRANK, the y=m’(x) here can not be directly applied to X, since some kinds of gray levels in X may be missed by the spatial downsampling and excluded from histograms. Nevertheless, annoying stratification artifacts are easily incurred in Y due to degraded gray-level resolution, especially in the X with large smooth regions and histogram peaks. As a result, such a transform scheme is undesirable. 2) y=m(k) is linearly completed and upsampled into y=m’(x) for covering all the gray levels of X, and then applied to X for yielding an enhanced image Y. The stratification artifacts can be attenuated efficiently in this scheme, which is adopted as mapping function calibration in our proposed CE acceleration framework. Specifically, in order to reduce additional computational burden, the simple yet efficient one-dimensional linear interpolation is used to implement the upsampling and completing of y=m(k). In terms of generation methods of mapping function, the completing operation may be selectively used to estimate the gray levels missed by either spatial or gray-level downsampling, as that enforced in the accelerated SMIRANK algorithm (see Section 3.1). 3. Case Studies on HE and SMIRANK This section presents the case studies of our acceleration scheme on two typical CE algorithms: HE and SMIRANK. For the input B-bit grayscale image X, CE algorithms aim to yield an enhanced image Y with higher contrast and less distortion than X. As the prior 5 works [2, 3, 6], CE of color images is realized by applying CE to luminance channel images and preserving the chrominance components in HSV color space. 3.1 Acceleration of HE The accelerated HE algorithm is proposed as follows, (1) Spatially downsampling X to Xs as Eq. (1). (2) Compute the downsampled gray-level histogram h of Xs as Eq. (2). (3) Obtain cumulative distribution function (CDF) c from h. (4) Calibrate c to c' with 2B items by upsampling it with linear interpolation. (5) Perform pixel value transform Y(i, j)=[(2B-1)  c'(X(i, j))], where [  ] means converting to unsigned B-bit integers. Comparing with the baseline HE algorithm [1], the integrated acceleration measures are included in the steps (1), (2), (4). Specifically, in the step (1), spatial image downsampling decreases the number of counted pixels, which can accelerate the generation of histogram. The shorter histogram (Ng<2B) yielded in the step (2) benefits the fast calculation of CDF. In the calibration phase, i.e., the step (4), the computationally cost-effective upsampling of CDF is used to reconstruct a continuous mapping function covering the full dynamic range [0, 2B-1] of X. 3.2 Acceleration of SMIRANK The accelerated SMIRANK algorithm is proposed as follows, (1) Compute 2D joint-spatial histogram hb(k) of the spatially downsampled image Xs as Eqs. (1)(2). Here, b=1, 2, ..., Nb are the indexes of divided non-overlapped image blocks in Xs, and k=0, 1, ..., Ng-1 are the bin indexes of blockwise gray level histograms. (2) Normalize hb(k) to be hb(k)/((  M s  )(  N s  )). (3) Compute the mutual spatial information as Nb I(k ,l )   hb' (k ,l )log b 0 hb' (k ,l ) hb (k )hb (l ) (3) where h'b(k, l) = min(hb(k), hb(l)), k, l  X={xn |  b hb ( xn )  0 , n=1, 2, ..., K}. K denotes the number of non-zero columns within the matrix H which consists of Hb, k +1=hb(k). (4) Calculate G=S+(1- )ovT , where S is created by normalizing each column of I. o  R K1 is unit vector and v  R K1 is uniform vector, i.e., oT v=1 .   [0,1]  is the adjustable damping factor. 6 (5) The gray-level rank vector r  R K 1 is gained by solving Gr = r, where r = (1-  ) (E-  S)-1v, and E is K×K identity matrix. (6) Map input gray-levels in X to output yk = yk-1 +  k-1, k  (2B-1) (4)  is defined as where k=2, 3, ..., K and y1=0.  k-1, k  [0,1] k 1,k  r(k  1)  r(k ) r(1)  r( K )  . 2 2( K  1) (5) (7) Complete F(xk)=yk , k =1, 2, ..., K, to F(k) , k=0, 1, ..., Ng-1, by filling the lost items via linear interpolation. Then F is linearly upsampled to be with 2B items, i.e., F(x) , x=0, 1, ..., 2B-1. Lastly, output Y(i, j)=[(2B-1)  F(X(i, j))]. Comparing with SMIRANK [2], the main changes lie in the steps (1), (7). Specifically, both spatial and gray-level downsampling are implemented to speed up the generation of 2D joint-spatial histograms in the step (1). The low-dimensional blockwise histograms hb could evidently speed up the post computations of mutual information I and gray-level rank vector r, which correspond to the steps (3) and (5), respectively. Such two steps constitute the main part of SMIRANK, and serve to generate an incomplete low-resolution mapping function {F(xk)=yk | k=1, 2, …, K} in the step (6). In the calibration step (7), F is completed and upsampled by linear interpolation to recover the full dynamic mapping function {F(x) | x=1, 2, …, 2B-1}. Such processing refers to mapping function calibration in the acceleration framework. Lastly, the enhanced image Y is outputted via pixel value mapping. 4. Experimental Results and Discussion 4.1 Datasets, Algorithms and Performance Measures Test images are collected from four standard databases, i.e., TID2013 [17], CSIQ [18], CCID2014 [10] and RGB-NIR [19]. TID2013 image dataset includes 25 reference images and their contrast-changed versions at Levels 1~5, which respectively correspond to small contrast decreasing/increasing, larger contrast decreasing/increasing and the largest contrast decreasing. In CSIQ, 30 reference images are degraded at 5 consecutive levels, where the Levels 1 and 5 signify the smallest and largest contrast degrading, respectively. CCID2014 consists of 15 representative Kodak images [20] and their 655 contrast-distorted copies. RGB-NIR image dataset has 477 images captured in RGB and near-infrared (NIR), where 7 RGB images are used in our tests. The size of TID2013, CSIQ, CCID2014 and RGB-NIR images are 512×384, 512×512, 768×512 and 1024×(620~768) pixels, respectively. CE algorithms are applied to the corresponding 8-bit luminance images in HSV color space. Our proposed fast HE (FHE) and fast SMIRANK (FSMIRANK) are compared with naive HE [1], SMIRANK [2], HMF [3], AGCWD [12] and SECE [6]. Default parameter settings of primary algorithms are used. Without loss of generality,  = 0.9 is set in both SMIRANK and FSMIRANK. Currently, the performance assessment of image CE algorithms is still a challenge task [2, 10, 21-23]. In order to keep consistency with prior works, the state-of-art CE metrics, QRCM (quality-aware relative contrast measure) [2] and BIQME (blind image quality measure of enhanced images) [23] are used in all the tests. QRCM is a full-reference image quality assessment for measuring both the contrast change and image quality degradation between input and outputs. It yields a number within [-1, 1], where -1 and 1 denote the full level of contrast degradation and improvement, respectively. As a no-reference CE metric, BIQME captures five influencing factors: contrast, sharpness, brightness, colorfulness and naturalness. A larger BIQME score signifies better visual perceptual quality. 4.2 Effectiveness Evaluation of Acceleration Strategies Perceptual quality of enhanced images and average processing time per image are two important criteria for evaluating CE methods. In order to evaluate the visual quality change incurred by proposed accelerations, the QRCM difference between the images yielded by accelerated and naive algorithms ( QRCM=QRCMfast-QRCMnaive) is computed for each RGB-NIR image. CDF statistics of such QRCM values are plotted in Fig. 2, where (a)(c) and (b)(d) correspond to the HE and SMIRANK groups, respectively. We also investigate the performance varying with Ng and s. Fig. 2(a)(b) plots QRCM statistics varying with Ng for HE and SMIRANK groups, respectively. For HE, QRCM values of nearly all samples are above a rather small value, i.e., -0.005. Moreover, more than 60% sample values are positive, which signifies higher QRCM gained by FHE. Overall, visual quality of the image enhanced by FHE is comparative or even better than that of HE, and is insensitive to Ng. Fig. 2(b) shows that QRCM values of more than 90% samples for FSMIRANK are lower than those for SMIRANK. However, there are about 99%, 90%, 70% sample values above -0.01 (a negligible degradation) for Ng=128, 64, 32, respectively. Such results verify that FSMIRANK is comparative or slightly worse than SMIRANK on the visual quality of outputs. 8 1 1 Ng=256, s=1 Ng=128, s=1 Ng=64, s=1 Ng=32, s=1 0.9 0.8 0.9 0.8 0.7 0.6 0.6 Percent Percent 0.7 Ng=256, s=1 Ng=128, s=1 Ng=64, s=1 Ng=32, s=1 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 -0.03 -0.02 -0.01 0 QRCM 0.01 0.02 0 -0.03 0.03 -0.02 -0.01 0 QRCM (a) 0.02 0.03 0.01 0.02 0.03 (b) 1 1 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 Percent Percent 0.01 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 -0.01 0 0.01 QRCM 0.02 0 -0.03 0.03 -0.02 -0.01 0 QRCM (c) (d) Fig. 2. Cumulative distribution of the difference between QRCM values yielded by (a)(c) FHE and HE; (b)(d) FSMIRANK and SMIRANK on RGB-NIR dataset under different s and Ng settings. TABLE I AVERAGE COMPUTATION TIME (MS) PER IMAGE ON RGB-NIR DATASET FOR FHE AND FSMIRANK UNDER DIFFERENT s AND Ng SETTINGS. Ng s 256 FHE FSMIRANK 48.6 530.2 128 64 32 1 42.4 156.0 36.4 86.3 32.7 64.9 9 64 1 4 8 16 36.4 86.3 12.6 34.5 11.7 35.3 11.0 29.7 The computational complexity decrease incurred by accelerations is tested by running CE algorithms on a computer with Intel Core i5-5200U CPU @ 2.2 GHz and 8G RAM under MATLAB R2013a. As shown in Table I, the average processing time for one image decreases monotonously with Ng. Without loss of generality, Ng=64 is selected for limiting the degradation and computational complexity. Results on the visual quality varying with s are shown in Fig. 2(c)(d). Overall, the performances at s=1, 4, 8 are comparative, and far better than that at s=16. Table I shows that the computing speed also decreases monotonously with s. In terms of the trade-off between computation cost and visual quality, s=8 is selected. In conclusion, the effectiveness of our proposed CE acceleration strategies can be verified by such baseline evaluation results. 4.3 Comparing with Other CE Methods Objective and subjective performance assessment of the accelerated CE methods is also enforced by comparing with other CE algorithms on extensive datasets. Table II shows the average QRCM values for different CE algorithms on four databases. It shows that FHE is comparative or slightly better than HE, where the increment falls within [-0.003, 0.044]. Among all methods, SMIRANK ranks first and is nearly followed by FSMIRANK, which owns comparative or slightly lower QRCM values. The decrement falls within [-0.01, 0] TABLE II AVERAGE QRCM (X10 ) FOR DIFFERENT CE ALGORITHMS ON EACH DATASET. HERE, S=8, Ng=64. LEVEL 0 MEANS UNALTERED IMAGES. THE LARGEST TWO PER ROW ARE LINED. -2 Algorithm HMF AGCWD SECE HE FHE Level 0 Level 1 Level 2 TID2013 Level 3 Level 4 Level 5 Level 0 Level 1 Level 2 CSIQ Level 3 Level 4 Level 5 CCID2014 RGB-NIR 10.1 11.5 7.7 14.1 5.5 17.1 7.6 10.5 14.2 17.5 17.8 17.8 13.0 12.9 9.1 12.3 5.6 17.8 2.7 28.8 6.3 10.5 17.0 30.0 35.0 35.0 9.8 9.4 7.5 11.8 4.0 18.8 1.8 31.2 3.1 9.3 18.1 33.0 37.7 37.7 11.9 7.8 10.7 15.8 4.6 22.1 -1.9 33.0 3.3 9.3 17.8 31.5 36.1 36.1 11.8 11.0 12.0 15.5 7.2 22.0 2.5 32.8 3.4 9.1 17.6 31.5 36.1 36.1 13.9 11.7 10 SMIRANK FSMIRANK 13.5 17.5 9.3 23.9 5.9 34.9 7.9 13.7 21.9 35.0 38.9 38.9 17.3 14.9 13.5 17.3 9.3 23.7 5.9 34.9 7.7 13.2 21.3 34.1 37.9 37.9 17.4 14.7 TABLE III AVERAGE BIQME (X10 ) FOR DIFFERENT CE ALGORITHMS ON EACH DATASET. HERE, S=8, Ng=64. -1 UNEN MEANS UNENHANCED IMAGES. THE LARGEST TWO PER ROW ARE LINED. Algorithm Level 0 Level 1 Level 2 TID2013 Level 3 Level 4 Level 5 Level 0 Level 1 Level 2 CSIQ Level 3 Level 4 Level 5 CCID2014 RGB-NIR UNEN HMF AGCWD SECE 59.0 56.3 62.3 51.5 63.7 41.9 60.1 55.6 51.2 42.2 38.0 38.0 50.1 54.6 63.0 61.5 64.8 58.5 65.2 50.8 62.8 60.5 57.8 49.6 45.0 45.0 57.3 60.2 Input HMF AGCWD Image 1 0.21 Image 2 60.9 59.1 63.8 56.3 65.0 51.0 62.4 58.9 56.7 52.2 49.6 49.6 55.2 56.8 61.6 61.1 63.4 60.4 64.1 59.2 61.4 59.4 58.6 57.8 57.2 57.2 57.9 57.3 HE FHE SMIRANK FSMIRANK 64.1 64.4 64.1 64.2 63.1 63.9 65.2 62.8 62.1 61.3 60.4 60.4 63.2 62.0 64.6 64.1 65.1 64.0 64.8 63.5 65.3 62.8 62.2 61.3 59.9 59.9 63.9 62.3 63.5 63.2 64.7 62.8 64.8 62.3 63.4 61.7 61.4 61.0 60.5 60.5 61.1 60.4 63.7 63.3 64.9 62.9 65.0 62.2 62.6 61.7 61.4 60.8 60.1 60.1 60.8 60.6 SECE HE FHE SMIRANK FSMIRANK 0.19 0.15 0.27 0.27 0.26 0.25 0.16 0.20 0.07 0.11 0.11 0.20 0.21 Image 3 0.14 0.19 0.13 0.24 0.24 0.22 0.22 Image 4 0.16 0.20 0.07 0.11 0.11 0.20 0.21 Fig. 3. Results for different CE methods on four example images. The corresponding QRCM value of each image is shown below. 11 with the average of -0.004, which is rather smaller than the margins above the other CE methods including HMF, AGCWD and SECE. Table III lists the corresponding test results achieved by the BIQME metric. Although the measurements are prone to HE, the consistent conclusion as that of QRCM could also be obtained. All such quantitative and objective assessment results verify that the accelerated methods can preserve the visual enhancement quality of naive CE methods, and generally behave better than HMF, AGCWD and SECE. Fig. 3 shows the qualitative visual quality assessment enforced on four example images. The images 1-2, 3, 4 are from CSIQ, BSD500 [24] and RGB-NIR databases, respectively. From both visual observation and QRCM measurements, we can see that perceptual quality of the enhanced images yielded by accelerated methods is preserved successfully. Except for those inherently brought by naive CE methods, no additional unnatural artifacts would be incurred by the corresponding accelerated methods. 4.4 Complexity Comparison Time complexity of different CE algorithms is also tested. The average processing time for each image of the four different datasets is shown in Table IV, which indicates that FHE outperforms other methods remarkably. Although HE is famous for its fast processing speed, it is still speeded up by about 3.9 times by our proposed acceleration scheme. Moreover, SMIRANK is impressively speeded up by about 13.5 times by FSMIRAMK. Such evident improvement should attribute to both the spatial and gray-level downsampling. FSMRANK runs much faster than SECE and AGCWD. Comparing with HMF, FSMIRANK behaves comparatively on TID2013 and CSIQ, but better on CCID2014 and RGB-NIR. Such results should attribute to the benefit of our proposed methods on enhancing the relatively large size of images, such as those from RGB-NIR and CCID 2014. We also analyze the theoretical time complexity of CE algorithms in enhancing a M×N B-bit grayscale image. The analysis results are shown in Table V. For HE, computing the TABLE IV AVERAGE COMPUTATION TIME (MS) PER IMAGE FOR DIFFERENT CE ALGORITHMS ON EACH DATASET. HERE, S=8, Ng=64. THE FASTEST TWO PER ROW ARE LINED. Algorithm HMF AGCWD SECE HE FHE TID2013 CSIQ CCID2014 RGB-NIR 18.0 23.9 34.8 56.9 37.2 50.7 68.8 118.6 54.3 60.8 75.7 116.4 14.7 19.6 29.1 47.4 4.0 5.3 6.9 11.7 12 SMIRANK FSMIRANK 314.0 283.0 307.8 519.4 22.6 21.0 25.5 35.3 TABLE V THEORETICAL TIME COMPLEXITY OF NAIVE AND ACCELERATED CE ALGORITHMS. Algorithm Time Complexity HE FHE SMIRANK FSMIRANK O(2MN+2B) O((1/s2+1)MN +Ng) O(2MN +K22B+K3) O((1/s2+1)MN+KNg2+ (KNg/2B) 3) histogram requires time O(MN). Generating the mapping function requires time O(2B), and finally applying pixel-wise transform to yield the enhanced image requires time O(MN). As a result, the total time complexity of HE is O(2MN+2B) [3]. For FHE, such corresponding three items require times O(MN/s2), O(Ng) and O(MN), respectively. The mapping function calibration costs time O(1). So the total time complexity of FHE is O((1/s2+1)MN +Ng). For SMIRANK, the whole computational cost mainly comes from the computations of blockwise histograms, mutual information matrix, the rank vector and pixel value mapping. Such four items requires times O(MN), O(K22B), O(K3) and O(MN), respectively. Here, K denotes the number of gray levels existing in the primary input image. Therefore, the total time complexity for SMIRANK is O(2MN+K22B+K3). Correspondingly, the total time complexity of FSMIRANK is O((1/s2+1)MN+KNg2+(KNg/2B)3), where the mutual information matrix and rank vector are calculated in terms of downsampled gray levels. We also noted that  can be set automatically based on the gradient magnitude map of input images [2]. We also conduct related experiments and find that such automatic setting may slightly improve the visual quality at a cost of increasing a little computational time. Nevertheless, comparing with the prior art, the computational performance superiority of FSMIRAMK gained by the integrated acceleration strategies is still rather evident. 5. Conclusions In this paper, a fundamental framework is proposed to accelerate general histogram-based image CE algorithms. Both spatial downsampling and histogram simplifying mechanisms are investigated deeply and adapted to significantly decrease the computational complexity of prior CE techniques. Mapping function calibration is novelly proposed to reconstruct the transform on the gray levels missed by downsampling. The case studies on two typical CE algorithms, i.e., HE and SMIRANK, are presented detailedly. Effectiveness of our proposed CE acceleration scheme has been validated by the extensive experimental results on four 13 standard databases. In conclusion, our proposed CE acceleration framework can be friendly used to remarkably improve the computational efficiency of histogram-based CE algorithms, while perceptual quality of enhanced images can still be preserved. Reference [1] R. C. Gonzalez and R. E. Woods, “Digital Image Processing,” 3rd ed. Upper Saddle River, NJ, USA: Prentice-Hall, 2006. [2] T. Celik, “Spatial mutual information and PageRank-based contrast enhancement and qualityaware relative contrast measure,” IEEE Trans. on Image Process., vol. 25, no. 10, pp. 47194728, 2016. [3] T. Arici, S. Dikbas and Y. Altunbasak, “A histogram modification framework and its application for image contrast enhancement,” IEEE Trans. Image Process., vol. 18, no. 9, pp. 1921-1935, 2009. [4] S. Agaian, B. Silver and K. Panetta, “Transform coefficient histogram based image enhancement algorithms using contrast entropy,” IEEE Trans. Image Process., vol. 16, no. 3, pp. 741-758, Mar 2007. [5] R. Fattal, “Edge-avoiding wavelets and their applications,” ACM Trans. on Graphics, vol. 28, no. 3, pp. 1-10, 2009. [6] T. Celik, “Spatial entropy-based global and local image contrast enhancement,” IEEE Trans. Image Process., vol. 23, no. 12, pp. 5298-5308, 2014. [7] Y.-T. Kim, “Contrast enhancement using brightness preserving bi-histogram equalization,” IEEE Trans Consum. Electron., vol. 43, no. 1, pp.1-8, 1997. [8] T. Celik and T. Tjahjadi, “Automatic image equalization and contrast enhancement using gaussian mixture modeling,” IEEE Trans. on Image Process., vol. 21, no. 1, pp. 145-156, 2012 [9] O. Ghita, D. E. Ilea and P. F. Whelan, “Texture enhanced histogram equalization using TV-L1 image decomposition,” IEEE Trans. on Image Process., vol. 22, no. 8, pp. 3133-3144, 2013 [10] K. Gu, G. Zhai, W. Lin and M. Liu, “The analysis of image contrast: from quality assessment to automatic enhancement,” IEEE Trans. Cybernetics, vol. 46, no. 1, pp. 284-297, 2016. [11] K. Gu, G. Zhai, X. Yang, W. Zhang and C. W. Chen, “Automatic contrast enhancement technology with saliency preservation,” IEEE Trans. Circuits and Systems for Video Technology, vol. 25, no. 9, pp. 1480-1494, 2015. [12] S.-C. Huang, F.-C. Cheng and Y.-S. Chiu, “Efficient contrast enhancement using adaptive gamma correction with weighting distribution”, IEEE Trans. Image Process., vol. 22, no. 3, pp. 1032-1041, 2013. [13] Z. Yu and C. Bajaj, “A fast and adaptive method for image contrast enhancement,” Proc. Intl. Conf. on Image Process., pp. 1001-1004, 2004. 14 [14] Q. Wang and R. K. Ward, “Fast image/video contrast enhancement based on weighted thresholded histogram equalization,” IEEE Trans. on Consumer Electronics, vo. 53, no. 2, pp. 757-764, 2007. [15] S. R. Sternberg, “Parallel architectures for image processing,” Real-Time Parallel Computing, Springer US, pp. 347-359, 1981. [16] B. Wilkinson and M. Allen, “Parallel programming: techniques and applications using networked workstations and parallel computers,” Prentice-Hall, 1999. [17] N. Ponomarenko, L. Jin, O. Ieremeiev, V. Lukin, K. Egiazarian, J. Astola, B. Vozel, K. Chehdi, M. Carli, F. Battisti and C.-C. J. Kuo, “Image database tid2013: Peculiarities, results and perspectives,” Signal Processing: Image Communication, vol. 30, pp. 57-77, 2015. [18] E. Larson and D. Chandler, “Most apparent distortion: full-reference image quality assessment and the role of strategy,” Journal of Electronic Imaging, vol. 19, no. 1, pp. 011 006(1-21), 2010. [19] M. Brown and S. Susstrunk, “Multispectral SIFT for scene category recognition,” in Proc. Computer Vision and Pattern Recognition, pp. 177-184, 2011. [20] Kodak Lossless True Color Image Suite. Online available: http://r0k.us/graphics/kodak/, 2010. [21] W. Xue, L. Zhang, X. Mou and A. C. Bovik, “Gradient magnitude similarity deviation: a highly efficient perceptual image quality index,” IEEE Trans. Image Process., vol. 23, no. 2, pp. 684695, 2014. [22] S. Wang, K. Ma, H. Yeganeh, Z. Wang and W. Lin, “A patch-structure representation method for quality assessment of contrast changed images,” IEEE Signal Process. Lett., vol. 22, no. 12, 2387-2390, 2015. [23] K. Gu, D. Tao, J.-F. Qiao and W. Lin, “Learning a no-reference quality assessment model of enhanced images with big data,” IEEE Trans. Neural Networks and Learning Systems, 10.1109/ TNNLS.2017.2649101, in press, 2017. [24] P. Arbelaez, M. Maire, C. Fowlkes and J. Malik, “Contour detection and hierarchical image segmentation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 3, no. 5, pp. 898-916, 2011. 15
1cs.CV
arXiv:1211.6134v2 [math.DG] 29 Apr 2013 ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS DAVID CARCHEDI AND DMITRY ROYTENBERG Abstract. This is the first in a series of papers laying the foundations for a differential graded approach to derived differential geometry (and other geometries in characteristic zero). In this paper, we study theories of supercommutative algebras for which infinitely differentiable functions can be evaluated on elements. Such a theory is called a super Fermat theory. Any category of superspaces and smooth functions has an associated such theory. This includes both real and complex supermanifolds, as well as algebraic superschemes. In particular, there is a super Fermat theory of C∞ -superalgebras. C∞ -superalgebras are the appropriate notion of supercommutative algebras in the world of C∞ -rings, the latter being of central importance both to synthetic differential geometry and to all existing models of derived smooth manifolds. A super Fermat theory is a natural generalization of the concept of a Fermat theory introduced by E. Dubuc and A. Kock. We show that any Fermat theory admits a canonical superization, however not every super Fermat theory arises in this way. For a fixed super Fermat theory, we go on to study a special subcategory of algebras called near-point determined algebras, and derive many of their algebraic properties. Contents 1. Introduction. 1.1. Organization and main results 2. Fermat Theories. 2.1. Examples of Lawvere Theories 2.2. Fermat theories 2.3. Nilpotent extensions 3. Super Fermat Theories 3.1. Superalgebras and superizations 3.2. Nilpotent Extensions of Superalgebras 3.3. Some constructions. 4. Near-point Determined Algebras 4.1. Radicals 4.2. Near-point determined superalgebras 4.3. Flatness of near-point determined superalgebras Appendix A. Algebraic theories A.1. Sifted Colimits A.2. Morphisms of Theories Appendix B. Multisorted Lawvere Theories B.1. Congruences Date: April 30, 2013. 1 2 3 5 5 8 15 19 19 26 27 31 31 39 45 48 50 53 56 61 2 DAVID CARCHEDI AND DMITRY ROYTENBERG 63 References 1. Introduction. The purpose of this paper is to introduce super Fermat theories. This theory will form the basis of our approach to differential graded models for derived manifolds. Super Fermat theories are theories of supercommutative algebras in which, in addition to evaluating polynomials on elements, one can evaluate infinitely differentiable functions. In particular, they provide a unifying framework to study the rings of functions of various flavors of smooth superspaces, e.g. regular functions on algebraic superschemes, smooth functions on smooth supermanifolds, and holomorphic functions on complex supermanifolds. The basic idea is to take seriously the notion that every type of geometry must have its own intrinsic version of commutative algebra associated to it (with the classical theory of commutative rings corresponding to algebraic geometry). Of central importance is the example of C∞ -superalgebras which are the appropriate notion of supercommutative algebras in the world of C∞ -rings, the commutative algebras associated to differential geometry. A C∞ -ring is a commutative R-algebra which, in addition to the binary operations of addition and multiplication, has an n-ary operation for each smooth function f : Rn → R, subject to natural compatibility. They were introduced by W. Lawvere in his Chicago lectures on categorical dynamics, but first appeared in the literature in [24] and [10]. Their inception lies in the development of models for synthetic differential geometry [11, 22, 18, 8, 19, 12, 20, 15]; however, recently they have played a pivotal role in developing models for derived differential geometry [25, 14, 7]. In [13], E. Dubuc and A. Kock introduce Fermat theories, which provide a unifying framework for the algebraic study of polynomials using commutative rings, and the algebraic study of smooth functions using C∞ -rings. Fermat theories are, in a precise way, theories of rings of infinitely differentiable functions. Recall that for a smooth function f (x, z1 , . . . , zn ) on Rn+1 , there exists a unique smooth function ∆f n+2 – the difference quotient – such that for all x and y, ∆x (x, y, z1 , . . . , zn ) on R (1.1) Indeed, for x′ 6= y ′ , but for x′ = y ′ , f (x, z) − f (y, z) = (x − y) · ∆f (x, y, z) . ∆x ∆f ′ ′ f (x′ , z) − f (y ′ , z) (x , y , z) = ∆x x′ − y ′ ∆f ′ ′ ∂f ′ (x , x , z) = (x ) , ∆x ∂x a result known as Hadamard’s Lemma. In fact, if one took (1.2) as a definition of the partial derivative, all of the classical rules for differentiation could be derived from (1.1) using only algebra. The key insight of Dubuc and Kock in [13] is that equation (1.1) makes sense in a more general setting, and one can consider algebraic theories extending the theory of commutative rings whose operations are labeled (1.2) ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 3 by functions satisfying a generalization of (1.1) called the Fermat property (since Fermat was the first to observe that it holds for polynomials). For examples and non-examples of Fermat theories, see Section 2.2.3. Many important properties of C∞ -rings hold for any Fermat theory. For example, if E is a Fermat theory, A an E-algebra, and I ⊂ A an ideal of the underlying ring, then A/I has the canonical structure of an E-algebra. Moreover, the fact that the theory of C∞ -rings satisfies the Fermat property is a key ingredient in many well-adapted models of synthetic differential geometry. In this paper, we show that the Fermat property is ideally suited to study supergeometry, as any Fermat theory admits a canonical superization. The superization of a Fermat theory is a 2-sorted algebraic theory extending the theory of supercommutative algebras, and satisfies a modified version of the Fermat property which we call the super Fermat property. An important example of a super Fermat theory is the theory of super C ∞ -rings, which is the superization of the theory of C ∞ -rings. However, super Fermat theories are more general than Fermat theories, as not every super Fermat theory arises as a superization. Super Fermat theories are an essential ingredient to our development of a differential graded approach to derived differential geometry. Of particular importance is the theory of C∞ -superalgebras. Our approach is based upon exploiting the connection between supercommutativity and differential graded algebras. In [9], we define the concept of a differential graded E-algebra for a super Fermat theory E, and develop homological algebra in this setting. In light of the history of C∞ -rings and their role in synthetic differential geometry, it is natural to believe that super Fermat theories should play a pivotal role in synthetic supergeometry, but we do not pursue this in this paper. It is worth mentioning however, that our notion of superization is different from that of Yetter’s [26], as his approach results in a uni-sorted Lawvere theory, and also applies in a more restrictive context; the superization of the theory of C∞ -rings in Yetter’s sense embeds diagonally into our 2-sorted superization. Our theory is also quite different from that of [21] as his theory concerns itself with G∞ -supermanifolds, whereas our approach is more in tune with supermanifolds in the sense of [17]. 1.1. Organization and main results. In Section 2, we begin by reviewing the concept of a Fermat theory introduced in [13]. We then introduce the concept of a reduced Fermat theory, which is a Fermat theory that is, in a precise sense, a “theory of functions.” We go on to show that we can associate to any Fermat theory a reduced Fermat theory in a functorial way; moreover, for every commutative ring K there is a maximal reduced Fermat theory with K as the ground ring (for K = R, we recover the theory C∞ of smooth functions). Section 3 introduces the main subject of this paper, the concept of a super Fermat theory. We show that any Fermat theory has associated to it a canonical super Fermat theory called its superization, and conversely, any super Fermat theory has an underlying Fermat theory. Moreover, we prove the following: Theorem 1.1. (Corollary 3.12) The superization functor S : FTh → SFTh from Fermat theories to super Fermat theories is left adjoint to the underlying functor ( )0 : SFTh → FTh. 4 DAVID CARCHEDI AND DMITRY ROYTENBERG We also develop some aspects of supercommutative algebra for algebras over a super Fermat theory and prove a useful property of morphisms of super Fermat theories: Theorem 1.2. 3.32 Let F : S → S′ be a morphism of super Fermat theories. Then the induced functor F! : SAlg → S′ Alg preserves finite products. In Section 4, we begin the study of near-point determined algebras for a super Fermat theory. This is a generalization of the notion near-point determined introduced in [20] for finitely generated C ∞ -rings to the setting of not necessarily finitely generated algebras over any super Fermat theory. We then prove that near-point determined algebras are completely determined by their underlying K-algebra, where K is the ground ring of the theory: Theorem 1.3. (Corollary 4.36) If A and B are E-algebras and B is near-point determined, then any K-algebra morphism ϕ : A → B is a map of E-algebras. This is a broad generalization of the result proven by Borisov in [6] in the case of C∞ -rings. Borisov uses topological methods in his proof, tailored specifically to the case of C∞ -rings. We show that this result holds in a much more general context, and follows by completely elementary algebraic methods. We go on to define what it means for a super Fermat theory to be super reduced, a subtle generalization of the notion of a reduced Fermat theory suitable in the supergeometric context, and show that any free algebra for a super reduced Fermat theory is near-point determined. We end this section by investigating to what extent near-point determined algebras over a super Fermat theory E whose ground ring K is a field are flat. Near-point determined E-algebras are a reflective subcategory of E-algebras, and hence have their own tensor product ⊙ ◦ (coproduct). In particular, we prove the following: Theorem 1.4. (Lemma 4.52 and Lemma 4.54) For any near-point determined E-algebra A, the endofunctor A⊙ ◦ ( ) : EAlgnpd → EAlgnpd preserves finite products and monomorphisms, where EAlgnpd is the category of near-point determined E-algebras. Finally, in the appendices, we give a detailed introduction to algebraic theories and multi-sorted Lawvere theories, mostly following [3, 5], and introduce many of the conventions and notations concerning their use in this paper. Acknowledgement. We would like to thank Mathieu Anel, Christian Blohmann, Dennis Borisov, Eduardo Dubuc, Wilberd van der Kallen, Anders Kock, Ieke Moerdijk, Justin Noel, Jan Stienstra, and Peter Teichner for useful conversations. The first author would like to additionally thank the many participants in the “Higher Differential Geometry” seminar (formerly known as the “Derived Differential Geometry” seminar) at the Max Planck Institute for Mathematics. The second author was supported by the Dutch Science Foundation “Free Competition” grant. He would also like to thank the Radboud University of Nijmegen, where part of this work was carried out, for hospitality. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 5 2. Fermat Theories. 2.1. Examples of Lawvere Theories. A review of the basics of algebraic theories and multi-sorted Lawvere theories, as well as many notational conventions concerning them, is given in Appendices A and B. Before presenting Fermat theories in general, we begin by introducing some instructive motivating examples: Example 2.1. Let Com be the opposite category of finitely generated free commutative (unital, associative) rings. Up to isomorphism, its objects are of the form Z[x1 , · · · , xn ] ∼ = Z[x]⊗n . Since we are in the opposite category, and the tensor product of commutative rings is the coproduct, every object of Com is a finite product of the object Z[x]. With this chosen generator, Com is a Lawvere theory. It is sometimes useful to take the dual geometric viewpoint. We can consider the category whose objects are finite dimensional affine spaces AnZ over Z, so their morphisms are polynomial functions with integer coefficients. This category is canonically equivalent to Com. Indeed, each affine space AnZ corresponds to the ring Z[x1 , · · · , xn ], and since Z[x] is the free commutative ring on one generator, we have the following string of natural isomorphisms: ∼ Hom (AnZ , Am Z ) = ∼ = ∼ = ∼ = Z[x1 , · · · , xn ]m m Hom (Z[x], Z[x1 , · · · , xn ])  Hom Z[x]⊗m , Z[x1 , · · · , xn ] Hom (Z[x1 , · · · , xm ], Z[x1 , · · · , xn ]) , where Z[x1 , · · · , xn ]m denotes the underlying set of the ring. Notice that the affine line AZ is a commutative ring object in Com. Indeed, the polynomial m (x, y) = x · y ∈ Z[x, y] is classified by a morphism which corresponds to a morphism Z[x] → Z[x, y] m : A2Z → AZ , which is multiplication. Similarly, the polynomial a (x, y) = x + y induces a map a : A2Z → AZ , which is addition. Finally, the ring unit 1 ∈ Z[x] induces a map u : A0Z → AZ which is the unit map of this ring object. 6 DAVID CARCHEDI AND DMITRY ROYTENBERG Let A be a commutative ring. Then it induces a functor à : Com → Set Z[x1 , · · · , xn ] 7→ Hom (Z[x1 , · · · , xn ], A) , which is product preserving, hence a Com-algebra. Moreover, since Z[x] is the free commutative ring on one generator, the underlying set of à is à (Z[x]) ∼ = A, the underlying set of A. Conversely, suppose that B is a Com-algebra. Then, as it is a finite product preserving functor, and the diagram expressing that an object in a category is a ring object only uses finite products, it follows that the data (B := B (AZ ) , B (m) , B (a) , B (u)) encodes a commutative ring (in Set.) Moreover, it can be checked that if µ : B ⇒ B′ is a natural transformation between product preserving functors from Com to Set, that µ (AZ ) : B → B ′ is a ring homomorphism, and conversely, if ϕ : A → A′ is a ring homomorphism, µ (AnZ ) = ϕn : An → A′ n defines a natural transformation à ⇒ Ã′ . It follows that the category ComAlg is equivalent to the category of commutative rings. Using the notation (B.2), one has that Com (n) = Z[x1 , · · · , xn ] and its underlying set is given by Z[x1 , · · · , xn ] = Com (n, 1) ∼ = Hom (AnZ , AZ ) . One may succinctly say that Com is the Lawvere theory whose n-ary operations are labeled by the elements of Z[x1 , . . . , xn ], and its algebras are commutative rings. Notice that for a given commutative ring A, congruences of A are in bijection with ideals. Indeed, given an ideal I, it defines a subring R (I) of A × A whose elements are pairs (a, a′ ) such that a − a′ ∈ I. Conversely, given a congruence R ֌ A × A, the subset I := {a ∈ A | (a, 0) ∈ R.} , is an ideal of A. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 7 Example 2.2. Let K be a commutative ring. Then one may consider ComK to be the opposite category of finitely generated free K-algebras. Up to isomorphism, its objects are of the form ∼ K[x]⊗nK . K[x1 , · · · , xn ] = Since we are in the opposite category, tensoring over K corresponds to taking the product, and this category is a Lawvere theory with generator K[x] ∼ = K ⊗Z Z[x]. We see that this Lawvere theory is a particular instance of Remark B.16. Algebras for this Lawvere theory are precisely K-algebras, and congruences are again ideals. One may also view the category ComK as the category of finite dimensional affine planes AnK over K. Example 2.3. When K = R, one may view the category ComR as the category whose objects are manifolds of the form Rn and whose morphisms are polynomial functions. From the geometric view point, it is natural to ask what happens if one allows arbitrary smooth functions instead. The resulting category, which is a full subcategory of the category of smooth manifolds Mfd, is a Lawvere theory with generator R. We denote this Lawvere theory by C∞ . It is the motivating example for this paper. It may be described succinctly by saying its n-ary operations are labeled by elements of C∞ (n, m) = C ∞ (Rn , Rm ). Notice that, there is a canonically induced functor ComR → C∞ sending each manifold to itself, and each polynomial to itself viewed as a smooth function. This is a map of Lawvere theories, so there is an induced adjunction ComR Alg o (d) ( )♯ / C∞ Alg, where, for a C∞ -algebra A, A♯ is its underlying R-algebra, and if R is an R-algebra, b is its C ∞ -completion. In particular, R R[x1\ , · · · , xn ] ∼ = C∞ (Rn ) . The functor ( )♯ is faithful and conservative, therefore one may regard a C∞ algebra as an R-algebra with extra structure. This extra structure is encoded by a whole slew of n-ary operations, one for each smooth function f : Rn → R, subject to natural compatibility. For example, if M is a smooth manifold, then it induces a product preserving functor C∞ (M ) : C∞ Rn → Set 7→ Hom (M, Rn ) . C∞ (M ) is a C∞ -algebra whose underlying R-algebra is the ordinary ring of smooth functions C ∞ (M ) . Given a smooth function f : Rn → R, 8 DAVID CARCHEDI AND DMITRY ROYTENBERG it induces an n-ary operation n C∞ (M ) (f ) : C∞ (M ) → C∞ (M ) , defined by C∞ (M ) (f ) (ϕ1 , · · · , ϕn ) (x) = f (ϕ1 (x) , · · · , ϕn (x)) . C∞ -algebras come with their own notion of tensor product (coproduct), and we denote the C∞ -tensor product of A and B by A ∞ B. Unlike for the ordinary tensor product of R-algebras, one has for (Hausdorff, second countable) smooth manifolds M and N, the equality [20]: C∞ (M ) ∞ C∞ (N ) ∼ = C∞ (M × N ) . Hence, they are ideally suited for the theory of manifolds. At the same time, the theory C∞ -algebras closely resembles the theory of commutative rings, as it enjoys a very nice property, namely the Fermat property, which is the subject of the next subsection. 2.2. Fermat theories. A Fermat theory is an extension E of Com that has an intrinsic notion of derivative obeying the expected rules (the chain rule, the Taylor formula, etc.). Standard notions of differential calculus, such as derivations and differentials, can be defined for E-algebras. The notion of Fermat theory was introduced and studied by Dubuc and Kock in [13]. In what follows, we recall some key definitions and results from that paper. 2.2.1. The Fermat Property. Let E be extension of Com, that is a Lawvere theory E with a map of Lawvere theories τE : Com → E, i.e. an object of the undercategory Com/LTh. The structure map τE induces an adjunction ComAlg o ∗ τE τ!E / EAlg . Observe first that K = E(0), being the free E-algebra on the empty set, has an underlying ring structure. Categorically, E(0) is a finite product preserving Setvalued functor, and composition with τE induces a Com-algebra τE E(0) Com −−−−−−−→ E −−−−−−−→ Set. This Com-algebra is just τE∗ (E(0)) , and since the underlying set of an algebra for a Lawvere theory is determined by its value as a functor on the generator, and τE preserves generators, τE∗ (E(0)) has the same underlying set as E(0). Now that this is clear, we will abuse notation and denote τE∗ (A) , for an E-algebra A, simply by A. On one hand, since E(0) is the initial E-algebra, there is a unique E-algebra map from K to E(n) for each n. In particular, it is a map of rings. On the other hand, the unit of the adjunction τ!E ⊣ τE∗ is map of rings Com(n) → E(n). Hence, we have a map of rings K[x1 , . . . , xn ] = ComK (n) = K ⊗Z Com(n) → E(n). Since this is obviously compatible with compositions, we deduce that the structure map τE : Com → E factors through ComK . So every E-algebra has an underlying ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 9 commutative K-algebra structure. Let us denote the corresponding forgetful functor by ( )♯ : EAlg −→ ComAlgK and its left adjoint – the E-algebra completion – by (d) : ComAlgK −→ EAlg. We shall refer to K as the ground ring of the theory E. Remark 2.4. The name completion should be taken with a grain of salt. For example, the theory of C∞ -algebras is an extension of Com with ground ring R. Consider C as an R-algebra. We can present it as  C = R[x]/ x2 + 1 . It follows that the C∞ -completion of C is  b = C∞ (R) / x2 + 1 , C b = {0}, the however the function x2 + 1 is a unit in C∞ (R) , so we have that C terminal algebra. Notation. Denote by ⊙ the binary coproduct in EAlg. Denote the free E-algebra on generators x1 , . . . , xn by K{x1 , . . . , xn } (or KE {x1 , . . . , xn } when there are several theories around and we need to be clear which one we mean). It is synonymous with E(n), but with the generators named explicitly. If A ∈ EAlg, let A{x1 , . . . , xn } = A ⊙ K{x1 , . . . , xn }. It solves the problem of universally adjoining variables to an E-algebra. Remark 2.5. The E-algebra completion of K[x1 , . . . , xn ] is K{x1 , . . . , xn }. Definition 2.6. [13] An extension E of Com is called a Fermat theory if for every f ∈ K{x, z1 , . . . , zn } there exists a unique ∆f ∆x ∈ K{x, y, z1 , . . . , zn }, called the difference quotient, such that ∆f (x, y, z) ∆x where z = (z1 , . . . , zn ). A Fermat theory over Q is a Fermat theory whose structure map factors through ComQ . Let FTh (resp. FTh/Q , FThK ) denote the full subcategory of Com/LTh (resp. ComQ /LTh, ComK /LTh) consisting of the Fermat theories (resp. Fermat theories over Q, Fermat theories with ground ring K). (2.1) f (x, z) − f (y, z) = (x − y) · For the rest of this subsection, let E denote a Fermat theory with ground ring K. Note. The ground ring of a Fermat theory over Q always contains Q but is generally different from it, so the categories FThQ and FTh/Q are different. An immediate consequence of the Fermat property is the following: Proposition 2.7. [13] For any f ∈ K{x1 , . . . , xn }, there exist gi ∈ K{x1 , . . . , xn , y1 , . . . , yn }, 10 DAVID CARCHEDI AND DMITRY ROYTENBERG i = 1, . . . , n, such that (2.2) f (x1 , . . . , xn ) − f (y1 , . . . , yn ) = n X i=1 (xi − yi ) · gi (x1 , . . . , xn , y1 , . . . , yn ) . The following corollary is the cornerstone of the theory of Fermat theories: Corollary 2.8. [13] Let A be an E-algebra, I ⊂ A an ideal in the underlying ring. Then the induced equivalence relation on A (a ∼ b modulo I iff a − b ∈ I) is an E-congruence. Consequently, there is a unique E-algebra structure on A/I making the projection A → A/I a map of E-algebras. Proof. It suffices to show that if I is an ideal of A, and a1 , . . . , an and b1 , . . . , bn are in A such that for each i, then for each f ∈ E (n, 1) , ai − bi ∈ I, A (f ) (a1 , . . . , an ) − A (f ) (b1 , . . . , bn ) ∈ I. There exists a unique morphism ϕ : K{x1 , . . . , xn , y1 , . . . , yn } → A sending each xi to ai and each yi to bi . Note that by 2.7 there exists g1 , . . . , gn ∈ K{x1 , . . . , xn , y1 , . . . , yn } such that (2.2) holds. Notice for any g ∈ K{x1 , . . . , xn , y1 , . . . , yn }, ϕ (g) = A (g) (ϕ (x1 ) , . . . , ϕ (xn ) , ϕ (y1 ) , . . . , ϕ (yn )) . It follows that A (f ) (a1 , . . . , an )−A (f ) (b1 , . . . , bn ) = n X i=1 (ai − bi )·A (gi ) (a1 , . . . , an , b1 , . . . , bn ) ∈ I.  2.2.2. Derivatives. Suppose we are given an f ∈ K{x1 , . . . , xn }. Fix an i ∈ {1, . . . , n}, let x = xi and consider f as an element of R{x} with R = K{x1 , . . . , x̂i , . . . , xn } (the hat indicates omission). By the Fermat property (2.1), there is a unique ∆f ∆x ∈ R{x, y} such that ∆f (x, y). ∆x Define the partial derivative of f with respect to xi to be f (x) − f (y) = (x − y) · ∆f ∂f = (x, x) ∈ R{x} = K{x1 , . . . , xn }. i ∂x ∆x When n = 1, we shall also write f ′ (x) for ∂f /∂x1 . ∂i f = As expected, the partial derivatives satisfy the chain rule: ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 11 Proposition 2.9. [13] Let ϕ ∈ E(k, 1), f = (f 1 , . . . , f k ) ∈ E(n, k). Then for all i = 1, . . . , n we have k X (∂i f j )(∂j ϕ ◦ f ). ∂i (ϕ ◦ f ) = j=1 Here the partial derivatives can be interpreted as operators ∂i : E(n) −→ E(n) on the E-algebra E(n), satisfying a “derivation rule” for every k-ary E-operation ϕ on E(n) [13]. In particular, letting ϕ be addition (resp. the multiplication) we get the familiar K-linearity (resp. Leibniz rule). Remark 2.10. We have slightly abused notation since the partial derivative operators ∂i are not morphisms of E-algebras. Proposition 2.11. (Clairaut’s theorem). The partial derivatives commute: ∂i ∂j = ∂j ∂i ∀i, j. Proof. We shall give the proof in the two-variable case only; the general case is proven in exactly the same way. Let f = f (x, y) ∈ E(2, 1). We obviously have (f (x, y) − f (z, y)) − (f (x, w) − f (z, w)) = (f (x, y) − f (x, w)) − (f (z, y) − f (z, w)). Applying the Fermat property on both sides we get (x − z)(g(x, z, y) − g(x, z, w)) = (y − w)(h(x, y, w) − h(z, y, w)) for unique difference quotients g and h. Applying the Fermat property again, we get (x − z)(y − w)φ(x, z, y, w) = (y − w)(x − z)ψ(x, z, y, w) for unique difference quotients φ and ψ. By uniqueness, x − z and y − w are not zero-divisors, hence φ(x, z, y, w) = ψ(x, z, y, w). Now, setting x = z and y = w, we obtain the sought after ∂2 ∂1 f (x, y) = ∂1 ∂2 f (x, y).  Corollary 2.12. [13] (The Taylor formula). For any f ∈ K{x1 , . . . , xp , z1 , . . . , zq }, n ≥ 0 and multi-indices α and β, there exist unique hα ∈ K{x1 , . . . , xp , z1 , . . . , zq } and (not necessarily unique) gβ ∈ K{x1 , . . . , xp , y1 , . . . , yp , z1 , . . . , zq } such that (2.3) f (x + y, z) = n X hα (x, z)yα + |α|=0 Furthermore, if K ⊃ Q, we have hα (x, z) = the usual Taylor coefficients. X |β|=n+1 ∂xα f (x, z) , α! yβ gβ (x, y, z). 12 DAVID CARCHEDI AND DMITRY ROYTENBERG 2.2.3. Examples and non-examples. Example 2.13. The theory Com of commutative algebras is itself a Fermat theory, with ground ring Z. It is the initial Fermat theory. Similarly, ComK is the initial Fermat theory over K. Example 2.14. The theory C∞ of C ∞ -algebras, with C∞ (n, m) = C ∞ (Rn , Rm ), the set of real smooth functions is a Fermat theory. This is Example 2.3. The category C ∞ is the full subcategory of smooth manifolds spanned by those of the form Rn , and the ground ring of this theory is R. Example 2.15. The theory Cω of real analytic algebras, with Cω (n, m) = C ω (Rn , Rm ), the set of real analytic functions is a Fermat theory. It is equivalent to the full subcategory of real analytic manifolds spanned by those of the form Rn . The ground ring is again R. Example 2.16. The theory H of complex holomorphic algebras, with H(n, m) = H(Cn , Cm ), the set of complex holomorphic (entire) functions, is a Fermat theory. The category is equivalent to the full subcategory of complex manifolds spanned by those of the form Cn . The ground ring of this theory is C. Example 2.17. The theory HR of real holomorphic algebras, with HR (n, m) = H(Rn , Rm ), the set of those entire functions which are invariant under complex conjugation, is a Fermat theory. The ground ring is R. Example 2.18. Let K be an integral domain, k its field of fractions. Let the theory RK consist of global rational functions, i.e. rational functions with coefficients in K having no poles in k. It is a Fermat theory with ground ring k. Example 2.19. The theory C∞ C with C∞ C (n, m) = C∞ (Cn , Cm ), the set of functions which are smooth when viewed as functions from R2n to R2m , is not a Fermat theory, as the Fermat property for complex-valued functions implies the Cauchy-Riemann equations. Likewise, the theory Cω C , defined analogously, is not a Fermat theory. Example 2.20. The theory Ck of k times continuously differentiable real functions is not a Fermat theory for any 0 ≤ k < ∞: given an f of class C k , the difference quotient appearing in (2.1) is only of class C k−1 . Example 2.21. As shown in [13], if E is a Fermat theory and A is any E-algebra, the theory EA of E-algebras over A is also Fermat, with A as the ground ring. This gives many examples of Fermat theories. We have proper inclusions of Fermat theories ComR ( HR ( Cω ( C∞ , ComR ( ComC ( H and HR ( H, making various diagrams commute. Remark 2.22. As C is neither a C∞ - nor Cω -algebra, and nor is R an H-algebra, putting superscripts instead of subscripts in our notation for the theories C∞ C , Cω C and HR avoids possible confusion. However, notice that C is an HR -algebra, and HR C = H. Example 2.23. Fermat theories have associated geometries. For instance, if X is a smooth (resp. real analytic, complex) manifold, its structure sheaf OX is ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 13 actually a sheaf of C∞ - (resp. Cω -, H-) algebras. If X is real analytic, XC its complexification, the Cω -algebra structure on OX does not extend to OXC , but the underlying HR -structure does extend to an HR C = H-algebra structure on OXC . 2.2.4. Evaluations at K-points. Let E be an extension of Com. For the initial Ealgebra K, we can think of its E-algebra structure as a collection of evaluation maps (2.4) evn : K{x1 , . . . , xn } −→ Set(Kn , K), n ≥ 0, where, for f = f (x1 , . . . , xn ) ∈ K{x1 , . . . , xn } and p = (p1 , . . . , pn ) ∈ Kn we denote f (p) = f (p1 , . . . , pn ) = ev(f )(p) = evp (f ) ∈ K. Notice that ev is in fact a map of E-algebras; in other words, evp : K{x1 , . . . , xn } → K is a morphism of E-algebras for each p. Furthermore, Set(Kn , K) has a point-wise E-algebra structure making evn into a E-algebra map. The following proposition can be proved in several ways; the short proof below was suggested by E. Dubuc. Proposition 2.24. Let E be a Fermat theory, K = E(0). Then, given an arbitrary E-algebra A, any K-algebra homomorphism φ : A → K is a morphism of E-algebras. Proof. Let I = Ker φ. On one hand, by Corollary 2.8, there is a unique E-algebra structure on A/I making the projection π : A → A/I an E-algebra homomorphism. On the other hand, notice that φ is surjective (since it preserves units), hence it factors as φ = φ̃◦π, where φ̃ : A/I → K is a K-algebra isomorphism. However, since K is initial both as a K-algebra and as a E-algebra, the E-algebra structure on K is uniquely determined by its K-algebra structure; therefore, φ̃ is also an isomorphism of E-algebras. It follows immediately that φ is an E-algebra homomorphism.  Corollary 2.25. Any K-algebra homomorphism P : K{x1 , . . . , xn } −→ K is of the form evp for some p ∈ Kn . Proof. P is in fact an E-algebra homomorphism by Proposition 2.24. The conclusion follows by observing that K{x1 , . . . , xn } is the free E-algebra on n generators.  2.2.5. Reduced Fermat theories. As the following examples show, the evaluation maps (2.4) need not be injective. Example 2.26. Let E = ComK , where K is a finite ring, with elements labeled k1 , . . . , kN . Then the polynomial p(x) = (x − k1 ) · · · (x − kN ) evaluates to 0 on every k ∈ K, and yet is itself non-zero (being a monic polynomial of degree N ). It is easy to see that this phenomenon cannot occur for ComK with K containing Q. However, the next example illustrates that it can occur even for theories over Q. 14 DAVID CARCHEDI AND DMITRY ROYTENBERG Example 2.27. Consider the C∞ -algebra K = C ∞ (R)0 of germs of smooth functions of one variable. It can be presented as the quotient of C ∞ (R) by the ideal mg0 consisting of those smooth functions f (x) which vanish on some neighborhood of 0. Let E = C∞ K . It follows (cf. [20], p. 49) that K{y} is the quotient of C ∞ (R2 ) by the ideal mtub x=0 consisting of those functions f (x, y) which vanish on some tubular neighborhood of the y-axis (i.e. a set of the form (−ǫ, ǫ) × R for some ǫ > 0). If g is the germ at the origin of some function g(x) and [f ] is the class modulo mtub x=0 of some function f (x, y), then evg ([f ]) is the germ of f (x, g(x)) at the origin. Now, let f (x, y) be a smooth function whose vanishing set contains some neighborhood of the y-axis but does not contain any tubular neighborhood. Then the class [f ] ∈ K{y} is non-zero, and yet evg ([f ]) = 0 for all g. Definition 2.28. A Fermat theory E is called reduced if all the evaluation maps (2.4) are injective. Thus, reduced theories are “theories of differentiable functions” in the sense that n-ary operations are labeled by functions from Kn to K. For instance, ComK is reduced for K ⊃ Q, as are the theories C∞ , Cω , H and HR . Non-reduced theories, such as the ones in Examples 2.26 and 2.27, can be viewed as pathological in some sense. We are now going to describe a functorial procedure of turning any Fermat theory into a reduced one. Definition 2.29. Given a Fermat theory E, define Ered by setting Ered (n, 1) = Im evn = E(n, 1)/ Ker(evn ). Remark 2.30. As a category, one can describe Ered as the opposite category of the full subcategory of EAlg on algebras of the form E (n) /Ker(evn ). As a consequence, one has that the free Ered -algebra on n-generators is E (n) /Ker(evn ). Proposition 2.31. If E is a Fermat theory, Ered is a reduced Fermat theory. Moreover, the assignment E 7→ Ered is functorial and is left adjoint to the inclusion FThred ֒→ FTh of the full subcategory of reduced Fermat theories. The same holds with FTh replaced with FTh/Q or FThK Proof. First, Ered is in fact a theory since ev = {evn }n∈N is a map of algebraic theories from E to EndK (see Example B.18), and Ered = Im(ev), as in Remark B.17; obviously, Ered is reduced. To see that Ered remains a Fermat theory observe that, in the Fermat property n+2 (2.1) for E, if f ∈ Ker(evn+1 ), then ∆f ), and vice versa. ∆x ∈ Ker(ev The functoriality and adjointness are clear (the latter follows immediately from the presentation Ered = E/ Ker(ev)). Finally, the last statement is simply the observation that reduction does not change the ground ring.  Example 2.32. If E is as in Example 2.27, its reduction Ered can be described as follows. Let R{x, y1 , . . . , yn } = C ∞ (Rn+1 ), the free C∞ -algebra on n + 1 generag tors. Then E(n) = R{x, y1 , . . . , yn }/mtub x=0 while Ered (n) = R{x, y1 , . . . , yn }/mx=0 , tub where mx=0 is the ideal of functions vanishing in some tubular neighborhood of the hyperplane x = 0, while mgx=0 consists of functions vanishing in some (not g g necessarily tubular) neighborhood of x = 0. Clearly, mtub x=0 ( mx=0 ; in fact, mx=0 ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 15 ∞ is the germ-determined closure of mtub x=0 , hence, viewed as C -algebras, Ered (n) is the germ-determined quotient of E(n). Specifically, Ered (n) consists of germs of smooth functions on Rn+1 at the hyperplane x = 0. In fact, the free Ered -algebras Ered (n) are formed by adjoining variables to K = C ∞ (R)0 using the coproduct in the category of germ-determined C∞ -algebras. We refer to [20] for the appropriate definitions and discussion. Let us conclude this section by constructing, for any ring K, the maximal reduced Fermat theory F(K) with K as the ground ring. Indeed, the K-algebra structure on K amounts to a map of Lawvere theories ComK → EndK , and any reduced Fermat theory with ground ring K is a subtheory of EndK , as we have seen. F(K) will be the maximal Fermat subtheory of EndK . More precisely, we have Definition 2.33. Let f : Kn → K be a function. Given a k = 1, . . . , n, we say that ∆f n+1 f is differentiable in the kth variable if there is a unique function ∆x →K k : K such that ∆f f (. . . , x, . . .) − f (. . . , y, . . .) = (x − y) · (. . . , x, y, . . .). ∆xk This gk is then called the difference quotient of f with respect to the kth variable. Say that f is differentiable if it is differentiable in all the variables. Given N > 1, say that f is N times differentiable if f is differentiable and all its difference quotients are N − 1 times differentiable. Finally, say that f is smooth if it is N times differentiable for all N . Proposition-Definition 2.34. Let F(K)(n, 1) consist of all smooth functions f : Kn → K. Then F is the maximal reduced Fermat theory with ground ring K. Proof. To see that F(K) is a subtheory of EndK , just observe that the superposition of smooth functions is again smooth (the chain rule!). By construction, F(K) is a reduced Fermat theory with ground ring K and for any other Fermat theory E with ground ring K, the structure map E → EndK for the E-algebra structure on K factors through F(K).  Example 2.35. F(R) = C∞ , while F(C) = H. We do not know what F(Q) is but it certainly contains RQ (= RZ ). 2.3. Nilpotent extensions. Definition 2.36. Let K be a commutative ring, A a K-algebra. An extension of A (over K) is a surjective K-algebra homomorphism π : A′ → A. A split extension of A (over K) is an extension π : A′ → A together with a section (splitting) ι of π which is also a K-algebra homomorphism. Such a split extension is called a split nilpotent extension if additionally, the kernel Ker (π) is a nilpotent ideal. Remark 2.37. Warning: This notion of extension should not be confused with the notion of extension used in Galois theory! Remark 2.38. Notice that any K-algebra map A→K 16 DAVID CARCHEDI AND DMITRY ROYTENBERG is automatically surjective and split in a canonical way; a section is provided by the unique K-algebra homomorphism K → A. Definition 2.39. A Weil K-algebra is a nilpotent extension of K (over K) which is finitely generated as a K-module. A formal Weil K-algebra is a nilpotent extension of K (over K). Remark 2.40. When K is a field, any formal Weil K-algebra A′ has an underlying K-algebra of the form K ⊕ m, with m an nilpotent maximal ideal. Moreover, from the direct sum decomposition, every element of A′ can be expressed uniquely as a = k + m with k ∈ K and m nilpotent. If k 6= 0, a is a unit. If k = 0, a is nilpotent. Hence, A′ is a local K-algebra with the maximal ideal m, and residue field K. Remark 2.41. By Nakayama’s lemma, if K is a field, it follows that A is a Weil K-algebra if and only if there exists a surjection π:A→K whose kernel is a finitely generated K-module. Let E be a Fermat theory with ground ring K. Proposition 2.42. Let A ∈ EAlg, and A′ e π ι / A♯ be any split nilpotent extension of A♯ in ComAlgK . Then there is a unique Ealgebra structure on A′ , consistent with its commutative algebra structure and making both the projection π : A′ → A and the splitting ι : A → A′ into E-algebra maps. Furthermore, for any E-algebra B, we have (1) Any K-algebra map Ψ : A′ → B such that the precomposition ψ =Ψ◦ι:A→B is a map of E-algebras, is a map of E-algebras; (2) Any K-algebra map Φ : B → A′ such that the composition φ = π◦Φ : B → A is a split map of E-algebras, with splitting σ : A → B such that is a map of E-algebras. Φ ◦ σ = ι, Proof. Any element of A′ can be written uniquely as a sum a′ = ι(a) + ã with a ∈ A and ã ∈ N = Ker π. Let n be the nilpotence degree of N (so N n+1 = 0). The Taylor expansion (Corollary 2.12) now provides a unique evaluation of any operation in E on any tuple of elements of A′ . More precisely, let f ∈ E(k, 1) and a′1 = ι(a1 ) + ã1 , . . . , a′k = ι(ak ) + ãk ∈ A′ . Use the Taylor formula (2.3) to write n X hα (x)yα + f (x + y) = |α|=0 X |β|=n+1 yβ gβ (x, y), ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS and define f (a′1 , . . . , a′k ) = f (a′ ) = n X 17 ι(hα (a))ãα . |α|=0 Since the Taylor expansion is compatible with compositions (the generalized chain rule), this defines an E-algebra structure on A′ . It is clearly compatible with its K-algebra structure and makes both ι and π into E-algebra homomorphisms. Now let us prove the properties (1) and (2) of this structure. For (1), observe first that the direct image ideal Ψ∗ (N ) is also nilpotent of degree n. Using our assumptions, we have n n X X ψ(hα (a))Ψ(ã)α ι(hα (a))ãα ) = Ψ(f (a′1 , . . . , a′k )) = Ψ( |α|=0 |α|=0 = n X hα (ψ(a))Ψ(ã)α = f (ψ(a) + Ψ(ã)) |α|=0 = f (Ψ(a′1 ), . . . , Ψ(a′k )). To prove (2), let b ∈ B and decompose g = ιφ(b) + Φ(b) g Φ(b) = ιπΦ(b) + Φ(b) with We can also decompose g = Φ(b) − ιπΦ(b) ∈ N . Φ(b) b = σφ(b) + b̃ with b̃ = b − σφ(b) ∈ Ker φ. Since Φ is a K-algebra homomorphism, we have Φ(b) = Φσφ(b) + Φ(b̃) = ιφ(b) + Φ(b̃). Hence, g = Φ(b̃) ∈ N . Φ(b) Now let f ∈ E(k, 1), b = (b1 , . . . , bk ) ∈ B k . Using Taylor’s formula and our assumptions, we have Φ(f (b)) = = Φ(f (σφ(b) + b̃)) n X hα (σφ(b))b̃α + Φ( |α|=0 = n X = = X ] + ιφ(hα (b))Φ(b) X |β|=n+1 ] ι(hα (φ(b)))Φ(b) α |α|=0 = Φ(b̃)β Φ(gβ (σφ(b), b̃)) |β|=n+1 α |α|=0 n X b̃β gβ (σφ(b), b̃)) |β|=n+1 Φσφ(hα (b))Φ(b̃)α + |α|=0 n X X ] = f (Φ(b)). f (ιφ(b) + Φ(b)) β ] Φ(gβ (σφ(b), b̃)) Φ(b) 18 DAVID CARCHEDI AND DMITRY ROYTENBERG  This has the following important consequences: Corollary 2.43. Let W be a formal Weil K-algebra. Then there is a unique Ealgebra structure on W consistent with its K-algebra structure. Furthermore, it has the following properties: (1) Given an arbitrary E-algebra A, any K-algebra homomorphism A → W or W → A is an E-algebra homomorphism; (2) The algebraic tensor product A ⊗ W (over K) coincides with the coproduct A ⊙ W of E-algebras; (3) The tensor product of finitely many formal Weil K-algebras is again a formal Weil K-algebra. Similarly, the tensor product of finitely many Weil algebras is again a Weil algebra. Proof. To see that W supports a unique E-algebra structure making any K-algebra map to or from W a homomorphism of E-algebras, we invoke Propositions 2.42 and 2.24. To see that A ⊗ W is the coproduct in E, observe first that since A ⊗ ( ) is a functor, A ⊗ W is a split extension of A. Moreover, its kernel may naturally be identified with A⊗ N = (iW )∗ (N ) , where N is the kernel of the extension W → K, and iW : W → A ⊗ W is the canonical map. It follows that this kernel has nilpotency degree equal to that of N , so that A⊗W →A is a split nilpotent extension. Hence A ⊗ W supports a unique E-algebra structure making the canonical inclusions from A and W into E-algebra homomorphisms. Now, suppose we are given an E-algebra B and maps of E-algebras f : A → B and g : W → B. Then we get a unique K-algebra map f ⊗ g : A ⊗ W → B extending f and g. But then f ⊗ g is an E-algebra map by Proposition 2.42. For (3), notice that if π / W∼ K = K d⊕ m σ and W′ ∼ = K d ⊕ m′ π′ / K σ′ are nilpotent extensions, then W ′ ⊗ Wh π ′′ :=π ′ ◦(idW ′ ⊗π) / K σ′′ :=(idW ′ ⊗σ)◦σ′ is a split extension of K with Ker (π ′′ ) ∼ = m ⊕ m′ ⊕ (m ⊗ m′ ) , ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 19 which is finitely generated as a K-module if both m and m′ are. This implies (3) holds for Weil algebras. For the case of general nilpotent extensions, note that if i′W : W ′ ֒→ W ′ ⊗ W and iW : W ֒→ W ′ ⊗ W, are the canonical maps, then Ker (π ′′ ) = (i′W )∗ (m′ ) + (iW )∗ (m) . If m is nilpotent of degree m and m′ is nilpotent of degree n and, then it follows that Ker (π ′′ ) is nilpotent of degree m + n − 1.  Corollary 2.44. For any formal Weil K-algebra W, the co-unit is an isomorphism. c♯ → W W Proof. This follows immediately from (1) of 2.43.  3. Super Fermat Theories 3.1. Superalgebras and superizations. Definition 3.1. Let K be a commutative ring. A supercommutative superalgebra over K (or supercommutative algebra) is a Z2 -graded associative unital K-algebra A = {A0 , A1 } such that A0 is commutative and for every a ∈ A1 , a2 = 0. We say that a is of (Grassman) parity ǫ if a ∈ Aǫ ; we say it is even (resp. odd ) if ǫ = 0 (resp. ǫ = 1). Supercommutative superalgebras over K form a category, denoted by SComK Alg, whose morphisms are parity-preserving K-algebra homomorphisms. Remark 3.2. The definition implies that a1 a2 = (−1)ǫ1 ǫ2 a2 a1 whenever ai ∈ Aǫi , i = 1, 2, justifying the term “supercommutative”; if converse also holds. 1 2 ∈ K, the Remark 3.3. In our formulation, there is no such thing as elements of mixed parities in a super commutative algebra A, as A lacks an underlying set. Instead, it has an underlying Z2 -graded set, that is a set of two sets {A0 , A1 }. Consequently, if a ∈ A0 and b ∈ A1 , the expression a + b has no meaning. The advantage of this treatment is that it behaves nicely with respect to the fact that supercommutative algebras are algebras for a 2-sorted Lawvere theory. This viewpoint is not essential, as the category of super commutative algebras as defined in Definition 3.1 is canonically equivalent to the category non-commutative K-algebras A together with a grading A = A0 ⊕ A1 , making A supercommutative, where the morphisms are algebra morphisms respecting the grading. If one would like, one may work entirely within the framework of uni-sorted Lawvere theories as in [26], but this makes things unnecessarily complicated and yields less flexibility. 20 DAVID CARCHEDI AND DMITRY ROYTENBERG There is a forgetful functor u∗ : SComK Alg −→ Set{0,1} to the category of Z2 -graded sets, whose left adjoint u! assigns to a pair of sets P = (P0 |P1 ) the free supercommutative superalgebra on the set P0 of even and the set P1 of odd generators. Definition 3.4. Given a K-algebra R, the Grassmann (or exterior) R-algebra on n generators is the free supercommutative R-superalgebra on n odd generators. In other words, it is generated as an R-algebra by odd elements ξ 1 , . . . , ξ n subject to relations ξ i ξ j + ξ j ξ i = 0. Denote this algebra by ΛnR (or simply Λn if R = K). Remark 3.5. (ΛnR )0 is a Weil R-algebra. It is easy to see that the free supercommutative K-superalgebra on m even and n odd generators is nothing but ΛnR with R = K[x1 , . . . , xm ]. Denote this algebra by K[x1 , . . . , xm ; ξ 1 , . . . , ξ n ]. Supercommutative superalgebras over K are algebras over a 2-sorted Lawvere theory SComK , which we now describe. As a category, SComK is equivalent to the opposite of the category of finitely generated supercommutative K-superalgebras: SComK (m|n) = K[x1 , . . . , xm ; ξ 1 , . . . , ξ n ]. It is generated by the set {0, 1} of Grassmann parities; the product of m copies of 0 and n copies of 1 will be denoted by (m|n). The morphisms are SComK ((m|n), (p|q)) = SComK (m|n)p0 × SComK (m|n)q1 , and the composition is defined by substitution. Notice that the ground ring of SComK is SCom(0|0) = K. Observe that ComK sits inside SComK as the full subcategory of “purely even” objects of the form (m|0), m ∈ N. Clearly, the embedding ι : ComK −→ SComK , m 7→ (m|0), is a morphism of algebraic theories, hence induces an adjunction ComK Alg o ι∗ ι! / SComK Alg , such that ι∗ A = A0 , while ι! A = {A, 0} (the superalgebra with even part equal to A and trivial odd part). We now observe that the 2-sorted Lawvere theory SComK satisfies a natural generalization of the Fermat property: Suppose that f is an element of K[x, z 1 , . . . , z m ; ξ 1 , . . . , ξ n ]. Then f can be expressed uniquely in the form X f Iξ I , f (x, z, ξ) = I⊂{1,...,n} where if I = {i1 , . . . ik } , ξ I = ξ i1 . . . ξ ik , ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 21 with each f I in K[x, z 1 , . . . , z m ]. (If f is even, f I = 0 for all I with odd cardinality, and vice-versa for f odd.) By the Fermat property for ComK , for each there is a unique I ∆f ∆x I ⊂ {1, . . . , n} , (x, y, z) ∈ K[x, y, z 1 , . . . , z m ], such that ∆f I (x, y, z) . ∆x f I (x, z) − f I (y, z) = (x − y) · Let ∆f (x, y, z, ξ) := ∆x X I⊂{1,...,n} ∆f I (x, y, z) ξ I ∈ K[x, y, z 1 , . . . , z m ; ξ 1 , . . . , ξ n ]. ∆x Then we have that f (x, z, ξ) − f (y, z, ξ) = (x − y) · (3.1) ∆f (x, y, z, ξ) . ∆x Moreover, it is not hard to see that ∆f ∆x (x, y, z, ξ) is unique with this property. Suppose now that the role of x and y are played by odd generators. That is, suppose f ∈ K[x1 , . . . , xm ; η, ξ 1 , . . . , ξ n ]. Then since η 2 = 0, f can be uniquely expressed in the form   X X g Iξ I  , hIξ I + η ·  f (x, η, ξ) = I⊂{1,...,n} I⊂{1,...,n} I I 1 m with h and g in K[x , . . . , x ]. Let h (x, ξ) := X hIξ I X g Iξ I . I⊂{1,...,n} and g (x, ξ) := I⊂{1,...,n} Then we have f (x, η, ξ) = h (x, ξ) + η · g (x, ξ) . Notice that h is the value of f at η = 0 while g is the (left) partial derivative f with respect to η. Furthermore, we have the following: (3.2) ∂f ∂η of f (x, η, ξ) − f (x, θ, ξ) = (η − θ) · g (x, ξ) . Regarding g (x, ξ) as g (x, η, θ, ξ) ∈ K[x1 , . . . , xm ; η, θ, ξ 1 , . . . , ξ n ], we have that (3.3) f (x, η, ξ) − f (x, θ, ξ) = (η − θ) · g (x, η, θ, ξ) . Note however that g (x, η, θ, ξ) is not unique with this property; one could also use g (x, ξ) + (η − θ) · p (x, ξ) for any p. However, by differentiating (3.3) with respect to η and θ, one sees immediately that there is a unique such g (x, η, θ, ξ) such that ∂g ∂g = = 0, ∂η ∂θ in other words there exists a unique g which is only a function of x and ξ. This motivates the following definitions: 22 DAVID CARCHEDI AND DMITRY ROYTENBERG Definition 3.6. Let τS : SCom → S be an extension of SCom as a 2-sorted Lawvere theory, where implicitly SCom = SComZ . Without loss of generality, assume the objects are given by pairs (m|n) with m and n non-negative integers, such that τS is the identity on objects when SCom is equipped with the usual sorting. Denote by S (0|0) =: K the initial S-algebra. The free S-algebra S (m|n) is called the free S-algebra on m even and n odd generators, and is denoted by K{x1 , . . . xm ; ξ 1 , . . . , ξ n }. Definition 3.7. An extension S of SCom is called a super Fermat theory if for every f ∈ K{x, z1 , . . . , zn ; ξ 1 , . . . , ξ n } there exists a unique ∆f ∆x ∈ K{x, y, z1 , . . . , zn ; ξ 1 , . . . , ξ n } such that ∆f (x, y, z, ξ), ∆x and for every ϕ ∈ K{x1 , . . . , xm ; η, ξ 1 , . . . , ξ n } there exists a unique (3.4) f (x, z, ξ) − f (y, z, ξ) = (x − y) · ∆ϕ ∈ K{x1 , . . . , xm ; ξ 1 , . . . , ξ n } ∆η such that (3.5) ϕ (x, η, ξ) − ϕ (x, θ, ξ) = (η − θ) · ∆ϕ (x, ξ) . ∆η Denote by SFTh the full subcategory of 2-sorted Lawvere theories under SCom consisting of those which are super Fermat theories. Proposition-Definition 3.8. Let E be a Fermat theory with ground ring K. There exists an algebraic theory SE, the superization of E, with the set {0, 1} of Grassmann parities as sorts, and with operations given by SE((m|n), (p|q)) = SE(m|n)p0 × SE(m|n)q1 , where SE(m|n) = E(m) ⊗K Λn . An E-superalgebra is a SE-algebra. Proof. The only thing to check is that the composition by substitution is welldefined. To this end we observe that, as Λn0 is a Weil algebra, SE(m|n)0 = E(m) ⊗ Λn0 has a canonical E-algebra structure by Corollary 2.43. Now let X f = f (x1 , . . . , xp ; ξ 1 , . . . , ξ q ) = fi1 ...ik (x1 , . . . , xp )ξ i1 · · · ξ ik k≥0 i1 <···<ik ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 23 be an element of SE(p|q) (with fi1 ...ik ∈ E(p) = K{x1 , . . . , xp }). Let g 1 , . . . , g p ∈ SE(m|n)0 , and γ 1 , . . . , γ q ∈ SE(m|n)1 . It follows that X f (g 1 , . . . , g p ; γ 1 , . . . , γ q ) = fi1 ...ik (g 1 , . . . , g p )γ i1 · · · γ ik k≥0 i1 <···<ik is a well-defined element of SE(m|n), of the same parity as f .  Notation. Let K{x1 , . . . , xm ; ξ 1 , . . . , ξ n } denote the free SE-algebra on m even generators x1 , . . . , xn and n odd generators ξ1, . . . , ξn. Proposition 3.9. If E is a Fermat theory, its superization SE is a super Fermat theory. Proof. The proof is nearly identical to the proof of the super Fermat property for SComK , so we leave it to the reader.  Example 3.10. Let E = C∞ (Example 2.14). Its superization is the theory SC∞ of C∞ -superalgebras. The free C∞ -superalgebra R{x1 , . . . , xm ; ξ 1 , . . . , ξ n } on m even and n odd generators is known as the Berezin algebra. It is often denoted by C ∞ (Rm|n ) and thought of as the superalgebra of smooth functions on the (m|n)dimensional Euclidean supermanifold Rm|n . Thus, SC∞ is the category of real finite-dimensional Euclidean supermanifolds and parity-preserving smooth maps between them. Suppose that M is a smooth supermanifold. It induces a functor C ∞ (M) : SC∞ Rm|n → 7→ Set   Hom M, Rm|n , which preserves finite products. This SC∞ -algebra is the C∞ -superalgebra of smooth functions on M. By construction, its even elements correspond to smooth functions into R in the traditional sense: M → R = R1|0 , whereas its odd elements correspond to smooth functions into the odd line: M → R0|1 . The underlying supercommutative R-algebra of C ∞ (M) is the global sections of its structure sheaf. More generally, the structure sheaf of any smooth supermanifold M is in fact canonically a sheaf of C∞ -superalgebras. We will now give a more categorical description of superization. Let S be any 2-sorted Lawvere theory. Denote by S0 the full subcategory on the objects of the form (n|0) . Notice that S0 is generated under finite products by (1|0) , so S0 is a Lawvere theory. As the notation suggests, the free S0 -algebra on n generators has underlying set HomS0 (n, 1) = ∼ = HomS ((n|0) , (1|0)) S ((n|0))0 . 24 DAVID CARCHEDI AND DMITRY ROYTENBERG This produces a functor ( )0 : LTh{0,1} → LTh from 2-sorted Lawvere theories to Lawvere theories. By abuse of notation there is an induced functor ( )0 : SCom/LTh{0,1} → Com/LTh. Notice that if S is a super Fermat theory, then (3.4) implies that S0 is a Fermat theory. Hence there is furthermore an induced functor ( )0 : SFTh → FTh from super Fermat theories to Fermat theories. On one hand, the superization of ComK is obviously SComK so we have a map of theories SComK → SE induced by the structure map ComK → E. On the other hand, we also have a fully faithful embedding E → SE sending m to (m|0). The diagram /E (3.6) ComK  / SE  SComK commutes. Therefore, we have a map of theories a φ : C = SComK E −→ SE ComK Proposition 3.11. The map φ is an isomorphism. Proof. Suppose that T is an algebraic theory fitting into a commutative diagram of morphisms of theories /E ComK θ  SComK ϕ  / T. Denote by (N |M ) the image ϕ (n|m) in T. (Since θ and ϕ do not necessarily preserve generators, these need not be unique objects.) The functor θ induces a map of Ealgebras E (n) → θ∗ T (N |0) , ∗ where θ T (N |0) denotes the underlying E-algebra corresponding to (N |0) under the identification of Top with finitely generated T-algebras. With similar notational conventions, ϕ induces a map of supercommutative algebras SComK (0|m) = Λm → ϕ∗ T (0|M ) . Since there are canonical T-algebra maps from T (N |0) and T (0|M ) to T (N |M ) , there is an induced map of supercommutative algebras E (n) ⊗ Λm → T (N |M )♯ . These algebra maps assemble into a finite product preserving functor SE → T making the diagram commute. It is easy to see that this functor is unique with this property.  As a corollary, we get a categorical description of superization: ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 25 Corollary 3.12. The functor S : FTh → SFTh is left adjoint to )0 : SFTh → FTh. ( Remark 3.13. For any super Fermat theory F, the obvious diagram / F0 ComK  SComK  /F commutes, and the induced map SF0 → F is the co-unit of the adjunction. The unit of S ⊣ ( )0 is always an isomorphism. Hence FTh is a coreflective subcategory of SFTh. In particular, S is full and faithful. Corollary 3.14. An E-superalgebra is a superalgebra with an additional E-algebra structure on its even part; a morphism of E-superalgebras is a morphism of superalgebras whose even component is a morphism of E-algebras. Remark 3.15. For any extension E of Com (not necessarily Fermat), we could simply define SE to be the pushout C (3.6). However, this notion would not be very useful since one would generally have too few interesting examples of SEalgebras unless E was Fermat. For instance, if E = Ck for some k < ∞ (Example 2.20), even the Grassmann algebras Λn are not E-superalgebras for n sufficiently larger than k. One can draw the same conclusions from this “super” Fermat property as we did from the Fermat property (2.1). For instance, we have Theorem 3.16. Let S be a super Fermat theory, A ∈ SAlg, I = {I0 , I1 } a homogeneous ideal. Then I induces an S-congruence on A, so that the superalgebra A/I is canonically an S-algebra and the projection A → A/I is an S-algebra map. Remark 3.17. The ground ring K = S(0|0) of a super Fermat theory S is generally a superalgebra, whereas for S = SE it is an algebra (i.e. has trivial odd part). This indicates that not all super Fermat theories arise as superizations of Fermat theories. Example 3.18. Let A ∈ SEAlg. Then the theory SEA of A-algebras enjoys the super Fermat property. If A has trivial odd part, SEA = S(EA ); otherwise, SEA is not the superization of any Fermat theory. Lastly, we comment on two ways of turning a superalgebra into an algebra. We already mentioned the inclusion of theories ι : E −→ SE, inducing the adjunction (ι∗ ⊢ ι! ): EAlg o ι∗ ι! m 7→ (m|0) / SEAlg , with ι∗ taking an E-superalgebra A to its even part A0 , while ι! takes an E-algebra B to the E-superalgebra {B, 0}. 26 DAVID CARCHEDI AND DMITRY ROYTENBERG Now, observe that the inclusion ι has a right adjoint π : SE → E, defined on objects by π(m|n) = m for all n, and on morphisms by setting all the odd generators to 0. Since π is a right adjoint, it preserves products and is, therefore, a morphism of algebraic theories (though not of Lawvere theories, as it fails to preserve generators). Hence it induces an adjunction π ∗ ⊢ π! : SEAlg o π∗ π! / EAlg Moreover, π ∗ and ι! are naturally isomorphic (Remark A.38), so the inclusion ι! of algebras into superalgebras has also a left adjoint, π! , sending a superalgebra A to the algebra Ard = A/(A1 ) = A0 /(A1 )2 . Here, (A1 ) denotes the homogeneous ideal generated by A1 , namely, (A1 )1 = A1 , (A1 )0 = A21 . Observe that Ard is generally different from Ared obtained by setting all the nilpotents to 0, since A0 may contain nilpotent elements which are not products of odd elements. Moreover, although each element in A1 is nilpotent, the ideal A1 is not, unless A is finitely generated as an A0 -algebra: otherwise, one can have non-vanishing products of arbitrarily many different odd elements. 3.2. Nilpotent Extensions of Superalgebras. The concepts of split nilpotent extensions, and of Weil algebras, generalize readily to the setting of supercommutative algebras: Definition 3.19. Let K be a supercommutative ring, A a K-algebra. A split nilpotent extension of A is a K-algebra A′ together with a surjective K-algebra homomorphism π : A′ → A such that N = Ker π is a nilpotent ideal, and a section (splitting) σ of π which is also a K-algebra homomorphism. A (super) Weil K-algebra is an extension of K which is finitely generated as a K-module. Remark 3.20. When K is a purely even algebra (for instance, a field), the phrase “Weil K-algebra” is ambiguous as it could either mean a Weil algebra when viewing K as a commutative algebra, a Weil algebra viewing K as a supercommutative algebra. We shall always mean the latter, and if we need to distinguish, we will call the former a purely even Weil K-algebra. In this context, by Nakayama’s lemma, any Weil algebra is a split nilpotent extension, but the converse is false. Remark 3.21. When K is a field, any nilpotent extension A′ of K has an underlying K-algebra of the form K ⊕ m, with m an nilpotent maximal ideal, and A′ is a local K-algebra with unique maximal ideal m, and residue field K. Moreover, m must contain A1 , since K is purely even. Let E be a super Fermat theory with ground ring K. Proposition 2.42, and its proof readily generalizes to the supercommutative case: Proposition 3.22. Let A ∈ EAlg, π : A′ → A♯ any split nilpotent extension of A♯ in SComAlgK . Then there is a unique E-algebra structure on A′ , consistent with its supercommutative algebra structure and making both the projection π : A′ → A and the splitting σ : A → A′ into E-algebra maps. Furthermore, for any E-algebra B, we have ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 27 (1) Any K-algebra map Ψ : A′ → B such that the precomposition ψ =Ψ◦ι:A→B is a map of E-algebras, is a map of E-algebras; (2) Any K-algebra map Φ : B → A′ such that the composition φ = π◦Φ : B → A is a split map of E-algebras, with splitting σ : A → B such that is a map of E-algebras. Φ ◦ σ = ι, Corollary 3.23. Let W be a split nilpotent extension of K in SComAlgK . Then there is a unique E-algebra structure on W consistent with its super K-algebra structure. Furthermore, it has the following properties: (1) Given an arbitrary E-algebra A, any super K-algebra homomorphism A → W or W → A is an E-algebra homomorphism; (2) The algebraic tensor product A ⊗ W (over K) coincides with the coproduct A ⊙ W of E-algebras; (3) The tensor product of finitely many (super) Weil algebras is again a Weil algebra. Corollary 3.24. For any formal Weil K-algebra W, the co-unit c♯ → W W is an isomorphism. Remark 3.25. Proposition 3.22, Corollary 3.23, and Corollary 3.24 (as well as Proposition 2.42, Corollary 2.43, and Corollary 2.44) remain valid for a larger class of examples. One can define a locally nilpotent extension in the same way as a nilpotent extension, with the role of nilpotent ideals generalized to locally nilpotent ideals. Recall that an ideal I is locally nilpotent if every finitely generated subideal of I is nilpotent. This is equivalent to asking for each element of the ideal I to be nilpotent. The reason for this is that the operations of E are finitary; therefore, to evaluate an operation on a finite tuple of elements, we need only use the Taylor expansion up to the nilpotence order of the subideal generated by their nilpotent parts, rather than of the whole ideal, which may be infinite. An important example of a locally nilpotent but not globally nilpotent extension is an infinitely generated Grassmann algebra. 3.3. Some constructions. 3.3.1. Ideals. Recall that, given a supercommutative superalgebra A and Q homogeneous ideals I , . . . , I of A, we can form their sum Σ I , product 1 r k k k Ik and T intersection k Ik , which are again ideals of A. Two ideals I, J ⊂ A are called coprime if I + J = (1). The following is a standard fact from commutative algebra (see [4], the proof given there carries over verbatim to the super case). Proposition 3.26. Let Ak = A/Ik , k = 1, . . . , r, let φk : A → Ak be the canonical projections and let Y φ = (φ1 , . . . , φr ) : A −→ Ak . k (1) If the ideals I1 , . . . , Ir are mutually coprime, then Q k Ik = T k Ik ; 28 DAVID CARCHEDI AND DMITRY ROYTENBERG (2) The homomorphism φTis surjective iff the Ik ’s are mutually coprime; (3) In any case, Ker φ = k Ik . Let φ : A → B is a homomorphism of superalgebras and I ⊂ A is a (homogeneous) ideal, we can form its direct image φ∗ I ⊂ B as the ideal (φ(I)) generated by the image of I under φ. It consists of finite sums of homogeneous elements of the form bφ(a) with b ∈ B, a ∈ I (in other words, φ∗ I = B ⊗A I as a B-module). Proposition 3.27. (1) φ∗ preserves arbitrary sums and finite products of ideals; (2) if I, J ⊂ A are coprime, so are φ∗ I and φ∗ J. Proof. Left to the reader.  Now let S be a super Fermat theory with ground ring K. Recall that Scongruences on S-algebras are the same thing as homogeneous ideals in the underlying superalgebras. Let A ∈ SAlg and let P = (P0 |P1 ), where P0 ⊂ A0 , P1 ⊂ A1 are subsets; let (P ) denote the homogeneous ideal generated by P . Observe that the quotient A/(P ) is the coequalizer of the pair of maps S(P ) ⇒ A, where the top map sends each generator xp to the corresponding element p ∈ A, while the bottom one sends each xp to 0. The following is then immediate: Proposition 3.28. Let F : S → S′ be a map of super Fermat theories, SAlg o F∗ F! / S′ Alg the corresponding adjunction, A ∈ SAlg, I ⊂ A a homogeneous ideal. Then F! (A/I) = F! A/u∗ I, where u : A −→ F ∗ F! A is the unit of the adjunction. 3.3.2. Completions, coproducts and change of base. Applying the above proposition to the special case of the structure map SComK → S we get: Corollary 3.29. Let A ∈ SComK Alg, I ⊂ A a homogeneous ideal,  ∈ SAlg the S-algebra completion of A. Then d = Â/I, ˆ A/I where Iˆ = u∗ I for u : A → (Â)♯ the unit of the adjunction. Let now B ∈ SAlg. The map u : K → B induces a map of theories S → SB ; the corresponding adjunction takes the form SAlg o ( )◦u B⊙K ( ) / SB Alg = B/SAlg ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 29 where the right adjoint is simply precomposition with u, i.e. it is the functor assigning the underlying S-algebra, while the left adjoint is the change of base. Notice that the unit of the adjunction is the canonical inclusion into the coproduct: ι : A −→ B ⊙ A. Corollary 3.30. If A ∈ SAlg, I ⊂ A a homogeneous ideal, then B ⊙ (A/I) = (B ⊙ A)/ι∗ I Corollary 3.31. Let Ai ∈ SAlg, Ii ⊂ Ai homogeneous ideals, i = 1, 2. Then (A1 /I1 ) ⊙ (A2 /I2 ) = (A1 ⊙ A2 )/(ι1,∗ I1 + ι2,∗ I2 ), where ιi : Ai → A1 ⊙ A2 are the canonical inclusions. In particular, if Ai = S(Pi )/Ii , are presentations, then A1 ⊙ A2 = S(P1 ∐ P2 )/(ι1,∗ I1 + ι2,∗ I2 ). 3.3.3. Products. As is the case for all algebraic theories, products of S-algebras are computed “pointwise”, i.e. on underlying sets. What is quite remarkable is that, in sharp contrast with general algebraic theories, finite products are preserved by the left adjoints of algebraic morphisms between categories of algebras over (super) Fermat theories. Theorem 3.32. Let F : S → S′ be a morphism of super Fermat theories. Then F! : SAlg → S′ Alg preserves finite products. Proof. Let A1 , . . . , Ar be S-algebras, and Y A= Ak k their product. Pick any presentation of A, i.e. a pair of sets P = (P0 , P1 ) and a surjective homomorphism φ : S(P ) −→ A. Composing with the canonical projections, we get surjective homomorphisms φk : S(P ) −→ Ak , so that k = 1, . . . , r, φ = (φ1 , . . . , φr ). Let Ik = Ker φk for each k, and I = Ker φ, so that Ak = S(P )/Ik and A = S(P )/I. Since φ is surjective, the Ik ’s are mutually coprime by Proposition 3.26. Therefore, \ Y I= Ik = Ik . k k Now apply F! . We have F! Ak = S′ (P )/u∗ Ik by Proposition 3.28, and the ideals u∗ Ik are mutually coprime by Proposition 3.27. Therefore, the map Y ψ = (F! φ1 , . . . , F! φr ) : S′ (P ) −→ F! Ak k 30 DAVID CARCHEDI AND DMITRY ROYTENBERG is surjective by Proposition 3.26 and its kernel is \ Y Y Ker ψ = u∗ Ik = u∗ Ik = u∗ ( Ik ) = u∗ I k k k by Propositions 3.26 and 3.27. Therefore, Y Y F! Ak = S′ (P )/u∗ I = F! A = F! ( Ak ) k k and ψ = F! φ.  Corollary 3.33. (1) For any super Fermat theory S with ground ring K, the completion functor (d) : SComK Alg −→ SAlg preserves finite products; (2) for any S-algebra B, the change of base functor B⊙( preserves finite products. ) : SAlg −→ SB Alg Remark 3.34. One can easily see by repeating the above arguments (or by restriction) that the results of this subsection remain valid for morphisms of Fermat theories (not super), and more generally, for morphisms of algebraic theories (over Com) between Fermat theories and super Fermat theories. Remark 3.35. In general, for a morphism F : T → T′ of algebraic theories, the left adjoint F! seldom preserves products. For instance, the free T-algebra functor Set → TAlg almost never does. Remark 3.36. Although they preserve finite products, left adjoints of algebraic morphisms of categories of algebras over (super) Fermat theories generally fail to preserve other finite limits. For instance, consider the structure map ComR → C∞ and the corresponding C∞ -completion functor (d) : ComR Alg −→ C∞ Alg. The equalizer of the shift by 1 map φ : R[x] −→ R[x], and the identity is R, while the equalizer of x 7→ x + 1 φ̂ : R{x} −→ R{x} and the identity is isomorphic to C ∞ (S 1 ): there are no non-constant periodic polynomials, but lots of periodic smooth functions. 3.3.4. Localizations. We end this section by giving a brief account of localization in the context of super Fermat theories. If Σ ⊂ A is any subset of a E-algebra A, with E  a (super) Fermat theory, one can form the localization of A with respect to Σ, A Σ−1 . There is a canonical E-algebra map  l : A → A Σ−1 which satisfies the following universal property: Given any E-algebra B, any E-algebra map ϕ:A→B ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 31 which send every element of Σ to a unit extends uniquely to a E-algebra map  A Σ−1 → B. Even in the case where Σ is multiplicatively closed, the localization of A with respect to Σ can not usually be computed by the methods  customary to commutative algebra. However, the universal properties of A Σ−1 give rise to a canonical presentation. Let  A {Σ} = A ⊙ K {Σ} = A (xs )s∈Σ , where K {Σ} is the free E-algebra on |Σ|-generators (or the free E-algebra on |Σ0 |even generators and |Σ1 |-odd generators, in the super case). Then   A Σ−1 = A (xs )s∈Σ / ((1 − s · xs )) , where ((1 − s · xs )) is the ideal generated by all elements of the form 1 − s · xs , for some s ∈ Σ.  Remark 3.37. Of course, if Σ1 is non-empty, A Σ−1 = {0}. For certain Fermat theories (besides those of the form ComK ), e.g. the theory of C∞ -algebras, other descriptions of localizations are possible. For example, if f ∈ C∞ (Rn ) , and Σ = {f } , then  C∞ (Rn ) f −1 ∼ = C∞ (U ) , where (c.f. [20]). U = f −1 (R/ {0}) 4. Near-point Determined Algebras In this section, we introduce for a (super) Fermat theory E its subcategory of near-point determined algebras. We then go on to prove many of their pleasant properties. 4.1. Radicals. In this subsection, let E be either a Fermat theory or a super Fermat theory, and let Q be a full subcategory of EAlg. Definition 4.1. Given an A ∈ EAlg and Q ∈ Q, a Q-point of A is a homomorphism p : A → Q; a Q-point of A is a Q-point for some Q ∈ Q. Definition 4.2. An ideal P of a E-algebra A is said to be a Q-ideal if P is the kernel of some Q-point p. Denote the set of Q-ideals by SpecQ (A) . Let I be an arbitrary ideal of A. Define the Q-radical of I to be the ideal \ RadQ (I) = P. P ⊇I P ∈SpecQ (A) We call RadQ (0) the Q-radical of A, and will denote it by RQ (A) . Remark 4.3. Assume that E = Com. If Q is the subcategory of integral domains, then a Q-ideal is the same as a prime ideal, so SpecQ (A) is the prime spectrum and the Q-radical of A is the same thing as the nilradical. When Q is the subcategory of fields, a Q-ideal is the same thing as a maximal ideal, SpecQ (A) is the maximal spectrum, and the Q-radical of A is the same thing as the Jacobson radical. Another example is the W-radical considered in [15], Section III.9, and is closely related to 32 DAVID CARCHEDI AND DMITRY ROYTENBERG the concept of near-point determined algebras discussed in Section 4.2.1 of this paper. Proposition 4.4. For any ideal I of a E-algebra A, we have 1) RadQ (I) = πI−1 (RQ (A/I)) , where πI : A → A/I is the canonical projection. 2) RadQ (RadQ (I)) = RadQ (I) . Proof. Condition 1) follows immediately from the lattice theory of ideals. For 2), observe that for any Q-point p of A, such that Ker (p) ⊇ I, p (a) = 0 for all a ∈ RadQ (I) , by definition.  Corollary 4.5. For every E-algebra A, RadQ (RQ (A)) = RQ (A) . Proposition 4.6. For a E-algebra A, the following conditions are equivalent: 1) RQ (A) = 0. 2) There is an embedding Y A ֒→ Qα α of A into a product of algebras in Q. 3) For any pair of maps f, g : B → A we have ∀Q ∈ Q, ∀ p : A → Q, p ◦ f = p ◦ g =⇒ f = g. 4) For any element a ∈ A, if p (a) = 0 for all Q-points p, then a = 0. Proof. Suppose 1) holds. Choose for each Q-ideal P a homomorphism A → QP with QP ∈ Q whose kernel is P, and denote the associated embedding A/P ֒→ QP by ϕP . Denote ϕ := Y Y ϕP : P ∈SpecQ (A) P ∈SpecQ (A) A/P ֒→ and consider the canonical composite Y ϕ θ A/P −→ A −→ P ∈SpecQ (A) Y P ∈SpecQ (A) Y P ∈SpecQ (A) QP , QP . The kernel of θ is RadQ (A) = 0, hence the composite is an embedding of A into a product of algebras in Q. 2) =⇒ 3) is obvious. Now, suppose that 3) holds. For simplicity, we will assume that E is Fermat as opposed to super Fermat, however the proof for the super case is nearly identical. Suppose that a ∈ A has p (a) = 0 for every Q-point of A. Consider the free E-algebra on one generator, K{x}. There is a natural bijection Hom (K{x}, A) ∼ = A, where A is the underlying set of A. Each object t of A corresponds to a unique A A morphism λA t : K{x} → A sending x to t. Now, p ◦ λa = p ◦ λ0 , for all p : A → Q, Q with Q ∈ Q, since both expressions are equal to λ0 , the morphism K{x} → S ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 33 A classifying the element 0 ∈ Q. Assuming 3), it follows that λA a = λ0 , hence a = 0. 4) =⇒ 1) is obvious.  Definition 4.7. If an E-algebra A satisfies either of the equivalent conditions of Proposition 4.6, it is said to be Q-point determined. Denote the full subcategory of Q-point determined algebras by EAlgQdet . An ideal I is said to be Q-point determined (or Q-radical ) if RadQ (I) = I. Remark 4.8. If A is Q-point determined, then any sub-E-algebra B of A is also Q-point determined. Remark 4.9. Assume that E = Com. If Q is the subcategory of integral domains, then a commutative ring is Q-point determined if and only if it is reduced. When Q is the subcategory of fields, a commutative ring is Q-point determined if and only if it is Jacobson semisimple (a.k.a semiprimitive). Proposition 4.10. Let A be any E-algebra, and I an ideal. Then A/I is Q-point determined if and only if I is. Proof. For any ideal J of A such that J ⊇ I, πI (J) = 0 if and only if J = I, where πI : A → A/I is the canonical projection. Hence RQ (A/I) = πI (RadQ (I)) = 0 if and only if RadQ (I) = I.  Corollary 4.11. For any A, A/RQ (A) is Q-point determined. Proposition 4.12. Let I be an ideal of A. Then I is Q-point determined if and only if I is the kernel of a homomorphism f : A → B, with B a Q-point determined algebra. Proof. Suppose that I is Q-point determined. Then by Proposition 4.10, A/I is Q-point determined, and I is the kernel of A → A/I. Conversely, suppose that f : A → B and B is Q-point determined. Then A/ Ker (f ) is a sub-E-algebra of B, so is Q-point determined. So by Proposition 4.10, Ker (f ) is Q-point determined.  Proposition 4.13. The assignment A 7→ A/RQ (A) extends to a functor LQ : EAlg → EAlgQdet which is left adjoint to the inclusion, with the unit ηA : A → A/RQ (A) given by the canonical projection. Proof. If φ : A → B is a map and a ∈ RQ (A), then for every Q ∈ Q and every g : B → Q we have g(φ(a)) = (g ◦ φ)(a) = 0, so φ(a) ∈ RQ (B), and thus LQ is indeed a functor. It is left adjoint to the inclusion with the described unit since any map from an arbitrary A to a Q-point determined B must send the elements of RQ (A) to 0, hence factors uniquely through ηA .  34 DAVID CARCHEDI AND DMITRY ROYTENBERG Remark 4.14. Given a subcategory Q of EAlg, we may consider its saturation Q with respect to arbitrary products and subobjects, i.e. the smallest subcategory of EAlg which is closed under arbitrary products and subobjects, which contains Q. On one hand, by Proposition 4.6, the category of Q-point determined algebras is contained in Q. On the other hand, by Proposition 4.13 the full subcategory EAlgQdet is reflective, hence closed under arbitrary limits. In particular, it is closed under arbitrary products. Moreover, by Remark 4.8, EAlgQdet is closed under subobjects. Hence, Q is contained in EAlgQdet . Therefore the subcategory EAlgQdet of EAlg may be identified with the saturation Q. Notice that this notion of saturation makes sense in a much more general context, even where many of the various equivalent conditions in Proposition 4.6 do not make sense. Recall that the radical of an ideal I in a commutative ring A is given by √ I = {a ∈ A | an ∈ I for some n ∈ Z+ }. This is the same as RadQ (I) , when Q is the subcategory of ComAlg consisting of integral domains. An important property of the radical is that for any two ideals I and J of A, √ √ √ (4.1) I ∩ J = I ∩ J. An analogous equation holds for the Jacobson radical of ideals. A natural question is, for Q any subcategory of EAlg, when does (4.1) hold? The following proposition offers a partial answer: Proposition 4.15. If each Q in Q is an integral domain, then the following equation is satisfied (4.2) RadQ (I ∩ J) = RadQ (I) ∩ RadQ (J) for all A ∈ EAlg and all I and J ideals of A. Proof. Suppose that each Q in Q is an integral domain. Notice that the inclusion RadQ (I ∩ J) ⊆ RadQ (I) ∩ RadQ (J) is always true. It suffices to show the reverse inclusion. Let p:A→Q be a Q-point of A, such that p (I ∩ J) = 0. Notice that IJ ⊆ I ∩ J, so (4.3) p (ij) = p (i) p (j) = 0 for all i ∈ I and j ∈ J. Suppose that p (I) 6= 0. Then there exists i ∈ I such that p (i) 6= 0. In this case, equation (4.3) holds in Q, which is an integral domain. It follows that p (j) = 0, for all j ∈ J, i.e. p (J) = 0. So, for every Q-point p whose kernel contains I ∩ J, either Ker (p) contains I or it contains J. It follows that RadQ (I) ∩ RadQ (J) ⊆ RadQ (I ∩ J) .  This last proposition explains why (4.2) is satisfied in the case of prime and Jacobson radicals. If Q does not consist entirely of integral domains, equation (4.2) may still be satisfied for coprime ideals, as the following proposition shows: Proposition 4.16. If every algebra Q in Q is a local E-algebra, then for all Ealgebras A and all coprime ideals I and J of A, equation (4.2) holds. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 35 Proof. It suffices to show that if p : A → Q is a Q-point of A such that p (I ∩ J) = 0, then either p (I) = 0 or p (J) = 0. Since I and J are coprime, there exists ζ ∈ I and ω ∈ J such that ζ + ω = 1. Hence p (ζ) + p (ω) = 1. Since Q is local, either p (ζ) or p (ω) is a unit, otherwise they would both be in the unique maximal ideal m of Q, but this would imply that 1 ∈ m, which is absurd. Assume without loss of generality that p (ζ) is a unit. Then, for all j ∈ J, p (ζj) = p (ζ) p (j) = 0, and since p (ζ) is a unit, this implies p (j) = 0, for all j ∈ J.  Corollary 4.17. If every algebra Q in Q is a local E-algebra, then the reflector LQ : EAlg → EAlgQdet preserves finite products. Proof. The reflector LQ always preserves the terminal algebra. Let A and B be E-algebras. Consider the composite of surjections pr1 ηA A × B −−−−−−−→ A −−−−−−−→ A/RQ (A) , and similarly with the role of A and B exchanged. Their kernels are RadQ ({0} × B) and RadQ (A × {0}) respectively. Notice that these two ideals are coprime since the former contains (0, 1) and the latter contains (1, 0) . Hence, by Proposition 3.26, it follows that the induced map A × B → A/RQ (A) × B/RQ (B) is surjective, with kernel RadQ ({0} × B) ∩ RadQ (A × {0}) . Since every algebra Q in Q is a local E-algebra, by Proposition 4.16, this kernel is equal to RadQ (({0} × B) ∩ (A × {0})) = RadQ (0) = RQ (A × B) . By the first isomorphism theorem, it follows that LQ (A × B) = (A × B) /RQ (A × B) ∼ = A/RQ (A) × B/RQ (B) = LQ (A) × LQ (B) .  Remark 4.18. By the same proof, LQ also preserves finite products if every algebra Q in Q is an integral domain. 36 DAVID CARCHEDI AND DMITRY ROYTENBERG 4.1.1. Relative Reduction. Let E be a super Fermat theory, and let Q be a full subcategory of EAlg. Denote by jQ : Q ֒→ EAlg the full and faithful inclusion. Consider the forgetful functor UE : EAlg → Set{0,1} . Denote the composite by n The Z2 -graded object KQ , KQ 0 KQ := UE ◦ jQ . o of SetQ , may be regarded as a E-algebra in the 1 topos SetQ . For each Q ∈ Q, there is universal map of 2-sorted Lawvere theories χQ : E → EndUE (Q) classifying Q. (See Example B.18.) Hence, for all (n|m) and (p|q) , the functor χQ provides natural maps   p q E ((n|m) , (p|q)) → Set Qn0 × Qm , Q × Q 1 0 1 . Pick f ∈ E ((n|m) , (p|q)) , then the maps (χQ (f ))Q∈Q assemble into a natural transformation (i.e. a map in SetQ ) ev (f ) : KQ n × KQ m → KQ p × KQ q . 0 1 0 1 This yields functions (4.4)   ev(n|m),(p|q) : E ((n|m) , (p|q)) → SetQ KQ n × KQ m , KQ p × KQ q . 0 Note that and 1  E ((n|m) , (1|0)) ∼ = K x1 , · · · , xn , ξ 1 , · · · , ξ m  E ((n|m) , (0|1)) ∼ = K x1 , · · · , xn , ξ 1 , · · · , ξ m 0 1 0 1 . Hence, we get even and odd evaluation maps:    (n|m) : K x1 , · · · , xn , ξ 1 , · · · , ξ m 0 → SetQ KQ n × KQ m , KQ ev0 0 and (n|m) ev1  : K x1 , · · · , xn , ξ 1 , · · · , ξ m 1 1 0   → SetQ KQ n × KQ m , KQ . 0 1 1 Remark 4.19. If E is a non-super Fermat theory, all of this construction carries through; however, one only needs to use one sort. Definition 4.20. The super Fermat theory E is Q-reduced if for all (n|m) the (n|m) (n|m) evaluation maps ev0 and ev1 are injective. Proposition 4.21. A super Fermat theory E is Q-reduced if and only if each finitely generated free E-algebra is Q-point determined. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 37  Proof. Suppose that for some n and m, K x1 ,  · · · , xn , ξ 1 , · · · , ξ m is not Q-point determined. Then there is a non-zero f ∈ K x1 , · · · , xn , ξ 1 , · · · , ξ m such that ϕ (f ) = 0 for all  ϕ : K x1 , · · · , xn , ξ 1 , · · · , ξ m → Q, with Q ∈ Q. So, for all Q-points ϕ, we have     (4.5) ϕ (f ) = Q (f ) ϕ x1 , · · · , ϕ (xn ) , ϕ ξ 1 , · · · , ϕ (ξ m ) = 0.  Since K x1 , · · · , xn , ξ 1 , · · · , ξ m is free, this implies for all Q and any collection of even elements of Q and odd elements, Hence, for all Q, a1 , · · · , an b1 , · · · , bm Q (f ) ((a1 , · · · , an ) , (b1 , · · · , bm )) = 0. χQ (f ) = χQ (0) . In particular, this implies that the evaluation map ev(n|m) of the same parity as f is not injective. Conversely, suppose that each finitely generated free E-algebra is Q-point determined. Suppose that f and g are in K x1 , · · · , xn , ξ 1 , · · · , ξ m , have the same parity, and ev(n|m) (f ) = ev(n|m) (g) . By equation (4.5), this implies that for all Q-points ϕ, ϕ (f − g) = 0. By Proposition 4.6, this implies that f = g, so that each evaluation map is injective.  Corollary 4.22. A super Fermat theory E is Q-reduced if and only if each free E-algebra is Q-point determined. Proof. If every free E-algebra is Q-point determined, then E is Q-reduced by Proposition 4.21. Suppose that E is Q-reduced. By the same proposition, every finitely generated E-algebra is Q-point determined. Let T be some Z2 -graded set and let E (T) be the free E-algebra on T. Suppose that f and g are two elements thereof and that for every Q-point p : E (T) → Q, p (f ) = p (g) . Since E (T) is a filtered colimit of finitely generated free algebras, there exists a finite Z2 -graded subset T0 of T such that f and g are in the image of i : E (T0 ) → E (T) .   Say i f˜ = f and i (g̃) = g. Let q : E (T0 ) → Q be any Q-point. Then q can be extended along i to a Q-point p, for example, by setting p (t) = q (t) for all t ∈ T0 , and by letting p be zero on all other generators. This implies that     q f˜ = pi f˜ = p (f ) . 38 DAVID CARCHEDI AND DMITRY ROYTENBERG   Hence q f˜ = q (g̃) for every Q-point q, and hence f˜ = g̃, since E (T0 ) is finitely generated, and hence Q-point determined. Therefore, f = g, and E (T) is also Q-point determined.  Remark 4.23. A non-super Fermat theory E is reduced if and only if it is K-reduced, where K is the full subcategory of E spanned by the initial E-algebra K. Definition 4.24. Let E be a super Fermat theory, and let Λ denote the subcategory of E consisting of the Grassman algebras (Definition 3.4.) The super Fermat theory E is super reduced if it is Λ-reduced. Proposition 4.25. If E is a reduced Fermat theory, SE is a super reduced super Fermat theory. Proof. By Proposition 3.9, SE is a super Fermat theory. It suffices to show that it is super reduced. By Proposition 4.21, it suffices to show that for all n and m, E (n) ⊗ Λm is Λ-point determined. Since E is reduced, by Proposition 4.21, each E (n) is K-point determined, hence by Proposition 4.6, there is an embedding Y ψ : E (n) ֒→ K. α Consider now the composite E (n) ⊗ Λ m → Y K α ! ⊗ Λm → Y Λm . α The first morphism is injective since Λm is free, hence flat as a K-module. The second is always injective. Hence, we have an embedding of E (n) ⊗ Λm into a copy  of algebras in Λ, so by Proposition 4.6, we are done. Define a 2-sorted Lawvere theory EndKQ by setting   EndKQ ((n|m) , (p|q)) = SetQ KQ n × KQ m , KQ p × KQ q . 0 1 0 1 Notice that (4.4) yields a canonical map of theories evQ : E → EndKQ . It is easy to see that E is Q-reduced if and only if this map is faithful. Moreover, the Z2 -graded set    n  o  SetQ KQ n × KQ m , KQ := SetQ KQ n × KQ m , KQ , SetQ KQ n × KQ m , KQ 0 1 0 1 0 0 (n|m) ev0 has the point-wise structure of an E-algebra, and the morphisms and define an E-algebra map    (n|m) : K x1 , · · · , xn , ξ 1 , · · · , ξ m → SetQ KQ n × KQ m , KQ . evQ 0 1 (n|m) ev1 1 Definition 4.26. Given a super Fermat theory E, we define its Q-reduction EQred to be the image of evQ . Explicitly, the finitely generated EQred -algebra on the sort (n|m) is given by     (n|m) (n|m) . = E (n|m) / Ker evQ EQred (n|m) = Im evQ Remark 4.27. By the proof of Proposition 4.21 one sees that   (n|m) Ker evQ = RQ (E (n|m)) , so that EQred (n|m) = LQ (E (n|m)) . 1 ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 39 The proof of Proposition 2.31 readily generalizes: Proposition 4.28. If E is a super Fermat theory, EQred is a Q-reduced super Fermat theory. Moreover, the assignment E 7→ EQred is functorial and is left adjoint to the inclusion SFThQred ֒→ SFTh of the full subcategory of Q-reduced super Fermat theories. In particular, super reduced super Fermat theories are a reflective subcategory of super Fermat theories. 4.2. Near-point determined superalgebras. 4.2.1. Near-point determined superalgebras. Definition 4.29. Let N denote the class of formal Weil K-algebras. An E-algebra which is N-point determined is said to be near-point determined. Denote the associated subcategory by EAlgnpd . Remark 4.30. If one replaces the role of nilpotent extensions with that of locally nilpotent extensions, (as in Remark 3.25), one arrives at an equivalent definition of near-point determined. The reason is that if A→K is a locally nilpotent extension with kernel N, the natural map ∞ Y A→ A/N n+1 n=0 is an embedding into a product of formal Weil algebras, hence A is near-point determined. Remark 4.31. In light of Remark 2.40, from Corollary 4.17 it follows that, if K is a field, each formal Weil K-algebra is local, so the reflector preserves finite products. LN : EAlg → EAlgnpd Proposition 4.32. If E is a super reduced super Fermat theory, then each free E-algebra is near-point determined. Proof. Since Λ ⊂ N, the result follows from Corollary 4.22.  We will now give an alternate characterization of what it means to be near-point determined. First, we will make some basic observations. Suppose that p:A→K is a K-point of an E-algebra A, where K is the ground ring. Let M denote the kernel of p. For any k ≥ 0, there is a canonical factorization A ◆◆ ◆◆◆ ◆ π ◆◆& p /8 K qqq q q qqq p̃ A/Mpk+1 . If π (a1 ) , . . . π (ak+1 ) are arbitrary elements of Ker (p̃) , then each ai ∈ Mp , so π (a1 ) π (a2 ) · · · π (ak+1 ) = π (a1 a2 · · · ak+1 ) = 0. 40 DAVID CARCHEDI AND DMITRY ROYTENBERG So, Ker (p̃) is nilpotent of degree k and therefore A/Mpk+1 is a formal Weil K-algebra. We introduce the notation k+1 A(k) . p := A/Mp (k) We note that Ap is universal among formal Weil K-algebras of nilpotency degree k covering the K-point p. I.e., if ρ:W →K is a formal Weil K-algebra with Ker (ρ) k+1 = 0, and ϕ:A→W is such that ρ ◦ ϕ = p, then there is a unique factorization ϕ A ϕ̃ π  (k) Ap ④ ④ p̃ ④ /W ④= ρ  / K. Proposition 4.33. An E-algebra A is near-point determined if and only if the canonical map A→ (4.6) ∞ Y Y p:A→K k=0 A(k) p is injective. (k) Proof. Since each Ap is a formal Weil K-algebra, if (4.6) is injective, it is an embedding of A into a product of formal Weil K-algebras, so A is near-point determined. Conversely, suppose that A is near-point determined. Notice that the kernel of (4.6) is the intersection over all K-points p of A and all k ≥ 1, of Ker(p)k . Let a be a non-zero element of A. Then there exists a morphism φ : A → W to a formal Weil K-algebra such that φ (a) 6= 0. The algebra W comes equipped with a surjection ρ : W → K. Let p := ρ ◦ φ and let Mp denote the kernel of p. Notice that φ (Mp ) ⊂ Ker (ρ) . Let n be the nilpotency degree of Ker (ρ) . Then there is a unique factorization of φ of the form λ φ̃ A −→ A/Mpn+1 = A(n) p −→ W. Since φ (a) 6= 0, λ (a) 6= 0, so a is not in Mpn+1 . Hence, a is not in the kernel of  (4.6). It follows that (4.6) is injective. Remark 4.34. It follows that a C ∞ -algebra is near-point determined in the sense of Definition 4.29 if and only if it is near-point determined in the sense of [6]. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 41 Lemma 4.35. Suppose that F : T′ → T is a morphism of S-sorted Lawvere theories. Let D be the full subcategory of T-algebras on those algebras A with the property that for any T-algebra B, any T′ -algebra morphism f : F ∗ (B) → F ∗ (A) is of the form F ∗ (g) for a unique T-algebra morphism g : B → A. Then D is closed under subobjects and arbitrary limits in TAlg. Proof. The fact that D is closed under arbitrary limits is clear by universal properties, since F ∗ is a right adjoint. Suppose that j : C ֒→ A is a sub-T-algebra of A, with A ∈ D. We wish to show that C is in D. Let ϕ : F ∗ (B) → F ∗ (A) be a T′ -algebra morphism. We wish to show that for all f ∈ T ((ns ) , (ms )) , the following diagram commutes Q (4.7) s Q Bsns B(f ) / s s ϕn s s Q Bsms Q s Q  ns Cs C(f ) s / s ϕm s Q  ms Cs . s Notice, however, that the following two diagrams commute since j and F ∗ (j) ◦ f are T-algebra maps: Q ns C(f ) / Q ms Cs Cs s s Q s Q jsns s Q  ns As  / Q Ams s A(f ) s Q s Q s Bsns s / Q Bsms B(f ) s Q s ϕn s s Q  ns Cs s s Q jsns Q  ns As s s ϕm s Q  ms Cs s Q jsms s A(f ) / jsms Q  ms As . s Since j is a monomorphism, this implies that diagram (4.7) commutes, so we are done.  42 DAVID CARCHEDI AND DMITRY ROYTENBERG Corollary 4.36. If A and B are E-algebras and B is near-point determined, then any K-algebra morphism ϕ : A♯ → B♯ is a map of E-algebras. Proof. This is true when B is a formal Weil algebra by Corollary 3.23. The result now follows from Lemma 4.35, since by definition, any near-point determined Ealgebra is a subalgebra of a product of formal Weil algebras.  Remark 4.37. In case that E = C∞ , Corollary 4.36 gives a completely algebraic proof of [6], Proposition 8. (The proof in [6] uses a topological methods.) Remark 4.38. The near point determined condition in Corollary 4.36 is necessary. It was shown in [23], that there is a counterexample in the case of C∞ -algebras. In slightly more detail, by Borel’s theorem (c.f. [20]), the canonical R-algebra map T : C∞ (R)0 → R[[x]], from the algebra of germs of smooth functions at the origin, to the algebra of formal power series, assigning the germ of a function f its Taylor polynomial, is surjective. By Corollary 2.8, this endows R[[x]] with the canonical structure of a C∞ -algebra, making T a C∞ -map. Reichard proves (assuming the axiom of choice) in [23] that there exists an R-algebra map φ : R[[x]] → C∞ (R)0 splitting T , which sends x to the germ of the identity function. If φ were a C∞ algebra map, φ ◦ T would be too, and since the latter sends the generator x to itself, one would have to have that φ ◦ T = idC∞ (R)0 . This is not possible, since the existence of non-zero flat functions imply T is clearly not an isomorphism. Suppose that E is super Fermat. Consider the composite of adjunctions (4.8) EAlgnpd o LN iN / EAlg o (d) ( )♯ / SComAlgK . By Corollary 4.36, the composite ( )♯ ◦ iN is full and faithful. Similarly for E Fermat. Hence we have the following corollary: Corollary 4.39. Suppose that E is super Fermat. The category EAlgnpd of nearpoint determined E algebras is a reflective subcategory of SComAlgK . In particular, c♯ . for each near-point determined E-algebra A, A is isomorphic to LN applied to A Similarly for E Fermat. 4.2.2. Finitely generated near-point determined superalgebras. Definition 4.40. Suppose that E is super Fermat. For each k ≥ 0, m, n ≥ 0 the (n|m)-dimensional k th jet algebra is defined to be the supercommutative K-algebra k Jn|m = K[x1 , . . . , xn ; ξ 1 , . . . , ξ m ]/mk+1 , where m0 = (x1 , . . . , xn ; ξ 1 , . . . , ξ m ). Simi0 larly for E Fermat, one has jet algebras Jnk . k Remark 4.41. Clearly, each Jn|m is a Weil algebra. Proposition 4.42. Each  k ∼ Jn|m = K x1 , . . . , xn ; ξ 1 , . . . , ξ m /mk+1 0 as an E-algebra for any super Fermat theory with ground ring K. (And similarly for Jnk when E is not super.) ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 43  can be Proof. Notice that by Proposition 3.28, K x1 , . . . , xn ; ξ 1 , . . . , ξ m /mk+1 0 identified with the E-completion of the Weil algebra K[x1 , . . . , xn ; ξ 1 , . . . , ξ m ]/mk+1 , 0  so we are done by Corollary 2.44. k Proposition 4.43. Every Weil algebra is a quotient of some Jn|m . Proof. Let π : W → K be a Weil K-algebra. As a K-module, ∼ K ⊕ N, W= with N finitely generated. Let a1 , . . . , an be generators of N0 and b1 , . . . , bm be generators of N1 . Then there exists a surjective K-algebra map φ : K[x1 , . . . , xn ; ξ 1 , . . . , ξ m ] → W sending each xi to ai and each ξ j to bj . Let k be the nilpotency degree of N = k Ker (π). Then I := Ker (φ) ⊇ mk+1 , hence W is a quotient of Jn|m .  0 Remark 4.44. Both Proposition 4.42 and Proposition 4.43 have non-finitely generated analogues; one may introduce jet algebras with infinitely many generators, and then Proposition 4.42 holds and Proposition 4.43 holds for formal Weil K-algebras. The proofs are the same. Proposition 4.45. If A is a finitely generated E-algebra and p : A → K is a (k) K-point of A, then each Ap , is a Weil algebra. Proof. Since A is finitely generated, there exists a surjection  ϕ : K x1 , . . . , xn ; ξ 1 , . . . , ξ m → A. If p : A → K is a K-point of A, then by composition there is an induced K-point q of K x1 , . . . , xn ; ξ 1 , . . . , ξ m . Denote by  u : K x1 , . . . , xn ; ξ 1 , . . . , ξ m → K the unique K-point sending each of the generators to zero. For every K-point t of K x1 , . . . , xn ; ξ 1 , . . . , ξ m , consider the automorphism   → K x1 , . . . , xn ; ξ 1 , . . . , ξ m θt : K x1 , . . . , xn ; ξ 1 , . . . , ξ m  xi 7→ xi − t xi  ξ j 7→ ξ j − t ξ j , with inverse θ−t . Let Mp denote the kernel of p. Notice that the following diagram commutes  ϕθq / K x1 , . . . , xn ; ξ 1 , . . . , ξ m ❧❧ A ❧❧❧ ❧ ❧ p ❧❧ π ❧❧ u ❧❧❧ ❧ ❧   u❧❧❧❧❧ Ko A/Mpk+1 . p̃ Hence, the image of each generator under πϕθq is in Ker (p̃) , which has nilpotency degree k. It follows from Proposition 4.42 that there is a commutative diagram k Jn|m ❀❀ ❀❀ ũ ❀❀  ϕ̃ K / A/Mpk+1 ⑥⑥ ⑥⑥ ⑥ ⑥ ~ ⑥ p̃ ⑥ 44 DAVID CARCHEDI AND DMITRY ROYTENBERG k such that ϕ̃ is surjective. Since Jn|m is a Weil algebra, Ker (ũ) is finitely generated as a K-module. Notice that we have a canonical isomorphism of K-modules Ker (p̃) ∼ = Ker (ũ) / Ker (ϕ̃) , (k) so hence Ker (p̃) is also finitely generated and Ap is a Weil algebra.  Notation. Let W denote the full subcategory of EAlg spanned by Weil K-algebras and their homomorphisms. Corollary 4.46. If A is a finitely generated E-algebra which is near-point determined, it is W-point determined. Proof. This follows immediately from Proposition 4.33 and Proposition 4.45.  Remark 4.47. From Corollary 4.46, it follows that if A is a finitely generated C ∞ algebra, then it is near-point determined in the sense of Definition 4.29 if and only if it is near-point determined in the sense of [20]. Remark 4.48. Since W ⊂ N, if A is a W-point determined E-algebra, then it is also near-point determined. By Corollary 4.46, the converse is true provided that A is finitely generated. However, the converse is not true in general, as the following example shows. It was suggested to us by Pierre Lairez: Let E = ComK , K a field. Let  A := K [u, x1 , x2 , · · · ] / u2 , (xi xj − δij u) |i,j . Let ū and x̄i denote the images of u and each xi in A, respectively. Consider the canonical projection to K with kernel m = (ū, x̄1 , x̄2 , · · · ) . Notice that m4 = 0, so that A is a nilpotent extension of K. Suppose that ϕ : A → W is a morphism to a Weil algebra which does not annihilate ū. The image of ϕ is a subalgebra of a Weil algebra. By [20], Corollary 3.21 b), the image of ϕ is also a Weil algebra. Hence, we may assume without loss of generality that ϕ is surjective. Hence A→W →K (where the latter map is the one defining W as an extension of K) is also surjective, and its kernel must be m. This means, that A → W → K and π : A → K can only differ by an automorphism of K- but this automorphism must be an automorphism of K-algebras, so must be the identity. Hence, we have that the natural diagram commutes. This implies that Ker(ϕ) = I must be a subideal of m which does not contain ū, and such that m/I is a finitely generated K-module. If no finite K-linear combination of x̄1 , x̄2 , . . . is in I, then the images of all the x̄i in m/I would be linearly independent, so m/I would be infinite dimensional. Hence, there exists some ∞ X y= ai x̄i ∈ I, i=1 ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 45 with all but finitely many ai zero, and at least one ai non-zero. Without loss of generality, assume that a1 is nonzero. Then ∞ X ai x̄1 x̄i x1 y = i=1 ∞ X = ai δi1 ū i=1 a1 ū ∈ I, = and hence ū ∈ I, which is a contradiction. Finally, we note that Weil (super) algebras enjoy the following useful property ([13], remark directly preceding Section 2.) Proposition 4.49. For any W ∈ W, the functor W ⊙ − : EAlg → EAlg has a left adjoint, ( )W : EAlg → EAlg. The same holds in ComAlgK . In particular, W-points of an algebra A are in bijection with K-points of AW . Moreover ([16], Theorem 9.3.1) if A is free (respectively finitely generated) so is AW . Remark 4.50. This property corresponds to exponentiability in EAlgop : if A cor- responds to A, W to W, then AW = A W in EAlgop . 4.3. Flatness of near-point determined superalgebras. In this subsection, E will be a fixed (possibly super) Fermat theory whose ground ring K is a field. We will investigate the properties of the intrinsic tensor product of near-point determined E-algebras and derive some important properties of it. These properties seem to suggest that every near-point determined E-algebra is flat with respect to this intrinsic tensor product, which we state as a conjecture at the end of this subsection. Recall that the inclusion EAlgnpd ֒→ EAlg admits a left-adjoint LN (Proposition 4.13). In particular, since EAlg is both complete and cocomplete, EAlgnpd also enjoys both of these properties. However, as with all reflective subcategories, colimits are computed by first computing the colimit in the larger category, in this case EAlg, and then applying the reflector LN . In particular, from this observation, there is an intrinsic notion of tensor product (i.e. coproduct) of near-point determined E-algebras, which we shall denote by the binary operation ⊙ ◦ , and may not agree a priori with ⊙. Definition 4.51. A near-point determined E-algebra is flat if the endofunctor A⊙ ◦ ( ) : EAlgnpd → EAlgnpd preserves finite limits (i.e. is left exact.) Lemma 4.52. For any near-point determined E-algebra A, the endofunctor A⊙ ◦ ( ) : EAlgnpd → EAlgnpd preserves finite products. Proof. The endofunctor in question factors as A⊙( ) ( )◦u LN EAlgnpd ֒→ EAlg −−−−−−−→ EA Alg −−−−−−−→ EAlg −−−−−−−→ EAlgnpd . 46 DAVID CARCHEDI AND DMITRY ROYTENBERG By Corollary 3.33, A⊙ ( ) preserves finite products, and by Remark 4.31, LN does as well. The rest of the functors are right adjoints, so it follows that the composite preserves finite products.  We have the following generalization of Corollary 2.43: Proposition 4.53. Let W be a formal Weil K-algebra. Then W viewed as an E-algebra (as in Corollary 2.43) is near-point determined. Moreover, if A is any other near-point determined E-algebra, the natural map A♯ ⊗ W → (A ⊙ ◦ W)♯ is an isomorphism. In particular, A ⊗ W is near-point determined as an E-algebra. Proof. By Proposition 4.6, W is clearly near-point determined. It suffices to show that A♯ ⊗ W with its canonical structure of an E-algebra is near-point determined. Let Y j : A ֒→ Wα α be an embedding into a product of formal Weil algebras, whose existence is ensured by Proposition 4.6. Then, since K is a field, the tensor product of K-algebras is left exact (and hence also preserves monomorphisms), and we have an embedding Y j ⊗ idW : A ⊗ W ֒→ ( Wα ) ⊗ W. α The canonical map Y Y (Wα ⊗ W) ( Wα ) ⊗ W → α α is also a monomorphism, as this is a property of vector spaces over K. By Corollary 2.43, each Wα ⊗ W is a formal Weil algebra. So, A ⊗ W embeds into a product of formal Weil algebras, and hence is near-point determined, again by Proposition 4.6.  Lemma 4.54. Let A be a near-point determined E-algebra. Then the endofunctor A⊙ ◦ ( preserves monomorphisms. ) : EAlgnpd → EAlgnpd Proof. Let i : B ֒→ C be a monomorphism of near-point determined E-algebras. Suppose that idA ⊙ ◦ i:A⊙ ◦ B→A⊙ ◦C is not a monomorphism. Then there exists non-zero element k ∈ A ⊙ ◦ B in its kernel. So, there exists a homomorphism φ : A ⊙ ◦ B → W to a formal Weil algebra, such that φ (k) 6= 0. Denote by iA : A → A ⊙ ◦B the canonical morphism, and similarly for B. Notice that the following diagram commutes: φiA ⊙ ◦ idB / = / W ⊗B A⊙ ◦B W⊙ ◦B idA ⊙ ◦i  A⊙ ◦C idW φiA ⊙ ◦ idC ⊙ ◦i  /W⊙ ◦C idW ⊗i =  / W ⊗ C. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 47 The homomorphism idW ⊗ i : W ⊗ B → W ⊗ C is a monomorphism since tensoring with K-algebras preserves monomorphisms, since K is a field. Notice that φ factors as idW ⊙ ◦ φiA φiA ⊙ ◦ idB ∇ ◦ W −−−−−−−→ W, ◦ B −−−−−−−→ W ⊙ A⊙ ◦ B −−−−−−−→ W ⊙ hence (φiA ⊙ ◦ idB ) (k) 6= 0. It follows that whereas (idW ⊗ i) (φiA ⊙ ◦ idB ) (k) 6= 0, (φiA ⊙ ◦ idC ) (idA ⊙ ◦ i) (k) = 0 since k is in the kernel. This is a contradiction.  Note that any left exact functor preserves monomorphisms. In particular, in order for taking the ⊙ ◦ -tensor product with a near-point determined E-algebra to be left exact, it is necessary that it preserve monomorphisms. In fact, for commutative rings, the converse is true. That is, for R a commutative ring and A an R-algebra, one has the following result: A is flat if and only if the endofunctor A ⊗R ( monomorphisms. ) ComR → ComR preserves (This can be proven by using square-zero extensions to show that if tensoring with A preserves monomorphisms of R-algebras, it also preserves monomorphisms of R-modules.) In light of Lemma 4.54, the following conjecture seems plausible: Conjecture 4.55. Every near-point determined E-algebra is flat. In light of Lemma 4.52, to show that Conjecture 4.55 is true, it suffices to show that for any near-point determined E-algebra A, the endofunctor A⊙ ◦ ( ) : EAlgnpd → EAlgnpd preserves pullbacks, or equalizers; either would suffice1. We offer the following partial result: Lemma 4.56. Let P /C g   f /D B be a pullback diagram of near-point determined E-algebras, and consider the pullback diagram /A⊙ P′ ◦C  A⊙ ◦B idA ⊙ ◦f idA ⊙ ◦g  /A⊙ ◦ D. 1In fact, one would only need to show it preserves coreflexive equalizers. 48 DAVID CARCHEDI AND DMITRY ROYTENBERG The canonical map A⊙ ◦ P → P′ is a monomorphism. Proof. Consider the canonical monomorphism P → B × C. By Lemma 4.54 and Lemma 4.52, the induced morphism A⊙ ◦ P → (A ⊙ ◦ B) × (A ⊙ ◦ C) is a monomorphism, and this map factors through A ⊙ ◦ P → P ′.  Appendix A. Algebraic theories In this appendix, we give a rapid introduction to the formalism of abstract algebraic theories. Nearly all the material may be found in [3] and we claim no originality for it. This appendix is included merely as a convenience to the reader. Definition A.1. [5, 3] An (abstract) algebraic theory is a small category T with finite products. Remark A.2. Any algebraic theory T has a terminal object; it is the empty product. We adjoined the parenthetical adjective abstract since we have not provided the data of a chosen set of generators. Much of the theory of algebraic theories works well at this level of generality, but for many applications, it is important to consider the generators as part of the data. This is precisely what one needs to consider algebras as a (family of) sets with extra structure. We discuss this in Section B. For now, we will simply give the following definition: Definition A.3. A set S ⊂ Ob(T) of objects of T is said to generate T as an algebraic theory if very object of T is isomorphic to the product of finitely many objects from S. Remark A.4. Since any algebraic theory T is small, the set of all objects of T is in particular (a very redundant) set of generators. Definition A.5. [5, 3] Given an algebraic theory T, a T-algebra (in Set) is defined to be a finite product preserving functor A : T → Set. T-algebras form a category TAlg, with natural transformations as morphisms; they span a full subcategory of the functor category SetT . A category C is said to be algebraic if it is equivalent to TAlg for some algebraic theory. Remark A.6. A T-algebra A : T → Set must send the terminal object in T to the singleton set. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 49 Remark A.7. Suppose that T has a chosen generating set S. This enables us to describe an algebra A by a collection of sets A = {As = A(s)|s ∈ S} together with finitary operations A(f ) : N Y i=1 Ansii −→ As , s1 , . . . , sN , s ∈ S, ni ∈ N for each morphism f of T, satisfying coherence conditions following from functoriality and preservation of products. Indeed, since S generates T, then every object t is of the form Y t∼ sns = s∈S for some integers ns ≥ 0, with only finitely many non-zero. It follows that Y A (s)ns . A (t) ∼ = s∈S When the set S is a singleton, up to equivalence, we can assume that T has the non-negative integers as objects, with product given by addition, 0 as the terminal object, and with 1 as the generator. In this case a T-algebra is the same thing as a set A = A(1) together with finitary operations A(f ) : An → A corresponding to the morphisms f ∈ T(n, 1) and satisfying structure equations coming from the composition of morphisms. In general, we may replace T, up to equivalence, by a category whose objects are S-indexed families of non-negative integers. We will discuss this in detail in Section B. Remark A.8. The Yoneda embedding YTop : Top −→ SetT actually factors through TAlg (since representable functors preserve all limits, hence in particular, finite products) and identifies Top with the full subcategory of finitely-generated free T-algebras (see Remark B.14). Remark A.9. Let Z be any set, and let A : T → Set be an algebra for an algebraic theory T. Notice that the functor Z ( ) : Set → Set X 7→ X Z = Hom (Z, X) is right adjoint to the functor X 7→ X × Z, so preserves all limits. In particular, the functor AZ := ( )Z ◦ A : T → Set is a T-algebra. If k is a generator of T, we have Z Z AZ k = A (k) = Ak = Hom(Z, Ak ), with the operations applied “pointwise”. 50 DAVID CARCHEDI AND DMITRY ROYTENBERG A.1. Sifted Colimits. Definition A.10. A category D is said to be sifted if for every finite set X, (regarded as a discrete category) and every functor F : D × X → Set, the canonical morphism lim −→ Y x∈X F (d, x) ! −→ Y x∈X limF (d, x) −→ is an isomorphism. A sifted colimit in C is a colimit of a diagram F : D → C, with D a sifted category. Remark A.11. Sifted colimits commute with finite products in Set (by definition). Notice the similarity between sifted colimits, and filtered colimits, which commute with all finite limits in Set. In particular, filtered colimits are a special case of sifted colimits. Definition A.12. Let lim (R ⇒ A) be a coequalizer in a category C. It is a −→ reflexive coequalizer if for all objects C, the induced map HomC (C, R) → HomC (C, A) × HomC (C, A) is injective, and hence determines a relation on the set HomC (C, A) , and moreover, this relation is reflexive. In Set, one can easily check that reflexive coequalizers commute with finite products. The following proposition follows: Proposition A.13. Reflexive coequalizers are sifted colimits. Proposition A.14. [3] A category C is cocomplete if and only if it has all sifted colimits, and binary coproducts. Similarly, a functor preserves all small colimits if and only if it preserves all sifted colimits and binary coproducts. Proof. The standard proof that all colimits can be constructed out of arbitrary coproducts and coequalizers only uses reflexive coequalizers. The result now follows since any coproduct is a filtered colimit of finite coproducts.  The following proposition is standard: Proposition A.15. [2] A category D is sifted if and only if its diagonal functor is final. Corollary A.16. [2] Any category D with finite coproducts is sifted. Recall that for a small category C, one can construct a category Ind (C) of Ind-objects of C, that is formal filtered colimits of objects of C. Formally, Ind (C) is the free cocompletion of C with respect to filtered colimits. One can also do the analogous thing for sifted colimits: ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 51 Definition A.17. Let C be a small category. We define Sind (C) to be the free cocompletion of C with respect to sifted colimits. It is a category under C, YSind : C → Sind (C) determined uniquely up to equivalence by the property that the functor YSind satisfies the following universal property: For all categories B with sifted colimits, composition with YSind induces an equivalence of categories ∼ Funsift (Sind (C) , B) −−−−−−−→ Fun (C, B) , where Funsift (Sind (C) , B) is the full subcategory of the functor category Fun (Sind (C) , B) spanned by those functors which preserve sifted colimits. Proposition A.18. [3] For a small category C, Sind (C) may be constructed as op the full subcategory of the presheaf category SetC - the free cocompletion of Cspanned by those presheaves which are sifted colimits of representables, and YSind may be taken as the codomain-restricted Yoneda embedding. Proposition A.19. The functor YSind : C → Sind (C) preserves any finite coproducts that exist in C. ` Proof. Let C and D be objects of C for which C D exists. By Proposition A.18, op we can identify Sind (C) with a subcategory of SetC and YSind with the Yoneda embedding. Let X = lim Y (Eγ ) −→ be a sifted colimit. This represents an arbitrary object of Sind (C) . We have the following chain of natural isomorphisms:   a     a  ∼ Hom Y C D , lim Y (Eγ ) lim Y (Eγ ) C D = −→ −→  a  ∼ Hom C D, Eγ = lim −→ ∼ lim = −→ (Hom (C, Eγ ) × Hom (D, Eγ ))     ∼ lim Hom (C, Eγ ) × lim Hom (D, Eγ ) = −→ −→ ∼ Y (Eγ ) (C) × lim Y (Eγ ) (D) = lim −→  −→   ∼ Y (Eγ ) × Hom D, lim Y (Eγ ) . = Hom C, lim −→ −→  Corollary A.20. If C has binary coproducts, then Sind (C) is cocomplete. Proof. By Proposition A.14, it suffices to show that Sind (C) has binary coproducts. However, by Proposition A.19, coproducts of objects in the essential image of YSind exist in Sind (C). Since every object of Sind (C) is a sifted colimit of representables, the result follows.  52 DAVID CARCHEDI AND DMITRY ROYTENBERG Corollary A.21. If C has binary coproducts, then for any cocomplete category B, composition with YSind induces an equivalence of categories ∼ Funcocont. (Sind (C) , B) −−−−−−−→ Fun` (C, B) , where Funcocont. (Sind (C) , B) is the full subcategory of the functor category Fun (Sind (C) , B) spanned by those functors which preserve all colimits, and Fun` (C, B) is the full subcategory of Fun (C, B) spanned by those functor which preserve binary coproducts. op Corollary A.22. If C has binary coproducts, Sind (C) is reflective in SetC . Proof. It is easily checked that the left Kan extension LanY (YSind ) of YSind along the Yoneda embedding, which exists by virtue of the cocompleteness of Sind (C), is a left adjoint to the inclusion op Sind (C) ֒→ SetC .  Corollary A.23. If C has binary coproducts, Sind (C) is locally finitely presentable, so in particular is complete and cocomplete. Moreover, limits and sifted (and hence filtered) colimits are computed pointwise. Proof. The inclusion op Sind (C) ֒→ SetC preserves sifted colimits by construction, hence in particular, filtered colimits, so is op accessible. Since Sind (C) is fully reflective in SetC , it follows from [1], Proposition 1.46, that Sind (C) is locally finitely presentable. The final statement is true by construction, from Proposition A.18.  Theorem A.24. [3] Let T be an algebraic theory. Then its category of algebras, TAlg, is equivalent to Sind (Top ) . Proof. Any representable presheaf is clearly an algebra, and therefore so is any sifted colimit of representables. Hence every functor F : T = (Top ) op → Set in Sind (Top ) ⊆ SetT is a T-algebra. It suffices to show that if A is a T-algebra, then it is a sifted colimit of representable presheaves. The functor A : (Top ) is canonically the colimit of Z Top  op → Set op op A → Set(T ) = SetT ,  R where A is Grothendieck construction of the presheaf A. It therefore sufTop   R fices to show that A is sifted. By Corollary A.16, it suffices to show that Top ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS  R Top 53 op  op R A has binary products. The objects of A can be described as Top pairs (t, α) such that t ∈ T and α ∈ A (t) . Arrows (t, α) → (t′ , α′ ) are morphisms g : t′ → t such that A (g) (α′ ) = α. It follows that (t, α) × (t′ , α′ ) = (t × t′ , (α, α′ ) ∈ A (t) × A (t′ ) = A (t × t′ )) .  Corollary A.25. For an algebraic theory T, its category of algebras TAlg is locally finitely presentable, so in particular is complete and cocomplete. Moreover, limits and sifted (and hence filtered) colimits are computed pointwise. A.2. Morphisms of Theories. Definition A.26. Algebraic theories naturally form a 2-category AT h. A morphism of algebraic theories T → T′ is a finite product preserving functor. A 2-morphism is simply a natural transformation of functors. We will mostly be concerned only with truncation AT h to a 1-category in this paper, and denote it by ATh. Remark A.27. Any morphism of algebraic theories must preserve the terminal object, since it is the empty product. We will now show that any morphism F : T → T′ of algebraic theories induces an adjunction F! ⊣ F ∗ between the corresponding categories of algebras: (A.1) TAlg o F∗ F! / T′ Alg , To construct these, observe that the functor F op : Top → T′op induces three adjoint functors F! ⊣ F ∗ ⊣ F∗ / T′ SetT o / Set . The adjunction with which we will be concerned is F! ⊣ F ∗ . Indeed, F! is given as the left Kan extension LanYTop (YT′op ◦ F op ) (A.2) ′ SetO T ❴ ❴ ❴/ SetO T F! YT′op YTop ? Top F op ? / T′op 54 DAVID CARCHEDI AND DMITRY ROYTENBERG of YT′op ◦ F op along the Yoneda embedding YTop : Top ֒→ SetT , so that F! is the unique colimit preserving functor which agrees with F op along representables. By ′ the Yoneda Lemma, it follows that if X ∈ SetT , F ∗ (X) (t) ∼ = Hom (YTop (t) , F ∗ (X)) ∼ Hom (F! (YTop (t)) , X) = ∼ = Hom (YT′op (F (t)) , X) ∼ = (X ◦ F ) (t) , so that F ∗ is given simply by precomposition with F. It follows that if X preserves finite products, so does F ∗ (X). So there is an induced functor F ∗ : T′ Alg → TAlg. The functor ′ F ∗ : SetT → SetT has a right adjoint F∗ , which by the Yoneda Lemma is given by the formula F∗ (X) (t′ ) = Hom (F ∗ YT′op (t′ ) , X) . If X happened to be a T-algebra, there is no guarantee that F∗ (X) is a T′ -algebra, so there is in general no right adjoint to F ∗ at the level of algebras. Remark A.28. Indeed, ′ F ∗ : SetT → SetT , since it is a left adjoint, preserves all colimits, and these colimits are computed pointwise. It follows that F ∗ : T′ Alg → TAlg at least preserves sifted colimits, as these are also computed pointwise. In fact, since both TAlg and T′ Alg are locally presentable, it follows by the Adjoint Functor Theorem ([1] Theorem 1.66), that F ∗ has a right adjoint at the level of algebras, if and only if it preserves all small colimits. Since F ∗ preserves sifted colimits, by Proposition A.14, it follows that F ∗ has a right adjoint if and only if it preserves finite coproducts. Since F! ⊢ F ∗ , by the universal property of left Kan extensions, another characterization of F! is that F! (Z) is itself the left Kan extension of Z along F , that is F! = LanF ( ) : Z 7→ LanF (Z) . Notice that if Z is in fact a T-algebra, then Z is a sifted colimit of representables, Z∼ Y op (tα ) . = lim −→ T It follows that,   F! (Z) = LanF lim YTop (tα ) ∼ Y ′op (F (tα )) = lim −→ −→ T is a sifted colimit of representables, hence a T′ -algebra. Therefore, F! restricts to a functor F! : TAlg → T′ Alg. In summary: ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 55 From a morphism of theories F : T → T′ ones gets an adjunction TAlg o F∗ F! / T′ Alg , such that F ∗ preserves sifted colimits. This suggests the following notion of a morphism of algebraic categories: Definition A.29. An algebraic morphism from one algebraic category C to another D, is an adjunction Co f∗ f! /D, such that the right adjoint f ∗ preserves sifted colimits. With this notion of morphism, algebraic categories naturally form a 2-category AlgCat , whose 2-morphisms between (f ∗ , f! ) and (g ∗ , g! ) are given by natural transformations α : f ∗ ⇒ g∗. We similarly denote its 1-truncation by the 1-category AlgCat. Remark A.30. This definition of morphism is dual to that of [3]. Remark A.31. By [3], Theorem 8.19, a limit preserving functor f : C → D between algebraic categories preserves sifted colimits if and only if it preserves filtered colimits and regular epimorphisms. Hence, one may equivalently say a morphism of algebraic theories F : T → T′ induces an adjunction TAlg o F∗ F! / T′ Alg , such that F ∗ preserves filtered colimits and regular epimorphisms. Remark A.32. There are some size issues with 2-category AlgCat in Definition A.29; morphisms may form a proper class. However, there is no cause for concern as AlgCat is at least essentially small, as guaranteed by the duality theorem [3], Theorem 8.14. Indeed, AlgCat is equivalent to a full subcategory of AT h. Remark A.33. The morphisms in AlgCat op may be described as limit preserving functors which preserve sifted colimits. The existence (and uniqueness) of a left adjoint follow from the Adjoint Functor Theorem ([1] Theorem 1.66). Remark A.34. If F : C → D is an essentially surjective functor, then op F ∗ : SetD op → SetC is faithful and conservative. In particular, if F : T → T′ is an essentially surjective morphism of algebraic theories, then F ∗ : T′ Alg → TAlg is faithful and conservative. Moreover, it preserves and reflects all limits and sifted colimits. 56 DAVID CARCHEDI AND DMITRY ROYTENBERG Remark A.35. The construction outlined in the subsection naturally extends to a 2-functor AT h → AlgCat which sends a morphism F : T → T′ to the algebraic morphism (F ∗ , F! ) . Definition A.36. When F is faithful, one calls T as a sub-theory of T′ ; in this case, F ∗ (A′ ) can be thought of as the underlying T-algebra of a T′ -algebra A′ , while F! (A) is the free T′ -algebra generated by a T-algebra A, or its T′ -completion. Notation. When T is a sub-theory of T′ , we shall often neglect to mention the inclusion functor and denote the underlying T-algebra functor by ( )♯ and its left adjoint, the T′ -completion, by (d). Remark A.37. By general considerations, it follows that if F is full and faithful, so is F! . Remark A.38. It may happen that F : T → T′ has a right adjoint G : T′ → T (so Gop is left adjoint to F op ). Since G is a right adjoint, it automatically preserves products. Hence G induces an adjunction (G! ⊣ G∗ ) between the categories of algebras. Notice that for t′ ∈ T′ and t ∈ T, Hom (t, G∗ YT′op (t′ )) ∼ = ∼ = ∼ = ∼ = ∼ = ∼ = Hom (G! YTop (t) , YT′op (t′ )) Hom (YT′op (G (t)) , YT′op (t′ )) HomT′op (G (t) , t′ ) HomT′ (t′ , G (t)) HomT (F (t′ ) , t) HomTop (t, F (t′ )) . Hence ′ G∗ : SetT → SetT is colimit preserving (since it has a right adjoint G∗ ) and for all t′ , G∗ ◦ YT′op (t′ ) = YTop (F (t′ )) . It follows that G∗ = F! , hence F! acquires a further left adjoint, namely G! . These then restrict to a triple of adjunctions G! ⊣ F! ⊣ F ∗ : o / T′ Alg . TAlg o Appendix B. Multisorted Lawvere Theories We now go on to describe the extra data needed to attach to an abstract algebraic theory in order to give a good sense of underlying set (or family of sets) to its algebras. Again, most of this material can be found in [3], however this appendix also contains some examples and notation important in this paper. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 57 Definition B.1. An S-sorted Lawvere theory is an algebraic theory T together with a injection ϕT : S ֒→ T0 whose image generates T in the sense of definition A.3. A morphism of S-sorted Lawvere theories (T, ϕT ) → (T′ , ϕT′ ) is a (natural equivalence class of a) morphism of algebraic theories such that for all s ∈ S, F : T → T′ F (ϕT (s)) = ϕ′T (s) . We denote the associated category SLTh. When S is a singleton set, we call an S-sorted Lawvere theory simply a Lawvere theory, and denote the corresponding category by LTh. Remark B.2. Up to equivalence, one can regard an S-sorted Lawvere theory as a category whose objects are S-indexed families of non-negative integers. This allows us to refer to a theory T without reference to its structural map ϕT . Remark B.3. One can expand this definition by removing the injectivity of the map ϕT and nothing is lost. We will refer to such a pair (T, ϕ) with ϕ not necessarily injective as an S-indexed Lawvere theory. Remark B.4. Let f : T → T′ be a morphism of S-sorted Lawvere theories. Then, up to equivalence, f is a bijection on objects. Remark B.5. If F : T → T′ is a full and faithful morphism of S-sorted Lawvere theories, then it is an equivalence. Definition B.6. An algebra for an S-sorted Lawvere theory T is simply an algebra for its underlying algebraic theory. Proposition B.7. A morphism F : T → T′ of Lawvere theories induces an adjunction F∗ / T′ Alg , TAlg o F! ∗ such that F preserves and reflects all limits and sifted colimits (equivalently all limits, filtered colimits, and regular epimorphisms). Proof. This follows from Remark A.34 and Remark B.4. The parenthetical remark follows from Remark A.31.  Example B.8. [3] Let S be any set viewed as a discrete category. Let TS be the free completion of S with respect to finite products. Concretely, the objects of TS are finite families (si ∈ S)i∈I and morphisms (si ∈ S)i∈I → (tj ∈ S)j∈J are functions of finite sets f :J →I such that sf (j) = tj 58 DAVID CARCHEDI AND DMITRY ROYTENBERG for all j ∈ J. There is a canonical functor YQ : S → TS , sending each element s ∈ S to (s) viewed as a finite family with one element. The universal property of this functor is that for any category D with finite products, composition with YQ induces an equivalence of categories (B.1) ∼ χ : FunQ (TS , D) −→ Fun (S, D) = DS , where FunQ (TS , D) is the full subcategory of the functor category on those functors which preserve finite products. It follows that T is an algebraic theory whose category of algebras is equivalent to SetS . Moreover, the functor YQ gives TS the canonical structure of an S-sorted Lawvere theory. Remark B.9. When S is a singleton, TS is equivalent to FinSetop , the opposite category of finite sets. By construction, we have the following proposition: Proposition B.10. The S-sorted Lawvere theory TS is an initial object. Let (T, ϕT ) be an S-sorted Lawvere theory. From Proposition B.10, we know that there is a unique morphism of S-sorted Lawvere theories σT : TS → T. From Proposition B.7, we have the following Corollary: Corollary B.11. [3] With σT : TS → T as above, the functor ∗ UT := (σT ) : TAlg → SetS is faithful and conservative. In particular, it preserves and reflects limits, sifted colimits, monomorphisms, and regular epimorphisms. Remark B.12. The above Corollary only needs that σT is essentially surjective, so it holds true for S-indexed Lawvere theories too. Remark B.13. In particular, for an S-sorted Lawvere theory σT : TS → T, the adjunction SetS o (σT )∗ (σT )! / TAlg is monadic. Remark B.14. The left adjoint (σT )! : SetS → TAlg is the functor assigning an S-indexed family of sets G = (Gs )s∈S the free T-algebra on G, whereas the right adjoint (σT )∗ assigns a T-algebra its underlying S-indexed set. Explicitly, if A : T → Set ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 59 is a T-algebra, then the underlying S-indexed set is (As = A (σT (s))){s∈S} . The diagram (A.2) becomes in this case ❴ ❴ ❴/ SetT Set O O u! YTop ? TS op σT  / T? op . It follows that YTop establishes an equivalence of categories between Top and the full subcategory of TAlg consisting of finitely generated free T-algebras. Remark B.15. Since every algebra is a sifted colimit of representables, which by the previous remark are precisely the finitely generated free algebras, by Remark A.28, it follows that for a map of Lawvere theories F : T → T′ , the functor F ∗ : T′ Alg → TAlg has a right a adjoint if and only if for each pair A, B of finitely generated free T′ -algebras,  a  a B = F ∗ (A) F ∗ (B) . F∗ A Notation. For a Lawvere theory T, denote the free T-algebra on n generators by T(n). As discussed above, T(n) can be identified with the representable functor YTop (n) . Since the underlying set is given by evaluation at the generator, 1, it follows that the underlying set is (B.2) YTop (n) (1) = HomTop (1, n) = HomT (n, 1) . We will use the notation T(n, 1) for this set of morphisms to emphasize that it encodes the n-ary operations of the theory T. In the S-sorted case, we adopt the notation T({ns }s∈S ) for the free algebra with ns generators of sort s, for each s ∈ S. The underlying S-indexed set of such a free algebra is then (T (ϕT (s)ns , ϕT (s)))s∈S . Remark B.16. Let T be an S-sorted Lawvere theory. Given an A ∈ TAlg, an A-algebra is, by definition, an object of the undercategory A/TAlg. Given a morphism of theories F : T → T′ , for each A ∈ T′ Alg we have an induced adjunction of undercategories ′ A/T Alg o F!A ∗ FA / F ∗ A/TAlg. To see this, observe that A-algebras are algebras over the theory TA whose operations are labeled by elements of free finitely generated A-algebras, i.e. TA ({ns }s∈S ) = A ∐ T({ns }s∈S ). The above adjunction is induced by the morphism of theories FA : TF ∗ A −→ T′A . 60 DAVID CARCHEDI AND DMITRY ROYTENBERG Notice that there is also canonical morphisms of theories and uA : T′ → T′A uF ∗ A : T → TF ∗ A , such that the following diagram commutes: T F / T′ uA uF ∗ A  TF ∗ A  FA / T′ . A It follows that FA∗ maps A → A′ to F ∗ A → F ∗ A′ and that F!A takes any F ∗ Aalgebra of the form a F ∗A → F ∗A B, for a T-algebra B, to A→A a F! B. Remark B.17. Let f : T → T′ be a morphism of S-sorted Lawvere theories. The category Cat of small categories carries a factorization system. Faithful functors are right orthogonal to functors which are both essentially surjective and full. It turns out that if f is a morphism of S-sorted Lawvere theories, if T → C → T′ is the unique factorization by an essentially surjective and full functor, followed by a faithful one, then C is an S-sorted Lawvere theory, and all the functors are maps of S-sorted Lawvere theories. In this case, we denote C by Im (f ) , and call it the image of f.2 We now proceed to construct Im (f ) . We may assume without loss of generality that f is a bijection on objects. Consider for each pair of objects (x, y) ∈ T0 the induced function fx,y : HomT (x, y) → Hom′T (x, y) . Then one can define a new category Im (f ) with the same objects as T′ but whose morphisms are given by Hom (x, y) := Im (fx,y ) , the image of the function fx,y . Since f preserves limit diagrams for finite products, it follows that T′ has finite products and the induced functor Im (f ) → T′ preserves them. One hence gets a factorization of f (B.3) T → Im (f ) → T′ by algebraic functors, each of which is a bijection on objects. In particular, the structure map for T, σT , gives Im (f ) the canonical structure of a S-sorted Lawvere theory in such a way that the factorization (B.3) consists of morphisms of S-sorted 2The more traditional notion of image of a functor, uses the factorization system determined by essentially surjective functors, and full and faithful functors. This factorization is ill suited for Lawvere theories due to Remark B.5. ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 61 Lawvere theories. We refer to the theory Im (f ) as the image of f . It is clear that the induced map Im (f ) → T′ is faithful. We conclude, that the factorization system determined by essentially surjective and full functors and faithful ones descends to a factorization system on SLTh. Example B.18. Let A be any set. Define the Lawvere theory EndA to be the full subcategory of Set generated by the finite Cartesian powers of A, i.e. EndA (n, 1) = Set(An , A). Picking out A as the generator makes EndA into a Lawvere theory. Notice that the full and faithful inclusion EndA ֒→ Set preserves finite products, so that given a morphism of Lawvere theories F : T → EndA , by composition, one gets an T-algebra in Set. Since F preserves the generator, this induced T-algebra will have underlying set A. It follows that a T-algebra structure on A for a Lawvere theory T is the same thing as a morphism of Lawvere theories F : T → EndA . In the same way, given an S-indexed family of sets A = (As )s∈S ∈ SetS , one obtains a S-sorted Lawvere theory EndA , such that for all S-sorted Lawvere theories T, morphisms of S-sorted Lawvere theories T → EndA are in bijection with T-algebras whose underlying S-indexed set is A. Explicitly EndA is the full subcategory of Set generated by the collection of sets (As ) for each s; these are also the sorts. B.1. Congruences. Definition B.19. Let C be a category with finite products. An equivalence relation on an object A ∈ C is a subobject such that for all objects C, R֌A×A HomC (C, R) ֌ HomC (C, A) × HomC (C, A) is an equivalence relation on the set HomC (C, A) . Definition B.20. Given an equivalence relation R ֌ A × A, one may consider the induced pair of maps (B.4) R ⇒ A. If the coequalizer of this diagram exists, it is called the quotient object A/R of A by the equivalence relation R. Remark B.21. In the case that C = Set, one recovers the usual notion of the quotient of a set by an equivalence relation. 62 DAVID CARCHEDI AND DMITRY ROYTENBERG Remark B.22. A coequalizer of the form (B.4) is a reflexive coequalizer, hence in particular, a sifted colimit. Definition B.23. Let T be an S-sorted Lawvere theory. An equivalence relation in TAlg is called a congruence. Definition B.24. A quotient A 7→ A/R by an equivalence relation is called an effective quotient if the canonical map is an effective epimorphism, i.e. A → A/R  A/R ∼ A ×A/R A ⇒ A . = lim −→ Proposition B.25. Suppose that T is an S-sorted Lawvere theory, then every quotient in TAlg is effective. Proof. For any equivalence relation with a quotient, by definition, the map A → A/R is a regular epimorphism. However, since TAlg has pullbacks, every regular epimorphism is an effective epimorphism, so we are done.  Corollary B.26. Suppose that T is an S-sorted Lawvere theory, then every regular epimorphism is of the form A → A/R for some congruence R on A. Proof. Maps of the form A → A/R are regular by definition. Conversely, suppose that A→B is a regular epimorphism. Then, since TAlg has pullbacks, it is an effective epimorphism, and hence the map is induced by a colimiting cocone witnessing B as the colimit of A ×B A ⇒ B. This coequalizer is the quotient for the equivalence relation hence is of the form R := A ×B A ֌ A × A, A → A/R.  Proposition B.27. Suppose that T is an S-sorted Lawvere theory, and R is a congruence on a T-algebra A. Then the quotient A/R exists. In particular, the underlying S-indexed set of A/R is the quotient of the underlying S-indexed set of A by the equivalence relation induced by R. Proof. From Corollary B.11, the functor UT : TAlg → SetS assigning an algebra its underlying S-indexed set, preserves and reflects reflexive coequalizers. In particular, it preserves and reflects quotients by equivalence relations. Since SetS is a topos, it has quotients by equivalence relations, so we are done.  ON THEORIES OF SUPERALGEBRAS OF DIFFERENTIABLE FUNCTIONS 63 References [1] Jiřı́ Adámek and Jiřı́ Rosický. Locally presentable and accessible categories, volume 189 of London Mathematical Society Lecture Note Series. Cambridge University Press, Cambridge, 1994. [2] Jiřı́ Adámek, Jiřı́ Rosický, and Enrico M. Vitale. What are sifted colimits? Theory Appl. Categ., 23:No. 13, 251–260, 2010. [3] Jiřı́ Adámek, Jiřı́ Rosický, and Enrico M. Vitale. Algebraic theories, volume 184 of Cambridge Tracts in Mathematics. Cambridge University Press, Cambridge, 2011. A categorical introduction to general algebra, With a foreword by F. W. Lawvere. [4] Michael F. Atiyah and Ian G. Macdonald. Introduction to commutative algebra. AddisonWesley Publishing Co., Reading, Mass.-London-Don Mills, Ont., 1969. [5] Francis Borceux. Handbook of categorical algebra. 2, volume 51 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, Cambridge, 1994. Categories and structures. [6] Dennis Borisov. Topological characterization of various types of rings of smooth functions. arXiv:1108.5885, 2011. [7] Dennis Borisov and Justin Noel. Simplicial approach to derived differential manifolds. arXiv:1112.003, 2011. [8] Marta Bunge and Eduardo J. Dubuc. Archimedian local C ∞ -rings and models of synthetic differential geometry. Cahiers Topologie Géom. Différentielle Catég., 27(3):3–22, 1986. [9] David Carchedi and Dmitry Roytenberg. Homological algebra of superalgebras of differentiable functions. 2012. (In Preparation). [10] Eduardo J. Dubuc. Sur les modèles de la géométrie différentielle synthétique. Cahiers Topologie Géom. Différentielle, 20(3):231–279, 1979. [11] Eduardo J. Dubuc. C ∞ -schemes. Amer. J. Math., 103(4):683–690, 1981. [12] Eduardo J. Dubuc. Germ representability and local integration of vector fields in a well adapted model of SDG. J. Pure Appl. Algebra, 64(2):131–144, 1990. [13] Eduardo J. Dubuc and Anders Kock. On 1-form classifiers. Comm. Algebra, 12(11-12):1471– 1531, 1984. [14] Dominic Joyce. An introduction to d-manifolds and derived differential geometry. arXiv:1206.4207, 2012. [15] Anders Kock. Synthetic differential geometry, volume 333 of London Mathematical Society Lecture Note Series. Cambridge University Press, Cambridge, second edition, 2006. [16] Anders Kock. Synthetic geometry of manifolds, volume 180 of Cambridge Tracts in Mathematics. Cambridge University Press, Cambridge, 2010. [17] Yuri I. Manin. Gauge field theory and complex geometry, volume 289 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, second edition, 1997. Translated from the 1984 Russian original by N. Koblitz and J. R. King, With an appendix by Sergei Merkulov. [18] Ieke Moerdijk and Gonzalo E. Reyes. Rings of smooth functions and their localizations. I. J. Algebra, 99(2):324–336, 1986. [19] Ieke Moerdijk and Gonzalo E. Reyes. A smooth version of the Zariski topos. Adv. in Math., 65(3):229–253, 1987. [20] Ieke Moerdijk and Gonzalo E. Reyes. Models for smooth infinitesimal analysis. SpringerVerlag, New York, 1991. [21] Hirokazu Nishimura. Supersmooth topoi. Internat. J. Theoret. Phys., 39(5):1221–1231, 2000. [22] Ngô Van Quê and Gonzalo E. Reyes. Smooth functors and synthetic calculus. In The L. E. J. Brouwer Centenary Symposium (Noordwijkerhout, 1981), volume 110 of Stud. Logic Found. Math., pages 377–395. North-Holland, Amsterdam, 1982. [23] K. Reichard. Nichtdifferenzierbare Morphismen differenzierbarer Räume. Manuscripta Math., 15:243–250, 1975. [24] Gonzalo E. Reyes and Gavin C. Wraith. A note on tangent bundles in a category with a ring object. Math. Scand., 42(1):53–63, 1978. [25] David I. Spivak. Derived smooth manifolds. Duke Math. J., 153(1):55–128, 2010. [26] David N. Yetter. Models for synthetic supergeometry. Cahiers Topologie Géom. Différentielle Catég., 29(2):87–108, 1988. 64 DAVID CARCHEDI AND DMITRY ROYTENBERG D. Carchedi Max Planck Institute for Mathematics, Bonn, Germany. D. Roytenberg Department of Mathematics, Utrecht University, The Netherlands.
0math.AC
A Distributed Message-Optimal Assignment on Rings∗ arXiv:1502.02427v2 [cs.DS] 9 Sep 2015 Gianluca De Marco† Mauro Leoncini‡ Manuela Montangero§ Abstract Consider a set of items and a set of m colors, where each item is associated to one color. Consider also n computational agents connected by a ring. Each agent holds a subset of the items and items of the same color can be held by different agents. We analyze the problem of distributively assigning colors to agents in such a way that (a) each color is assigned to one agent only and (b) the number of different colors assigned to each agent is minimum. Since any color assignment requires the items be distributed according to it (e.g. all items of the same color are to be held by only one agent), we define the cost of a color assignment as the amount of items that need to be moved, given an initial allocation. We first show that any distributed algorithm for this problem requires a message complexity of Ω(n · m) and then we exhibit an optimal message complexity algorithm for synchronous rings that in polynomial time determines a color assignment with cost at most three times the optimal. We also discuss solutions for the asynchronous setting. Finally, we show how to get a better cost solution at the expenses of either the message or the time complexity. keywords: algorithms; distributed computing; leader election; ring. ∗ A preliminary version of this paper has been presented at IPDPS06. Dipartimento di Informatica, Università di Salerno, Italy. e-mail: [email protected] ‡ Dipartimento di Scienze Fisiche, Informatiche e Matematiche, Università di Modena e Reggio Emilia, Italy, and Istituto di Informatica e Telematiche, CNR Pisa, Italy. e-mail: [email protected] § Dipartimento di Scienze Fisiche, Informatiche e Matematiche, Università di Modena e Reggio Emilia, Italy, and Istituto di Informatica e Telematiche, CNR Pisa, Italy. e-mail: [email protected] † 1 1 Introduction We consider the following problem. We are given a set of computational agents connected by a (physical or logical) ring1 , and a set of items, each associated to one color from a given set. Initially each agent holds a set of items and items with the same color may be held by different agents (e.g. see Fig 1.(a)). We wish the agents to agree on an assignment of colors to agents in such a way that each color is assigned to one agent only and that the maximum over all agents of the number of different colors assigned to the same agent is minimum. We call this a balanced assignment: Fig 1.(b) and Fig 1.(c) show two possible balanced assignments. Among all such assignments, we seek the one that minimizes the total number of items that agents have to collect from other agents in order to satisfy the constraints. For example, agent a0 in Fig 1.(b) is assigned colors ∇ and ♠, and therefore needs just to collect four items colored ∇, since no other agent has items colored ♠. △ △ ♥ △ ♥ △ ♥ ♥ ♥ ♥ ♥ ∇ ∇ ∇ ∇ ∇ ♠ ♠ ♠ ♠ ♠ △ △ ♦ △ ♦ △ ♦ ♣ ∇ ∇ ∇ ∇ a1 △ △ ♦ △ ♦ △ ♦ ♥ Initial allo ation a0 a2 ♥ ♥ ♥ ♥ ♥ ∇ ∇ ∇ ∇ ♣ ♣ ♣ ♣ ♦ ♥ ∇ ∇ ∇ ∇ ∇ ♠ ♠ ♠ ♠ ♠ ♦ ♦ ♥ ♦ ♥ ♦ △ △ △ △ a1 Balan ed Color Assignment 1 a0 a2 ♦ ♦ ♦ ♦ ♦ ♣ ♦ ♣ ♣ ♣ ♣ ♦ △ △ △ △ ♠ ♠ ♠ ♠ ♠ △ △ △ △ ♥ ♥ ♥ ♦ ♥ ♦ ♥ ♦ a1 Balan ed Color Assignment 2 (b) (a) a0 a2 ∇ ∇ ∇ ∇ ∇ ♣ ∇ ∇ ∇ ∇ ♣ ♣ ♣ ♣ (c) Figure 1: Three agents: a0 , a1 , a2 , and six colors: ∇, ♦, ♥, △, ♠, ♣. (a) is the initial allocation, while (b) and (c) are two possible balanced color assignments. Items above the line are those that the agent collects from the others. Therefore their total number is the cost of the assignment. The assignment in (b) costs (4 × ∇) + (2 × ♥ + 4 × △) + (1 × ♣ + 6 × ♦) = 17 items, while the assignment in (c) costs (4 × △) + (2 × ♥ + 4 × ♦) + (5 × ∇ + 1 × ♣) = 16 items. The problem can be formalized as follows. Let A = {a0 , . . . an−1 } be a set of n agents connected by a ring and let C = {c0 , . . . , cm−1 } be a set of m colors. Let Qj,i ≥ 0 be the number of items with color cj initially held by agent ai , for every j = 0, . . . , m − 1, and for every i = 0, . . . , n − 1. Definition 1 (Balanced Coloring). A Balanced Coloring is an assignment π : {0, . . . , m− 1} → {0, . . . , n − 1} of the m colors to the n agents in such a way that: • for every color cj , there is at least one agent ai such that π(j) = i; 1 An importand example of logical architecture is given by the set of ring shaped nodes of a Distributed Hash Table. 2 ⌋ ≤ |{cj | π(j) = i}| ≤ ⌈ m ⌉; i.e., the number of color • for every agent ai , ⌊ m n n assigned to agents has to be balanced. In particular, ⌊m ⌋ colors are assigned to n   m m m [ ⌊ n ⌋ + 1 n − m] agents, and ⌊ n ⌋ + 1 colors to the remaining m − ⌊ n ⌋n agents. Any Balanced Coloring then assigns almost the same number of colors to each agent, and when m is a multiple of n, then each agent is assigned exactly the same number of colors. Definition 2 (Distributed Balanced Color Assignment Problem). The Distributed Balanced Color Assignment Problem aims at distributively finding a Balanced Coloring of minimum cost, where the cost of a Balanced Coloring π : {0, . . . , m − 1} → {0, . . . , n − 1} is defined as Cost(π) = m−1 n−1 X X j=0 Qj,i . (1) i=0, i6=π(j) The cost of the optimal assignment will be denoted by Costopt . The approximation Cost ratio of a sub-optimal algorithm A is the quantity Cost A , where CostA is the cost of the opt solution computed by A. Motivations. The scenario defined above may arise in many practical situations in which a set of agents independently search a common space (distributed crawlers, sensor networks, peer-to-peer agents, etc) and then have to reorganize the retrieved data (items) according to a given classification (colors), see for example [14, 19, 21]. In these cases, determining a distributed balanced color assignment may guarantee specialization by category with maximal use of data stored in local memory or balanced computational load of agents minimizing the communication among agents. A similar scenario may also arise in computational economics [2]. The distributed balanced color assignment formalizes a combinatorial auction problem where agents are the bidders and colors represent auction objects. The number of items that an agent holds for each color can be interpreted as a measure of desire for certain objects (colors). Balancing the number of colors per agent and minimizing the cost guarantees the maximum bidders satisfaction. The model. We assume that the agents in A = {a0 , . . . , an−1 } are connected by a ring: agent ai can communicate only with its two neighbors a(i+1) mod n (clockwise) and a(i−1) mod n (anti-clockwise). We assume that each agent knows n (the number of agents), and C (the set of colors). Each agent ai is able to compute pi = max0≤j≤m−1 Qj,i independently, i.e., the maximum number of items it stores having the same color, while p = max0≤i≤n−1 pi is unknown to the agents. We will consider both synchronous and asynchronous rings, always specifying which case we are working with or if results hold for both models. 3 For synchronous and asynchronous rings, we measure message complexity in the standard way (cf. [16, 18]), i.e., we assume that messages of bit length at most c log n, for some constant c (called basic messages), can be transmitted at unit cost. One message can carry at most a constant number of agent ID’s. Non basic messages of length L are allowed, and we charge a cost c′ ⌈L/ log n⌉ for their transmission, for some constant c′ . For what concerns time complexity, in the synchronous case we assume that agents have access to a global clock and that the distributed computation proceeds in rounds. In each round any agent can check if it has received a message (sent in the previous round), make some local computation, and finally send a message. In the asynchronous case agents don’t have access to a global clock, but the distributed computation is event driven (“upon receiving message α, take action β”). A message sent from one agent to another will arrive in a finite but unbounded amount of time. Throughout the paper we will use the generic term time unit to designate the time needed for a message to traverse a link both in the synchronous and asynchronous case: for the synchronous case a time unit (also called round or time slot) is the time elapsed between two consecutive ticks of the clock; for the asynchronous setting a time unit can be any bounded finite amount of time. Nevertheless, in both cases the time complexity can be simply measured as the number of time units needed to complete the algorithm’s execution. Outline of the results. The goal of this paper is to analyze the efficiency with which we can solve the Distributed Balanced Color Assignment problem. In Section 2 we discuss some related problems and show the equivalence with the so called weighted β-assignment problem in a centralized setting [4]. We also show that a brute force approach that first gathers all information at one agent, then computes the solution locally and finally broadcasts it, has a high message complexity of O(mn2 log p/ log n). Fortunately, we can do better than this. In Section 3 we give an Ω(mn) lower bound on the message complexity to determine a feasible solution (suitable for both synchronous and asynchronous cases). In Section 4 we present an algorithm that finds a feasible solution to the problem whose message complexity is O(mn log m/ log n), which is then optimal when m is bounded by a polynomial in n. Interestingly enough, message complexity is never affected by the value p, while running time is. We then show how to adapt the algorithm to work also in the asynchronous case at the expenses of a slight increase in message complexity; this time the messege cost depends also on p, but the asymptotic bound is affected only when p is very large (i.e., only if p 6∈ O(mm )). In Section 5 we show that the proposed algorithm (both synchronous and asynchronous versions) computes a Balanced Coloring whose cost is only a factor of three off the optimal one, and we also show that the analysis of the approximation is tight. Finally, we show that we can find Balanced Colorings with a better approximation ratio at the expenses of the message and/or time complexity. A preliminary version of this work appeared in [6]. In the previous version it was assumed that parameter p (the maximum number of items of a given color) was known to the computational agents. Since in practical situations it is difficult to have a good 4 estimate of such a global parameter, in this new version we removed this assumption. This required both new algorithmic ideas and technical efforts. The algorithm for the asynchronous communication model was also not contained in the preliminary version. Finally, we enriched the proof of the lower bound with new insights that could be useful for further generalizations to different network topologies. 2 Related problems and centralized version In this section we relate the Distributed Balanced Color Assignment problem to known matching problems that have been well studied in centralized settings. We will first show that when m = n our problem is equivalent to a maximum weight perfect matching problem on complete bipartite graphs. On the other hand, when m ≥ n, our problem reduces to the weighted β-assignment problem. The class of β-assignment problems has been introduced by Chang and Lee [4], in the context of the problems of assigning jobs to workers, in order to incorporate the problem of balancing the work load that is given to each worker. In the weighted β-assignment problem one aims at minimizing the maximum number of jobs assigned to each worker. The interested reader can find useful references on these problems, their complexity, and related approximation issues in [1, 3, 15, 20, 22]. We associate to agents and colors the complete bipartite graph on n + m vertices, which we denote by G = (C, A, C × A). We add weights to G as follows: the weight of the edge joining agent ai and color cj is Qj,i . Case m = n. Given a graph (V, E), a perfect matching is a subset M of edges in E such that no two edges in M share a common vertex and each vertex of V is incident to some edge in M. When edges of the graph have an associated weight, then a maximum weight perfect matching is a perfect matching such that the sum of the weights of the edges in the matching is maximum. Lemma 3. When m = n, a maximum weight perfect matching on G is a minimum cost solution to the balanced color assignment problem. Proof. Given a perfect matching E ⊆ E = C × A on G, for every (cj , ai ) ∈ E we assign color cj to agent ai . As G is complete and E is a perfect matching on G, every color is assigned to one and only one P agent and vice-versa. Moreover, the cost of any color assignment E can be written as e∈E\E w(e), and this expression achieves its minimum when E is a maximum weight perfect matching. Finding matchings in graphs is one of the most deeply investigated problems in Computer Science and Operations Research (see [17] for a comprehensive description of the different variants, theoretical properties, and corresponding algorithms). The best algorithm known to find a perfect matching in a bipartite graph is due to Hopcroft and Karp 5  p  [10], and runs in O |E| |V | time, where V and E denote the vertex and edge sets, respectively. The best known algorithm for finding a maximum weight perfect matching is the Hungarian method, due to Kuhn [13], which runs in time O(n3 ). Case m ≥ n. The β-assignment problem is defined on a bipartite graph G = (S, T, E) where (S, T ) is the bipartition of the vertex set. A β-assignment of S in G is a subset of the edges X ⊆ E such that, in the induced subgraph G′ = (S, T, X), the degree of every vertex in S is exactly one. Let β(X) be the maximum degree, in G′ , of vertices in T and let β(G) be the minimum value of β(X) among all possible β-assignments X. The weighted β-assignment problem consists of finding a β-assignment X with β(X) = β(G) which maximizes the total weight of the edges in X. The following lemma is straightforward. Lemma 4. The balanced color assignment problem is a weighted β-assignment of C in the complete bipartite graph G = (C, A, C × A), with β(G) = ⌈m/n⌉. The fastest known algorithm to solve the weighted β-assignment problem is due to Chang and Ho [3] and runs in O(max{|S|2 |T |, |S||T |2}) time, which in our case gives the bound O(m2 n). While the maximum weighted perfect matching problem (and its variants) has been widely investigated in the distributed setting (see [8, 9]), no distributed results are known for the weighted β-assignment problem. A brute force approach. A brute force distributed solution to the problem can be obtained by asking all the agents to send their color information to one specific agent (a priori chosen or elected as the leader of the ring); such an agent will then solve the problem locally and send the solution back to all the other agents. The factor dominating the message complexity of the algorithm above is the information collecting stage. Indeed, each agent sends O(m) non-basic messages, each corresponding to O(log p/ log n) basic messages, through O(n) links, on the average. This results in a message complexity of O(mn2 log p/ log n). On the other hand, we might think of an algorithm in which each agent selects the correct number of colors basing its choice just on local information (e.g. its label). This requires no communication at all, but, even if we are able to prove that the agents agree correctly on a balanced coloring, we have no guarantee on how good the solution is. As we already said, we show that we can do better than this. 3 Lower bound on message complexity In this section we prove a lower bound on the message complexity of the problem that applies to both synchronous and asynchronous rings. We prove the lower bound on a particular subset I of the instances of the problem. Let n be even and let m = (nt)/2, for some integer t. Since we are only interested in asymptotic bounds, for the sake of simplicity, we will also assume that m is a multiple of n, i.e. t/2 = m/n is an integer. 6 For any agent ai , let ai′ denote the agent at maximum distance from ai on the ring. In the following we say that a color is assigned to the pair (ai , ai′ ), for i = 0, . . . , n/2 − 1, to mean that it is assigned to both agents of the pair. We also say that a set C of colors is assigned to agent a iff all the colors in C are assigned to a. Let {C0 , . . . , Cn/2−1 } be a partition of the set of colors such that |Cj | = t for all j = 0, . . . , n/2−1. Set I consists of all instances of the Distributed Balanced Color Assignment Problem such that for any i = 0, . . . , n/2 − 1, the following two conditions hold: (a) for any color j ∈ Ci = {i1 , . . . , it } both agents of pair (ai , ai′ ) hold at least one item of color j, i.e. Qj,i > 0, Qj,i′ > 0; (b) neither ai nor ai′ hold colors not in Ci . Lemma 5. Given an instance in I, any optimal solution assigns to (ai , ai′ ) only colors from set Ci , for i = 0, . . . , n/2 − 1. Proof. Consider any solution to an instance from set I that assigns to the agent ai a color h0 initially held by some pair (ak , ak′ ), with k 6= i. Since any optimal solution is perfectly balanced on input instances of I, there must be at least one color h1 initially stored in (ai , ai′ ) that is assigned to some other agent, say ap . The same argument can in turn be applied to ap and so on until (since the number of colors/agents is finite) we fall back on ak . Formally, there exists 0 ≤ k ≤ n/2 − 1, k 6= i, such that h0 ∈ Ck 6= Ci , and a sequence of indices k0 , k1 , . . . , kl , with k0 = k, k1 = i and kl+1 = k, such that • color h0 ∈ Ck0 (= Ck ) is assigned to agent ak1 (= ai ); • color h1 ∈ Ck1 (= Ci ) is assigned to agent ak2 ; .. . • color hl ∈ Ckl is assigned to agent akl+1 (= ak ). Let Cost1 denote the cost of such a solution and let Γ be the contribution to the cost given by colors different from h0 , h1 , . . . , hl . Then, recalling condition (b) of the definition of I, we have Cost1 = Γ + n−1 X w=0, w6=k1 Qh0 ,w + n−1 X w=0, w6=k2 Qh1 ,w + · · · + n−1 X Qhl ,w w=0, w6=kl+1 = Γ + (Qh0 ,k0 + Qh0 ,k0′ ) + · · · + (Qhl ,kl + Qhl ,kl′ ). Consider now a solution that differs from the previous one only by the fact that every color in Cw is assigned to agent aw for w = k0 , k1 . . . , kl . Namely, • h0 ∈ Ck0 is assigned to ak0 ; • h1 ∈ Ck1 is assigned to ak1 ; .. . 7 • hl ∈ Ckl is assigned to akl . This is clearly a perfectly balanced solution, since each agent “loses” and “gains” exactly one color with respect to the previous case. Letting Cost2 be the cost of such a solution, we have Cost2 = Γ + n−1 X Qh0 ,w + · · · + w=0, w6=k0 n−1 X Qhl ,w w=0, w6=kl = Γ + Qh0 ,k0′ + · · · + Qhl ,kl′ . Hence, Cost1 − Cost2 = Qh0 ,k0 + · · · + Qhl ,kl > 0, where the inequality follows from condition (1) of the definition of I. We now consider two specific instances in I that will be used in the following proofs. For each pair (ai , ai′ ), for i = 0, . . . , n/2 − 1, and its initially allocated set of colors Ci = {i1 , . . . , it }, fix any u > 1 and partition set Ci into subsets C ′ and C ′′ , each of cardinality t/2. We define instance I1 ∈ I for the pair (ai , ai′ ) in the following way: I1 : Qj,i = u Qj,i′ = Qj,i = u Qj,i′ = Qj,i + 1 = u + 1 for each j ∈ Ci for each j ∈ C ′ for each j ∈ C ′′ Hence, by construction, instance I1 has the property that for any j ∈ C ′′ , Qj,i′ > Qj,i . Example 6. Consider a pair (ai , ai′ ) with a set of colors Ci = {1, 2, 3, 4, 5, 6, 7, 8}. Let u = 2. If C ′ = {2, 4, 5, 8} and C ′′ = {1, 3, 6, 7}, then instance I1 will be as follows: colors # items for ai # items for ai′ 1 2 2 2 3 2 3 2 3 4 5 2 2 2 2 6 2 3 7 8 2 2 3 2 In the following lemma we will show that the only optimal solution to I1 is the one that assigns C ′ to ai and C ′′ to ai′ . The above example gives an intuition of the formal proof. By Lemma 5, we know that only the items that need to be exchanged between ai and ai′ account for the cost of the optimal solution, and the latter is achieved by moving items with weight 2 (those highlighted in bold in the table), i.e., by assigning C ′ to ai and C ′′ to ai′ , for a total cost of 16. Lemma 7. The only optimal solution to instance I1 is the one that assigns C ′ to ai and C ′′ to ai′ . 8 Proof. We first compute the cost of this solution: X X X X X Qj,i = Qj,i . Qj,i + Qj,i = Qj,i′ + Cost = j∈C ′′ j∈C ′ j∈C ′′ j∈C ′ j∈Ci Consider any other partition of Ci into two sets C ′ and C ′′ . Consider another solution that assigns C ′ to ai and C ′′ to ai′ and let us compute the cost of this new solution: Cost = X Qj,i′ + j∈C ′ = X X X Qj,i′ + j∈C ′ ∩C ′ = X Qj,i j∈C ′′ Qj,i + X Qj,i Qj,i′ + X Qj,i j∈C ′′ j∈C ′ ∩C ′′ Qj,i + j∈Ci X Qj,i + j∈Ci X > X j∈C ′ ∩C ′′ j∈C ′ ∩C ′ = Qj,i′ + \(C ′ ∩C ′′ ) j∈C ′′ X Qj,i′ X Qj,i = Cost, j∈C ′ ∩C ′′ \(C ′ ∩C ′′ ) j∈C ′ ∩C ′′ where the inequality follows by observing that • there is at least one j ∈ C ′ ∩ C ′′ , otherwise the two partitions would coincide; • on instance I1 we have that for every j ∈ C ′′ , Qj,i′ > Qj,i . We now define the instance I2 ∈ I for the pair (ai , ai′ ) in the following way: I2 : Qj,i′ = u Qj,i = Qj,i′ = u Qj,i = Qj,i′ − 1 = u − 1 for each j ∈ Ci for each j ∈ C ′ for each j ∈ C ′′ where Ci , C ′ , C ′′ , and u are set as before. By construction, instance I2 has now the property that for any j ∈ C ′′ , Qj,i′ < Qj,i . Example 8. Consider again the pair (ai , ai′ ) on the same set of colors Ci and same partition C ′ = {2, 4, 5, 8}, C ′′ = {1, 3, 6, 7}, and same u = 2, exactly as in Example 6. Instance I2 will be as follows (the cost of the optimal solution is equal to 12 and highlighted in bold): colors # items for ai # items for ai′ 1 2 2 2 1 2 9 3 2 1 4 5 2 2 2 2 6 2 1 7 8 2 2 1 2 Observe that, from ai point of view, instances I1 and I2 are indistinguishable. Nevertheless, the optimal solution for instance I2 is to assign to ai the complement set of indices with respect to the optimal solution to instance I1 . Analogously as the previous lemma we can prove the following result. Lemma 9. There is only one optimal solution for instance I2 : assign colors in C ′ to ai′ and colors in C ′′ to ai . Proof. The proof is very similar to that of Lemma 7. The cost of the solution defined in the statement is now: X X X X X Cost = Qj,i + Qj,i′ = Qj,i′ + Qj,i′ . Qj,i′ = j∈C ′ j∈C ′′ j∈C ′ j∈C ′′ j∈Ci The cost of any other solution is calculated as in the proof of Lemma 7 with the exception that now instance I2 has the property that for any j ∈ C ′′ , Qj,i′ < Qj,i . The core of the lower bound’s proof lies in the simple observation that agent ai is not able to distinguish between instance I1 and instance I2 without knowing also the quantities Qj,i′ for colors j falling into partition C ′′ . Lemma 10. If agent ai knows at most t/2 colors held by ai′ , it cannot compute its optimal assignment of colors. Proof. Construct a partition of Ci in the following way: place index j in C ′ if ai has knowledge of Qj,i′ and in C ′′ in the other case. If the cardinality of C ′ is smaller than t/2, arbitrarily add indices to reach cardinality t/2. Agent ai cannot distinguish between instances I1 and I2 constructed according to this partition of Ci and, hence, by lemmas 7 and 9 cannot decide whether it is better to keep colors whose indices are in C ′ or in C ′′ . Finally, observe that in both instances indices in C ′ are exactly in the same position in the ordering of the colors held by ai′ , thus the knowledge of these positions does not help. Theorem 11. The message complexity of the distributed color assignment problem on ring is Ω(mn). Proof. Let A be any distributed algorithm for the problem running on instances in I. By the end of the execution of A, each agent has to determine its own assignment of colors. Fix any pair (ai , ai′ ) and consider the time at which agent ai decides its own final assignment of colors. Assume that at this time ai knows information about at most t/2 = m/n colors of agent ai′ . By Lemma 10, it cannot determine an assignment of colors for itself yielding the optimal solution. Therefore, for all n/2 pairs (ai , ai′ ), agent ai has to get information concerning at least m/n of the colors held by ai′ . We use Shannon’s Entropy to compute the minimum number of bits B to be exchanged between any pair (ai , ai′ ) so that this amount of information is known by ai . We have: 10   m B = log m . n Using Stirling’s approximation and the inequality m ≥ n, we get m m·n · log n m + n  n m m · log ∈ Ω log n . ≥ n 2 n B ≈ As a basic message contains log n bits, any pair (ai , ai′ ) needs to exchange at least Ω(m/n) basic messages. Each such message must traverse n/2 links of the ring to get to one agent of the pair to the other. As we have n/2 pairs of agents, the lower bound on message complexity is given by Ω(m/n) · 4 n n · ∈ Ω(m · n). 2 2 A distributed message-optimal algorithm In this section we first describe an algorithm that exhibits optimal message complexity on synchronous ring. We will then show how to adapt the algorithm to the case of an asynchronous ring. In the next section we will prove that the algorithm is guaranteed to compute an approximation of the color assignment that is within a factor three from the optimal solution (for both synchronous and asynchronous ring). 4.1 Synchronous ring At a high level, the algorithm consists of three phases: in the first phase, the algorithm elects a leader a0 among the set of agents. The second phase of the algorithm is devoted to estimate the parameter p = maxi maxj Qj,i , i.e. the maximum number of items of a given color held by agents. Finally, the last phase performs the assignment of colors to agents in such a way to be consistent with Definition 1. In the following we describe the three phases in detail. Algorithm Sync-Balance Phase 1. The first phase is dedicated to leader election that can be done in O(n) time with a message complexity of O(n log n) on a ring of n nodes, even when the nodes are not aware of the size n of the ring [11]. Leader election has also been studied in arbitrary wired networks [7]. An O(n polylog(n)) time deterministic algorithm is available even for ad hoc radio networks of unknown and arbitrary topology without a collision detection mechanism, even though 11 the size of the network must be known to the algorithm code (see [5] for the currently best result). Without loss of generality, in the following we will assume that agent a0 is the leader and that a1 , a2 , ..., an−1 are the other agents visiting the ring clockwise. In the rest of this paper, we will refer to agent ai−1 mod n (resp. ai+1 mod n ) as to the preceding (resp. following) neighbor of ai . Phase 2. In this phase agents agree on an upper bound p′ of p such that p′ ≤ 2p. Given any agent ai and an integer r ≥ 0, we define:   1 if maxj Qj,i = 0 and r = 0; 1 if 2r ≤ maxj Qj,i < 2r+1 and r > 0; Bi (r) =  0 otherwise. This phase is organized in consecutive stages labeled 0, 1, . . . At stage r = 0, the leader sets an integer variable A to zero, which will be updated at the end of each stage and used to determine when to end this phase. In stage r ≥ 0, agent ai , for i = 0, 1, . . . , n−1, waits for i time units from the beginning of the stage. At that time a message M might arrive from its preceding neighbor. If no message arrives, then it is assumed that M = 0. Agent ai computes M = M + Bi (r) and, at time unit i + 1, sends M to its following neighbor only if M > 0, otherwise it remains silent. After n time slots in stage r, if the leader receives a message M ≤ n from the preceding neighbor, then it updates variable A = A + M, and, if A < n, proceeds to stage r + 1 of Phase 2; otherwise it sends a message clockwise on the ring containing the index of the last stage ℓ performed in Phase 2. Each agent then computes p′ = 2ℓ+1 , forwards the message clockwise, waits for n − i + 1 time units and then proceeds to Phase 3. Lemma 12. Phase 2 of Algorithm Sync-Balance computes an upper bound p′ of p such that p′ ≤ 2p within O(n log p) time units and using O(n2 ) basic messages. Proof. We will say that agent ai speaks up in stage r when Bi (r) = 1. Throughout the execution of the algorithm, integer variable A records the number of agents that have spoken up so far. Any agent ai speaks up in one stage only. Indeed, given the color j ′ for which agent ai has the maximum number of items, then Bi (r) = 1 only at stage r such that Qj ′ ,i falls in the (unique) interval [2r , 2r+1 ). Let ai∗ be the agent having the largest amount of items of the same color among all agents, i.e., such that Qj ∗ ,i∗ = p, for some j ∗ ∈ [0, m − 1]. Then Bi∗ (r) = 1 for stage r such that 2r ≤ p < 2r+1, i.e., agent ai∗ speaks up when r = ℓ. Observe that at the end of stage ℓ the leader sets A = n, as all n agents must have spoken up by that time. Therefore, considering also the last extra stage in which the agents are informed of the value of ℓ, Phase 2 ends after ℓ + 2 stages, i.e. n(2 + log p) time units. For what concerns message complexity, in each stage, for r = 0, . . . , log p, either no messages are sent, or a message traverses a portion of the ring. Observe that, as each agent speaks up only once during this phase, messages circulating on the ring must always be 12 originated by different agents. Hence, the number of stages in which a message circulates on the ring is at most n and there must be at least max{0, log p − n} silent stages. In conclusion, Phase 2 message complexity is bounded by O(n2 ). As for the ratio between the actual value of p and its approximation p′ computed in Phase 2, by construction we have that 2ℓ ≤ p and p′ = 2ℓ+1 = 2 · 2ℓ ≤ 2p. Phase 3. As a preliminary step, each agent ai computes the number of colors it will assign to itself and stores  it in a variable Ki . Namely, each agent ai , for i = 0, 1, . . . , n − 1 m computes g = ⌊ n ⌋ + 1 n − m and then sets Ki as follows (recall Definition 1):  m if i < g; ⌊n⌋ (2) Ki = m ⌊ n ⌋ + 1 otherwise. In the rest of this phase, the agents agree on a color assignment such that each agent ai has exactly Ki colors. Algorithms 1 and 2 report the pseudo-code of the protocol performed by a general agent ai in this phase and that is here described. Let p′ be the upper bound on p computed in Phase 2. Phase 3 consists of log p′ + 1 stages. In each stage r, for r = 0, . . . , log p′ , the agents take into consideration only colors whose weights fall in interval Ir = [lr , ur ) defined as follows:   h ′ p  , +∞ , =   I0 h2 ′  p p′ (3) I = , for 0 < r < log p′ r r+1 r 2 2    Ilog p′ = [0, 1) Observe that in consecutive stages, agents consider weights in decreasing order, as ur+1 ≤ lr . At the beginning of each stage r, all agents have complete knowledge of the set of colors Cr−1 that have already been assigned to some agent in previous stages. At the beginning of this phase, C−1 is the empty set, and after the last stage is performed, Clog p′ must be the set of all colors. Stage r is, in general, composed of two steps; however, the second step might not be performed, depending on the outcome of the first one. In the first step, the agents determine if there is at least one agent with a weight falling in interval Ir , by forwarding a message around the ring only if one of the agents is in this situation. If a message circulates on the ring in step one, then all agents proceed to step two in order to assign colors whose weight fall in interval Ir and to update the set of assigned colors. Otherwise, step two is skipped. Now, if there are still colors to be assigned (i.e., if Cr 6= C), all agents proceed to stage (r + 1); otherwise, the algorithm ends. In more details: Step 1. Agent ai (leader included) waits i time units (zero for the leader) from the beginning of the stage, and then acts according to the following protocol: 13 Case 1: If ai receives a message from its preceding neighbor containing the label k of some agent ak , it simply forwards the same message to its following neighbor and waits for (n + k − i − 1) time units; otherwise Case 2: If ai has a weight falling into interval Ir , then it sends a message containing its label i to its following neighbor and waits for (n − 1) time units; otherwise Case 3: It does nothing and waits for n time units. If Case 1 or Case 2 occurred, then agent ai knows that step 2 is to be performed and that it is going to start after waiting the designed time units. Otherwise, if Case 3 occurred, after n units of time, agent ai might receive a message (containing label k) from its preceding neighbor, or not. If it does, then ai learns that Case 2 occurred at some agent ak having label k > i and that step 2 is to be performed. Hence, it forwards the message to its following neighbor in order to inform all agents having labels in the interval [i + 1, . . . , k − 1], unless this interval is empty (meaning that ai was the last agent to be informed). Then, after waiting for another (k − i − 1) time units, agent ai proceeds to step 2. On the contrary, if ai got no message, it learns that Case 2 did not occur at any agent and hence, step 2 needs not be performed. After waiting for (n − i) time units, ai can proceed to the next stage (r + 1). Observe that, when step 2 has to be performed, step 1 lasts exactly n + k − 1 < 2n time units for all agents, where k is the smallest agent’s label at which Case 2 occurs, while it lasts exactly 2n time units for all agents in the opposite case. Indeed, referring to the pseudo-code in Algorithm 1, completion time is given by the sum of the time units in the following code lines: in Case 1 of lines 7 and 10 (i 6= k); in Case 2 of lines 7 and 15 (i = k); in Case 3 of lines 7, 18 and 22 if agents proceed to Step 2 (i 6= k), and lines 7 and 26 otherwise. As the time needed by agents to agree on skipping step 2 is larger than the time needed to agree in performing it, it is not possible that some agent proceeds to step 2 and some other to stage (r + 1). On the contrary, agents are perfectly synchronized to proceed to step 2 or stage (r + 1). Step 2. When this step is performed, there exists a non empty subset of agents having at least one weight falling into interval Ir . Only these agents actively participate to the color assignment phase, while the others just forward messages and update their list of assigned colors. Color assignment is done using a greedy strategy: agent ai assigns itself the colors it holds which fall into interval Ir and that have not been already assigned to other agents. Once a color is assigned to an agent, it will never be re-assigned to another one. To agree on the assignment, the agents proceed in the following way: agent ai creates the list Li,r of colors it holds whose weights fall into interval Ir and that have not been 14 assigned in previous stages. Then, ai waits i time units (zero for the leader) from the beginning of the step. At that time, either ai receives a message M from its preceding neighbor or not. In the first case, the message contains the set of colors assigned in this stage to agents closer to the leader (obviously, this case can never happen to the leader). Agent ai then checks if there are some colors in its list Li,r that are not contained in M (empty message in the case of the leader), and then assigns itself as many such colors as possible, without violating the constraint Ki on the maximum number of colors a single agent might be assigned. Then, ai updates message M by adding the colors it assigned itself, and finally sends the message to its following neighbor. If Li,r is empty, or it contains only already assigned colors, ai just forwards message M as it was. In both cases, ai then waits for a new message M′ that will contain the complete list of colors assigned in this stage. M′ is used by all ai to update the list of already assigned colors and is forwarded on the ring. When the message is back to the leader, stage (r + 1) can start. Lemma 13. Let Kr be the number of colors assigned in stage  r of Phase  3, then stage r Kr log m can be completed in at most O(n) time units using at most O n · log n basic messages. Proof. The bound on the time complexity follows straightforwardly by observing that each of the two steps requires at most 2n time units. For what concerns message complexity, Step 1 requires no messages if Step 2 is skipped, and n − 1 otherwise. In fact, only one basic message goes clockwise on the ring from ak to ak−1 , where k is the smallest index at which Case 2 occurs. The worst case for Step 2 is the case in which the leader itself assigns some colors, as a possibly long message containing color ID’s must go twice around the ring. As there are m colors, one color can be codified using log m bits, then, sending Kr colors requires no more than Krloglognm basic  In conclusion, the total number of basic messages is upper bounded by  messages. Kr log m O n · log n . Corollary 14. Phase 3 of Algorithm Sync-Balance can be completed within O(n log p) m time units and using O(nm · log ) basic messages. log n Proof. It will suffice to sum up the worst cases for message and time complexity from Lemma 13 over all stages r = 0, . . . , log p′ , where p′ ≤ 2p (Lemma 12). The upper bound on the time complexity is straightforward. Let Kr be defined as in the statement of Lemma 13, i.e. as the number of colors assigned in a generic stage rPof Phase 3. The upper bound on the message complexity follows by observing that log p′ ′ r=0 Kr = m, as the total number of assigned colors during the log p + 1 stages is exactly the given number of colors. We are now ready to prove that our algorithm is correct. In Section 5 we will evaluate the ratio of the cost of the solution found by this algorithm and the one of the optimal solution. 15 Algorithm 1 Sync-Balance - Phase 3 (performed by agent ai ) Require: p′ computed in Phase 2 ⊲ upper bound to maximum number of items of the same color 1: Compute Ki ⊲ Number of colors ai has to be assigned, as defined in Equation (2) 2: C−1 ← ∅ ⊲ set of colors assigned up to the previous stage ′ 3: for r = 0 to log p do 4: Li,r = {cj | cj 6∈ Cr−1 and Qj,i ∈ Ir } ⊲ Colors assignable to ai in stage r. Intervals Ir are defined in (3) ⊲ Begin of Step 1 5: Wait i time units 6: if Got message M = {k} from its preceding neighbor then ⊲ Case 1 ⊲ k < i is an agent label 7: Forward message M to its following neighbor 8: Wait n − i + k − 1 time units 9: Step 2 ⊲ proceeds to Step 2 10: else 11: if Li,r 6= ∅ then ⊲ Case 2 12: Send message M = {i} to its following neighbor 13: Wait n − 1 time units 14: Step 2 ⊲ proceeds to Step 2 15: else ⊲ Case 3 16: Wait n time units 17: if Got message M = {k} from its preceding neighbor then 18: if k − i − 1 > 0 then ⊲ informs other agents that Step 2 is to be performed 19: Forward message M to its following neighbor 20: Wait for k − i − 1 21: Step 2 ⊲ procedure call to Step 2 22: end if 23: else 24: Wait n − i time units ⊲ proceeds to next stage skipping Step 2 25: end if 26: end if 27: end if 28: end for 16 Algorithm 2 Sync-Balance - Phase 3 Step 2 (performed by agent ai ) 1: procedure Step 2 2: Wait i time units 3: if Got message M from preceding neighbor with list of colors then 4: Li,r ← Li,r \ M ⊲ list of candidate colors to self assign 5: else 6: Create empty message M 7: end if 8: if |Li,r | = 6 ∅ then 9: Self assign maximum number of colors among those in Li,r 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: ⊲ the total number of colors ai can assign itself is given by Ki Add self assigned colors to M end if if M = 6 ∅ then Send message M to the following neighbor end if Wait for message M′ from preceding neighbor with list of colors Cr ← Cr−1 ∪ M′ ⊲ updates set of assigned colors Forward message M′ to the following neighbor if Cr = C then ⊲ all colors have been assigned stop else Wait for n − i time units end if end procedure 17 Theorem 15. Assuming m ∈ O(nc ), for some constant c, Algorithm Sync-Balance finds a feasible solution to the balanced color assignment problem in time O(n log p) using Θ(mn) messages. Proof. To prove correctness, we show that any assignment of colors to agents computed by algorithm Sync-Balance satisfies the two following conditions: (i) A color cj cannot be assigned to more than one agent. (ii) All colors are assigned. (i) The algorithm can assign a new color cj to agent ai only in line 9 of Algorithm 2. This can only happen if cj has not been already assigned in a previous stage, or in the current stage to an agent with smaller label. Since, in the stage, the color assignment is done sequentially (starting from the leader and following the ring clockwise), no color can be assigned to two different agents. Moreover, in lines 15-17 of Algorithm 2, all agents update the list of colors assigned in the current stage and, hence, in later stages, already assigned colors will not be assigned again. Therefore Sync-Balance prevents the assignment of the same color to two different agents. (ii) If an available color cj of weight Qj,i ∈ [lr , ur ) is not taken by ai during stage r, it is only because ai has enough colors already (line 9). However, this circumstance may not occur at all agents during the same stage (for this would imply that there were more than m colors). Thus, either the color is taken by a higher labeled agent in stage r, or is “left free” for agents for which the weight of cj is less than lr . By iterating the reasoning, we may conclude that, if not taken before, the color must be eventually assigned in stage ⌈log p⌉ + 1, where agents are allowed to pick colors for which their weight is zero. As for upper bounds on time and message complexities, by summing up upper bounds for the three phases, we have Time complexity: O(n) + O(n log p) + O(n log p) = O(n log p), | {z } | {z } | {z } Phase 1 Phase 2 Phase 3   log m = O(nm), Message complexity: O(n log n) + O(n ) + O nm · | {z } | {z } log n {z } | Phase 1 Phase 2 2 Phase 3 where we used Lemma 12, Corollary 14, and the facts that m ≥ n and that log m/ log n ∈ O(1), under the given hypothesis. 4.2 Asynchronous ring In an asynchronous ring such instructions as ”wait for i time units” (see Algorithm 1 and 2) cannot guarantee a correct completion of the global algorithm. Here we discuss 18 how to make simple modifications to Sync-Balance in order to get an algorithm (named Async-Balance) that correctly works in the asynchronous case as well. The leader election in Phase 1 can be done in O(n) time with a message complexity of O(n log n) even on an asynchronous ring of n nodes [11]. Therefore, the main differences are in Phase 2 and Phase 3. In Phase 2 we propose a slightly different strategy that works in only 2 stages, instead of log p. This better time complexity translates, in general, into an extra cost in terms of message complexity. Nevertheless, under reasonable hypothesis (namely when p ∈ O(mm )), the message complexity reduces to the same bound as for the synchronous setting. Finally, in Phase 3, the main ideas remain the same, but there are no “silent stages” and the leader acts differently from the other agents, as it is the one originating all messages circulating on the ring. In the following we highlight the main differences with the synchronous protocol: Algorithm Async-Balance Phase 1. Leader election can be accomplished with an O(n log n) message complexity [11]. Phase 2. This phase consists of only two stages. In the first stage the agents compute p = maxi maxj Qj,i . Let pi = maxj Qj,i , i.e. the maximum number of items of the same color agent ai posseses. The leader originates a message containing p0 . Upon reception of a message M from its preceding neighbor, agent ai computes M = max{M, pi } and forwards M to its following neighbor. The message that gets back to the leader contains p and it is forwarded once again on the ring to inform all agents.  log p Observe that Phase 2 requires no more than O n · log basic messages, as n O(log p/ log n) basic messages are needed to send the pi ’s and p. Phase 3. Changes in this phase concern both the execution of step 1 and step 2, that are to be modified in the following way: Step 1. Each agent ai computes its list of assignable colors Li,r and sets Yi (r) = 1 if |Li,r | > 0, and Yi (r) = 0 otherwise. The leader starts the step by sending, to its following neighbor, a basic boolean message containing Y0 (r). Upon reception of a message M from its preceding neighbor, agent ai computes M = M ∨ Yi (r) and forwards M to its following neighbor. When the leader gets the message back, it forwards the message again on the ring, and the same is done by all agents, until the message arrives to an−1 . The second time one agent (leader included) gets the message, it checks its content: if it is a one, then it knows that it has to proceed to Step 2; otherwise, if it contains a zero, it proceeds to the next stage. Step 2. The leader starts the step by sending, to its following neighbor, a (possibly empty) list of self assigned colors, obtained exactly as in the synchronous case. Then agents act as in the synchronous protocol, with the exception that they are activated by the arrival of a message from the preceding neighbor and not by a time stamp. Agents 19 proceed to the next stage after forwarding the complete list of colors assigned in the stage. Lemma 16. Let Kr be the number in stage r of Phase 3, then stage r  of colors assigned  Kr log m can be completed using at most O n · log n basic messages. Proof. step 1 is always performed and a basic message is forwarded (almost2 ) twice around the ring. Hence, O(n) basic messages are used. When step 2 is performed, a message containing color ID’s goes (almost) twice around the ring.  Analogously to the  synchronous case, we can prove that no more than O n · Krloglognm messages are needed. Analogously to the synchronous case, we can prove the following corollary. Corollary 17. Phase 3 of Algorithm Async-Balance can be completed using   log m O nm · log n basic messages. Theorem 18. Assuming m ∈ O(nc ), for some constant c, Algorithm Async-Balance finds a feasible solution to the balanced color assignment problem, on asynchronous rings,   log p within time O(n log p) using O n · log n + nm basic messages. Proof. The correctness proof is analogous to the synchronous case. The time complexity is asymptotically equivalent to the synchronous case. Indeed, as already mentioned, the leader election in Phase 1 can be completed in O(n) time, Phase 2 requires 2 circles around the ring and, finally, Phase 3 includes O(log p) stages, each of them requiring 2 circles around the ring. For what concerns message complexity, summing up upper bounds for single phases, we get       log m log p log p + O nm · =O n· O(n log n) + O n · + nm , log n log n log n as m ∈ O(nc ). When we also have that O(log p) = O(m log m), the algorithm exhibits the same optimal message complexity as in the synchronous setting. Namely, we can state the following result. Corollary 19. If m ∈ O(nc ), for some constant c, and p ∈ O(mm ), then Algorithm Async-Balance finds a feasible solution to the balanced color assignment problem, on asynchronous rings, using Θ(nm) messages. 2 On the second stage, agent an−1 stops the message. 20 5 Approximation Factor of Algorithm Balance The main result of this section is that the cost of the solution (as defined in Definition 2) computed by the algorithms presented in the previous sections is at most a small constant factor larger than the cost of the optimal solution. Namely, we will show that it is at most three times the optimal solution and that the analysis is tight. Moreover, we will show how to modify the algorithm to get a 2-approximation ratio at the expenses of a little increase of message complexity, and, for the synchronous case only, how to get a (2 + ǫ)-approximation ratio (for every 0 < ǫ < 1) at the expenses of an increase in time complexity. Since, under the same assumptions of Corollary 19, the cost of the solution is the same both in the synchronous and asynchronous versions (the assignment of colors is exactly the same in both cases), in this section we will address both Sync-Balance and Async-Balance with the generic name Balance. In the following some results are expressed in terms of the value p′ (respectively, p) computed by the agents in the synchronous (resp. asynchronous) case during Phase 2 of the algorithm. As these results hold for both p′ and p, to avoid repeating the distinction between p′ and p over and over again, we will indicate with p̂ both values p′ and p. We begin with the following lemma: Lemma 20. Let color cj be assigned to agent ai in stage r (of Phase 3) by algorithm Balance. Let ak be a different agent such that Qj,k ∈ [lr , ur ). Then Qj,i ≤ 2 · Qj,k . Proof. If r = ⌈log p̂⌉ + 1 (i.e., is the last stage), then it must be Qj,i = Qj,k = 0, and we are done. Otherwise, as cj is assigned to agent ai in stage r then it must be Qj,i ∈ [lr , ur ) and the thesis easily follows from p̂ 2r+1 ≤ Qj,i , Qj,k < p̂ . 2r Let B : {1, . . . , m} → {1, . . . , n} be the assignment of colors to agents determined by algorithm Balance, and let opt : {1, . . . , m} → {1, . . . , n} be an optimal assignment. Define a partition of the set of colors based on their indices, as follows: • C ′ = {j | B(j) = opt(j)}; i.e., color indices for which the assignment made by algorithm Balance coincides with (that of) the optimal solution. • C ′′ = {0, . . . , m − 1} \ C ′ ; i.e., colors indices for which the assignment made by algorithm Balance is different from the one of the optimal solution. Lemma 21. Assume C ′′ is not empty (for otherwise the assignment computed by Balance would be optimal) and let j ∈ C ′′ . Let k 6= j be any other color index in C ′′ such that B(k) = opt(j). Then Qj,opt(j) ≤ max{2 · Qj,B(j) , Qk,B(k) }. 21 Proof. First observe that, as j, k ∈ C ′′ and B(k) = opt(j) 6= B(j), we have that B(j) 6= B(k). If Qj,opt(j) ≤ Qk,B(k) we are clearly done. Suppose now that Qj,opt(j) > Qk,B(k) , then we can prove that Qj,opt(j) ≤ 2 · Qj,B(j) . The fact that j ∈ C ′′ means that Balance assigned color cj to a different agent compared to the assignment of the optimal solution. Let r be the stage of Balance execution in which agent opt(j) processed color cj (i.e., Qj,opt(j) ∈ Ir ) and could not self assign cj , then (in principle) one of the following conditions was true at stage r: 1. opt(j) already reached its maximum number of colors before stage r. However, this is impossible. It is in fact a contradiction that opt(j) gets color ck (recall that opt(j) = B(k)) but does not get color cj under Balance, since we are assuming Qj,opt(j) > Qk,opt(j) , which means that the assignment of ck cannot be done earlier than cj ’s assignment. 2. Color cj has already been assigned to B(j). This might happen because (a) cj has been assigned to B(j) in a previous stage. This implies that B(j) has a larger number of items of color cj with respect to opt(j), i.e., that Qj,opt(j) ≤ Qj,B(j) ≤ 2 · Qj,B(j) . (b) cj has been assigned to B(j) in the same stage, because it has a smaller label on the ring. By Lemma 20 we then have that Qj,opt(j) ≤ 2 · Qj,B(j) . Theorem 22. Balance is a 3-approximation algorithm for the Distributed Balanced Color Assignment Problem. Proof. Let CostB and Costopt be the cost of the solutions given by algorithm Balance and OP T , respectively. We can express these costs in the following way (where, for simplicity, we omit index i’s range, that is always [0, n − 1]): CostB = m−1 X X Qj,i j=0 i6=B(j) = X X Qj,i + j∈C ′ i6=B(j) = X X j∈C ′ i6=B(j) X X Qj,i j∈C ′′ i6=B(j) Qj,i +  X Qj,opt(j) + j∈C ′′ 22 i6= X opt(j), i6=B(j)   Qj,i  . Analogously, Costopt = X X Qj,i + j∈C ′ i6=opt(j)  X Qj,B(j) + j∈C ′′ By definition, B(j) = opt(j), for j ∈ C ′ , and thus P P i6= X opt(j), i6=B(j) Qj,i = j∈C ′ i6=B(j)   Qj,i  P P j∈C ′ i6=opt(j) Qj,i , i.e., ′ the cost associated with P color P cj ∈ C is exactly the same for Balance and OP T . Notice Qj,i appears in both cost expressions. Hence, to prove also that the term j∈C ′′ i6=opt(j) i6=B(j) that CostB ≤ 3 · Costopt , it is sufficient to show that X X Qj,opt(j) ≤ 3 Qj,B(j) . j∈C ′′ (4) j∈C ′′ We can assume without loss of generality that m is a multiple of n. Indeed, if otherwise n does not divide m, we can add r dummy colors (for r = m − ⌊m/n⌋), i.e. such that Qj,i = 0 for all agents i and dummy color j. Since in our algorithm the agents consider the weights in decreasing order, the dummy colors will be processed at the end and therefore they have no effect on the assignment of the other colors. Moreover, as their weights are zero, they do not cause any change in the cost of the solution. To prove (4), we build a partition of the set C ′′ according to the following procedure. We start from any j1 in C ′′ and find another index j2 such that B(j2 ) = opt(j ′ ) for some j ′ ∈ C ′′ \{j2 }. Note that, since m is a multiple of n, every agent must have m/n colors and therefore such an index j2 must exist. If j ′ = j1 the procedure ends, otherwise we have found another index j3 = j ′ such that B(j3 ) = opt(j ′′ ). Again, if j ′′ = j1 the procedure ends, otherwise we repeat until, for some t ≥ 2, we eventually get B(jt ) = opt(j1 ) . We then set C1 = {(j1 , j2 ), (j2 , j3 ), . . . , (jt−1 , jt )} . If during this procedure we considered all indices in C ′′ we stop, otherwise, we pick another index not appearing in C1 and repeat the same procedure to define a second set C2 , and so on until each index of C ′′ appears in one Ci . Observe that each Ci contains at least two pairs of indices and that each index j ∈ C ′′ appears in exactly two pairs of exactly one Ci . Then, using Lemma 21, we get 23 X Qj,opt(j) = j∈C ′′ X X Qj,opt(j) X X max{2 · Qj,B(j) , Qj ′,B(j ′ ) } Ci ≤ (j,j ′ )∈Ci Ci (j,j ′ )∈Ci ≤ X X = X 2 · Qj,B(j) + Qj ′ ,B(j ′ ) Ci (j,j ′ )∈Ci  3Qj,B(j) j∈C ′′ The following theorem shows that the approximation factor given in Theorem 5 is tight. Theorem 23. For any 0 < ǫ < 1, there exist instances of the Balanced Color Assignment Problem such that COSTB is a factor 3 − 4ǫ/(4δ + ǫ) larger than the optimal cost, for some 0 < δ < 1. Proof. Consider the following instance of the balanced color assignment problem. For the sake of presentation, we assume that m = n and that n is even, but it is straightforward to extend the proof to the general case. Fix any rational ǫ > 0, and let q, δ > 0 be such that qǫ/4 is an integer and qδ = ⌊q⌋. Consider an instance of the problem such that colors are distributed as follows:  Q2i,2i = q(δ + ǫ/4)    n Q2i+1,2i = q i = 0, 1, . . . , − 1 Q = q(2δ − ǫ/4)  2 2i,2i+1   Q2i+1,2i+1 = 0, and that a0 is the leader elected in the first stage of algorithm Balance, and that the labels assigned to agents a1 , . . . , an−1 are 1, . . . , n − 1, respectively. Consider agents a2i and a2i+1 , for any 0 ≤ i ≤ n2 − 1. We can always assume that q is such that p̂ , 2r for some r. That is, the weights of color c2i for agents a2i and a2i+1 belong to the same interval [p̂/2r+1, p̂/2r ). It is easy to see that the optimal assignment gives c2i+1 to a2i and c2i to a2i+1 . The corresponding cost is Costopt = n2 q(δ + ǫ/4). On the other hand, algorithm Balance assigns c2i to a2i and c2i+1 to a2i+1 , with a corresponding cost CostB = n2 q(3δ − ǫ/4). Hence, for the approximation factor, we get p̂ 2r+1 ≤ qδ < q(δ + ǫ/4) < q(2δ − ǫ/4) < 24  3ǫ 3 δ + 4ǫ 3δ − 4ǫ + 4ǫ 4ǫ CostB 4 − . = ǫ = ǫ ǫ = 3− Costopt δ+4 δ+4 δ+4 4δ + ǫ Even if the approximability result is tight, if we are willing to pay something in message complexity, we can get a 2-approximation algorithm. Corollary 24. Algorithm Balance can be transformed into a 2-approximation algorithm, by paying an additional multiplicative O(log p) factor in message complexity. Proof. Algorithm Balance is modified in the following way: colors in stage r of Step 2 in Phase 3 are assigned to the agent having the largest number of items (falling in the interval Ir ) and not to the one close to the leader. This can be achieved by making the agent forward on the ring, not only their choice of colors, but also their Qi,j s for those colors. This requires extra O(log p) bits per color, increasing total message complexity of such a multiplicative factor. For what concerns the approximation factor, this modification to the algorithm allows to restate the thesis of Lemma 20 without the 2 multiplicative factor and, following the same reasoning of Theorem 5, conclude the proof. Finally, if we are not willing to pay extra message complexity, but we are allowed to wait for a longer time, we get a (2 + ǫ)-approximation algorithm. Theorem 25. Assuming m ∈ O(nc ), for some constant c, for any 0 < ǫ < 1, there is a (2 + ǫ)-approximation algorithm for the Distributed Balanced Color Assignment Problem with running time O(n log1+ǫ p) and message complexity Ω(nm). Proof. Modify the two interval threshold values of algorithm Sync-Balance in the following way:     p̂ p̂ lr = and ur = , (1 + ǫ)r+1 (1 + ǫ)r and redefine nao b =  ⌈ ab ⌉ 0 1 if ab > 1+ǫ ; otherwise. (5) Accordingly, the statement of Lemma 20 becomes Qj,i ≤ (1+ǫ)Qj,k , and the statement of Lemma 21 can be rewritten as Qj,opt(j) ≤ max{(1 + ǫ) · Qj,B(j) , Qk,B(k) }. The result on the approximation factor then follows by the same arguments of the proof of Theorem 5. The message complexity is not affected by these changes, while the running time now depends on the number of stages in Phase 3, that is O(log1+ǫ p). 25 6 Conclusion In this paper we have considered the Distributed Balanced Color Assignment problem, which we showed to be the distributed version of different matching problems. In the distributed setting, the problem models situations where agents search a common space and need to rearrange or organize the retrieved data. Our results indicate that these kinds of problems can be solved quite efficiently on a ring, and that the loss incurred by the lack of centralized control is not significant. We have focused our attention to distributed solutions tailored for a ring of agents. A natural extension would be to consider different topologies and analyze how our techniques and ideas have to be modified in order to give efficient algorithms in more general settings. We believe that the main ideas contained in this work could be useful to extend the results even to arbitrary topologies. Indeed, an O(n polylog(n)) distributed leader election protocol (that is needed in our algorithm) is also available for arbitrary ad hoc radio networks [5]. For what concerns the ring topology, it is very interesting to note that the value p never appears in the message complexity for the synchronous case (not even if the polynomial relation between m and n does not hold), while a factor log p appears in the asynchronous case. It is still an open question if it is possible to devise an asynchronous algorithm that shows optimal message complexity, under the same hypothesis of the synchronous one; i.e., if it is possible to eliminate the extra log p/ log n factor. Acknowledgments. The authors wish to thank Bruno Codenotti for many helpful comments and discussions. References [1] Y. Amir, B. Awerbuch, A. Barak, R.S. Borgstrom, A. Keren, An Opportunity Cost Approach for Job Assignment and Reassignment in a Scalable Computing Cluster, IEEE Trans. on Parallel and Distributed Systems, 11 (2000) 760-768 . [2] Handbook of Computational Economics, edited by K. Schmedders, K. Judd, NORTHHOLLAND (2013). [3] G. J. Chang, P. H. Ho, The β-assignment Problems, European J. Oper. Research 104 (1998) 593-600. [4] R. S. Chang, R. C. T. Lee, On a scheduling problem where a job can be executed only by a limited number of processors, Computers and Operation Research, 15 (1988) 471-478. [5] B. S. Chlebus, D. R. Kowalski, A. Pelc, Electing a Leader in Multi-hop Radio Networks, Proceedings of Principles of Distributed Systems (7702) LNCS, pp 106-120, OPODIS 2012, Rome, Italy. [6] G. De Marco, M. Leoncini, M. Montangero, Distributed algorithm for a color assignment on asynchronous rings, Proceedings of the 20th IEEE International Parallel and Distributed Processing Symposium (IPDPS 2006), Rhodes Island, Greece. 26 [7] R. G. Gallager, P. A. Humblet, P. M. Spira, A distributed algorithm for minimum-weight spanning trees. ACM Transactions on Programming Languages and Systems 5(1), 6677 (1983). [8] M. Hanckoviak, M. Karonski, A. Panconesi, On the distributed complexity of computing maximal matchings, Proc. of SODA 98, the Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, (1998) 219-225. [9] M. Hanckoviak, M. Karonski, A. Panconesi, A faster distributed algorithm for computing maximal matchings deterministically, Proc. of PODC 99, the Eighteenth Annual ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, (1999) 219-228. 5 [10] J. E. Hopcroft, R. M. Karp, An n 2 Algorithm for Maximum Matchings in Bipartite Graphs, SIAM J. Comput., 2 (1973) 225-231. [11] D. S. Hirschberg, J. B. Sinclair, Decentralized extrema-finding in circular configurations of processes, Communication of the ACM, 23 (11) (1980) 627-628. [12] D. R. Kowalski, A. Pelc, Leader election in ad hoc radio networks: A keen ear helps, In Proceedings of the 36th International Colloquium on Automata, Languages and Programming (ICALP), Part II. pp. 521533. LNCS 5556 (2009). [13] H. W. Kuhn, The Hungarian Method for the Assignment Problem, Naval Research Logistics Quarterly, 2 (1955), 83-97. [14] H. Kavalionak, E. Carlini, L. Ricci, A. Montresor, M. Coppola, Integrating peer-to-peer and cloud computing for massively multiuser online games, Peer-to-Peer Networking and Applications, (2013) 1-19. [15] J. Könemann, R. Ravi, A Matter of Degree: Improved Approximation Algorithms for Degree-Bounded Minimum Spanning Trees, SIAM J. on Computing, 31 (6) (2002) 16451958. [16] N. Lynch, Distributed Algorithms, Morgan Kaufmann Publishers, San Mateo, CA, 1996. [17] L. Lovasz, M. D.Plummer, Matching Theory, Annals of Discrete Mathematics 29; NorthHolland Mathematics Studies 121, (1986). [18] D. Peleg, Distributed Computing: A Locality-Sensitive Approach, SIAM, Philadelphia, PA, 2000. [19] A. H. Payberah, H. Kavalionak, V. Kumaresan, A. Montresor, S. Haridi, CLive: Cloudassisted P2P live streaming, Proc. of IEEE 12th International Conference on Peer-to-Peer Computing, P2P’12, (2012) 79-90. [20] B. Schieber and S. Moran, Parallel Algorithms for Maximum Bipartite Matching and Maximum 0-1 Flows, J. of Parallel and Distributed Computing, 6 (1989), 20-38. 27 [21] I. Stoica, R. Morris, D. Karger, M.F. Kaashoek, H. Balakrishnan, Chord: A Scalable Peerto-peer Lookup Service for Internet Applications, SIGCOMM Comput. Commun. Rev., Proceedings of the 2001 conference on Applications, technologies, architectures, and protocols for computer communications, 31 (4) (2001) 149-160. [22] J. S̆ilk, B. Robic̆, Processor Allocation Based on Weighted Bipartite Matching Scheduling, Technical Report CSD-97-1, Computer System Department, Joz̆ef Stefan Institut, Ljubljana, Slovenia. 28
8cs.DS
THE s-MULTIPLICITY FUNCTION OF 2 × 2-DETERMINANTAL RINGS arXiv:1708.06287v2 [math.AC] 13 Oct 2017 LANCE EDWARD MILLER AND WILLIAM D. TAYLOR Abstract. This article generalizes joint work of the first author and I. Swanson to the s-multiplicity recently introduced by the second author. For k a field and X = [xi,j ] a m × n-matrix of variables, we utilize Gröbner bases to give a closed form the length λ(k[X]/(I2 (X) + m⌈sq⌉ + m[q] )) where s ∈ Z[p−1 ], q is a sufficiently large power of p, and m is the homogeneous maximal ideal of k[X]. This shows this length is always eventually a polynomial function of q for all s. 1. Introduction One of the most well studied and intriguing invariants for positive characteristic commutative algebra is the Hilbert-Kunz multiplicity. Specifically in a local ring (R, m, k), where k has positive characteristic, the length λ(R/m[q] ) = eHK (R)q d + O(q d−1 ) as was first shown by P. Monsky [Mon83] building on work of E. Kunz. Much subtly lies in the lower order terms. When R is excellent, normal, and with perfect residue field, there is a sharper form λ(R/m[q] ) = eHK (R)q d + βq d−1 + O(q d−2 ) [HMM04]. However, in contrast to the Hilbert-Samuel function, one cannot expect this length to be polynomial in q, even for nice rings in small dimensions. Despite its complication, the first author and I. Swanson showed that this length function is a polynomial in q for R the determinantal ring defined by 2-minors [MS13]. The techniques there in are combinatorial in nature, building on work of K. Eto and K.-i. Yoshida [EY03], and were pushed later on by I. Swanson and M. Robinson to give a closed form as a sum of products of binomial coefficients, yielding a complete understanding of the Hilbert-Kunz function of such rings. Recently, the second author introduced a type of interpolation between Hilbert-Samuel and Hilbert-Kunz multiplicities. Specifically for s a positive real number, the s-multiplicities es (R) form a continuous family of real numbers agreeing with the Hilbert-Samuel multiplicity e(R) for small values of s and agreeing with the Hilbert-Kunz multiplicity eHK (R) for large values of s. These arise as suitable normalizations of the limit limq→∞ q −d λ(R/(m⌈sq⌉ +m[q] )). which is known to exist [Tay]. This family offers an important hope to deform results from one multiplicity to another. Standing in the way are the multiplicities es (R) which agree with neither the Hilbert-Samuel nor Hilbert-Kunz multiplicities, and so far these intermediate values are not well understood. Fixing s ∈ Z[p−1 ], for small values of s, the length λ(R/(m⌈sq⌉ + m[q] )) is eventually a polynomial in q and for large values of s the length can be significantly more complicated. However, when R is the determinantal ring defined by 2-minors, this length function is eventually a polynomial in q for large values of s too. The purpose of this short article is show in such case, this length function is eventually a polynomial in q for all such s and to give a closed form for it similar to [RS15]. The final form of this is our main theorem, which is a sum of products of binomials and involves the monus operator, denoted q and defined by a q b = max{a − b, 0}. In this theorem and throught the paper, unrestriced sums are interpreted as being over all integers. Theorem (Theorem 3.9). Fix k a field, p an integer and q a p-power. Let X be an m × n-matrix of variables, m the homogeneous maximal ideal of k[X] and I2 (X) the ideal of 2 × 2-minors. Let s ∈ R>0 such that sq ∈ Z, and set R(m, n, s, q) ∶= ∑ ∑ ∑ ( a b ℓ m−1 n−1 sq + ℓ a b )( )( )( )( ) a b a+b+1 ℓ ℓ m n (j q i)q + m − 1 (i q j)q + n − 1 (s − max{i, j})q + ℓ a b )( )( )( )( ). S(m, n, s, q) ∶= ∑ ∑ ∑ ∑ ∑(−1)i+j ( )( )( m−1−a n−1−b a+b+1 ℓ ℓ i j i>0 j>0 a b ℓ k[X] The length λ ( m⌈sq⌉ +m [q] +I (X) ) = R(m, n, s, q) − S(m, n, s, q). Notably, this is a polynomial in q. 2 Acknowledgments: We thank P. Mantero and M. Johnson for helpful discussions and D. Juda for suggesting the technique used in one of the proofs of Lemma 3.3. We deeply thank the referee for the careful and detailed review of the manuscript, which allowed us to improve it significantly. 1 2 LANCE EDWARD MILLER AND WILLIAM D. TAYLOR 2. Preliminaries Unless otherwise stated, p always denotes a positive prime integer, q a power of p, and k a field of characteristic p. Throughout s is a positive real number and λ denotes length of a module. The s-multiplicity, introduced in [Tay], is defined as follows. Fix a local ring (R, m) of characteristic p and two m-primary ideals I and J, the following limit [Tay, Thm. 2.1] exists, e e hs (I, J) ∶= lim λ(R/I ⌈sp ⌉ + J [p ] )/ped . For small values of s, hs (I, J) = e→∞ sd e(I) whereas for d! ⌊s⌋ (−1)i d ∑i=0 d! ( i )(s − i)d large values of s, hs (I, J) = eHK (J). When R is regular of offers a normalizing factor and one defines the s-multiplicity dimension d, Hs (d) ∶= hs (m, m) = by es (I, J) ∶= hs (I, J)/Hs (d). We follow the usual conventions denoting es (R) ∶= es (m, m) and similarly for hs . This article concerns the s-length functions hs (R) where R is the quotient of a polynomial ring with defining ideal the 2 × 2-minors of a matrix of variables. The techniques follow similarly to [MS13, RS15]. We first recall notation. Definition 2.1. We call a monomial ∏i,j xi,ji,j a staircase monomial if whenever i < i′ and j < j ′ , then pi,j pi′ ,j ′ = 0. A staircase monomial is called a stair monomial if there exist c ∈ {1, . . . , m} and d ∈ {1, . . . , n} such that pl,k = 0 whenever (l − c)(k − d) =/ 0. Thus the indices (i, j) for which pi,j =/ 0 all lie in the union of part of row c with part of column d, either in a ⌜ or a ⌟ configuration. A stair monomial is called a q-stair monomial if for such c, d, ∑k pc,k = q = ∑k pk,d . p Remark 2.2. Notice that monomials p in k[X] may be identified with integer valued m × n-matrices by writing p p p = ∏ xi,ji,j and associating p to (pi,j ). We call this its exponent matrix. Staircase monomials ∏i,j xi,ji,j are so called as the indices (i, j) for which pi,j =/ 0 lie on a southwest-northeast staircase type pattern, i.e., their exponent matrices have support in a pattern like the following ⎡ ● ● ●⎤ ⎢ ⎥ ⎢ ⎥ ● ⎢ ⎥ ⎢ ⎥ ● ● ● ⎢ ⎥. ⎢ ⎥ ⎢ ⎥ ● ⎢ ⎥ ⎢● ● ● ● ⎥ ⎣ ⎦ Under this identification, the multiplicative semigroup of monomials is identified with the additive semigroup of non-negative integer valued matrices. We tacitly use this identification to keep the notation in the proofs to a minimum. We start with an elementary lemma about staircase monomials implicit in the work [MS13, RS15]. Lemma 2.3. Let X be a generic m × n-matrix. (1) Any monomial in k[X] is equivalent to a staircase monomial modulo I2 (X). (2) If p is a monomial and q is a staircase monomial with p ≡ q mod I2 (X), then p has the same degree, row, and column sums as q. Proof. Let p be a monomial in k[X], identified with its exponent matrix (pi,j ). The key mechanic at work here is that when a < b and c < d, modulo the minor xa,c xb,d − xa,d xb,c , the monomial p is equivalent to the monomial p′ with exponent matrix (p′i,j ) where ⎧ ⎪ pi,j (i, j) ≠ (a, c), (b, d), (b, c), (a, d) ⎪ ⎪ ⎪ ⎪ ⎪ p + 1 (i, j) = (a, c) ⎪ a,c ⎪ ⎪ ⎪ ′ pi,j = ⎨pb,d + 1 (i, j) = (b, d) ⎪ ⎪ ⎪ ⎪ pa,d − 1 (i, j) = (a, d) ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩pb,c − 1 (i, j) = (b, c) From this the second claim is immediate as modifying monomials using these determinants clearly preserves all listed characteristics. To prove the first claim, a simple induction on the number of columns allows us to assume that any monomial in correspondence to the augmented m×n-matrix [(pi,j )1≤j≤n−1 ∣0] is equivalent modulo I2 (X) to a staircase monomial, that is modulo I2 (X) we may assume p has the staircase shape for the first n − 1 columns. Set i to be the smallest row index so that pi,n−1 ≠ 0. We now induce on the row indicies i′ such that i ≤ i′ and pi′ ,n ≠ 0. If there are none or if the only one is i′ = i, then p is a already staircase monomial. Otherwise, assume by induction that p is equivalent THE s-MULTIPLICITY FUNCTION OF 2 × 2-DETERMINANTAL RINGS 3 modulo minors to a staircase monomial in the support of the last column of exponent matrix is in rows 1 through i′ − 1 and that pi′ ,n ≠ 0 If pi′ ,j = 0 for all j, then up to a multiple of the minor xi,n−1 xi′ ,n − xi′ ,n−1 xi,n , p is equivalent to a monomial with pi,n−1 pi′ ,n = 0 and the rest follows by induction. Otherwise, we may set j to be the largest column index for which pi′ ,j ≠ 0. If the value pi′ ,n is larger than ∑ pk,ℓ where i ≤ k ≤ i′ , j ≤ ℓ ≤ n but (k, ℓ) ≠ (i′ , n), then using appropriate minors, one may assume that p is equivalent to a monomial with the same support as p outside of the ranges i ≤ k ≤ i′ and j ≤ ℓ ≤ n but where pk,ℓ = 0 for i ≤ k ≤ i′ and j ≤ ℓ ≤ n unless either k = i′ or j = n, i.e., is a staircase monomial. If ∑ pk,ℓ is smaller than pi′ ,n , then again we may use minors to reduce p modulo I2 (X) to a monomial which is staircase up to the last column but for which pi′ ,n = 0 and the rest follows by induction.  Theorem 2.4. Fix X a generic m × n-matrix and m the homogeneous maximal ideal in k[X]. For I an m-primary monomial ideal in k[X], the set of staircase monomials not in I forms a k-basis for k[X]/(I2 (X) + I). Proof. It suffices to show the claim for I = mt for fixed t as the theorem follows by noting that when I is mprimary, mt ⊂ I for some power t and a k-basis for k[X]/(I2 (X) + I) is obtained by eliminating from a k-basis of k[X]/(I2 (X) + mt ) the elements which lie in I. Set T ⊂ k[X] the ideal generated by all staircase monomials of degree t. Following the proof of [MS13, Thm. 2.4], the theorem follows immediately once we’ve show that G = I2 (X) + T ⊂ I2 (X) + mt is a Gröbner basis. The equality I2 (X) + T = I2 (X) + mt follows by the first claim of Lemma 2.3. To finish the proof, one needs only check, via the Buchberger algorithm, that S-polynomials S(f, g) for any generators f and g of I2 (X) + T . This is immediately trivial unless f is a determinant, g is a staircase monomial, and their leading terms share a variable in common. The rest of the check is straightforward and follows by repeating the same case by case analysis as in the proof of  [MS13, Thm. 2.2]. Remark 2.5. In the special case that I = m[q] one notes that the basis guaranteed by Theorem 2.4 agrees with base guaranteed by [MS13, Thm. 2.2] as the set of staircase monomials which are not in I are precisely those not divisible by any q-stair monomials. Corollary 2.6. Fix X a generic m × n-matrix and m the homogeneous maximal ideal in k[X]. For any positive integer s, a k-basis for m⌈sq⌉ + m[q] + I2 (X) consists of staircase monomials of degree at most ⌈sq⌉ and having either all row sums smaller than q or all column sums column sums smaller than q. It now suffices for us to turn our attention at carefully counting the k-basis of m⌈sq⌉ +m[q] +I2 (X). The computation k[X] of λ ( m⌈sq⌉ +m [q] +I (X) ) follows an expected combinatorial argument. Following the techniques in [RS15], we explain 2 how to give a precise enough monomial count. In the rest of the paper we will be operating under the assumptions that s ∈ Z[p−1 ] and q is large enough that sq ∈ Z. We do this because we are primarily interested in establishing that the length function is polynomial in q. It is unreasonable to expect such behavior for s ∉ Z[p−1 ]. As a simple example, consider the ring R = F2 [x, y] and let m = (x, y) and s = 43 . For any e ∈ N, we have that e+2 ⎧ ⎪ 2 +1 if e is odd 2e+2 ⎪ ⌈sp ⌉ = ⌈ ⌉ = ⎨ 2e+23 +2 ⎪ 3 if e is even. ⎪ ⎩ 3 From this we can easily compute the length function in question: ⎧ ⎪ e e ⎪ 7 p2e + 5 pe − 2 if e > 0 is odd λ(R/m⌈sp ⌉ + m[p ] ) = ⎨ 97 2e 79 e 95 ⎪ ⎪ ⎩ 9 p + 9 p − 9 if e > 0 is even. This example shows that even in the simplest cases, we cannot expect the length function to be equal to a single polynomial when s ∉ Z[p−1 ]. e 3. Combinatorics ) = 0 if n < 0, m < n, or m < 0. Unspecified summations are over all integers. We utilize the convention that (m n We are interested in counting staircase monomials with restricted row and column sums. Using [RS15, Lem. 2.4], it suffices to count (m + n)-tuples (x1 , . . . , xm , y1 , . . . , yn ) ∈ Zm+n ≥0 , where we interpret the xi ’s as row sums and yj ’s as column sums of the associated exponent matrix to the staircase monomial. This forces the condition ∑i xi = ∑j yj and the lemma, loc. cit., gives a bijection between such tuples and staircase monomials. Thus by Corollary 2.6, to calculate the length of k[X]/(I2 (X) + m⌈sq⌉ + m[q] ), it suffices to count all (m + n)-tuples (x1 , . . . , xm , y1 , . . . , yn ) ∈ Zm+n such that ∑i xi = ∑j yj < ⌈sq⌉ and either all xi < q for all 1 ≤ i ≤ m or all yj < q for ≥0 4 LANCE EDWARD MILLER AND WILLIAM D. TAYLOR all 1 ≤ j ≤ q. There is a natural symmetry to this requirement which we exploit via an inclusion-exclusion type argument. To this end, we introduce two symbols T and U which count monomials meeting relevant conditions. Definition 3.1. Fix m, n, r and q in N. Let T (m, n, r, q) be the number of m + n-tuples, (x1 , . . . , xm , y1 , . . . , yn ) ∈ Zm+n such that ≥0 ∑ xi = ∑ yj < r and xi < q for all 1 ≤ i ≤ m. i j Also let U (m, n, r, q) of all m + n-tuples (x1 , . . . , xm , y1 , . . . , yn ) ∈ Zm+n such that ≥0 ∑ xi = ∑ yj < r, for all i, xi < q, and for all j, yj < q. i j Remark 3.2. The functions T (m, n, r, q) and U (m, n, r, q) were utilized in Eto and Yoshida’s calculation of the Hilbert-Kunz multiplicity of the determinantal ring defined by 2-minors, viewed as the Segre product of two polynomial rings [Eto02, EY03]. Specifically, for X an m × n-matrix of variables, the ring k[X]/I2 (X) is isomorphic to k[z1 , . . . , zm ]#k[y1 , . . . , yn ]. From [MS13, Rmk. 2.5], one expresses the length using the following monomial counts. Set αm,d the number of monomials in k[z1 , . . . , zm ] of total degree d and αm,d,q the number of monomials in k[z1 , . . . , zm ] of total degree d and zi -degree at most q for all i, and similarly for k[y1 , . . . , ym ]. From [MS13, Rmk. 2.5] one expresses the length via inclusion-exclusion (q−1)n (q−1)m (q−1)m d=0 d=0 d=0 λ(k[X]/(I2 (X) + m[q] ) = ∑ αm,d αn,d,q + ∑ αn,d αm,d,q − ∑ αn,q,d αm,d,q . Immediately one has ⌈sq⌉ ⌈sq⌉ ⌈sq⌉ d=0 d=0 d=0 λ(k[X]/(I2 (X) + m⌈sq⌉ + m[q] )) = ∑ αm,d αn,d,q + ∑ αn,d αm,d,q − ∑ αn,q,d αm,d,q . The functions T (n, m, r, q) and U (n, m, r, q) arise from exploiting the correspondence in [RS15, Lem. 2.4] between monomials and tuples. Our goal is to give a closed form for T (m, n, r, q) and U (m, n, r, q). We start with a helpful auxiliary combinatorial identity. Lemma 3.3. For a, b, c ∈ N, ∑ ( ∞ w=0 c+w a b c c )( )( ) = ( )( ). a+b w w a b We offer two proofs of this statement. The first is based on the Zeilberger-Wilf algorithm. The second is a more elaborate combinatorial proof which realizes a bijection between two sets each of which obviously having cardinalities both sides of this identity. )( a )( b ) and Proof. (of Lemma 3.3) Set F (w, a) = (c+w a+b w w G(w, a) = One may immediately verify the identity (1) w2 (−a − b + c + w) F (w, a). (1 + a + b)(−1 − a + w) G(w + 1, a) − G(w, a) = (a − c)F (w, a) + (1 + a)F (w, a + 1). Setting H(a) ∶= ∑w F (w, a) and summing (1) over w we have 0 = (a − c)H(a) + (1 + a)H(a + 1), and thus H(a) = (c − a + 1)⋯(c) c 0 c+w b c c H(0) = ( ) ∑ ( )( ) = ( )( ). a! b a w w a b  Next, we give a stronger combinatorial proof of Lemma 3.3. We introduce some notation only used for this proof. For n ∈ N, let [n] denote the set {1, 2, . . . , n}. By a colored integer we mean an element of [c] × {red, blue}. We call the first component of a colored integer its value and we call the second component its color. We impose an order on the set of colored integers by declaring that red < blue and using the lexicographic order. In particular, x < x′ if either the value of x is less than the value of x′ , or their values are equal, x is red, and x′ is blue. For example, 2 × blue < 3 × red and 5 × red < 5 × blue. By a chain of type (a, b) we mean a chain of colored integers x1 < ⋯ < xa+b containing a red integers and b blue integers. Such a chain is determined completely by the values of the red integers and the values of the blue integers, and so the number of chains of type (a, b) is (ac )(cb). THE s-MULTIPLICITY FUNCTION OF 2 × 2-DETERMINANTAL RINGS 5 Proof. (of Lemma 3.3) We show that the number of chains of type (a, b) is equal to the number of 4-tuples (w, A, B, C), where w is an integer, A ⊆ [a] has size w, B ⊆ [b] has size w, and C ⊆ [c + w] has size a + b. The latter c+w a b set clearly has size ∑∞ w=0 ( a+b )(w)(w ) and so finding such a bijection immediately establishes the desired equality. All sets involved are totally ordered, so we utilize the notation {i1 < . . . < in } for a set of natural numbers i1 , . . . , in ordered as indicated. We first define a function ϕ from the set of all chains of type (a, b) to the set of 4-tuples. To do so, we need one more piece of terminology. We call a consecutive pair of colored integers (xi , xi+1 ) with xi < xi+1 an rb-pair if xi is red and xi+1 is blue. Note by the ordering there are two types of rb-pairs, those with equal value and those with differing values. We call an rb-pair stable provided the values in the pair agree. Let X be a chain of type (a, b) consisting of colored integers x1 < ⋯ < xa+b . Let {i1 < ⋯ < ia } be the set of indices of red integers in X and let {j1 < ⋯ < jb } be the set of indices of blue integers in X. We first encode the rb-pairs. Set A = {ℓ ∶ (xiℓ , xiℓ +1 ) is an rb-pair} and similarly B = {ℓ ∶ (xjℓ −1 , xjℓ )is an rb-pair}. Clearly A ⊆ [a] and B ⊆ [b], and #A = #B. We now produce the tuple (w, A, B, C). The sets A and B have already been defined and both have cardinality w. It suffices now to construct C. This will encode both the values of the chain and the locations of the stable rb-pairs. Set C ′ ⊆ [c] be the set of values of the elements of X. To capture the location of the stable rb-pairs in a recoverable manner, we write A = {s1 < . . . < sw } and set C ′′ = {ℓ ∶ the rb-pair starting with xsℓ is stable}. One may check that #C ′ + #C ′′ = a + b. Setting C = C ′ ∪ {c + ℓ ∶ ℓ ∈ C ′′ } ⊆ [c + w], we have produced from the given chain X of type (a, b) a tuple ϕ(X) ∶= (w, A, B, C). Its clear that ϕ is injective. In particular, two chains X and X ′ have ϕ(X) = ϕ(X ′ ), then they must have the same value set as both are recovered by C ∩ [c], and the same locations of rb-pairs as both are determined by A and B, as well as the same locations of stable rb-pairs as these locations are determined by C ∖ (C ∩ [c]). All this data completely determines the red and blue colored integers in the chains X and X ′ , hence they are the same chain. We now check that ϕ is surjective. Fix (w, A, B, C) a 4-tuple of the desired form. Write A = {i1 < ⋯ < iw } ⊆ [a] and B = {j1 < ⋯ < jw } ⊆ [b]. Also decompose C ′ = C ∩ [c] = {c1 < ⋯ < ca+b−f } and let C ′′ = {s1 < ⋯ < sf } where C ∩ [c + 1, c + j] = {c + s1 < ⋯ < c + sf }. We now build a chain X = (x1 < ⋯ < xa+b ) of type (a, b) with ϕ(X) = (w, A, B, C). To determine the chain we first construct the coloring, that is we describe a sequence of a + b colored buckets into which we will place values. This is determined by the sets A and B. Color the first j1 − 1 buckets blue, then the next i1 buckets red, the next j2 − j1 buckets blue, the next i2 − i1 buckets red, and so on. Finishing this, the sequence may be too short, however we know that there will be no more rb-pairs, so we fill in with the remaining number of blue buckets, then the remaining number of red buckets. Now it suffices to fill in the values. The coloring has been chosen so that the iℓ th red bucket is part of an rb-pair for 1 ≤ ℓ ≤ w, and similarly the jℓ th blue bucket is part of an rb-pair. Use the set C ′′ to mark the red component of the stable rb-pairs. Now start placing values in buckets in order, and repeat values on the stable rb-pairs so marked. This produces the chain X. To see that ϕ(X) = (w, A, B, C) note that A and B characterize the rb-pairs of X and C consists precisely of the values and the encoded locations of the stable rb-pairs by construction.  Example 3.4. Fix a = 7, b = 8, and c = 15. As is typical with combinatorial proofs, it is instructive to see the functions in action in an example. Consider the (7, 8) chain 1r < 2r < 3r < 4b < 5r < 5b < 6b < 7b < 8b < 9r < 10r < 10b < 11b < 12r < 13b where we denote a red number nr with value n and a blue number nb with value n. Realize this chain as x1 < . . . < x15 colored integers. The red indicies are {1 < 2 < 3 < 5 < 10 < 11 < 14} and the blue indicies are {4 < 6 < 7 < 8 < 9 < 12 < 13 < 15}. Writing the former set as {i1 < . . . < i7 } and the latter as {j1 < . . . < j8 }, we have the set A of red subindicies of rb-pairs is {3 < 4 < 6 < 7} and B the set of blue subindicies of rb-pairs is {1 < 2 < 6 < 8}. So w = 4. The set C ′ is the set of values {1, . . . , 13}. The set C ′′ is the set of those indices in A which arise for stable rb-pairs, in this case C ′′ = {2, 3}. Shifting these by c = 15 we have C = {1, . . . , 13, 17, 18} and we have ϕ(X) = (4, A, B, C). Continuing with a = 7, b = 8, and c = 15, we compute ψ(2, A, B, C) where A = {3 < 5}, B = {1 < 2}, and C = {1, . . . , 14, 17} ⊂ [17]. To calculate ψ(2, A, B, C) we split C into the honest values {1, . . . , 14} and the index 17 −15 = 2 which corresponds to a unique stable rb-pair. We first determine the pattern of colors. Since B = {1 < 2}, the first blue number is part of an rb-pair, which means the sequence starts with red numbers. Since A = {3 < 5}, the third red number is the earliest one that is part of an rb-pair, so our sequence starts r < r < r < b. The second blue number is also part of an rb-pair, and so we must switch back to red numbers until we reach the 5th red number, 6 LANCE EDWARD MILLER AND WILLIAM D. TAYLOR so our sequence looks like r < r < r < b < r < r < b. There are no more rb-pairs, and so we must finish writing blue numbers and then end with the remaining red numbers: r < r < r < b < r < r < b < b < b < b < b < b < b < r < r. We have that the values of the elements in our chain are nonincreasing, and the 2nd rb-pair is the only stable rb-pair, and the values of the 15 colored integers include all values in [14], hence our chain of type (7, 8) is 1r < 2r < 3r < 4b < 5r < 6r < 6b < 7b < 8b < 9b < 10b < 11b < 12b < 13r < 14r. With Lemma 3.3 in hand, we draw out a few immediate consequences, which will be applied in the main counting result, Theorem 3.8. c i i c+j +1 a b )( )( ). Corollary 3.5. For a, b, c ∈ N, ∑ ( )( ) = ∑ ( a+b+1 j j i=0 a b j Proof. By Lemma 3.3 and the Hockeystick Lemma, c c c i i i+j a b i+j a b c+j +1 a b )( )( ) = ∑ (∑ ( )) ( )( ) = ∑ ( )( )( ). ∑ ( )( ) = ∑ ∑ ( a b a + b j j a + b j j a +b+1 j j i=0 i=0 j j i=0 j c Corollary 3.6. For c, u, u′ , v, v ′ ∈ N, ∑ ( i=0 Proof. The sum c t+i v+i ∑i=0 ( u )( w )  t+i v+i t v c+j +1 a b )( ) = ∑∑∑( )( )( )( )( ). u w u−a w−b a+b+1 j j a b j is the coefficient of xu y w in the polynomial c ∑(x + 1) i=0 i+t c (y + 1)i+v = (x + 1)t (y + 1)v ∑(x + 1)i (y + 1)i . i=0 The coefficient of xu y w in the right hand side is, by Corollary 3.5, ∑∑( a b c t v i i t v c+j +1 a b )( ) ∑ ( )( ) = ∑ ∑ ∑ ( )( )( )( )( ). u − a w − b i=0 a b u−a w−b a+b+1 j j a b j  The final ingredient is following lemma, which offers a direct count of the type of tuples we are interested in. Its proof is a direct application of [RS15, Lem. 2.5], inclusion-exclusion, and Pascal’s identity and left to the reader. Lemma 3.7. Fix natural numbers v, d, and q. The number of tuples (z1 , . . . , zv ) ∈ Zv≥0 with ∑i zi = d and zi < q is d − iq + v − 1 i v ). ∑(−1) ( )( i v−1 i Armed with this, we obtain a closed form for T (m, n, r, q) and U (m, n, r, q). These closed forms involve the q monus operation a b = max{a − b, 0}. Theorem 3.8. For fixed d ∈ N, m−1 iq + n − 1 r − iq + j a b m T (m, n, r, q) = ∑ ∑ ∑ ∑(−1)i ( )( )( )( )( )( ) i m − 1 − a n−1−b a+b+1 j j i a b j and q q m n (j i)q + m − 1 (i j)q + n − 1 r − max{i, j}q + ℓ a b U (m, n, r, q) = ∑ ∑ ∑ ∑ ∑(−1)i+j ( )( )( )( )( )( )( ) i j m−1−a n−1−b a+b+1 ℓ ℓ i j a b ℓ Proof. Both claims are proved using similar techniques. By Lemma 3.7, the number of m-tuples (x1 , . . . , xm ) such that ∑i xi = d and xi < q for all i is d − iq + m − 1 i m ) ∑(−1) ( )( i m−1 i ). Therefore, and the number of n-tuples (y1 , . . . , yn ) with ∑j yj = d is (d+n−1 n−1 r−1 m d − iq + m − 1 d + n − 1 m r−1 d − iq + m − 1 d + n − 1 T (m, n, r, q) = ∑ ∑(−1)i ( )( )( ) = ∑(−1)i ( ) ∑ ( )( ). i m−1 n−1 i d=0 m−1 n−1 i d=0 i Applying Corollary 3.6 with c = r − iq − 1, t = u = m − 1, v = iq + n − 1, and w = n − 1, we obtain that r−iq−1 d′ + m − 1 d′ + iq + n − 1 m−1 iq + n − 1 r − iq + j a b d − iq + m − 1 d + n − 1 )( ) = ∑∑∑( )( )( )( )( ). )( )= ∑ ( ∑( m − 1 n − 1 m − 1 − a n−1−b a+b+1 j j m − 1 n − 1 ′ a b j d =0 d=0 r−1 THE s-MULTIPLICITY FUNCTION OF 2 × 2-DETERMINANTAL RINGS Thus, 7 m m−1 iq + n − 1 r − iq + j a b T (m, n, r, q) = ∑ ∑ ∑ ∑(−1)i ( )( )( )( )( )( ). i m − 1 − a n−1−b a+b+1 j j i a b j Similarly, we find an equivalent expression for U . We have that r−1 m n d − iq + m − 1 d − jq + n − 1 U (m, n, r, q) = ∑ ∑ ∑(−1)i+j ( )( )( )( ). i j m−1 n−1 d=0 i j if i ≥ j, then letting c = r − iq − 1, t = u = m − 1, v = iq − jq + n − 1, and w = n − 1, we have that r−iq−1 d′ + m − 1 d′ + iq − jq + n − 1 d − iq + m − 1 d − jq + n − 1 )( ) )( )= ∑ ( ∑( m−1 n−1 m−1 n−1 d′ =0 d=0 m−1 iq − jq + n − 1 r − iq + ℓ a b = ∑∑∑( )( )( )( )( ). n−1−b a+b+1 ℓ ℓ a b ℓ m−1−a r−1 By a symmetric argument, if i < j, then r−1 d − iq + m − 1 d − jq + n − 1 jq − iq + m − 1 n−1 r − jq + ℓ a b )( ) = ∑∑∑( )( )( )( )( ). ∑( m − 1 n − 1 m − 1 − a n − 1 − b a+b+1 ℓ ℓ a b ℓ d=0 Therefore, q q m n (j i)q + m − 1 (i j)q + n − 1 r − max{i, j}q + ℓ a b )( )( )( )( ). U (m, n, r, q) = ∑ ∑ ∑ ∑ ∑(−1)i+j ( )( )( m−1−a n−1−b a+b+1 ℓ ℓ i j i j a b ℓ  We are now set to put this all together to give a closed form for the desired length function. Theorem 3.9. Fix k a field, p an integer and q a p-power. Let X be an m×n-matrix of variables, m the homogeneous maximal ideal of k[X] and I2 (X) the ideal of 2 × 2-minors. Let s ∈ R>0 such that sq ∈ Z, and set m−1 n−1 sq + ℓ a b R(m, n, s, q) ∶= ∑ ∑ ∑ ( )( )( )( )( ) a b a+b+1 ℓ ℓ a b ℓ q q m n (j i)q + m − 1 (i j)q + n − 1 (s − max{i, j})q + ℓ a b S(m, n, s, q) ∶= ∑ ∑ ∑ ∑ ∑(−1)i+j ( )( )( )( )( )( )( ). i j m−1−a n−1−b a+b+1 ℓ ℓ i>0 j>0 a b ℓ k[X] The length λ ( m⌈sq⌉ +m [q] +I (X) ) = R(m, n, s, q) − S(m, n, s, q) is eventually a polynomial in q for all s. 2 Proof. First use Corollary 2.6 to give a k-basis for the vector space k[X]/(m⌈sq⌉ + m[q] + I2 (X)) consisting of monomials of bounded degree and with restricted row and column sums. This reduces the calculation to the functions T and U . In particular, by applying Lemma 3.7 and Theorem 3.8, we have λ( k[X] ) = T (m, n, sq, q) + T (n, m, sq, q) − U (m, n, sq, q) msq + m[q] + I2 (X) m m−1 iq + n − 1 (s − i)q + ℓ a b = ∑ ∑ ∑ ∑(−1)i ( )( )( )( )( )( ) i m − 1 − a n−1−b a+b+1 ℓ ℓ i a b ℓ n jq + m − 1 n−1 (s − j)q + ℓ a b + ∑ ∑ ∑ ∑(−1)j ( )( )( )( )( )( ) j m − 1 − a n − 1 − b a+b+1 ℓ ℓ j a b ℓ q q m n (j i)q + m − 1 (i j)q + n − 1 (s − max{i, j})q + ℓ a b − ∑ ∑ ∑ ∑ ∑(−1)i+j ( )( )( )( )( )( )( ) i j m−1−a n−1−b a+b+1 ℓ ℓ i j a b ℓ =∑∑∑( m−1 n−1 sq + ℓ a b )( )( )( )( ) a b a + b + 1 ℓ ℓ a b ℓ q q m n (j i)q + m − 1 (i j)q + n − 1 (s − max{i, j})q + ℓ a b )( )( )( )( ) − ∑ ∑ ∑ ∑ ∑(−1)i+j ( )( )( m−1−a n−1−b a+b+1 ℓ ℓ i j i>0 j>0 a b ℓ where the last equality follows as the i = 0 summand of U (m, n, sq, q) is precisely T (n, m, sq, q) and the j = 0 summand of U (m, n, sq, q) is precisely T (m, n, sq, q) and so they cancel in the sum, except for the summand m−1 n−1 sq+ℓ a b ∑a ∑b ∑ℓ ( a )( b )(a+b+1)( ℓ )(ℓ) which only appears once in U (m, n, sq, q) when i = 0 and j = 0, but appears twice in T (m, n, sq, q) + T (n, m, sq, q).  8 LANCE EDWARD MILLER AND WILLIAM D. TAYLOR 3.1. Examples. Fix R = k[X]/I2 (X) where X is an m × n-matrix. We conclude with a few examples using Theorem 3.8 and use this to calculate es (R) for small values of m and n. Example 3.10. Suppose m = n = 2 and assume throughout assume s ∈ Z[p−1 ] and so sq is always an integer for q ≫ 0. We calculate λ ( msq +mk[X] [q] +I (X) ) by calculating R(2, 2, s, q) and S(2, 2, s, q). The latter depends on the 2 integer part of s. 2 2 3 3 s3 q3 s2 q2 sq . For s < 1, S(2, 2, s, q) = 0 and so λ ( msq +mk[X] + 2 +6. We always have R(2, 2, s, q) = s 3q + s 2q + sq [q] +I (X) ) = 6 3 2 For 1 ≤ s < 2 we have 4 2 S(2, 2, s, q) = (s − 1)3 q 3 + 2(s − 1)2 q 2 + (s − 1)q. 3 3 Likewise, for s ≥ 2 we have s3 4 s2 s 1 S(2, 2, s, q) = ( − ) q 3 + q 2 + ( + ) q. 3 3 2 6 3 Putting this together yields a closed form for the length in question 2 ⎧ s3 3 ⎪ q + s2 q 2 + 6s q ⎪ 3 ⎪ ⎪ 2 k[X] ⎪ 3 λ ( sq ) = ⎨( s3 − 43 (s − 1)3 ) q 3 + ( s2 − 2(s − 1)2 ) q 2 + ( 6s − 23 (s − 1)) q [q] ⎪ m + m + I2 (X) ⎪ ⎪ 4 3 1 ⎪ ⎪ ⎩3q − 3q Recalling that ⎧ ⎪ if s < 1 ⎪ 1 s3 2Hs (3) − 2Hs−1 (3) = ⎨ 13 3 4 3 ⎪ ⎪ ⎩ 3 s − 3 (s − 1) if 1 ≤ s < 2 we have shown that if 0 < s ≤ 1 if 1 < s ≤ 2 . if s > 2 ⎧ ⎪2Hs (3) − 2Hs−1 (3) if s ≤ 2 1 k[X] ⎪ λ ( ⎨4 ) = 3 sq [q] q→∞ q ⎪ m + m + I2 (X) if s ≥ 2. ⎪ ⎩3 hs (m) = lim 2Hs−1 (3) ⎧ ⎪ ⎪2 − es (R) = ⎨ 4 Hs (3) ⎪ ⎪ ⎩ 3Hs (3) and thus if s ≤ 2 if s ≥ 2. Example 3.11. Now fix m = 2 and n = 3. We have R(2, 3, s, q) = s4 4 q 8 + . 5s3 3 q 12 + 3s2 2 q 8 ⎧ 0 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ 3 (s − 1)4 q 4 + 5 (s − 1)3 q 3 + 9 (s − 1)2 q 2 + 1 (s − 1)q ⎪ 2 4 2 S(2, 3, s, q) = ⎨ 14 1 1 3 2 4 2 3 ⎪ (4s − 9s + 7)q + (9s − 9s − 8)q + (5s − 1)q 2 + 12 q ⎪ 4 4 4 ⎪ ⎪ 4 ⎪ ⎪( −13 + s )q 4 + ( 1 + 5 s3 )q 3 + ( 1 + 3 s2 )q 2 + ( 1 + s )q ⎪ ⎩ 8 8 4 12 8 8 4 12 + s q 12 if if if if and 0<s<1 1≤s<2 2≤s<3 3≤s and we have the length λ ( msq +mk[X] [q] +I (X) ) is given by 2 3 2 s4 4 s ⎧ q + 5s q 3 + 3s8 q 2 + 12 q ⎪ ⎪ 8 12 ⎪ 4 2 ⎪ ⎪ s 3 5s3 s 4 4 ⎪ − 12 (s − 1))q ⎪( 8 − 4 (s − 1) )q + ( 12 − 52 (s − 1)3 )q 3 + ( 3s8 − 49 (s − 1)2 )q 2 + ( 12 ⎨ s4 1 3 2 5s 1 3s 1 s 3 2 4 2 3 ⎪ − 21 )q ( − (4s − 9s + 7))q + ( 12 − 4 (9s − 9s − 8))q + ( 8 − 4 (5s − 1))q 2 + ( 12 ⎪ ⎪ ⎪ 138 4 4 1 3 1 2 1 ⎪ ⎪ ⎪ ⎩ 8 q − 4q − 8q − 4q if if if if We have that s4 ⎧ ⎪ ⎪ 8 ⎪ 4 ⎪ ⎪ ⎪ 1 k[X] ⎪( s8 − 34 (s − 1)4 ) hs (m) = lim 4 λ ( sq ) = ⎨ 4 q→∞ q ⎪ m + m[q] + I2 (X) ( s8 − 14 (4s3 − 9s2 + 7)) ⎪ ⎪ ⎪ 13 ⎪ ⎪ ⎪ ⎩8 In terms of the normalizing factors Hs one may write this as ⎧ ⎪ 3 ⎪ ⎪ ⎪ ⎪ 6Hs−1 (4) ⎪ ⎪ 3 ⎪ − es (R) = ⎨ 13 Hs (4)H3−s (4)+sH3−s (3) ⎪ − ⎪ Hs (4) ⎪ s (4) ⎪ 8H13 ⎪ ⎪ ⎪ ⎪ ⎩ 8Hs (4) if 0 < s < 1 if 1 ≤ s < 2 if 2 ≤ s < 3 if 3 ≤ s . if if if if 0<s<1 1≤s<2 . 2≤s<3 3≤s 0<s<1 1≤s<2 . 2≤s<3 3≤s THE s-MULTIPLICITY FUNCTION OF 2 × 2-DETERMINANTAL RINGS 9 References [Eto02] K. Eto, Multiplicity and Hilbert-Kunz Multiplicity of Monoid Rings, Tokyo J. Math., 25, 2, (2002), 241–245. 4 [EY03] K. Eto and K-i. Yoshida, Notes on Hilbert-Kunz multiplicity of Rees algebras, Comm. Algebra, 31, (2003), 5943–5976. 1, 4 [MS13] L. E. Miller and I. Swanson Hilbert-Kunz functions of 2 × 2 determinantal rings, Illinois Journal of Mathematics, 57, 1, (2013), 251277. 1, 2, 3, 4 [Mon83] P. Monsky, The Hilbert-Kunz function, Math. Ann., 263, (1983), 43–49. 1 [HMM04] C. Huneke, M. McDermott, and P. Monsky, Hilbert-Kunz Functions for Normal Rings, Math. Res. Lett., 11, (2004), 4, 539–546. 1 [RS15] M. Robinson and I. Swanson, Explicit Hilbert-Kunz functions of 2 × 2 determinantal rings, Pacific Journal of Mathematics 275 (2015), 433–442. 1, 2, 3, 4, 6 [Tay] W. Taylor, Interpolating between Hilbert-Samuel and Hilbert-Kunz multiplicity, arXiv:1706.07445. 1, 2 [Wat02] K.-i. Watanabe, Hilbert-Kunz multiplicity of toric rings, The Inst. of Natural Sciences Nihon Univ., Proc. of the Inst. of Natural Sciences, 35 (2000), 173–177.
0math.AC
INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS arXiv:1407.2872v3 [math.GR] 22 Jan 2016 YAIR GLASNER With an appendix by Tsachik Gelander and Yair Glasner Abstract. Let Γ < GLn (F ) be a countable non-amenable linear group with a simple, center free Zariski closure. Let Sub(Γ) denote the space of all subgroups of Γ with the, compact, metric, Chabauty topology. An invariant random subgroup (IRS) of Γ is a conjugation invariant Borel probability measure on Sub(Γ). An IRS is called nontrivial if it does not have an atom in the trivial group, i.e. if it is nontrivial almost surely. We denote by IRS0 (Γ) the collection of all nontrivial IRS on Γ. Theorem 0.1. With the above notation, there exists a free subgroup F < Γ and a non-discrete group topology on Γ such that for every µ ∈ IRS0 (Γ) the following properties hold: • µ-almost every subgroup of Γ is open. • F · ∆ = Γ for µ-almost every ∆ ∈ Sub(Γ). • F ∩ ∆ is infinitely generated, for every open subgroup. In particular this holds for µ-almost every ∆ ∈ Sub(Γ). • The map Φ : (Sub(Γ), µ) → (Sub(F ), Φ∗ µ) ∆ 7→ ∆∩F is an F -invariant isomorphism of probability spaces. A more technical version of this theorem is valid for general countable linear groups. We say that an action of Γ on a probability space, by measure preserving transformations, is almost surely non free (ASNF) if almost all point stabilizers are non-trivial. Corollary 0.2. Let Γ be as in the Theorem above. Then the product of finitely many ASNF Γ-spaces, with the diagonal Γ action, is ASNF. Corollary 0.3. Let Γ < GLn (F ) be a countable linear group, A  Γ the maximal normal amenable subgroup of Γ - its amenable radical. If µ ∈ IRS(Γ) is supported on amenable subgroups of Γ then in fact it is supported on Sub(A). In particular if A(Γ) = hei then ∆ = hei, µ almost surely. 2010 Mathematics Subject Classification. Primary 28D15; Secondary 34A20, 20E05, 20E25, 20E42. Key words and phrases. IRS, linear groups, group topology, non-free action, amenable radical. 1 2 YAIR GLASNER Contents 1. Introduction 1.1. Invariant random subgroups 1.2. Examples 1.3. Induction, restriction and intersection 1.4. The main theorems 1.5. Non-free actions on probability spaces 2. Essential subgroups and recurrence 2.1. Essential and locally essential subgroups 2.2. The stabilizer topology on a free group 3. Preliminary proofs 3.1. Covering of IRS 3.2. Projective dynamics 4. Proof of the main theorem 4.1. Reduction to the simple case 4.2. A good projective representation 4.3. Definition of the stabilizer topology and the main technical theorem 4.4. A proof that the main theorem follows from the existence of a good cover 5. The construction of a good cover 5.1. A cover by infinite subgroups 5.2. A geometric construction of an infinite cover 5.3. Finitely generated groups in positive characteristic 5.4. A nearly Zariski dense essential cover 5.5. Abundance of very proximal elements 5.6. Putting the very proximal elements {aΣ } in general position 5.7. Poincaré recurrence estimates for multiple measures 5.8. An independent set 5.9. Conclusion Appendix A. A relative version of Borel density theorem - By Tsachik Gelander and Yair Glasner References 2 2 4 5 5 7 8 8 10 11 11 12 17 17 19 20 21 22 23 23 25 28 29 30 32 33 34 37 39 1. Introduction Before discussing our main theorem and some corollaries, we need to develop the language of invariant random subgroups. 1.1. Invariant random subgroups. Let Γ be a discrete countable group and Sub(Γ) the collection of all subgroups of Γ endowed with the compact Chabauty topology. A basis for this topology is given by sets of the form UM (C) = {D ∈ Sub(Γ) | D ∩ M = C ∩ M } . Where C ∈ Sub(Γ) and M ⊂ Γ is a finite subset. In other words, Sub(Γ) ⊂ 2Γ inherits its topology from the Tychonoff topology on 2Γ . The last definition shows that Sub(Γ) is a compact metrizable space. Every subgroup Σ ∈ Sub(Γ) gives rise INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 3 to two closed subsets, the collection of its subgroups and supergroups Sub(Σ) = {∆ ∈ Sub(Γ) | ∆ < Σ} ⊂ Sub(Γ) Env(Σ) = {∆ ∈ Sub(Γ) | Σ < ∆} ⊂ Sub(Γ). The latter is referred to as the envelope of Σ, it is open whenever Σ is finitely generated. The collection of open sets [ {Env(Σ) | Σ ∈ Sub(Γ) f.g.} {Sub(Γ) \ Env(Σ) | Σ ∈ Sub(Γ) f.g.} . forms a basis for the topology of Sub(Γ) since:   \ UM (C) = Env(hM ∩ Ci) ∩  Sub(Γ) \ Env(hδi) . γ∈M \C The group Γ acts (continuously from the left) on Sub(Γ) by conjugation Γ × Sub(Γ) → Sub(Γ) namely (g, H) 7→ gHg −1 . The following definition plays a central role in all of our discussion: Definition 1.1. Let Γ be a countable group. An invariant random subgroup or an IRS on Γ is a Borel probability-measure µ ∈ Prob(Sub(Γ)) which is invariant under the Γ action. We denote the space of all invariant random subgroups on Γ by IRS(Γ) = ProbΓ (Sub(Γ)). An IRS is called nontrivial if it does not have an atom at the trivial group hei. The collection of all nontrivial IRS will be denoted IRS0 (Γ). An IRS is ergodic if it is an ergodic measure with respect to the action of Γ. As is customary in probability theory, we will sometimes just say that ∆ is an IRS in Γ and write ∆ 2 Γ, when we mean that some µ ∈ IRS(Γ) has been implicitly fixed and that ∆ ∈ Sub(Γ) is a µ-random sample. Thus in our terminology above saying that an IRS is nontrivial means that it is nontrivial almost surely. Remark 1.2. The theory of invariant random subgroups can be developed also in the more general setting where Γ is a locally compact second countable group. In that case Sub(Γ) is taken to be the space of all closed subgroups of Γ and it is again a compact metrizable space. We will not pursue this more general viewpoint here. We refer the interested reader to the paper [ABB+ 11] and the references therein. The term “IRS” was introduced in a pair of joint papers with Abért and Virág [AGV13, AGV14], however the paper of Stuck-Zimmer [SZ94] is quite commonly considered as the first paper on this subject. That paper provides a complete classification of IRS in a higher rank simple Lie group G, by showing that every ergodic IRS is supported on a single orbit (i.e. conjugacy class), either of a central normal subgroup or of a lattice. A similar classification is given of the ergodic IRS of a lattice Γ < G. These are supported either on a finite central subgroup or on the conjugacy class of a finite index subgroup. Recent years have seen a surge of activity in this subject, driven by its intrinsic appeal based on the interplay between group theory and ergodic theory, as well as by many applications that were found. We mention in combinatorics and probability [AGV13, AL07, LP15, Can], representation theory and asymptotic invariants [ABB+ 11, ABB+ , BG04, Rai], dynamics [Bow14, Ver12], group theory [AGV14, Ver10, Bow, BGKb, BGKa, GM14, KN13, TTD] and rigidity [SZ94, Bek07, PT, CPa, CPb, HT, TD, Cre]. Topological analogues of IRS were introduced in [GW15]. 4 YAIR GLASNER The current paper initiates a systematic study of the theory of IRS in countable linear groups. The theory of linear groups is known as a benchmark of sorts in group theory. Contrary to the wild nature of general countable groups, linear groups support a very elaborate structure theory. On the other hand they exhibit a very wide array of phenomena. They are not too specialized, compared for example with abelian, nilpotent or even amenable groups. In this capacity methods and questions that were addressed in the setting of linear groups are often pushed further to other groups of “geometric nature”. Hyperbolic and relatively hyperbolic groups, acylindrically hyperbolic groups, convergence groups, mapping class groups, Out(Fn ), and even just residually finite groups are some of the examples. Undoubtably many of the methods developed here can be applied in many of these other geometric settings. One question which is inaccessible for linear groups, or for any other family of groups that is not extremely special, is the study of all subgroups of a given group Γ. This is out of reach even for lattices in higher rank simple Lie groups, where we do have a complete understanding of seemingly similar problems such as the classification of all quotient groups or of all finite dimensional representations. An outcome of the Stuck-Zimmer paper [SZ94] is that, in the presence of an invariant measure - an IRS - the situation changes dramatically. For a lattice in a simple Lie group almost every subgroup, with respect to any IRS, is either finite central or of finite index. We would like to draw the attention to this formation of quantifiers. It will appear frequently, as we attempt to follow a similar path, proving in the setting of a countable linear group Γ, statements that hold for almost every subgroup with respect to every IRS. 1.2. Examples. Example 1.3. Normal subgroups: If N  Γ is a normal subgroup then the Dirac measure δN supported on the single point N ∈ Sub(Γ) is an IRS. Example 1.4. Almost normal subgroups: If H < Γ is such that [Γ : NΓ (H)] < ∞ then we will say that H is an almost normal subgroup. In this case a uniformly chosen random conjugate of H is an IRS. Normal and finite index subgroups are both examples of almost normal subgroups. Example 1.5. Probability-measure preserving actions: If Γ y (X, B, µ) is an action on a probability space by measure preserving transformations then the stabilizer Γx := {γ ∈ Γ | γx = x} 2 Γ of a µ-random point x ∈ X is an IRS. The probability measure responsible for this IRS is Φ∗ (µ) where Φ : X → Sub(Γ) is the stabilizer map x 7→ Γx . Note that such an IRS is nontrivial if and only if it comes from an action that is almost surely non free. Following our convention that and IRS is called nontrivial if it is nontrivial almost surely. It was shown in [AGV14, Proposition 13] that every invariant random subgroup of a finitely generated group is obtained in this fashion: Lemma 1.6. For every invariant random subgroup ν ∈ IRS(Γ) of a countable group there exists a probability-measure preserving action Γ y (X, B, µ) such that ν = Φ∗ (µ) where Φ : X → Sub(Γ) is the stabilizer map x 7→ Γx . This was later generalized to the setting of locally compact second countable groups in [ABB+ , Theorem 2.4]. INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 5 1.3. Induction, restriction and intersection. Let Σ < Γ be a subgroup. The Γ natural, Σ-invariant, restriction map RΣ : Sub(Γ) → Sub(Σ) given by the intersection with Σ is defined by the formula ∆ 7→ ∆∩Σ. This map is clearly continuous and Γ it gives rise to a map on invariant random subgroups RΣ : IRS(Γ) → IRS(Σ). ∗ We will denote this map by µ 7→ µ|Σ . Thus for any µ ∈ IRS(Γ) the original restriction map becomes a Σ invariant map of probability spaces: Γ RΣ : (Sub(Γ), µ) → (Sub(Σ), µ|Σ ) ∆ 7→ ∆ ∩ Σ A map in the other direction exists only if Σ is of finite index in Γ. In this case we obtain an induction map IRS(Σ) → IRS(Γ) given by µ 7→ µ|Γ = [Γ:Σ] X 1 (γi )∗ µ, [Γ : Σ] i=1 where γi are coset representatives for Σ in Γ. Since the measure µ is Σ invariant this expression does not depend on the choice of these representatives. In the setting of locally compact groups this construction can be generalized to the case where Σ is a lattice in Γ, or more generally a subgroup of co-finite volume. All one has to do is replace the sum by an integral over Γ/Σ with respect to the invariant probability measure. The intersection µ1 ∩ µ2 of µ1 , µ2 ∈ IRS(Γ) is defined as the push forward of the product measure under the (continuous) map Sub(Γ) × Sub(Γ) → Sub(Γ) (∆1 , ∆2 ) 7→ ∆1 ∩ ∆2 . This can also be thought of as restricting the IRS µ1 to a µ2 -random subgroup or vice versa. 1.4. The main theorems. In our main theorem below we adopt the following convention. If Sub(Γ) = S0 t S1 t S2 t . . . t SL is a partition into Γ-invariant sets and if µ ∈ IRS(Γ) we set a` = µ(S` ) and µ` (A) = µ(A ∩ S` )/a` ∈ IRS(Γ), so that PL µ = `=0 a` µ` , is the standard decomposition of µ as a convex combination of IRS supported on these parts. Theorem 1.7. (Main theorem, IRS version) Let Γ < GLn (F ) be a countable linear group with a connected Zariski closure and A = A(Γ) its amenable radical. Then there exists a number L = L(Γ) ∈ N, proper free subgroups {F1 , F2 , . . . , FL } ⊂ Sub(Γ) and a partition into Γ-invariant subsets Sub(Γ) = S0 t S1 t . . . t SL such that for every µ ∈ IRS(Γ) the following properties hold: Amm: ∆ < A for µ0 -almost every ∆ ∈ Sub(Γ). Free: F` ∩ ∆ is a non-abelian infinitely generated free group, for every 1 ≤ ` ≤ L and µ` -almost every ∆ ∈ Sub(Γ). Me-Dense: F` ·∆ = Γ, for every 1 ≤ ` ≤ L and µ` -almost every ∆ ∈ Sub(Γ). Isom: The map RFΓ` : (Sub(Γ), µ` ) → (Sub(F` ), µ` |F` ) ∆ 7→ ∆ ∩ F 6 YAIR GLASNER is an (F` -equivariant) isomorphism of probability spaces, for every 1 ≤ ` ≤ L and µ` -almost every ∆ ∈ Sub(Γ). 1. Finally, it is possible to satisfy the conclusion of the theorem with L = 1 if and only if Γ/A contains no nontrivial commuting almost normal subgroups (as in Example 1.4). Remark 1.8. The free groups in the theorem are in general not finitely generated. Remark 1.9. Property Free of the theorem follows directly from property Isom when the measure has no atoms since such a measure will always give measure zero to the countable subset of finitely generated subgroups of F . Remark 1.10. Sometimes we will use the notation `-Free to denote the property Free in the theorem above for a specific value of 1 ≤ ` ≤ L, and similarly for the other properties. An important corollary of the main theorem is: Corollary 1.11. Let Γ < GLn (F ) be a countable linear group. If ∆ 2 Γ is an IRS in Γ that is almost surely amenable, then ∆ < A(Γ) almost surely. This theorem was vastly generalized in a beautiful paper of Bader, Duchesne and Lécureux [BDL] who prove the exact same theorem without the linearity assumption. In the Appendix (A), jointly with Tsachik Gelander, we give a short proof for this corollary. This short proof avoids many of the technicalities of the main theorem as well as all of the projective dynamical argument. The main Theorem 1.7 assumes its most appealing form when A(Γ) = hei and L(Γ) = 1. As mentioned in the abstract these conditions are satisfied whenever Γ is nonamenable and has a simple, center free, Zariski closure. Before stating the theorem in this specific case we note the following: Remark 1.12. If Γ < GLn (F ) is not finitely generated and char(F ) > 0 then it is possible for an amenable group Γ to have a simple Zariski closure. An example is the group PSLn (F ) when F is a locally finite field, such as the algebraic closure of Fp . This is the reason why many Tits-alternative type proofs restrict themselves to finitely generated groups in positive characteristic. In Theorem 1.7 we were are able to subsume the amenable case into the statement of the general theorem. Definition 1.13. Given a representation χ : Γ → GLn (Ω) we say that µ ∈ IRS(Γ) is χ non free if χ(∆) 6= hei for µ almost every ∆ ∈ Sub(Γ). We denote the collection of all such IRS by IRSχ (Γ) = {µ ∈ IRS(Γ) | µ(Sub(ker(χ))) = 0}. Theorem 1.14. (Main theorem, simple version) Let Γ be a nonamenable countable group and χ : Γ → GLn (F ) a linear representation whose image has a simple, center free, Zariski closure. Then there is a group topology Stχ on Γ such that µ almost every subgroup ∆ ∈ Sub(Γ) is open for every µ ∈ IRSχ (Γ). Moreover there exists a proper free subgroup F < Γ such that the following properties hold for every µ ∈ IRSχ (Γ): 1Explicitly this means that, after restricting to conullsets in the domain and range this becomes a measurable, measure preserving bijection with measurable inverse. INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 7 χ-Me-Dense: F · ∆ = Γ, for µ almost every ∆ ∈ Sub(Γ) χ-Non-Disc: F ∩ ∆ 6= hei for every open subgroup ∆ ∈ Sub(Γ) χ-Isom: The restriction map RFΓ : (Sub(Γ), µ) → ∆ 7→ (Sub(F ), µ|F ) ∆∩F is an F -invariant isomorphism of probability spaces for every µ ∈ IRSχ (Γ). In the more specific setting in which this theorem is set, it is actually stronger than Theorem 1.7 in two ways. It proves the existence of a topology and it no longer requires the Zariski closure to be connected. The group topology defined above is called the χ-stabilizer topology on Γ. When χ is injective, we just refer to the stabilizer topology St on Γ. The actual definition of the topology is quite technical and we postpone it to Subsection 4.3. A special case where Γ = Fr is a nonabelian free group is particularly interesting. This case is treated separately in Subsection 2.2 which gives a conceptual understanding of the topology, while avoiding the technical complications. We call any group F < Γ satisfying the property Me-Dense appearing in the theorem measurably dense. Note though that this property is, at least a-priori weaker than actual density in the stabilizer topology. Property Non-Disc on the other hand is equivalent to the assertion that e is an accumulation point of F \ {e}. In particular it shows that the stabilizer topology is non-discrete. In fact F is a non discrete subgroup of Γ in the stabilizer topology. 1.5. Non-free actions on probability spaces. In view of Example 1.5 we can restate the main theorems in terms of actions on probability spaces without any reference to IRS. In the main theorem below we choose to pass to a finite index subgroup, instead of restricting to groups with a connected Zariski closure. The proofs are straightforward and are left to the reader. Theorem 1.15. (Main theorem, p.m.p version) Let Γ < GLn (F ) be a countable linear group, A = A(Γ) its amenable radical. Then there exists a finite index subgroup Γ0 < Γ, a number L ∈ N and proper free subgroups F1 , F2 , . . . , FL < Γ such that for every action, by measure preserving transformations, on a standard Borel probability space, Γ y (X, B, µ) there exists a Borel measurable partition into Γ0 -invariant subsets: X = X0 t X1 t X2 t . . . t XL , with the following properties: • Γx < A for almost every x ∈ X0 . • F` · x ⊃ Γ0 · x for every 1 ≤ ` ≤ L and almost every x ∈ X` . • F` ∩ Γx is an infinitely generated free group for every 1 ≤ ` ≤ L and almost every x ∈ X` . • For every 1 ≤ ` ≤ L and almost every pair of points (x, y) ∈ X`2 we have that (F` ∩ Γx = F` ∩ Γy ) ⇒ (Γx = Γy ) Moreover if Γ/A contains no nontrivial elementwise commuting normal subgroups then we can take L = 1 and Γ0 = Γ in the above theorem. Recall from the abstract that an action Γ y (X, B, µ) is almost surely non-free (ASNF) if almost all stabilizers Γx are non-trivial. 8 YAIR GLASNER Theorem 1.16. (simple p.m.p version) Assume that Γ is a countable non-amenable linear group with a simple center free Zariski closure. Then there exists a free subgroup F < Γ with the property that for every ASNF action of Γ the two groups Γ and F have almost surely the same orbits. In other words the actions of Γ and F are orbit equivalent. Corollary 1.17. (Actions with amenable stabilizers are free) Let Γ < GLn (F ) be a countable linear group and Γ y (X, B, µ) a measure preserving action on a standard Borel probability space such that Γx is almost surely amenable. Then Γx < A almost surely. In particular if Γ has a trivial amenable radical every action with amenable stabilizers is essentially free. As in Corollary 1.11, here too the linearity assumption on Γ is unnecessary due to the beautiful work of Bader-Duchesne-Lécureux [BDL]. The non trivial intersection of almost every two instances of (possibly equal) IRS’s translates to the following: Theorem 1.18. (Non freeness of product actions) Let Γ be a countable, nonamenable linear group with a simple center free Zariski closure. If αi : Γ → Aut(X, B, µ), 1 ≤ i ≤ M are ASNF probability measure preserving actions then M M M so is the product action ΠM i=1 : Γ → (X , B , µ ). We conclude the introduction by mentioning two places where the results of this paper have been used. In a beautiful paper [TD, Corollary 5.11] Robin Tucker-Drob shows that for a countable linear group Γ the condition A(Γ) = hei is equivalent to the fact that any probability measure preserving action of Γ that is weakly contained in the Bernoulli shift Γ y [0, 1]Γ is actually weakly equivalent to the Bernoulli. This last property is what Tucker-Drob refers to as the shift minimality of the group Γ which has many other equivalent formulations [TD, Proposition 3.2]. Corollary 1.11 was also used in [AGV14, Theorem 5] to show that if Γ is a finitely generated linear group with A(Γ) = hei and Xn is a sequence of Schreier graphs for which the spectral radius of the random walk on L02 (Xn ) converges to the spectral radius of Γ then Xn also converge to Γ in the sense of BenjaminiSchramm. Both of these results are now valid for general countable groups, due to the Bader-Duchesne-Lécureux Theorem [BDL]. 2. Essential subgroups and recurrence 2.1. Essential and locally essential subgroups. The definition of locally essential subgroups, and the lemma that follows are, in my opinion, the most important new tools introduced in this paper. These notions are specific to the theory of IRS in countable groups and so far they do not have satisfactory generalizations to the locally compact case. Definition 2.1. Let µ ∈ IRS(Γ), a subgroup Σ < Γ is called µ-essential if µ(Env(Σ)) > 0. In words Σ is µ-essential if there is a positive probability that a µ-random subgroup contains Σ. A subgroup is called essential if it is µ-essential for some µ ∈ IRS(Γ). We denote the collections of µ-essential subgroups and of essential subgroups by [ E(µ) := {Σ ∈ Sub(Γ) | µ(Env(Σ)) > 0} , E(Γ) = E(µ). µ∈IRS(Γ) INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 9 An element γ ∈ Γ is essential essential if the cyclic group that it generates is essential. Note that the essential elements and subgroups of Γ associated with an IRS are deterministic objects. Recall that a group Γ is said to satisfy a property locally, if this property holds for every finitely generated subgroup of Γ. In particular this terminology is used in the following: Definition 2.2. Given a countable group Γ and µ ∈ IRS(Γ) we say that ∆ ∈ Sub(Γ) is µ-locally essential if every finitely generated subgroup of ∆ is µ-essential. We say that ∆ is locally essential if it is µ-locally essential for some µ ∈ IRS(Γ). Lemma 2.3. (The locally essential lemma) Let Γ be a countable group and µ ∈ IRS(Γ). Then µ-almost every ∆ ∈ Sub(Γ) is locally essential. Proof. Let H1 , H2 , . . . ∈ Sub(Γ) be an enumeration of the finitely generated subgroups of Γ that are not µ-essential. Then by definition µ(Env(Hi )) = 0 for every i, but [ {∆ ∈ Sub(Γ) | ∆ is not locally essential} = Env(Hi ), i which has measure zero as a countable union of nullsets.  Definition 2.4. We will say that a subgroup ∆ ∈ Sub(Γ) is recurrent if for every finitely generated subgroup Σ < ∆ and for every group element γ ∈ Γ the corresponding set of return times  N (∆, Env(Σ), γ) = n ∈ N | γ n ∆γ −n ∈ Env(Σ)  = n ∈ N | γ −n Σγ n < ∆ is infinite. We will say that ∆ is locally essential recurrent if it is both locally essential and recurrent. We will denote the collection of recurrent subgroups by Rec(Γ) and the collection of nontrivial recurrent subgroups by Rec0 (Γ) = Rec(Γ) \ {hei}. Corollary 2.5. Let Γ be a countable group and µ ∈ IRS(Γ). Then µ-almost every ∆ ∈ Sub(Γ) is recurrent. Proof. This basically follows directly from the locally essential lemma combined with Poincaré recurrence. We elaborate: Fix µ ∈ IRS(Γ). For a finitely generated subgroup Σ ∈ Sub(Γ) and a group element γ ∈ Γ we denote by Ξ(Σ, γ) = {∆ ∈ Env(Σ) | N (Env(Σ), ∆, γ) is finite}, the set of subgroups that S fail to be recurrent due to this specific pair (Σ, γ). Clearly Rec(Γ) = Sub(Γ) \ ( Ξ(Σ, γ)) where the union ranges over all finitely generated subgroups Σ and over all elements γ ∈ Γ. Since there are only countably many pairs (Σ, γ) ∈ Subf.g. (Γ)×Γ, it is enough to fix such a pair and show that µ(Ξ(Σ, γ)) = 0. This is clear when Σ fails to be µ-essential. When µ(Env(Σ)) > 0 it follows from Poincaré recurrence.  10 YAIR GLASNER 2.2. The stabilizer topology on a free group. In this section we sketch the existence proof of the stabilizer topology when Γ = Fr is a nonabelian free group. This illustrates the main geometric idea of the argument while avoiding many of the technical details of the main proof. It will also illustrate the importance of the locally essential lemma. Theorem 2.6. Let Γ be a countable group and ∆1 , ∆2 ∈ Sub(Γ) two recurrent subgroups. Then for every pair of elements δi ∈ ∆i [δ1n1 , δ2n2 ] ∈ ∆1 ∩ ∆2 , for infinitely many pairs (n1 , n2 ) ∈ Z2 . Proof. By recurrence, applied to the cyclic subgroup hδ2 i < ∆2 we know that δ1n1 δ2 δ1−n1 ∈ ∆2 infinitely often and hence [δ1n1 , δ2n2 ] ∈ ∆2 for every n2 and infinitely many values of n1 . An identical argument shows that [δ1n1 , δ2n2 ] ∈ ∆1 for every n1 and infinitely many values of n2 and the claim follows.  Recall that elements in a group Γ are called independent if they freely generate a free group. Lemma 2.7. Let {∆1 , . . . , ∆J } ⊂ Sub(Fr ) be non-abelian subgroups of the free group Fr . Then we can find J independent elements δi ∈ ∆i . Proof. In a free group two elements commute if and only if they are contained in a cyclic subgroup. A nonabelian free group is clearly not a union of finitely many cyclic subgroups, so by induction we find a sequence of elements δi0 ∈ ∆i that are pairwise non-commuting. Fix a free generating set Fr = hSi and consider the action of Fr on its Cayley tree T = Cay(Fr , S). If we write δi0 = ηi θi ηi−1 where θi is cyclicly reduced then δi0 acts on T as a hyperbolic tree automorphism whose axis is the bi-infinite geodesic labeled periodically . . . θi θi θi . . . and passing through ηi . In particular these J axes have 2J distinct end pointsin ∂T . Now by the standard ping-pong lemma we can find integers nj such that δj = (δj0 )nj | 1 ≤ j ≤ J are independent. Note that the groups ∆j may very well be identical this does not change the details of the above proof.  Recall that a collection of subgroups Base ⊂ Sub(Γ) forms a basis of identity neighborhoods of a topology if it satisfies the following properties (i) It is conjugation invariant (ii) It is a filter base, namely for every ∆1 , ∆2 ∈ Base there exists some ∆3 ∈ Base with ∆3 < ∆1 ∩ ∆2 (see [Bou60, Proposition 1, TGIII.3]). A collection of subgroups SB forms a sub-basis of identity neighborhoods if it is closed under conjugation. Such a sub-basis yields a basis consisting of all possible intersections of finitely many subgroups taken from SB. The resulting topology will be discrete if and only if there are subgroups {∆1 , ∆2 , . . . , ∆M } ⊂ SB with ∩M i=1 ∆i = hei. Theorem 2.8. Let Fr be a nonabelian free group. Then Rec0 (Fr ) the nontrivial recurrent subgroups form a sub-basis of identity neighborhoods for a non-discrete group topology. This topology has the property that for every µ ∈ IRS(Fr ), µ-almost every hei = 6 ∆ ∈ Sub(Γ) is open. Proof. The last statement follows directly from Corollary 2.5, so all we have to TJ prove is that given {∆j | 1 ≤ j ≤ J} ⊂ Rec0 the intersection j=1 ∆j 6= hei. INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 11 Recall that by Definition 2.4 the groups ∆j themselves are not allowed to be trivial. Let δj ∈ ∆j be independent elements as in Lemma 2.7. We assume by TJ−1 induction on J that we have already found an element w ∈ j=1 ∆j . We include in the induction hypothesis the requirement that w ∈ hδ1 , δ2 , . . . , . . . , δJ−1 i, and that when it is written as a reduced word in these free generators it assumes the −1 form w = δ1 w0 δJ−1 . Applying the induction hypothesis to ∆J , ∆J−1 , . . . , ∆2 in this TJ order we obtain another element u ∈ j=2 ∆j which can be written as a reduced word in δ2 , . . . , δJ assuming the form u = δJ u0 δ2−1 . Now we can find n, m ∈ Z such that v := [wn , um ] ∈ ∩Jj=1 ∆j . This element is automatically contained in ∆j for every 2 ≤ j ≤ J − 1 and by Theorem 2.6 (m, n) can be chosen in such a way that v ∈ ∆1 ∩ ∆J as well. Finally it is clear that v ∈ hδ1 , δ2 , . . . , δJ i and that when it is written as a reduced word in these free generators it assumes the form v = δ1 v 0 δJ−1 . This completes the induction and, in particular shows that v 6= e, as required.  3. Preliminary proofs 3.1. Covering of IRS. Throughout this section Γ is any countable group, µ ∈ IRS(Γ), I ⊂ IRS(Γ) is a (Borel measurable) set of invariant random subgroups. We will say that a subgroup is I-essential if it is µ-essential for some µ ∈ I. Denote by E(I) the set of all I-essential subgroups. When I is understood we will often omit it from the notation writing just E. We will use letters such as F, H ⊂ E to denote Borel subsets of Sub(Γ); less formally we will refer to Borel subsets F, H ⊂ E as families of subgroups. Definition 3.1. We will say that A family of subgroups F covers µ, if their envelopes cover Sub(Γ), up to a µ-nullset. In other words if µ-almost every ∆ ∈ Sub(Γ) contains some Σ ∈ F. F covers I if it covers every µ ∈ I. It becomes easier to cover if you use smaller subgroups. For example if hei ∈ F then F covers all of IRS(Γ). If F is the collection of all finitely generated subgroups then clearly F \{hei} still covers IRS0 (Γ) - the nontrivial invariant random subgroups (recall that we say an IRS is nontrivial if it is nontrivial almost surely). A major theme of the current paper is to take such trivial covers and refine them to covers by larger and more interesting subgroups. The notion of refinement of a cover is made explicit in the following definition: Definition 3.2. Assume that F covers µ as in the previous definition. We say that a family of essential subgroups H refines this cover and write F <µ H, if for every Σ ∈ F and for µ-almost every ∆ ∈ Env(Σ) there exists Θ ∈ H such that Σ < Θ < ∆. If I ⊂ IRS(Γ) is covered by F we will say that H refines this cover and write F <I H if F <µ H, ∀µ ∈ I. Definition 3.3. We say that a family of essential subgroups F is monotone if it is closed under passing to larger essential subgroups. Namely F is monotone if, together with every Σ ∈ F the collection F contains all the groups in Env(Σ) ∩ E. For example, the collections of infinite essential subgroups is monotone while the collection of finite essential subgroups is usually not. The following lemma is useful in the construction of refined covers. 12 YAIR GLASNER Lemma 3.4. Let µ ∈ IRS(Γ), and F, H ⊂ E(µ) two (Borel) families of µ-essential subgroups. Assume that F is monotone and covers µ. If every Σ ∈ F is contained in some Θ ∈ H. Then µ is covered by H and F <µ H. Proof. Assume, by way of contradiction that for some Ξ ∈ F the set   [ Y = Y (Ξ) = Env(Ξ) \  Env(Θ) Θ∈H ∩Env(Ξ) is of positive measure. Since F does cover we can find some Σ ∈ F such that µ(Env(Σ) ∩ Y ) > 0. Consider the essential subgroup Σ0 := ∩∆∈Env(Σ)∩Y ∆ > Σ. By definition Σ0 > Σ so by monotonicity Σ0 ∈ F. So that there exists some Θ ∈ H with Θ > Σ0 . This implies that Env(Θ) ⊂ Env(Σ0 ) = Y ∩ Env(Σ) ⊂ Y in contrast to the definition of Y . This shows that F <µ H. The fact that H covers follows upon taking Ξ = hei in the argument above.  Assume that ∆ = Γx 2 Γ is realized as the stabilizer of a µ-random point for some probability-measure preserving action Γ y (X, B, µ) as in Example (1.5) of Subsection 1.2. For any subgroup Σ < Γ we denote Fix(Σ) = {x ∈ X | σx = x ∀σ ∈ σ} and for any subset O ⊂ X we denote ΓO = {g ∈ Γ | gx = x for almost all x ∈ O}. Then, up to nullsets, Env(Σ) = {Γx | x ∈ Fix(Σ)} and the essential subgroups are exactly these subgroups Σ < Γ such that µ(Fix(Σ)) > 0. An essential covering by the essential subgroups {Σ1 , Σ2 , . . .} is just a covering (up to nullsets) of the form X = ∪i Fix(Σi ). 3.2. Projective dynamics. Our main theorem is reminiscent of the Tits alternative. Indeed the main part of the proof lies in the construction of the dense free subgroup F from Theorem 1.14. We follow the geometric strategy put forth by Tits in [Tit72] and further developed in [MS79], [MS81], [BG07] and many other papers. According to this strategy, the free group is constructed by first finding a projective representation exhibiting rich enough dynamics and then playing, ping-pong on the corresponding projective space. In particular the paper [BG07] describes how to go about this when the group Γ fails to be finitely generated. In this case the topological field can no longer be taken to be a local field, but rather a countable extension of a local field - which is no longer locally compact. The corresponding projective space in this case is no longer compact, but it is still a bounded complete metric space and the dynamical techniques used in the ping pong game still work. Following [GG08, Section 7.2] we give a short survey of the necessary projective dynamics that will be needed. We refer the reader to [BG03, Section 3], [BG07, Sections 3 and 6] for the proofs. Section 6 in the last mentioned paper deals explicitly with the non finitely generated setting. We recommend skipping the technical details in this section in a first reading and referring to them only when they become needed in the proof. Let k be a local field k·k the standard norm on k n , i.e. the standard P Euclidean norm if k is Archimedean and kxk = max1≤i≤n |xi | where x = xi ei when k is non-Archimedean and (e1 , . . . , en ) is the canonical basis of k n . Let K be an extension field of finite or countable degree over k, by [Lan02, XII, 4, Th. 4.1, p. 482] the absolute value on k extends to K. The norm on both fields extends in the usual way to Λ2 k n (resp. Λ2 K n ). The standard metric on P(K n ) is defined kv∧wk , where [v] denotes the projective point corresponding to by d([v], [w]) = kvkkwk INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 13 v ∈ K n . All our notation will refer to this metric, and in particular if R ⊂ P(K n ) and  > 0 we denote the  neighborhood of R by (R) = {x ∈ P(K n ) | d(x, R) < }. The projective space P(k n ) is embedded as a compact subset of the complete metric space P(K n ). Let U < PGLn (K) be the subgroup preserving the standard norm and hence also the metric on P(K n ) and A+ = {diag(a1 , a2 , . . . , an ) ∈ PGLn (K) | |a1 | ≥ |a2 | ≥ . . . ≥ |an |}. The Cartan decomposition (see [BT72, Section 7]) is a product decomposition PGLn (K) = U A+ U , namely each g ∈ PGLn (K) as a product g = kg ag kg0 where kg , kg0 ∈ U and ag ∈ A+ . This is an abuse of notation because only the ag component is uniquely determined by g, but we will be careful not to imply uniqueness of kg , kg0 . A calculation shows that a diagonal element a ∈ A+ acts as 2 an |a1 /an | -Lipschitz transformation on P(K n ) which immediately implies: Lemma 3.5. ( [BG03, Lemma 3.1]) Every projective transformation g ∈ PGLn (K) is bi-Lipschitz on P(K n ). For  ∈ (0, 1), we call a projective transformation g ∈ PGLn (K) -contracting if there exist a point vg ∈ P(K n ), called an attracting point of g, and a projective hyperplane Hg < P(K n ), called a repelling hyperplane of g, such that g (P(K n ) \ (Hg ) ) ⊂ (vg ) . Namely g maps the complement of the -neighborhood of the repelling hyperplane into the -ball around the attracting point. We say that g is -very contracting if both g and g −1 are -contracting. A projective transformation g ∈ PGLn (K) is called (r, )-proximal for some r > 2 > 0, if it is -contracting with respect to some attracting point vg ∈ P(K n ) and some repelling hyperplane Hg , such that d(vg , Hg ) ≥ r. The transformation g is called (r, )-very proximal if both g and g −1 are (r, )-proximal. Finally, g is simply called proximal (resp. very proximal) if it is (r, )-proximal (resp. (r, )-very proximal) for some r > 2 > 0. The attracting point vg and repelling hyperplane Hg of an -contracting transformation are in general not uniquely defined. Still under rather mild conditions it is possible to find a canonical choice of vg and Hg which are fixed by g and all of its powers: Lemma 3.6. ([BG07, Lemma 3.1]) Let  ∈ (0, 41 ). There exist two constants c1 , c2 ≥ 1 (depending only on the field K) such that if g ∈ PGLn (K) is an (r, )proximal transformation with r ≥ c1  then it must fix a unique point v g inside its attracting neighborhood and a unique projective hyperplane H g lying inside its repelling neighborhood2. Moreover, if r ≥ c1 2/3 , then the positive powers g n , n ≥ 1, n are (r − 2, (c2 ) 3 )-proximal transformations with respect to these same v g and H g . Proof. The proof of this lemma in [BG07, Section 3.4] is done for a local field k. Most of the proof carries over directly to the larger field K, except for the existence of a g-fixed hyperplane H g ⊂ R(g). That part of the proof uses a compactness argument, which does not work of the larger field K. We consider the action of the transpose g t on the projective space over the dual P((K n )∗ ). Points are can be identified with hyperplanes in P(K n ) and vice-versa so if we prove that g t is still (r, ) contracting with the same constants the first part of 2by this we mean that if v, H are any couple of a pointed a hyperplane with d(v, H) ≥ r s.t. the complement of the -neighborhood of H is mapped under g into the -ball around v, then v g lies inside the -ball around v and H g lies inside the -neighborhood around H 14 YAIR GLASNER the proof in Breulliard-Gelander’s proof would apply and give rise to a fixed point in the dual projective space, corresponding to the desired fixed hyperplane. Given vectors v, w ∈ K n and linear functionals f, h ∈ (K n )∗ , all of them of norm one, we will use the following formulas d([v], [w]) d([v], [ker f ]) Hd([ker f ], [ker h]) = kv ∧ wk (3.1) = |f (v)| (3.2) = max x∈ker h |f (x)| = kf ∧ hk = dP((K n )∗ ) ([f ], [h]) kxk (3.3) Where Hd denotes the Hausdorff distance. All distances are measured in P(K n ) except in the very last expression, where the contrary is explicitly noted. Equations (3.1),(3.2) appear in [BG03, Section 3]. The first and last equalities in (3.3) follow directly form (3.2) and (3.1) respectively. To check the middle equality in (3.3) let us choose a basis so that h = (h1 , 0, 0 . . . , 0), f = (f1 , f2 , . . . , fn ). In this basis the inequality we wish to prove becomes max (x2 ,...,xn )∈K n−1 |f2 x2 + f3 x3 + . . . fn xn | = kf2 eˆ1 ∧ eˆ2 + f3 eˆ1 ∧ eˆ3 + . . . + fn eˆ1 ∧ eˆn k . kxk Which is indeed true. Let (H, v) be a hyperplane and unit vector in K n realizing the fact that g is (r, )-proximal. We claim that the transpose g t is (r, )-proximal with respect to the dual hyperplane point pair (L, f ). Explicitly f is a norm one linear functional with ker(f ) = H; and L = {l ∈ (K n )∗ | l(v) = 0}. The fact that g is -contracting with respect to (H, v) translates, using Equations (3.1), into |f (u)| ≥  kuk ⇒ kgu ∧ vk ≤  kguk . Assume that φ is any norm one functional with dP((K n )∗ ) ([φ], [L]) > . Considering v as a functional on (K n )∗ with kernel L, the second line in (refeq) gives |φ(v)| > . The same equation, now with φ considered as a functional on K n implies that dP(K n ) ([ker(φ)], [v]) > . Since g is by assumption  contracting this means that  t  |g φ(x)|  > Hd(g −1 ker(φ), H) = Hd(ker(g t φ), H) = max = d([g t φ], [f ]). x∈H kxk Which is exactly the desired -contraction. Note also that dP((K n )∗ ) ([f ], [L]) = dP((K n )∗ ) ([f ], [ker v]) = |f (v)| = dP(K n ) ([ker f ], v) ≥ r. So that g t is indeed (r, ) contracting with respect to ([L], [f ]). Applying the Breulliard-Gelander proof we obtain a unique g t fixed point [η] ∈ ([f ]) which, under the additional assumptions on (r, ) is also a common attracting point for all powers of g t . We set H g = ker(η). Clearly this is a g fixed subspace and it is easy to verify that it serves as a common repelling hyperplane for all the powers of g.  In what follows, whenever we add the article the (or the canonical) to an attracting point and repelling hyperplane of a proximal transformation g, we shall mean these fixed point v g and fixed hyperplane H g obtained in Lemma 3.6. Moreover, when r and  are given, we shall denote by A(g), R(g) the -neighborhoods of v g , H g respectively. In some cases, we shall specify different attracting and repelling sets INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 15 for a proximal element g, denoting them by A(g), R(g) ⊂ P(K n ) respectively. This means that  g P(K n ) \ R(g) ⊂ A(g). If g is very proximal and we say that A(g), R(g), A(g −1 ), R(g −1 ) are specified attracting and repelling sets for g, g −1 then we shall always require additionally that   A(g) ∩ R(g) ∪ A(g −1 ) = A(g −1 ) ∩ R(g −1 ) ∪ A(g) = ∅. Very proximal elements are important as the main ingredients for the construction of free groups using the famous ping-pong lemma: Lemma 3.7. (The ping-pong Lemma) Suppose that {gi }i∈I ⊂ PGLn (K) is a set of very proximal elements, each associated with some given attracting and repelling sets for itself and for its inverse. Suppose that for any i 6= j, i, j ∈ I the attracting set of gi (resp. of gi−1 ) is disjoint from both the attracting and repelling sets of both gj and gj−1 , then the gi ’s form an independent set, i.e. they freely generate a free group. A set of elements which satisfy the condition of Lemma 3.7 with respect to some given attracting and repelling sets will be said to form a ping-pong set (or a ping-pong tuple). A novel geometric observation of the papers [BG03, BG07] is that an element g ∈ PGLn (K) is -contracting, if and only if it is 0 -Lipschitz on an arbitrarily small open set. This equivalence comes with an explicit dependence between the two constants, as summarized in the lemma below: Lemma 3.8. ([BG03, Proposition 3.3 and Lammas 3.4 and 3.5]). There exists some constant c, depending only on the local field k < K, such that for any  ∈ (0, 41 ) and d ∈ (0, 1), 2 • if g ∈ PGLn (K) is (r, )-proximal for r > c1 , then it is c d 2 -Lipschitz outside the d-neighborhood of the repelling hyperplane, • Conversely, if g ∈ PGLn (K) is 2 -Lipschitz on some open neighborhood then it is c-contracting. Here c1 is the constant given by Lemma 3.6 above. Proof. The proof for the case K = k is given by the Proposition and two Lemmas indicated between brackets in the statement of the lemma are stated for a local field k. There the equivalence between the two properties is established via a third property, namely that |(a2 )g /(a1 )g | < c00 2 . It is routine to go over the proofs there and verify that they work in our more general situation. Basically there is only one thing to notice. In the proof that -contraction implies |a2 (g)/a2 (g)| < 2 /|π| (the converse implication of [BG03, Proposition 3.3]), the constant does depend on the field in a non-trivial way. Indeed |π| here is the absolute value of the uniformizer of the (non-Archimedean in this case) local field. However when one passes to a larger field the the situation only gets better as the norm of the uniformizer can only grow. If ultimately the value group of K is non-discrete one can do away with |π| altogether (taking |π| = 1 as it were).  16 YAIR GLASNER The above Lemma will enable us to obtain contracting elements - we just have to construct elements with good Lipschitz constants on an arbitrarily small open set. What we really need, in order to play ping-pong are very-proximal elements. To guarantee this we need to assume that our group is large enough. Definition 3.9. A group G ≤ PGLn (K) is called irreducible if it does not stabilize any non-trivial projective subspace. It is called strongly irreducible if the following equivalent conditions hold • It does not stabilize any finite union of projective hyperplanes, • Every finite index subgroup is irreducible, • The connected component of the identity in its Zariski closure is irreducible. We will say that a projective representation ρ : G → PGLn (K) is reducible or strongly irreducible if the image of the representation has the same property. The equivalence of the first two conditions is clear. The equivalence with the third property follows from the fact that fixing a projective subspace is a Zariski closed condition. It turns out that if a group is strongly irreducible and it contains contracting elements then the existence of very proximal elements is guaranteed. Lemma 3.10. (See [BG03, Proposition 3.8 (ii) and (iii)]) Suppose that G ≤ PGLn (K) is a group which acts strongly irreducibly on the projective space P(K n ). Then there are constants (G), r(G), c(G) > 0 such that if g ∈ G is an -contracting transformation for some  < (G) then for some f1 , f2 ∈ G the element gf1 g −1 f2 is (r(G), c(G))-very proximal. Combining the above two lemmas we obtain. Lemma 3.11. Suppose that Σ ≤ PGLn (K) is a group which acts strongly irreducibly. Then there are constants (Σ), r(Σ), c(Σ) > 0 such that for every λ ∈ PGLn (K) which is locally -Lipschitz for some  < (Σ) there exist f1 , f2 ∈ Σ such √ that λf1 λ−1 f2 is (r(Σ), c(Σ) )-very proximal. Finally, we will need the following two elementary lemmas. Lemma 3.12. A projective linear transformation [B] ∈ PGLn (K) that fixes n + 1 (projective) points in general position is trivial. Proof. By definition, n + 1 vectors in K n represent projective points in general position if any i of them span an i-dimensional subspace as long as i ≤ n. If {v0 , v1 , . . . , vn } are n + 1 eigenvectors of B in general position then by counting considerations there must be at least one eigenspace V < K n of dimension l containing at least l + 1 of these vectors. If the vectors are in general position then l = n, so B has only one eigenvalue and is hence projectively trivial.  Lemma 3.13. Assume that ρ : Γ → PGLn (K) is a strongly irreducible projective representation. Then every orbit ρ(Γ)v contains a set of n + 1 points in general position. Proof. Without loss of generality we assume the field is algebraically closed. Let Z H = ρ(Γ) be the Zariski closure, H(0) the connected component of the identity and  (0) −1 (0) Γ =ρ ρ(Γ) ∩ H (K) . Strong irreducibility is equivalent to the irreducibility  of ρ Γ(0) , thus the ρ(Γ(0) )-orbit of every non trivial vector v ∈ k n contains a basis INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 17 B := {v = v1 , . . . , vn }. Let V i := span{v1 , v2 , . . . , vˆi , . . . , vn } - the ith element missing. Assume by way of contradiction that ρ(Γ(0) )v ⊂ ∪ni=1 V i . Since taking a vector into a subspace is a Zariski closed condition we obtain, upon passing to the Zariski closure that H(0) (K) = ∪ni=1 Hi Hi = {h ∈ H(0) (K) | h(v) ∈ Vi (K)} This is a union of Zariski closed sets, and since H(0) is Zariski connected we have H (0) (K) = Hi for some i contradicting irreducibility of H(0) .  4. Proof of the main theorem In this chapter we reduce the proof of the Main Theorem 1.7, to our Main Technical Theorem 4.5 concerning the existence of a certain cover. That theorem is is then proved in the following chapter. 4.1. Reduction to the simple case. At first we prove the Main Theorem 1.7, assuming the validity of its the simple version 1.14. The proof is preceded by two lemmas. As mentioned in Remark 1.12, a group with a simple Zariski closure might be amenable. If it is not amenable though, it has no nontrivial normal amenable subgroups: Lemma 4.1. If Γ < GLn (F ) is a nonamenable linear group with a Zariski closure that is simple and has no finite normal subgroups, then A = A(Γ) = hei. Z Z Proof. Let H = Γ be the Zariski closure. Since A is normal in H our assumptions Z imply A > H(0) whenever A(Γ) 6= hei. Assume by contradiction that the former case holds. By Schur’s theorem [Weh73, Theorem 4.9] every torsion linear group is locally finite and hence in particular amenable; since by assumption this is not the case for Γ we can fix an element of infinite order γ ∈ Γ. The group Θ = hγ, Ai, being amenable by cyclic, is still amenable and its Zariski closure still contains H(0) . The group Θ cannot contain a non-trivial normal solvable subgroup S  Θ.  Z (0) Indeed if S were such a subgroup then S  H(0) would be a Zariski closed normal solvable subgroups, since the Zariski closure of a solvable subgroup is still solvable. Clearly there is no such group. Now, the Tits alternative [Tit72, Theorem 2] implies that Θ is a locally finite group contrary to the existence of the infinite order element γ.  Lemma 4.2. If ∆ 2 Γ is an IRS in a countable group Γ that is almost surely finite then the centralizer ZΓ (∆) is of finite index in Γ almost surely. Proof. The collection of finite subgroups of Γ is countable. Any ergodic measure that is supported on a countable set has finite orbits which in our case means that ∆ has a finite conjugacy class almost surely. Thus NΓ (∆) is of finite index almost surely. The claim follows since ZΓ (∆) is the kernel of the action of NΓ (∆) on the finite group ∆.  Proof. (Theorem 1.7 follows from Theorem 1.14) Let η1 : Γ → GLn (Ω) be an injective representation, realizing our given group Γ Z as a linear group over an algebraically closed field Ω, let G1 = η1 (Γ) be its Zariski closure which is by assumption connected. Replacing η1 by η2 = ι ◦ η1 where ι is the natural map to the semisimple quotient G1 / Rad(G1 ) we obtain a new linear 18 YAIR GLASNER Z representation where G2 = η2 (Γ) is semisimple. The map η2 is no longer faithful but its kernel, being solvable and normal, is contained in the amenable radical. Moreover η2 (A) < η2 (Γ) is a normal amenable subgroup. The Lie algebra g := Lie(G2 ) decomposes as a direct sum of simple Lie alge0 bras g = ⊕L `=1 h` which are invariant since G2 is connected. Thus we obtain a representation 0 {eqn:prod} L Y `=1 0 χ` = Ad ◦ η2 : Γ → L Y GL(h` ) < GL(g), (4.1) `=1 where the representation χ` : Γ → GL(h` ) is defined by the above equation as Z the restriction to the `th invariant factor. Let us denote by H` = χ` (Γ) the Zariski closure of these representations; these are simple center free groups. By rearranging the order of the factors we may assume that χ` (Γ) is nonamenable for every 1 ≤ ` ≤ L and is amenable for every L + 1 ≤ ` ≤ L0 . Let us set A` := ker(χ` )  Γ. The group A0 := ∩L `=1 A` is contained in the amenable radical A(Γ), it is clearly normal and it is amenable as both ker(Ad◦η2 )|Γ0 0 0 and (Ad ◦ η2 )(∩L `=1 A` ) < hei × . . . × hei × χL+1 (Γ ) × . . . × χL0 (Γ ) are. Let us set ` L 0 1 L A := ∩i=`+1 Ai for 0 ≤ ` ≤ L; thus A  A  . . .  A = Γ. Corresponding to this sequence of subgroups is the following stratification Sub(A0 ) ⊂ Sub(A1 ) ⊂ . . . ⊂ Sub(AL ) = Sub(Γ). Setting S0 = Sub(A0 ) and S` = Sub(A` ) \ Sub(A`−1 ), 1 ≤ ` ≤ L we can decompose Sub(Γ) as a disjoint union of the form Sub(Γ) = S0 tS1 . . .tSL . Clearly χ` (∆) 6= hei for every ∆ ∈ S` . Now fix µ ∈ IRS(Γ) and decompose it according to this stratification by setting a` := µ(S` ), and µ` (B) := µ(B ∩ S` )/a` , for every 0 ≤ ` ≤ L and Borel subset PL B ⊂ Sub(Γ). Clearly µ = `=0 a` µ` as in the statement of the theorem. The groups F` for 1 ≤ ` ≤ L are provided for upon application of theorem 1.14 to the representations {χ` | 1 ≤ ` ≤ L}. By definition µ0 is supported on Sub(A0 ) so property Amm is automatic. Similarly µ` is supported on S` and S` ∩ Sub(ker(χ` )) = ∅ so that µ` ∈ IRSχ` (Γ) for every 1 ≤ ` ≤ L. Thus properties `-Me-Dense and `-Isom in theorem 1.7 follow directly from the corresponding properties in Theorem 1.14. For property `-Free. We can decompose µ` = µNA + µA ` ` to an atomic part and a non-atomic part. From Remark 1.9 property χ-Free follows directly form χ-Isom for the non-atomic part. Therefor we may assume that µ` is completely atomic. This means that every ergodic component is supported on a finite orbit, or in other words that the IRS is supported on subgroups with finite index normalizers. So ∆ ∩ F also has a finite index normalizer in F , µ` almost surely. Since F itself is not finitely generated (by the proof of Theorem 1.14) it follows easily from properties of free groups that so is ∆ ∩ F . It remains to be shown that it is possible to choose L = 1 if and only if Γ/A contains two nontrivial commuting almost normal subgroups. If L ≥ 2 in the above construction then Γ/A contains two commuting normal subgroups ker χ1 and ∩L `=2 ker(χ` ). Conversely let hei = 6 M, N Γ be two almost normal subgroups such that M, N 6< A = A(Γ) but [M, N ] < A(Γ). Still assume by way of contradiction that the conclusion of the theorem holds with L = 1. For convenience of notation we will set F = F1 . INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 19 As explained in Example 1.4, both M and N appear with positive probability as instances of two invariant random subgroups µM , µN ∈ IRS(Γ). Thus by the statement of the theorem F · N = Γ and O := F ∩ M is a non-abelian free group. These two equations imply that OA is an almost normal subgroup of Γ/A. Indeed let Γ0 = NΓ (M ), which is by assumption a finite index subgroup in Γ. If we set F 0 = F ∩ Γ0 then F 0 N is of finite index in Γ. Clearly N < NΓ (OA), and F 0 < NΓ (O) so that together Γ0 A < NΓ (OA). Now, applying the theorem again to the almost normal subgroup OA we obtain, Γ = F · OA = F A; but A ∩ F is an amenable normal subgroup of F hence trivial. So that Γ = F n A and Γ/A ∼ = F is a free group which of course does not have two commuting almost normal subgroups, a contradiction.  4.2. A good projective representation. Let χ : Γ → GLn (F ) be the simple representation given in Theorem 1.14. As explained in the beginning of Subsection 3.2 the first step in proving Theorem 1.14 is to fix a projective representation ρ : Γ → PGLn (K) over a topological field K with enough elements that exhibit proximal dynamics on P(K n ). This section is dedicated to this task. The notation fixed here will be used without further mention in the rest of the paper. When Γ fails to be finitely generated K is in general not a local field. When this happens it is crucial to have a Zariski dense finitely generated subgroup Π < Γ whose image under the representation will fall into the PGLn (k) for some local subfield k < K. When Γ is finitely generated one can take k = K and Π = Γ. For the convenience of the reader we will try to indicate places where the argument in this case is more streamlined. We start with a few lemmas. Lemma 4.3. Let Γ < GLn (Ω) be a non-amenable group with simple center free Zariski closure. Then there exists a non-amenable finitely generated subgroup Π < Γ Z Z that has the same Zariski closure Π = Γ . Hence Π is also non-amenable with a simple center free Zariski closure. Z Proof. Let H = Γ and let H(0) be the Zariski connected component of the identity in H. Since [H : H(0) ] < ∞ it is enough to find a finitely generated subgroup Π < Γ Z such that Π > H(0) . Let {γ1 , γ2 , . . . , γm } be elements of Γ generating a subgroup Π0 with the property Z that I = Π0 is of maximal possible dimension. By Schur’s theorem [Weh73, Theorem 4.9] every torsion linear group is locally finite and in particular amenable. Since Γ is by assumption nonamenable it contains an element γ1 ∈ Γ of infinite Z order. The group hγ1 i is at least one dimensional and hence, also dim(I) ≥ 1.   Z (0) Now by our maximality assumption, for every γ ∈ Γ we have hI, γi = I(0) and in particular γ normalizes I(0) . Since Γ has a simple center free Zariski closure that implies I(0) = H(0) . A group is amenable if and only if all of its finitely generated subgroups are amenable. If every finitely generated group containing Π were amenable this would imply that Γ is amenable too, as the union of all these groups. Thus, after possibly replacing Π with a larger finitely generated subgroup, we may always assume that Π is non-amenable. This concludes the proof.  Proposition 4.4. Let Π be a finitely generated group and χ : Π → GLn (f ) be a representation with a simple center free Zariski closure. Then there is a number 20 YAIR GLASNER r > 0, a local field k an embedding f ,→ k, an integer n, and a faithful strongly irreducible projective representation φ : H(k) → PGLn (k) defined over k, such that  for any  ∈ 0, 2r there is g ∈ Π for which χ(g) ∈ H(0) (k) and φ ◦ χ(g) acts as an (r, )-very proximal transformation on P(k n ). Proof. See [BG07, Theorem 4.3] (also [GG08, Theorem 7.6]) for a much more general statement. The faithfulness follows from the simplicity of the Zariski closure.  If Γ is finitely generated we apply the above theorem with f = F, Π = Γ and fix once and for all the local field k = K, the representation ρ = φ ◦ χ : Γ = Π → PGLn (k) = PGLn (K),  Z (0) and ρ(g) is (r, )-very proximal and an element g ∈ Γ such that ρ(g) ∈ Γ where  is chosen so as to satisfy the conditions of Lemma 3.6. Namely r ≥ c1 2/3 , where c1 is the constant, given in that lemma. We denote by v g±1 , H g±1 the attracting and repelling points and hyperplanes associated to g in that lemma. If Γ is not finitely generated then we apply Lemma 4.3 and fix, once and for all, a nonamenable finitely generated subgroup Π < Γ such that χ(Π)Z = χ(Γ)Z . Let f < F be the finitely generated subfield generated by the matrix coefficients of χ(Π). Applying Proposition 4.4 to χ|Π : Π → PGLn (f ) we obtain a number r > 0, a local field k an embedding f ,→ k, an integer n, and a faithful strongly irreducible projective  representation φ : H(k) → PGLn (k) defined over k, such that for any  ∈ 0, 2r there is g ∈ Π for which χ(g) ∈ H(0) (k) and φ ◦ χ(g) acts as an (r, )-very proximal transformation on P(k n ). Let ρ := φ ◦ χ : Π → PGLn (k). Setting K = k ⊗f F , the absolute value on the local field k extends to an absolute value on the extension field K [Lan02, XII, 4, Th. 4.1, p. 482]. The new field K is not locally compact any more and if the original field k was non-Archimedean then the corresponding extension of the discrete valuation to K is a real valuation that need no longer be discrete. However K is still a complete valued field. The representation φ, defined as it is over k, extends to a representation which we will still call by the same name φ : H(K) → PGLn (K) which gives rise to an extension ρ = φ ◦ χ : Γ → PGLn (K). 4.3. Definition of the stabilizer topology and the main technical theorem. Let χ : Γ → GLn (F ) be the group representation given in Theorem 1.14. We fix all the notation defined in Subsection 4.2 and in particular the projective representation ρ : Γ → PGLn (K). The relevant class of invariant random subgroups appearing in Theorem 1.14 is: IRSχ (Γ) = {µ ∈ IRS(Γ) | χ(∆) 6= hei for µ-almost every ∆ ∈ Sub(Γ) } Note that by the construction of the projective representation in the previous section ker(ρ) = ker(χ) so we can equivalently refer to the above class as IRSρ (Γ). Let E f.g. be the collection of finitely generated IRSχ -essential subgroups. Namely these subgroups that are finitely generated and µ-essential for some µ ∈ IRSχ . Clearly this countable collection of subgroups covers IRSχ . All of our main theorems will follow from the following theorem asserting the existence of a sufficiently good refinement of this cover. The following theorem is the main technical theorem of the current paper, we defer its proof to the following chapter. INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 21 Theorem 4.5. There exists a collection of subgroups H = {Θ1 , Θ2 , . . .} ⊂ E f.g. and a list of elements {f (p, q, γ) | p, q ∈ N, γ ∈ Γ} with the following properties. (1) E f.g. <IRSχ H, (see Definition 3.2). (2) {f (p, q, γ) | p, q ∈ N, γ ∈ Γ} are independent. (3) f (p, q, γ) ∈ Θq γΘp , ∀p, q ∈ N, γ ∈ Γ. Theorem 4.5 enables us to define a basis of identity neighborhoods that will give rise to the stabilizer topology. As discussed right before Theorem 2.8, we can define a group topology by fixing a conjugation invariant sub-basis SB ⊂ Sub(Γ) of identity neighborhoods consisting of subgroups. A basis for the  topology near the identity will consist of finite intersections of the form Base = ∩M i=1 ∆i | ∆i ∈ SB . Hence the resulting topology will be discrete if and only if there are subgroups {∆1 , ∆2 , . . . , ∆M } ⊂ SB with ∩M i=1 ∆i = hei. Definition 4.6. Let Γ be a countable group. Given any collection of subgroups H ⊂ Sub(Γ), the recurrent sub-basis associated with H is the collection of all subgroups  SBH := ∆ ∈ Rec(Γ) | ∀γ ∈ Γ, ∃Θ ∈ H such that Θ < γ∆γ −1 . We denote by BaseH and τH the basis of identity neighborhoods and topology constructed from SBH respectively. If H covers then this construction gives rise to a topology for which almost every subgroup is open. Proposition 4.7. (Almost every subgroup is open) Let Γ be a countable group I ⊂ IRS(Γ) and H ⊂ Sub(Γ) a family of subgroups that covers I. Then for every µ ∈ I, µ-almost every subgroup hei 6= ∆ ∈ Sub(Γ) is open with respect to the topology τH . Proof. Fix µ ∈ I, we will actually show that µ-almost every subgroup is in SBH . The proof that µ almost every subgroup is recurrent is identicalSto the one given  in Corollary 2.5. By our assumption that H covers µ so that µ Env(Θ) = 1. Θ∈H T  −1  S Consequently µ = 1, because Γ is countable and µ γ∈Γ γ Θ∈H Env(Θ) γ is invariant. This completes the proof as we have shown that the two conditions for being in SBH are satisfied almost surely.  4.4. A proof that the main theorem follows from the existence of a good cover. In this section we prove Theorem 1.14 assuming Theorem 4.5. The rest of the paper will be dedicated to the proof of the latter. Proof. (of Theorem 1.14 assuming Theorem 4.5). Let χ : Γ → GLn (F ) be as in Theorem 1.14 and apply Theorem 4.5 which gives rise to the covering family H and the independent set {f (p, q, γ)}. Now: • Construct the stabilizer topology by setting Stχ := τH , • Construct the free group by setting F = hf (p, q, γ) | p, q ∈ N, γ ∈ Γi. It follows from Proposition 4.7 that µ-almost every subgroup is open in this topology for every µ ∈ IRSχ (Γ). We first verify the equation appearing in property χ-Me-Dense: F ∆ = Γ, ∀µ ∈ IRSχ (Γ) and for µ-almost every ∆ ∈ Sub(Γ). Fix µ ∈ IRSχ and some γ ∈ Γ. By Property (1) of Theorem 4.5, for µ-almost every ∆ ∈ Sub(Γ) there is a p ∈ N such that Θp < ∆. Since µ is conjugation invariant, 22 YAIR GLASNER there is also almost surely some q ∈ N such that γ −1 Θq γ < ∆. Set f = f (p, q, γ). Now by Property (3) f = θq γθp for some θp ∈ Θp , θq ∈ Θq so that we can write   γ = f θp−1 γ −1 θq−1 γ ∈ f Θp γ −1 Θq γ ⊂ f ∆ ⊂ F ∆. Note that this does not show that F is dense in the stabilizer topology. Proving χ-Non-Disc of the theorem will also show that this topology is non discrete. First note that for every p the group Θp ∩ F is a nonabelian free group as it contains the free group hf (p, p, θ) | θ ∈ θp i < Θ ∩ F . To proceed we have to show TJ that for every every basic open set of the form j=1 ∆j where {∆1 , . . . , ∆J } ⊂ SB contains a nontrivial element of F . This is proved in precisely the same way as Theorem 2.8, only we have to take care that the elements δj appearing in that proof satisfy δj ∈ ∆j ∩ F . Let µ1 , µ2 ∈ IRSχ (Γ). By Proposition 4.7 µi -almost every subgroup of Γ is open. Thus for µ1 × µ2 almost every pair (∆1 , ∆2 ) ∈ Sub(Γ)2 both subgroups are open and by the previous paragraph, so is their intersection ∆1 ∩ ∆2 . This immediately implies that µ1 ∩ µ2 ∈ IRSχ (Γ), where µ1 ∩ µ2 is the intersection IRS defined in Subsection 1.3. To establish property χ − Isom we have to show that the restriction map is an isomorphism. Φ : (Sub(Γ), µ) → (Sub(F ), µ|F ) ∆ 7→ ∆ ∩ F This is clearly a measure preserving F -invariant surjective map. By Souslin’s theorem [Kec95, Corollary 15.2] it is enough to show that Φ is essentially injective on Sub(Γ). In other words we wish to show that Φ(∆) 6= Φ(∆0 ) for µ × µ almost every (∆, ∆0 ) ∈ Sub(Γ)2 such that ∆ 6= ∆0 . Applying Theorem 4.5 (1), we conclude that µ × µ-almost surely there is some Θ ∈ H with Θ < ∆ ∩ ∆0 . Since by assumption ∆ 6= ∆0 , after possibly switching the roles of ∆, ∆0 we can find an element δ ∈ ∆ \ ∆0 . Repeating the argument from the proof for property χ-Me-Dense, we can find a non-trivial element of F in the coset f ∈ F ∩ δΘ ⊂ F ∩ δ(∆ ∩ ∆0 ) = (F ∩ ∆) ∩ (F ∩ δ∆0 ). Since two cosets of the same group are disjoint f ∈ (F ∩∆)\(F ∩∆0 ) = Φ(∆)\Φ(∆0 ); establishing the injectivity.  Note 4.8. The dynamical interpretation of the argument used in the proof of property χ-Me-Dense, that was used twice in the above proof is as follows. By Lemma 1.6 every µ ∈ IRSχ arises as the point stabilizer of a probability-measure preserving action Γ y (X, B, µ). Since H covers we can find, for every γ ∈ Γ and for almost every x ∈ X, some p, q such that Γx > Θp and Γγx > Θq . Hence γx = θq γθp x, ∀θp ∈ Θp , θq ∈ Θq . Theorem 4.5 above provides a free subgroup with generators in each and every one of these double cosets. Thus for every probabilitymeasure preserving action of Γ with the property that χ(Γx ) 6= hei almost surely, Γ and F have the same orbits almost surely. 5. The construction of a good cover Finally we arrive at the proof of Theorem 4.5. The proof proceeds in a few steps in which we construct successive refinements for our cover of the collection IRSχ . INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 23 5.1. A cover by infinite subgroups. Our first goal is to show that IRSχ (Γ) admits a cover by essential subgroups whose ρ-image is infinite. This now follows as a direct corollary of the Bader-Duchesne-Lécureux Theorem [BDL]. In this section we show how. The following two sections are dedicated to my original construction of such a cover, which is geometric and of independent interest. Fix µ ∈ IRSχ (Γ) and assume by way of contradiction that there is no such essential cover. In this case we shall further assume that |ρ(H)| < ∞ for every µ-essential subgroup - just by conditioning on the event: {∆ ∈ Sub(Γ) | |ρ(H)| < ∞, ∀H ∈ E(µ) ∩ Sub(∆)} which we assumed has positive probability. The locally essential lemma 2.3 now implies that ρ(∆) is locally finite, and in particular amenable, µ-almost surely. Now by the Bader-Duchesne-Lécureux theorem the IRS is contained in the amenable radical A(Γ) almost surely, and the latter is trivial by Lemma 4.1. 5.2. A geometric construction of an infinite cover. In this section we assume either that char(F ) = 0 or that Γ is finitely generated. Countable, non finitely generated groups in positive characteristic will be treated separately in the next section. As in the previous section it is enough to prove that the only µ ∈ IRSχ (Γ) supported on locally finite subgroups of Γ is the trivial IRS. Given such µ, it follows from the theory of linear groups that there exists a number M such that ρ(∆) admits a subgroup Λ(∆) of index at most M that fixes a point s(∆) ∈ P(k n ), almost surely. Indeed if Γ is linear in characteristic zero then every locally finite subgroup is virtually abelian, with a bound on the index of the abelian subgroup by Schur’s theorem [Weh73, Corollary 9.4] and the claim follows from Mal’cev’s Theorem [Weh73, Theorem 3.6]. If Γ is finitely generated it follows from [Weh73, Corlloary 4.8] that there is a bounded index subgroup consisting of unipotent elements, which is therefore unipotent. Let g ∈ Γ be any element whose ρ image is very proximal and also satisfies the condition r > c1 2/3 appearing in Lemma 3.6. The existence of one such element is guaranteed at the end of Subsection 4.2. Adhering to the notation set in Subsection 3.2 we donate by v g , H g , v g−1 , H g−1 the canonical attracting points and repelling hyperplanes of g, g −1 respectively. We claim that ρ(γ) fixes v g for every essential element γ ∈ Γ. Indeed, by the definition of an essential element, Env(γ) := {∆ ∈ Sub(Γ) | γ ∈ ∆} is a set of positive measure. Thus by Poincaré recurrence, for almost all ∆ ∈ Env(γ) the sequence of return times   N (∆, Env(γ)) = nk | g nk ∆g −nk ∈ Env(γ) = nk | g −nk γg nk ∈ ∆ , is infinite. Fix such a recurrent point ∆ ∈ Env(γ) which is, at the same time, locally finite. Many such exist because both properties hold with probability one the first by Poincaré recurrence, the second by the locally essential lemma 2.3. Now we follow the dynamics of the same elements on the projective space. Let Λ = Λ(∆) < ∆ be the finite index subgroup of ∆ fixing the point , s = s(∆) ∈ P(k n ) as constructed in the beginning of this section. Let Ω := ∆ · s be the (finite) orbit n→∞ of this point. Assume first that Ω ∩ H g = ∅. In this case ρ(g n )ω −→ v g for every ω ∈ Ω and consequently 24 YAIR GLASNER  ρ(γ)(v g ) = ρ(γ) =  lim ρ (g nk ) s k→∞ lim ρ g nk g −nk γg nk k→∞  s ∈ lim ρ (g nk ) Ω = {v g } . k→∞ Consider now the general case when Ω ∩ H g 6= ∅. In the next two paragraphs we will exhibit a sequence of very proximal elements gn who satisfy Ω ∩ H gn = ∅, and limn→∞ v gn = v g . By the previous paragraph the essential element γ fixes v gn and since the fixed point set of ρ(γ) is closed we conclude that ρ(γ)v g = v g . As desired. We can find an element σ ∈ Γ such that the following conditions hold: • ρ(σ)(Ω) ∩ H g = ∅. • ρ(σ)v g 6∈ H g . • ρ(σ −1 )v g−1 ∈ 6 H g−1 . Indeed we will even find such an element in Γ(0) - the intersection of Γ with the connected component of its Zariski closure. The strong irreducibility of ρ(Γ) is equivalent to the irreducibility of ρ(Γ(0) ) (see Definition 3.9). Thus for every ω ∈ P(K n ) the collection Dω := {σ ∈ Γ(0) | ρ(σ) · ω 6∈ H g } is non empty and Zariski open. Since Γ(0) is Zariski connected the sets Dω are open and dense. A similar dense open set can be constructed for the last condition E := {σ ∈ Γ(0) : ρ(σ −1 )v g−1 6∈ H g−1 }. Our desired element can be chosen as any element in the intersection σ ∈ (∩ω∈Ω Dω ) ∩ Dvg ∩ E. Having chosen such a σ we let d be the minimal distance attained in all the above relations, namely:    d ρ(σ)ω, H g > d ∀ω ∈ Ω, d ρ(σ)v g , H g > d, d ρ(σ −1 )v g−1 , H g−1 > d. Now consider the sequence of elements gn := g n σ. If A(g n ), R(g n ), A(g −n ), R(g −n ) are attracting and replying neighborhoods for ρ(g n ) then A(gn ) = A(g n ), R(gn ) = ρ(σ −1 ) (R(g n )), A(gn−1 ) = ρ(σ −1 ) (A(g −n )), R(gn−1 ) = R(g −n ) will be attracting and repelling neighborhoods for gn . For large enough values of n we can assume that the original neighborhoods are arbitrarily small A(g n ) ⊂ (v gn ) = (v g ) , R(g n ) ⊂ (H g ) , etc’. Where (·) stands for the -neighborhood. In particular if d is the bound constructed in the previous paragraph and we choose n large enough so that d > /2. The above inequalities will imply immediately that Ac(gn ) ∩ R(gn ) = A(gn−1 ) ∩ R(gn−1 ) = R(gn ) ∩ Ω = ∅ The first two ensure that ρ(gn ) is again very proximal. The last one shows that Ω ∩ A(gn ) = ∅ for every n ≥ N . Thus as mentioned above we have ρ(λ)v gn = v gn and passing to the limit this completes the proof that v g is fixed by all essential elements. Since the representation ρ : Γ → GLn (K) is strongly irreducible Lemma 3.13 yields n + 1 points in general position in the orbit {γ0 v g , γ1 v g . . . , γn v g }. Since γi v g is the attracting fixed point for the very proximal element γi gγi−1 , the above proof implies that all of these n + 1 points are fixed by every essential element γ ∈ Γ. By Lemma 3.12 ρ(γ) is trivial for every essential element. Finally the locally essential lemma 2.3 implies that ρ(∆) = hei for µ-almost every ∆ contradicting our assumption µ ∈ IRSχ . INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 25 5.3. Finitely generated groups in positive characteristic. Here we treat the case where the group Γ is linear in positive characteristic and non finitely generated. Just as in the previous section it is enough to prove that the only µ ∈ IRSχ (Γ) supported on locally finite subgroups of Γ is the trivial IRS. The geometric strategy employed in the previous section to show that such IRS cannot exist is quite general. Loosely speaking two geometric properties of the action on the projective plane were used: (1) Every locally finite subgroup fixes a point (or a finite number thereof) (2) There are enough proximal elements The problem is that when Γ is linear over a field of positive characteristic and, at the same time, fails to be finitely generated the action on the projective space P(K n ) no longer satisfies condition (1) above. For example if F < K is a locally finite field then PGLn (F ) < PGLn (K) is locally finite, but does not fix any projective point in P(K n ). We assumed explicitly that ρ(Γ) is not an amenable group and in particular it cannot be of this form. Still ρ(Γ) may contain many such locally finite subgroups and we have to show that the IRS is not supported on these. We will use the action of PGLn (K) on its (affine) Bruhat-Tits building X = X(K n ) and show that X does satisfy the desired conditions. Note that in this generality the building X is neither locally finite nor simplicial. This is due, respectively, to the facts that the residue field might no longer be finite and the value group might fail to be discrete. Bruhat-Tits buildings in this generality were treated by Brhuat-Tits [BT72, BT84] but a geometric axiomatization of such affine buildings was given only later in the thesis of Anne Parreau [Par00]. We will follow the notation in the excellent survey paper [RTW14, Section 1]. In particular we set V = K n and denote by N (V, K)diag the set of all diagonalizable non-Archimedean norms on V (these are discussed in some detail in [Wei95]) and we identify the building X = X (V, K) = N (V, K)diag / ∼ with the collection of all such norms modulo homothety k·k ∼ c k·k , c > 0. P A norm is diagonalized by a basis e = {e1 , . . . , en } of V, if it is of the form k ai ei kc = maxi {eci |ai |} for some vector c = (c1 , . . . , cn ). Thus the collection of all norms diagonalized by a given basis is identified with {k·kc | c ∈ Rn } ∼ = Rn . The image of these Euclidean spaces in X (V, K) are the apartments of the building, they are n − 1 dimensional spaces of the form Ae = Rn /h(1, 1, . . . , 1)i. The important features for us are that the building X is still a CAT(0) space (see [RTW14, Section 1.1.3]) and it still has a finite dimensional Tits boundary. In fact, since the base field is complete, the boundary ∂X is naturally identified with the spherical building of PGLn (K). Recall that the zero skeleton ∂X 0 of the spherical building consists of non-trivial proper subspaces of V . The higher dimensional simplexes correspond to flags of such subspaces. We will say that a vertex of ∂X is of type i if it corresponds to an i-dimensional subspace. These conditions are important because they are exactly these needed for the following theorem of Caprace-Monod. Proposition 5.1. ([CM09, Corollary 3.4]) Let X be a CAT(0) space with finite dimensional Tits boundary. Then every locally finite group acting on X fixes a point in X t ∂X. Thus we may assume that almost every ∆ ∈ Sub(Γ) fixes some point s(∆) ∈ X t ∂X. Since the action of PGLn (K) on ∂X preserves types we may, and shall, 26 YAIR GLASNER assume that whenever s(∆) ∈ ∂X then it is actually a vertex in the spherical building, of type i(∆). Let us write µ as a convex combination of IRS with disjoint supports as follows µ = cX µX + c1 µ1 + cH µH where: • µX -almost every ∆ ∈ Sub(Γ) has a fixed point inside X. • µ1 -almost every ∆ ∈ Sub(Γ) does not have a fixed point in X but it does fix a vertex of type 1 in ∂X. • µH -almost every ∆ ∈ Sub(Γ) fixes neither a point in X nor a vertex of type 1 in ∂X. So that s(∆) ∈ ∂X is a vertex of higher type. For µX almost very ∆ ∈ Sub(Γ) we insist that s(∆) ∈ X. Similarly for µ1 almost every ∆ we take s(∆) to be a vertex of type 1. We will treat each of these measures separately. Note that only µX can be trivial as the other two give measure zero to the trivial group. Therefore what we have to prove is that µX ({hei}) = 1 and that the other two measures cannot exist and hence cX = 1, c1 = cH = 0. The measure µ1 is easiest, µ1 -almost every ∆ ∈ Sub(Γ) fixes a point in P(V ) and we argue exactly as in the previous section. For µX the argument is very similar. Let g ∈ Γ be an element whose ρ image is (r, )-very proximal with attracting point v g and repelling hyperplane H g in the projective plane P(V ). Let ṽg = hvg i ∈ ∂X be the associated g fixed point in the spherical building ∂X. ρ(g) will act as a hyperbolic isometry on the building X. Just as in the previous section it would be enough to show that ṽg , and hence also v g is fixed by every µX -essential element γ ∈ Γ. Pick ∆ ∈ Env(γ) that is simultaneously locally finite and recurrent in the sense that g −n γg n ∈ ∆ infinitely often. Let s = s(∆) ∈ X be the corresponding fixed point. The element ρ(g) acts as a hyperbolic element on X with attracting point ṽg ∈ ∂X. Thus for every sequence ni ∈ N (∆, Env(hγi), g) the sequence ρ(g ni )s i→∞ consists of ρ(∆) fixed points converging to the attracting point ρ(g ni )s → ṽg . We conclude using the fact that set of ρ(γ) fixed points is closed. We turn to µH , which is the hardest of the three. The following Lemma shows that µH cannot be supported on totally reducible subgroups. We first recall the definition. Definition 5.2. A subspace of V is called totally reducible if it decomposes as a direct sum of irreducible ρ(∆) modules. We say that ρ(∆) is totally reducible if V itself is totally reducible as a ρ(∆) module. Lemma 5.3. Let K be a complete valued field, ∆ a locally finite group and ρ : ∆ → PGLn (K) a totally reducible representation, all of whose irreducible components are of dimension ≥ 2. Then ρ(∆) fixes a point in the affine Bruhat-Tits building X of PGLn (K). Proof. Assume that V = W1 ⊕ W2 ⊕ . . . ⊕ Wl is the decomposition into ρ(∆)irreducible representations. Since each Wi is of dimension at least two we consider the affine building Y = Y1 × Y2 × . . . × Yl corresponding to the group PGL(W1 ) × PGL(W2 ) × . . . × PGL(Wl ). The boundary of this product is the spherical join of the boundaries of the individual factors ∂Y = ∂Y1 ∗ ∂Y2 ∗ . . . ∗ ∂Yl , see [BH99, Definition 5.13, Corollary 9.11]. ∂Y embeds as a sub-building of ∂X. Since the group ρ(∆) preserves the direct sum decomposition, it acts on this building. Being locally finite as it is, Proposition 5.1 implies that ρ(∆) has a fixed point in Y ∪ ∂Y . If the fixed point is on the boundary we may assume again that it is a vertex; INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 27 but ∂Y 0 = ∂Y10 t . . . t ∂Yl0 so that in fact we have a fixed vertex in ∂Yi for some i. This corresponds to a proper invariant subspace of Wi which is impossible since the action of ρ(∆) on Wi is irreducible. So there is a ρ(∆) fixed point y = (y1 , y2 , . . . , yl ) ∈ Y . Each yi corresponds to a homothety class of norms, let k·ki be a norm on Wi representing this homothety class. Consider the subspace of X consisting of all homothety classes of norms that coincide with these fixed norms on each Wi . R = {k·k ∈ N (V, K)diag | ∃(d1 , d2 , . . . , dl ) ∈ Rl s.t. kwk = edi kwki ∀w ∈ Wi }/ ∼ This is clearly a convex ρ(∆) invariant subset of the building isometric to a Euclidean space of dimension l − 1. Since ρ(∆) fixes l points on the boundary of this Euclidean space it must fix the whole boundary. Hence it acts on R by translations. This give a homomorphism ρ(∆) → Rl−1 which must be trivial as ρ(∆) is locally finite. Thus ρ(∆) fixes R pointwise and in particular it fixes many points in X in contradiction to our definition of the measure µH . This last argument is illustrated in figure 1, inside one apartment, of the simplicial building associated with PGL4 (k) over a local field. The basis corresponding to this apartment {e1 , e2 , e3 , e4 } was chosen to respect the splitting W1 = he1 , e2 i, W2 = he3 , e4 i as well as the individual fixed norms, which are here just the standard norms on these two subspaces. As is customary in the simplicial setting the homothety classes of norms are represented by homothety classes of unit balls with respect to these norms. The vertices thus correspond to lattices over the integer rings. he1 , e2 , e3 i W1 = he1 , e2 i he2 , e3 , e4 i (pe1 , e2 , e3 , e4 ) (e1 , e2 , e3 , e4 ) X he1 i ∂X R (pe1 , pe2 , pe3 , e4 ) (pe1 , pe2 , e3 , e4 ) he4 i W2 = he3 , e4 i Figure 1. An example of a ρ(∆) fixed subspace R within an apartment in the building of PGL4 (Qp ).  We will now aim at a contradiction, to the existence of µH , by showing that µH almost every subgroup is totally reducible. As in Proposition 4.7, the locally essential lemma 2.3 combined with Poincaré recurrence show that µH almost every subgroup is locally essential recurrent . It is a well known fact from ring theory that the a module is totally reducible if and only if it is generated by its irreducible components (see for example [Weh73, 28 YAIR GLASNER Theorem 1.4]). Thus the subspace W = W (∆) < V generated by all the irreducible submodules of ρ(∆) is a maximal ρ(∆)-totally reducible submodule. Assume toward contradiction that W 6= V is not the whole space. We start by finding a finitely generated subgroup with the same maximal totally reducible subspace Lemma 5.4. There is a finitely generated subgroup Σ < ∆ such that W is also a maximal totally reducible ρ(Σ)-module. Proof. Let W = ⊕i Wi be the decomposition of Wi into irreducible representations. Let Σ1 < Σ2 < . . . be finitely generated subgroups ascending to ∆. Within each Wi we can find some Wi,j < Wi which is irreducible as a ρ(Σj )-module. Furthermore we can clearly arrange that Wi,j ≤ Wi,j+1 , ∀i, j. By dimension considerations this process must stabilize. And it must stabilize with Wi,j = Wi , ∀j ≥ J since a module that is invariant under every Σj must be ∆-invariant too. Thus the maximal totally reducible subspace of ΣJ contains W . Now let U = W ⊕ U1 ⊕ . . . ⊕ Ul be the maximal totally reducible subspace for ρ(ΣJ ). For each Ui we can find some δi ∈ ∆ such that ρ(δ)Ui ∩ W 6= h0i. Thus none of the spaces Ui can be contained in the maximal totally reducible subspace for Σ := hΣJ , δ1 , δ2 , . . . , δs i and the maximal totally reducible subspace for this last group must be W itself.  ρ(Γ) contains a very proximal element g. Since ρ(Γ) is strongly irreducible we can assume, after possibly replacing g by a conjugate, that W 6< H g and v g 6∈ W . This immediately implies that lim d(ρ(g n )W, v g ) = 0. n→∞ In particular there exists some N ∈ N such that for every n > N we have W  hW, ρ(g n )W i. Now consider the measure preserving dynamics on Sub(Γ). Let Σ < ∆ is the finitely generated subgroup provided by Lemma 5.4. Since ∆ was chosen to be locally essential we know that µ(Env(Σ)) > 0. Now by the recurrence assumption the set of return times N (∆, Env(Σ), g) = {n ∈ N | g n ∆g −n ∈ Env(Σ)} is infinite. And for every such such return time n we have σρ(g n )W = ρ(g n )ρ(g −n σg n )W = ρ(g n )W ∀σ ∈ Σ. Moreover since conjugation by g induces an isomorphism between W and ρ(g n )W as Σ-modules the latter is again totally reducible. Thus if we choose n > N which is also in N (∆, Env(Σ), g) we have a subspace W 0 = hW, ρ(g)W i that is Σ-invariant, totally reducible as a ρ(Σ) module and strictly larger than W ; in contradiction to our construction of Σ. This contradiction finishes the proof. Z 5.4. A nearly Zariski dense essential cover. Let H = ρ(Γ) (K) be the K points of the Zariski closure of ρ(Γ) and H (0) the connected component of the identity in H. Our goal in this section is to find an essential cover by finitely Z generated subgroups Σ such that ρ(Σ) contains H (0) . For this fix µ ∈ IRSχ . As Z a first step we claim that ρ(∆) > H (0) almost surely (compare [ABB+ , Theorem 2.6]). Let h = Lie(H)(K) be the Lie algebra and Gr(h) the Grassmannian over h. By taking the Lie algebra of the random subgroup we obtain a random point in this INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 29 Grassmannian Ψ : Sub(Γ) ∆ → Gr(h) h  i Z 7→ Lie ρ(∆) The push forward of the IRS gives rise to a ρ(Γ)-invariant measure on Gr(h). Since ρ(Γ) is Zariski dense and H0 is simple, it follows from Furstenberg’s lemma [Fur76, Lemma 2] that such a measure can be supported only on the Γ(0) -invariant points {h, {0}}. By the previous subsection we already know that ρ(∆) is almost surely Z infinite so that in fact ψ(∆) = h almost surely. This means dim(ρ(∆) ) = dim(H). Z Hence ρ(∆) itself has to be a subgroup of maximal dimension and it contains H (0) - even in positive characteristic. By the results of Sections 5.1, 5.3 ρ(∆) is not locally finite almost surely. Since ρ(∆) has a simple Zariski closure this immediately implies that in fact it is not even amenable. Thus by Lemma 4.3 µ-almost every ∆ ∈ Sub(Γ) contains a finitely  Z (0) generated non-amenable subgroup Σ < ∆ with Σ > H (0) . As in the proof of Lemma 2.3 we can ignore these subgroups Σ which are not µ-essential and obtain the desired essential cover. 5.5. Abundance of very proximal elements. The goal of this section is to refine the essential cover we already have, to obtain a cover by groups which satisfy some desirable dynamical properties in their action on P(K n ). We focus on two properties: strong irreducibility of ρ(Σ) on P(K n ) and the existence of an element aΣ ∈ Σ with ρ(aΣ ) very proximal. Where Σ ranges over the essential group participating in the cover. The first property is automatic from what we have said so far as strong irreducibility of ρ : Σ → PGLn (K) is equivalent to the irreducibility of   Z (0) . We will refine the essential cover so the Zariski connected component ρ(Σ) that each of the covering subgroups will contain a very proximal element. So far we have a cover by all finitely generated essential subgroups Σ that satisfy Z the following conditions (i) non-amenable and (ii) satisfy Σ > H (0) (iii) ρ(Σ) is strongly irreducible. Since both these conditions are monotone Lemma 3.4 implies that it is enough to find, for every such essential subgroup Σ, a larger essential subgroup Σ < Θ containing such a very proximal element. By Lemma 3.11, in order to establish the existence of a very proximal element, it is enough to find an element with a small enough Lipschitz constant on an arbitrarily small open set. Let (0 , r0 , c0 ) = ((Σ), r(Σ), c(Σ)) be the constants, governing the connection between the proximality and Lipschitz constants, provided by that Lemma. Recall also that we have fixed an (r, )-very proximal element g ∈ Π together with our linear representation. Since Σ is strongly irreducible, there exists an element x ∈ Σ such that x moves the attracting point v g−1 of g −1 outside the repelling hyperplane H g of g. Set d = d(xv g−1 , H g ) to be the projective distance between the two. Now consider the element y = g m xg −m , We claim that if m > m0 for some m0 then y is 0 -Lipschitz on a small neighborhood of v g−1 . It follows from Lemma 3.6 that for a large enough m the element ρ(g −m ) is η-very proximal with the same attracting point and repelling hyperplane as ρ(g −1 ); 30 YAIR GLASNER where η > 0 can be chosen arbitrarily small. By Lemma 3.8 ρ(g −m ) is C1 η 2 Lipschitz on some small open neighborhood O, away from H g−1 , for some constant C1 depending only on ρ(g).  If we take O to be small enough and m large enough then d ρ(xg −m )(O), H g > d/2. By Lemma 3.8 again, the element ρ(g mj ) is C2 2 -Lipschitz on ρ(xg −m )(O). Now since ρ(x) is bi-Lipschitz with some constant C3 depending on ρ(x), it follows that ρ(y) = ρ(g m xg −m ) is C4 4 -Lipschitz on O, −1/3 where C4 depends only on ρ(g) and ρ(x). If we require also 0 ≤ C4 then ρ(y) is 0 -Lipschitz on O as we claimed. The dynamics of the action of the element ρ(g m xg −m ) on P(K n ) is depicted on the left side of Figure 2. P(K n ) v g− 1 Sub(Γ) −1 ) A(g gm Env(Σ) O g Env(Θ) g H g−1 x Hg g −m A(g) g g vg Figure 2. The dynamics of ρ(g m xg −m ) on the P(K n ) and Sub(Γ). Now we analyze the action of the same element g m xg −m on Sub(Γ). Poincaré recurrence yields infinitely many values of m for which   µ Env(Σ) ∩ Env(g m Σg −m ) = µ Env(hΣ, g m Σg −m i) > 0. We choose m ∈ N for which this is true and at the same time the reasoning of the previous paragraph applies so that y = g m xg −m is 0 -Lipschitz contained in the essential subgroup Θ := hΣ, g m Σg −m i. Since by assumption ρ (Σ) is strongly −1 irreducible f2 ∈ Θ 1y √ Lemma 3.11 provides elements f1 , f2 ∈ Σ such that aΘ := yf ± 0 0 0 is (r , c  )-very proximal. Which completes the proof. Let A(aΘ ), R(a± Θ ) be attracting and repelling neighborhoods for the elements we have just constructed. By our construction all the groups Θ are again finitely generated, as they are generated by two finitely generated subgroups. Hence if   ρ(Θ) is strongly irreducible       Z (0) F := Θ ∈ E ∃a ∈ Θ with ρ(a) very proximal and ρ(a) ∈ ρ(Θ)     Θ is finitely generated We have just shown that F covers IRSχ (Γ). 5.6. Putting the very proximal elements {aΣ } in general position. In the construction of the very proximal elements {aΣ | Σ ∈ F} in Subsection 5.5 no connection was established between these different elements. As a first step towards arranging them we would like, each one of them separately, to form a ping-pong pair with our fixed very proximal element g ∈ Γ. Moreover we would like this to be realized with repelling and attracting neighborhoods: ±1 R(g ±1 ), A(g ±1 ), R(a±1 Σ ), A(aΣ ), INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 31 such that R(g ±1 ), A(g ±1 ) are independent of Σ. This will be done, at the expense of refining the cover again G <IRSχ (Γ) F. Let h ∈ Π be any very proximal element satisfying the ping-pong lemma conditions with g. Assume that R(g ±1 ), A(g ±1 ), R(h±1 ), A(h±1 ) are the corresponding attracting and repelling neighborhoods. For the sake of this proof only we will call an element h0 good if it is very proximal with attracting and repelling neighborhoods contained in these of h as follows: A(h0±1 ) ⊂ A(h), R(h0±1 ) ⊂ R(h−1 ). Such a good element is indeed good for us: the pair {h0 , g} satisfies the conditions of the ping-pong lemma, with the given attracting and repelling neighborhood. Let G ⊂ F be the collection of essential subgroups in F that contain a good element. Since F is monotone Lemma 3.4 implies that it is enough to show that any given Σ ∈ F is contained in a larger subgroup Θ ∈ G. So fix Σ ∈ F and let a = aΣ be the associated very proximal element with attracting and repelling ±1 neighborhoods A(a±1 Σ ), R(aΣ ). We can always assume that a, h are in general position with respect to each other, that is to say that some high enough powers of them play ping-pong. Indeed conjugation just moves the attracting points and repelling hyperplanes around v σa± σ−1 = ρ(σ)v a± , H σa± σ−1 = ρ(σ)H a± , and since by assumption Σ is strongly irreducible we can choose σ ∈ Σ that will bring a to a general position with respect to h. Now as a, h are in general position we claim that hl ah−l is good for any sufficiently large l. This is statement is clear upon observation that A(hl a± h−l ) = ρ(hl )A(a± ) R(hl a± h−l ) = ρ(hl )R(a± ) Consider for example the second equation. Since a and h are in general position  we know that d v h−1 , R(a) ∪ R(a−1 ) > 0. Since h satisfies the conditions of −l −1 Lemma 3.6 we can choose  l large enough so that A(h ) ⊂ (v h )d/2 and hence −l −1 A(h ) ∩ R(a) ∪ R(a ) = ∅. Now the equation above implies that  R(hl a± h−l ) = ρ(hl )R(a± ) ⊂ ρ(hl ) P(k n ) \ A(h−l ) ⊂ R(hl ) ⊂ R(h).  Where the inclusion before last follows from the fact that ρ(h−l ) P(k n ) \ R(hl ) ⊂ A(h−l ). The second case follow in a similar fashion. On the space Sub(Γ) we repeat the argument from the previous section. By Poincaré recurrence the group Θ := hΣ, hl Σh−l i is again essential for infinitely many values of l. We choose one such value to make Θ essential and at the same time large enough so that aΘ := hl ah−l is good. This completes the proof that G covers IRSχ (Γ), where G is the set   ρ(Θ) is strongly irreducible       Z (0) Θ ∈ F ∃a ∈ Θ with ρ(a) good, very proximal and ρ(a) ∈ ρ(Θ) .     Θ is finitely generated The following proposition gives a good idea of the possible use we can make of such a cover in the construction of free groups: Proposition 5.5. Assume that g and {aΘ | Θ ∈ G} are very proximal elements as constructed above. Namely they admit attracting and repelling neighborhoods ± A(g ± ), R(g ± ), A(a± Θ ), R(aΘ ) such that for every Θ ∈ G the elements {aΘ , g} satisfy the conditions of the ping-pong lemma 3.7 with respect to the given neighborhoods. 32 YAIR GLASNER Then for every map ψ : Z → G the elements  i g aψ(i) g −i | i ∈ N , satisfy the conditions of the ping-pong lemma and are therefore independent. Proof. Consider the closed sets  D̂ := P(k n )\ A(g) ∪ A(g −1 ) ,  D := P(k n )\ A(g) ∪ A(g −1 ) ∪ R(g) ∪ R(g −1 ) , These satisfy the following properties: ± (1) A(a± Θ ) ∪ R(aΘ ) ⊂ D̂ ∀Θ ∈ G. ± (2) A(aΘ ) ⊂ D ∀Θ ∈ G. (3) ρ(g i )(D̂) ∩ ρ(g j )(D) = ∅, ∀i 6= j ∈ Z Indeed the first two properties follow directly from our ping-pong assumption on the pairs {g, aΘ }. As for the third property, after applying an appropriate power of ρ(g) and possibly changing i and j, we may assume without loss of generality that i = 0 and that j > 0; but ρ(g j )(D) ⊂ A(g) and D̂ ∩ A(g) = ∅. Now these three properties together imply the statement. Indeed given i 6= j ∈ Z we have to show that h i −i j ± −j −j A(g i a± ) ∪ R(g j a± ) =∅ ψ(i) g ) ∩ A(g aψ(j) g ψ(j) g   ± −i i But A(g i a± ⊂ ρ(g i )(D) while for a similar reason we ψ(i) g ) = ρ(g ) A(aψ(i) )   ± ± −j j ± −j j have A(g j a± g ) ∪ R(g a g ) = ρ(g ) A(a ) ∪ R(a ) ⊂ ρ(g j )(D̂) ψ(j) ψ(j) ψ(j) ψ(j) which concludes the proof by Property (3) above. A case that is particularly easy to visualize is the rank one situation where the very proximal elements exhibit a north-south type dynamics on the projective plane. The situation in this specific case is depicted in figure 3 below.  g 3 aψ(3) g −3 aΘ2 g g 2 aψ(2) g −2 aΘ3 aΘ1 gaψ(1) g −1 P n−1 (K) Figure 3. Arranging very-proximal elements into a ping-pong setting 5.7. Poincaré recurrence estimates for multiple measures. Before proceeding to the proof of Theorem 4.5. We will need the following quantitative version of Poincaré recurrence. Lemma 5.6. (Poincaré recurrence) Let (X, B, µ, T ) be a probability measure preserving action of Z = hT i, A ∈ B a set of positive measure and  > 0. Then there exists a number n = n(A, µ, ) ∈ N, such that for every N ∈ N we have !! N +n−1 [ µ A\ T iA < . i=N 33 Tail(6) INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS V1 V2 V3 V4 V5 V6 Figure 4. A Kakutani-Rokhlin tower  Proof. Let Vm = x ∈ A | T m x ∈ A, but T l x 6∈ A ∀1 ≤ l < m . Clearly these sets are measurable and disjoint. Poincaré recurrence implies that their union covers all of A up to µ-nullsets. This enables us to cover the forward hT i-orbit of Env(Σ) by a so called Kakutani-Rokhlin tower (see figure 5.7): ∪n∈N T n A = t t [V1 ]   V2 t T 1 V2   V3 t T 1 V3 t T 2 V3 t . . . Where all the sets are disjoint and equality is up to nullsets. Denoting the tail of this tower by   Tail(m) = [Vm+1 t . . . t T m Vm+1 ] t Vm+2 t . . . t T m+1 Vm+2 t . . . , we choose n = n(T, µ, ) to be the minimal number such that µ(Tail(n)) < . The lemma now follows from the obvious inclusion ! N +n−1 [ i A\ T A ⊂ T −N (Tail(n)). i=N  5.8. An independent set. We proceed to our last refinement: a collection H ⊂ G of finitely generated essential subgroups together together with a set of associated very proximal elements B := {bΘ ∈ Θ | Θ ∈ H} which satisfy the following two conditions: Ind: B = {bΘ | Θ ∈ H} forms an independent set. Cov: H covers IRSχ . To achieve this, we can no longer appeal to Lemma 3.4 as our new requirement Ind can no longer be verified one group at a time. To obtain an independent set we apply Proposition 5.5 with a function ψ : Z → G satisfying the following property: Rpt: For every (n, Σ) ∈ N × G there is some index N = N (n, Σ) such that ψ(i) = ψ(i + 1) = ψ(i + 2) = . . . = ψ(i + n − 1) = Σ. to obtain a sequence of subgroups Θj = hΣ, g j Σg −j i and an associated sequence of elements  bΘj = g j aψ(j) g −j ∈ Θj j∈N . Proposition 5.5 guarantees that the elements {bΘj | j ∈ N} form a ping-pong tuple and are hence independent. It is not necessarily true that every Θj is essential but 34 YAIR GLASNER to construct H and B we take only the indexes j for which this is the case: H = {Θj | j ∈ Z, Θj is µ − essential for some µ ∈ IRSχ } B = {bΘ | Θ ∈ H}. Clearly H ⊂ G. Indeed each Θ ∈ H is finitely generated as it is generated by two finitely generated subgroups; it is strongly irreducible as it contains a strongly irreducible subgroup and it contains the very proximal element bΘ . The independence condition (Ind) for the elements of B follows directly from Proposition 5.5. As for the covering condition (Cov), this is where our uniform estimates on Poincareé recurrence come into play. Fix Σ ∈ G,  > 0 and let µ ∈ IRSχ (Γ) be a measure according to which Σ is µ-essential. Usually there will be uncountably many such measures since H is merely countable while IRSχ (Γ) is not! Still we can apply Lemma 5.6 to the dynamical system (X = Sub(Γ), B, µ, g) and to the positive measure set A = Env(Σ). Let n = n(A, µ, ) = n(Σ, µ, ) be the constant given by that lemma so that for every N ∈ Z we have   N +n−1   [ µ Env(Σ) \ Env(hΣ, g j Σg −j i) < .   j=N By our construction of the function ψ there exists an index N = N (n, Σ) such that Θj = hΣ, g j Σg −j i ∈ H for every N (n, Σ) ≤ j ≤ N (n, Σ) + n − 1. Or at least for every such j such that Θj is essential. Since anyhow these that are non essential have envelopes of measure zero we have   ( ) N +n−1   [ [ µ Env(Σ) \ Env(Θ) ≤ µ Env(Σ) \ Env(Θj ) < .   j=N Θ∈H Since µ, , Σ are arbitrary we deduce that H covers IRSχ as promised. 5.9. Conclusion. Here we complete the proof of Theorem 4.5 thereby completing the proof of the main theorem. Let H = {Θ1 , Θ2 , . . .}, B = {b1 , b2 , . . .} be the groups and very proximal elements constructed in the previous section - with a new enumeration making the indices consecutive. No further refinement of H the collection of essential subgroups will be needed; what we do want is a much richer free subgroup containing representatives of all double cosets of the form Θq γΘp . For this fix a bijection N → N2 × Γ k 7→ (p(k), q(k), γ(k)) We proceed to prove Theorem 4.5 by induction on k. Assume that after k steps of induction we have constructed group elements {fi ∈ Γ | 1 ≤ i ≤ k} and a sequence of numbers {np (k) ∈ N | p ∈ N} with the following properties: • ρ(fi ) is very proximal for each 1 ≤ i ≤ k. • np (k) ≥ np (k − 1), ∀p ∈ N. • fi ∈ Θq(i) γ(i)Θp(i) , ∀1 ≤ i ≤ k. • The elements n (k) B(k) := {f1 , f2 . . . , fk , b1 1 n (k) , b2 2 , . . .}, form an (infinite) ping-pong tuple - satisfying the conditions of Lemma 3.7. INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 35 For the basis of the induction we take k = 0, np (0) = 1 and B(0) = B. Now assume that we already have all of the above for k − 1 and let us show how to carry out the induction. Set p = p(k), q = q(k), γ = γ(k). Since Θp , Θq ∈ H ⊂ G ⊂ F both these groups act strongly irreducibly on the projective space. So there exist elements x = x(k) ∈ Θp , y = y(k) ∈ Θq such that: 6∈ H bq v b−1 q 6∈ H b−1 p ρ(yγx)−1 v bq 6∈ H bp ρ(yγx)v bp ρ(yγx) −1 (5.1) ρ(yγx)v b−1 6∈ H b−1 p q   (0) Indeed the set of elements in Θp ∩ G × Θq ∩ G(0) that satisfy each one of the above conditions is Zariski open and non-trivial by the strong irreducibility. Hence their intersection is non-empty. We define fk := blq2 yγxblp1 , Denote by (·) an -neighborhood in P(k n ). We claim that for a small given  > 0 if l1 , l2 are large enough then there exists some 0 < 0 <  such that       ⊂ v bq 0 \ v bq 0 ρ(fk ) Pn−1 (k) \ H bp  \ H bp 0    i      h −1 −1 \ H b−1 ⊂ v \ v . (5.2) ρ(fk−1 ) Pn−1 (k) \ H b−1 b b q q q q 0 0     Indeed we can write ρ(fk ) Pn−1 (k) \ H bp      ⊂ ρ(blq2 yγx) v bp  1    l2 ⊂ ρ(bq ) ρ(yγx)v bp  2    n−1 l2 \ H bq  ⊂ ρ(bq ) P 2   ⊂ v bq  \ v bq 0 Where, since bp is very proximal, the first inclusion holds for arbitrarily small values of 1 , whenever l1 is large enough. Consequently 2 can be set arbitrarily small by continuity of ρ(yγx) on the projective plane. In view of the first line in Equation (5.1) we can choose 2 < 12 d ρ(yγx)v bp , H bq which accounts the third line. Now by choosing l2 to be large enough, blq2 becomes very proximal with attracting and repelling neighborhoods arbitrarily close to v bq and H bq respectively. In particular we can arrange for the image to be contained in (v bp ) as indicated. The fact that we can exclude from the image a ball of some positive radius 0 > 0 comes from the fact that v bq is a fixed point for the homeomorphism ρ(blq2 ) and that, by the above observations, we may assume that 2 < 21 d(H bq , v bq ). And on the other hand      ⊂ ρ(blq2 yγx) H bp 1 ρ(fk ) H bp 0    ⊂ ρ(blq2 ) ρ(yγx)H bp 2    ⊂ ρ(blq2 ) Pn−1 \ v bq 2   ⊂ v bq  \ v bq 0 36 YAIR GLASNER Figure 5. Final refinement Where the first equation can be satisfied, for arbitrarily small values of 1 , if we assume that 0 is small enough; by the fact that Hbp invariant under the continuous map blp1 and that the latter map admits some global Lipschitz constant on the whole of P(k n ). The second inclusion follows, for arbitrarily small values of 2 , using the Lipschitz nature of ρ(yγx) combined with the ability to bound 1 . Now using the third line in Equation 5.1 we can choose 2 < d(v bq , ρ(yγx)H bp ). Finally the last line follows from the previous one and from the fact that v bq is ρ(bq )-invariant. These last two calculations combine to yield the first Equation in 5.2. The second equation there follows in a completely symmetric fashion. Equations 5.2, applied to a small enough value of , imply the existence of 0 > 0 and l1 , l2 ∈ N such that ρ(fk ) becomes a very proximal element with attracting and repelling neighborhoods as follows:  R(fk ) ⊂ R(bp ) \ H bp 0  A(fk ) ⊂ A(bq ) \ v bq 0   R(fk−1 ) ⊂ R(b−1 q ) \ H b−1 q 0    −1 −1 . A(fk ) ⊂ A(bp ) \ v b−1 p 0 Since the elements bp , bq are very proximal, and in addition satisfy the conditions of Lemma 3.6, powers of them will have the same attracting points and repelling hyperplanes, and we can arrange for the attracting and repelling neighborhoods to be in arbitrarily small neighborhoods of these points and planes  respectively.  ±n (k) Thus choose np (k) > np (k − 1), nq (k) > nq (k − 1) that give rise to R br r ⊂       ±nr (k) H b± , A br ⊂ v b± , for every r ∈ {p, q}. For every other r ∈ N\{p, q} r r 0 0 we just set nr (k) = nr (k − 1). We leave it to the reader to verify that the induction holds. The only thing that really requires verification is the ping-pong conditions for: n (k) {f1 , f2 . . . , fk , b1 1 n (k) , b2 2 , . . . , bnp p (k) , . . . , bnp p (k) , . . . , }, which follows quite directly based only on the induction hypothesis and the specific ±n (k) ±n (k) repelling and attracting neighborhoods we have found for fk±1 , bp p , bq q . INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 37 Appendix A. A relative version of Borel density theorem - By Tsachik Gelander and Yair Glasner In this appendix we prove a relative version of the Borel Density Theorem for Invariant Random Subgroups in countable linear groups. Theorem A.1. (Relative version of the Borel density theorem) Let Γ < GLn (F ) be a countable linear group with a simple, center free, Zariski closure. Then every non-trivial invariant random subgroup ∆ 2 Γ is Zariski dense almost surely. Proof. We first claim that ∆ is either trivial or infinite almost surely. Assume that ∆ is finite with positive probability, in this case we may further assume that ∆ is finite almost surely by conditioning on the event Fin := {∆ | |∆| < ∞} ⊂ Sub(Γ). Since the invariant measure is supported on the countable set Fin, every ergodic component is a finite conjugacy class. Thus the IRS is supported on finite subgroups with finite index normalizers. Passing to the Zariski closure we conclude that [G : NG (∆)] < ∞ and since the normalizer of a finite group is algebraic NG (∆) > G(0) almost surely. Since G(0) is center free ∆ = hei. We apply Theorem 4.4 to the group Γ; obtaining a local field F < k, a faithful, unbounded, strongly irreducible projective representation ρ : G(k) → PGLn (k) defined over k. Let g = Lie(G) be the Lie algebra and Gr(g) the Grassmannian over g. By taking the Lie subalgebra corresponding to the Zariski closure of the random subgroup we obtain a random point in this Grassmannian Ψ : Sub(Γ) ∆ → Gr(g)(k)  Z 7→ Lie ∆ The push forward of the IRS gives rise to a ρ(Γ)-invariant measure on Gr(g). Since ρ(Γ) is unbounded, it follows from Furstenberg’s lemma [Fur76, Lemma 2], applied in each dimension separately, that such a measure is supported on a disjoint union of linear projective subspaces. However Γ itself is Zariski dense and G is simple, so the only (ergodic) possibilities are the Dirac δ measures supported on the trivial Z and the whole Lie algebra: {g, {0}}. In the first case ∆ is open and unbounded Z and hence equal to G (c.f. [Sha99]). In the second case ∆ is finite and hence trivial by the previous paragraph.  As a consequence we obtain an alternative direct proof of Corollary 1.10, which bypasses the main theorem of the paper, which we restate for the convenience of the readers. Corollary A.2. Let Γ < GLn (F ) be a countable linear group. If ∆ 2 Γ is an IRS in Γ that is almost surely amenable, then ∆ < A(Γ) almost surely. Proof. (of Corollary A.2) Let Γ be a linear group and ∆ 2 Γ an IRS that is almost surely amenable. We wish to show that ∆ < A(Γ) is contained in the amenable radical almost surely. At first we assume that Γ is finitely generated. Z If Γ < GLn (Ω) is linear over an algebraically closed field, let G = Γ be its  Q L Zariski closure, H = G/ Rad G(0) the semisimple quotient and H(0) = `=1 H` the decomposition of H(0) as a product of simple factors. Set h` = Lie(H` ) and 38 YAIR GLASNER consider the combined map: Ad G(0) −→ G(0) / Rad(G(0) ) −→ L Y GL(h` ) `=1 Applying this map to Γ(0) := Γ ∩ G(0) we obtain L different representations with simple center free Zariski closures. Let ∆(0) 2 Γ(0) be the restriction of the IRS to the Zariski connected component. For every 1 ≤ ` ≤ L we know by the previous paragraph that χ` (∆(0) )2χ` (Γ(0) ) is either trivial or Zariski dense. Assume by way of contradiction that the latter holds. This means that χ` (∆(0) ) does not admit any normal solvable subgroup, as its Zariski closure is simple. Since χ` (∆(0) ) is amenable, the Tits alternative [Tit72, Theorem 2] says that χ` (∆(0) ) is locally finite. Now we use for the first time our assumption that χ` (Γ(0) ) is finitely generated: By [Weh73, Corollary 4.8] it follows that the locally finite subgroup χ` (∆(0) ) contains a further finite index subgroup consisting only of unipotent elements - contradicting the assumption that χ` (∆(0) ) has a simple Zariski closure. Thus we have concluded that χ` (∆(0) ) = hei almost surely for every 1 ≤ ` ≤ L. Let A` = ker(χ` ∩ Γ(0) ). We have just proved that ∆(0) < S := ∩L `=1 A` . Thus if Φ : G → H = G/ Rad(G(0) ) is the map to the semisimple quotient then Φ(∆) 2 (Φ(Γ)) is an invariant random subgroup supported on finite subgroups. The same argument used earlier shows that Φ(∆(0) ) is centralized by H(0) . Thus ∆ is almost surely contained in the normal amenable subgroup Γ ∩ Φ−1 (ZH (H(0) )) which completes the proof in the finitely generated case. Assume now that Γ < GLn (F ) is not finitely generated and let Γ1 < Γ2 < . . . be a sequence of finitely generated subgroups ascending to the whole group. Applying restriction we obtain ∆i := ∆ ∩ Γi 2 Γi an IRS in Γi which is again, almost surely amenable. Since the group Γi is finitely generated we may deduce from the above paragraphs that ∆i is almost surely contained in A(Γi ). Since an essential element element in Γi is contained in ∆i with positive probability this means that every essential element in Γi is contained in A(Γi ). Now essential elements in Γ are eventually essential in Γi so, denoting by E the collection of essential elements in Γ we have [\ E ⊂ lim inf A(Γi ) := A(Γi ) n n i≥n lim inf A(Γi ) is amenable as an ascending union of amenable groups. It is also normal since if γ ∈ Γm then for every o ≥ max{m, n} we have ∩i≥n A(Γi ) ⊂ A(Γo ) so that γ (∩i≥n A(Γi )) γ −1 ⊂ γA(Γo )γ −1 = A(Γo ) and consequently   \ \ γ A(Γi ) γ −1 ⊂ A(Γi ). i≥n i≥max{m,n} Being an amenable normal subgroup lim inf n A(Γn ) is contained in the amenable radical A(Γ) which implies that every essential element is contained in A(Γ). Lemma 2.3, applied only to cyclic groups, shows that ∆ almost surely contains only essential elements, thus with probability one ∆ < A(Γ) and the Corollary is proved.  Acknowledgments. I am grateful for significant input from Miklós Abért, Peter Abramenko, Uri Bader, Tsachik Gelander, Eli Glasner, Dennis Osin, Robin INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 39 Tucker-Drob, Bálint Virág and Kevin Wortman. I thank the referee for many helpful comments. I thank Shalvia for going over the English. This work was written while I was on sabbatical at the University of Utah. I am very grateful to hospitality of the math department there and to the NSF grants that enabled this visit. The author acknowledges support from U.S. National Science Foundation grants DMS 1107452, 1107263, 1107367 “RNMS: Geometric structures And Representation varieties” (the GEAR Network). The author was partially supported by the Israel Science Foundation grant ISF 441/11. References [ABB+ ] Miklos Abert, Nicolas Bergeron, Ian Biringer, Tsachik Gelander, Nikolay Nikolov, Jean Raimbault, and Iddo Samet. On the growth of l2 -invariants for sequences of lattices in Lie groups. Preprint. [ABB+ 11] Miklos Abert, Nicolas Bergeron, Ian Biringer, Tsachik Gelander, Nikolay Nikolov, Jean Raimbault, and Iddo Samet. On the growth of Betti numbers of locally symmetric spaces. C. R. Math. Acad. Sci. Paris, 349(15-16):831–835, 2011. [AGV13] Miklós Abért, Yair Glasner, and Bálint Virág. The measurable Kesten theorem. To appear in Annals of Probability. arXiv:1111.2080, 2013. [AGV14] Miklós Abért, Yair Glasner, and Bálint Virág. Kesten’s theorem for invariant random subgroups. Duke Math. J., 163(3):465–488, 2014. [AL07] David Aldous and Russell Lyons. Processes on unimodular random networks. Electron. J. Probab., 12:no. 54, 1454–1508, 2007. [BDL] Uri Bader, Bruno Duchesne, and Jean Lécureux. Amenable invariant random subgroups. To appear in Israel Journal of Mathematics, arXiv:1409.4745. [Bek07] Bachir Bekka. Operator-algebraic superridigity for SLn (Z), n ≥ 3. Invent. Math., 169(2):401–425, 2007. [BG03] E. Breuillard and T. Gelander. On dense free subgroups of Lie groups. J. Algebra, 261(2):448–467, 2003. [BG04] N. Bergeron and D. Gaboriau. Asymptotique des nombres de Betti, invariants l2 et laminations. Comment. Math. Helv., 79(2):362–395, 2004. [BG07] E. Breuillard and T. Gelander. A topological Tits alternative. Ann. of Math. (2), 166(2):427–474, 2007. [BGKa] Lewis Bowen, Rostislav Grigorchuk, and Rostyslav Kravchenko. Characteristic random subgroups of geometric groups and free abelian groups of infinite rank. to appear in Trans. Amer. Math. Soc., arXiv:1402.3705. [BGKb] Lewis Bowen, Rostislav Grigorchuk, and Rostyslav Kravchenko. Invariant random subgroups of lamplighter groups. arXiv:1206.6780. [BH99] Martin R. Bridson and André Haefliger. Metric spaces of non-positive curvature, volume 319 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, 1999. [Bou60] N. Bourbaki. Éléments de mathématique. Première partie. (Fascicule III.) Livre III; Topologie générale. Chap. 3: Groupes topologiques. Chap. 4: Nombres réels. Troisième édition revue et augmentée. Actualités Sci. Indust., No. 1143. Hermann, Paris, 1960. [Bow] Lewis Bowen. Invariant random subgroups of the free group. To appear in Groups Geometry and Dynamics, arXiv:1204.5939. [Bow14] Lewis Bowen. Random walks on random coset spaces with applications to Furstenberg entropy. Invent. Math., 196(2):485–510, 2014. [BT72] F. Bruhat and J. Tits. Groupes réductifs sur un corps local. Inst. Hautes Études Sci. Publ. Math., 41:5–251, 1972. [BT84] F. Bruhat and J. Tits. Groupes réductifs sur un corps local. II. Schémas en groupes. Existence d’une donnée radicielle valuée. Inst. Hautes Études Sci. Publ. Math., 60:197– 376, 1984. [Can] Jan Cannizzo. On invariant schreier structures. arXiv:1309.5163. [CM09] Pierre-Emmanuel Caprace and Nicolas Monod. Isometry groups of non-positively curved spaces: structure theory. J. Topol., 2(4):661–700, 2009. 40 [CPa] [CPb] [Cre] [Fur76] [GG08] [GM14] [GW15] [HT] [Kec95] [KN13] [Lan02] [LP15] [MS79] [MS81] [Par00] [PT] [Rai] [RTW14] [Sha99] [SZ94] [TD] [Tit72] [TTD] [Ver10] [Ver12] [Weh73] [Wei95] YAIR GLASNER Darren Creutz and Jesse Peterson. Character rigidity for lattices and commensurators. arXiv:1311.4513. Darren Creutz and Jesse Peterson. Stabilizers of ergodic actions of lattices and commensurators. arXiv:1303.3949. Darren Creutz. Stabilizers of actions of lattices in products of groups. arXiv:1305.3648. Harry Furstenberg. A note on borel’s density theorem. Proceedings of the American Mathematical Society, 55(1):209–212, 1976. Tsachik Gelander and Yair Glasner. Countable primitive groups. Geom. Funct. Anal., 17(5):1479–1523, 2008. R. I. Grigorchuk and K. S. Medinets. On the algebraic properties of topological full groups. Mat. Sb., 205(6):87–108, 2014. Eli Glasner and Benjamin Weiss. Uniformly recurrent subgroups. In Recent trends in ergodic theory and dynamical systems, volume 631 of Contemp. Math., pages 63–75. Amer. Math. Soc., Providence, RI, 2015. Yair Hartman and Omer Tamuz. Stabilizer rigidity in irreducible group actions. Preprint. Alexander S. Kechris. Classical descriptive set theory, volume 156 of Graduate Texts in Mathematics. Springer-Verlag, New York, 1995. Ilya Kapovich and Tatiana Nagnibeda. Subset currents on free groups. Geom. Dedicata, 166:307–348, 2013. Serge Lang. Algebra, volume 211 of Graduate Texts in Mathematics. Springer-Verlag, New York, third edition, 2002. Russell Lyons and Yuval Peres. Cycle density in infinite Ramanujan graphs. Ann. Probab., 43(6):3337–3358, 2015. G. A. Margulis and G. A. Soı̆fer. Nonfree maximal subgroups of infinite index of the group SLn (Z). Uspekhi Mat. Nauk, 34(4(208)):203–204, 1979. G. A. Margulis and G. A. Soı̆fer. Maximal subgroups of infinite index in finitely generated linear groups. J. Algebra, 69(1):1–23, 1981. Anne Parreau. Dégénérescences de sous-groupes discrets de groupes de Lie semisimples et actions de groupes sur des immeubles affines,. PhD thesis, University Paris 11, Orsay,, 2000. Jesse Peterson and Andreas Thom. Character rigidity for special linear groups. To appear in Journal Für die Reine und Angewandte Mathematik (Crelle’s Journal), arXiv:1402.5028. Jean Raimbault. On the convergence of arithmetic orbifolds. arXiv:1311.5375. Bertrand Rémy, Amaury Thuillier, and Annette Werner. Bruhat-tits buildings and analytic geometry. arXiv:1110.1362, 2014. Yehuda Shalom. Invariant measures for algebraic actions, Zariski dense subgroups and Kazhdan’s property (T). Trans. Amer. Math. Soc., 351(8):3387–3412, 1999. Garrett Stuck and Robert J. Zimmer. Stabilizers for ergodic actions of higher rank semisimple groups. Ann. of Math. (2), 139(3):723–747, 1994. Robin Tucker-Drob. Shift-minimal groups, fixed price 1, and the unique trace property. arXiv:1211.6395. J. Tits. Free subgroups in linear groups. J. Algebra, 20:250–270, 1972. Simon Thomas and Robin Tucker-Drob. Invariant random subgroups of strictly diagonal limits of finite symmetric groups. arXiv:1402.4837. A. M. Vershik. Nonfree actions of countable groups and their characters. Zap. Nauchn. Sem. S.-Peterburg. Otdel. Mat. Inst. Steklov. (POMI), 378(Teoriya Predstavlenii, Dinamicheskie Sistemy, Kombinatornye Metody. XVIII):5–16, 228, 2010. A. M. Vershik. Totally nonfree actions and the infinite symmetric group. Mosc. Math. J., 12(1):193–212, 216, 2012. B. A. F. Wehrfritz. Infinite linear groups. An account of the group-theoretic properties of infinite groups of matrices. Springer-Verlag, New York, 1973. Ergebnisse der Matematik und ihrer Grenzgebiete, Band 76. André Weil. Basic number theory. Classics in Mathematics. Springer-Verlag, Berlin, 1995. Reprint of the second (1973) edition. INVARIANT RANDOM SUBGROUPS OF LINEAR GROUPS 41 Yair Glasner. Department of Mathematics. Ben-Gurion University of the Negev. P.O.B. 653, Be’er Sheva 84105, Israel. [email protected] Tsachik Gelander Department of Mathematics. Weizmann Institute of Science. Rehovot 76100, Israel. [email protected]
4math.GR
> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) 1 Risk-limiting Load Restoration for Resilience Enhancement with Intermittent Energy Resources Zhiwen Wang, Student Member, IEEE, Chen Shen, Senior Member, IEEE, Yin Xu, Member, IEEE, Feng Liu, Member, IEEE, Xiangyu Wu, Student Member, IEEE, Chen-Ching Liu, Fellow, IEEE Abstract—Microgrids are resources that can be used to restore critical loads after a natural disaster, enhancing resilience of a distribution network. To deal with the stochastic nature of intermittent energy resources, such as wind turbines (WTs) and photovoltaics (PVs), many methods rely on forecast information. However, some microgrids may not be equipped with power forecasting tools. To fill this gap, a risk-limiting strategy based on measurements is proposed. Gaussian mixture model (GMM) is used to represent a prior joint probability density function (PDF) of power outputs of WTs and PVs over multiple periods. As time rolls forward, the distribution of WT/PV generation is updated based the latest measurement data in a recursive manner. The updated distribution is used as an input for the risk-limiting load restoration problem, enabling an equivalent transformation of the original chance constrained problem into a mixed integer linear programming (MILP). Simulation cases on a distribution system with three microgrids demonstrate the effectiveness of the proposed method. Results also indicate that networked microgrids have better uncertainty management capabilities than stand-alone microgrids. Index Terms— Resilience; load restoration; microgrids; solar power; wind power, probabilistic distribution NOMENCLATURE Most symbols used in this paper are listed below for ease of reference; others are explained following their first appearance. Indices k,t Indices for periods. And, t=k+1,…,K g v l m Parameters K G W S L M ωm, μm, Σm Ω Indices for generators and energy storage systems (ESSs) Indices for WTs and PVs Indices for loads Indices for Gaussian components Number of periods Number of generators and ESSs Number of WTs Number of PVs Number of loads Number of Gaussian components Parameters of the mth component of a GMM Ω={ωm, μm, Σm |m=1,…,M} min pmax g , pg Maximum and minimum power outputs of generator g cl Priority weight of load l τ Length of each period. τ=1 hour rupg , rdng Ramp-up and ramp-down limits of generator g pt,l Power of load l in period t ENg Generation resource of generator g ECg Capacity of ESS g ρc, ρd Charging and discharging efficiency of ESS g Random Variables X vt power output of WT/PV v in period t Decision Variables pt,g Scheduled power output of generator g in period t ch dch Pt,g , Pt,g Scheduled charging/discharging power of ESS g in period t ut,l Status of load l to determine in period t. ut,l = 1 if load l restored in period t; ut,l = 0, otherwise I. INTRODUCTION A. Motivation xtreme weather events, such as flooding and hurricanes, cause severe damages to power systems from time to time. For example, hurricane Sandy hit the east coast of U.S. in 2012, causing power service interruption for 7.5 million people [1]. In 2008, a snow storm in Southern China left over 14 million households out of power for days. To help power systems defend against major disasters, the concept of “resilience” is proposed. Resilience refers to the ability of a power system that can withstand low-probability high-impact events and quickly recover customer service from major disasters [2]-[4]. Distributed energy resources (DERs), energy storage systems (ESSs), as well as microgrids (MGs), are valuable resources that can enhance resiliency of a distribution system, as they can be used to restore critical loads when the utility power is not available. E B. Literature Review Much research has been conducted on resilience-oriented load restoration problems [5]-[7]. A three-stage restoration method for distribution networks is proposed in [5] that can be > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) used to maximize the restored loads with available DERs. Authors in [6] study an automatic reconfiguration algorithm of microgrids with dynamical boundaries, considering transients of line faults and generators. In [7], a method is proposed to transform a load restoration problem into a linear integer programming “maximum coverage,” resulting in an efficient solution. However, these studies do not fully take renewable DERs into consideration. One prominent feature of renewables is the stochastic nature of generation. If uncertainties are not fully considered in the load restoration procedure, undesirable events, e.g., load shedding, over/under-frequency issues, may happen. To reduce these risks, there is a great need for a systematic method to manage uncertainties introduced by renewable DERs. There are several popular methodologies in the literature that address the renewable uncertainty issue. The first approach is using a forecast value to replace the actual wind/solar power. For example, authors in [8] propose an operation and selfhealing strategy, regarding the power outputs of DERs as deterministic forecast values. In a relevant study [9], based on short-term forecasts, a model predictive control approach is proposed to enhance power system resilience with microgrids. These studies only consider forecasted scenarios. However, as the actual values of renewable generation may deviate far from the forecasts, these methods may not be appropriate. The second approach is called “scenario-based stochastic optimization”. This method generates many possible scenarios with different probabilities, and determines an optimal strategy that can minimize an expected cost in those scenarios. In [10], forecast errors of wind/solar power are modeled by Beta distributions. By running Monte Carlo simulation, one can generate a number of scenarios of DG outputs. To reduce the computational burden, the back forward reduction method is adopted to retain representative scenarios. In a relevant study [11], a two-stage stochastic programming model is proposed, in which uncertainty scenarios are generated by auto-regressivemoving-average (ARMA) technique based on weather forecast information. Although the scenario-based stochastic optimization is able to consider different possibilities of uncertainties, there is a drawback. In order to keep the information of uncertainties as intact as possible, the number of scenarios has to be large. As a consequence, the computation of the approach becomes intractable. The third approach is robust optimization (RO). In [12], robust optimization is proposed to handle renewable and load uncertainties, in which uncertain parameters are modeled by convex and bounded intervals, e.g., ± 20% of installed capacities. In [13], a two-stage robust optimization model is proposed to coordinate the hardening and DER allocation. Based on weather forecast, the spatial and temporal dynamics of an uncertain natural disaster, e.g., a hurricane, are captured by a multi-stage and multi-zone uncertainty set. Because RO can be transformed into a single-level min (or max) problem, the computation of RO is relatively inexpensive compared with the scenario-based approach. However, as the optimal solution of RO is always obtained at an extreme point, i.e., the worstcase scenario, RO suffers from the inherent conservativeness, 2 which decreases the overall efficiency of an optimal strategy. In recent years, an important methodology that is developed to deal with uncertainties, called “risk-limiting dispatch (RLD)”, has drawn more and more attention [14]-[19]. RLD aims at finding an optimal strategy with a minimum cost to restrain risks brought by uncertainties, e.g., the insufficient generation risk. In RLD, power delivered at a particular period is determined in multiple decision stages. In each decision stage, distributions of renewable uncertainties are continuously updated as conditional distributions of the latest forecasts, e.g., the forecasted wind speed from a numerical weather prediction (NWP) system, wind power forecast values from a forecasting tool. Thereafter, optimal decisions are made to limit risks based on the newly collected information, i.e., decision variables depend on the prediction information. If more precise information of uncertainties is obtained in future decision stages, operators have a chance to take recourse actions to remedy previous decisions. At the moment the uncertainty is realized, the risk is restrained within a tolerance. As the accuracy of descriptions of uncertainties increases with newly collected information, it is less conservative. The original idea of RLD is proposed in [14]. In [15], an analytical solution of a simple RLD is obtained based on dynamic programming principles. The congestion issue is discussed in [16], while the wind power ramping issue is addressed in [17]. The applications of RLD in unit commitment and economical dispatch can be found in [18], [19]. The scope of this paper is a load restoration problem with microgrids in the distribution system level. A major concern on the application of RLD in the distribution level is the absence of power forecasting tools, which may result in infeasibility of the forecast-based RLD. Existing methods can be categorized into two groups: (1) The first one assumes that there is continually updated forecast information, e.g., [8]-[11], [13]-[19]. (2) The second one assumes that uncertainty models are fixed. For example, in [12], the uncertain parameters belong to a fixed interval [-0.2 +0.2], according to personal experience or historical data analysis. In a relevant study [21], renewable uncertainties are modeled by fixed distributions. In fact, both assumptions might be invalid: (1) in the distribution level, forecasting tools may not be available; (2) In a multiple-period optimization problem, uncertainty models of WTs/PVs in different periods are not the same. Using fixed models may result in conservative results. In addition to the challenge arising from the limited forecast information, there is one more challenge for RLD: the correlation of renewables. In RLD, probabilistic constraints associated with risks require arithmetical addition operations of random variables, e.g., the power balance equation. When random variables are correlated, “convolution technique” is no longer applicable [20]. Therefore, it is difficult to transform the probabilistic constraints into tractable forms. C. Contributions To address these important issues, this paper proposes a risklimiting load restoration strategy based on observations of renewable uncertainties. Relative to the state-of-the-art, the > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) D. Organization The remainder of the paper is organized as follows: Section II provides the problem formulation; Section III discusses a method to update distributions of uncertainties based on observations. In Section IV, the original problem is transformed into an MILP. Case study results are presented in Section V. Conclusion and limitations are provided at the end of this paper. II. PROBLEM FORMULATION This section provides the formulation of the risk-limiting load restoration problem. First, assumptions are provided and justified. Then, the resilience metric used in this paper is elaborated. A framework is given to clarify the computational procedure, followed by a full description of the constraints of the problem. Finally, challenges of the problem are discussed. A. Assumptions (1) There is a centralized microgrid controller that collects information and optimizes the operation. Intelligent electronic devices (IEDs) receive data and measurements from sensors and pass them to the central controller. IEDs also transfer control commands from the central controller to microgrid devices, such as diesel generators, ESSs, and load breakers. This communication structure can be implemented following the standard IEC 61850 via TCP/IP [22]. In fact, it is commonly used in microgrid testbeds [23], [24]. (2) In order to focus on volatile renewables, this paper assumes that uncertainties come from solar and wind generation only. Load uncertainty is not considered. This is justified as follows. Note that only a small number of critical loads will be restored after a major disaster. Since the critical loads are used to maintain basic and minimum societal functions, e.g., hospitals and street lighting, their demand does not change significantly during the restoration process [25]. Therefore, load variations are much smaller than fluctuations of renewable generation. Thus, they are neglected. In addition, if load varies during the restoration process, the maximum load demand will be used as the input to the restoration problem [25], [26], which ensures that the load demand will be satisfied. B. Resilience Metric The conceptual resilience curve in Fig. 1 that is associated with an extreme event is proposed in [27], and adopted in [25], [28]-[30]. There are 7 well-defined states, in which different measures can be taken to improve the resilience level, e.g., resource preparation in the pre-event state, and service restoration using microgrids in the restorative state and postrestoration state. F(t) System Performance contributions of this paper are threefold: (1) The resilience-oriented customer service restoration with intermittency renewables is formulated as a risk-limiting decision-making problem. (2) In modeling of uncertainties, a methodology is proposed to recursively update distributions of renewables as latest observations of WT/PV generation are available. Both wind and solar power uncertainties are modeled in a universal manner. The spatial-temporal correlation of uncertainties is considered. (3) For the solution methodology, probabilistic constraints consisting of correlated random variables are converted into linear inequalities, based on a property of the updated distribution. By doing so, the original problem can be solved with commercial solvers. 3 Outage Duration T0 Norm State Pre-Event State Event Process PostInfrastructure Restoration Repair State Post-Event Restorative Degraded State State t0 te t pe tr t pr t ir tn t Fig. 1 A conceptual resilience curve This paper is concerned with a load restoration strategy to enhance resilience. Therefore, the period from tr to tir is of primary interest, i.e., the restorative state and post-restoration state. When an extreme event takes place, the utility power is not available from tr to tir. Hence, the concerned period is referred to as the “outage duration”. The resilience level is evaluated by the integral of the system performance function over the outage duration [27]-[30], i.e., the blue-shadowed area in Fig.1: tir (1) R F  t  dt  tr The system performance function adopted in this paper is similar to those used in relevant resilience studies [25], [26], [28], [29]: the weights of restored loads. This is reasonable because more critical loads being restored indicates that the distribution system can better restore service to customers after an extreme event, i.e., the system is more resilient. Priority weights of critical loads (hospital, police station, etc.,) should be sufficiently greater than that of non-critical ones so that critical loads can be served as a priority with limited available generation capacities and resources. Let the outage duration T0 be discretized into several subintervals τ. Thereafter, resilience index (1) can be computed as follows: (2) R   cl  ut ,l  t l That is to say, the resilience level is evaluated by the cumulative service time to loads weighted by their priority over the outage duration. Remark 1: In some studies [26], [28], the active power of a load is involved in the resilience metric. Then, equation (2) becomes: (3) R   cl  Pt ,l  ut ,l  t l Both (2) and (3) can well represent resilience of a system. In fact, if one regards the weighted power in (3) as the weight in (2), metrics (2) and (3) are equivalent. Regarding this, both metrics can be applied to the proposed risk-limiting load restoration method. This paper prefers metric (2) because it is > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) more intuitive than (3). For example, a hospital should be identified as a critical load with a large weighted coefficient, as it is a life-critical infrastructure after an extreme event. Suppose that the hospital consumes a small amount of active power. If metric (3) is adopted, the hospital might not be restored due to a small value of the weighted power, while metric (2) avoids the problem. Remark 2: It should be noted that the resilience index is quite different from the traditional “reliability” concept. Reliability is associated with common events, most of them making a low impact, e.g., a short circuit on a line. For such events, most power sources stay connected. Transmission lines and distribution feeders are available. Since the power system facilities are intact, several scenarios will lead to high reliability, e.g., scheduling sufficient reserves in preparation for any single failure of equipment, and utilization of automatic reclosers to re-energize a feeder after a temporary fault. By doing so, reliability indices, e.g., the system average interruption frequency index (SAIFI) and system average interruption duration index (SAIDI), will be low. In contrast, resilience is designed for extreme events that rarely happen (low-probability high-impact events), during which the power system infrastructure, e.g., transmission lines, substations, automatic reclosers, and remote-control switches, might be damaged. As a result, numerous power system components are not available. Traditional measures that are designed for reliability enhancement may not apply. For example, if the upstream substation is damaged by a hurricane, the automatic recloser cannot re-energize downstream loads. To improve the resilience level, i.e., to quickly recover from a major disaster, focus should be placed on how to pick up critical loads as many as possible when the utility power is unavailable. Measures for the resilience enhancement include utilization of microgrids to restore critical service and hardening of transmission and distribution facilities. More discussions on the differences between resilience and reliability can be found in [31]. C. Framework RLD designed for transmission systems is based on two assumptions. First, as time moves forward, the sensing system can obtain more precise information on uncertainties. Second, there is a market mechanism, where a power/energy transaction enforced in earlier times is less costly. Therefore, system operators using RLD scheme determine the power/energy delivered at a certain period in multiple decision stages, trying to achieve a tradeoff between making decisions earlier with cheaper prices and making decisions later with more precise information. In each decision stage, based on the latest information, the risks brought by uncertainties are limited within a tolerance, i.e., constraints associated with risk indices are added into optimization models. For a load restoration problem, the first assumption of RLD still holds, while the second one may not be valid. An example is given in Fig. 2. For the delivery period between 9:00 to 10:00, suppose that one can make decisions in three stages, 7:00, 8:00, and 9:00, which are called the 1st, 2nd, and final decisions, 4 respectively. Clearly, the uncertainty information of the delivery period obtained at 9:00 is more precise than that obtained at 8:00, which is more precise than that obtained at 7:00. However, unlike the market mechanism in the transmission system level, the weighted coefficients of resilience index (2) are independent of time, i.e., enforcing decisions that are made earlier than 9:00 will not bring additional reward. Therefore, a rational decision maker will not enforce the decisions made at 7:00 and 8:00. That is to say, the 1st and 2nd decisions are for advisory purpose only; they are not implemented. 7:00 8:00 9:00 ... 10:00 16:00 17:00 Delivery Period 1st advisory decision 2nd advisory decision t Final decision Fig. 2 Illustration of advisory decisions and final ones for a delivery period. The proposed risk-limiting load restoration is designed as follows. The framework is illustrated in Fig. 3. For demonstration, the time resolution is set to be 1 hour in this paper. It can be changed to other frames, e.g. 10 min or 30 min, if needed. The proposed method is an online tool, which is executed periodically. In each implementation, the proposed method aims to maximize resilience index (2), and determines the set of loads to be restored, the generation schedule of dispatchable generators, and the charging/discharging strategy of ESSs. An optimal load restoration strategy is determined over the optimization window, in which only decisions in the first time interval are implemented to instruct generators/ESSs/loads for the next period k+1 whereas the rest are abandoned. There are multiple periods within a certain optimization window. In each period, constraints associated with risks are considered based on the latest uncertainty information. Specifically, this paper uses observations of uncertainties in the past periods to update distributions of renewable generation in the future. Out age Duration 7:00 8:00 9:00 10:00 ... 16:00 17:00 7:00 8:00 9:00 10:00 ... 16:00 17:00 ... 16:00 17:00 k=0 k=1 Using observations to update distributions of uncertainties 7:00 8:00 9:00 10:00 k=2 Using observations to update distributions of uncertainties Past intervals in which unc erta inties are observed Next inter val in which decisions are implem ented Future interva ls in which decisions are abandoned Optimiz ation window Fig. 3 A framework of the risk-limiting load restoration scheme. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) Remark 3: The periodic process in Fig. 3 is also known as receding horizon control [32]. Compared with the method in [32], the proposed method has two major differences: (1) The method in [32] addresses critical issues of a load restoration problem in deterministic scenarios. Renewable uncertainties have not been fully considered [32]. This paper mainly aims at handling uncertainties introduced by renewables in the load restoration process. (2) Authors in [32] point out that the information should be updated periodically. One original contribution of this paper is a recursive methodology in Section III that uses observations to update distributions of renewable uncertainties. D. Constraints 1) Risk-limiting constraints ● Since power outputs of WTs/PVs are stochastic, the following adequacy requirement should be met in each period: W +S L G  Pr  Pt , g   X tv   ut ,l Pt ,l     t  k  1 (4) v 1 l 1  g 1  Equation (4) indicates that the probability of restored load demands being satisfied with available resources should be greater than a given confidence level. This is a typical risk-limiting constraint [13]. In this paper, α is 90%. ● Similar to (4), an energy adequacy requirement is formulated as follows: T W S  v    EN g   1    X t    gESS  t  k 1 v 1 Pr   T L      ut ,l Pt ,l   t  k 1 l 1   k EN g  k  1  EN g  0    Pt , g g  ESS (5) (6) where ENg (0) is generation resource available at the beginning; 𝑃̅𝑡̅,𝑔 is the power output of generator g in the past k periods. Note that when real time k rolls forward, distributions of random variables Xt v in (4)(5) should be updated, which are conditioned on the latest information. 2) Deterministic constraints ● If g is a dispatchable generator, e.g., a diesel, then the following output limit, generation resource limit, and ramping limit should be satisfied: (7) Pgmin  Pt ,g  Pgmax  t  k  1, g  ESS T t  k 1   EN g  k  1 t ,g rgdn  Pt ,g  Pt 1,g  rgup  g  ESS and maximum/minimum SOC are formulated as follows: dch,max 0  Pt dch , t  k  1, g  ESS (11) , g   t , g Pg  t , g Pgch,max  Pt ,chg  0 , t  k  1, g  ESS SOCgmin  SOCt , g  SOCgmax (12) (13) t  k  1, g  ESS Note that the use of an ESS would involve decisions in multiple periods, as the current SOC depends on the previous SOC and the recent charging/discharging strategy. So, the SOC transition of an ESS is formulated as follows: 1 ch SOCt , g  SOCt 1, g   Pt dch 1, g  d +Pt 1, g  c / EC g (14) t  k  2, g  ESS In the literature [8], the SOC at the end is required to be the initial value. This paper does not include such a constraint, because there are necessities to charge an ESS after the outage.   E. Challenges To solve the problem (2)-(14), two critical issues need to be addressed: (1) Updating distribution of Xt v as time rolls forward; (2) Dealing with probabilistic constraints (4) and (5), e.g. computing the distribution of an aggregation of X t v from multiple WTs/PVs in a single period, as well as over the whole outage duration. Usually, one may use the “convolution technique” [20] to compute the summation of Xt v . However, Xt v is interdependent. Hence, the “convolution technique” does not apply. The two issues are addressed in Section III and IV, respectively. III. MODELING UNCERTAINTY t 1 P 5 (8)  t  k  2, g  ESS (9) ● If g is an ESS, then two auxiliary binary variables are introduced: χt,g being 1 represents the discharging mode; while γt,g being 1 for charging mode. Note that an ESS cannot be in charging and discharging modes at the same time [8]. That is : (10) t , g   t , g  1 t  k  1, g  ESS Besides, limits on charging/discharging power output In this section, features of intermittent energy resource uncertainties are discussed, followed by details for modeling, as well as updating, the uncertainties of WT/PV generation. A. Features of uncertainties in microgrids Wind and solar power are commonly used in microgrids. Their uncertainties have three features: (1) A distribution of wind power is different from that of solar power. Usually, wind speed follows a Weibull distribution [33]. Thereafter, the distribution of wind power can be obtained by the “wind speed-power curve”, which is a modified Weibull distribution with two spikes at 0.0 and 1.0 p.u. The PV generation production is usually a function of solar irradiance and temperature. Authors in [34] report that the irradiance in Arizona can be described reasonably by a Beta distribution, and the temperature is Gaussian. Then, the distribution of solar power is obtained as a variant of a Beta distribution. Alternatively, authors in [35] adopt the Saunier model to evaluate the irradiation and obtain a different distribution of solar generation. In the presence of both WTs and PVs, different forms of distributions make it difficult to solve a load restoration problem in a universal manner. (2) Wind/solar power outputs have spatial-temporal correlations. First, in the distribution system level, renewables are geographically closely located. Hence, the spatial > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) dependence of power outputs from adjacent wind farms/solar arrays is significant. Second, power outputs over adjacent periods are also correlated. An illustration of the spatialtemporal correlation of two adjacent WTs over 10 hours is shown in Fig. 4. The hourly data of wind power is from the “wind integration data set” of National Renewable Energy Laboratory (NREL) [36]. Different colors correspond to different values of correlation coefficients. According to Fig. 4, the correlation coefficients of the two WTs in one period (spatial correlation), and two adjacent periods of one WT (temporal correlation), are about 0.89-0.96, indicating strong interdependences. Similar results can be obtained for PVs. In this paper, a prior joint distribution of X is presented by a GMM with an adjustable parameter set Ω={ωm, μm, σm ; m=1,…,M} as follows: f X  x    m N m  x ; μ m ,  m  M M  m 1 m  1, m  0 (17) 9 10 (16) m 1 1.00 N m  x ; μ m ,  m  : 7 8 0.95 5 6 0.90 3 4 0.85 2 0.80 1 power of WT2 over different periods B. A prior distribution of uncertainties Let a random variable Xk denote the actual power output of an intermittent energy resource in period k. Then, a random vector, X, for outputs over K periods is defined as: T (15) X   X1 Xk XK  e  1  x μm T m1  x μm  2  2π  K 1/ 2 where ωm is the weight, Nm(·) is the mth multivariate Gaussian component with a mean vector μm and a covariance matrix σm. 10 GMM 1st Component 2nd Component 3rd Component 3.5 9 0.70 7 8 3.0 0.65 2.5 1 2 0.55 0.50 1 2 3 4 5 6 7 8 9 power of WT1 over different periods 10 1 2 3 4 5 6 7 8 9 power of WT2 over different periods 10 Legend of correlation coefficient Fig. 4 The spatial-temporal correlation matrix of two WTs over 10 hours (3) Unlike transmission systems, some microgrids may not be equipped with power forecasting tools due to cost considerations. Hence, in some cases, forecast information for WTs/PVs is unavailable, increasing the difficulty in decision making of load restoration. To overcome this hurdle, an intuitive idea is to use latest observations to infer future uncertainties. Note that power outputs in period k and k+1 are usually positively correlated. If the power in k is observed and it is at a high value, there is a good chance that power in k+1 is also at a high value. By doing so, operators can update the inference and make decisions correspondingly for the next periods. Based on this idea, one classic approach, called “persistence forecasting”, is developed [37], which uses past measurements of renewable power outputs as forecasted values for the next periods. “Persistence forecasting” is low cost. However, it only obtains an estimated point, not a distribution, of future uncertainties. Therefore, the classic “persistence forecasting” is not suitable for risk-limiting constraints (4)(5). If one wants to use persistence forecasting in the load restoration problem, the probabilistic constraints (4) (5) need modifications. A detailed discussion is provided in Appendix D. In the following, a method that uses observations to infer distributions of renewable generation for the next periods is detailed. PDF 6 5 3 4 0.60 (18) det   m  0.75 power of WT1 over different periods 6 4th Component 2.0 1.5 1.0 0.5 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Value Fig. 5 An illustrative example using a GMM to represent the PDF of a random variable. In this example, K=1 and M=4. Weights for components are 0.4, 0.1, 0.3, and 0.2, respectively. In Fig. 5, the idea of using a GMM to represent the PDF of a random variable is presented. For illustration, suppose that the number of periods K =1 and the number of Gaussian components M = 4. The PDF of a GMM (in black) is a weighted summation of four Gaussian distributions (in red, blue, green, and purple, respectively). By adjusting the parameter set Ω, GMM is able to characterize different kinds of non-Gaussian correlated random variables [38]-[40]. Thus, it is suitable for modeling uncertainties of WTs and PVs. With historical data of X, the parameter set Ω of a GMM can be determined through the maximum likelihood estimation technique [41]. Specifically, this paper adopts a solver gmdistribution.fit in MATLAB to estimate the parameter set Ω. C. Using observations to update the prior distribution Suppose in the second period, the actual power output in the first period is observed. That is, (19) X1  x1 Then, the distribution of the remaining entries, X2,…,K, can be updated as a conditional distribution with respect to X1=x1. In Appendix A, the computational procedure of a conditional distribution is provided: > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) f X 2, ,T x |X 1 2, | x1  ,K   l  x1 ,   N l  x2, ; μ l  x1 ,   ,  l  x1 ,    M l 1 ,K (20) Note that the updated distribution of X2,…,K has a GMM form. This is an important property of GMM, namely, conditional invariance. When the third period comes with an observed realization of X2, the distribution of X3,…,K can be updated in a similar way as (20) via the formulae in Appendix A. A more general updating formula for the period k+1 based on an observation of Xk is given as follows: f X k 1, , K |X1, ,k x   Nl xk 1, M | x1, ,k      x ;μl  x1, ,k ,   ,  l  x1, k 1, , K ,K l l 1 1, , k ,k ,  ,  (21)  [X1k+1 … XW+S … X1K … XW+S ]T. Note that (24) is a GMM, and k+1 K 1 T random variables [Xk+1 … XW+S can be regarded as a linear k+1 ] T transformation of [X1k+1 … XW+S … X1K … XW+S k+1 K ] : 1  X k 1       X kW1+S   X k11  (25)         1 0   X1   X kW1+S  E    K     X W +S   K  Using g Lemma 1 in Appendix B, one can obtain a T distribution of [X1k+1 … XW+S k+1 ] : f X k 1 |X1, Realization of Xk is observed Period k f Xk , xk Period k+1  Nl x Distribution of Xk, ,K , K |X1, ,k 1 x k, ,K | x1, , k 1  Equation (21) and Appendix A Distribution of Xk+1, f X k 1, , K |X1, ,k x ,K k 1, , K | x1, ,k  Fig. 6 A recursive procedure to update the distribution of power uncertainties A flow chart is given in Fig. 6. The distribution of power uncertainties for the next periods with respect to observations in the past can be updated in a recursive manner. D. Multiple renewable case If there are multiple PVs and WTs, the random vector X is augmented as follows: T X   X 11 X 1W  S X k1 X kW  S X K1 X KW  S  (22)   In period k, an aggregated observation of W+S components is obtained, i.e., (23)  X k1 X kW +S    x1k xkW +S      Then, the distribution of [X1k+1 … XW+S … X1K … XW+S ]T with k+1 K respect to the aggregated observation can be updated via the formulae in Appendix A. The updated distribution is denoted as follows: f X k 1, ,K |X1,  ,k  Nl x x 1, , S W k 1, , K 1, , S W k 1, , K | x1,1, ;μ l  x , S W ,k 1, , S W 1, , k      x M l 1 1, , S W 1, , k l ,   , l  x 1, , S W 1, , k ,   (24) ,   The updated distribution (24) has a GMM form. E. Integrating the updated distribution into the risk-limiting constraints When the kth observation is obtained, the conditional joint distribution of [X1k+1 … XW+S … X1K … XW+S ]T shown in (24) is k+1 K incorporated into the risk-limiting constraints (4)(5) as follows: a) In (4), when t=k+1, the distribution of random variables T [X1k+1 … XW+S k+1 ] should be extracted from the joint distribution of 7 ,k x 1, , S W k 1 1, , S W k 1 | x1,1, , S W ,k ;Eμ l  x 1, , S W 1, , k      x M l 1 1, , S W 1, , k l ,   , E l  x 1, , S W 1, , k ,   ,  E T (26)  Obviously, this is a GMM. b) In (4), when t>k+1, the distribution of random variables 1 T [X 1t+1 … X W+S … X W+S ]T. t+1 ] should be conditioned on [X t t 1 W+S T However, in the kth period, [X t … X t ] have not been observed. Similar to RLD, the idea of the proposed risk-limiting load restoration strategy is to utilize the conditional expectation of [X1t … XW+S ]T | [X1k … XW+S ]T to replace [X1t … XW+S ]T. The t k t 1 W+S T 1 W+S T distribution of [Xt … Xt ] | [Xk … Xk ] can be obtained in a similar way as (25)(26), being a GMM. Thereafter, one can use Lemma 2 in Appendix C to compute the conditional expectation of [X1t … XW+S ]T | [X1k … XW+S ]T. Finally, using the t k formulae in Appendix A, one can obtain the conditional 1 T distribution of [X 1t+1 … X W+S … X W+S ]T . Due to the t+1 ] | [X t t conditional invariance of GMM, the obtained distribution is still a GMM. According to a) and b), the distributions of [X1t … XW+S ]T for t t=k+1 and t>k+1 are GMMs. For brevity, they are denoted as follows: f X 1, t ,S W 1, ,S W |X1, ,k  x  N l ,t xt1, 1, t , S W | x1,1, , S W ,k      x ;μl ,t  x1,1, , S W ,k ,   ,  l ,t  x1,1, , S W M l 1 1, , S W 1, , k l ,t , S W ,k ,  ,   (27) t  k 1 c) Since the risk-limiting constraint (5) is associated with random variables [X 1k+1 … X W+S … X 1K … X W+S ]T, the joint k+1 K distribution in (24) is used for the risk-limiting constraint (5) without modifications. F. Comparison with a probabilistic forecasting tool Usually, a probabilistic forecasting tool is designed to obtain quantitative information of renewable generation random variables conditioned on explanatory variables [38]. Take the wind power as an example. The quantitative information could be confidence intervals for any quantile and/or full PDFs of wind generation. Typical explanatory variables include the forecasted wind speed from a NWP system as well as forecasted wind generation from a point forecasting tool. If one regards the past observations [X11 … XW+S … X1t … XW+S ]T as explanatory 1 t variables, the proposed method becomes a probabilistic > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) forecasting tool for the future wind generation [X1t+1 … XW+S … t+1 T X 1K … X W+S ] . Compared with the traditional probabilistic K forecasting tools [38], the proposed method has the following features and advantages: (1) The traditional methods rely on auxiliary forecasted information of explanatory variables. In contrast, the proposed method only relies on observations, which simplifies the implementation and makes the method appropriate in cases where the auxiliary forecasted information is not available. (2) Usually, the traditional methods provide univariate PDFs 1 and/or quantiles of random variables X1t+1, …, XW+S t+1 , …, XK , …, W+S XK , respectively. If so, it is not easy to handle the arithmetical addition operations of random variables in the probabilistic 1 W+S constraints (4)(5), as X 1t+1 , …, X W+S are t+1 , …, X K , …, X K correlated random variables. The proposed method obtains a 1 W+S T joint distribution of a random vector [X1t+1… XW+S t+1 … XK … XK ] . The joint distribution has a GMM form, which makes the computation of the probabilistic constraints (4)(5) feasible. G. Advantages The proposed method modeling uncertainties has the following advantages: (1) Even if distributions of power outputs of WTs and PVs are different from one another, the proposed method is able to provide a universal model with satisfactory estimation by adjusting the parameter set Ω. Also, the spatial-temporal correlation can be taken into account. (2) Based on latest collected observations, the proposed method is able to infer distributions recursively as time rolls forward, increasing the accuracy of descriptions of future uncertainties. (3) The updated distribution in each period is a GMM, facilitating the solution of the original problem (2)-(14).This point will be detailed in the next section. L u t ,l l 1 G Pt ,l   Pt , g  CDFX1sum 1    SOLUTION METHODOLOGY where CDF-1(·) denotes the quantile of X t sum , which can be computed through its distribution function (29). B. Equivalent transformation of energy constraint (5) Adopting a similar idea as (28) and (29), one can compute the distribution of the aggregation of Xt v over multiple periods from k+1 to T as follows: X sum 1,T  f X sum  1,T x      x l 1  T 1, N l xsum 1,T ; e μ l  x1, , S W , W +S X v 1 t   1 v t M t  l 1 Nl xtsum ; eT μl ,t  x1,1, , S W ,k , S W ,k ,   ,   , eT  l ,t  x1,1, ,   ,   , eT  l  x1,1, , S W ,k ,  e (32) , S W , ,  e  L  u  Pt ,l  1  EN g   1  CDFX1sum  gESS t  1 l 1 sum -1 where CDF (·) of X κ+1,T distribution function (32). t ,l  1,T 1    (33) can be computed through its C. Equivalent MILP At this point, the original problem in Section III is converted to an equivalent MILP as follows: Objective : Max (2) Subject to: (6)-(14), (30), and (33) The MILP can be solved with available commercial solvers, such as intlinprog in MATLAB [42]. D. Implementation procedure The implementation procedure of the proposed scheme for the kth period is shown in Fig. 7. MILP Optimal Results ESS Objective: max (2) Realization of Xk is observed ,K Section III-E Subject to: (6)(14), (30) and (33) , K |X1, ,k Dispatchable Generators Load Breakers Fig. 7 Implementation of the proposed scheme (28) Based Lemma 1 in Appendix B, the distribution of Xt sum is obtained as follows, f X sum  xtsum    l,t  x1,1, , S W , (31) v t Thereafter, the equivalent transformation of (5) is: T f X k 1, Equivalent transformation of power constraint (4) Define the aggregation of Xt v in period t by X tsum  1, 1, l W S t  1 v 1 M sum  1,T Distribution of Xk+1, A. T  X  Renewable Generation This section transforms probabilistic constraints (4)(5) into equivalent deterministic linear inequailities.  t    1 (30) t g 1 Modeling Uncertainty IV. 8  (29) t  k 1 where e is a unit vector with a proper dimension. Note that Lemma 1 holds even if Xt v is correlated with others. Hence, the correlation of random variables can be handled. Thereafter, moving the deterministic terms of (4) into left side and random variables to the right side, one can convert the probabilistic constraint (4) into (30) as follows: First, measurements of [X1k … XW+S ]T are obtained, based on k which the joint distribution of future uncertainties is updated. Then, the joint distribution is fed into the risk-limiting constraints (4)(5), enabling the constraints to be converted into linear inequalities. Thereafter, MILP is solved. Finally, the optimal results, i.e., loads to be restored, the scheduled power of dispatchable generators, and the charging/discharging strategy of ESSs are sent to equipment for implementation. E. Optimal control dynamic dispatch (OCDD) formulation In the literature [43], the model (2)-(14) is categorized as “dynamic economic dispatch (DED)”, because Pt,g are decision variables. There is also another methodology for power system operation called “optimal control dynamic dispatch”, in which the ramp rate rt,g are decision variables [43]. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) These two models are subject to similar constraints and implemented periodically. However, authors in [43] indicate that there are two differences between the two models: (1) The optimal decision of the OCDD depends on initial values of P0,g, while the DED does not. (2) The OCDD considers the ramp limit on P1,g -P0,g, while the DED neglects such a constraint. The load restoration problem in this paper can be formulated as OCDD. The full OCDD formulation is provided in Appendix E. The proposed method to update distributions of uncertainties and the solution methodology to handle probabilistic constraints (4)(5) can be readily used in the OCDD formulation. V. CASE STUDY A. Test system and data In the following tests, there are three microgrids, each with a diesel generator and an ESS. Besides, MG1 and MG2 both have a WT; MG3 has a PV. The duration of an outage from 07:00 to 17:00 is 10 hour with 1-hour time resolution. As a result, the total number of random variables is 30 (=3 × 10 ). Hourly historical data of WTs/PVs comes from publicly available datasets, i.e., “solar integration data set” and “wind integration data set”, of NREL [36]. The data set consists of actual power outputs of wind/solar generation for 3 years. This paper uses data records of the first 1000 days as the “training set”, and the rest as “test set”. The “training set” is used to estimate the parameters of GMM using the maximum likelihood estimation technique, while the “test set” is used to test the performance of the proposed method. The proposed method is applicable to other time resolution of data, e.g., 30 min, 10 min, if needed. Load information of the IEEE 342-node system comes from Pacific Northwest National Laboratory (PNNL) [44]. Important information of the test system is listed in Table I. TABLE I IMPORTANT SYSTEM INFORMATION MG1 Similar results can be obtained for WT2 and PV3. To quantify the fitting performance, this paper uses three probabilistic metrics. (1) The likelihood function value is used [41]. This is a positively-oriented score: the higher, the better. Note that the likelihood function value is not an “absolute value metric”, which means there is not a universal threshold to distinguish between accuracy and inaccuracy. To overcome this hurdle, this paper compares the likelihood function of GMM with three widely-used statistical models [45]. They are the Gaussian model, Gaussian Copula model, and t Copula model. By doing so, the fitting performance of GMM is evaluated. The likelihood function values of GMM and the other three models are listed in Table II. It can be seen that GMM has the largest value, remarkably outperforming the other three. TABLE II FITTING TEST OF MODELING [XT YT]T : 2.0 MW, 5.0 MWh : 0.5 MW, 2.0 MWh, SOC70% : 2.0 MW : 32 loads, 6.48MW in total Diesel2 ESS2 WT2 Loads : 3.0 MW, 8.0 MWh : 1.5 MW, 3.0 MWh, SOC60% : 2.0 MW : 30 loads, 8.79 MW in total Log-likelihood function values(103) Gaussian 1.8345 Gaussian Copula 3.7658 t Copula 4.9025 GMM 7.1324 Historical data GMM 0.12 Information Diesel1 ESS1 WT1 Loads Methods Fig. 8 Joint distributions of X at 500 points 0.10 0.08 PDF MG No. 9 0.06 0.04 MG2 0.02 0 0 5 10 15 20 Value of eTX MG3 Diesel3 ESS3 PV3 Loads : 2.5 MW, 10.0 MWh : 1.0 MW, 4.0 MWh, SOC70% : 2.0 MW : 34 loads, 6.54 MW in total B. Validation of modeling uncertainties This subsection provides test results using GMM to model uncertainties and updating distributions based on observations. First, a GMM with 40 components is adopted to fit the historical data of actual power outputs of WTs/PVs over 10 periods. The results of WT1 are detailed in the following. Fig. 9 GMM fits historical data of eTX (2) The joint distribution of X based on GMM is compared with the empirical joint distribution of X. According to Glivenko–Cantelli theorem [46], the empirical distribution converges to the true underlying distribution with probability one. Therefore, the empirical distribution can be used as a benchmark. The values of GMM based joint distribution and the empirical distribution at 500 points are shown in Fig. 8. The maximum absolute error (MAE) [47] and root mean square error (RMSE) [47] over the 500 points are computed. Both > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) MAE and RMSE are small (0.0324, 0.0089, respectively). The results of Fig. 8 verify that GMM based joint distribution coincides with the empirical distribution, i.e., GMM well represents the historical data. With update determined. Then, as the next period arrives, power outputs of WTs/PVs are realized. Since power outputs of WTs/PVs are random, an adjustment is activated: if the power supply is less than the restored load demand, the dispatchable generators should increase outputs and consume resources to meet the load demand; otherwise, there should be wind and/or solar spillage. For brevity, it is assumed that there is no way to regulate power outputs of ESSs once they are determined. By doing so, it is straightforward and convenient to use the restored loads, generator regulations, and wind/solar spillage to evaluate the effectiveness of the load restoration strategy. Distribution with update Resilience value 80 Without update 40 20 0 C. Results of the load restoration plan 1) Individual microgrid case With the validated model of uncertainties, this subsection is concerned with the load restoration using the updated distributions. In this test, each microgrid operates in a standalone mode with no connection to others, instructs its own energy resources, and supplies its own loads. In order to show the advantage of the recursively updated distribution, the distribution without update is provided as a comparison. The load restoration strategy is tested with the “test set” in an operation simulation. First, a generation/load instruction for the next arriving time is obtained. At this point, restored loads are 1 1.5 Power (MW) Fig. 10 distributions of WT1 in MG1 over 10 hours with/without update Distribution without update 60 Confidence level (3) Note that when X is represented by a GMM, the PDF of an aggregated random variables eTX can be obtained based on Lemma 1. Obviously, if a GMM well represents X, the PDF of eTX, which is derived from GMM, should match well with the historical data of eTX. Based on this principle, this paper compares the PDF of eTX derived from GMM with the histogram of eTX. The results are shown in Fig. 9. It can be seen that GMM matches well with the histogram. MAE and RMSE are also small (0.0112, and 0.0045, respectively). The results further indicate that GMM is a good representation for X. Secondly, this paper computes the recursively updated distributions. In Fig. 10, WT1 in MG1 is taken as an example. The width of confidence levels of the updated distribution becomes narrower as time rolls forward. Meanwhile, the actual power is well bounded within confidence intervals. As a comparison, with the same confidence level, the width of the distribution without update is relatively broad, indicating a rough description of wind power uncertainties. The results reveal that the updated distribution provides a more elaborate description of wind power uncertainties than the one without updating. Similar results are obtained for WT2 in MG2, and PV3 in MG3. 10 2 3 4 5 6 Time 7 8 9 10 Wind spillage with update Generator regulation with update Wind spillage without update Generator regulation without update 1.0 0.5 0 1 2 3 4 5 6 Time 7 8 9 10 Fig. 11 Resilience values, generator regulations, and wind spillage of MG1 Fig. 11 shows resilience values, wind spillage, and generator regulations of MG1 (MG2 and MG3 are omitted). Three results can be obtained from Fig. 11: (1) At the beginning, the resilience values of distributions with/without update are the same, since there has not been any observation to update the distribution. TABLE III COMPARISON OF DISTRIBUTION WITH/WITHOUT UPDATE Case Resilience values Distribution with update 513.3 Distribution without update 342.6 (2) As time rolls forward, the recursively updated distribution takes advantages with more restored loads and less wind spillage over the distribution without update. This can be explained as follows: based on the distribution without update which provides a rough description of wind uncertainties, operators have to make conservative decisions to ensure that the probabilistic power/energy adequacy constraints (4)(5) are satisfied. That is, one uses more energy from the diesel generator of limited generation resources to serve loads, resulting in more wind spillage. As a comparison, the updated distribution provides an accurate estimation for the future uncertainties. Therefore, even with more wind power utilized, > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) operators are confident that the adequacy requirements (4)(5) can be satisfied. The resilience values over the outage duration are listed in Table III. The results also verify that the updated distribution outperforms the distribution without update. (3) An interesting phenomenon in Fig. 11 is that the wind spillage appears more frequently than the generator regulation. Here is an explanation: the confidence levels α in probabilistic constraints (4)(5) are 90%. That is, once the restored loads are determined, there is only a 10% chance that the load demand cannot be met, i.e., the generator regulation is thereafter activated. Therefore, in this test, the generator regulation is infrequently observed. 2) Networked microgrid case In this test, the three microgrids connect with each other, become networked microgrids, and share resources to restore loads. This subsection discusses the advantage of networked microgrids over stand-alone ones. The resilience values of networked microgrids are computed. In Fig. 12, the networked resilience values are greater than the summation of three resilience values in stand-alone microgrids. This is reasonable: in networked microgrids, generation resources from one microgrid can be transferred to another microgrid to restore critical loads if needed. VI. CONCLUSION 100 To enhance the resilience of a distribution system with microgrids, this paper proposes a method using observations to infer distributions of uncertainties of WTs/PVs based on the conditional invariance property of a GMM. The transformation of the original risk-limiting load restoration problem into an MILP benefits from the recursively updated distributions being a GMM. This paper is focused on uncertainties. The power/energy adequacy requirements are considered, laying a foundation for load restoration with intermittent energy resources for practical use. Furthermore, concerning the operational and dynamic constraints, there are two on-going studies: (1) Transmission limits should be considered. If the power flow is linear, e.g., the linearized DistFlow, a method proposed in previous authors’ work [48] is readily applicable to deal with linear chance-constrained line power limits without major change. For the AC power flow in which the line power is a nonlinear implicit function of random power injections, the tractable computation of the risks pertaining to line limits remains an issue to resolve. The sample average approximation (SAA) is a potential solution. (2) Dynamic constraints should be considered. Usually, distributed generators and ESSs have limited capabilities to withstand large transient shocks. Therefore, it is necessary to run dynamic simulations to ensure that the load restoration strategy does not cause instability or damage to equipment. Further discussions that are useful for the future work can be found in [6], [7]. 50 APPENDIX A Summation of stand-alone microgrids Networked microgrids 250 Resilience value 11 200 150 0 1 2 3 4 5 6 7 8 9 10 Time CONDITIONAL INVARIANCE OF A GMM Let the random vector X be decoupled into two parts: Fig. 12 Comparison of restored loads between networked microgrids and standalone microgrids D. Computation time As far as the computation time is concerned, all tests are implemented on a Core-i5 PC, with a 2.39-GHz processor and 8 GB of RAM. The coding environment is Matlab. In the rolling plan, the optimization problem at the first period (k=0) has the heaviest computational burden since it determines decisions with the longest optimization window (see Fig. 3). It takes 11.649s to solve the problem for the individual case and 34.889s for the networked case. Note that the time resolution of the problem is set to be 1 hour in this paper. Therefore, the proposed method meets the time requirement. Even if the time resolution is reduced to 10 min, the proposed method is still applicable. As far as communication latency is concerned, this paper assumes that the communication structure follows the standard IEC 61850 via TCP/IP [22]. Since a microgrid is not a large system, the communication delay is not significant. Suppose that the communication latency is 1 second. The computation and communication time together is within a minute. Therefore, the communication latency does not cause a major hurdle. X :  Y T Z T  T (34) where Y represent observations, and Z represent the rest entries of X. The distribution of X is a GMM. That is: f X  x   fYZ  y, z    m N m  y, z ; μ m ,  m  (35) μ y   yy  myz  μ m :  mz  ,  m   mzy zz  μ m  m m  (36) M m 1 Then, the conditional distribution of Z with respect to Y=y is given as follows [49]: f Z |Y  z | y    l  y,  l N l  z ; μ l  y,   ,  l  y,    (37) M l 1 l  y,    l Nl  y ; μly ,  ly  M  m 1 μl m N m  y ; μ my ,  my   y,    μlz   lzy   lyy  l (38) 1  y,     lzz   lzy   lyy  y -μ    y l 1 yz l (39) (40) The distribution of Z with respect to Y=y is a GMM, enabling a recursive way to update distributions. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) APPENDIX B Distribution with update 12 Persistence forecasting 80 Lemma 1 [49] : If the distribution of X is a GMM as in (16), and XLT is a defined as a linear transformation of X: (41) X LT = AX + C Then, the distribution of XLT is computed as follows: Resilience value LINEAR INVARIANCE OF A GMM f X LT  xLT    m N m  xLT ; Aμ m  C, A m A T  (42) 60 40 20 M 0 1 m 1 2 3 4 5 Lemma 1 holds even if entries of X are correlated. Wind spillage with update Wind spillage of the persistence forecasting APPENDIX C Lemma 2: If the distribution of X is a GMM as in (16), the expectation of X is M E  X    m μ m (43) m 1 Power (MW) 0.8 EXPECTATION OF A GMM 8 9 10 Generator regulation with update Generator regulation of the persistence forecasting 0.4 0.2 0 2 3 4 5 6 7 8 9 10 APPENDIX D Time COMPARISON WITH PERSISTENCE FORECASTING Fig. D-1 Resilience value, generator regulations, and wind spillage of MG1 A. Modification of probabilistic constraints (4)(5) Since “persistence forecasting” is a point forecasting tool of uncertainties, the probabilistic constraints (4)(5) should be modified as follows: G W +S L P  X v  fore   u P  t    1 (44)  g 1 gESS 7 0.6 1  6 Time  t,g v 1  t EN g   1   l 1 T W S t ,l t ,l T t  1 v 1 t  1 l 1   t   t ,l t ,l  v 1  l 1 T W S T L   EN g   1  E    X tv     Pt ,l  gESS  t  1 v 1  t  1 l 1 g 1 Resilience value Proposed updated expectation 568.2 Distribution without update 408.3 APPENDIX E t ,l where X vr (fore) represents the forecasted value from “persistence forecasting” technique. If one wants to compare the proposed method with “persistence forecasting” technique, the updated distribution should be modified as a point prediction. An intuitive idea is using the expectation of the updated distribution as a point prediction. Thereafter, probabilistic constraints (4)(5) should be formulated as expectations. That is: G L W +S v  P E X  u P  t    1 (46)  Case L   X  fore     P  (45)   v t TABLE D-I RESILIENCE VALUE COMPARISON t,g (47) where E[·] is the expectation operation. The distributions of the aggregation of Xt v have been derived in (29)(32), which are GMMs. Therefore, the expectations can be computed based on Lemma 2 in Appendix C. At this point, one can compare “persistence forecasting” with the proposed updated expectation. B. Test results The test procedure is the same as those in Section V-C. The results are shown in Fig. D-1 and Table D-I. It can be seen that the proposed method with updated expectations obtains a higher resilience value, surpassing the “persistence forecasting” method. AN EXTENSION TO THE OCDD MODEL C. Full formulation ● Risk limiting constraints: t L G    W +S Pr   P0, g   ri , g    X tv   ut ,l Pt ,l    (48) i 1 l 1  v 1  g 1   T W S  v    EN g   1    X t   (49)  gESS  t  1 v 1 Pr   T L      ut ,l Pt ,l   t  1 l 1   ● Deterministic constraints t Pgmin  P0, g   ri , g  Pgmax i 1 (50) t    1,  g  ESS T   P   t  1    ri , g   EN g   1 i 1   g  ESS t 0, g t , g   t , g  1 t    1, g  ESS (51) (52) t dch dch,max 0  P0,dch g   ri , g   t , g Pg i 1 (53) t    1, g  ESS t  t , g Pgch,max  P0,chg   ri ch ,g  0 i 1 t    1, g  ESS (54) > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) [3] t SOCgmin  SOC0, g   rsoci , g  SOCgmax i 1 (55) t    1, g  ESS   dch 1 ch ch rsoct , g    P0,dch g   ri , g  d +P0, g   ri , g  c  / ECg (56) i 1 i 1   t    2, g  ESS t 1 [4] t 1 [5] [6] D. Test results This paper takes the optimization problem of the first period (k=0) as an example to show the difference between DED and OCDD models. As discussed in Section IV-E, the OCDD considers an initial value of P0,g and the ramp limit on P1,g -P0,g, while the DED does not. To clearly illustrate this phenomenon, P0,g in OCDD is set to be 0 . That is to say, the maximum value of P1,g equals to the ramping rate of generator g. In this paper, the ramping rate is set to be 0.3MW/h. [7] [8] [9] [10] [11] [12] [13] [14] Fig. E-1 Scheduled power of the diesel generator in MG1 [15] [16] [17] [18] [19] Fig. E-2 Objective functions of the two models [20] Tests are conducted on MG1. Results of the two models are shown in Fig. E-1 and Fig. E-2. In Fig. E-1, it is observed that the scheduled power of the diesel in OCDD model and that in DED model are different at the beginning, but they coincide later. Similar conclusions are obtained for the objective functions in Fig. E-2. Because the OCDD model has more constraints than DED, the optimal solution of OCDD is no better than that of DED. According to Fig. E-2, the objective functions of the two models are close to each other (342.57, 341.58, respectively). The results of the two figures are consistent with those reported in [43]. [21] [22] [23] [24] [25] REFERENCES [1] [2] L. Che, M. Khodayar, and M. Shahidehpour, “Only connect: Microgrids for distribution system restoration,” IEEE Power Energy Mag., vol. 12, no. 1, pp. 70–81, Jan./Feb. 2014. Office of the press secretary of the white house, presidential policy directive – critical infrastructure security and resilience [Online]. Available:http://www.whitehouse.gov/the-press-office/2013/02/12/presi dential-policy-directive-critical-infrastructure-security-and-resil [26] [27] 13 U.S. Department of Energy and National Energy Technology Laboratory, Operates resiliently against attack and natural disaster [Online]. Available: http://www.smartgridinformation.info/pdf/1438_doc_1.pdf V. Madani, et al., “Distribution automation strategies challenges and opportunities in a changing landscape,” IEEE Trans. Smart Grid, vol. 6, no. 4, pp. 2157-2165, July 2015. T. T. H. Pham, Y. Besanger, and N. Hadjsaid, “New challenges in power system restoration with large scale of dispersed generation insertion,” IEEE Trans. Power Syst., vol. 24, no. 1, pp. 398-406, Feb. 2009. Y. J. Kim, J. Wang, and X. Lu, “A framework for load service restoration using dynamic change in boundaries of advanced microgrids with synchronous-machine DGs,” IEEE Trans. Smart Grid, early access article. Y. Xu, C. C. Liu, K. Schneider, F. Tuffner, and D. Ton, “Microgrids for service restoration to critical load in a resilient distribution system,” IEEE Trans. Smart Grid, early access article. Z. Wang, B. Chen, J. Wang, and C. Chen, “Networked microgrids for selfhealing power systems,” IEEE Trans. Smart Grid, vol. 7, no. 1, pp. 310319, Jan. 2016. H. Farzin, M. F. Firuzabad, and M. M. Aghtaie, “Enhancing power system resilience through hierarchical outage management in multi-microgrids,” IEEE Trans. Smart Grid, vol. 7, no. 6, pp. 2869-2879, Nov. 2016. Z. Wang and J. Wang, “Self-healing resilient distribution systems based on sectionalization into microgrids,” IEEE Trans. Power Syst., vol. 30, no. 6, pp. 3139-3149, Nov. 2015. A. Gholami, T. Shekari, F. Aminifar, and M. Shahidehpour, “Microgrid scheduling with uncertainty: the quest for resilience,” IEEE Trans. Smart Grid, vol. 7, no. 6, pp. 2849-2858, Nov. 2016. A. Khodaei, “Resiliency-oriented microgrid optimal scheduling,” IEEE Trans. Smart Grid, vol. 5, no. 4, pp. 1584–1591, Jul. 2014. W. Yuan, J. Wang, F. Qiu, C. Chen, C. Kang, and B. Zeng, “Robust optimization-based resilient distribution network planning against natural disasters,” IEEE Trans. Smart Grid, vol. 7, no. 6, pp. 2817-2826, Nov. 2016. P. P. Varaiya, F. F. Wu, and J. W. Bialek, “Smart operation of smart grid: risk-limiting dispatch,” Proc. IEEE, vol. 99, no. 1, pp. 40-57, Jan. 2011. R. Rajagopal, E. Bitar, P. Varaiya, and F. Wu, “Risk-limiting dispatch for integrating renewable power,” Int. J. Elec. Power, vol. 44, no. 1, pp. 615628, Jan. 2013. B. Zhang, R. Rajagopal, and D. Tse, “Network risk-limiting dispatch: optimal control and price of uncertainty,” IEEE Trans. Autom. Control, vol. 59, no .9, pp. 2442-2456, Sep. 2014. C. Wu, G. Hug, and S. Kar, “Risk-limiting economic dispatch for electricity markets with flexible ramping products,” IEEE Trans. Power Syst., vol. 31, no. 3, pp. 1990-2003, May 2016. C. Peng, Y. Hou, N. Yu, and W. Wang, “Risk-limiting unit commitment in smart grid with intelligent periphery,” IEEE Trans. Power Syst., early access article. C. Peng, Y. Hou, N. Yu, J. Yan, S. Lei, and W. Wang, “Multi-period risklimiting dispatch in power systems with renewables integration,” IEEE Trans. Industrial Informatics, vol. 13, no. 4, pp. 1843-1854, Aug. 2017. S. M. Ross, Introduction to Probability Models 11th Edition. San Diego, CA, USA: Elsevier, 2015. A. R. Malekpour and A. Pahwa, “Stochastic networked microgrid energy management with correlated wind generators,” IEEE Trans. Power Syst., vol. 32, no. 5, pp. 3681-3693, Sep. 2017. IEEE Standard for Exchanging Information Between Networks Implementing IEC 61850 and IEEE Std 1815(TM), IEEE Std 1815.12015, Dec. 2016 C. Wang, et al., “A highly integrated and reconfigurable microgrid testbed with hybrid distributed energy sources,” IEEE Trans. Smart Grid, vol. 7, no. 1, pp. 451-459, Jan. 2016. A. Ruiz-Alvarez, A. Colet-Subirachs, F. A. Figuerola, O. GomisBellmunt, and A. Sudria-Andreu, “Operation of a utility connected microgrid using an IEC 61850-based multi-level management system,” IEEE Trans. Smart Grid, vol. 3, no. 2, pp. 858-865, June 2012. H. Gao, Y. Chen, S. Mei, S. Huang, and Y. Xu, “Resilience-oriented prehurricane resource allocation in distribution systems considering electric buses,” Proc. IEEE, vol. 105, no. 7, pp. 1214-1233, July 2017. C. Chen, J. Wang, F. Qiu, and D. Zhao, “Resilient distribution system by microgrids formation after natural disasters,” IEEE Trans. Smart Grid, vol. 7, no. 2, pp. 958-966, March 2016. M. Panteli and P. Mancarella, “The grid: stronger, bigger, smarter? presenting a conceptual framework of power system resilience,” IEEE Power Energy Mag., vol. 13, no. 3, pp. 58–66, May/Jun. 2015. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) [28] H. Gao, Y. Chen, Y. Xu, and C. C. Liu, “Resilience-oriented critical load restoration using microgrids in distribution systems,” IEEE Trans. Smart Grid, vol. 7, no. 6, pp. 2837-2848, Nov. 2016. [29] Z. Bie, Y. Lin, G. Li, and F. Li, “Battling the extreme: a study on the power system resilience,” Proc. IEEE, vol. 105, no. 7, pp. 1253-1266, July 2017. [30] Z. Li, M. Shahidehpour, F. Aminifar, A. Alabdulwahab, and Y. Al-Turki, “Networked microgrids for enhancing the power system resilience,” Proc. IEEE, vol. 105, no. 7, pp. 1289-1310, July 2017. [31] C. C. Liu, “Distribution systems: reliable but not resilient? [In My View],” IEEE Power and Energy Magazine, vol. 13, no. 3, pp. 93-96, May-June 2015. [32] A. Gholami and F. Aminifar, “A hierarchical response-based approach to the load restoration problem,” IEEE Trans. Smart Grid, vol. 8, no. 4, pp. 1700-1709, July 2017. [33] J. V. Seguro and T. W. Lambert, “Modern estimation of the parameters of the Weibull wind speed distribution for wind energy analysis,” Journal of Wind Engineering and Industrial Aerodynamics, vol. 85, no. 1, pp, 75-88, 2000. [34] M. Fan, V. Vittal, G. T. Heydt, and R. Ayyanar, “Probabilistic power flow studies for transmission systems with photovoltaic generation using cumulants,” IEEE Trans. Power Syst., vol. 27, no. 4, pp. 2251-2261, Nov. 2012. [35] F. J. Ruiz-Rodriguez, J. C. Hernandez, and F. Jurado, “Probabilistic load flow for radial distribution networks with photovoltaic generators,” IET Renewable Power Generation, vol. 6, no. 2, pp. 110-121, March 2012. [36] C. Draxl, B. M. Hodge, A. Clifton, and J. McCaa. “Overview and meteorological validation of the wind integration national dataset toolkit,” Technical Report, NREL/TP-5000-61740. National Renewable Energy Laboratory. Golden, CO. 2015. [37] M. Milligan, M. Schwartz, and Y. Wan. “Statistical wind power forecasting models: results for us wind farms,” Preprint. NREL/CP-50033956. National Renewable Energy Laboratory, Golden, CO., 2003. [38] M. Nijhuis, M. Gibescu, and J. F. G. Cobben, “Gaussian mixture based probabilistic load flow for lv-network planning,” IEEE Trans. Power Syst., early access article. [39] R. Singh, B. Pal, and R. Jabr. “Statistical representation of distribution system loads using gaussian mixture model,” IEEE Trans. Power Syst., vol. 25, no. 1, pp. 29-37, Feb. 2010. [40] G. Valverde and A. T. Saric, “Probabilistic load flow with non-Gaussian correlated random variables using Gaussian mixture models,” IET Gen., Trans. & Distri., vol. 6, no. 7, pp. 701–709, 2012. [41] A. Hald, “On the history of maximum likelihood in relation to inverse probability and least squares,” Statistical Science, vol. 14, no. 2, pp. 21422, 1999. [42] Mathworks Support Documentation on Mixed-integer Linear Programming (MILP). [Online]. Available: https://www.mathworks.com/ help/ optim/ug/intlinprog.html [43] X. Xia, J. Zhang, and A. Elaiw, “An application of model predictive control to the dynamic economic dispatch of power generation,” Control Engineering Practice, vol. 9, no. 6, pp. 638-648, 2011. [44] K. P. Schneider, P. Phanivong, and J. S. Lacroix, “IEEE 342-node low voltage networked test system,” in Proc. IEEE PES General Meeting, National Harbor, MD, 2014. [45] G. Papaefthymiou and D. Kurowicka, “Using copulas for modeling stochastic dependence in power system uncertainty analysis,” IEEE Trans. Power Syst., vol. 24, no. 2, pp. 40-49, Feb. 2009. [46] A. W. Van der Vaart, Asymptotic Statistics. Cambridge, England: Cambridge University Press, 1998 [47] J. Zhang, et al., “A suite of metrics for assessing the performance of solar power forecasting,” Sol. Energy, vol. 111, pp.701-709, 2012 [48] Z. W. Wang, C. Shen, F. Liu, X. Y. Wu, C-C Liu, and F. Gao. “Chanceconstrained economic dispatch with non-Gaussian correlated wind power uncertainty,” IEEE Trans. Power Syst. early access article. [49] J. T. Flam, “The linear model under Gaussian mixture inputs,” Ph.D. dissertation, Dept. of Elect. & Telecom. Norwegian Univ. of Science and Technology, Trondheim, Norway, 2013. 14
3cs.SY
A Covert Queueing Channel 1 in FCFS Schedulers AmirEmad Ghassami and Negar Kiyavash arXiv:1707.07234v1 [cs.IT] 23 Jul 2017 Abstract We study covert queueing channels (CQCs), which are a kind of covert timing channel that may be exploited in shared queues across supposedly isolated users. In our system model, a user modulates messages to another user via his pattern of access to the shared resource scheduled in a first-come-first-served (FCFS) manner. One example of such a channel is the cross-virtual network covert channel in data center networks resulting from the queueing effects of the shared resource. First, we study a system comprising a transmitter and a receiver that share a deterministic and work-conserving FCFS scheduler, and we compute the capacity of this channel. We also consider the effect of the presence of other users on the information transmission rate of this channel. The achievable information transmission rates obtained in this study demonstrate the possibility of significant information leakage and great privacy threats brought by CQCs in FCFS schedulers. Index Terms Covert Queueing Channel, First-Come-First-Served Scheduler, Capacity Limit. I. I NTRODUCTION The existence of side and covert channels due to the fragility of isolation mechanisms is an important privacy and security threat in computer networks. Such channels may be created across users which were supposed to be isolated, resulting in information leakage. By definition, a covert channel is a hidden communication channel which is not intended to exist in the system and is created furtively by users [2]. Covert channels may be exploited by a trusted user, or possibly a malware inside a system with access to secret information to leak it to a distrusted user. On the other hand, in a side channel a malicious user attempts to learn private information by observing information not intended for him. In this scenario, there is no collaboration between the source of information and the recipient [3]. AmirEmad Ghassami is with the Department of Electrical and Computer Engineering and, the Coordinated Science Lab, University of Illinois at Urbana-Champaign, Urbana, IL, email: [email protected]. Negar Kiyavash is with the Department of Electrical and Computer Engineering, Department of Industrial and Enterprise Systems Engineering and, the Coordinated Science Lab, University of Illinois at UrbanaChampaign, Urbana, IL, email: [email protected]. The results in this paper were presented in part at the 2015 IEEE International Symposium on Information Theory, Hong Kong, June 14 - June 19, 2015 [1]. A special case of covert and side channels is a timing channel in which information is conveyed through timing of occurrence of events (e.g., inter-arrival times of packets). For instance, queueing covert/side timing channels may arise between users who share a packet scheduler in a network. Packet schedulers serve packets from multiple streams which are queued in a single queue. This causes dependencies between delays observed by users. Particularly, the delay that one user experiences depends on the amount of traffic generated by other streams, as well as his own traffic. Hence, a user can gain information about other users’ traffic by observing delays of his own stream. This dependency between the streams can breach private information as well as create hidden communication channels between the users. One example of a covert/side queueing channel is the cross-virtual network covert channel in data center networks and cloud environments. In recent years, migrating to commercial clouds and data centers is becoming increasingly popular among companies that deal with data. The multi-tenant nature of cloud and sharing infrastructure between several users has made data protection and avoiding information leakage a serious challenge in such environments [4]. In data center networks, software-defined-networks are frequently used for load balancing [5]. This generates logically isolated virtual networks and prevents direct data exchange. However, since packet flows belonging to different VNs inevitably share underlying network infrastructure (such as a router or a physical link), it is possible to transfer data across VNs through timing channels resulting from the queueing effects of the shared resource(s). In this paper, we study covert queueing channels (CQCs) in a shared deterministic and work-conserving firstcome-first-served (FCFS) scheduler. We present an information-theoretic framework to describe and model the data transmission in this channel and calculate its capacity. First, we consider the two users setting and then study the effect of the presence of a third user on the information transmission rate. The approach for analyzing the effect of the presence of the third user may be extended to calculate the capacity of the covert queueing channel serving any number of users. The rest of this paper is organized as follows: We review related works in Section II. In Section III, we describe the system model. The capacities of the introduced channel for the two and three user cases are calculated in Sections IV and V, respectively. Our concluding remarks are presented in Section VI. II. R ELATED W ORKS The existing literature on covert/side timing channels has mainly concentrated on timing channels in which the receiver/adversary has direct access to the timing sequence produced by the transmitter/victim or a noisy version of it. However, in a covert/side queueing channel, the receiver/adversary does the inference based on the timing of his own packets which has been influenced by the original stream. In a queuing side channel, where a malicious user, called an attacker, attempts to learn another user’s private information, the main approach used by the attacker is traffic analysis. That is, the attacker tries to infer private information from the victim’s traffic pattern. The attacker can have an estimation of the features of the other user’s 2 Node 𝑈𝑒𝑇 FCFS Scheduler Node 𝑈𝑑𝑇 Node 𝑈𝑒𝑅 Node 𝑈𝑑𝑅 Fig. 1: Covert queueing channel in a system with 2 users. stream such as packet size and timing by emitting frequent packets in his own sequence. Previous work shows that through traffic analysis, the attacker can obtain various private information including visited web sites [6], sent keystrokes [7], and even inferring spoken phrases in a voice-over-IP connection [8]. In [9], Gong et al. proposed an attack where a remote attacker learns about a legitimate user’s browser activity by sampling the queue sizes in the downstream buffer of the user’s DSL link. The information leakage of a queueing side channel in an FCFS scheduler is analyzed in [10]. The analysis of more general work-conserving policies has been done in [11] and [12]. The authors in [12] present an analytical framework for modeling information leakage in queuing side channels and quantify the leakage for several common scheduling policies. Most of the work in covert timing channels is devoted to the case in which two users communicate by modulating the timings, and the receiver sees a noisy version of the transmitter’s inputs [13]–[21]. Also, there are many works devoted to the detection of such channels [14], [22], [23]. The setup of CQC is new in the field of covert channels and as far as the authors are aware, there are very few works on this setup [24], [25]. III. S YSTEM D ESCRIPTION Consider the architecture depicted in Figure 1. In this model, a scheduler serves packets from 2 users: Ue and Ud . Each user, Ui , i ∈ {e, d}, is modeled by a transmitter and a receiver node, denoted by UiT and UiR , respectively. UiR is the node which receives UiT ’s packet stream. Note that UiT and UiR could correspond to the uplink and downlink of the same entity. Ue intends to send a message to Ud , but there is no direct channel between them. However, since UeT and UdT ’s packets share the same queue, UeT can encode messages in the arrival times of its packets, which are passed onto Ud via queueing delays. Therefore, a timing channel is created between users via the delays experienced through the coupling of their traffic due to the shared scheduler. To receive the messages from Ue , user Ud sends a packet stream from the node UdT . He then uses the delays he experiences by receiving the packet stream at UdR to decode the message. Therefore, effectively, the nodes UeT 3 Arrived stream of the scheduler Ai A i+1 Time User e's output stream User d's output stream Time Di D i+1 Time Fig. 2: An example of the input and output streams of the FCFS scheduler serving two users. Red packets belong to Ue and blue packets belong to Ud . We assume that one packet is buffered in the queue at time Ai . and UeR are on the encoder side and the nodes UdT and UdR are on the decoder side of the channel of our interest. Throughout the paper, we call Ud ’s sent stream the probe stream. We consider an FCFS scheduler, which is commonly used in DSL routers. We assume this scheduler is deterministic and work-conserving. Time is discretized into slots, and the scheduler is capable of processing at most one packet per time slot. At each time slot, each user either issues one packet or remains idle. Furthermore, we assume that all packets are the same size. Figure 2 shows an example of the input and output streams of the system depicted in Figure 1 with an FCFS scheduler. In this figure, the first stream is the arrival stream i.e., arrivals from both UeT and UdT , depicted by red and blue, respectively. The second stream is the output stream of user Ue (received by UeR ), and the third one is the output stream of user Ud (received by UdR ). In this example, we assume that one packet is buffered in the queue at time Ai , where a packet arrives from both UdT and UeT . If user Ue had not sent the two packets (depicted in red), the second packet of user Ud which arrives at time Ai+1 could have departed one time slot earlier. Therefore, Ud knows that Ue has issued two packets. Throughout the paper, we assume that the priorities of the users are known. Particularly, without loss of generality, we assume that Ud has the highest priority among all users; i.e., in the case of simultaneous arrivals, Ud ’s packet will be served first. As mentioned earlier, at each time slot, each user is allowed to either send one packet or none; hence, the input and output packet sequences of each user could be viewed as a binary bitstream, where ‘1’ and ‘0’ indicates whether a packet was sent or not in the corresponding time slot. 4 Assume message W drawn uniformly from the message set {1, 2, ..., M } is transmitted by UeT , and Ŵ is Ud ’s estimate of the sent message. Our performance metric is the average error probability, defined as follows: Pe , P (W 6= Ŵ ) = M X 1 P (Ŵ 6= m|W = m). M m=1 Ue encodes each message into a binary sequence of length n, ∆n , to create the codebook, which is known at the decoder, Ud . In order to send a message, UeT emits a packet in the i-th time slot if ∆i = 1 and remains idle otherwise, i.e.,    1 ⇒ UeT issues a      packet in time slot i. ∆i =   0 ⇒ UeT remains      idle in time slot i. To decode this message, UdT sends a binary length n stream (the probe stream) to the scheduler during the same length n time period. User Ud will use this stream and the response stream received at node UdR to decode the sent message. We define the code, rate of the code, and the channel capacity similar to the definitions in [13], [26] and [27], as follows: Definition 1. An (n, M, )-code consists of a codebook of M equiprobable binary codewords, where messages take on average n time slots to be received, and the error probability satisfies Pe ≤ . Definition 2. The information transmission rate, R, of a code is the amount of conveyed information (logarithm of the codebook size) normalized by the average number of used time slots for the message to be received, i.e., R= log M . n Rate may be interpreted as the average amount of information conveyed in a single time slot. Definition 3. (Channel Capacity) The Shannon capacity, C, for a channel is the maximum achievable rate at which one can communicate through the channel when the average probability of error goes to zero. In other words, C is the suprimum of rates, R, which satisfies the following property [27]: ∀δ > 0, ∃(n, M, n )-code   log M > R − δ n s.t.   →0 n The following notations will be used through out the paper: 5 as n → ∞. • ri : UiT ’s packet rate. • Ai : Arrival time of the i-th packet in the probe stream. • Di : Departure time of the i-th packet of the probe stream. • • m We assume m packets are sent by Ud during n time slots and we have: rd = lim . n→∞ n PAi+1 −1 Xi : Number of Ue ’s packets sent in the interval [Ai , Ai+1 ). Note that Xi = j=Ai ∆j . Ti = Ai+1 − Ai : inter-arrival time between i-th and (i + 1)-th packet of the probe stream. We denote a realization of T by τ . • Yi = Di+1 − Di − 1 • X̂i : estimation of Xi by decoder. • Ŵ : decoded message. In an FCFS scheduler, Ud can have an estimation of the number of the packets of other users between any of his own consecutive packets. The estimation of the number of packets in the interval [Ai , Ai+1 ) is accurate if the scheduler is deterministic and work-conserving and a sufficient number of packets is buffered in the queue at time Ai 1 . In that case, the number of other users’ packets arriving in the interval [Ai , Ai+1 ) could be simply calculated by Di+1 − Di − 1. Note that Ud cannot pinpoint the location of the sent packets; that is, if the inter-arrival time is τ , Ud can distinguish between τ + 1 different sets of bit streams sent during this time. Therefore, we look at any probe stream sent during n time slots as a combination of different inter-arrival times. If the sum of the packet rates of the users used during sending a message of length n is on average larger than 1, then the message will be arrived on average during more than n time slots. Also, this will destabilize the input queue of the scheduler. For example, for a system with two users Ud and Ue , if UdT sends packets in every time slot, then sending a packet by UeT in any time slot would cause a delay in the serving of the next packet of UdT and hence could be detected. Therefore, in each time slot, UeT could simply idle to signal a bit ‘0’ or send a packet to signal a bit ‘1’, resulting in the information rate of 1 1.5 bit per time slot in the case that bits are equiprobable. But, this scheme is not feasible in practice as it would destabilize the queue and result in severe packet drops. In order to have queue stability, it suffices that the total packet arrival rate does not exceed the service rate, which for a deterministic and work-conserving scheduler is equal to 1 (see Appendix A for the proof of stability which is based on a Lyapunov stability argument for the general case that the serving rate is assumed to be 0 ≤ ρ ≤ 1 1 If the service rate of the scheduler is equal to 1, there should be at least Ai+1 − Ai − 1 packets buffered in the queue at time Ai . Therefore, user Ud needs to know the queue length. This is feasible using the following formula: q(Ai ) = Di − Ai − 1 where q(Ai ) denotes the queue length at the time that the i-th packet in the probe stream arrives at the queue. The extra 1 in the formula is the time needed for the i-th packet of the probe stream to be served. Therefore, user Ud should always be aware of the queue length and keep it sufficiently large by sending extra packets when needed. 6 and arbitrary number of users is considered). Specifically, for the case of two users we need re + rd < 1. (1) On the other hand, if the sum of the packet rates of the users used during sending a message of length n is on average less than 1, the length of the input queue may go to zero, and consequently Ud may not be able to count the number of packets of other users correctly. Note that increasing rd increases the resolution available for user Ud and hence this user can have a better estimation of the number of other users’ sent packets. Therefore, in the case of two users, in order to achieve the highest information rate, the operation point should tend to the line re + rd = 1. Therefore, we focus on the coding schemes where the sum of the rates is held at 1, with considering a preamble stage in our communication to guarantee sufficient queue length. IV. T WO - USER C ASE In this section, using achievability and converse arguments, the capacity of the introduced system is calculated for a system with a deterministic and work-conserving FCFS scheduler serving packets from two users. As depicted in Figure 1, user Ue is attempting to send a message to Ud through the covert queueing channel between them. Note that since we have considered service rate of 1 for the FCFS scheduler and users can agree on the packet stream sent by UdT ahead of time, the feedback UeR is already available at the encoder. Therefore, the following Markov chain holds W → X m → Y m → Ŵ . (2) Note that as mentioned earlier, if there is a sufficient number of packets buffered in the shared queue, X̂i could be accurately estimated as Yi . The main result of this section is the following theorem, the proof of which is developed in the rest of the section. Theorem 1. The capacity of the timing channel in a shared FCFS scheduler with service rate 1 depicted in Figure 1 is equal to 0.8114 bits per time slot, which can be obtained by solving the following optimization problem: 1 C = sup αH̃(γ1 , 1) + (1 − α)H̃(γ2 , ) 2 α,γ1 ,γ2 (3) s.t. 1 α(γ1 + 1) + (1 − α)(γ2 + ) = 1, 2 where 0 ≤ α ≤ 1 and 0 ≤ γ1 , γ2 ≤ 1 2 and the function H̃ : [0, 1] × { k1 : k ∈ N} 7→ [0, 1] is defined as: 1 1 H̃(γ, ) = k k sup H(X), X∈{0,1,...,k} E[X]=kγ We first investigate some of the properties of the function H̃. 7 k ∈ N, 0 ≤ γ ≤ 1. (4) Lemma 1. Let Uk ∼ unif ({0, 1, ..., k}). The distribution which achieves the optimum value in (4) is the tilted version of unif ({0, 1, ..., k}) with parameter λ: eiλ PX (i) = Pk i=0 eiλ , i ∈ {0, 1, ..., k}, 0 0 where λ = (ψU )−1 (kγ), where the function ψU (·) is the derivative of the log-moment generating function of Uk . k k See Appendix B for the proof of Lemma 1. Lemma 2. The function H̃ could be computed using the following expression: 1 1 ∗ H̃(γ, ) = [log2 (k + 1) − ψU (kγ) log2 e], k k k (5) ∗ where Uk ∼ unif ({0, 1, ..., k}), and the function ψU (·) is the rate function given by the Legendre-Fenchel transform k of the log-moment generating function, ψUk (·): ∗ ψU (γ) = sup{λγ − ψUk (λ)}. k (6) λ∈R In order to prove this lemma, first we note that for any random variable X defined over the set {0, 1, ..., k}, H(X) = k X PX (i) log i=0 = k X 1 PX (i) PX (i) log (k + 1) − i=0 k X PX (i) log i=0 PX (i) 1 k+1 = log (k + 1) − D(PX ||Uk ), where D(PX ||Uk ) denotes the KL-divergence between PX and Uk . Therefore, in order to maximize H(X), we need to minimize D(PX ||Uk ). Using the following well-known fact [28] concludes the lemma. ∗ min D(PX ||Uk ) = ψU (kγ) log2 e. k (7) E[X]=kγ Figure 3 shows the function H̃(γ, k1 ) for different values of γ and k ∈ {1, 2, 3}. 1 Lemma 3. The function H̃(·, ·) is concave in pair (γ, ) in the sense that for integers k1 , k2 , k3 , and for values k 1 1 1 0 ≤ γ1 , γ2 , γ3 ≤ 1, and for α ∈ [0, 1] such that α(γ1 , ) + (1 − α)(γ3 , ) = (γ2 , ), we have: k1 k3 k2 1 1 1 αH̃(γ1 , ) + (1 − α)H̃(γ3 , ) ≤ H̃(γ2 , ). (8) k1 k3 k2 See Appendix C for the proof of Lemma 3. Substituting (5) in (3) and solving it, the capacity of the timing channel in the shared FCFS scheduler with service rate 1 depicted in Figure 1 is equal to 0.8114 bits per time slot, achieved by α = 0.177, γ1 = 0.43 and γ2 = 0.407. 8 1 k=1 1 k=2 0.8 0.8 k=3 0.6 ~ H 0.6 0.4 0.4 0.2 0 1 0.2 0.8 1 0.6 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.8 0.6 0.4 1 . 1 k 0.4 0.2 0.2 0 0 . Fig. 3: H̃(γ, k1 ) for different values of γ and k ∈ {1, 2, 3}. 1 1 Lemma 4. For all γ ∈ [0, 1] and k ∈ N, we have H̃(γ, ) = H̃(1 − γ, ). k k See Appendix D for the proof of Lemma 4. In the following, the proof of Theorem 1 is given. The proof is based on converse and achievability arguments. A. Converse In the converse side, the ultimate goal is to prove that 1 C ≤ sup αH̃(γ1 , 1) + (1 − α)H̃(γ2 , ) 2 α,γ1 ,γ2 s.t. 1 α(γ1 + 1) + (1 − α)(γ2 + ) = 1, 2 where 0 ≤ α ≤ 1 and 0 ≤ γ1 , γ2 ≤ 12 . We break the proof into two lemmas. Lemma 5. For the timing channel in a shared FCFS scheduler with service rate 1 depicted in Figure 1, any code consisting of a codebook of M equiprobable binary codewords, where messages take on average n time slots to be received, satisfies n X 1 1 log M ≤ [πτ H̃(µτ , )] + n n τ τ =1 where Pn τ =1 πτ (µτ + τ1 ) = 1 and for all τ , 0 ≤ µτ ≤ 12 . In this expression, n = (9) 1 n (H(Pe ) + Pe log2 (M − 1)), πτ is the portion of time that user Ud sends packets with inter-arrival time equal to τ in the probe stream, and µτ is UeT ’s average packet rate when the inter-arrival time is equal to τ . 9 Proof. We first we note that 1 (a) 1 log M = H(W ) n n (b) 1 = H(W |τ m ) n 1 1 = I(W ; Ŵ |τ m ) + H(W |Ŵ , τ m ) n n (c) 1 ≤ I(W ; Ŵ |τ m ) + n n (d) 1 ≤ I(X m ; Y m |τ m ) + n , n where (a) holds because W is a uniform random variable over the set of messages {1, ..., M }, (b) follows from the fact that the chosen message is independent of the inter-arrival time of decoder’s packets, (c) follows from Fano’s inequality with n = 1 n (H(Pe ) chain in (2). Therefore + Pe log2 (M − 1)), and (d) follows from data processing inequality in Markov 1 1 log M ≤ [H(X m |τ m ) − H(X m |Y m , τ m )] + n n n 1 ≤ H(X m |τ m ) + n n m 1X ≤ H(Xj |τ m ) + n n j=1 m ≤ 1X max H(Xj |τ m ) + n , n j=1 PXj |τ m In the maximization above, the mean of the distribution PXj |τ m is E[Xj |τ m ]. As mentioned in Section III, in order to find the maximum information rate while having stability, we are interested in the asymptotic regime in which the operating point is converging to the line re + rd = 1. Therefore, the information rate is upper bounded by m 1X E[Xj |τ m ] + rd = 1. having the set of means, {E[X1 |τ m ], E[X2 |τ m ], ..., E[Xm |τ m ]} satisfying the constraint n j=1 Let ξj = E[Xj |τ m ] . τj Using (4), we have max PXj |τ m E[Xj |τ m ]=τj ξj H(Xj |τ m ) = τj H̃(ξj , 1 ), τj (10) where as mentioned in Lemma 1, the distribution for each Xj which achieves the maximum value in (10) is the 0 tilted distribution of Uτj with parameter λ, such that λ = (ψU )−1 (τj ξj ). Therefore, we will have: τ j 1 1 log M ≤ n n m X τj H̃(ξj , j=1 m 1 ) + n , τj 1X τj ξj + rd = 1. The inter-arrival times take values in n j=1 the set {1, 2, ..., n}. Therefore, in the summation above we can fix the value of inter-arrival time on the value τ such that the set {ξ1 , ξ2 , ..., ξm } satisfies the constraint 10 and count the number of times that τj has that value. Defining mτ as the number of times that the inter-arrival Pn time is equal to τ (note that n = τ =1 τ · mτ ), we can break the summation above as follows m n τ 1 1XX 1 log M ≤ [ τ H̃(µτ,k , )] + n n n τ =1 τ k=1 mτ n 1X X 1 = [τ H̃(µτ,k , )] + n n τ =1 τ k=1 mτ n X 1 1 1X [τ · mτ H̃(µτ,k , )] + n , = n τ =1 mτ τ k=1 where µτ,k is equal to the k-th ξj which has τj = τ . By Lemma 3, the function H̃(·, ·) is a concave function of its first argument. Therefore, by Jensen’s inequality, mτ X 1 1 1 H̃(µτ,k , ) ≤ H̃(µτ , ), mτ τ τ (11) k=1 where µτ = mτ n X 1 X µτ,k . Using (11) and the equation n = τ · mτ , we have: mτ τ =1 k=1 n X τ · mτ 1 1 [ Pn log M ≤ H̃(µτ , )] + n n τ τ =1 τ · mτ τ =1 n X (12) 1 [πτ H̃(µτ , )] + n , = τ τ =1 where πτ = Pnτ ·mτ τ =1 τ ·mτ . The packet rates of the users could be written as follows: m n m τ 1X 1 XX re = τj ξj = τ µτ,k n j=1 n τ =1 k=1 mτ n n X 1 X 1 1X τ mτ µτ,k = τ mτ µτ = n τ =1 mτ n τ =1 k=1 = n X n X τ · mτ Pn πτ µτ , µτ = τ =1 τ · mτ τ =1 τ =1 and rd = n X 1 πτ . τ τ =1 Therefore, the constraint could be written as follows: n X 1 πτ (µτ + ) = 1. τ τ =1 (13) Suppose the set of pairs {(µτ , τ1 )}nτ=1 satisfies (13) and maximizes the right hand side of (12). By Lemma 4, there exists another set of pairs {(µ̂τ , τ1 )}nτ=1 with µ̂τ defined as   µ if 0 ≤ µτ ≤ 12 , τ µ̂τ =  1−µ if 12 ≤ µτ ≤ 1, τ 11 that gives the same value for the right-hand side of (12), but it has Pn τ =1 πτ (µ̂τ + τ1 ) ≤ Pn τ =1 πτ (µτ + τ1 ). Therefore, Ud can increase his packet rate and increase the information rate using the values µ̂τ . Hence, in the maximizing set, for all τ , we have 0 ≤ µτ ≤ 12 . Therefore, the optimal operating point will be on the line re + rd = 1, with 0 ≤ re ≤ 1 2 and 1 2 ≤ rd ≤ 1. Applying Lemma 3, we can replace all pairs of form (µτ , τ1 ), τ ≥ 2, with a single pair of form (µ, 21 ): Lemma 6. For any set of pairs S = {(µτ , τ1 ), τ ∈ [n]} where for all τ , 0 ≤ µτ ≤ 21 , with weights {πτ , τ ∈ [n]} with operating point on the line 0 ≤ re ≤ 1 2 and 1 2 ≤ rd ≤ 1, there exists 0 ≤ α ≤ 1 and 0 ≤ γ1 , γ2 ≤ 1 2 such that 1 α(γ1 + 1) + (1 − α)(γ2 + ) = 1, 2 and n X 1 1 [πτ H̃(µτ , )] ≤ αH̃(γ1 , 1) + (1 − α)H̃(γ2 , ). τ 2 τ =1 Proof. For all τ ∈ {3, ..., n}, there exists βτ ∈ [0, 1], such that 1 1 βτ (µ1 , 1) + (1 − βτ )(µτ , ) = (µτ2 , ), τ 2 Clearly, the set {(µ1 , 1), (µ2 , 12 ), (µ32 , 12 ), ..., (µn2 , 12 )} can also give the same operating point as S does. By Lemma 3, 1 1 βτ H̃(µ1 , 1) + (1 − βτ )H̃(µτ , ) ≤ H̃(µτ2 , ), τ 2 ∀τ ∈ {3, ..., n}, Therefore, n X 1 1 1 ζτ (βτ H̃(µ1 , 1) + (1 − βτ )H̃(µτ , )) πτ H̃(µτ , ) = ζ1 H̃(µ1 , 1) + ζ2 H̃(µ2 , ) + τ 2 τ τ =3 τ =1 n X n X 1 1 ζτ H̃(µτ2 , ) ≤ ζ1 H̃(µ1 , 1) + ζ2 H̃(µ2 , ) + 2 2 τ =3 Pn ζ2 µ2 + τ =3 ζτ µτ2 1 ≤ ζ1 H̃(µ1 , 1) + (1 − ζ1 )H̃( , ), 1 − ζ1 2 where π1 = ζ1 + Pn τ =3 ζτ βτ , (14) π2 = ζ2 and πτ = ζτ (1 − βτ ) for 3 ≤ τ ≤ n and we have used Lemma 3 again in the last inequality. From Lemmas 5 and 6, we have: 1 1 log M ≤ αH̃(γ1 , 1) + (1 − α)H̃(γ2 , ) + n n 2 1 ≤ sup αH̃(γ1 , 1) + (1 − α)H̃(γ2 , ) + n . 2 α,γ1 ,γ2 12 Letting n → ∞, n goes to zero and we have 1 C ≤ sup αH̃(γ1 , 1) + (1 − α)H̃(γ2 , ) 2 α,γ1 ,γ2 s.t. 1 α(γ1 + 1) + (1 − α)(γ2 + ) = 1, 2 where 0 ≤ α ≤ 1 and 0 ≤ γ1 , γ2 ≤ 12 . This completes the proof of the converse part. B. Achievability The sequence of steps in our achievability scheme is as follows: • Set α = 0.177 − δ, for a small and positive value of δ. • Fix a binary distribution P1 such that P1 (1) = 0.43 and P1 (0) = 0.57. Generate a binary codebook C1 containing 2αnR1 sequences of length αn of i.i.d. entries according to P1 . Fix a ternary distribution P2 over set of symbols {a0 , a1 , a2 } such that P2 (a0 ) = 0.43, P2 (a1 ) = 0.325 and P2 (a2 ) = 0.245. Generate a ternary codebook C2 containing 2(1−α)nR2 sequences of length 21 (1 − α)n of i.i.d. entries according to P2 . Substitute a0 with 00, a1 with 10 and a2 with 11, so we will have 2(1−α)nR2 binary sequences of length (1 − α)n. Combine C1 and C2 to get C, such that C has 2n(αR1 +(1−α)R2 ) binary sequences of length n where we concatenate i-th row of C1 with j-th row of C2 to make the ((i − 1)(2(1−α)nR2 ) + j)-th row of C (note that 2(1−α)nR2 is the number of rows in C2 ). Rows of C are our codewords. In above, n should be chosen such that αnR1 , αn, (1 − α)nR2 and 12 (1 − α)n are all integers. • Encoding: UdT sends the stream of all ones (one packet in each time slot) in the first αn time slots and sends bit stream of concatenated 10’s for the rest of (1 − α)n time slots. To send message m, UeT sends the corresponding row of C, that is, it sends the corresponding part of m from C1 in the first αn time slots and the corresponding part of m from C2 in the rest of (1 − α)n time slots. • Decoding: Assuming the queue is not empty,2 since there is no noise in the system, the decoder can always learn the exact sequence sent by Ue . Consequently, we will have: C≥ log2 2n(αR1 +(1−α)R2 ) n = αR1 + (1 − α)R2 . 2 Since in our achievable scheme, UdT ’s packets are spaced by either one or two time slots, it is enough to have one packet buffered in the queue, where since we are working in the heavy traffic regime, it will not be a problem. 13 Node 𝑈𝑒𝑅 Node 𝑈𝑒𝑇 FCFS Scheduler Node 𝑈𝑝𝑇 Node 𝑈𝑝𝑅 Node 𝑈𝑑𝑇 Node 𝑈𝑑𝑅 Fig. 4: Covert queueing channel in a system with three users. In infinite block-length regime, where n → ∞, we can choose R1 = H(P1 ), R2 = 21 H(P2 ) and find codebooks C1 and C2 such that this scheme satisfies the rate constraint. Therefore, 1 C ≥ αH(P1 ) + (1 − α) H(P2 ). 2 Substituting the values in the expression above, and letting δ go to zero, we see that the rate 0.8114 bits per time slot is achievable. V. T HREE - USER C ASE As an extension to the basic problem, in this section we consider the case that a third user is also using the shared scheduler. We add user Up to our basic system model. This user has nodes UpT and UpR as his transmitter and receiver nodes, respectively (Figure 4). We assume that the node UpT sends packets according to a Bernoulli process with rate rp to the shared scheduler. The shared scheduler is again assumed to be FCFS with service rate 1 and we analyze the capacity for coding schemes satisfying queueing stability condition in the asymptotic regime where the operating point is converging to the line re + rp + rd = 1. Also, in this section we consider the extra assumption that the inter-arrival time of the packets in the probe stream is upper bounded by the value τmax . Assuming that a sufficient number of packets are buffered in the shared queue, user Ud can still count the number of packets sent by the other two users between any of his own consecutive packets, yet he cannot distinguish between packets sent by user Ue and the packets sent by user Up . Hence, user Ud has uncertainty in estimating the values of X. We model this uncertainty as a noise in receiving X. Suppose UdT sends two packets with τi = 2. Each of the other users can possibly send at most 2 packets in the interval [Ai , Ai+1 ) and hence, Y ∈ {0, 1, 2, 3, 4}. Therefore, we have the channel shown in Figure 5 for this example. In the general case, for the inter-arrival time 14 (1 − 𝑟𝑝 ) 2 0 (1 − 𝑟𝑝 ) 2 1 X 0 1 (1 − 𝑟𝑝 ) 2 2 2 Y 3 4 Fig. 5: Channel between the encoder and the decoder of the system for the case that the inter-arrival time of two packets of the probe stream is 2. 𝑊 𝑋1 𝑌1 𝑋2 𝑌2 ⁞ ⁞ 𝑋𝑚 𝑌𝑚 𝑊 Fig. 6: The graphical model representing the statistical relation between W , X m , Y m and Ŵ . τ , given X = x, we have Y ∈ {x + 0, ..., x + τ } such that   τ P r(Y = i + x|X = x) = (rp )i (1 − rp )τ −i , i i ∈ {0, ..., τ }, (15) which is a binomial distribution Bin(τ, rp ). Therefore, the support of the random variable Y is {0, 1, ..., 2τ }. For the mean of Y , we have: E[Y |τ ] = E[E[Y |X, τ ]|τ ] = E[X + τ rp |τ ] = τ (re + rp ). (16) Because of user Up ’s stream, the encoder is not aware of the stream received at node UeR beforehand and this output can provide information to the encoder about UpT ’s stream. The more packets node UeT sends to the scheduler, the more information this stream contains about UpT ’s stream. Using this information, the encoder can have an estimation of the output of the channel at the decoder’s side and hence it could be considered as a noisy feedback to the encoder. Figure 6 shows the graphical model for random variables in our system. 15 The main result of this section is evaluation of the capacity of the introduced channel, presented in Theorem 2. In the following, the subscript rp denotes that the calculation is done when the rate of Up is rp . Theorem 2. If the rate of Up is rp , the capacity of the timing channel in a shared FCFS scheduler with service rate 1 depicted in Figure 4 is given by C(rp ) = 1 1 αI˜rp (γ1 , ) + (1 − α)I˜rp (γ2 , ) τ τ + 1 α,γ1 ,γ2 ,τ sup (17) s.t. α(γ1 + 1 1 ) + (1 − α)(γ2 + ) = 1 − rp , τ τ +1 where 0 ≤ α ≤ 1 and 0 ≤ γ1 , γ2 ≤ 1 and 1 ≤ τ ≤ τmax − 1. The function I˜rp : [0, 1] × { k1 : k ∈ N} 7→ [0, 1] is defined as: 1 1 I˜rp (γ, ) = k k sup Irp (X; Y ), k ∈ N, 0 ≤ γ ≤ 1. (18) X∈{0,1,...,k} E[X]=kγ The proof is based on converse and achievability arguments. Before giving the proof, we first investigate some ˜ of the properties of the function I. Lemma 7. The function I˜rp could be computed using the following expression: 1 1 1 1 I˜rp (γ, ) = Ȟrp (γ, ) − H(Bin(k, rp )), k k k k 1 where Ȟrp (γ, ) = k sup (19) Hrp (Y ) and the second term is the entropy of the binomial distribution with X∈{0,1,...,k} E[X]=kγ parameters k and rp . See Appendix E for the proof of Lemma 7. In order to calculate Ȟrp (γ, k1 ), the following optimization problem should be solved: max log2 e PX ≥0 2k X i=0 s.t. PY (i) ln( 1 ) PY (i)   Pk iP (i) = E[X] = kγ, X i=0  Pk P (i) = 1, i=0 X (20) where PY = PX ∗ PBin(k,rp ) , that is, PY (i) = k X PX (j)PBin(k,rp ) (i − j), i ∈ {0, 1, ..., 2k}. j=0 Figure 7 shows the functions I˜0 (γ, k1 ), I˜0.1 (γ, k1 ) and I˜0.2 (γ, k1 ) for different values of γ and k ∈ {1, 2, 3}. 16 (21) 1 0.9 k=1 0.8 k=2 k=3 0.7 1 1 0.9 0.9 0.8 0.8 0.7 0.7 k=1 0.6 0.6 0.6 I~0:2 I~0 I~0:1 k=2 0.5 0.5 k=3 k=2 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 k=1 0.5 0.4 k=3 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 . . . Fig. 7: I˜rp (γ, k1 ) for different values of γ and k ∈ {1, 2, 3} and rp ∈ {0, 0.1, 0.2}. 1 0.9 0.8 0.7 C(rp ) 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 rp Fig. 8: capacity of the timing channel in the shared FCFS scheduler of Figure 4 for different values of rp . Lemma 8. For all 0 ≤ rp ≤ 1, integers 1 ≤ k1 , k2 , k3 ≤ τmax , values 0 ≤ γ1 , γ2 , γ3 ≤ 1, and α ∈ [0, 1] such 1 1 1 that α(γ1 , ) + (1 − α)(γ3 , ) = (γ2 , ), we have: k1 k3 k2 1 1 1 (22) αI˜rp (γ1 , ) + (1 − α)I˜rp (γ3 , ) ≤ I˜rp (γ2 , ) k1 k3 k2 See Appendix F for the proof of Lemma 8. Using the mentioned properties, the capacity of the timing channel in the shared FCFS scheduler of Figure 4 for different values of rp can be calculated. Figure 8 shows the value of the capacity with respect to rp . The following proof of Theorem 2 is based on converse and achievability arguments. A. Converse Suppose the rate of Up is rp . Similar to the proof of Lemma 5, for the timing channel in a shared FCFS scheduler with service rate 1 depicted in Figure 4, any code consisting of a codebook of M equiprobable binary codewords, 17 where messages take on average n time slots to be received, satisfies 1 1 log M ≤ Irp (W ; Ŵ |τ m ) + n n n (a) 1 ≤ Irp (W ; Y m |τ m ) + n , n where n = 1 n (H(Pe ) + Pe log2 (M − 1)) and (a) follows from data processing inequality in the model in Figure 6. Therefore, m 1X 1 log M ≤ Ir (W ; Yj |Y j−1 τ m ) + n n n j=1 p m ≤ (a) 1X Ir (W, Y j−1 ; Yj |τ m ) + n n j=1 p m ≤ 1X Ir (Xj ; Yj |τ m ) + n n j=1 p ≤ 1X max Ir (Xj ; Yj |τ m ) + n , n j=1 PXj |τ m p m where (a) again follows from data processing inequality in the model in Figure 6. In the maximization above, the mean of the distribution PXj |τ m is E[Xj |τ m ] and in order to find the maximum information rate, the set of means, m 1X E[Xj |τ m ] + {E[X1 |τ m ], E[X2 |τ m ], ..., E[Xm |τ m ]}, should satisfy the constraint re + rp + rd = 1, that is, n j=1 rp + rd = 1. Let ξj = E[Xj |τ m ] . τj Using (18), we have: max PXj |τ m E[Xj |τ m ]=τj ξj Irp (Xj ; Yj |τ m ) = τj I˜rp (ξj , This implies that 1 ). τj (23) m 1X ˜ 1 1 log M ≤ τj I(ξj , ) + n . n n j=1 τj Next, using Lemma 8 and similar to the proof of Lemma 5, by breaking the summation, using Jensen’s inequality τX max τ · mτ , we will have: and the equation n = τ =1 τX max 1 1 log M ≤ πτ I˜rp (µτ , ) + n , n τ τ =1 (24) τ · mτ where µτ is the average of ξj ’s which have τj = τ and πτ = Pτmax . In this expression, πτ could be τ =1 τ · mτ interpreted as the portion of time that user Ud sends packets with inter-arrival time equal to τ . Also, using the same approach as the one used in the proof of Lemma 5, the constraint of the problem could be written as follows: τX max τ =1 πτ (µτ + 1 ) = 1 − rp . τ 18 (25) Pτ 1 ˜ Suppose the set of pairs S = {(µτ , τ1 ), τ ∈ [τmax ]} with weights {πτ , τ ∈ [τmax ]} gives τmax =1 πτ Irp (µτ , τ ) P τmax 1 1 and has its operating point on the line re + rd = 1 − rp , and we have τ1∗ ≤ τ =1 πτ τ ≤ τ ∗ +1 , for some 1 ≤ τ ∗ ≤ τmax − 1. We have   β (µ ∗ , 1 ) + (1 − β )(µ , 1 ) = (µτ ∗ , 1 ) τ τ +1 τ ∗ +1 τ τ τ τ τ∗  β (µ ∗ , 1 ) + (1 − β )(µ , 1 ) = (µτ ∗ , 1 ) τ τ τ∗ τ τ τ τ +1 τ ∗ +1 τ ≤ τ ∗ − 1, τ ≥ τ ∗ + 2, for some βτ ∈ [0, 1]. Clearly, the set {(µ1τ ∗ , ∗ ∗ 1 1 1 1 1 1 ), · · · , (µττ ∗ −1 , ∗ ), (µτ ∗ , ∗ ), (µτ ∗ +1 , ∗ ), (µττ ∗ +2 ), · · · , (µττmax )} ∗ +1 , +1 , ∗ ∗ ∗ τ τ τ τ +1 τ +1 τ +1 can give the same operating point as S does. Therefore, using the technique presented in (14) and twice use of Lemma 8 we have 1 1 1 log M ≤ αI˜rp (γ1 , ∗ ) + (1 − α)I˜rp (γ2 , ∗ ) + n n τ τ +1 1 1 ) + n . ≤ sup αI˜rp (γ1 , ) + (1 − α)I˜rp (γ2 , τ τ +1 α,γ1 ,γ2 ,τ Letting n → ∞, n goes to zero and we get the desired result. B. Achievability Achieving the proposed upper bound could be done by a method exactly like the one used in Subsection IV-B. We need to solve the optimization problem (17) to find parameters α, γ1 , γ2 and τ . Because of Lemma 8, in order to find the optimal τ , we can start with τ = 1 and optimize other parameters and then calculate αI˜rp (γ1 , τ1 ) + (1 − 1 α)I˜rp (γ2 , τ +1 ) and, in each step, increase the value of τ by 1, stopping whenever the obtained value is decreased compared to the previous step. For instance, for rp ≤ 0.1, the optimal τ is 1, and hence the procedure stops after checking two steps. After calculating parameters γ1 , γ2 and τ , the optimal input distribution could be obtained using optimization problem (20). VI. C ONCLUSION We studied convert queueing channels (CQCs) that can occur through delays experienced by users who are sharing a scheduler. As the scheduling policy plays a crucial role in the possible information transmission rate in this type of channel, we focused on deterministic and work-conserving FCFS scheduling policy. An informationtheoretic framework was proposed to derive the capacity of the CQC under this scheduling policy. First, we studied a system comprising a transmitter and a receiver that share a deterministic and work-conserving FCFS scheduler. We obtained the maximum information transmission rate in this CQC and showed that an information leakage rate as high as 0.8114 bits per time slot is possible. We also considered the effect of the presence of other users on the information transmission rate of this channel. We extended the model to include a third user who also uses the shared resource and studied the effect of the presence of this user on the information transmission rate. The solution approach presented in this extension may be applied to calculate the capacity of the covert queueing channel 19 among any number of users. The achievable information transmission rates obtained from this study demonstrate the possibility of significant information leakage and great privacy threats brought by CQCs in FCFS schedulers. Based on this result, special attention must be paid to CQCs in high security systems. Finding the capacity of CQCs under other scheduling policies, especially non-deterministic policies, remains to be done in the research area of covert communications and is considered as the main direction for future work. Furthermore, a comprehensive study is required to design suitable scheduling policies that can simultaneously guarantee adequate levels of both security and throughput. A PPENDIX A P ROOF OF S TABILITY For the system model with M users and service rate ρ, the arrival process has a Poisson binomial distribution with probability mass function P (K = k) = X Y A∈Fk i∈A Y ri (1 − rj ), j∈Ac with support k ∈ {0, 1, ..., M }, where Fk is the set of all subsets of k integers that can be selected from M X ri . {1, 2, 3, ..., M }. The mean of this distribution is µ = i=1 We denote arrival, service and queue length at time k, with a(k), s(k) and q(k), respectively, and we have q(k + 1) = (q(k) + a(k) − s(k))+ . Using Foster-Lyapunov theorem with Lyapunov function V (q(k)) = (q(k))2 and calculating the drift, we have E[q 2 (k + 1) − q 2 (k)|q(k) = q] ≤ E[(q + a − s)2 − q 2 ] = E[2q(a − s)] + E[(a − s)2 ], where E[(a − s)2 ] is a constant and we denote it by K. Therefore, for some  > 0, if µ < ρ, for large enough value of q, we have E[q 2 (k + 1) − q 2 (k)|q(k) = q] ≤ 2q(µ − ρ) + K ≤ −, which implies the stability. A PPENDIX B P ROOF OF L EMMA 1 In order to find the optimum distribution, PX , the optimization problem could be written as follows: max log2 e PX ≥0 k X i=0 s.t. PX (i) ln( 1 ) PX (i)   Pk iP (i) = E[X] = kγ, X i=0  Pk P (i) = 1, i=0 X 20 (26) which could be solved using the Lagrange multipliers method. The Lagrangian function would be as follows: k X PX (i) ln( i=0 k k X X 1 ) + λ( iPX (i) − kγ) + ρ( PX (i) − 1). PX (i) i=0 i=0 Setting the derivative with respect to PX (i) equal to zero, we get ln( PX1(i) ) − 1 + iλ + ρ = 0, which implies that PX (i) = eρ−1 · eiλ . (27) Also, from the second constraint we have k X i=0 eρ−1 · eiλ = 1 ⇒ eρ−1 = Pk 1 i=0 eiλ . (28) Combining (27) and (28), we have: eiλ PX (i) = Pk i=0 eiλ , which is the tilted distribution of Uk with parameter λ. In order to calculate λ, from the first constraint: k X kγ = k X iPX (i) = k X i=0 i=0 eiλ i Pk i=0 eiλ = ieiλ i=0 k X = eiλ E[Uk eUk λ ] d = (ln E[eUk λ ]) U λ k E[e ] dλ i=0 0 = ψU (λ). k A PPENDIX C P ROOF OF LEMMA 3 First we note that 1 1 ∗ (kγ) log2 e] H̃(γ, ) = [log2 (k + 1) − ψU k k k Pk eiλ 1 1 )} log2 e] = [ log2 (k + 1) − sup{kγλ − log( i=0 k k λ k+1 = −sup{γλ log2 e − λ k X 1 log2 ( eiλ )}. k i=0 k X 1 1 Therefore, if we can show that for any given λ the function h(γ, ) = γλ log2 e − log2 ( eiλ ) is convex, then k k i=0 since the supremum of convex functions is convex, we can conclude the desired concavity of the function H̃(·, ·). k X 1 1 1 − e(k+1)λ Noting that log2 ( eiλ ) = log2 ( ), to prove the convexity of h(·, ·), it suffices to prove that the k k 1 − eλ i=0 1 1 − e( x +1)λ function g(x) = x log( ), 0 < x ≤ 1, is concave. This is true from the concavity of the function 1 − eλ (x+1)λ 1−e ĝ(x) = log( ), and the fact that for any function f , xf ( x1 ) is concave if f (x) is concave. The concavity 1 − eλ of the function ĝ(·) can be easily seen by taking its second derivative. 21 A PPENDIX D P ROOF OF L EMMA 4 ∗ For a given γ and support set {0, 1, ..., k}, suppose the distribution PX is defined over {0, 1, ..., k} and has mean EP ∗ [X] = kγ and sup X∈{0,1,...,k} E[X]=kγ 1 1 ∗ H(X) = H(PX ). k k Define distribution QX as follows: ∗ QX (i) = PX (k − i), 0 ≤ i ≤ k, ∗ Therefore the entropy of QX will be the same as the entropy of PX and we have EQ [X] = k X iQX (i) = i=0 k X ∗ iPX (k − i) = − i=0 k X =k− k X ∗ (−k + (k − i))PX (k − i) i=0 ∗ (k − i)PX (k − i) = k − kγ = k(1 − γ). i=0 Hence, we have 1 1 1 1 ∗ sup H(X) = H(PX ) = H(QX ) ≤ H̃(γ, ) = k k k k X∈{0,1,...,k} E[X]=kγ sup X∈{0,1,...,k} E[X]=k(1−γ) 1 1 H(X) = H̃(1 − γ, ). k k (29) Similarly, suppose for the distribution Q∗X , defined over {0, 1, ..., k} and with mean EQ∗ [X] = k(1 − γ), sup X∈{0,1,...,k} E[X]=k(1−γ) 1 1 H(X) = H(Q∗X ). k k Define distribution PX as follows: PX (i) = Q∗X (k − i), 0 ≤ i ≤ k, Therefore the entropy of PX will be the same as the entropy of Q∗X and we have EP [X] = k X iPX (i) = iQ∗X (k k X (−k + (k − i))Q∗X (k − i) − i) = − i=0 i=0 =k− k X i=0 k X (k − i)Q∗X (k − i) = k − k(1 − γ) = kγ. i=0 Hence, we have 1 H̃(1 − γ, ) = k sup X∈{0,1,...,k} E[X]=k(1−γ) 1 1 1 1 1 H(X) = H(Q∗X ) = H(PX ) ≤ sup H(X) = H̃(γ, ). k k k k X∈{0,1,...,k} k E[X]=kγ Comparing (29) and (30) gives the desired result. 22 (30) A PPENDIX E P ROOF OF L EMMA 7 1 1 I˜rp (γ, ) = sup Irp (X; Y ) k k X∈{0,1,...,k} E[X]=kγ = 1 [Hrp (Y ) − Hrp (Y |X)] X∈{0,1,...,k} k sup E[X]=kγ = k X 1 [Hrp (Y ) − PX (x)Hrp (Y |X = x)] X∈{0,1,...,k} k x=0 sup E[X]=kγ (a) = k X 1 [Hrp (Y ) − PX (x)H(Bin(k, rp ))] X∈{0,1,...,k} k x=0 sup E[X]=kγ = 1 [Hrp (Y ) − H(Bin(k, rp ))] k X∈{0,1,...,k} sup E[X]=kγ = 1 1 Hrp (Y ) − H(Bin(k, rp )) k k X∈{0,1,...,k} sup E[X]=kγ 1 1 1 = Ȟrp (γ, ) − H(Bin(k, rp )), k k k where (a) follows from (15). A PPENDIX F P ROOF OF L EMMA 8 ˜ ·) is concave in its first argument. Let P ∗ and P ∗ be the optimum We first prove that the function I(·, X1 X3 distributions resulted from optimization problem (20) for parameters (γ1 , k1 ) and (γ3 , k1 ), respectively. Therefore for any 0 ≤ α ≤ 1, 1 1 αI˜rp (γ1 , ) + (1 − α)I˜rp (γ3 , ) k k 1 1 (a) 1 ∗ ∗ = αH(PX ∗ Bin(k, rp )) + (1 − α)H(PX ∗ Bin(k, rp )) − H(Bin(k, rp )) 1 3 k k k (b) 1 1 ∗ ∗ ∗ Bin(k, rp )) + (1 − α)(PX ∗ Bin(k, rp ))) − H(Bin(k, rp )) ≤ H(α(PX 1 3 k k 1 1 sup H(PX ∗ Bin(k, rp )) − H(Bin(k, rp )) ≤ k k X∈{0,1,...,k} E[X]=k(αγ1 +(1−α)γ3 ) 1 = I˜rp (αγ1 + (1 − α)γ3 , ), k where (a) follows from Lemma 7 and (b) follows from the concavity of the entropy function. 23 ˜ there is no straightforward analytic Because of the complexity and lack of symmetry or structure in the function I, method for proving its concavity. But we notice that it is suffices to show that for all 2 ≤ k ≤ τmax − 1, and α such that α 1 1 1 + (1 − α) = , k−1 k+1 k (31) we have αI˜rp (γ1 , From (31) we have α = 1 1 1 ) + (1 − α)I˜rp (γ3 , ) ≤ I˜rp (αγ1 + (1 − α)γ3 , ). k−1 k+1 k k−1 , hence using Lemma 7, (32) reduces to 2k 1 1 1 ) − Ȟrp (γ3 , ) + f (k, rp ) ≥ 0, 2Ȟrp (γ2 , ) − Ȟrp (γ1 , k k−1 k+1 (32) (33) where f (k, rp ) = H(Bin(k − 1, rp )) + H(Bin(k + 1, rp )) − 2H(Bin(k, rp )). Noting that the left-hand side is a Lipschitz continuous function of γ1 , γ3 (away from zero), and rp and the fact that k takes finitely many values, the validation of inequality (33) can be done numerically. R EFERENCES [1] A. Ghassami, X. Gong, and N. Kiyavash, “Capacity limit of queueing timing channel in shared FCFS schedulers,” in 2015 IEEE International Symposium on Information Theory (ISIT), pp. 789–793, IEEE, 2015. [2] V. Gligor, “Covert channel analysis of trusted systems. a guide to understanding,” tech. rep., DTIC, 1993. [3] S. Kadloor, X. Gong, N. Kiyavash, T. Tezcan, and N. Borisov, “Low-cost side channel remote traffic analysis attack in packet networks,” in Communications, 2010 IEEE International Conference on, IEEE, 2010. [4] D. Wakabayashi, “Breach complicates Sony’s network ambitions,” The Wall Street Journal, April 28, 2011. [5] N. McKeown, T. Anderson, H. Balakrishnan, G. Parulkar, L. Peterson, J. Rexford, S. Shenker, and J. Turner, “Openflow: enabling innovation in campus networks,” ACM SIGCOMM Computer Communication Review, vol. 38, no. 2, pp. 69–74, 2008. [6] M. Liberatore and B. N. Levine, “Inferring the source of encrypted http connections,” in Proceedings of the 13th ACM conference on Computer and communications security, pp. 255–263, ACM, 2006. [7] D. X. Song, D. Wagner, and X. Tian, “Timing analysis of keystrokes and timing attacks on SSH.,” in USENIX Security Symposium, vol. 2001, 2001. [8] C. V. Wright, L. Ballard, S. E. Coull, F. Monrose, and G. M. Masson, “Uncovering spoken phrases in encrypted voice over ip conversations,” ACM Transactions on Information and System Security (TISSEC), vol. 13, no. 4, p. 35, 2010. [9] X. Gong, N. Borisov, N. Kiyavash, and N. Schear, “Website detection using remote traffic analysis,” in International Symposium on Privacy Enhancing Technologies Symposium, pp. 58–78, Springer, 2012. [10] X. Gong, N. Kiyavash, and P. Venkitasubramaniam, “Information theoretic analysis of side channel information leakage in FCFS schedulers,” in Information Theory Proceedings (ISIT), 2011 IEEE International Symposium on, pp. 1255–1259, IEEE, 2011. [11] S. Kadloor, N. Kiyavash, and P. Venkitasubramaniam, “Mitigating timing based information leakage in shared schedulers,” in INFOCOM, 2012 Proceedings IEEE, pp. 1044–1052, IEEE, 2012. [12] X. Gong and N. Kiyavash, “Quantifying the information leakage in timing side channels in deterministic work-conserving schedulers,” arXiv preprint arXiv:1403.1276, 2014. [13] V. Anantharam and S. Verdu, “Bits through queues,” IEEE Transactions on Information Theory, vol. 42, no. 1, pp. 4–18, 1996. [14] S. Cabuk, C. E. Brodley, and C. Shields, “Ip covert timing channels: design and detection,” in Proceedings of the 11th ACM Conference on Computer and Communications Security, pp. 178–187, ACM, 2004. [15] S. J. Murdoch and S. Lewis, “Embedding covert channels into TCP/IP,” in International Workshop on Information Hiding, 2005. 24 [16] D. Llamas, A. Miller, and C. Allison, “An evaluation framework for the analysis of covert channels in the TCP/IP protocol suite.,” in ECIW, pp. 205–214, 2005. [17] M. H. Kang, I. S. Moskowitz, and D. C. Lee, “A network pump,” IEEE Transactions on Software Engineering, vol. 22, no. 5, pp. 329–338, 1996. [18] S. K. Gorantla, S. Kadloor, N. Kiyavash, T. P. Coleman, I. S. Moskowitz, and M. H. Kang, “Characterizing the efficacy of the nrl network pump in mitigating covert timing channels,” IEEE Transactions on Information Forensics and Security, vol. 7, no. 1, pp. 64–75, 2012. [19] R. Soltani, D. Goeckel, D. Towsley, and A. Houmansadr, “Covert communications on poisson packet channels,” in Communication, Control, and Computing (Allerton), 2015 53rd Annual Allerton Conference on, pp. 1046–1052, IEEE, 2015. [20] R. Soltani, D. Goeckel, D. Towsley, and A. Houmansadr, “Covert communications on renewal packet channels,” in Communication, Control, and Computing (Allerton), 2016 54th Annual Allerton Conference on, pp. 548–555, IEEE, 2016. [21] P. Mukherjee and S. Ulukus, “Covert bits through queues,” in Communications and Network Security (CNS), 2016 IEEE Conference on, pp. 626–630, IEEE, 2016. [22] V. Berk, A. Giani, G. Cybenko, and N. Hanover, “Detection of covert channel encoding in network packet delays,” Rapport Technique TR536, de lUniversité de Dartmouth, p. 19, 2005. [23] S. Gianvecchio and H. Wang, “Detecting covert timing channels: an entropy-based approach,” in Proceedings of the 14th ACM conference on Computer and communications security, pp. 307–316, ACM, 2007. [24] R. Tahir, M. T. Khan, X. Gong, A. Ahmed, A. Ghassami, H. Kazmi, M. Caesar, F. Zaffar, and N. Kiyavash, “Sneak-peek: High speed covert channels in data center networks,” in IEEE International Conference on Computer Communications (INFOCOM), IEEE, 2016. [25] A. Ghassami, A. Yekkehkhany, N. Kiyavash, and Y. Lu, “A covert queueing channel in round robin schedulers,” arXiv preprint arXiv:1701.08883, 2017. [26] T. M. Cover and J. A. Thomas, Elements of Information Theory. John Wiley & Sons, 2012. [27] I. Csiszar and J. Körner, Information Theory: Coding Theorems for Discrete Memoryless Systems. Cambridge University Press, 2011. [28] Y. Polyanskiy and Y. Wu, “Lecture notes on information theory, MIT (6.441), UIUC (ECE 563),” 2014. 25
7cs.IT
Faster Algorithms for Large-scale Machine Learning using Simple Sampling Techniques arXiv:1801.05931v2 [cs.LG] 5 Feb 2018 Vinod Kumar Chauhan 1 Kalpana Dahiya 2 Anuj Sharma 1 Abstract Now a days, the major challenge in machine learning is the ‘Big Data’ challenge. The big data problems due to large number of data points or large number of features in each data point, or both, the training of models have become very slow. The training time has two major components: Time to access the data and time to process (learn from) the data. In this paper, we have proposed one possible solution to handle the big data problems in machine learning. The idea is to reduce the training time through reducing data access time by proposing systematic sampling and cyclic/sequential sampling to select mini-batches from the dataset. To prove the effectiveness of proposed sampling techniques, we have used Empirical Risk Minimization, which is commonly used machine learning problem, for strongly convex and smooth case. The problem has been solved using SAG, SAGA, SVRG, SAAG-II and MBSGD (Mini-batched SGD), each using two step determination techniques, namely, constant step size and backtracking line search method. Theoretical results prove the same convergence for systematic sampling, cyclic sampling and the widely used random sampling technique, in expectation. Experimental results with bench marked datasets prove the efficacy of the proposed sampling techniques. 1. Introduction The technological developments and the availability of a number of data sources have evolved the data into ‘Big Data’, where the meaning of ‘Big’ in ‘Big Data’ is continuously changing because of increasing of size of datasets. Big data has multiple aspects, like, volume, velocity, variety and veracity etc., and one aspect, namely, volume, i.e., size of datasets have posed a challenge to the machine learners to train the models over these large datasets. These problems which can be called as large-scale or big data problems, have large number of data points or large number of features in each data point, or both, which lead to slow training of models. So now a days, the major challenge is to develop efficient and scalable learning algorithms for dealing with big data problems (Zhou et al., 2017; Chauhan et al., 2017; 2018). The training time of models have two major components (Yu et al., 2010) as: training time = time to access data + time to process data. As it is known that for processing any data or running any program, it should be first brought into memory, more precisely into RAM (Random Access Memory), from hard disk. The time taken in brining the data or program from hard disk into memory is called access time. Access time has, further, three components, namely, seek time (it is the time taken by the reading head to move from current position up to the track containing the data), rotational latency time (it is the time taken by the reading head from the current position to reach up to the sector/block containing the data) and transfer time (it is the time taken to transfer data from sector/block over the disk to memory). Moreover, data is not read content wise rather block-wise, where each block can have multiple sectors. Now, it is interesting to note that for data stored on the contiguous memory or in the close proximity, has lesser data access time as compared with the data dispersed far away from each other. This is due to lesser seek, latency and transfer times. In case of SSD (Solid State Disk) and RAM (Random Access Memory), there are no seek and latency times because they do not have moving parts and they are based on direct access mechanism, but transfer time still plays its role. Since data are read/written block-wise so for contiguous data access, there would be one or two transfer times but dispersed data access would require more number of transfer times. Moreover, cache memory strategies also favor the contiguous memory access and make it faster as compared to dispersed data access. Thus contiguous data access time is faster than dispersed data access, in all the cases where data is stored on RAM, SSD or HDD. But the difference in access time would be more prominent for HDD. The second component of training time is processing (learning) time which is the time taken by the CPU (Central Processing Unit) to process the data to solve for model parameters. Due to mini-batching and iterative learning algorithms, the accessing and processing of data is intermixed and occurs quite frequently. The data Faster Algorithms for Large-scale Machine Learning access time is dependent on the sampling technique and processing time is dependent on the method used to solve the problem. Till this date, to improve the training time, most of the focus is given only to improve the processing time by using different methods. The training time is dependent on both data accessing time and data processing time, and this is to be noted that, generally, data access time is very high as compared to the data processing time. Thus, efforts should be equally done to improve the data accessing time. This paper has tried to reduce the training time for big data problems by reducing the data access time using systematic sampling technique (Madow, 1949; Madow & Madow, 1944) and cyclic sampling to select mini-batches of data points from the dataset. where Bj is the selected mini-batch of data points. The iteration complexity for solving this reduced subproblem is O(n) (for one data point) or O(n|Bj |) (for mini-batch of data points) where |Bj | is the size of mini-batch, which is very low and independent of l. Since it is easier to solve the problem (2) and this is widely used approach to handle large-scale problems so the paper uses this reduced subproblem approach. 1.1. Optimization Problem 1.2. Literature Review Empirical Risk Minimization (ERM) problem (Reddi, 2016) is a commonly used in machine learning and statistics, which typically consists of loss function and a regularizing term. In this paper, l2-regularized ERM problem with the assumptions of strong convexity and smoothness, is used for demonstrating the effectiveness of proposed sampling techniques. For the training data {(x1 , y1 ) , (x2 , y2 ) , ..., (xl , yl )}, where xi ∈ Rn , yi ∈ R, and for loss functions f1 , f2 , ..., fl : Rn → R, model parameter vector w ∈ Rn and regularization coefficient C > 0, l2-regularized ERM problem is given by Big data challenge is one of the major challenge in machine learning (Zhou et al., 2017; Chauhan et al., 2017). For dealing with big data problems, stochastic approximation (and coordinate descent) approaches are widely used (e.g., (Chang et al., 2008; Johnson & Zhang, 2013; Konečný & Richtárik, 2013; Defazio et al., 2014; Wright, 2015; Xu & Yin, 2015; Schmidt et al., 2016; Chauhan et al., 2017)), which take one or more data points (one or block of features in coordinate descent) to form a reduced subproblem during each iteration. This helps in reducing the computational complexity per iteration and thereby helps in solving large-scale problems. But due to stochastic noise, like in SGD (Stochastic Gradient Descent) method, stochastic approximation affects the solution of problem. This stochastic noise can be reduced using different techniques, like, mini-batching (Tak et al., 2013), decreasing step sizes (Shalev-Shwartz et al., 2011), importance sampling (Csiba & Richt, 2016) and variance reduction techniques (Johnson & Zhang, 2013), as discussed in (Csiba & Richt, 2016). For selecting one data point or mini-batch of data points from the dataset in stochastic approximation approach, random sampling (e.g., (Byrd et al., 2016; Defazio et al., 2014; Johnson & Zhang, 2013; Konečný & Richtárik, 2013; Li et al., 2014; Nemirovski et al., 2009; Schmidt et al., 2016; Shalev-Shwartz et al., 2011; Tak et al., 2013; Wang et al., 2017; Xu & Yin, 2015; Zhang, 2004)) is widely used, and other sampling technique are importance sampling (e.g., (Csiba & Richt, 2016; Csiba & Richtárik, 2016; Needell et al., 2014; Qu & Richt, 2015; Zhang & Gu, 2016; Zhao & Zhang, 2015)), stratified sampling (Zhao & Zhang, 2014) and adaptive sampling (Gopal, 2016). Importance sampling is a non-uniform sampling technique, which uses properties of data for finding probabilities of selection of data points in the iterative process, leading to the acceleration of training process. Importance sampling involves some overhead in calculating the probabilities and the average computational complexity l min f (w) = w 1X fi (w) + Ckwk2 , l i=1 (1) where first term is the data fitting term and second term is used for avoiding the over-fitting of data. Commonly 2 used loss functions are the square loss wT xi − yi , the  logistic loss log 1 + exp −yi wT xi and the hinge loss  max 0, 1 − yi wT xi . In this paper, experimentation uses logistic loss function. When problem represented by eq.(1) is a large-scale or big data problem then per iteration complexity of learning algorithms with traditional methods like Gradient Descent is O(nl) which is very high. This is because, such problems have large number of data points (l) or large number of features (n), or both, and each iteration updates n variables over l data points. Because of this high computational complexity per iteration it would be very expensive or even infeasible for single machine to process a single iteration of learning algorithm. Stochastic approximation approach is widely used for handling such cases (e.g., (Zhang, 2004; Nemirovski et al., 2009; Shalev-Shwartz et al., 2011; Johnson & Zhang, 2013; Konečný & Richtárik, 2013; Tak et al., 2013; Li et al., 2014; Defazio et al., 2014; Xu & Yin, 2015; Byrd et al., 2016; Schmidt et al., 2016; Chauhan et al., 2017)), which uses one data point or mini-batch of data points during each iteration. The reduced subproblem with mini-batch of data points is given by min w 1 X fi (w) + Ckwk2 , |Bj | (2) i∈Bj Faster Algorithms for Large-scale Machine Learning per iteration of importance sampling could be more than the computational complexity of the iteration in some cases, like, when it is implemented dynamically. Stratified sampling technique divides the dataset into clusters of similar data points and then mini-batch of data points are selected from the clusters. In adaptive sampling (Gopal, 2016), information about the classes, i.e., data-labels is used for selecting the data points; this technique gives good results for problems with large number of classes. Random sampling is widely used in mini-batching for large-scale learning problems (e.g., (Byrd et al., 2016; Li et al., 2014; Shalev-Shwartz et al., 2011; Tak et al., 2013)), as only (Csiba & Richt, 2016) is known importance sampling technique in mini-batching. In this paper, we have focused on simple sampling techniques which do not involve any extra overhead and can be effective for dealing with large-scale learning problems. Two simple sampling techniques, namely, systematic sampling and cyclic/sequential sampling techniques have been proposed for selecting mini-batches. To the best of our knowledge, systematic sampling is not used in machine learning for selecting data points. We are the first to introduce systematic sampling in machine learning for selection of mini-batches of data points from the dataset. Before this, cyclic sampling was used in coordinate descent and block coordinate descent methods (e.g.,(Wright, 2015)) for selecting one coordinate or block of coordinates, respectively, and to the best of our knowledge, cyclic sampling is not used for selecting mini-batches. Both sampling techniques are simple, effective and easy to implement. The proposed sampling techniques try to reduce the training time of models by reducing the data access time. Before this, for reducing the training time of models, the focus is mainly given on reducing the processing time, but this paper has focused on reducing the data access time by changing the sampling techniques. 1.3. Contributions The contributions of the article are summarized below: • Novel systematic sampling and sequential/cyclic sampling techniques have been proposed for selecting mini-batches of data points from the dataset for solving large-scale learning problems. The proposed techniques focus on reducing the training time of learning algorithms by reducing the data access time. • Experimental results prove the efficacy of systematic sampling and cyclic sampling in reducing the training time. The results have been proved using different methods each using two step determination techniques, namely, constant step size and backtracking line search methods. • Theoretical results prove the same convergence of learning algorithms using random, cyclic and systematic sampling techniques in expectation. 2. Systematic Sampling Sampling is the way of selecting one mini-batch of data points (or one data point) from the whole dataset. Iterative approximation methods used for solving the problem use sampling again and again during each iteration/epoch. The convergence of learning algorithm depends upon the type of sampling used since sampling controls two things: data access time and diversity of data. In general, when consecutive data points are used they reduce the data access time which reduces the training time but selected data points might not be diverse which affects the convergence of learning algorithm. On other hand, when data is used from different locations then the data access time is more which increases the training time but selected data points might be diverse which can improve the convergence. Thus, sampling has a significant role in the learning algorithms. Three sampling techniques, namely, random sampling, cyclic sampling and systematic sampling are discussed below and used in learning algorithm as they are simple, easy to implement and do not involve any extra overhead and thus effective in handling large-scale problems. 2.1. Definitions Suppose a mini-batch B of m data points is to be selected from a training dataset {(x1 , y1 ) , (x2 , y2 ) , ..., (xl , yl )} of l data points. • Random Sampling: Random sampling (RS) can be of two types, RS with replacement and RS without replacement. RS with replacement first selects one data point randomly from the whole dataset where each data point has equal probability of selection, then, similarly, second data point is selected randomly from the whole dataset where previously selected point has equal probability of selection, and so on to select m data points. RS without replacement first selects one data point randomly from the whole dataset where each data point has equal probability of selection, then, similarly, second data point is selected randomly from the remaining l − 1 points without considering the previously selected point, and so on to select m data points. • Cyclic/Sequential Sampling: First mini-batch is selected by taking the first 1 to m points. Second minibatch is selected by taking next m + 1 to 2m points and so on until all data points are covered. Then again start with the first data point. Faster Algorithms for Large-scale Machine Learning • Systematic Sampling: (Madow, 1949; Madow & Madow, 1944) It randomly selects the first point and then selects the remaining points according to a fixed pattern, e.g., it randomly selects a data point, say i, and then selects data points as i, i + k, ..., i + (m − 1)k as mini-batch where k is some positive integer. For simplicity, k = 1 can be taken. Example: Suppose the training dataset is given by S = {1, 2, 3, ...., 20} and size of mini-batch to be selected is m = 5, then four mini-batches can be selected/drawn from S using different sampling techniques as follows: mini-batches selected using random sampling with replacement are - B1 = {15, 2, 20, 2, 1}, B2 = {3, 10, 20, 6, 1}, B3 = {5, 9, 19, 2, 7} and B4 = {1, 11, 18, 3, 16}; mini-batches selected using random sampling without replacement are - B1 = {15, 2, 20, 11, 6}, B2 = {3, 10, 8, 14, 1}, B3 = {16, 4, 17, 7, 19} and B4 = {9, 5, 12, 18, 13}; mini-batches selected using cyclic sampling are - B1 = {1, 2, 3, 4, 5}, B2 = {6, 7, 8, 9, 10}, B3 = {11, 12, 13, 14, 15} and B4 = {16, 17, 18, 19, 20}; and mini-batches selected using systematic sampling are - B1 = {16, 17, 18, 19, 20}, B2 = {1, 2, 3, 4, 5}, B3 = {6, 7, 8, 9, 10} and B4 = {11, 12, 13, 14, 15}. As it is clear from the above examples, in random sampling with replacement, points are selected randomly with repetition inside the mini-batch or within mini-batches. Cyclic sampling is the simplest and non-probabilistic sampling, and selects the points in a sequential manner. For systematic sampling, first point is selected randomly then the remaining points are selected back to back, here idea of replacement and without replacement can be applied between mini-batches but only sampling without replacement within mini-batches is demonstrated. It is interesting to note that for RS, data points of the minibatch are dispersed over the different sectors of the disk, so every data point needs its own seek time and latency time. Since the data is read block-wise and not content-wise so it is possible that each data point is present in a different block and thus needs its own transfer time also. For CS only one seek time is needed for one mini-batch because it starts with first data point and then moves till end and for SS one seek time is needed per mini-batch because only first element is determined randomly but rest points of the mini-batch are stored on contiguous memory locations. So, seek time is the least for CS and the most for RS. The transfer time is almost equal for CS and SS but less as compared with RS because in RS, generally, each data point needs a separate transfer time but for other case it needs as many transfer times as the number of blocks required to fit the mini-batch of data points. Thus, the overall access time to access one mini-batch of data points is minimum for CS and is maximum for RS. It is observed that RS gives the best solution as compared with the CS for a given number of epochs but the access time of RS is the most. On the other hand for CS the access time is the least for a given number of epoch but the convergence is the slowest. So there is a trade-off between reducing the data access time and convergence of learning algorithm. SS balances this trade-off since SS has the best of both techniques, like CS the data points are stored on the contiguous memory locations and like RS it has some randomness as it draws the first point randomly. Overall, methods using CS and SS converges faster as compared with methods using RS, as discussed in Sec. 4. 2.2. Learning using Systematic Sampling A general learning algorithm with systematic sampling to solve large-scale problems is given by Algorithm 1. Similar learning algorithms can be obtained for cyclic and random sampling techniques by using the corresponding sampling technique for selecting the mini-batch at step 5 of Algorithm 1. The algorithm starts with the initial solution. Algorithm 1 A General Learning Algorithm with Systematic Sampling 1: Inputs: m = #mini-batches and n =max #epochs. 2: Initialize: Take initial solution w0 . 3: for k = 1, 2, ..., n do 4: for j = 1, 2, ..., m do 5: Select one mini-batch Bj using systematic sam- pling without replacement. Formulate a subproblem using mini-batch Bj as given in eq.(2). 7: Solve eq.(2) and update the solution. 8: end for 9: end for 6: It divides the dataset into m mini-batches using systematic sampling for selecting mini-batches. Inside the inner loop, it takes one mini-batch Bj , formulates a subproblem over Bj and solves the sub-problem thus formed. This process is repeated until all the sub-problems over all m mini-batches are solved. Then this solution process is repeated for the given number of epochs or other stopping criteria can be used in the algorithm. At step 7 of Algorithm 1, different solvers can be used to update the solution, like, SAG (Schmidt et al., 2016), SAGA (Defazio et al., 2014), SVRG (Johnson & Zhang, 2013), SAAG-II (Chauhan et al., 2017) and MBSGD (Chauhan et al., 2017; Cotter et al., 2011; Shalev-Shwartz et al., 2011). 3. Theoretical Analysis The proposed sampling techniques are simple but effective for solving large-scale learning problems with differ- Faster Algorithms for Large-scale Machine Learning ent solvers, as discussed in Section 4. The convergence proof of learning algorithms have been provided using the simplest solver MBSGD (mini-batched Stochastic Gradient Descent) method with constant step size, for the simplicity of proofs as the focus of study is only on sampling techniques and not on solvers. l2-regularized ERM problem has been solved under the following assumptions to demonstrate the efficacy of proposed sampling techniques. It is assumed that the regularization term is hidden inside the loss function term for notational convenience otherwise it needs to write separate gradients for regularization term. Assumption 1 (LIPSCHITZ CONTINUOUS GRADIENT). Suppose function f : Rn → R is convex and differentiable on S, and that gradient ∇f is L-Lipschitzcontinuous, where L > 0 is Lipschitz constant, then, we have, k∇f (y) − ∇f (x)k ≤ Lky − xk, (3) and, f (y) ≤ f (x) + ∇f (x)T (y − x) + L ky − xk2 . 2 (4) Assumption 2 (STRONG CONVEXITY). Suppose function f : Rn → R is µ-strongly convex function for µ > 0 on S and p∗ is the optimal value of f , then, we have, f (y) ≥ f (x) + ∇f (x)T (y − x) + and, f (x) − p∗ ≤ µ ky − xk2 , 2 1 k∇f (x)||2 2µ (5) (6) Theorem 1. Suppose for function given by eq. (1), under Assumptions 1, 2 and constant step size α, and taking solver MBSGD, Algorithm 1, converges linearly in expectation for cyclic, systematic and sequential sampling techniques. Proof. By definition of MBSGD, we have, α X wk+1 = wk − ∇fi (wk ) |Bj | (7) i∈Bj f (wk+1 ) L wk+1 − wk ≤ f (wk ) + ∇f (wk )T wk+1 − w + 2   1 P k ∇f (w ) = f (wk ) − α∇f (wk )T i |Bj | i∈Bj 2 2 Lα 1 P + ∇fi (wk ) , 2 |Bj | i∈Bj    Lα2 R02 EBj f (wk+1 ) − p∗ ≤ (1 − 2αµ) f (wk ) − p∗ + 2 Applying inequality recursively, we have,   EBj f (wk+1 ) − p∗  Lα2 R02 Pk ≤ (1 − 2αµ)k+1 f (w0 ) − p∗ + (1 − 2αµ)i 22 2 i=0  Lα R0 1 k+1 ≤ (1 − 2αµ) f (w0 ) − p∗ + . , 2 2αµ P∞ i Pk i = ≤ inequality follows since i=0 r i=0 r 1 , krk < 1. 1−r    LαR02 k+1 f (w0 ) − p∗ + EBj f (wk+1 ) − p∗ ≤ (1 − 2αµ) . 4µ Thus, algorithm converges linearly with initial error proportional to α. Case-II: Mini-batch Bj is selected using Cyclic/Sequential Sampling (SS) By L-Lipschitz continuity of gradients,  k Taking expectation on both sides over mini-batches Bj and subtracting optimal value (p∗ ), we have,   EBj f (wk+1 ) − p∗   1 P k ∇f (w ) ≤ f (wk ) − p∗ − α∇f (wk )T EBj i |Bj | i∈Bj 2 2 1 P Lα ∇fi (wk ) EBj + 2 |Bj | i∈Bj Lα2 2 ≤ f (wk ) − p∗ − α∇f (wk )T ∇f (wk ) + kR0 k , 2   1 P k ∇f (w ) = inequality follows using EBj i |Bj | i∈Bj 2 1 P k ∇f (wk ) and taking ≤ ∇f (w ) i |Bj | i∈Bj R0 , ∀j, w.   EBj f (wk+1 ) − p∗ Lα2 R02 2 ≤ f (wk ) − p∗ − α ∇f (wk ) + , 2  Lα2 R02 ≤ f (wk ) − p∗ − α.2µ f (wk ) − p∗ + , 2 inequality follows from strong convexity results. 2 equality follows from the definition of MBSGD. Case-I: Mini-batch Bj is selected using random sampling (RS) without replacement or Systematic Sampling (SS) without replacement Taking summation over number of mini-batches and dividing by number of mini-batches (m), and subtracting p∗ , we have,  1 Pm  k+1 ) − p∗ j=1 f (w m  1 Pm  k ∗ ≤ j=1 f (w ) − p m   1 Pm 1 P k −α∇f (wk )T ∇f (w ) i m j=1 kBj | i∈Bj 2 2 1 P Lα 1 Pm k , + i∈Bj ∇fi (w ) j=1 2 m |Bj | Lα2 2 ≤ f (wk ) − p∗ − α∇f (wk )T ∇f (wk ) + R0 , 2 Faster Algorithms for Large-scale Machine Learning inequality follows  1 P 1 Pm k ∇f (w ) = ∇f (wk ) i m j=1 kBj | i∈Bj 1 P ∇fi (wk ) ≤ R0 . and |Bj | i∈Bj m  1 X k+1 f (wk+1 ) − p∗ ≤ (1 − 2αµ) m j=1 since Table 1. Datasets used in experimentation Dataset HIGGS SUSY protein  LαR02 rcv1.binary 0 ∗ , ijcnn1 f (w ) − p + 4µ inequality follows from the Case-I derivation. Thus, algorithm converges linearly with initial error proportional to α. Hence, theorem is proved. 4. Experiments 4.1. Experimental Setup Experiments have been performed using five methods, namely, SAG, SAGA, SAAG-II, SVRG and MBSGD with five bench marked datasets1 as presented in the Table 3. Each method has been run with two mini-batches of size 500 and 1000 data points, and two techniques to find step size, namely, constant step size method and backtracking line search method for a predefined number of epochs. Constant step size method uses Lipschitz constant L and takes step size as 1/L for all methods. Backtracking line search is performed approximately only using the selected mini-batch of data points because performing backtracking line search on whole dataset could hurt the convergence of learning algorithm for large-scale problems by taking huge time. For one dataset, one method runs for 12 times (3(sampling techniques) ∗ 2(mini-batches) ∗ 2(step size finding techniques)), and for one dataset, three sampling techniques are compared on 20 different settings (5(methods) ∗ 2(mini-batches) ∗ 2(step size finding techniques)). Thus 100(20 ∗ 5(datasets)) settings have been used to compare the results for three sampling techniques. As training time depends on the configuration of machine over which experiments are performed so this is to be noted that all the experiments have been conducted on MacBook Air (8GB 1600 MHz DDR3, 256GB SSD, 1.6 GHz Intel Core i5). 4.2. Implementation Details For each sampling technique, i.e., Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS), same algorithmic structure is used with difference only in selecting the mini-batch for each sampling technique. And for each sampling technique, the dataset is divided into predefined number of mini-batches, as per the Algorithm 1. For #classes 2 2 3 2 2 #features 28 18 357 47,236 22 #datapoints 11,000,000 5,000,000 17,766 20,242 49,990 simplicity, dataset has been divided into equal sized minibatches except the last mini-batch which might has data points less than or equal to other mini-batches. For RS, during each epoch, an array of size equal to the number of data points in the dataset is taken and this array contains the randomized indexes of data points. To select the minibatches, array contents equal to mini-batch size or till the end of array, are selected sequentially. For CS, during each epoch, an array of size equal to the number of data points in the dataset is taken, containing indexes of data points in sorted order. To select the mini-batches, array contents equal to mini-batch size or till the end of array, are selected sequentially. For SS, during each epoch, an array of size equal to the number of mini-batches is taken and this array contains the randomized indexes of mini-batches. To select a mini-batch, an array element is selected in the sequence. This array element gives us the first index of data point in the selected mini-batch. The other data points are selected sequentially from the starting index of the mini-batch equal to the size of a mini-batch or till the last data point in the dataset. 4.3. Results Experimental results2 plot the difference between objective function and optimum value against training time for three sampling techniques, namely, Random Sampling (RS), Cyclic/Sequential Sampling (CS) and Systematic Sampling (SS), which are represented by Figs.1–5. To save space, results for different samplings with constant step size and backtracking line search methods are plotted in same figure (red color for constant step size and blue for line search (LS)). As it is clear from figures, 20 different settings over one dataset compare CS, SS and RS, and prove that methods with CS and SS converges faster than with RS. In general, SS gives the best results as per the intuition but sometimes CS produces better results than SS since CS and SS are quite similar. The results with constant step size and backtracking line search methods show similar results. For larger datasets, like SUSY and HIGGS, SS and CS show clear advantage over RS, than for smaller dataset and thus prove the efficacy/suitability of CS and SS for large-scale 2 Experimental results can be reproduced datasets used in the experiments are available at: using the code available at following link: https://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/ https://drive.google.com/file/d/0B0eJTvATUWXmb0dVckFtMkdL 1 Faster Algorithms for Large-scale Machine Learning SUSY-SAG-CvsT-mBatch-500 0 10 -1 10 -2 10 -3 10 -4 10 -5 10 -6 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS 0 100 200 300 Objective - Optimal value 10 Objective - Optimal value learning problems. For some of the results, like, with HIGGS dataset and SAG method, learning algorithms with all the sampling techniques converge quickly to same value but careful examination reveals that CS and SS converges earlier than RS. Please look into supplementary material for tabular representation of experiments which represents couple of tables comparing the training time against objective function value for a given number of epochs. 400 SUSY-SAG-CvsT-mBatch-1000 0 10 -1 10 -2 10 -3 10 -4 10 -5 10 -6 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS 0 50 100 Time (seconds) 5. Conclusion (a) SUSY-SAG-500 -3 -4 10 -5 10 -6 0 150 200 250 300 10 -2 10 -3 10 -4 10 -5 10 -6 0 50 100 (c) SUSY-SAGA-500 -3 10 -4 10 -5 10 -6 0 50 100 150 200 Objective - Optimal value 10 -2 10 10 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 10 -1 10 -1 10 -2 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 10 -3 10 -4 10 -5 10 250 -6 0 50 100 -1 10 -2 10 -3 10 -4 Chauhan, Vinod Kumar, Dahiya, Kalpana, and Sharma, Anuj. Mini-batch block-coordinate based stochastic average adjusted gradient methods to solve big data problems. In 9th ACML, 2017. Cotter, Andrew, Shamir, Ohad, Srebro, Nathan, and Sridharan, Karthik. Better Mini-Batch Algorithms via Accelerated Gradient Methods. NIPS, 2011. Peter. Importance 0 100 200 300 400 10 -1 10 -2 10 -3 10 -5 10 -6 500 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 10 -4 0 100 -1 10 -2 10 -3 10 -4 10 -5 10 -6 10 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0 50 100 150 200 Time (seconds) (i) SUSY-MBSGD-500 Objective - Optimal value 10 300 400 (h) SUSY-SAAG-II-1000 SUSY-MBSGD-CvsT-mBatch-500 0 200 Time (seconds) (g) SUSY-SAAG-II-500 10 250 SUSY-SAAG-II-CvsT-mBatch-1000 0 Time (seconds) Objective - Optimal value Chauhan, Vinod Kumar, Dahiya, Kalpana, and Sharma, Anuj. Problem formulations and solvers in linear svm - a review. Artificial Intelligence Review, 2018. doi: https://doi.org/10.1007/s10462-018-9614-6. 10 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 10 -5 10 -6 200 (f) SUSY-SVRG-1000 Objective - Optimal value Objective - Optimal value Chang, Kai-Wei, Hsieh, Cho-Jui, and Lin, Chih-Jen. Coordinate descent method for large-scale l2-loss linear support vector machines. JMLR, 9:1369–1398, 2008. 10 150 Time (seconds) SUSY-SAAG-II-CvsT-mBatch-500 0 250 SUSY-SVRG-CvsT-mBatch-1000 0 (e) SUSY-SVRG-500 10 200 (d) SUSY-SAGA-1000 SUSY-SVRG-CvsT-mBatch-500 10 0 150 Time (seconds) Time (seconds) Byrd, Richard H., Hansen, S. L., Nocedal, Jorge, and Singer, Yoram. A stochastic quasi-newton method for large-scale optimization. SIAM Journal on Optimization, 26(2):1008–1031, 2016. Dominik and Richt, 100 300 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 10 -1 Time (seconds) References Csiba, 50 Objective - Optimal value Objective - Optimal value 10 -2 10 250 SUSY-SAGA-CvsT-mBatch-1000 10 0 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 10 -1 10 200 (b) SUSY-SAG-1000 SUSY-SAGA-CvsT-mBatch-500 10 0 Objective - Optimal value In this paper, novel systematic sampling and cyclic sampling techniques have been proposed, for solving largescale learning problems, for improving the training time by reducing the data access time. Methods have same convergence in expectation with random, cyclic and systematic sampling techniques, but with cyclic and systematic sampling the training is up to six times faster than widely used random sampling technique, at the expense of fractionally small difference in the minimized objective function value, for a given number of epochs. Thus, systematic sampling technique is suitable for solving large-scale problem with low accuracy solution. Random shuffling of data can be used before the data is fed to the learning algorithms with systematic and cyclic sampling to improve their results for the cases where similar data points are grouped together. These sampling techniques can be extended to parallel and distributed learning algorithms. 150 Time (seconds) 250 SUSY-MBSGD-CvsT-mBatch-1000 0 10 -1 10 -2 10 -3 10 -4 10 -5 10 -6 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0 50 100 150 200 Time (seconds) (j) SUSY-MBSGD-1000 Figure 1. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS). Faster Algorithms for Large-scale Machine Learning 4 5 6 -2 10 -3 0 0.5 Time (seconds) Objective - Optimal value Objective - Optimal value -1 10 -2 0 1 2 3 4 10 -2 5 0 0.5 0.35 1 0.3 0.2 2 3 4 0 rcv1-train.binary-SAAG-II-CvsT-mBatch-500 Objective - Optimal value Objective - Optimal value 10 0 -1 -2 0 0.5 1 1.5 0.5 1 2 2.5 10 10 3 1.5 -1 10 -2 3 1 1.5 2 2 Time (seconds) (i) rcv1-MBSGD-500 2.5 0 2.5 0 0.5 1 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 10 -1 10 -2 2 0 1.5 2 0.5 1 ijcnn1-SAAG-II-CvsT-mBatch-1000 10 1 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 10 0 10 -1 10 -2 10 -3 1.5 0 0.5 0.4 0.6 0.8 1 Time (seconds) ijcnn1-MBSGD-CvsT-mBatch-1000 10 0 10 -2 0.2 1.5 (h) ijcnn1-SAAG-II-1000 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0 1 Time (seconds) ijcnn1-MBSGD-CvsT-mBatch-500 10 -1 1.5 (f) ijcnn1-SVRG-1000 10 -2 10 0 1 Time (seconds) 10 -1 10 -3 -2 0.5 1.5 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 0.5 1.5 ijcnn1-SVRG-CvsT-mBatch-1000 Time (seconds) rcv1-train.binary-MBSGD-CvsT-mBatch-1000 0 1 ijcnn1-SAAG-II-CvsT-mBatch-500 0 1 (d) ijcnn1-SAGA-1000 (g) ijcnn1-SAAG-II-500 10 -1 0.5 Time (seconds) 10 0 3 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 10 0 10 0 10 1 10 -3 0.5 10 -2 2 Time (seconds) -2 0 1.5 10 -1 (e) ijcnn1-SVRG-500 -1 10 Objective - Optimal value Objective - Optimal value 10 -1 1 2.5 1 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 10 1.5 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS ijcnn1-SVRG-CvsT-mBatch-500 0 (h) rcv1-SAAG-II-1000 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0.5 0.5 Time (seconds) rcv1-train.binary-MBSGD-CvsT-mBatch-500 0 2 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS (g) rcv1-SAAG-II-500 10 -2 1.5 rcv1-train.binary-SAAG-II-CvsT-mBatch-1000 Time (seconds) 10 0 0 (f) rcv1-SVRG-1000 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 10 -3 Time (seconds) (e) rcv1-SVRG-500 10 0 10 1 ijcnn1-SAGA-CvsT-mBatch-1000 Time (seconds) 0.15 0 10 -2 10 0.25 0.5 (b) ijcnn1-SAG-1000 (c) ijcnn1-SAGA-500 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 0.4 0 Time (seconds) 10 -1 2.5 rcv1-train.binary-SVRG-CvsT-mBatch-1000 Time (seconds) 10 2 0.45 Objective - Optimal value Objective - Optimal value rcv1-train.binary-SVRG-CvsT-mBatch-500 10 -2 4 10 0 (d) rcv1-SAGA-1000 -1 10 -2 1.5 3 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS Time (seconds) SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 10 1 2 ijcnn1-SAGA-CvsT-mBatch-500 10 0 10 -1 (c) rcv1-SAGA-500 0 1 10 -1 (a) ijcnn1-SAG-500 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS Time (seconds) 10 0 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Time (seconds) rcv1-train.binary-SAGA-CvsT-mBatch-1000 10 0 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 10 2 (b) rcv1-SAG-1000 rcv1-train.binary-SAGA-CvsT-mBatch-500 0 1.5 Time (seconds) (a) rcv1-SAG-500 10 1 Objective - Optimal value 10 10 -2 Objective - Optimal value 3 -1 Objective - Optimal value 2 ijcnn1-SAG-CvsT-mBatch-1000 10 0 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value 1 10 ijcnn1-SAG-CvsT-mBatch-500 0 Objective - Optimal value 0 Objective - Optimal value -2 -1 Objective - Optimal value 10 0 10 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value -1 10 rcv1-train.binary-SAG-CvsT-mBatch-1000 1 Objective - Optimal value 0 10 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value 10 rcv1-train.binary-SAG-CvsT-mBatch-500 1 Objective - Optimal value Objective - Optimal value 10 1.2 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 10 -1 10 -2 10 -3 0 0.2 0.4 0.6 0.8 1 1.2 Time (seconds) Time (seconds) (j) rcv1-MBSGD-1000 Figure 2. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS). (i) ijcnn1-MBSGD-500 (j) ijcnn1-MBSGD-1000 Figure 3. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS). Faster Algorithms for Large-scale Machine Learning 1 10 -4 1.5 0 0.5 Time (seconds) (a) protein-SAG-500 10 -3 0 0.5 1 1.5 2 10 -1 10 -2 10 -3 10 -4 2.5 protein-SVRG-CvsT-mBatch-500 0 0.5 Objective - Optimal value Objective - Optimal value 10 -3 0.5 1 1.5 2 10 -1 0 Objective - Optimal value Objective - Optimal value 10 -4 1.5 0.5 2 10 -2 10 -3 10 -4 10 -5 1 1.5 1.5 Time (seconds) (i) protein-MBSGD-500 2 10 -2 10 -3 10 -4 10 -3 10 -4 10 -5 10 -6 0 200 1 Objective - Optimal value 10 -4 10 -5 10 -6 0 200 10 -3 10 -4 10 -5 10 -6 800 200 300 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 10 -1 10 -2 10 -3 10 -4 10 -5 10 -6 0 200 2 10 400 10 500 10 -2 10 -1 10 -2 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 10 -3 10 -4 10 -5 -6 0 200 10 -6 0 2.5 200 400 1.5 600 800 1000 1200 10 -1 10 -2 10 -3 2 Time (seconds) (j) protein-MBSGD-1000 Figure 4. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS). 10 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS -1 10 -2 10 -3 10 -4 10 -5 10 -6 0 200 400 10 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 10 -4 -5 200 400 600 800 1000 1200 (h) HIGGS-SAAG-II-1000 HIGGS-MBSGD-CvsT-mBatch-500 0 800 Time (seconds) (g) HIGGS-SAAG-II-500 0 600 HIGGS-SAAG-II-CvsT-mBatch-1000 10 0 Time (seconds) 10 400 (f) HIGGS-SVRG-1000 -3 -5 800 Time (seconds) 10 -4 10 600 HIGGS-SVRG-CvsT-mBatch-1000 0 10 10 600 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS -1 400 (d) HIGGS-SAGA-1000 HIGGS-SAAG-II-CvsT-mBatch-500 10 0 800 Time (seconds) SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 100 600 HIGGS-SAGA-CvsT-mBatch-1000 10 0 HIGGS-SVRG-CvsT-mBatch-500 0 400 (b) HIGGS-SAG-1000 600 10 -2 10 -6 0.5 400 10 -1 10 0 -3 (e) HIGGS-SVRG-500 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 10 -1 10 Time (seconds) protein-MBSGD-CvsT-mBatch-1000 10 0 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0.5 10 -2 2.5 10 -4 1 -2 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Time (seconds) 10 -1 (h) protein-SAAG-II-1000 protein-MBSGD-CvsT-mBatch-500 0 2 10 -3 0.5 800 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 10 0 10 -2 0 600 HIGGS-SAGA-CvsT-mBatch-500 Time (seconds) Objective - Optimal value Objective - Optimal value 10 1.5 10 -1 10 -5 2.5 (g) protein-SAAG-II-500 -1 1 400 10 (c) HIGGS-SAGA-500 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS Time (seconds) 10 0 200 -1 Time (seconds) protein-SAAG-II-CvsT-mBatch-1000 10 0 10 -3 1 0 (f) protein-SVRG-1000 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 0.5 -6 Time (seconds) protein-SAAG-II-CvsT-mBatch-500 0 2.5 10 -3 10 -4 2.5 10 -2 10 -5 2 10 -2 (e) protein-SVRG-500 10 -1 1.5 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS Time (seconds) 10 0 1 protein-SVRG-CvsT-mBatch-1000 10 0 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 0 10 (d) protein-SAGA-1000 10 -2 10 -4 10 -5 Time (seconds) (c) protein-SAGA-500 10 -1 -4 10 0 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS Time (seconds) 10 0 10 10 (a) HIGGS-SAG-500 Objective - Optimal value Objective - Optimal value Objective - Optimal value 10 -2 10 -4 10 -3 HIGGS-SAG-CvsT-mBatch-1000 0 Time (seconds) protein-SAGA-CvsT-mBatch-1000 10 0 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 10 -1 1.5 -2 (b) protein-SAG-1000 protein-SAGA-CvsT-mBatch-500 10 0 1 10 Time (seconds) Objective - Optimal value 0.5 Objective - Optimal value 0 Objective - Optimal value 10 -5 10 -3 -1 Objective - Optimal value 10 -4 10 -2 10 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value 10 -3 10 HIGGS-SAG-CvsT-mBatch-500 0 Objective - Optimal value 10 -2 -1 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value Objective - Optimal value Objective - Optimal value 10 -1 protein-SAG-CvsT-mBatch-1000 10 0 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value protein-SAG-CvsT-mBatch-500 10 0 600 Time (seconds) (i) HIGGS-MBSGD-500 800 HIGGS-MBSGD-CvsT-mBatch-1000 0 10 -1 10 -2 10 -3 10 -4 10 -5 10 -6 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0 200 400 600 800 Time (seconds) (j) HIGGS-MBSGD-1000 Figure 5. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS). Faster Algorithms for Large-scale Machine Learning Sampling for Minibatches. 2016. https://arxiv.org/abs/1602.02283. URL Csiba, Dominik and Richtárik, Peter. Coordinate Descent Face-Off: Primal or Dual? 2016. URL https://arxiv.org/abs/1605.08982. Defazio, Aaron, Bach, Francis, and Lacoste-Julien, Simon. Saga: A fast incremental gradient method with support for non-strongly convex composite objectives. In NIPS, 2014. Gopal, Siddharth. Adaptive Sampling for SGD by Exploiting Side Information. Icml, 2016. Johnson, Rie and Zhang, Tong. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS. 2013. Konečný, Jakub and Richtárik, Peter. SemiStochastic Gradient Descent Methods. 2013. URL http://arxiv.org/abs/1312.1666. Li, Mu, Zhang, Tong, Chen, Yuqiang, and Smola, Alexander J. Efficient mini-batch training for stochastic optimization. In KDD, 2014. Madow, William G. On the theory of systematic sampling, ii. The Annals of Mathematical Statistics, 20:333–354, 1949. Madow, William G. and Madow, Lillian H. On the theory of systematic sampling, i. The Annals of Mathematical Statistics, 15:1–24, 1944. Needell, Deanna, Ward, Rachel, and Srebro, Nati. Stochastic gradient descent, weighted sampling, and the randomized kaczmarz algorithm. In NIPS. 2014. Nemirovski, A., Juditsky, A., Lan, G., and Shapiro, A. Robust stochastic approximation approach to stochastic programming. SIAM J. Optim., 19(4):1574–1609, 2009. Qu, Zheng and Richt, Peter. Randomized Dual Coordinate Ascent with Arbitrary Sampling. NIPS, 2015. Reddi, Sashank J. New Optimization Methods for Modern Machine Learning. PhD thesis, 2016. Schmidt, Mark, Le Roux, Nicolas, and Bach, Francis. Minimizing finite sums with the stochastic average gradient. Math. Program., pp. 1–30, 2016. Shalev-Shwartz, Shai, Singer, Yoram, Srebro, Nathan, and Cotter, Andrew. Pegasos: primal estimated sub-gradient solver for svm. Math. Program., 127(1):3–30, 2011. Tak, Martin, Bijral, Avleen, Richtrik, Peter, and Srebro, Nathan. Mini-batch primal and dual methods for svms. In ICML, pp. 537–552, 2013. Wang, Xiao, Wang, Shuxiong, and Zhang, Hongchao. Inexact proximal stochastic gradient method for convex composite optimization. Computational Optimization and Applications, 2017. Wright, Stephen J. Coordinate descent algorithms. Math. Program., 151(1):3–34, 2015. Xu, Yangyang and Yin, Wotao. Block stochastic gradient iteration for convex and nonconvex optimization. SIAM J. Optim., 25(3):1686–1716, 2015. Yu, Hsiang-Fu, Hsieh, Cho-Jui, Chang, Kai-Wei, and Lin, Chih-Jen. Large linear classification when data cannot fit in memory. In KDD, 2010. Zhang, Aston and Gu, Quanquan. Accelerated stochastic block coordinate descent with optimal sampling. In KDD, 2016. Zhang, Tong. Solving large scale linear prediction problems using stochastic gradient descent algorithms. In ICML, 2004. Zhao, Peilin and Zhang, Tong. Accelerating Minibatch Stochastic Gradient Descent using Stratified Sampling. 2014. URL http://arxiv.org/abs/1405.3080. Zhao, Peilin and Zhang, Tong. Stochastic Optimization with Importance Sampling for Regularized Loss Minimization. ICML, 37, 2015. Zhou, Lina, Pan, Shimei, Wang, Jianwu, and Vasilakos, Athanasios V. Machine learning on big data: Opportunities and challenges. Neurocomputing, 237:350 – 361, 2017. Faster Algorithms for Large-scale Machine Learning A. Results in tabular form B. Results with more datasets 10 -1 Objective - Optimal value SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS 10 -2 10 -3 10 -4 0 2 4 6 combined-SAG-CvsT-mBatch-1000 0 10 -1 10 -2 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS 10 -3 10 8 -4 0 2 (a) combined-SAG-500 10 combined-SAGA-CvsT-mBatch-500 0 10 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS -1 10 -2 10 -3 10 -4 10 -5 0 2 4 6 8 10 -1 10 -2 10 -3 10 -4 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 0 2 4 -1 10 -2 10 -3 10 -4 combined-SVRG-CvsT-mBatch-500 10 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 0 2 4 6 10 -1 10 -2 10 -3 10 -4 8 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 0 2 -1 10 -2 combined-SAAG-II-CvsT-mBatch-500 10 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 10 -3 10 -4 10 -5 0 5 10 15 20 10 -1 10 -2 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 10 -3 10 -4 10 -5 0 2 10 -1 10 -2 10 -3 -5 10 -6 combined-MBSGD-CvsT-mBatch-500 2 4 8 10 6 Time (seconds) (i) combined-MBSGD-500 combined-MBSGD-CvsT-mBatch-1000 10 0 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0 6 (h) combined-SAAG-II-1000 10 -4 10 4 Time (seconds) (g) combined-SAAG-II-500 0 8 combined-SAAG-II-CvsT-mBatch-1000 0 Time (seconds) 10 6 (f) combined-SVRG-1000 Objective - Optimal value Objective - Optimal value 10 4 Time (seconds) (e) combined-SVRG-500 0 10 combined-SVRG-CvsT-mBatch-1000 0 Time (seconds) 10 8 (d) combined-SAGA-1000 Objective - Optimal value Objective - Optimal value 10 6 Time (seconds) (c) combined-SAGA-500 0 8 combined-SAGA-CvsT-mBatch-1000 0 Time (seconds) 10 6 (b) combined-SAG-1000 Objective - Optimal value Objective - Optimal value 10 4 Time (seconds) Objective - Optimal value Results with SUSY dataset are presented in Table 4. As it is clear from the table, it shows good results like HIGGS dataset. CS and SS techniques are faster than RS technique by around two to four times while the objective function values are same up to three to eight decimal places. Methods with constant step and with backtracking line search show similar trends for the results. 10 combined-SAG-CvsT-mBatch-500 0 Time (seconds) Objective - Optimal value Experimental results can be presented using tables comparing the training time and objective function value, for given number of epochs (number of passes through dataset), for CS, SS and RS. Since it is easy to understand the graphs so experiments are documented using figures. Results for SUSY and HIGGS are also represented using Tables 2 and 4, which prove faster training for CS and SS than RS, while their values are same up to certain decimal places. As it is clear from the table, SAG method with mini-batch of size 200 and constant step size, the training time for Systematic Sampling (SS) and Cyclic Sampling (CS) are faster than for Random Sampling (RS) by a factor of more than three while the values of objective function are same up to four decimal places. The training times for SS and CS are very close as expected. For mini-batch of 1000 data points and constant step size, SAG method runs three and half times faster for SS and CS as compared with RS while the values of objective function are same up to six decimal places. With backtracking line search for determining the step size, SAG method runs more than two times faster with minibatch of 200 and more than three and half times with minibatch of size 1000, for SS and CS as compared with RS while the values of objective function are same up to eight decimal places. SAGA with constant step size runs more than two times faster with mini-batches of 200 and 1000 for CS and SS as compared with RS while the values of objective function are same up to five and four decimal places for mini-batches of 200 and 1000, respectively. With backtracking line search, SAGA performs even better for CS and SS and runs more than two times faster with mini-batch of 200 and more than three and half times with mini-batch of size 1000 as compared with RS while the values of objective function are same up to eight decimal places with mini-batch of size 200 and up to six decimal places with mini-batch of size 1000. Similar trend are followed for SAAG-II, SVRG and MBSGD methods where CS and SS are around two to more than three and half times faster and objective values are same up to six to nine decimal places as compared with RS with constant step and backtracking line search (LS). Objective - Optimal value 10 8 10 -1 10 -2 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 10 -3 10 -4 10 -5 0 2 4 6 8 10 Time (seconds) (j) combined-MBSGD-1000 Figure 6. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS). Faster Algorithms for Large-scale Machine Learning Table 2. Comparison of Training Time (in seconds) and objective function values after 30 epochs using dataset HIGGS Method SAG SAGA SAAG-II SVRG MBSGD Sampling RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS Batch 200 1000 200 1000 200 1000 200 1000 200 1000 Constant Step Time Objective 229.220102 0.3258410619 66.378361 0.3258375894 67.867812 0.3258410840 234.129248 0.3258356616 63.957239 0.3258358353 65.908254 0.3258356562 302.318358 0.3258637650 147.235962 0.3258659974 148.402540 0.3258636638 301.003253 0.3259746991 145.917197 0.3259814282 147.646753 0.3259748885 297.134694 0.3263398874 174.232600 0.3263398971 176.845275 0.3263398982 299.840227 0.3258550019 171.384496 0.3258550023 172.268358 0.3258550036 297.620959 0.3258923266 172.405902 0.3258923398 172.612984 0.3258923141 297.259155 0.3261069018 172.227776 0.3261069217 172.601618 0.3261068804 267.252470 0.3258635308 144.769059 0.3258635315 140.241334 0.3258635313 268.102817 0.3259704996 139.586141 0.3259704998 135.646766 0.3259704994 Line Search Time Objective 495.873963 0.3258353956 214.083371 0.3258353935 214.533017 0.3258353956 535.821883 0.3258354793 126.807235 0.3258354785 148.786983 0.3258354792 432.787547 0.3258353922 182.545531 0.3258353924 177.698227 0.3258353937 445.741781 0.3258354946 112.433248 0.3258355048 120.481113 0.3258354828 708.881659 0.3258353918 380.852014 0.3258353920 338.122579 0.3258353920 687.638964 0.3258354037 209.564000 0.3258354039 213.877001 0.3258354041 406.229956 0.3258354055 213.151577 0.3258354059 185.538374 0.3258354064 497.501496 0.3258357363 159.518159 0.3258357365 151.230547 0.3258357352 312.865696 0.3258353862 121.004686 0.3258353865 122.396247 0.3258353867 306.236327 0.3258354906 82.340378 0.3258354912 81.486252 0.3258354909 Table 3. More Datasets used in experimentation Dataset SensIT Vehicle (combined) mnist covtype.binary #classes 3 #features 100 #datapoints 78,823 10 2 780 54 60,000 581,012 Faster Algorithms for Large-scale Machine Learning Table 4. Comparison of Training Time (in seconds) and objective function values after 30 epochs using dataset SUSY Method SAG SAGA SAAG-II SVRG MBSGD Sampling RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS RS CS SS Batch 200 1000 200 1000 200 1000 200 1000 200 1000 Constant Step Time Objective 84.331058 0.3759925588 20.571099 0.3759958448 20.380268 0.3759925419 86.462106 0.3761630312 19.652540 0.3764117775 23.803318 0.3761654289 119.419700 0.3761615578 49.054361 0.3761668056 50.032764 0.3761616154 115.240795 0.3767228974 48.484855 0.3767380851 53.076179 0.3767231692 122.687745 0.3761359459 57.748874 0.3761359525 58.840208 0.3761359506 114.239646 0.3759934574 58.377580 0.3759934575 67.017390 0.3759934576 128.216331 0.3763077569 57.819864 0.3763078069 60.425710 0.3763079011 112.850682 0.3773260313 58.064456 0.3773259828 66.207054 0.3773261006 101.673967 0.3761560102 47.587231 0.3761559893 48.042649 0.3761559954 103.513668 0.3766979888 47.346182 0.3766979329 55.683464 0.3766979490 Line Search Time Objective 267.199348 0.3759914171 96.172599 0.3759912712 136.218536 0.3759914133 261.746213 0.3759920053 45.862451 0.3759919137 56.056274 0.3759920025 244.424858 0.3759911729 88.012460 0.3759911528 125.125252 0.3759911723 218.120526 0.3759920084 41.586102 0.3759920131 47.792283 0.3759919544 319.227862 0.3759910754 150.975243 0.3759910741 156.970161 0.3759910768 336.178564 0.3759912580 88.889686 0.3759912583 88.760368 0.3759912574 215.183518 0.3759913085 88.178545 0.3759913110 98.404560 0.3759913135 192.681710 0.3759936315 57.283939 0.3759936439 58.508361 0.3759936213 174.388236 0.3759910145 58.634676 0.3759910107 63.347389 0.3759910169 128.650218 0.3759918962 31.396945 0.3759918950 41.701046 0.3759918931 Faster Algorithms for Large-scale Machine Learning 10 -6 0 2 4 6 8 10 -5 10 -6 10 5 -1 10 -2 10 -3 10 -4 10 -5 10 -6 10 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 0 5 10 15 20 25 Objective - Optimal value Objective - Optimal value 10 30 10 -1 10 -2 10 -3 10 -4 10 -4 10 -5 10 -6 0 5 10 15 20 10 25 10 10 -3 10 -4 10 -5 10 mnist-SAAG-II-CvsT-mBatch-500 -6 5 10 -3 10 -4 10 -5 10 -6 0 5 15 20 -2 10 -3 10 -4 10 -5 10 25 -1 10 -2 10 10 mnist-MBSGD-CvsT-mBatch-500 10 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS -4 -5 0 2 4 6 15 20 10 -6 10 -8 10 -10 10 -12 10 8 10 Time (seconds) (i) mnist-MBSGD-500 12 -3 10 -4 10 -5 0 2 4 6 8 40 50 60 10 20 30 10 40 10 -4 10 -6 10 -8 50 10 -6 10 -8 10 -10 10 -12 40 60 0 20 10 -2 10 -4 10 -6 10 -8 10 -10 10 -12 -4 10 -6 10 -8 20 30 60 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS -10 0 10 20 30 40 50 80 -2 10 -4 10 -6 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 10 -8 10 -10 10 -12 100 covtype.binary-SAAG-II-CvsT-mBatch-1000 0 10 0 20 40 60 80 Time (seconds) (h) covtype-SAAG-II-1000 10 40 Time (seconds) 50 covtype.binary-MBSGD-CvsT-mBatch-1000 0 10 -2 10 -4 10 -6 10 -8 10 10 50 covtype.binary-SVRG-CvsT-mBatch-1000 0 10 10 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 0 40 (f) covtype-SVRG-1000 covtype.binary-MBSGD-CvsT-mBatch-500 0 30 Time (seconds) (g) covtype-SAAG-II-500 10 10 Time (seconds) 10 30 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS 10 -2 10 60 -12 20 25 covtype.binary-SAGA-CvsT-mBatch-1000 10 -4 10 10 -10 0 20 (d) covtype-SAGA-1000 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS -2 15 Time (seconds) covtype.binary-SAAG-II-CvsT-mBatch-500 0 30 10 -2 10 10 10 -2 (e) covtype-SVRG-500 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS 10 -1 5 Time (seconds) mnist-MBSGD-CvsT-mBatch-1000 0 0 10 0 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 0 20 25 30 10 -4 10 5 20 10 -2 (h) mnist-SAAG-II-1000 10 -3 10 10 Time (seconds) Objective - Optimal value Objective - Optimal value 10 15 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 0 -10 (b) covtype-SAG-1000 covtype.binary-SVRG-CvsT-mBatch-500 10 0 -6 (g) mnist-SAAG-II-500 0 10 10 -1 10 -8 Time (seconds) mnist-SAAG-II-CvsT-mBatch-1000 0 10 (c) covtype-SAGA-500 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS Time (seconds) 10 0 25 mnist-SVRG-CvsT-mBatch-1000 10 -2 10 SAAG2-RS-LS SAAG2-CS-LS SAAG2-SS-LS SAAG2-RS SAAG2-CS SAAG2-SS 0 20 (f) mnist-SVRG-1000 Objective - Optimal value Objective - Optimal value -2 15 -1 10 10 -6 10 25 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS Time (seconds) 10 -1 10 -8 -12 (e) mnist-SVRG-500 0 -6 10 10 Time (seconds) 10 10 10 0 10 -4 Time (seconds) 10 -4 -6 10 20 10 -2 -5 5 15 covtype.binary-SAGA-CvsT-mBatch-500 10 0 10 0 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS -2 (a) covtype-SAG-500 -10 10 SVRG-RS-LS SVRG-CS-LS SVRG-SS-LS SVRG-RS SVRG-CS SVRG-SS 10 -2 -3 5 10 covtype.binary-SAG-CvsT-mBatch-1000 0 Time (seconds) (d) mnist-SAGA-1000 mnist-SVRG-CvsT-mBatch-500 -1 10 0 Time (seconds) Objective - Optimal value Objective - Optimal value 10 -10 20 SAGA-RS-LS SAGA-CS-LS SAGA-SS-LS SAGA-RS SAGA-CS SAGA-SS (c) mnist-SAGA-500 0 15 mnist-SAGA-CvsT-mBatch-1000 0 Time (seconds) 10 10 -8 (b) mnist-SAG-1000 mnist-SAGA-CvsT-mBatch-500 0 10 Time (seconds) (a) mnist-SAG-500 10 10 -6 10 0 Time (seconds) Objective - Optimal value -4 10 -4 Objective - Optimal value 10 -5 10 -2 Objective - Optimal value -4 -3 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value 10 10 10 covtype.binary-SAG-CvsT-mBatch-500 0 Objective - Optimal value -3 -2 Objective - Optimal value 10 10 Objective - Optimal value -2 -1 Objective - Optimal value 10 10 10 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value -1 Objective - Optimal value Objective - Optimal value 10 mnist-SAG-CvsT-mBatch-1000 10 0 SAG-RS-LS SAG-CS-LS SAG-SS-LS SAG-RS SAG-CS SAG-SS Objective - Optimal value mnist-SAG-CvsT-mBatch-500 10 0 MBSGD-RS-LS MBSGD-CS-LS MBSGD-SS-LS MBSGD-RS MBSGD-CS MBSGD-SS -10 10 -12 0 10 20 30 40 Time (seconds) Time (seconds) (j) mnist-MBSGD-1000 Figure 7. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS). (i) covtype-MBSGD-500 (j) covtype-MBSGD-1000 Figure 8. Comparison of Random Sampling (RS), Cyclic Sampling (CS) and Systematic Sampling (SS).
2cs.AI
Formation Control and Network Localization via Distributed Global Orientation Estimation in 3-D arXiv:1708.03591v1 [cs.SY] 10 Aug 2017 Byung-Hun Lee† and Hyo-Sung Ahn† Abstract—In this paper, we propose a novel distributed formation control strategy, which is based on the measurements of relative position of neighbors, with global orientation estimation in 3-dimensional space. Since agents do not share a common reference frame, orientations of the local reference frame are not aligned with each other. Under the orientation estimation law, a rotation matrix that identifies orientation of local frame with respect to a common frame is obtained by auxiliary variables. The proposed strategy includes a combination of global orientation estimation and formation control law. Since orientation of each agent is estimated in the global sense, formation control strategy ensures that the formation globally exponentially converges to the desired formation in 3-dimensional space. I. I NTRODUCTION Cooperative control of multiple autonomous agents has attracted a lot of attention due to its practical potential in various applications. Formation control of mobile autonomous agents is one of the most actively studied topics in distributed multi-agent systems. Depending on the sensing capability and controlled variables, various problems for the formation control have been studied in the literature [1]. Consensus-based control law for the desired formation shape is known as the displacement-based approaches. In this approach, agents measure the relative positions of their neighbors with respect to a common reference frame. Then, agents control the relative position for the desired formation. In the literature, it has been known that this method achieves global asymptotic convergence of the formation to the desired one [2]–[5]. Fundamental requirement for the displacement-based approach is that all agents share a common sense of orientation. Therefore, local reference frames need to be aligned with each other. Oh and Ahn [5] found the displacement-style formation control strategies based on orientation estimation, under the distance-based setup (i.e., local reference frames are not aligned with each other). In this approach, agents are allowed to align the orientation of their local coordinate systems by exchanging their relative bearing measurements. By controlling orientations to be aligned, the proposed formation control law allows agent to control relative positions simultaneously. Similar strategy using the consensus protocol is found in [6]. In the paper, control objective is to reach a desired formation with specified relative positions and orientations in the absences of a global reference frame. These strategies ensure asymptotic convergence of the agents to the desired formation under the † The authors are with School of Mechatronics, Gwangju Institute of Science and Technology, Gwangju, Korea. E-mail: [email protected]; [email protected]. assumption that interaction graph is uniformly connected and initial orientations belong to an open interval [0, π) [5], [6]. In our previous work [7], we proposed a novel formation control strategy via the global orientation estimation. The orientation of each agent is estimated based on the relative angle measurement and auxiliary variables assigned in the complex plane. Unlike the result of [5], [6], in this new approach, consensus property, which is based on the Laplacian matrix with complex adjacency matrix, is applied to allow the global convergence of the auxiliary variables to the desired points. In this way, we showed that the global convergence of formation to desired one for the multi-agent system having misaligned frames could be achieved. In this paper, we extend the result of [7] to 3-dimensional space. Even though we share the philosophy of the algorithm of [7], there are intrinsic distinctions from [7] as follows. First, in 2-dimensional space, an unique auxiliary variable for each agent is required to estimate the orientation of the local frame. However, for the estimation of orientation in 3-dimensional system, we require more than two auxiliary variables for each agent, since at least two auxiliary variables are required for obtaining the rotation matrix in SO(3). Second, while the direction of the unique auxiliary variable can be considered as the orientation in 2-dimensional space, the orientation in 3-dimensional space can not be determined directly from the two different directions of auxiliary variables. Thus, we need to have additional processes compared to the case of 2-dimensional space for obtaining the estimated orientation. The novel method proposed in this paper uses the consensus protocol with auxiliary variables to estimate a rotation matrix in SO(3). This consensus protocol achieves global convergence of auxiliary variable, since configuration space of auxiliary variable is a vector space instead of nonlinear space like circle. We show that auxiliary variables construct the rotation matrix that identifies the estimated orientation. For the case of general n-dimensional space, the estimation method for unknown orientation is proposed in our previous work [8]. In this paper, we modify the estimation method for the case of 3dimensional space, and combine it with the formation control law for the desired formation shape. The estimated direction of the frame is used to compensate misaligned frames of each agent in the formation system. Consequently, the formation control law with the estimated coordinate frame achieves a global convergence of multi-agent system to desired shape in 3-dimensional space, under the distance-based setup. Third, we also show that the proposed strategy can be applied to the localization problem of sensor networks equipped with displacement and orientation measurement sensors. We design the position estimation law for the given displacement measurements. Then, the position estimation law is combined with the orientation estimation law. It thus shows that convergence property of localization algorithm is identical to the one of formation control algorithm. The outline of this paper is summarized as follows. In Section II, preliminaries are described. In Section III, an idea for estimation law is described and stability of estimation law is analyzed. Convergence property of the formation control strategy with orientation estimation is then analyzed in Section IV. By using the proposed method, localization algorithm in networked systems is analyzed in Section V. Simulation results are provided in Section VI. Concluding remarks are stated in Section VII. II. P RELIMINARIES In this paper, we use the following notation. Given N column vectors x1 , x2 . . . xN ∈ Rn , x denotes the stacking of the vectors, i.e. x = (x1 , x2 , . . . , xN ). The matrix In denotes the n-dimensional identity matrix. Given two matrices A and B, A ⊗ B denotes the Kronecker product of the matrices. The exterior product, also known as wedge product, of two vectors u and v is denoted by u ∧ v. A. Consensus Property Given a set of interconnected systems, the interaction topology can be modeled by a directed weighted graph G = (V, E, A), where V and E denote the set of vertices and edges, respectively, and A is a weighted adjacency matrix with nonnegative elements akl which is assigned to the pair (k, l) ∈ E. Let Ni denote neighbors of i. The Laplacian matrixPL = [lij ] associated to G = (V, E, A) is defined as lij = k∈Ni aik if i = j and lij = −aij otherwise. If there is at least one node having directed paths to any other nodes, G is said to have a rooted-out branch. In the following, we only consider the graph G with a rooted-out branch. The following result is borrowed from [9]. Theorem 2.1: Every eigenvalue of L has strictly positive real part except for a simple zero eigenvalue with the corresponding eigenvector [1, 1, . . . 1]T , if and only if the associated digraph has a rooted-out branch. Let us consider N -agents whose interaction graph is given by G = (V, E, A). A classical consensus protocol in continuous-time is as follows [10]: X ẋi (t) = aij (xj (t) − xi (t)), ∀i ∈ V (1) j∈Ni n where xi ∈ R . Using the Laplacian matrix, (1) can be equivalently expressed as ẋ(t) = −L ⊗ In x(t) (2) The following result is a typical one. Theorem 2.2: The equilibrium set Ex = {x ∈ RnN : xi = xj , ∀i, j ∈ V} of (2) is globally exponentially stable if and only if G has a rooted-out branch. Moreover, the state x(t) converges to a finite point in Ex . Fig. 1: Twenty particles on unit circle with all-to-all sensing graph (left figure) and the simulation result(right figure) of (4) are demonstrated. B. Orientation Alignment We assume that relative orientation and relative displacement measurements are only available in the formation control problem. The orientation of local reference frame can be controlled to be aligned with others. For the alignment of orientation, we can consider the consensus algorithm of (1) based on the relative quantities of states i.e. (xj −xi ), j ∈ Ni . In the case of SO(2), the orientation of i-th agent is denoted by θi ∈ S1 . Let us denote the displacement between θj and θi as θji . Note that θji = θji − 2π and in general, θji 6= θj − θi . The consensus protocol in the unit circle space is as follows [5], [6]: X θ̇i = aij θji , i ∈ V (3) j∈Ni In Euclidean space, the convex hull of a set of points in n-dimensions is invariant under the consensus algorithm of (1). The permanent contraction of this convex hull allows to conclude that the agents end up at a consensus value [11], [12]. In unit circle space, convergence property of the consensus algorithm based on the relative quantities of states is analyzed in similar way, while the convergence of states to a consensus value is not possible for all initial value of states. In other words, there is a subset such that convex hull of the set of points is invariant. In the following example, it will be shown that there is a domain which does not achieve the contraction of the convex hull under the consensus algorithm (3). • Example of anti-synchronization: Let us suppose that twenty agents on the unit circle have all-to-all interaction topology shown in Fig. 1. Consensus protocol based on the displacement is designed as follows : X θ̇i = θji , i ∈ {1, 2, . . . , 20} (4) j∈Ni The initial values of θi are assigned on out of range of π as the pattern which is shown in Fig.1. The simulation result of (4) in Fig.1 shows that consensus is not guaranteed on unit circle space. In the unit circle space, a sufficient condition for the permanent contraction of a convex hull is stated in the following theorem. Theorem 2.3 ( [5], [13]): Consider the coupled oscillator model (3) with a connected graph G(V, E, A). Suppose that a convex hull of all initial values is within an open semi circle. Then, this convex hull is positively invariant, and each trajectory originating in the convex hull achieves an exponential synchronization. The fundamental difference between a consensus protocol (1) in Euclidean space and another protocol (3) in unit circle space is the non-convex1 nature of configuration spaces like circle or sphere. For this reason, a global convergence analysis of the consensus algorithm in nonlinear space is quite intractable and at least very dependent on the communication graph [12]. In this paper, instead of controlling the orientation to be aligned, we estimate the orientation by using auxiliary variables defined on the higher dimensional vector spaces rather than unit circle space. Although consensus algorithm plays still important role in the proposed method, unlike the alignment law (3), the proposed method achieves global convergence of the estimated variables. This is described in the next section. C. Problem Statement Consider N single-integrator modeled mobile agents in the space: ṗi = ui , i = 1, . . . N, where pi ∈ R3 and ui ∈ R3 denote the position and control input, respectively, of agent i with P respect to the global reference frame, which is denoted by g . Following the notions of [15], we assume that agent i maintains its own local reference frame with the origin at pi . An orientation of i-th local reference frame with respect to the global reference frame is identified by a proper orthogonal matrix Ci ∈ SO(3) as illustrated in Fig. 2. By adopting a notation in which superscripts are used to denote reference frames, the dynamics of agents are described as ṗii = uii , i = 1, . . . N, where pii ∈ R3 and uii ∈ R3 denote the position P and control input, respectively, of agent i with respect to i . For a weighted directed graph G = (V, E, A), agent i measures the Prelative positions of its neighboring agents with respect to i as: piji := pij − pii , j ∈ Ni , i ∈ V. (5) We note that pj − pi = Ci−1 (pij − pii ), because the local reference frames are oriented as much as the rotation matrix Ci from the global reference frame. In this paper, we attempt to estimate Ci by using the relative orientation measurement. Then, the estimated orientation is used to calibrate Ci for the formation control. Let the desired formation p∗ = (p∗1 , . . . , p∗N ) ∈ R3N be given. The formation problem is then stated as follows: Problem 2.1: Consider N -agents modeled by (1). Suppose G = (V, E, A) is the interaction graph of the agents. For a P common reference frame a , design a control law such that paj − pai → p∗j − p∗i as t → ∞ for all i, j ∈ V based on the measurements such as the relative displacement and relative orientation, which are measured in local coordinate frames of each agent. 1 Non-convexity is the opposite of convexity. Convexity property implies that the future, updated value of any agent in the network is a convex combination of its current value as well as the current values of its neighbors. It is thus clear that max{x1 , x2 , . . . , xN } is a non-increasing function of time [14]. Fig. 2: The local coordinate frame P of i-th agent is rotated from the global reference frame (g ) by Ci . {ei,1 , P ei,2 , ei,3 } is the set of orthonormal bases of i-th local frame i . We next formulate the localization problem. Under the same assumption of the Problem 2.1, we desire to estimate the position of each agent. We denote p̂i as the estimated position of pi with respect to the global reference frame. Then, the localization problem is stated in follows: Problem 2.2: Consider N -agents modeled by (1). Suppose G = (V, E, A) is the interaction graph of the agents. For each agent i ∈ V, design an estimation law of p̂i such that kp̂j − p̂i k → kpj − pi k as t → ∞ for all j ∈ V based on the measurements such as the relative displacement and relative orientation, which are measured in local coordinate frames of each agent. The following section proposes a method for the orientation estimation by using only relative orientation measurement. We describe the estimation method in general n-dimensional space instead of 3-dimensional space. III. N OVEL M ETHOD FOR O RIENTATION E STIMATION Orientation or attitude is often represented using three or four parameters in 3-dimensional space. Three or fourparameter representations include the unit-quaternions, axisangle and Euler angles. While these parameters cannot represent orientation globally nor uniquely, the rotation matrix in SO(n) is unique and globally defined [16]. The orientation in the n-dimensional space is defined by an n × n proper orthogonal matrix C ∈ SO(n) containing, as column vectors, the unit vectors ci (i = 1, 2, . . . n) identifying the orientation of the local frame with respect to the reference frame. A matrix C has properties such as C T C = I and det(C) = +1. When the common reference frame is the Cartesian coordinate system with standard basis ei (i = 1, . . . , n), the orientation of local frame is represented as ci = Cei which is the i-column vector of C. A. Orientation estimation in SO(n) Consider N agents whose interaction graph is G that has a spanning tree in n-dimensional space. Each agent does not share a common reference frame. It follows that the i-th local reference frame is rotated from the global reference frame with the amount of Ci ∈ SO(n). Let us suppose that Cji denotes the orientation of j-th local reference frame with respect to the i-th local reference frame. It provides i-th agent view to the j-th local reference frame with respect to the i-th local reference frame. If the global reference frame has the standard basis, each basis of i-th local frame with respect to the global reference frame is the column vector of Ci . It is well-known that Cji is defined by the multiplication of two rotation matrices as follows: Cji = Cj Ci−1 = Cj CiT (6) We assume that the i-th agent measures the orientation of j-th agent with respect to the i-th local reference frame. Therefore, Cji is obtained by the measurement. Let Ĉi ∈ SO(n), ∀i ∈ V be an estimated orientation which is the proper orthogonal matrix. Orientation estimation problem can be stated as follows: Problem 3.1: Consider N -agents whose interaction graph is G in n-dimensional space. For the common orientation which is identified by C ∗ ∈ SO(n), design an estimation law such that Ci (t)T Ĉi → C ∗ as t → ∞ for all i ∈ V based on the relative orientation (6). Let us denote Bi ∈ SO(n) which is defined as Bi := Ci X , X ∈ SO(n), ∀i ∈ V. (7) According to (6), it follows that (8) Under the assumption of Problem 3.1, finding the steady state solution of Ĉi is equivalent to finding Bi satisfying the equality (8). Then, Problem 3.1 can be restated as follows: Problem 3.2: Under the assumption of Problem 3.1, design an evolutionary algorithm for Bi : [0, ∞) → Rn×n such that Bi (t) ∈ SO(n) , ∀t ∈ [0, ∞) Bj (t) → Cji Bi (t) as t → ∞ , ∀(i, j) ∈ E Let us suppose that n − 1 auxiliary variables are generated at each agent. Each auxiliary variable at i-th agent is denoted by zi,k ∈ Rn , k ∈ {1, 2, . . . , n − 1}. Let Bi be represented as Bi = [bi,1 , bi,2 , . . . , bi,n ] where bi,k ∈ Rn , k ∈ {1, . . . n}, is a k-th column vector of Bi . To generate orthonormal column vectors of Bi from zi,k , we can use Gram-Schmidt process with any independent vectors zi,k ∀k ∈ {1, . . . n − 1} as follows: vi,1 := zi,1 vi,2 := zi,2 − hzi,2 , bi,1 ibi,1 .. . Pm−1 vi,m := zi,m − k=1 hzi,m , bi,k ibi,k bi,1 ∧ bi,2 ∧ · · · ∧ bi,n−1 . (10) Since every vector can be written as a linear combination of basis vectors, ∧(n−1) (Rn ) can be expanded to a linear combination of exterior products of those basis vectors. The pseudovector can be obtained from coefficients of (10). Since we obtain bi,n from the formalization of pseudovector, the matrix Bi is a proper rotation. This is one way to calculate the quantity bi,n in higher dimensional space, while there is no natural identification of ∧(n−1) (Rn ) with Rn . Another convention for obtaining bi,n with proper rotation Bi is stated in [8]. Now, we consider a second goal of the Problem 3.2. We propose a single integrator model for dynamics of auxiliary variables as follows : żi,k = ui,k , ∀i ∈ V, ∀k ∈ {1, . . . , n − 1}. (11) Under the assumption of the Problem 3.1, a control law for (11) is designed as follows for all i ∈ V and k ∈ {1, . . . , n − 1}: X −1 ui,k = aij (Cji zj,k − zi,k ) (12) j∈Ni Bj = Cji Bi , ∀(i, j) ∈ E. • • such that the determinant of Bi is equivalent to 1. We consider bi,n as a pseudovector2 for making det(Bi ) to be one. Pseudovector is a quantity that transforms like a vector under a proper rotation. In n-dimensional vector space, a pseudovector can be derived from the element of the (n − 1)-th exterior powers, denoted ∧(n−1) (Rn ). It follows that v , bi,1 := kvi,1 i,1 k v , bi,2 := kvi,2 i,2 k .. . v , bi,m := kvi,m i,m k (9) where m = n − 1 and h·, ·i denotes the operator of inner product. The rest of the procedure include determining bi,n −1 where aij > 0. From the definition of Cji , we have Cji = T Cji = Cij . Let zk be a stacked vector form defined by zk := (z1,k , z2,k , . . . , zN,k ). Here, (11)-(12) can be written in terms of zk as follows: żk = Hzk where H ∈ RnN ×nN is a block  H11 H12  H21 H22 H :=  ..  ... . HN 1 HN 2 (13) matrix which is defined as  · · · H1N · · · H2N   (14) .. ..  . . ··· HN N Each partition Hij ∈ Rn×n is written as follows:  , j ∈ Ni  Paij Cij − j∈Ni aij In , i = j Hij =  0n ,j ∈ / Ni (15) where 0n ∈ Rn×n is a matrix having only zero entries. 2 Pseudovector is a vector-like object which is invariant under inversion. In physics a number of quantities behave as pseudovector including magnetic field and angular velocity. In 3-dimensional vector space, the pseudovector p is associated with the cross product of two vectors a and b which is equivalent to 3-dimensional bivectors : p = a × b. B. Analysis of the Stability Let us consider the eigenvalue of H. By using a nonsingular matrix D, similarity transformation can be achieved as follows : H̄ := D−1 HD. Suppose that D is a block diagonal matrix defined by D := diag(C1 , C2 , . . . , CN ) where Ci ∈ Rn×n , i = {1, . . . N }. Suppose that H̄ij ∈ Rn×n denotes a partition of i-th row and j-th column in the block matrix H̄. H̄ij is written as follows :  , j ∈ Ni  P aij In − j∈Ni aij In , i = j H̄ij = CiT Hij Cj = (16)  0 ,j ∈ /N. n 1 From (20), the steady state solution of qk is as follows: lim qk (t) t→∞ = lim (G ⊗ In )eJ⊗In (t−t0 ) (G−1 ⊗ In )qk (t0 ) i From (16), H̄ is rewritten as H̄ = −LH ⊗ In where LH ∈ RN ×N has zero row sum with dominant diagonal entries. From the Theorem 2.1, all eigenvalues of LH have strictly positive real part except for a simple zero eigenvalue with corresponding eigenvector ξ = (1, 1, . . . , 1) ∈ RN . Let us consider a coordinate transformation as zk = Dqk . Then (13) is rewritten as follows: q̇k (t) = −LH ⊗ In−1 qk (t), ∀k ∈ {1, . . . , n − 1} (17) From the Theorem 2.2, it is clear that qk converges to the equilibrium set which is indicated as Eq = {x = (x1 , x2 , . . . , xN ) ∈ RnN : x1 = x2 = · · · = xN }. For the estimation of orientation, we have to avoid the convergence of variables qk to zero. Therefore, the desired equilibrium set is defined by Sq := Eq \ {0}. For a square matrix A, define the column space of matrix A as C(A). Then, we have the relationship C(A) = null(AT )⊥ , where null(AT )⊥ denotes the orthogonal space of null space of AT . Based on the consensus property mentioned in the previous section, the following lemma provides conditions for the convergence of qk to Sq . Lemma 3.1: Suppose that G has a rooted-out branch. For the dynamics (17), there exists a finite point q∞ k ∈ Sq for each k ∈ {1, . . . n − 1} such that qk exponentially converges if and only if an initial value qk (t0 ), ∀k ∈ {1, 2, . . . , n − 1} is not in C(LH ⊗ In ). Proof: From the Theorem 2.2, qk , ∀k ∈ {1, 2, . . . n − 1} globally exponentially converges to Eq . Then, for each k ∈ {1, 2, . . . n − 1}, there exists a finite point q∞ k ∈ Eq and constants λq , ηq > 0 such that −λq (t−t0 ) kqk (t) − q∞ kqk (t0 ) − q∞ k k ≤ ηq e k k. Now, we consider a steady state solution qk is written as follows: negative real part, the state transition matrix eJ⊗In (t−t0 ) has the following form as t → ∞.   0 0    ⊗ In eJ⊗In (t−t0 ) →  (20) ..   . q∞ k . qk (t) = e−LH ⊗In (t−t0 ) q(t0 ). (18) A solution of (19) The Jordan form of LH is obtained by the similarity transformation as follows: G−1 LH G = J. Let G and G−1 be T T represented as G = [g1 · · · gN ] and G−1 = [w1T · · · wN ] respectively. We supposed that gN is the right eigenvector of the zero eigenvalue. Then, wN is the left eigenvector of the zero eigenvalue. Since every nonzero eigenvalue of LH has t→∞ = (gN ⊗ In )(wN ⊗ In )qk (t0 ) = (gN wN ⊗ In )qk (t0 ) (21) This implies that qk (t) converges to zero if and only if qk (t0 ) is perpendicular to the wN ⊗In which is the left eigenvector of the zero eigenvalue. Then, it follows that (wN ⊗In )qk (t0 ) = 0 if and only if qk (t0 ) is in null(LTH ⊗ In )⊥ . Since null(LTH ⊗ In )⊥ = C(LH ⊗ In ), it completes the proof. The result of Lemma 3.1 implies limt→∞ zk (t) = Dq∞ k for each k. Let Bi ∈ SO(n) be derived from the procedure including Gram-Schmidt process of zi,k , ∀k ∈ {1, . . . n − 1} and the calculation of bi,n . Consequently, there exists Pi∞ ∈ SO(n) to which Bi converges. We can show that Bi (t) → Cij Bj (t), (i, j) ∈ E as t → ∞ from the following result. Theorem 3.1: Let Ci ∈ SO(n) denote a rotation matrix which identifies the orientation of the i-th agent. Suppose that n × n matrix Bi for the i-th agent is derived from the procedures (9), (10) and (13). Then, there exists a common matrix X ∈ SO(n) such that Bi converges to Ci X as t → ∞ for all i ∈ {1, . . . N }. Proof: By using the coordinate transformation, we define qi,k ∈ Rn for all i ∈ {1, . . . N } and k ∈ {1, . . . , n − 1} such that zi,k = Ci qi,k . Let us replace the value of qi,k with zi,k in the procedure (9). From the definition of bi,k for all k in (9), vi,k is rewritten as follows : vi,1 vi,2 = Ci qi,1 := Ci xi,1 vi,1 vi,1 = Ci qi,2 − hCi qi,2 , kvi,1 k i kvi,1 k := Ci xi,2 (22) .. . vi,n−1 = Ci qi,n−1 − := Ci xi,n−1 vi,k vi,k k=1 hCi qi,n−1 , kvi,k k i kvi,k k Pn−2 Using this to replace vi,m by xi,m , ∀m ∈ {1, . . . n}, xi,m can be written as follows: xi,1 = qi,1 x x xi,2 = qi,2 − hqi,2 , kxi,1 i i,1 i,1 k kxi,1 k (23) .. . Pn−2 xi,k xi,k xi,n−1 = qi,n−1 − k=1 hqi,n−1 , kxi,k k i kxi,k k This is a Gram-Schmidt procedure with respect to the qi,k , ∀k ∈ {1, . . . n − 1}. From the result of Lemma 3.1, for each k, qi,k converges to a finite point qk∞ ∈ Rn as t → ∞ for n all i ∈ V. This implies that there exists a finite vector x∞ k ∈R ∞ ∞ such that {xi,1 , xi,2 · · · xi,n−1 } → {x∞ 1 , x2 , · · · xn−1 } as t → ∞ for all i. It is clear that bi,k and xi,k have the following x relationship: bi,k = Ci kxi,k , ∀k ∈ {1, 2 . . . n − 1}. We also i,k k derive bi,n from (10). Therefore, in the steady state of xi,k , we have the following solution of Bi (t):  ∞  x1 x∞ x∞ n 2 lim Bi (t) = Ci · · · , ∀i ∈ V (24) ∞ t→∞ kx∞ kx∞ n k 1 k kx2 k It completes the proof. Since Bi (t) → Ci X as t → ∞, it is clear that Bi (t) → Cij Bj (t) as t → ∞. From the result of Theorem 3.1, we now see that the proposed algorithm provides the solution of the Problem 3.2. Since we transformed the Problem 3.1 to Problem 3.2, Bi is the estimated orientation. In the following section, we combine this algorithm with the formation control. For a practical reason, we consider the formation control in 3-dimensional spaces instead of the general n-dimensional spaces. IV. F ORMATION C ONTROL I N 3-D S PACE In 3-dimensional space, we have to obtain the matrix Bi ∈ SO(3) satisfying conditions stated in Problem 3.2. We have two auxiliary variables denoted by zi,1 , zi,2 for the i-th agent. By using the proposed estimation law (13) and Gram-schmidt process, we can obtain bi,1 and bi,2 . Since the pseudovector is directly calculated by using a cross product of two vectors in 3-dimensional space, the quantity bi,3 is as follows : bi,3 = bi,1 × bi,2 , ∀i ∈ V. j∈Ni where ku > 0 and lij > 0. Since ui = Ci−1 uii , the position dynamics of i-th agent with respect to the global reference frame is written as follows: = = ui = Ci−1 uii (27)   X −1 i i ∗ ∗ ku lij Ci (pj − pi ) − Ĉi (pj − pi ) (28) j∈Ni = ku X j∈Ni   lij (pj − pi ) − Ci−1 Ĉi (p∗j − p∗i ) (29) j∈Ni X j∈Ni | (31) where e = (e1 , . . . , eN ) and w = (w1 , . . . , wN ). From (19) and the result of the Theorem 3.1, it is clear that Ci−1 Ĉi converges to C ∗ with an exponential rate. It follows that there exist kw > 0 and λw > 0 such that kw(t)k ≤ kw e−λw (t−t0 ) kw(t0 )k Now, we consider the solution of e(t) given by Z t e(t) = e−L⊗I3 (t−t0 ) e(t0 ) + e−L⊗I3 (t−τ ) w(τ )dτ. (32) (33) t0 By using the result in Theorem 3.1 of [5], the following result is obtained. Theorem 4.1: Under the estimation law (13) and the formation control law (26), there exists a finite point p∞ such that pi (t), ∀i ∈ V globally exponentially converges to C ∗ p∗i + p∞ , if G has a rooted-out branch, and q̂k (t0 ), ∀k ∈ {1, 2}is not in C(LH ⊗ I3 ). Proof: Let us define Ee as Ee := {(x1 , . . . , xN ) ∈ R3N : xi = xj , ∀i, j ∈ V} (34) There exists e∗ ∈ Ee , kl > 0 and λl > 0 such that ke(t) − e∗ k ≤ e−L⊗I3 (t−t0 ) e(t0 ) − e∗ Z t e−L⊗I3 (t−τ ) w(τ )dτ + t0 −λl (t−t0 ) ≤ kl e Z + t t0 ke(t0 ) − e∗ k (35) (36) (37) e−L⊗I3 (t−τ ) kw(τ )k dτ (38) According to the definition of induced norm, e−L⊗I3 (t−τ ) is written as e−L⊗I3 (t−τ ) = max kxk=1,t0 ≤τ ≤t e−L⊗I3 (t−τ ) x ≤ η (39) where η > 0 is a finite value which bounds the matrix norm. It follows from (32) and (39) that Z t e−L⊗I3 (t−τ ) kw(τ )k dτ (40) t0 Z t ≤ ηkw e−λw (τ −t0 ) kw(t0 )k dτ (41) t0 From the Theorem 3.1, there exists C ∗ ∈ R3×3 such that Ci−1 Ĉi (t) converges to C ∗ as t → ∞. By defining ei := pi − C ∗ p∗i , we obtain the error dynamics as follows: X ėi = ku lij (ej − ei ) + ku ė = −ku L ⊗ I3 e + w (25) Note that Ĉi (t) = Bi (t) ∈ SO(3). We now propose a control law for the formation system under the assumption of Problem 2.1. Consider the following control law: X uii = ku lij ((pij − pii ) − Ĉi (p∗j − p∗i )) (26) ṗi Then, (30) can be rewritten in the vector form as follows: ∗ lij (C − Ci−1 Ĉi )(p∗j {z wi := − p∗i ) } (30) −ηkw h −λw (τ −t0 ) it e kw(t0 )k = λw t0 −ηkw = kw(t0 )k (e−λw (t−t0 ) − 1) λw (42) (43) From (43), (38) can be written as follows: ke(t) − e∗ k ≤ kl e−λl (t−t0 ) ke(t0 ) − e∗ k (44) ηkw − kw(t0 )k (e−λw (t−t0 ) − 1). (45) λw By replacing t0 with t00 = (t + t0 )/2 in (45), we obtain ke(t) − e∗ k ) e( t + t0 ) − e∗ 2 t−t0 ηkw t + t0 − w( ) (e−λw ( 2 ) − 1) λw 2 ≤ kl2 e−λl (t−t0 ) ke(t0 ) − e∗ k t−t0 t−t0 ηk 2 − w e−λw ( 2 ) kw(t0 )k (e−λw 2 − 1) λw ≤ kl e−λl ( t−t0 2 Fig. 3: Interaction graph of six agents for simulation This completes the proof. j∈Ni where is a relative displacement defined in (5) and ku , lij > 0. We know that piji = pij − pii = Ci (pj − pi ). By defining p̃i as p̃i := p̂i − C ∗ pi , we obtain the estimation error dynamics as follows : X p̃˙i = ku lij (p̂j − p̂i − ĈiT Ci (pj − pi )) j∈Ni = ku j∈Ni + ku lij (p̃j − p̃i ) X j∈Ni | 16 14 12 10 piji X 18 k(pj − pi ) − C ∗ (p∗i − p∗j )k V. N ETWORK L OCALIZATION IN 3-D S PACE Consider the agents under the assumption of Problem 2.2. We can obtain Ĉi from the proposed estimation method for the unknown orientation as stated in the previous sections. Then, we design an estimation law of p̂i as follows: X p̂˙i = ku lij (p̂j − p̂i − ĈiT piji ) (46) ψi := 6 4 2 0 0 2 4 6 8 10 12 t(sec) lij (C ∗ − ĈiT Ci )(pj − pi ) {z 8 (47) } Fig. 4: Difference of the measured displacement and the desired displacement of neighboring agents. C ∗ is a common rotation matrix. Thus the overall error dynamics for position estimation can be written as p̃˙ = −ku L ⊗ I3 p̃ + Ψ (48) where p̃ = (p̃1 , p̃2 , . . . , p̃N ) and Ψ = (ψ1 , ψ2 , . . . ψN ). We notice that (48) corresponds to (31). We obtain the following corollary based on the relationship. Corollary 5.1: Under the orientation estimation law (13) and the position estimation law (46), there exists a finite point p̂∞ i , ∀i ∈ V to which p̂i globally exponentially converges, such ∞ that kp̂∞ j − p̂i k = kpj − pi k, if G has a rooted-out branch, and q̂k (t0 ), ∀k ∈ {1, 2}is not in C(LH ⊗ I3 ). VI. S IMULATION R ESULT In this section, we provide simulation results to verify the proposed methods. We consider six agents whose interaction graph is illustrated in Fig. 3. Suppose that each agent has its own reference frame which is rotated from the global reference frame by the proper orthogonal matrix Ci ∈ R3×3 , i = {1, 2, 3, 4, 5, 6}. For the simulation, the matrix Ci is arbitrary determined. Estimated orientation of i-th agent identified by Ĉi can be obtained by using two auxiliary variables. Under the estimation law (13), Ĉi (t) converges to a steady state solution as t goes to infinity. The formation control law (26) of ith agent is simultaneously conducted with the estimation of orientation Ĉi . According to the result of the Theorem 4.1, the position of i-th agent denoted by pi converges to C ∗ p∗i + p∞ , where C ∗ ∈ R3×3 is a common rotation matrix obtained by C T Ĉi (t) as t → ∞, p∗i is desired position of i-th agent, and p∞ is a common position vector. Fig. 4 shows the result that the measured displacement of neighboring agents converges to the desired displacement with rotational motion. Fig. 5 depicts that the formation of six agents using the proposed strategy, which includes a combination of orientation estimation and formation control law, converges to the rotated desired shape. VII. C ONCLUSION In this paper, we proposed a novel estimation method for unknown orientation of agent with respect to the common reference frame in general n-dimensional space. We added virtual auxiliary variables for each agent. These auxiliary variables [6] [7] 8 Initial point Final point 6 [8] 4 2 [9] 0 −2 [10] −4 [11] −6 2 0 2 [12] 0 −2 −2 −4 −4 −6 [13] −6 Fig. 5: Formation control via orientation estimation in 3 dimensional space [14] [15] are corresponding to column vectors of estimated orientation Ĉi ∈ SO(n). An estimation law of auxiliary variables is based on the principle of consensus protocol. Since configuration space for the proposed method is n-dimensional vector space instead of nonlinear space like unit circle, global convergence of auxiliary variables is guaranteed. Consequently, each desired point to which auxiliary variables converge, under the proposed estimation law, is transformed to the estimated orientation. This estimated frame is used to compensate the rotated frame of each agent in the formation control system. Under the formation control law with proposed estimation method, we guarantee a global convergence of multi-agent system to the desired shape in 3-dimensional space, under the distancebased setup. The proposed strategy can also be applied to the localization problem in networked systems. The result remedies the weak point of previous works [5], [6] where the range of initial orientations is constrained to 0 ≤ θi < π. R EFERENCES [1] K.-K. Oh, M.-C. Park, and H.-S. Ahn, “A survey of multi-agent formation control,” Automatica, vol. 53, pp. 424–440, 2015. [2] Z. Lin, B. Francis, and M. Maggiore, “Necessary and sufficient graphical conditions for formation control of unicycles,” IEEE Transactions on Automatic Control, vol. 50, pp. 121–127, 2005. [3] W. Ren and E. Atkins, “Distributed multi-vehicle coordinated control via local information exchange,” Int. Journal of Robust and Nonlinear Control, vol. 17, pp. 1002–1033, 2007. [4] D. V. Dimarogonas and K. J. Kyriakopoulos, “A connection between formation inachievability and velocity alignment in kinematic multiagent systems,” Automatica, vol. 44, no. 10, pp. 2648–2654, 2008. [5] K.-K. Oh and H.-S. Ahn, “Formation control and network localization via orientation alignment,” IEEE Trans. on Automatic Control, vol. 59, no. 2, pp. 540–545, Feb. 2014. [16] E. Montijano, D. Zhou, M. Schwger, and C. Sagues, “Distributed formation control without a global reference frame,” in Proceedings of Americal Control Control(ACC),2014, 2014, pp. 3862–3867. B.-H. Lee and H.-S. Ahn, “Distributed formation control via global orientation estimation,” Automatica, vol. 73, pp. 125–129, 2016. ——, “Distributed estimation for the unknown orientation of the local reference frames in n-dimensional space,” in Proc. Control Automation Robotics and Vision(ICARCV), 2016 14th International Conference on, Nov. 2016. L. Moreau, “Stability of continuous-time distributed consensus algorithms,” in Decision and Control 2004. CDC. 43rd IEEE Conference on, Dec. 2004, pp. 3998 – 4003. L. Scardovi and R. Sepulchre, “Synchronization in networks of identical linear systems,” Automatica, vol. 45, pp. 2557–2562, 2009. A. Jadbabaie, J. Lin, and A. S. Morse, “Coordination of groups of mobile autonomous agents using nearest neighbor rules,” IEEE Transactions on Automatic Control, vol. 48, no. 6, pp. 988–1001, 2013. R. Sepulchre, “Consensus on nonlinear spaces,” Annual Reviews in Control, vol. 35, pp. 56–64, 2011. F. Dörfler and F. Bullo, “Synchronization in complex networks of phase oscillator:a survey,” Automatica, vol. 50, no. 6, pp. 1539–1564, 2014. L. Moreau, “Stability of multiagent systems with time-dependent communication links,” IEEE Trans. on Automatic Control, vol. 50, no. 2, pp. 169–182, Feb. 2005. K.-K. Oh and H.-S. Ahn, “Formation control of mobile agents based on distributed position estimation,” IEEE Trans. on Automatic Control, vol. 58, no. 3, pp. 737–742, Mar. 2013. N. Chaturvedi, A. Sanyal, and N. McClamroch, “Rigid-body attitude control,” IEEE Control Systems, vol. 31, no. 3, pp. 30–51, 2011.
3cs.SY
Shaping Pulses to Control Bistable Monotone Systems Using Koopman Operator Aivar Sootla ∗ Alexandre Mauroy ∗∗ Jorge Goncalves ∗∗∗ arXiv:1605.06252v1 [cs.SY] 20 May 2016 ∗ Montefiore Institute, University of Liège, B-4000 Liège, Belgium (e-mail: [email protected]). ∗∗ Luxembourg Centre for Systems Biomedicine, University of Luxembourg, L-4367 Belvaux, Luxembourg (e-mail: [email protected]) ∗∗∗ Luxembourg Centre for Systems Biomedicine, University of Luxembourg, L-4367 Belvaux, Luxembourg (e-mail: [email protected]) Abstract: In this paper, we further develop a recently proposed control method to switch a bistable system between its steady states using temporal pulses. The motivation for using pulses comes from biomedical and biological applications (e.g. synthetic biology), where it is generally difficult to build feedback control systems due to technical limitations in sensing and actuation. The original framework was derived for monotone systems and all the extensions relied on monotone systems theory. In contrast, we introduce the concept of switching function which is related to eigenfunctions of the so-called Koopman operator subject to a fixed control pulse. Using the level sets of the switching function we can (i) compute the set of all pulses that drive the system toward the steady state in a synchronous way and (ii) estimate the time needed by the flow to reach an epsilon neighborhood of the target steady state. Additionally, we show that for monotone systems the switching function is also monotone in some sense, a property that can yield efficient algorithms to compute it. This observation recovers and further extends the results of the original framework, which we illustrate on numerical examples inspired by biological applications. 1. INTRODUCTION optimally) but are also simple enough to be implemented in an experimental setting. In many applications, the use of a time-varying feedback control signal is impeded by the limitations in sensing and actuation. One of such applications is synthetic biology, which aims to engineer and control biological functions in living cells (Brophy and Voigt (2014)), and which is an emerging field of science with applications in metabolic engineering, bioremediation and energy sector (Purnick and Weiss (2009)). Recently, control theoretic regulation of protein levels in microbes was shown to be possible by Milias-Argeitis et al. (2011); Menolascina et al. (2011); Uhlendorf et al. (2012). However, the proposed methods are hard to automate due to physical constraints in sensing and actuation (for example, using the techniques from Levskaya et al. (2009); Mettetal et al. (2008)). In the context of actuation, adding a chemical solution to the culture is fairly straightforward, but in contrast, removing a chemical from the culture is much more complicated (this could be done through diluting, but would be time consuming and hard to perform repeatedly). In regard to these constraints, it is therefore desirable to derive control policies which can not only solve a problem (perhaps not The pioneering development in synthetic biology was the design of the so-called genetic toggle switch by Gardner et al. (2000), which is a synthetic genetic system (or a circuit) of two mutually repressive genes LacI and TetR. Mutual repression means that only one of the genes can be activated or switched “on” at a time. The activated gene expresses proteins within a cell, hence the number of proteins expressed by the “on” gene is much higher than the number of proteins of the “off” gene. This entails the possibility of modeling this genetic circuit by a bistable dynamical system. Since toggle switches serve as one of the major building blocks in synthetic biology, we set up the control problem of switching from one stable fixed point to another (or toggling a gene). Recently, Sootla et al. (2015, 2016) proposed to solve the problem using temporal pulses u(t) with fixed length τ and magnitude µ:  1 0≤t≤τ, u(t) = µh(t, τ ) h(t, τ ) = (1) 0 t>τ. 1 A. Sootla holds an F.R.S–FNRS fellowship. This work was performed when A. Mauroy was with the University of Liège and held a return grant from the Belgian Science Policy (BELSPO). In the case of monotone systems (cf. Angeli and Sontag (2003)), the set of all pairs (µ, τ ) allowing a switch (i.e. the switching set) was completely characterized. In particular, the boundary of this set, called the switching separatrix, was shown to be monotone, a result which significantly simplifies the computation of the switching set. However, the contributions of Sootla et al. (2016) provide only a binary answer (on whether a given control pulse switches the system or not), but do not characterize the time needed to converge to the steady state. In this paper, we conduct a theoretical study which extends the results by Sootla et al. (2016) and provides a temporal characterization of the effects of switching pulses. To do so, we exploit the framework of the so-called Koopman operator (cf. Mezić (2005)), which is a linear infinite dimensional representation of a nonlinear dynamical system. In particular, we use the spectral properties of the operator, focusing on the Koopman eigenfunctions (i.e. infinite dimensional eigenvectors of the operator). We first introduce the switching function, which we define as a function of µ and τ related to the dominant Koopman eigenfunction. Each level set of the switching function characterizes a set of pairs (µ, τ ) describing control pulses that drive the system synchronously to the target fixed point. Hence, the switching function provides a temporal characterization of the controlled trajectories. The switching separatrix introduced by Sootla et al. (2016) is interpreted in this framework as a particular level set of the switching function. Furthermore, there is a direct relationship between the level sets of the switching function and the so-called isostables introduced in Mauroy et al. (2013). Since the switching function is defined through a Koopman eigenfunction, it can be computed in the Koopman operator framework with numerical methods based on Laplace averages. These methods can be applied to a very general class of systems, but usually require extensive simulations. However, we show that the switching function of monotone systems is also monotone in some sense, so that its level sets can be computed in a very efficient manner by using the algorithm proposed in Sootla and Mauroy (2016b). The key to reducing the computational complexity is to exploit the properties of the Koopman eigenfunctions of a monotone system. The main contribution of this paper is to provide a theoretical framework that relates the Koopman operator to control problems. We note, however, that the eigenfunctions of the Koopman operator can be estimated directly from the observed data using dynamic mode decomposition methods (cf. Schmid (2010); Tu et al. (2014)). Therefore our results could potentially be extended to a data-based setting, which would increase their applicability. The rest of the paper is organized as follows. In Section 2, we cover some basics of monotone systems theory and Koopman operator theory. In Section 3, we review the shaping pulses framework from Sootla et al. (2016) and present the main results of this paper. We illustrate the theoretical results on examples in Section 4. 2. PRELIMINARIES Consider control systems in the following form ẋ = f (x, u), x(0) = x0 , (2) with f : D × U → Rn , u : R≥0 → U, and where D ⊂ Rn , U ⊂ R and u belongs to the space U∞ of Lebesgue measurable functions with values from U. We define the flow map φ : R×D×U∞ → Rn , where φ(t, x0 , u) is a solution to the system (2) with an initial condition x0 and a control signal u. If u = 0, then we call the system (2) unforced. We denote the Jacobian matrix of f (x, 0) as J(x). If x∗ is a fixed point of the unforced system, we assume that the eigenvectors of J(x∗ ) are linearly independent, for the sake of simplicity. We denote the eigenvalues of J(x∗ ) by λi . Koopman Operator. Spectral properties of nonlinear dynamical systems can be described through an operatortheoretic framework that relies on the so-called Koopman operator L = f T ∇, which is an operator acting on the functions g : Rn → C (also called observables). We limit our study of the Koopman operator to unforced systems (2) (that is, with u = 0) on a basin of attraction B ⊂ Rn of a stable hyperbolic fixed point x∗ (that is, the eigenvalues λj of the Jacobian matrix J(x∗ ) are such that <(λj ) < 0 for all j). In this case, the Koopman operator admits a point spectrum and the eigenvalues λj of the Jacobian matrix J(x∗ ) are also eigenvalues of the Koopman operator. In the non-hyperbolic case, the analysis is more involved since the spectrum of the Koopman operator may be continuous. The operator L generates a semigroup acting on observables g U t g(x) = g ◦ φ(t, x, 0), (3) where ◦ is the composition of functions and φ(t, x, 0) is a solution to the unforced system for x ∈ B. Since the operator is linear (cf. Mezic (2013)), it is natural to study its spectral properties. In particular, the eigenfunctions sj : B 7→ C of the Koopman operator are defined as the functions satisfying Lsj = f T ∇sj = λj sj , or equivalently U t sj (x) = sj (φ(t, x, 0)) = sj (x) eλj t , where λj ∈ C is the associated eigenvalue. x ∈ B, (4) If the vector field f is a C 2 function, then the eigenfunctions sj are C 1 functions (Mauroy and Mezic (2016)). If the vector field f is analytic and if the eigenvalues λj are simple, the flow of the system can be expressed through the following expansion (see e.g. Mauroy et al. (2013)): n X φ(t, x, 0) = x∗ + sj (x)vj eλj t + (5) j=1 X vk1 ,...,kn sk11 (x) · · · sknn (x)e(k1 λ1 +...kn λn )t , k1 ,...,kn ∈N0 k1 +···+kn >1 where N0 is the set of nonnegative integers, λj , vj are the eigenvalues and right eigenvectors of the Jacobian matrix J(x∗ ), respectively, and the vectors vk1 ,...,kn are the Koopman modes (see Mezić (2005); Mauroy and Mezic (2016) for more details). Note that a similar expansion can also be obtained if the eigenvalues are not simple (cf. Mezic (2015)). Throughout the paper we assume that λj are such that 0 > <(λ1 ) > <(λj ) for all j ≥ 2. In this case, the eigenfunction s1 , which we call a dominant eigenfunction, can be computed through the so-called Laplace average ZT 1 ∗ gλ (x) = lim (g ◦ φ(t, x, 0))e−λt dt. (6) t→∞ T 0 For all g that satisfy g(x∗ ) = 0 and ∇g(x∗ ) · v1 6= 0, the Laplace average gλ∗1 is equal to s1 (x) up to a multiplication with a scalar. If we let g(x) = w1T (x − x∗ ), where w1 is the left eigenvector of J(x∗ ) corresponding to λ1 , the limit in (6) does not converge if x 6∈ B. Therefore, we do not require the knowledge of B in order to compute s1 . The other eigenfunctions sj (x) are generally harder to compute using Laplace averages. The eigenfunction s1 can also be estimated with linear algebraic methods (cf. Mauroy and Mezic (2016)), or obtained directly from data by using dynamic mode decomposition methods (cf. Schmid (2010); Tu et al. (2014)). The eigenfunction s1 (x) captures the dominant (i.e. asymptotic) behavior of the unforced system. Hence the boundaries ∂B α of the sets B α = {x | |s1 (x)| ≤ α}, which are called isostables, are important for understanding the dynamics of the system. It can be shown that trajectories with initial conditions on the same isostable ∂B α1 converge synchronously toward the fixed point, and reach other isostables ∂B α2 , with α2 < α1 , after a time   1 α1 T = ln . (7) |<(λ1 )| α2 In particular, for λ1 ∈ R, it follows directly from (5) that the trajectories starting from ∂B α share the same asymptotic evolution φ(t, x, 0) → x∗ + v1 αeλ1 t , t → ∞ . Note that isostables could also be defined when the system is driven by an input u 6= 0, but they are here considered only to describe the dynamics of the unforced system. A more rigorous definition of isostables and more details can be found in (Mauroy et al. (2013)). In the case of bistable systems characterized by two equilibria x∗ and x• with basins of attraction B(x∗ ) and B(x• ), respectively, the Koopman operator admits two sets of eigenfunctions s∗k and s•k . The eigenfunctions s∗k (resp. s•k ) are related to the asymptotic convergence toward x∗ (resp. x• ). The dominant eigenfunctions s∗1 and s•1 define two families of isostables, each of which is associated with one equilibrium and lies in the corresponding basin of attraction. Monotone Systems and Their Spectral Properties. We will study the properties of the system (2) with respect to a partial order induced by positive cones in Rn . A set K is a positive cone if R≥0 K ⊆ K, K + K ⊆ K, K ∩ −K ⊆ {0}. A relation ∼ is called a partial order if it is reflexive (x ∼ x), transitive (x ∼ y, y ∼ z implies x ∼ z), and antisymmetric (x ∼ y, y ∼ x implies x = y). We define a partial order K through a cone K ∈ Rn as follows: x K y if and only if x − y ∈ K. We write x 6K y, if the relation x K y does not hold. We also write x K y if x K y and x 6= y, and x K y if x − y ∈ int(K). Similarly we can define a partial order on the space of signals u ∈ U∞ : u K v if u(t) − v(t) ∈ K for all t ≥ 0. Systems whose flows preserve a partial order relation K are called monotone systems. We have the following definition. Definition 1. The system ẋ = f (x, u) is called monotone with respect to the cones Kx , Ku if φ(t, x, u) Kx φ(t, y, v) for all t ≥ 0, and for all x Kx y, u Ku v. The properties of monotone systems require additional definitions. A function g : Rn → R is called increasing with respect to the cone K if g(x) ≤ g(y) for all x K y. Let [x, y]K denote the order-interval defined as [x, y]K = {z|x K z K y}. A set A is called order-convex if, for all x, y in A, the interval [x, y]K is a subset of A. A set M is called p-convex if, for every x, y in M such that x K y and every λ ∈ (0, 1), we have that λx + (1 − λ)y ∈ M . Clearly, order-convexity implies p-convexity. If K = Rn≥0 we say that the corresponding partial order is standard. Without loss of generality, we will only consider the standard partial order throughout the paper. Proposition 2. (Angeli and Sontag (2003)). Consider the control system (2), where the sets D, U are p-convex and f ∈ C 1 (D×U). Then the system (2) is monotone on D×U∞ with respect to Rn≥0 , Rm ≥0 if and only if ∂fi ≥ 0, ∀ i 6= j, (x, u) ∈ cl(D) × U ∂xj ∂fi ≥ 0, ∀ i, j, (x, u) ∈ D × U. ∂uj A generalization of this result to other cones can be found in Angeli and Sontag (2003). We finally consider the spectral properties of monotone systems that are summarized in the following result. The proof can be found in Sootla and Mauroy (2016b). Proposition 3. Consider the system ẋ = f (x) with f ∈ C 2 , which admits a stable hyperbolic fixed point x∗ with a basin of attraction B. Assume that <(λ1 ) > <(λj ) for all j ≥ 2. Let v1 be a right eigenvector of the Jacobian matrix J(x∗ ) and let s1 be an eigenfunction corresponding to λ1 (with v1T ∇s1 (x∗ ) = 1). If the system is monotone with respect to Rn≥0 on int(B), then λ1 is real and negative. Moreover, there exist s1 (·) and v1 such that s1 (x) ≥ s1 (y) for all x, y ∈ B satisfying x  y, and v1  0. This result shows that the sets Bα = {x||s1 (x)| ≤ α} are order-convex for any α > 0 (cf. Sootla and Mauroy (2016b)). 3. SHAPING PULSES TO SWITCH BETWEEN FIXED POINTS In this paper we consider the problem of switching between two stable fixed points by using temporal pulses (1). We formalize this problem by making the following assumptions: A1. Let f (x, u) in (2) be continuous in (x, u) and C 2 in x for every fixed u on Df × U. A2. Let the unforced system (2) have two stable hyperbolic fixed points in Df , denoted by x∗ and x• , and let Df = cl(B(x∗ ) ∪ B(x• )). A3. For any u = µh(·, τ ) with finite µ and τ let φ(t, x∗ , u) belong to int(Df ). Moreover, let there exist µ > 0, τ > 0 such that lim φ(t, x∗ , µh(·, τ )) = x• . t→∞ Assumption A1 guarantees existence and uniqueness of solutions, while Assumption A2 defines a bistable system. Note that in Sootla et al. (2016), the assumptions A1–A2 are less restrictive. That is, f (x, u) is Lipschitz continuous in x for every fixed u, and the fixed points are asymptotically stable. Our assumptions are guided by the use of the Koopman operator. Assumptions A1 and A2 guarantee the existence of eigenfunctions s∗1 (x) and s•1 (x) that are continuously differentiable on each basin of attraction. Assumption A3 is technical and ensures that the switching problem is feasible. The goal of our control problem is to characterize the socalled switching set S defined as n o S = (µ, τ ) ∈ R2>0 ∀t > τ : φ(t, x∗ , µh(·, τ )) ∈ B(x• ) . (8) It is shown in Sootla et al. (2016) that the set S is simply connected and order-convex under some assumptions, a property which is useful to obtain an efficient computational procedure. In particular, the boundary ∂S, called the switching separatrix, is such that for all (µ, τ ), (ν, ξ) in ∂S we cannot have that µ > ν and τ > ξ. The following result sums up one of the theoretical contribution in Sootla et al. (2016). Proposition 4. Let the system ẋ = f (x, u) satisfy Assumptions A1–A3. The following conditions are equivalent: (i) the set S is order-convex and simply connected; (ii) let φ(τ1 , x∗ , µ1 h(·, τ1 )) belong to B(x• ), then the flow φ(τ2 , x∗ , µ2 h(·, τ2 )) ∈ B(x• ) for all µ2 ≥ µ1 , τ2 ≥ τ1 . Moreover, if the system ẋ = f (x, u) is monotone with respect to K ×R on D ×U∞ and satisfies Assumptions A1– A3, then (i)-(ii) hold. We also note that the results in Sootla et al. (2016) were extended to account for parametric uncertainty in the vector field under additional constraints. In particular, it is possible to estimate bounds on the switching set S. Now, we proceed by providing an operator-theoretic point of view on shaping pulses, which allows to study rates of convergence to the fixed point. Definition 5. Let S ⊆ R2>0 be a set of (µ, τ ) such that φ(τ, x∗ , µ) ∈ B(x• ). We define the switching function r : S 7→ C by r(µ, τ ) = s•1 (φ(τ, x∗ , µ)) for all (µ, τ ) such that φ(τ, x∗ , µ) ∈ B(x• ). The level sets ∂S α of |r| defined as n o ∂S α = (µ, τ ) ∈ S |r(µ, τ )| = α , α≥0 α are reminiscent of the isostables ∂B , which are the level sets of |s1 |. We also consider the sublevel sets of |r| n o S α = (µ, τ ) ∈ R2>0 |r(µ, τ )| ≤ α and it is straightforward toSshow that the switching set S in (8) is equal to S ∞ = α≥0 S α . The level sets ∂S α can therefore be seen as a generalization of the switching separatrix ∂S = ∂S ∞ . The level sets ∂S α capture the pairs (µ, τ ) such that the trajectories φ(t, x∗ , µh(·, τ )) reach the isostable ∂B α at time t = τ and cross the same isostables for all t ≥ τ . This implies that the trajectories with the pairs (µ, τ ) on the same level sets ∂S α will take the same time to converge towards the fixed point x• when the control is switched off. We can for instance estimate the time T needed to reach the set B ε for a positive ε. It follows from (7) that, for (µ, τ ) ∈ ∂S α , we have α 1 T (µ, τ, ε) = ln , (9) |λ1 | ε where a negative T means that the trajectory is inside the set B ε at time t = τ . Hence, the quantity Ttot = T + τ is the time it takes to reach B ε if T is nonnegative. For small enough ε, the function Ttot (µ, τ, ε) approximates the amount of time required to reach a small neighborhood of the fixed point x• . In order to compute the switching function r, we can again employ Laplace averages ZT 1 r(µ, τ ) = lim g ◦ φ(t, φ(τ, x∗ , µ), 0)e−λ1 t dt T →∞ T 0 1 T →∞ T ZT = lim g ◦ φ(t, x∗ , µh(·, τ ))e−λ1 (t−τ ) dt, (10) τ where λ1 is the dominant Koopman eigenvalue and g satisfies g(x• ) = 0 and v1T ∇g(x• ) 6= 0. Note again that the limit does not converge unless φ(τ, x∗ , µ) belongs to B(x• ). The computation of S α is not an easy task in general, but certainly possible. However, additional assumptions on the system simplify the computation of these sets. From this point on we will assume that r(µ, τ ) has only real values (i.e. s•1 ∈ R), which holds if the dominant Koopman eigenvalue on B(x• ) is real (see Mauroy et al. (2013)). In this case, the set ∂S α can be split into two sets n o ∂− S α = (µ, τ ) ∈ R2>0 r(µ, τ ) = −α , n o ∂+ S α = (µ, τ ) ∈ R2>0 r(µ, τ ) = α . If S α is order-convex (as it is shown below for the case of monotone systems), then ∂− S α and ∂+ S α are the sets of minimal and maximal elements of S α , respectively. That is, if x  y for some x ∈ ∂+ S α (respectively, if x  y for α S) then y 6∈ S. This implies that ∂− S α and some x ∈ ∂− α ∂+ S are monotone maps, which significantly facilitates computations of S α by applying the algorithm from Sootla and Mauroy (2016b) with a minor modification. Monotonicity also plays a role in the properties of the sublevel sets S α , as it does in the properties of the switching separatrix. The main result of the section establishes that, for monotone systems, the sets S α are order-convex and ∂S α are monotone maps. Theorem 6. Let the system (2) satisfy Assumptions A1– A3 and be monotone on D × U ∞ . Then (i) the set S α is order-convex (with respect to the positive orthant) for any non-zero α; (ii) the set ∂+ S α is a monotone map, that is for all (µ1 , τ1 ), (µ2 , τ2 ) ∈ ∂+ S α , if τ1 < τ2 then µ1 ≥ µ2 , and if µ1 < µ2 then τ1 ≥ τ2 . Moreover, the set ∂− S α is a graph of a monotonically decreasing function for any finite non-zero α; (iii) if additionally φ(t, x, µ)  φ(t, x, ν) for all x, all µ > ν ≥ 0 and all t > 0, then ∂− S α and ∂+ S α are graphs of monotonically decreasing functions for any finite nonzero α. The proof of Theorem 6 is in Appendix A. An interesting detail is that the level sets ∂− S α are graphs of decreasing functions. This implies that the switching separatrix ∂S ∞ Eight Species Generalized Repressilator. This system is an academic example (cf. Strelkowa and Barahona (2010)), where each of the species represses another species in a ring topology. The corresponding dynamic equations for a symmetric generalized repressilator are as follows: p1 ẋ1 = + p4 − p5 x1 + u, 1 + (x8 /p2 )p3 p1 + p4 − p5 x2 , ẋ2 = (11) 1 + (x1 /p2 )p3 p1 ẋi = + p4 − p5 xi , ∀i = 3, . . . 8, 1 + (xi−1 /p2 )p3 where p1 = 100, p2 = 1, p3 = 2, p4 = 1, and p5 = 1. This system has two stable equilibria x∗ and x• and is monotone with respect to the cones Kx = Px R8 and Ku = R, where Px = diag([1, − 1, 1, − 1, 1, − 1, 1, − 1]). We have also x∗ Kx x• . It can be shown that the unforced system is strongly monotone in the interior of R8≥0 for all positive parameter values. One can also verify that there exist pulse control signals u that switch the system from the state x∗ to the state x• . The level sets ∂S α are depicted in Figure 1, where instead of the values of the level sets we provide the time needed to converge to ∂B 0.01 . As the reader may notice, the two curves related to T = 5 (i.e. blue solid curves) lie close to each other. They approximate the pairs (µ, τ ) that drive the flow to the zero level set of s•1 (x). It is also noticeable that the level sets ∂S α are less dense on the right of these lines. This is explained by the fact that the flow is driven by the pulse beyond the zero level set of s•1 (x) and has to counteract the dynamics of the system. The generalized repressilator is a monotone system, and hence the premise of Theorem 6 is fulfilled. The level sets ∂S α in Figure 1 appear to be graphs of monotonically decreasing functions, an observation which is consistent with the claim of Theorem 6. Toxin-antitoxin system. Consider the toxin-antitoxin system studied in Cataudella et al. (2013). σT 1  Ṫ =  − T [Af ][Tf ] 1+ (1 + β [T ]) (1 + βC [Tf ]) K0 M f σA  − ΓA A + u Ȧ =  [Af ][Tf ] 1 + K0 (1 + βM [Tf ])   [Af ][Tf ] [Af ][Tf ]2 ε[Ȧf ] = A − [Af ] + + KT KT KT T   [Af ][Tf ] [Af ][Tf ]2 ε[Ṫf ] = T − [Tf ] + +2 , KT KT KT T where A and T is the total number of toxin and antitoxin proteins, respectively, while [Af ], [Tf ] is the number of free toxin and antitoxin proteins. In Cataudella et al. (2013), the authors considered the model with ε = 0. In order to simplify our analysis we set ε = 10−6 . For the parameters Pulse Magnitude 4. EXAMPLES Time to reach 300 200 100 5 15 10 20 Pulse length Fig. 1. The level sets of T = 1 |λ1 | ln  |r(µ,τ )| ε  , where ε = 10−2 . The pairs (µ, τ ) on the same curve are related to trajectories which converge synchronously to the stable equilibrium. Time to reach 40 Pulse Magnitude can be approximated by a graph of a function by setting α  0. We can also partially recover the results in Sootla et al. (2016) by letting α → +∞. Note, however, that ∂− S ∞ is not necessarily a graph of a function, since strict inequalities may no longer hold in the limit. 30 20 10 5 25 15 Pulse length Fig. 2. The level sets of T = 1 |λ1 | ln  |r(µ,τ )| ε −2 antitoxin system, where ε = 10  for the toxin- . σT = 166.28, K0 = 1, βM = βc = 0.16, σA = 102 ΓA = 0.2, KT = KT T = 0.3, the system is bistable with two stable steady states: x• = (27.1517 80.5151 58.4429 0.0877) ∗ x = (162.8103 26.2221 0.0002 110.4375) . It can be verified that the system is not monotone with respect to any orthant, however, it was established in Sootla and Mauroy (2016a) that it is eventually monotone. This means that the flow satisfies the monotonicity property after some initial transient. We depict the level sets ∂S α in Figure 2, where it appears that these sets are monotone curves although the system does not satisfy the assumptions of Theorem 6. This could be explained by the property of eventual monotonicity, but we have not further investigated this case. Lorenz System. Now we illustrate the level sets ∂S α in the case where r is complex-valued. Consider the Lorenz system ẋ1 = σ(x2 − x1 ) + u ẋ2 = x1 (ρ − x3 ) − x2 + u ẋ3 = x1 x2 − βx3 with parameters σ = 10, ρ = 2, β = 8/3, which is bistable but not monotone. Note that the Jacobian matrix at the steady states has two complex conjugate dominant Time to reach Pulse Magnitude 20 15 10 5 0.5 1 1.5 2.5 2 3 Pulse length 1 |λ1 | −2 Fig. 3. The level sets of T = system, where ε = 10 ln  |r(µ,τ )| ε  for the Lorenz . eigenvalues. In this case, Theorem 6 cannot be applied and Figure 3 shows that the level sets ∂S α are not monotone. It is however noticeable that the lower part of the switching separatrix (black curve) seems to be monotone (but the upper part is not monotone). 5. CONCLUSION In this paper, we have further developed a recent study on the problem of switching a bistable system between its steady states with temporal pulses. We have introduced a family of curves in the control parameter space, denoted as ∂S α , which provide an information on the time needed by the system to converge to the steady state. The sets ∂S α can be viewed as an extension of the switching separatrix defined in the previous study. They are related to the dominant eigenfunction of the Koopman operator, a property that provides a method to compute them. In the case of monotone systems, we have also shown that the level sets ∂S α are characterized by strong (monotonicity) properties. Future research will investigate the topological properties of the level sets ∂S α such as connectedness. Moreover, characterizing the properties of the level sets ∂S α (and the switching separatrix) in the case of non-monotone (e.g. eventually monotone) systems is still an open question. REFERENCES Angeli, D. and Sontag, E. (2003). Monotone control systems. IEEE Trans Autom Control, 48(10), 1684– 1698. Brophy, J. and Voigt, C. (2014). Principles of genetic circuit design. Nat methods, 11(5), 508–520. Cataudella, I., Sneppen, K., Gerdes, K., and Mitarai, N. (2013). Conditional cooperativity of toxin-antitoxin regulation can mediate bistability between growth and dormancy. PLoS Comput Biol, 9(8), e1003174. Gardner, T., Cantor, C.R., and Collins, J.J. (2000). Construction of a genetic toggle switch in escherichia coli. Nature, 403, 339–342. Levskaya, A., Weiner, O.D., Lim, W.A., and Voigt, C.A. (2009). Spatiotemporal control of cell signalling using a light-switchable protein interaction. Nature, 461, 997– 1001. Mauroy, A. and Mezic, I. (2016). Global stability analysis using the eigenfunctions of the Koop- man operator. IEEE Tran Autom Control. doi: 10.1109/TAC.2016.2518918. In press. Mauroy, A., Mezić, I., and Moehlis, J. (2013). Isostables, isochrons, and Koopman spectrum for the action–angle representation of stable fixed point dynamics. Physica D, 261, 19–30. Menolascina, F., Di Bernardo, M., and Di Bernardo, D. (2011). Analysis, design and implementation of a novel scheme for in-vivo control of synthetic gene regulatory networks. Automatica, Special Issue on Systems Biology, 47(6), 1265–1270. Mettetal, J.T., Muzzey, D., Gomez-Uribe, C., and van Oudenaarden, A. (2008). The Frequency Dependence of Osmo-Adaptation in Saccharomyces cerevisiae. Science, 319(5862), 482–484. Mezić, I. (2005). Spectral properties of dynamical systems, model reduction and decompositions. Nonlinear Dynam, 41(1-3), 309–325. Mezic, I. (2013). Analysis of fluid flows via spectral properties of the Koopman operator. Annual Review of Fluid Mechanics, 45, 357–378. Mezic, I. (2015). On applications of the spectral theory of the koopman operator in dynamical systems and control theory. In IEEE Conf Decision Control, 7034–7041. Milias-Argeitis, A., Summers, S., Stewart-Ornstein, J., Zuleta, I., Pincus, D., El-Samad, H., Khammash, M., and Lygeros, J. (2011). In silico feedback for in vivo regulation of a gene expression circuit. Nat biotechnol, 29(12), 1114–1116. Purnick, P. and Weiss, R. (2009). The second wave of synthetic biology: from modules to systems. Nat. Rev. Mol. Cell Biol., 10(6), 410–422. Schmid, P.J. (2010). Dynamic mode decomposition of numerical and experimental data. Journal of Fluid Mechanics, 656, 5–28. Sootla, A. and Mauroy, A. (2016a). Operator-theoretic characterization of eventually monotone systems. Provisionally accepted for publication in Automatica. http://arxiv.org/abs/1510.01149. Sootla, A. and Mauroy, A. (2016b). Properties of isostables and basins of attraction of monotone systems. In Proc Amer Control Conf (to appear). http://arxiv.org/abs/1510.01153v2. Sootla, A., Oyarzún, D., Angeli, D., and Stan, G.B. (2015). Shaping pulses to control bistable biological systems. In Proc Amer Control Conf, 3138 – 3143. Sootla, A., Oyarzún, D., Angeli, D., and Stan, G.B. (2016). Shaping pulses to control bistable systems: Analysis, computation and counterexamples. Automatica, 63, 254–264. Strelkowa, N. and Barahona, M. (2010). Switchable genetic oscillator operating in quasi-stable mode. J R Soc Interface, 7(48), 1071–1082. doi:10.1098/rsif.2009.0487. Tu, J.H., Rowley, C.W., Luchtenburg, D.M., Brunton, S.L., and Kutz, J.N. (2014). On dynamic mode decomposition: Theory and applications. J Comput Dynamics, 1(2), 391 – 421. Uhlendorf, J., Miermont, A., Delaveau, T., Charvin, G., Fages, F., Bottani, S., Batt, G., and Hersen, P. (2012). Long-term model predictive control of gene expression at the population and single-cell levels. Proc. Nat. Academy Sciences, 109(35), 14271–14276. Appendix A. PROOF OF THEOREM 6 Before we proceed with the proof of Theorem 6, we show a technical result, which establishes that for monotone systems the transient during switching between operating points is always an increasing function. Proposition 7. Let the system (2) be monotone on D×U∞ , then φ(ξ + h, x∗ , µ)  φ(ξ, x∗ , µ) (A.1) for any nonnegative scalars h, ξ, µ. Proof: The proof stems from a well-know result in monotone systems theory, which states that the flow cannot increase (or decrease) on two disjoint time intervals. We show this result for completeness. Due to monotonicity we have φ(h, x∗ , µ)  φ(h, x∗ , 0) = x∗ (A.2) for all nonnegative h, µ. Therefore, the semigroup property of the dynamical systems implies φ(ξ+h, x∗ , µ) = φ(ξ, φ(h, x∗ , µ), µ)  φ(ξ, x∗ , µ), (A.3) for any nonnegative scalars ξ, h, µ. Proof of Theorem 6: (i) Let (µ1 , τ1 ), (µ2 , τ2 ) belong to S α for some finite α > 0 and µ2 ≥ µ1 , τ2 ≥ τ1 . Then r(µ1 , τ1 ), r(µ2 , τ2 ) are finite. Due to monotonicity and Proposition 7, we have that φ(τ1 , x∗ , µ1 h(·, τ1 ))  φ(τ1 , x∗ , µ2 h(·, τ2 ))  φ(τ2 , x∗ , µ2 h(·, τ2 )), which according to Proposition 3 implies that s•1 (φ(τ1 , x∗ , µ1 h(·, τ1 ))) ≤ s•1 (φ(τ2 , x∗ , µ2 h(·, τ2 ))). Using this property it is rather straightforward to show that S α is order-convex. (ii) The sets ∂+ S α and ∂− S α contain the maximal and minimal elements, respectively, of the order-convex set S α . Assume that (µ1 , τ1 ), (µ2 , τ2 ) ∈ ∂+ S α (or (µ1 , τ1 ), (µ2 , τ2 ) ∈ ∂− S α ). Then we cannot have (µ1 , τ1 )  (µ2 , τ2 ). Hence, if τ1 < τ2 , we must have µ1 ≥ µ2 and if µ1 < µ2 , we must have τ1 ≥ τ2 . We prove the second part of the statement by contradiction. Let τ1 < τ2 , µ1 ≤ µ2 and let s•1 (φ(τ1 , x∗ , µ1 h(·, τ1 ))) = −α and s•1 (φ(τ2 , x∗ , µ2 h(·, τ2 ))) = −α, where α > 0. Due to monotonicity we have that φ(t, x∗ , µ1 h(·, τ1 ))  φ(t, x∗ , µ2 h(·, τ2 )) ∀t ≥ 0, which according to Proposition 3 entails s•1 (φ(t, x∗ , µ1 h(·, τ1 ))) ≤ s•1 (φ(t, x∗ , µ2 h(·, τ2 ))). (A.4) The flow φ(t, x∗ , µ1 h(·, τ1 )) converges to x• freely for all t > τ1 , since h(t, τ1 ) = 0 for all t > τ1 . Negativity of −α implies that s•1 (·) is growing along the trajectory φ(τ1 , x∗ , µ1 h(·, τ1 )) and hence s•1 (φ(τ2 , x∗ , µ1 h(·, τ1 ))) > −α. This, however, contradicts (A.4), since s•1 (φ(τ2 , x∗ , µ1 h(·, τ1 ))) ≤ s•1 (φ(τ2 , x∗ , µ2 h(·, τ2 ))) = −α. (iii) Let r(µ1 , τ1 ) = r(µ2 , τ2 ) = α and pick τ1 < τ2 . Assume that µ1 ≤ µ2 . We have that φ(τ1 , x∗ , µ1 h(·, τ1 ))  φ(τ1 , x∗ , µ2 h(·, τ1 ))  φ(τ2 , x∗ , µ2 h(·, τ1 )) where the first inequality follows from monotonicity and the second follows from Proposition 7. Due to the condi- tion φ(t, x, µ)  φ(t, x, ν) for all x, all µ > ν and all t > 0 in the premise, we have φ(τ1 , x∗ , µ1 h(·, τ1 ))  φ(τ2 , x∗ , µ2 h(·, τ1 )) = φ(τ2 − τ1 , φ(τ1 , x∗ , µ2 h(·, τ1 )), 0)  φ(τ2 − τ1 , φ(τ1 , x∗ , µ2 h(·, τ1 )), µ2 ) = φ(τ2 , x∗ , µ2 h(·, τ2 )) or equivalently r(µ1 , τ1 ) < r(µ2 , τ2 ). We arrive at a contradiction, hence µ1 > µ2 , which implies that ∂+ S α is a graph of a decreasing function.
3cs.SY
AUTOMORPHISMS OF HARBATER–KATZ–GABBER CURVES arXiv:1509.02139v2 [math.AG] 2 Nov 2016 FRAUKE M. BLEHER*, TED CHINBURG**, BJORN POONEN†, AND PETER SYMONDS Abstract. Let k be a perfect field of characteristic p > 0, and let G be a finite group. We consider the pointed G-curves over k associated by Harbater, Katz, and Gabber to faithful actions of G on k[[t]] over k. We use such “HKG G-curves” to classify the automorphisms of k[[t]] of p-power order that can be expressed by particularly explicit formulas, namely those mapping t to a power series lying in a Z/pZ Artin–Schreier extension of k(t). In addition, we give necessary and sufficient criteria to decide when an HKG G-curve with an action of a larger finite group J is also an HKG J-curve. 1. Introduction Let k be a field, let k[[t]] be the power series ring, and let Aut(k[[t]]) be its automorphism group as a k-algebra. When the characteristic of k is positive, Aut(k[[t]]) contains many interesting finite subgroups. One way to construct such subgroups is to start with an algebraic curve X on which a finite group G acts with a fixed point x having residue field k; then G acts on the completion ÔX,x of the local ring of x at X, and ÔX,x is isomorphic to k[[t]] for any choice of uniformizing parameter t at x. In fact, results of Harbater [14, §2] and of Katz and Gabber [19, Main Theorem 1.4.1] show that every finite subgroup G of Aut(k[[t]]) arises in this way. Their results connect the étale fundamental group of Spec(k((t))) to that of P1k − {0, ∞}. See Section 4.C for further discussion. The value of this technique is that one can study local questions about elements of Aut(k[[t]]) using global tools such as the Hurwitz formula for covers of curves over k. In this paper we use the above method to study two closely related problems when k is a perfect field of characteristic p > 0, which we assume for the rest of this paper. The first problem, described in Section 1.A, is to find explicit formulas for p-power-order elements σ of Aut(k[[t]]). In particular, we study σ that are “almost rational” in the sense of Definition 1.1. Our main result in this direction, Theorem 1.2, classifies all such σ. The second problem, described in Sections 1.B and 1.C, is to study the full automorphism group of the so-called Harbater–Katz–Gabber G-curves (HKG G-curves), which are certain 2010 Mathematics Subject Classification. Primary 14H37; Secondary 14G17, 20F29. *Supported by NSA Grant # H98230-11-1-0131 and NSF Grant # DMS-1360621. **Supported by NSF Grants # DMS-1265290 and DMS-1360767, SaTC grant CNS-15136718 and a grant from the Simons Foundation (338379 to Ted Chinburg). †Supported by NSF Grants # DMS-1069236 and DMS-1601946 and a grants from the Simons Foundation (340694 and 402472 to Bjorn Poonen). 1 curves X with a G-action as above. One reason for this study is that it turns out that almost rational automorphisms arise from HKG G-curves X for which Aut(X) is strictly larger than G. In fact, our Theorems 5.1(c) and 5.9 concerning such X are needed for our proof of Theorem 1.2 on almost rational automorphisms of k[[t]]. For some other applications of HKG G-curves, e.g., to the problem of lifting automorphisms of k[[t]] to characteristic 0, see [4] and its references. 1.A. Finite-order automorphisms of k[[t]]. Every order p element of Aut(k[[t]]) is conjugate to t 7→ t(1 + ctm )−1/m for some c ∈ k × and some positive integer m prime to p (see [20, Proposition 1.2], [21, §4], and Theorem 2.2). The natural question arises whether there is an equally explicit description of automorphisms of order pn for n > 1. Each such automorphism is conjugate to t 7→ σ(t) for some σ(t) ∈ k[[t]] that is algebraic over k(t) (see Corollary 4.11). In this case, the field n L := k(t, σ(t), . . . , σ p −1 (t)) ⊆ k((t)) is algebraic over k(t). When n > 1, we cannot have L = k(t), because the group Autk (k(t)) ≃ PGL2 (k) has no element of order p2 . The next simplest case from the point of view of explicit power series is the following: Definition 1.1. Call σ ∈ Aut(k[[t]]) almost rational if the field L := k({σ(t) : σ ∈ G}) is a Z/pZ Artin–Schreier extension of k(t); i.e., L = k(t, β) where β ∈ k((t)) satisfies ℘(β) = α for some α ∈ k(t); here ℘ is the Artin–Schreier operator defined by ℘(x) := xp − x. By subtracting an element of k[t−1 ] from β, we may assume that β ∈ tk[[t]] and hence α ∈ k(t) ∩ tk[[t]]. Then we have an explicit formula for β, namely β=− ∞ X i αp , i=0 and σ(t) is a rational function in t and β. This is the sense in which almost rational automorphisms have explicit power series. Prior to the present article, two of us found one explicit example of an almost rational σ of order pn > p (and its inverse); see [5]. Our first main theorem describes all such σ up to conjugacy. Theorem 1.2. Suppose that σ is an almost rational automorphism of k[[t]] of order pn for some n > 1. Then p = 2, n = 2, and there exists b ∈ k (unique modulo ℘(k) = {℘(a) : a ∈ k}) such that σ is conjugate to the order 4 almost rational automorphism σb (t) := b2 t + (b + 1)t2 + β , b2 + t2 (1.3) where β is the unique solution to β 2 − β = t3 + (b2 + b + 1)t2 in tk[[t]]. Remark 1.4. If k is algebraically closed, then ℘(k) = k, so Theorem 1.2 implies that all almost rational automorphisms of order 4 lie in one conjugacy class in Aut(k[[t]]). 2 Remark 1.5. The example in [5] was j 2 σ0 (t) = t + t + ∞ 2X −1 X j +2ℓ t6·2 j=0 ℓ=0 2 = t + t + (t6 ) + (t12 + t14 ) + (t24 + t26 + t28 + t30 ) + · · · t γ = + 1 + t (1 + t)2 P∞ 3 4 2i satisfies γ 2 − γ = t3 + t4 . (If β is as in over F2 , where the series γ := i=0 (t + t ) Theorem 1.2, then γ = β + t2 .) Zieve and Scherr communicated to us that the inverse of σ0 has a simpler series, namely ∞ ∞ ∞ X X X i i j σ1 (t) = t−2 (t3 + t4 )2 = t3·2 −2 + t2 −2 . i=0 i=0 j=2 In general, the inverse of σb is σb+1 (Remark 5.14). Remark 1.6. Let σ be any element of finite order in Aut(k[[t]]). Even if σ is not almost P rational, we can assume after conjugation that the power series σ(t) = i≥1 ai ti is algebraic over k(t), as mentioned above. When k is finite, this implies that the sequence (ai ) is Turing computable, and even p-automatic; i.e., there is a finite automaton that calculates ai when supplied with the base p expansion of i [6, 7]. 1.B. Harbater–Katz–Gabber G-curves. An order pn element of Aut(k[[t]]) induces an injective homomorphism Z/pn Z −→ Aut(k[[t]]). Suppose that we now replace Z/pn Z with any finite group G. Results of Harbater [14, §2] when G is a p-group, and of Katz and Gabber [19, Main Theorem 1.4.1] in general, show that any injective α : G −→ Aut(k[[t]]) arises from a G-action on a curve. More precisely, α arises from a triple (X, x, φ) consisting of a smooth projective curve X, a point x ∈ X(k), and an injective homomorphism φ : G −→ Aut(X) such that G fixes x: here α expresses the induced action of G on the completed local ring ObX,x with respect to some uniformizer t. In Section 4.B we will define a Harbater–Katz– Gabber G-curve (HKG G-curve) to be a triple (X, x, φ) as above with X/G ≃ P1k such that apart from x there is at most one non-free G-orbit, which is tamely ramified if it exists. We will sometimes omit φ from the notation. HKG G-curves play a key role in our proof of Theorem 1.2. Our overall strategy is to reduce Theorem 1.2 to the classification of certain HKG G-curves, and then to use geometric tools such as the Hurwitz formula to complete the classification. 1.C. Harbater–Katz–Gabber G-curves with extra automorphisms. In this section, (X, x) is an HKG G-curve and J is a finite group such that G ≤ J ≤ Aut(X). We do not assume a priori that J fixes x. Let gX be the genus of X. Question 1.7. Must (X, x) be an HKG J-curve? 3 The answer is sometimes yes, sometimes no. Here we state our three main theorems in this direction; we prove them in Section 7. Theorem 1.8. We have that (X, x) is an HKG J-curve if and only if J fixes x. When gX > 1, Theorem 1.10 below gives a weaker hypothesis that still is sufficient to imply that (X, x) is an HKG J-curve. Let Jx be the decomposition group StabJ (x). Definition 1.9. We call the action of J mixed if there exists σ ∈ J such that σ(x) 6= x and σ(x) is nontrivially but tamely ramified with respect to the action of Jx , and unmixed otherwise. Theorem 1.10. If gX > 1 and the action of J is unmixed, then (X, x) is an HKG J-curve. We will also answer Question 1.7 in an explicit way when gX ≤ 1, whether or not the action of J is mixed. Finally, if J is solvable, the answer to Question 1.7 is almost always yes, as the next theorem shows. For the rest of the paper, k denotes an algebraic closure of k. Theorem 1.11. If J is solvable and (X, x) is not an HKG J-curve, then one of the following holds: • • • • X ≃ P1 ; p is 2 or 3, and X is an elliptic curve of j-invariant 0; p = 3, and X is isomorphic over k to the genus 3 curve z 4 = t3 u − tu3 in P2 ; or p = 2, and X is isomorphic over k to the smooth projective model of the genus 10 affine curve z 9 = (u2 + u)(u2 + u + 1)3 . Each case in Theorem 1.11 actually arises. We prove a stronger version of Theorem 1.11 in Theorem 7.13 using the examples discussed in Section 6. 2. Automorphisms of k[[t]] The purpose of this section is to recall some basic results about Aut(k[[t]]). 2.A. Groups that are cyclic mod p. A p′ -group is a finite group of order prime to p. A finite group G is called cyclic mod p if it has a normal Sylow p-subgroup such that the quotient is cyclic. Equivalently, G is cyclic mod p if G is a semidirect product P ⋊ C with P a p-group and C a cyclic p′ -group. In this case, P is the unique Sylow p-subgroup of G, and the Schur–Zassenhaus theorem [18, Theorem 3.12] implies that every subgroup of G isomorphic to C is conjugate to C. 4 2.B. The Nottingham group. Any k-algebra automorphism σ of k[[t]] preserves the maximal ideal and its powers, and hence is t-adically continuous, so σ is uniquely determined by P specifying the power series σ(t) = n≥1 an tn (with a1 ∈ k × ). The map Aut(k[[t]]) −→ k × sending σ to a1 is a surjective homomorphism. The Nottingham group N (k) is the kernel of P this homomorphism; it consists of the power series t + n≥2 an tn under composition. Then Aut(k[[t]]) is a semidirect product N (k) ⋊ k × . For background on N (k), see, e.g., [3]. If k is finite, then N (k) is a pro-p group. In general, N (k) is pro-solvable with a filtration whose quotients are isomorphic to k under addition; thus every finite subgroup of N (k) is a p-group. Conversely, Leedham-Green and Weiss, using techniques of Witt, showed that any finite p-group can be embedded in N (Fp ); indeed, so can any countably based pro-p group [2]. The embeddability of finite p-groups follows alternatively from the fact that the maximal pro-p quotient of the absolute Galois group of k((t−1 )) is a free pro-p group of infinite rank [19, (1.4.4)]. On the other hand, any finite subgroup of k × is a cyclic p′ -group. Thus any finite subgroup of Aut(k[[t]]) is cyclic mod p, and any finite p-group in Aut(k[[t]]) is contained in N (k). 2.C. Algebraic automorphisms of k[[t]]. Call σ ∈ Aut(k[[t]]) algebraic if σ(t) is algebraic over k(t). Proposition 2.1. The set Autalg (k[[t]]) of all algebraic automorphisms of k[[t]] over k is a subgroup of Aut(k[[t]]). Proof. Suppose that σ ∈ Autalg (k[[t]]), so σ(t) is algebraic over k(t). Applying another automorphism τ ∈ Aut(k[[t]]) to the algebraic relation shows that σ(τ (t)) is algebraic over k(τ (t)). So if τ is algebraic, so is σ ◦ τ . On the other hand, taking τ = σ −1 shows that t is algebraic over k(σ −1 (t)). Since t is not algebraic over k, this implies that σ −1 (t) is algebraic over k(t).  2.D. Automorphisms of order p. The following theorem was proved by Klopsch [20, Proposition 1.2] and reproved by Lubin [21, §4] (they assumed that k was finite, but this is not crucial). Over algebraically closed fields it was shown in [1, p. 211] by Bertin and Mézard, who mention related work of Oort, Sekiguchi and Suwa in [22]. For completeness, we give here a short proof, similar to the proofs in [20, Appendix] and [1, p. 211]; it works over any perfect field k of characteristic p > 0. Theorem 2.2. Every σ ∈ N (k) of order p is conjugate in N (k) to t 7→ t(1 + ctm )−1/m for a unique positive integer m prime to p and a unique c ∈ k × . The automorphisms given by (m, c) and (m′ , c′ ) are conjugate in Aut(k[[t]]) if and only if m = m′ and c/c′ ∈ k ×m . Proof. Extend σ to the fraction field k((t)). By Artin–Schreier theory, there exists y ∈ k((t)) such that σ(y) = y + 1. This y is unique modulo k((t))σ . Since σ acts trivially on the residue field of k[[t]], we have y ∈ / k[[t]]. Thus y = ct−m + · · · for some m ∈ Z>0 and c ∈ k × . 5 Choose y so that m is minimal. If the ramification index p divided m, then we could subtract from y an element of k((t))σ with the same leading term, contradicting the minimality of m. Thus p ∤ m. By Hensel’s lemma, y = c(t′ )−m for some t′ = t + · · · . Conjugating by the automorphism t 7→ t′ lets us assume instead that y = ct−m . Substituting this into σ(y) = y + 1 yields c σ(t)−m = ct−m + 1. Equivalently, σ(t) = t(1 + c−1 tm )−1/m . Rename c−1 as c. Although y is determined only modulo ℘(k((t))), the leading term of a minimal y is determined. Conjugating σ in Aut(k[[t]]) amounts to expressing σ with respect to a new uniformizer u = u1 t + u2 t2 + · · · . This does not change m, but it multiplies c by um 1 . Conjugating σ in N (k) has the same effect, except that u1 = 1, so c is unchanged too.  Remark 2.3. For each positive integer m prime to p, let Dispm : N (k) −→ N (k) be the map sending t 7→ f (t) to t 7→ f (tm )1/m (we take the mth root of the form t + · · · ). This is an injective endomorphism of the group N (k), called m-dispersal in [21]. It would be conjugation by t 7→ tm , except that t 7→ tm is not in Aut(k[[t]]) (for m > 1). The automorphisms in Theorem 2.2 may be obtained from t 7→ t(1 + t)−1 by conjugating by t 7→ ct and then dispersing. 3. Ramification and the Hurwitz Formula Here we review the Hurwitz formula and related facts we need later. 3.A. Notation. By a curve over k we mean a 1-dimensional smooth projective geometrically integral scheme X of finite type over k. For a curve X, let k(X) denote its function field, and let gX or gk(X) denote its genus. If G is a finite group acting on a curve X, then X/G denotes the curve whose function field is the invariant subfield k(X)G . 3.B. The local different. Let G be a finite subgroup of Aut(k[[t]]). For i ≥ 0, define the ramification subgroup Gi := {g ∈ G | g acts trivially on k[[t]]/(ti+1 )} as usual. Let P d(G) := ∞ i=0 (|Gi |−1) ∈ Z≥0 ; this is the exponent of the local different [24, IV, Proposition 4]. 3.C. The Hurwitz formula. In this paragraph we assume that k is an algebraically closed field of characteristic p > 0. Let H be a finite group acting faithfully on a curve X over k. For each s ∈ X(k), let Hs ≤ H be the inertia group. We may identify ObX,s with k[[t]] and Hs with a finite subgroup G ≤ Aut(k[[t]]); then define ds = ds (H) := d(Hs ). We have ds > 0 if and only if s is ramified. If s is tamely ramified, meaning that Hs is a p′ -group, then ds = |Hs | − 1. The Hurwitz formula [15, IV, 2.4] is X 2gX − 2 = |H|(2gX/H − 2) + ds . s∈X(k) Remark 3.1. When we apply the Hurwitz formula to a curve over a perfect field that is not algebraically closed, it is understood that we first extend scalars to an algebraic closure. 6 3.D. Lower bound on the different. We continue to assume that k is an algebraically closed field of characteristic p > 0. The following material is taken from [24, IV], as interpreted by Lubin in [21]. Let G and the Gi be as in Section 3.B. An integer i ≥ 0 is a break in the lower numbering of the ramification groups of G if Gi 6= Gi+1 . Let b0 , b1 , . . . be the breaks in increasing order; they are all congruent modulo p. The group G0 /G1 embeds into k × , while Gi /Gi+1 embeds in the additive group of k if i ≥ 1. From now on, assume that G is a cyclic group of order pn with generator σ. Then G0 = G1 and each quotient Gi /Gi+1 is killed by p. Thus there must be exactly n breaks b0 , . . . , bn−1 . If 0 ≤ i ≤ b0 , then Gi = G; if 1 ≤ j ≤ n − 1 and bj−1 < i ≤ bj , then |Gi | = pn−j ; and if bn−1 < i, then Gi = {e}. According to the Hasse–Arf theorem, there exist positive integers i0 , . . . , in−1 such that bj = i0 + pi1 + · · · + pj ij for 0 ≤ j ≤ n − 1. Then d(G) = (i0 + 1)(pn − 1) + i1 (pn − p) + · · · + in−1 (pn − pn−1 ). (3.2) The upper breaks b(j) we do not need to define here, but they have the property that in the cyclic case, b(j) = i0 + · · · + ij for 0 ≤ j ≤ n − 1. Local class field theory shows that p ∤ b(0) , that b(j) ≥ pb(j−1) for 1 ≤ j ≤ n − 1, and that if this inequality is strict then p ∤ b(j) ; this is proved in [24, XV, §2 Thm. 2] for quasi-finite residue fields, and extended to algebraically closed residue fields in [4, Prop. 13.2]. Conversely, any sequence of positive numbers b(0) , . . . , b(n−1) that satisfies these three conditions is realized by some element of order pn in Aut(k[[t]]) [21, Observation 5]. Thus i0 ≥ 1, and ij ≥ (p − 1)pj−1 for 1 ≤ j ≤ n − 1. Substituting into (3.2) yields the following result. Lemma 3.3. If G is cyclic of order pn , then d(G) ≥ p2n + pn+1 + pn − p − 2 p+1 and this bound is sharp. Remark 3.4. Lemma 3.3 is valid over any perfect field k of characteristic p, because extending scalars to k does not change d(G). 4. Harbater–Katz–Gabber G-curves Let k be a perfect field of characteristic p > 0. 4.A. Pointed G-curves. Definition 4.1. A pointed G-curve over k is a triple (X, x, φ) consisting of a curve X, a point x ∈ X(k), and an injective homomorphism φ : G −→ Aut(X) such that G fixes x. (We will sometimes omit φ from the notation.) 7 Suppose that (X, x, φ) is a pointed G-curve. The faithful action of G on X induces a faithful action on k(X). Since G fixes x, the latter action induces a G-action on the k-algebras OX,x and ObX,x . Since Frac(OX,x ) = k(X) and OX,x ⊆ ObX,x , the G-action on ObX,x is faithful too. Since x ∈ X(k), a choice of uniformizer t at x gives a k-isomorphism ObX,x ≃ k[[t]]. Thus we obtain an embedding ρX,x,φ : G ֒→ Aut(k[[t]]). Changing the isomorphism ObX,x ≃ k[[t]] conjugates ρX,x,φ by an element of Aut(k[[t]]), so we obtain a map {pointed G-curves} −→ {conjugacy classes of embeddings G ֒→ Aut(k[[t]])} (4.2) (X, x, φ) 7−→ [ρX,x,φ ]. Also, G is the inertia group of X −→ X/G at x. Lemma 4.3. If (X, x, φ) is a pointed G-curve, then G is cyclic mod p. Proof. The group G is embedded as a finite subgroup of Aut(k[[t]]).  4.B. Harbater–Katz–Gabber G-curves. Definition 4.4. A pointed G-curve (X, x, φ) over k is called a Harbater–Katz–Gabber G-curve (HKG G-curve) if both of the following conditions hold: (i) The quotient X/G is of genus 0. (This is equivalent to X/G ≃ P1k , since x maps to a k-point of X/G.) (ii) The action of G on X − {x} is either unramified everywhere, or tamely and nontrivially ramified at one G-orbit in X(k) − {x} and unramified everywhere else. Remark 4.5. Katz in [19, Main Theorem 1.4.1] focused on the base curve X/G as starting curve. He fixed an isomorphism of X/G with P1k identifying the image of x with ∞ and the image of a tamely and nontrivially ramified point of X(k) − {x} (if such exists) with 0. He then considered Galois covers X −→ X/G = P1k satisfying properties as above; these were called Katz–Gabber covers in [4]. For our applications, however, it is more natural to focus on the upper curve X. HKG curves have some good functoriality properties that follow directly from the definition: • Base change: Let X be a curve over k, let x ∈ X(k), and let φ : G −→ Aut(X) be a homomorphism. Let k ′ ⊇ k be a field extension. Then (X, x, φ) is an HKG G-curve over k if and only if its base change to k ′ is an HKG G-curve over k ′ . • Quotient: If (X, x, φ) is an HKG G-curve, and H is a normal subgroup of G, then X/H equipped with the image of x and the induced G/H-action is an HKG G/Hcurve. Example 4.6. Let P be a finite subgroup of the additive group of k, so P is an elementary abelian p-group. Then the addition action of P on A1k extends to an action φ : P −→ Aut(P1k ) totally ramified at ∞ and unramified elsewhere, so (P1k , ∞, φ) is an HKG P -curve. 8 Example 4.7. Suppose that C is a p′ -group and that (X, x, φ) is an HKG C-curve. By Lemma 4.3, C is cyclic. By the Hurwitz formula, X must have genus 0 since there are at most two C-orbits of ramified points and all the ramification is tame. Moreover, X has a k-point (namely, x), so X ≃ P1k , and C is a p′ -subgroup of the stabilizer of x inside Aut(X) ≃ Aut(P1k ) ≃ PGL2 (k). It follows that after applying an automorphism of X = P1k , we can assume that C fixes the points 0 and ∞ and corresponds to the multiplication action of a finite subgroup of k × on A1k . Conversely, such an action gives rise to an HKG C-curve (P1k , ∞, φ). The following gives alternative criteria for testing whether a pointed G-curve is an HKG G-curve. Proposition 4.8. Let (X, x, φ) be a pointed G-curve. Let P be the Sylow p-subgroup of G. Then the following are equivalent: (i) (ii) (iii) (iv) (X, x, φ) is an HKG G-curve. (X, x, φ|P ) is an HKG P -curve. The quotient X/P is of genus 0, and the action of P on X − {x} is unramified. Equality holds in the inequality gX ≥ 1 − |P | + dx (P )/2. Proof. Let C = G/P . (iii)⇒(ii): Trivial. (i)⇒(iii): By the quotient property of HKG curves, X/P is an HKG C-curve, so X/P ≃ P1k by Example 4.7. At each y ∈ X(k) − {x}, the ramification index ey for the P -action divides |P | but is prime to p, so ey = 1. Thus the action of P on X − {x} is unramified. (ii)⇒(i): Applying the result (i)⇒(iii) to P shows that X −→ X/P is unramified outside x. There is a covering P1k ≃ X/P −→ X/G, so X/G ≃ P1k . We may assume that C 6= {1}. By Example 4.7, the cover X/P −→ X/G is totally tamely ramified above two k-points, and unramified elsewhere. One of the two points must be the image of x; the other is the image of the unique tamely ramified G-orbit in X(k), since X −→ X/P is unramified outside x. (iii)⇔(iv): The Hurwitz formula (see Remark 3.1) for the action of P simplifies to the inequality in (iv) if we use gX/P ≥ 0 and discard ramification in X − {x}. Thus equality holds in (iv) if and only if gX/P = 0 and the action of P on X − {x} is unramified.  4.C. The Harbater–Katz–Gabber theorem. The following is a consequence of work of Harbater [14, §2] when G is a p-group and of Katz and Gabber [19, Main Theorem 1.4.1] when G is arbitrary. Theorem 4.9 (Harbater, Katz–Gabber). The assignment (X, x, φ) 7→ ρX,x,φ induces a surjection from the set of HKG G-curves over k up to equivariant isomorphism to the set of conjugacy classes of embeddings of G into Aut(k[[t]]). 9 Corollary 4.10. Any finite subgroup of Autk (k[[t]]) can be conjugated into Autk′ (k ′ [[t]]) for some finite extension k ′ of k in k. Proof. The subgroup is realized by some HKG curve over k. Any such curve is defined over some finite extension k ′ of k.  Corollary 4.11. Any finite subgroup of Aut(k[[t]]) can be conjugated into Autalg (k[[t]]). Proof. The subgroup is realized by some HKG curve X. By conjugating, we may assume that the uniformizer t is a rational function on X. Then each power series σ(t) represents another rational function on X, so σ(t) is algebraic over k(t).  5. Almost rational automorphisms 5.A. The field generated by a group of algebraic automorphisms. Let G be a finite subgroup of Autalg (k[[t]]). Let L := k({σ(t) : σ ∈ G}) ⊆ k((t)). Then L is a finite extension of k(t), so L ≃ k(X) for some curve X. The t-adic valuation on k((t)) restricts to a valuation on L associated to a point x ∈ X(k). The G-action on k((t)) preserves L. This induces an embedding φ : G −→ Aut(X) such that G fixes x, so (X, x, φ) is a pointed G-curve over k. Theorem 5.1. Let G be a finite subgroup of Autalg (k[[t]]). Let L and (X, x, φ) be as above. Let d := [L : k(t)]. (a) We have gX ≤ (d − 1)2 . (b) If G is cyclic of order pn , then gX ≥ p(pn − 1)(pn−1 − 1) . Moreover, if equality holds, 2(p + 1) then (X, x, φ) is an HKG G-curve. (c) Suppose that G is cyclic of order pn . Then s p(pn − 1)(pn−1 − 1) d≥1+ . 2(p + 1) (5.2) In particular, if d ≤ p and n ≥ 2, then d = p = n = 2 and (X, x, φ) is an HKG Z/4Z-curve of genus 1. Proof. (a) In [23, §2], a subfield F ⊆ L is called d-controlled if there exists e ∈ Z>0 such that [L : F ] ≤ d/e and gF ≤ (e − 1)2 . In our setting, the G-action on k((t)) preserves L, so [L : k(σ(t))] = d for every σ ∈ G. By [23, Corollary 2.2], L ⊆ L is d-controlled. Here d/e = 1, so gL ≤ (e − 1)2 = (d − 1)2 . (b) In the inequality gX ≥ 1 − |G| + dx (G)/2 of Proposition 4.8(iv), substitute |G| = pn and the bound of Lemma 3.3. If equality holds, then Proposition 4.8(iv)⇒(i) shows that (X, x, φ) is an HKG G-curve. 10 (c) Combine the upper and lower bounds on gX in (a) and (b). If d ≤ p and n ≥ 2, then s r p(p2 − 1)(p − 1) p p≥d≥1+ = 1 + (p − 1) ≥ 1 + (p − 1) = p, 2(p + 1) 2 so equality holds everywhere. In particular, p = d, n = 2, and p/2 = 1, so d = p = n = 2. Also, (b) shows that (X, x, φ) is an HKG G-curve, and gX = (d − 1)2 = 1.  Remark 5.3. Part (c) of Theorem 5.1 implies the first statement in Theorem 1.2, namely that if σ is an almost rational automorphism of order pn > p, then p = n = 2. To complete the proof of Theorem 1.2 we will classify in Section 5.B the σ when p = n = 2. 5.B. Almost rational automorphisms of order 4. In this section, k is a perfect field of characteristic 2, and G = Z/4Z. Definition 5.4. For a, b ∈ k, let Ea,b be the projective closure of z 2 − z = w 3 + (b2 + b + 1)w 2 + a. Let O ∈ Ea,b (k) be the point at infinity, and let φ : Z/4Z −→ Aut(Ea,b ) send 1 to the order 4 automorphism σ : (w, z) 7−→ (w + 1, z + w + b). Proposition 5.5. Each (Ea,b , O, φ) in Definition 5.4 is an HKG Z/4Z-curve over k. Proof. The automorphism σ fixes O. Also, σ 2 maps (w, z) to (w, z + 1), so σ 2 fixes only O; hence the G-action on Ea,b − {O} is unramified. Since Ea,b −→ Ea,b /G is ramified, the genus of Ea,b /G is 0.  Proposition 5.6. Let k be a perfect field of characteristic 2. Let G = Z/4Z. For an HKG G-curve (X, x, φ′ ) over k, the following are equivalent: (i) The genus of X is 1. (ii) The lower ramification groups for X −→ X/G at x satisfy |G0 | = |G1 | = 4, |G2 | = |G3 | = 2, and |Gi | = 1 for i ≥ 4. (iii) The ramification group G4 equals {1}. (iv) There exist a, b ∈ k such that (X, x, φ′ ) is isomorphic to the HKG G-curve (Ea,b , O, φ) of Definition 5.4. Proof. Let g be the genus of X. Since G is a 2-group, |G0 | = |G1 | = 4. (ii)⇒(i): This follows from the Hurwitz formula (see Remark 3.1) X 2g − 2 = 4(−2) + (|Gi | − 1). i≥0 P (i)⇒(ii): If g = 1, then the Hurwitz formula yields 0 = −8 + 3 + 3 + i≥2 (|Gi | − 1). Since the |Gi | form a decreasing sequence of powers of 2 and include all the numbers 4, 2, and 1 (see Section 3.D), the only possibility is as in (ii). 11 (ii)⇒(iii): Trivial. (iii)⇒(ii): The lower breaks (see Section 3.D) satisfy 1 ≤ b0 < b1 < 4. Since b0 ≡ b1 (mod 2), (ii) follows. (iv)⇒(i): The formulas in [25, III.§1] show that Ea,b is an elliptic curve, hence of genus 1. (i)⇒(iv): By [25, A.1.2(c)], an elliptic curve with an order 4 automorphism has j-invariant 1728 = 0 ∈ k. By [25, A.1.1(c)], it has an equation y 2 + a3 y = x3 + a4 x + a6 . Substituting 2 3 2 × y 7→ y + a−1 be 3 a4 x leads to an alternative form y + a3 y = x + a2 x + a. Let u ∈ k ∗ 0 1 −1 4 such that σ acts on H (X, Ω ) by multiplication by u . Then u = 1, so u = 1. By [25, p. 49], σ has the form (x, y) 7→ (x + r, y + sx + t) for some r, s, t ∈ k. Since σ 2 6= 1, we have s 6= 0. Conjugating by a change of variable (x, y) 7→ (ǫ2 x, ǫ3 y) lets us assume that s = 1. The condition that (x, y) 7→ (x + r, y + x + t) preserves y 2 + a3 y = x3 + a2 x2 + a implies that a3 = r = 1 and a2 = t2 + t + 1. Rename t, x, y as b, w, z.  Corollary 5.7. The HKG Z/4Z-curves that are minimally ramified in the sense of having the smallest value of inf{i : Gi = {1}} are those satisfying the equivalent conditions in Proposition 5.6. Let ℘(x) := x2 −x be the Artin–Schreier operator in characteristic 2. The following lemma is clear. Lemma 5.8. Let L/K be a Z/2Z Artin–Schreier extension, so there exist a ∈ K and b ∈ L − K such that ℘(b) = a. If x ∈ L − K satisfies ℘(x) ∈ K, then x ∈ b + K. Theorem 5.9. Let k be a perfect field of characteristic 2. Let G = Z/4Z. Let X be the set of HKG G-curves satisfying the equivalent conditions in Proposition 5.6. Then (a) The map (4.2) restricts to a surjection from X to the set of conjugacy classes in Aut(k[[t]]) containing an almost rational automorphism of order 4. (b) Explicitly, Ea,b (made into an HKG G-curve as in Proposition 5.5) maps to the conjugacy class of b2 t + (b + 1)t2 + β σb (t) := , (5.10) b2 + t2 P∞ 3 i where β := i=0 (t + (b2 + b + 1)t2 )2 is the unique solution to β 2 − β = t3 + (b2 + b + 1)t2 in tk[[t]]. (c) For b, b′ ∈ k, the automorphisms σb , σb′ ∈ Aut(k[[t]]) are conjugate if and only if b ≡ b′ (mod ℘(k)). Proof. (a) First we show that each E0,b maps to a conjugacy class containing an almost rational automorphism; the same will follow for Ea,b for a 6= 0 once we show in the proof of (c) that Ea,b gives rise to the same conjugacy class as E0,b . Let P := (0, 0) ∈ E0,b (k). Composing w with translation-by-P yields a new rational function wP = z/w 2 on E0,b ; define zP similarly, so zP = 1 − z 2 /w 3. Since w has a simple zero at P , the function t := wP has a simple 12 zero at O. Also, σ j (t) ∈ k(E0,b ) = k(t, zP ), which shows that σ is almost rational since zP2 − zP = wP3 + (b2 + b + 1)wP2 . Now suppose that σ is any almost rational automorphism of order 4. Theorem 5.1(c) shows that σ arises from an HKG Z/4Z-curve of genus 1, i.e., a curve as in Proposition 5.6(i). (b) Again by referring to the proof of (c), we may assume a = 0. Follow the first half of the proof of (a) for E0,b . In terms of the translated coordinates (wP , zP ) on E0,b , the order 4 automorphism of the elliptic curve is (t, β) 7−→ σ((t, β) − P ) + P. It is a straightforward but lengthy exercise to show that the first coordinate equals the expression σb (t) in (5.10). One uses t = wP = z/w 2 , β = zP = 1 − z 2 /w 3, and the formulas σ(w) = w + 1 and σ(z) = z + w + b. In verifying equalities in the field k(t, β), one can use the fact that k(t, β) is the quadratic Artin–Schreier extension of k(t) defined by β 2 − β = t3 + (b2 + b + 1)t2 . (c) Let v := w 2 − w. Let Ob be the completion of the local ring of Ea,b at the point O at b = k((w −1))(z −1 ). With respect to the discrete valuation on K, b := Frac(O) b infinity, and let K the valuations of w, z and v are −2, −3 and −4, respectively. With respect to the discrete valuation on k((w −1 )), the valuation of w is −1 and the valuation of v is −2. We have b G = k((v −1 )). Define w ′ , z ′ , v ′ , σ ′ , Ob′, and K b ′ = k((w ′ −1 ))(z ′ −1 ) similarly for Ea′ ,b′ . By K definition of the map (4.2), Ea,b and Ea′ ,b′ give rise to the same conjugacy class if and only if ∼ ∼ b −→ b ′. there exists a G-equivariant continuous isomorphism Ob −→ Ob′ or equivalently α : K K It remains to prove that α exists if and only if b ≡ b′ (mod ℘(k)). =⇒ : Suppose that α exists. Lemma 5.8 shows that α(w) = w ′ + f for some f ∈ k((v ′ −1 )). Since α preserves valuations, f ∈ k[[v ′ −1 ]]. Since v ′ has valuation −2 in k((w ′−1 )), the P valuation of v ′ −1 in this field is 2. Therefore f ∈ k[[v ′ −1 ]] implies f = c + i≥2 fi w ′−i for P some c, fi ∈ k. Similarly, α(z) = z ′ +h for some h = i≥−1 hi w ′−i ∈ w ′ k[[w ′ −1 ]]. Subtracting the equations α(z)2 − α(z) = α(w)3 + (b2 + b + 1)α(w)2 + a 2 3 2 2 z ′ − z ′ = w ′ + (b′ + b′ + 1)w ′ + a′ yields 2 3 2 h2 − h = (w ′ + f )3 − w ′ + (b2 + b + 1)(w ′ + f )2 − (b′ + b′ + 1)w ′ + a − a′ 2 (5.11) 2 = w ′ f + w ′f 2 + f 3 + ℘(b − b′ )w ′ + (b2 + b + 1)f 2 + a − a′ 2 h2 − h ≡ (c + ℘(b − b′ ))w ′ + c2 w ′ + (f2 + c3 + (b2 + b + 1)c2 + a − a′ ) 13 (mod w ′−1 k[[w ′−1 ]]). (5.12) Equating coefficients of w ′ yields h−1 = c2 . The G-equivariance of α implies α(σ(z)) = σ ′ (α(z)) (z ′ + h) + (w ′ + f ) + b = (z ′ + w ′ + b′ ) + σ ′ (h) h + f + b = b′ + σ ′ (h) h−1 w ′ + h0 + c + b ≡ b′ + h−1 (w ′ + 1) + h0 −1 −1 (mod w ′ k[[w ′ ]]) (5.13) b − b′ = h−1 − c = c2 − c = ℘(c). ⇐= : Conversely, suppose that b − b′ = ℘(c) for some c ∈ k. We must build a G∼ b −→ b ′ . Choose f := c + P fi w ′ −i in k[[v ′−1 ]] equivariant continuous isomorphism α : K K i≥2 so that the value of f2 makes the coefficient of w ′ 0 in (5.12), namely the constant term, equal to 0. The coefficient of w ′ 2 in (5.12) is c + ℘(℘(c)) = c4 . So (5.12) simplifies to 2 −1 −1 h2 − h ≡ c4 w ′ + c2 w ′ (mod w ′ k[[w ′ ]]). P Thus we may choose h := c2 w ′ + i≥1 hi w ′−i so that (5.11) holds. Define α : k((w −1)) −→ b −→ K b ′ by k((w ′ −1 )) by α(w) := w ′ + f . Equation (5.11) implies that α extends to α : K setting α(z) := z ′ + h. Then α|k((w−1 )) is G-equivariant since (w ′ + 1) + f = (w ′ + f ) + 1. In −1 b other words, σ −1 α−1 σ ′ α ∈ Gal(K/k((w ))) = {1, σ 2}. If σ −1 α−1 σ ′ α = σ 2 , then ασ 3 = σ ′ α α(σ 3 (z)) = σ ′ (α(z)) α(z + w + b + 1) = σ ′ (z ′ + h) (z ′ + h) + (w ′ + f ) + b + 1 = (z ′ + w ′ + b′ ) + σ ′ (h); by the calculation leading to (5.13), this is off by 1 modulo w ′ −1 k[[w ′ −1 ]]. Thus σ −1 α−1 σ ′ α = 1 instead. In other words, α is G-equivariant.  Remark 5.14. Changing b to b + 1 does not change the curve Ea,b , but it changes σ to σ −1 . Thus σ and σ −1 are conjugate in Aut(k[[t]]) if and only if 1 ∈ ℘(k), i.e., if and only if k contains a primitive cube root of unity. Combining Theorems 5.1(c) and 5.9 proves Theorem 1.2 (and a little more). 6. Constructions of Harbater–Katz–Gabber curves In this section we construct some examples needed for the proofs of Theorems 1.11 and 7.13. Let k be an algebraically closed field of characteristic p > 0. Let (Y, y) be an HKG H-curve over k. If the H-action on Y − {y} has a tamely ramified orbit, let S be that orbit; otherwise let S be any H-orbit in Y − {y}. Let S ′ = S ∪ {y}. Let m, n ∈ Z≥1 . Suppose that P p ∤ n, that mn divides |S ′|, that the divisor s∈S ′ (s − y) is principal, and that for all s ∈ S ′ , the divisor m(s − y) is principal. 14 P Choose f ∈ k(Y )× with divisor s∈S ′ (s − y). Let π : X −→ Y be the cover with k(X) = k(Y )(z), where z satisfies z n = f . Let C := Aut(X/Y ), so C is cyclic of order n. Let x be the point of X(k) such that π(x) = y. Let G := {γ ∈ Aut(X) : γ|k(Y ) ∈ H}. Proposition 6.1. Let k, Y, H, S ′, n, X, C, G be as above. (a) Every automorphism of Y preserving S ′ lifts to an automorphism of X (in n ways). (b) The sequence 1 −→ C −→ G −→ H −→ 1 is exact. (c) We have that (X, x) is an HKG G-curve. Proof. (a) Suppose that α ∈ Aut(Y ) preserves S ′ . Then div(αf /f ) = (|S| + 1)(α y − y), which is n times an integer multiple of the principal divisor m(α y − y), so αf /f = g n for some g ∈ k(Y )× . Extend α to an automorphism of k(X) by defining α z := gz; this is welldefined since the relation z n = f is preserved. Given one lift, all others are obtained by composing with elements of C. (b) Only the surjectivity of G −→ H is nontrivial, and that follows from (a). (c) The quotient X/G is isomorphic to (X/C)/(G/C) = Y /H, which is of genus 0. In the covers X −→ X/C ≃ Y −→ X/G ≃ Y /H, all the ramification occurs above and below S ′ . The valuation of f at each point of S ′ is 1 mod n, so X −→ Y is totally ramified above S ′ . Hence each ramified G-orbit in X maps bijectively to an H-orbit in Y , and each nontrivial inertia group in G is an extension of a nontrivial inertia group of H by C. Thus, outside the totally ramified G-orbit {x}, there is at most one ramified G-orbit and it is tamely ramified.  Example 6.2. Let (Y, y) = (P1 , ∞), with coordinate function t ∈ k(P1 ). Let H ≤ PGL2 (F !q ) 1 Fq be a group fixing ∞ and acting transitively on A1 (Fq ). (One example is H := .) 0 1 Let n be a positive divisor of q + 1. Then the curve z n = tq − t equipped with the point above ∞ is an HKG G-curve, where G is the set of automorphisms lifting those in H. (Here S ′ = P1 (Fq ), m = 1, and f = tq − t ∈ k(P1 ). Degree 0 divisors on P1 are automatically principal.) Example 6.3. Let p = 2. Let (Y, y) be the j-invariant 0 elliptic curve u2 + u = t3 with its identity, so # Aut(Y, y) = 24 [16, Chapter 3, §6]. Let H be Aut(Y, y) or its Sylow 2-subgroup. √ Then k(Y )( 3 t4 + t) is the function field of an HKG G-curve X, for an extension G of H by a cyclic group of order 3. (Here S ′ = Y (F4 ), which is also the set of 3-torsion points on Y , and m = n = 3, and f = t4 + t.) Eliminating t by cubing z 3 = t4 + t and substituting t3 = u2 + u leads to the equation z 9 = (u2 + u)(u2 + u + 1)3 for X. Example 6.4. Let p = 3. Let (Y, y) be the j-invariant 0 elliptic curve u2 = t3 − t with its identity, so # Aut(Y, y) = 12 [16, Chapter 3, §5]. Let H be a group between Aut(Y, y) 15 √ and its Sylow 3-subgroup. Then k(Y )( u) is the function field of an HKG G-curve X, for an extension G of H by a cyclic group of order 2. (Here S ′ is the set of 2-torsion points on Y , and m = n = 2, and f = u.) Thus X has affine equation z 4 = t3 − t. (This curve is isomorphic to the curve in Example 6.2 for q = 3, but |C| here is 2 instead of 4.) 7. Harbater–Katz–Gabber curves with extra automorphisms We return to assuming only that k is perfect of characteristic p. Throughout this section, (X, x) is an HKG G-curve over k, and J is a finite group such that G ≤ J ≤ Aut(X). Let Jx be the decomposition group of x in J. Choose Sylow p-subgroups P ≤ Px ≤ PJ of G ≤ Jx ≤ J, respectively. In fact, P ≤ G is uniquely determined since G is cyclic mod p by Lemma 4.3; similarly Px ≤ Jx is uniquely determined. 7.A. General results. Proof of Theorem 1.8. If (X, x) is an HKG J-curve, then J fixes x, by definition. Now suppose that J fixes x. By Lemma 4.3, J is cyclic mod p. By Proposition 4.8(i)⇒(ii), (X, x) is an HKG P -curve. Identify X/P with P1k so that x maps to ∞ ∈ X/P ≃ P1k . Case 1: J normalizes G. Then J normalizes also the unique Sylow p-subgroup P of G. In particular, P is normal in PJ . If a p-group acts on P1k fixing ∞, it must act by translations on A1k ; applying this to the action of PJ /P on X/P shows that X/P −→ X/PJ is unramified outside ∞. Also, X −→ X/P is unramified outside x. Thus the composition X −→ X/P −→ X/PJ is unramified outside x. On the other hand, X/PJ is dominated by X/P , so gX/PJ = 0. By Proposition 4.8(iii)⇒(i), (X, x) is an HKG J-curve. Case 2: J is arbitrary. There exists a chain of subgroups beginning at P and ending at PJ , each normal in the next. Ascending the chain, applying Case 1 at each step, shows that (X, x) is an HKG curve for each group in this chain, and in particular for PJ . By Proposition 4.8(ii)⇒(i), (X, x) is also an HKG J-curve.  Corollary 7.1. We have that (X, x) is an HKG Jx -curve and an HKG Px -curve. Proof. Apply Theorem 1.8 with Jx in place of J. Then apply Proposition 4.8(i)⇒(ii).  Lemma 7.2. Among p′ -subgroups of Jx that are normal in J, there is a unique maximal one; call it C. Then C is cyclic, and central in Jx . Proof. Let C be the group generated by all p′ -subgroups of Jx that are normal in J. Then C is another group of the same type, so it is the unique maximal one. By Lemma 4.3, Jx is cyclic mod p, so Jx /Px is cyclic. Since C is a p′ -group, C −→ Jx /Px is injective. Thus C is cyclic. The injective homomorphism C −→ Jx /Px respects the conjugation action of Jx on each group. Since Jx /Px is abelian, the action on Jx /Px is trivial. Thus the action on C is trivial too; i.e., C is central in Jx .  16 7.B. Low genus cases. Define A := Aut(X, x), so G ≤ A. By Theorem 1.8, (X, x) is an HKG J-curve if and only if J ≤ A. When gX ≤ 1, we can describe A very explicitly. Example 7.3. Suppose that gX = 0. Then (X, x) ≃ (P1k , ∞). Thus Aut(X) ≃ PGL2 (k), and A is identified with the image in PGL2 (k) of the group of upper triangular matrices in GL2 (k). Example 7.4. Suppose that gX = 1. Then (X, x) is an elliptic curve, and Aut(X) ≃ X(k) ⋊A. Let A := Aut(Xk , x) be the automorphism group of the elliptic curve over k. Now p divides |G|, since otherwise it follows from Example 4.7 that gX = 0. Thus G contains an order p element, which by the HKG property has a unique fixed point. Since G ≤ A ≤ A, the group A also contains such an element. By the computation of A (in [16, Chapter 3], for instance), p is 2 or 3, and X is supersingular, so X has j-invariant 0. Explicitly: • If p = 2, then A ≃ SL2 (F3 ) ≃ Q8 ⋊ Z/3Z (order 24), and G is Z/2Z, Z/4Z, Q8 , or SL2 (F3 ). • If p = 3, then A ≃ Z/3Z ⋊ Z/4Z (order 12), and G is Z/3Z, Z/6Z, or Z/3Z ⋊ Z/4Z. Because of Corollary 7.1, the statement about G is valid also for Jx . 7.C. Cases in which p divides |G|. If p divides |G|, then we can strengthen Theorem 1.8: see Theorem 7.6 and Corollary 7.7 below. Lemma 7.5. If p divides |G| and G is normal in J, then J fixes x. Proof. Ramification outside x is tame, so if p divides |G|, then x is the unique point fixed by G. If, in addition, J normalizes G, then J must fix this point.  Theorem 7.6. If p divides |G|, then the following are equivalent: (i) (X, x) is an HKG J-curve. (ii) J fixes x. (iii) J is cyclic mod p. Proof. (i)⇔(ii): This is Theorem 1.8. (ii)⇒(iii): This is Lemma 4.3. (iii)⇒(i): By Proposition 4.8(i)⇒(ii), (X, x) is an HKG P -curve. Again choose a chain of subgroups beginning at P and ending at PJ , each normal in the next. Since J is cyclic mod p, we may append J to the end of this chain. Applying Lemma 7.5 and Theorem 1.8 to each step of this chain shows that for each group K in this chain, K fixes x and (X, x) is an HKG K-curve.  Corollary 7.7. If p divides |G|, then (a) Px = PJ . 17 (b) (c) (d) (e) The prime p does not divide the index (J : Jx ). If j ∈ Jx , then j Px = Px . If j ∈ / Jx , then j Px ∩ Px = 1. If J contains a nontrivial normal p-subgroup A, then (X, x) is an HKG J-curve. Proof. (a) Since p divides |Px | and PJ is cyclic mod p, Corollary 7.1 and Theorem 7.6(iii)⇒(ii) imply that PJ fixes x. Thus PJ ≤ Px , so Px = PJ . (b) The exponent of p in each of |Jx |, |Px |, |PJ |, |J| is the same. (c) By Lemma 4.3, Jx is cyclic mod p, so Px is normal in Jx . (d) A nontrivial element of Px ∩ j Px would be an element of p-power order fixing both x and jx, contradicting the definition of HKG Jx -curve. (e) The group A is contained in every Sylow p-subgroup of J; in particular, A ≤ PJ = Px . This contradicts (d) unless Jx = J. By Theorem 7.6(ii)⇒(i), (X, x) is an HKG Jcurve.  Lemma 7.8. Suppose that gX > 1. Let A ≤ J be an elementary abelian ℓ-subgroup for some prime ℓ. Suppose that Px normalizes A. Then A ≤ Jx . Proof. It follows from Example 4.7 that p divides |G|. If ℓ = p, then Px A is a p-subgroup of J, but Px is a Sylow p-subgroup of J by Corollary 7.7(a), so A ≤ Px ≤ Jx . Now suppose that ℓ 6= p. The conjugation action of Px on A leaves the group Ax = Jx ∩ A invariant. By Maschke’s theorem, A = Ax × C for some other subgroup C normalized by Px . Then Cx = 1. By Corollary 7.1, (X, x) is an HKG Px -curve. Since Px normalizes C, the quotient X/C equipped with the image y of x and the induced Px -action is another HKG Px -curve. Since Cx = 1, we have dx (Px ) = dy (Px ); thus Proposition 4.8(i)⇒(iv) implies that gX = gX/C . Since gX > 1, this implies that C = 1. So A = Ax ≤ Jx .  7.D. Unmixed actions. Proof of Theorem 1.10. By the base change property mentioned after Remark 4.5, we may assume that k is algebraically closed. By Corollary 7.1, we may enlarge G to assume that G = Jx . First suppose that the action of G has a nontrivially and tamely ramified orbit, say Gy, where y ∈ X(k). The Hurwitz formula applied to (X, G) gives 2gX − 2 = −2|G| + dx (G) + |G/Gy |(|Gy | − 1). (7.9) Since the action of J is unmixed, Jx and Jy are disjoint. The Hurwitz formula for (X, J) therefore gives 2gX − 2 ≥ −2|J| + |J/G|dx (G) + |J/Jy |(|Jy | − 1). 18 (7.10) Calculating |J/G| times the equation (7.9) minus the inequality (7.10) yields (|J/G| − 1)(2gX − 2) ≤ |J/Jy | − |J/Gy | ≤ 0, because Gy ≤ Jy . Since gX > 1, this forces J = G. If a nontrivially and tamely ramified orbit does not exist, we repeat the proof while omitting the terms involving y.  7.E. Mixed actions. Here is an example, mentioned to us by Rachel Pries, that shows that Theorem 1.10 need not hold if the action of J is mixed. Example 7.11. Let n be a power of p; assume that n > 2. Let k = Fn6 . Let X be the curve over k constructed by Giulietti and Korchmáros in [11]; it is denoted C3 in [13]. Let J = Aut(X ). Let G be a Sylow p-subgroup of J; by [11, Theorem 7], |G| = n3 . Then X is an HKG G-curve by [13, Lemma 2.5 and proof of Proposition 3.12], and gX > 1 by [11, Thm. 2]. Taking σ in Definition 1.9 to be the automorphism denoted W̃ on [11, p. 238] shows that the action of J on X is mixed. In fact, [11, Theorem 7] shows that J fixes no k-point of X , so the conclusion of Theorem 1.10 does not hold. 7.F. Solvable groups. Here we prove Theorem 1.11. If p does not divide |G|, then Example 4.7 shows that X ≃ P1k , so the conclusion of Theorem 1.11 holds. For the remainder of this section, we assume that p divides |G|. In this case we prove Theorem 1.11 in the stronger form of Theorem 7.13, which assumes a hypothesis weaker than solvability of J. We retain the notation set at the beginning of Section 7, and let C denote the maximal p′ -subgroup of Jx that is normal in J, as in Lemma 7.2. Lemma 7.12. Suppose that gX > 1 and that (X, x) is not an HKG J-curve. If J contains a nontrivial normal abelian subgroup, then C 6= 1. Proof. The last hypothesis implies that J contains a nontrivial normal elementary abelian ℓ-subgroup A for some prime ℓ. By Corollary 7.7(e), ℓ 6= p. By Lemma 7.8, A ≤ Jx . Thus 1 6= A ≤ C.  Theorem 7.13. Suppose that p divides |G| and (X, x) is not an HKG J-curve. (a) Suppose that gX = 0, so Aut(X) ≃ Aut(P1k ) ≃ PGL2 (k). Then J is conjugate in PGL2 (k) to precisely one of the following groups: • PSL2 (Fq ) or PGL2 (Fq ) for some finite subfield Fq ≤ k (these groups are the same if p = 2); note that PSL2 (Fq ) is simple when q > 3. • If p = 2 and m is an odd integer at least 5 such that a primitive mth root of unity ! ζ 0 ζ ∈ k satisfies ζ + ζ −1 ∈ k, the dihedral group of order 2m generated by 0 ζ −1 ! ! ! 0 1 ζ + ζ −1 + 1 1 0 1 and if ζ ∈ k, and generated by and if ζ ∈ / k. 1 0 1 1 1 0 (The case m = 3 is listed already, as PSL2 (F2 ).) 19 • If p = 3 and F9 ≤ k, a particular copy of the alternating group A5 in PSL2 (F9 ) (all such copies are conjugate in PGL2 (F9 )); the group A5 is simple. Suppose, in addition, that J contains a nontrivial normal abelian subgroup; then p ∈ {2, 3} and |PJ | = p, and if J is conjugate to PSL2 (Fq ) or PGL2 (Fq ), then q = p. (b) Suppose that gX = 1. Then p is 2 or 3, and the limited possibilities for X and Jx are described in Example 7.4. The group J is a semidirect product of Jx with a finite abelian subgroup T ≤ X(k). (c) Suppose that gX > 1. Let C ≤ J be as in Lemma 7.2. Let Y = X/C, let y be the image of x under X −→ Y , and let U = StabJ/C (y). If J/C contains a nontrivial normal abelian subgroup (automatic if J is solvable), then one of the following holds: i. p = 3, gX = 3, gY = 0, C ≃ Z/4Z, Px ≃ Z/3Z, (J : Jx ) = 4, and (X, x) is isomorphic over k to the curve z 4 = t3 u − tu3 in P2 equipped with (t : u : z) = (1 : 0 : 0), which is the curve in Example 6.2 with q = 3. Moreover, PSL2 (F3 ) ≤ J/C ≤ PGL2 (F3 ). ii. p = 2, gX = 10, gY = 1, C ≃ Z/3Z, Px ≃ Q8 , (J : Jx ) = 9, and (X, x) is isomorphic over k to the curve in Example 6.3. The homomorphism J −→ J/C sends the subgroups Jx ⊃ Px to subgroups Jx /C ⊃ Px C/C of U. Also, Px C/C ≃ Px ≃ Q8 and U ≃ SL2 (Z/3Z), and U acts faithfully on the 3-torsion subgroup Y [3] ≃ (Z/3Z)2 of the elliptic curve (Y, y). The group J/C satisfies Y [3] ⋊ Q8 ≃ (Z/3Z)2 ⋊ Q8 ≤ J/C ≤ (Z/3Z)2 ⋊ SL2 (Z/3Z) ≃ Y [3] ⋊ U. iii. p = 3, gX = 3, gY = 1, C ≃ Z/2Z, Px ≃ Z/3Z, (J : Jx ) = 4, and (X, x) is isomorphic over k to the curve z 4 = t3 u − tu3 in P2 equipped with (t : u : z) = (1 : 0 : 0) as in Example 6.4. The homomorphism J −→ J/C sends the subgroups Jx ⊃ Px to subgroups Jx /C ⊃ Px C/C of U. Also Px C/C ≃ Px ≃ Z/3Z and U ≃ Z/3Z ⋊ Z/4Z, and U/Z(U) acts faithfully on the group Y [2] ≃ (Z/2Z)2 . The group J/C satisfies Y [2] ⋊ Z/3Z = (Z/2Z)2 ⋊ Z/3Z ≤ J/C ≤ (Z/2Z)2 ⋊ (Z/3Z ⋊ Z/4Z) = Y [2] ⋊ U. In each of i., ii., and iii., if (X, x) is the curve over k specified, from Examples 6.2– 6.4, then any group satisfying the displayed upper and lower bounds for J/C is actually realized as J/C for some subgroup J ≤ Aut(X) satisfying all the hypotheses. Proof. (a) The groups listed in the statement of (a) are pairwise non-isomorphic, hence not conjugate. Thus it remains to prove that J is conjugate to one of them. By Corollary 7.7(e), J has no normal Sylow p-subgroup. We will show that every finite subgroup J ≤ PGL2 (k) with no normal Sylow p-subgroup is conjugate to a group listed in (a). This would follow 20 immediately from [9, Theorem B], but [9] has not yet been published, so we now give a proof not relying on it. We will use the exact sequence det 1 −→ PSL2 (k) −→ PGL2 (k) −→ k × /k ×2 −→ 1. Case 1: k is finite and J ≤ PSL2 (k). For finite k, the subgroups of PSL2 (k) up to conjugacy were calculated by Dickson [8, §260]; see also [17, Ch.2 §8], [26, Ch.3 §6]. The ones with no normal Sylow p-subgroup are among those listed in (a). (Dickson sometimes lists two PSL2 (k)-conjugacy classes of subgroups of certain types, but his proof shows that they map to a single PGL2 (k)-conjugacy class.) Case 2: k is infinite and J ≤ PSL2 (k). Let Je be the inverse image of J under the finite 2 e extension SL2 (k) ։ PSL2 (k). So Je is finite. The representation ! of J on k is absolutely ∗ ∗ irreducible, since otherwise Je would inject into the group of 2 × 2 upper triangular 0 ∗ ! 1 ∗ invertible matrices over k, and Je would have a normal Sylow p-subgroup Je∩ , and J 0 1 would have one too, contrary to assumption. By [10, Theorem 19.3], this representation is e Each trace is a sum of definable over the field k0 generated by the traces of the elements of J. roots of unity, so k0 is finite. Thus J is conjugate in PGL2 (k) to a subgroup J0 ≤ PGL2 (k0 ). Conjugation does not change the determinant, so J0 ≤ PSL2 (k0 ). By Case 1, J0 is conjugate to a group in our list, so J is too. Case 3: k is finite or infinite, and J ≤ PGL2 (k), but J  PSL2 (k). If p = 2, then, since k is perfect, k × = k ×2 , so PGL2 (k) = PSL2 (k). Thus p > 2. Let J ′ := J ∩ PSL2 (k). Then J/J ′ injects into k × /k ×2 , so p ∤ (J : J ′ ). The Sylow p-subgroups of J ′ are the same as those of J, so J ′ has exactly one if and only if J has exactly one; i.e., J ′ has a normal Sylow p-subgroup if and only if J has one. Since J does not have one, neither does J ′ . By Case 1, we may assume that J ′ appears in our list. The group J is contained in the normalizer NPGL2 (k) (J ′ ). We now break into cases according to J ′ . If J ′ is PSL2 (Fq ) or PGL2 (Fq ) for some subfield Fq ≤ k, then NPGL2 (k) (J ′ ) = PGL2 (Fq ) by [8, §255] (the proof there works even if k is infinite), so J = PGL2 (Fq ), which is in our list. Recall that p > 2, so J ′ is not dihedral. Thus the only remaining possibility is that J ′ ≃ A5 ≤ PSL2 (F9 ) ≤ PGL2 (k). Let {1, a} be a subgroup of order 2 in the image √ of J in k × /k ×2 and let J ′′ be its inverse image in J. Then J ′′ < PSL2 (k( a)), so J ′′ should appear in our list, but |J ′′ | = 120 and there is no group of order 120 there for p = 3. (b) In the notation of Example 7.4, let ψ : J −→ A be the projection. Let T := ker ψ ≤ X(k). Since X is supersingular, T is a p′ -group. Let J := ψ(J) ≤ A. Since G ≤ J ≤ A, the group J is in the list of possibilities in Example 7.4 for G given p. Checking each case shows that its Sylow p-subgroup P J := ψ(PJ ) is normal in J. The action of Aut(X) on X(k) restricts to the conjugation action of J on the abelian group T , which factors through J, so H 0 (P J , T ) = T P J = T PJ = 0, since PJ has a unique fixed point on X. Also, H i (P J , T ) = 0 21 for all i ≥ 1, since |P J | and |T | are coprime. Thus, by the Lyndon–Hochschild–Serre spectral sequence applied to P J ⊳ J, we have H i (J, T ) = 0 for all i ≥ 1. Therefore the short exact sequence 0 −→ T −→ J −→ J −→ 1 is split, and all splittings are conjugate. Let K be the image of a splitting J −→ J. Then K contains a Sylow p-subgroup of J. Equivalently, some conjugate K ′ of K contains PJ . Since K ′ ≃ J and P J is normal in J, the group PJ is normal in K ′ . Since x is the unique fixed point of PJ , this implies that K ′ fixes x; i.e., K ′ ≤ Jx . On the other hand, |K ′ | = |J| ≥ |Jx | since Jx ∩ T = {e}. Hence K ′ = Jx and J = T ⋊ Jx . (c) We may assume that k is algebraically closed. By Theorem 1.8, (X, x) is an HKG Jx curve. Then (Y, y) is an HKG Jx /C-curve, but not an HKG J/C-curve since J/C does not fix y. If gY > 1, then Lemma 7.12 applied to Y yields a nontrivial p′ -subgroup C1 ≤ Jx /C that is normal in J/C, and the inverse image of C1 in J is a p′ -subgroup C2 ≤ Jx normal in J with C2 C, contradicting the maximality of C. Thus gY ≤ 1. Since gX > 1, we have C 6= 1. Let n = |C|. Let ζ be a primitive nth root of unity in k. Let c be a generator of C. By Lemma 7.2, C is central in Jx , so Px C is a direct product. By Corollary 7.1, X is an HKG Px -curve. Thus X/Px ≃ P1 , and the Px -action on X is totally ramified at x and unramified elsewhere. The action of C on X/Px fixes the image of x, so by Example 4.7, the curves in the covering X/Px −→ X/Px C have function fields k(z) ⊇ k(f ), where z n = f and c z = ζz. Powers of z form a k(X/Px C)-basis of eigenvectors for the action of c on k(X/Px ). We may assume that the (totally ramified) image of x in X/Px is the point z = ∞. We obtain a diagram of curves ♥♥ ♥♥♥ ♥ ♥ ♥ ♥♥♥ C w ♥♥ ♥ Y ≃ X/C ❖❖❖ ❖❖❖Px ❖❖❖ ❖❖❖ ' X PPP PPP totally ramified above z = ∞, unramified elsewhere PPP PPP Px PP( X/Px ≃ P1z ♦ ♦♦♦ ♦ ♦ ♦♦♦ w♦♦♦ totally ramified above f = ∞, f = 0 C X/Px C ≃ P1f where the subscript on each P1 indicates the generator of its function field, and the group labeling each morphism is the Galois group. The field k(X) is the compositum of its subfields k(Y ) and k(X/Px ). Let S be the preimage of the point f = 0 under Y −→ X/Px C, and let S ′ := S ∪ {y}. Comparing the p-power and prime-to-p ramification on both sides of the diagram shows that the point f = ∞ totally ramifies in X −→ Y −→ X/Px C, while the point f = 0 splits completely into a set S of |Px | points of Y , each of which is totally ramified in X −→ Y . Thus the extension k(X) ⊇ k(Y ) is Kummer and generated by the same z as above, and powers of z form a k(Y )-basis of eigenvectors for the action of c on k(X). This extension is totally ramified above S ′ and unramified elsewhere. The divisor of f on Y is S − |S|y = S ′ − |S ′ |y, P where S here denotes the divisor s∈S s, and so on. 22 Let j ∈ J. Since C ⊳ J, the element j acts on Y and preserves the branch locus S ′ of X −→ Y . Since X −→ Y is totally ramified above S ′ , the automorphism j fixes x if and only if it fixes y. Since Px acts transitively on S, and J does not fix x or y, the set S ′ is the J-orbit of y. Thus (J : Jx ) = |Jx| = |Jy| = |S ′ | = |Px | + 1. Suppose that j ∈ J − Jx , so j y 6= y. Then the divisor of jf /f on Y is  S ′ − |S ′ | j y − (S ′ − |S ′ |y) = |S ′ |(y − j y), which is nonzero. Since C is cyclic and normal, j −1 cj = cr for some r, and hence c (jz/z) = jcr c z/ z = ζ r−1 (jz/z). Thus jz/z is a ζ r−1-eigenvector, so jz/z = z r−1 g for some g ∈ k(Y )× . Taking nth powers yields jf /f = f r−1 g n . The corresponding equation on divisors is |S ′ |(y − jy) = (r − 1)(S ′ − |S ′|y) + n div(g). (7.14) Considering the coefficient of a point of S ′ − {y, j y} shows that r − 1 ≡ 0 (mod n). Then, considering the coefficient of y shows that n divides |S ′ |, and dividing equation (7.14) through by n shows that (|S ′ |/n)(y − j y) is div(f (r−1)/n g), a principal divisor. If, moreover, gY > 0, then a difference of points on Y cannot be a principal divisor, so n 6= |S ′ |. Case 1: gY = 0. Applying (a) to Y shows that p ∈ {2, 3} and any Sylow p-subgroup of J/C has order p. Since C is a p′ -group, |PJ | = p too. By Corollary 7.7(a), Px = PJ , so |Px | = p, and n divides |S ′ | = p + 1. Thus (p, n) is (2, 3), (3, 2), or (3, 4). The Hurwitz formula for X −→ Y yields X 2gX − 2 = n(2 · 0 − 2) + (n − 1) = −2n + (p + 1)(n − 1). s∈S ′ Only the case (p, n) = (3, 4) yields gX > 1. By (a), we may choose an isomorphism Y ≃ P1t mapping y to ∞ such that the J/C-action on Y becomes the standard action of PSL2 (F3 ) or PGL2 (F3 ) on P1t . Then S ′ = Jy = P1 (F3 ). Then f has divisor S ′ − 4y = A1 (F3 ) − 3 · ∞ √ on P1 , so f = t3 − t up to an irrelevant scalar. Since k(X) = k(Y )( n f ), the curve X has affine equation z 4 = t3 − t. This is the same as the q = 3 case of Example 6.2. Case 2: gY = 1. Applying (b) (i.e., Example 7.4) to Y shows that either p is 2 and |Px | divides 8, or p = 3 and |Px | = 3; also, Y has j-invariant 0. Also, n divides |S ′ | = |Px | + 1, but n is not 1 or |S ′ |. Thus (p, n, |Px |, |S ′|) is (2, 3, 8, 9) or (3, 2, 3, 4). The Hurwitz formula as before gives gX = 10 or gX = 3, respectively. Let m = |S ′ |/n. Since m(y − j y) is principal for all j ∈ J, if y is chosen as the identity of the elliptic curve, then the J-orbit S ′ of y is contained in the group Y [m] of m-torsion points. But in both cases, these sets have the same size |S ′ | = m2 . Thus S ′ = Y [m]. If p = 2, the j-invariant 0 curve Y has equation u2 + u = t3 , and Y [3] − {y} is the set √ of points with t ∈ F4 , so f = t4 + t up to an irrelevant scalar, and k(X) = k(Y )( 3 t4 + t). Thus X is the curve of Example 6.3. 23 If p = 3, the j-invariant 0 curve Y has equation u2 = t3 − t, and Y [2] − {y} is the set of √ √ points with u = 0, so f = u up to an irrelevant scalar, and k(X) = k(Y )( u) = k(t)( 4 t3 − t). Thus X is the curve of Example 6.4. Finally, Proposition 6.1 implies that in each of i., ii., and iii., any group satisfying the displayed upper and lower bounds, viewed as a subgroup of Aut(Y ), can be lifted to a suitable group J of Aut(X).  Remark 7.15. Suppose that (X, x) is not an HKG J-curve, gX > 1, and PJ is not cyclic or generalized quaternion. Then [13, Theorem 3.16] shows that J/C is almost simple with socle from a certain list of finite simple groups. Acknowledgement We thank the referee for suggestions on the exposition. References [1] J. Bertin and A. Mézard, Déformations formelles des revêtements sauvagement ramifiés de courbes algébriques. Invent. Math. 141 (2000), no. 1, 195 – 238. [2] R. Camina. Subgroups of the Nottingham group, J. Algebra 196, (1997), 101–113. [3] R. Camina. The Nottingham group. In: New horizons in pro-p groups, pp. 205–221, Progr. Math., 184, Birkhäuser Verlag, Boston, MA, 2000. [4] T. Chinburg, R. Guralnick, D. Harbater. The local lifting problem for actions of finite groups on curves. Annales scientifiques de l’ENS, 44, (2011), 537-605. [5] T. Chinburg, P. Symonds. An element of order 4 in the Nottingham group at the prime 2. arXiv:1009.5135v1 [6] G. Christol. Ensembles presque périodiques k-reconnaisables. Theoret. Comput. Sci. 9 (1979), 141–145. [7] G. Christol, T. Kamae, M. Mendès-France, G. Rauzy. Suites algébriques, automates et substitutions. Bull. Math. Soc. France 108 (1980), 401–419. [8] L.E. Dickson, Linear Groups with an Exposition of the Galois Field Theory. Teubner, Leipzig, 1901. [9] X. Faber. Finite p-irregular subgroups of PGL2 (k). arXiv:1112.1999v2. [10] W. Feit. The Representation Theory of Finite Groups. North Holland, Amsterdam, 1982. [11] M. Giulietti, G. Korchmáros. A new family of maximal curves over a finite field. Math. Ann. 343 (2009), 229–245. [12] B. Green. Realizing deformations of curves using Lubin-Tate formal groups. Israel J. Math. 139 (2004), 139–148. [13] R. Guralnick, B. Malmskog, R. Pries. The automorphism groups of a family of maximal curves. J. Algebra 361 (2012), 92–106. [14] D. Harbater. Moduli of p-covers of curves. Comm. Algebra 8 (1980), 1095–1122. [15] R. Hartshorne. Algebraic geometry. Graduate Texts in Mathematics, No. 52. Springer-Verlag, New York-Heidelberg, 1977. [16] D. Husemöller. Elliptic curves. Graduate Texts in Mathematics, No. 111. Springer-Verlag, New YorkHeidelberg, 1987. [17] B. Huppert. Endliche Gruppen I, Grundlehren der mathematischen Wissenschaften 134, Springer-Verlag, New York-Heidelberg, 1967. 24 [18] I. M. Isaacs. Finite group theory. Graduate Studies in Mathematics, Vol. 92. American Mathematical Society, Providence, 2008. [19] N. M. Katz. Local-to-global extensions of representations of fundamental groups. Ann. Inst. Fourier (Grenoble) 36 (1986), 69–106 [20] B. Klopsch. Automorphisms of the Nottingham group. J. Algebra 223 (2000), 37–56. [21] J. Lubin. Torsion in the Nottingham group. Bull. London Math. Soc. 43 (2011), 547–560. [22] F. Oort, T. Sekiguchi, and N. Suwa. On the deformation of Artin–Schreier to Kummer. Ann. Sci. École Norm. Sup. (4) 22 (1989), no. 3, 345–375. [23] B. Poonen. Gonality of modular curves in characteristic p. Math. Res. Letters 15 (2008), no. 2, 265–271. [24] J.-P. Serre. Corps locaux. Publications de l’Institut de Mathématique de l’Université de Nancago, VIII Actualités Sci. Indust., No. 1296. Hermann, Paris, 1962. [25] J.H. Silverman. The arithmetic of elliptic curves. Graduate Texts in Mathematics, 106. Springer-Verlag, New York, 1986. [26] M. Suzuki. Group Theory. Grundlehren der mathematischen Wissenschaften 247, Springer-Verlag, New York-Heidelberg, 1982. Frauke M. Bleher, Department of Mathematics, University of Iowa, Iowa City, IA 52242, U.S.A. E-mail address: [email protected] Ted Chinburg, Department of Mathematics, University of Pennsylvania, Philadelphia, PA 19104, U.S.A. E-mail address: [email protected] Bjorn Poonen, Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA 02139, U.S.A. E-mail address: [email protected] Peter Symonds, School of Mathematics, University of Manchester, Oxford Road, Manchester M13 9PL, Manchester M13 9PL United Kingdom E-mail address: [email protected] 25
4math.GR
arXiv:1706.03065v1 [cs.DS] 9 Jun 2017 Towards balanced clustering - part 1 (preliminaries) Mark Sh. Levin ∗ The article contains a preliminary glance at balanced clustering problems. Basic balanced structures and combinatorial balanced problems are briefly described. A special attention is targeted to various balance/unbalance indices (including some new versions of the indices): by cluster cardinality, by cluster weights, by inter-cluster edge/arc weights, by cluster element structure (for element multi-type clustering). Further, versions of optimization clustering problems are suggested (including multicriteria problem formulations). Illustrative numerical examples describe calculation of balance indices and element multitype balance clustering problems (including example for design of student teams). Keywords: balanced clustering, combinatorial optimization, heuristics, applications Contents 1 Introduction 1 2 Basic balanced structures 4 3 Combinatorial balancing problems 6 4 Balance/unbalance indices for clustering solution 7 5 Optimization problem formulations for balanced clustering 9 6 Illustrative examples 6.1 Illustration example for description of cluster structure . . . . . . . . . . . . . . . . . . . . 6.2 Network-like illustration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Cluster structure based balanced clustering for student teams . . . . . . . . . . . . . . . . 10 10 10 13 7 Conclusion 15 8 Acknowledgments 15 1. Introduction Balancing processes play central roles in many theoretical and practical fields (Fig. 1) [9,10,12,31,35, 36,40,54,56,61,91,93,110,120,129,134,139,150]. The corresponding balancing problems are basic ones in various engineering domains, for example: manufacturing systems, computing systems, power/electricity systems, radio engineering systems, communication systems, and civil engineering systems. Similar balancing problems are examined in engineering management (e.g., coordination science), communications (e.g., synchronization as time-based balancing), organization science, psychology. In recent decades, the balancing approaches are very significant from the viewpoint of system modularity [16,65,86,103,112]. ∗ Mark Sh. Levin: Inst. for Inform. Transmission Problems, Russian Academy of Sciences; http://www.mslevin.iitp.ru; email: [email protected] 2 ✬ Initial data: (a) element set, element attributes; (b) element set with structure over the set ✫ Fig. 1. Scheme ✩ Balanced structure ✏ ✏ ✓ ✓ ✎ ☞ ✎ ☞ ✛ ✲ Solving ✍ ✌ ✍ ✌ ✒ ✑ ✒ ✑ =⇒ (process of =⇒ ✻ ❅ ■✒ ✻ ✏ ✏ ✓ ✎❄ ✠ ☞ ✎❄ ☞ ❘✓ ❅ balancing) ✛ ✲ ✍ ✌ ✍ ✌ ✒ ✑ ✒ ✑ ✪ of balancing process The basic balancing problem consists in partitioning the element set (while taking into account element parameters, structure over the elements) into interconnected element groups (clusters) which are balanced (by cardinality of cluster elements, weight of cluster as a total weight of cluster elements, weight of cluster interconnections, structure of cluster, etc.). A general framework of balancing problems domain is depicted in Fig. 2. ✟ ✙ ✟ Balanced structures: balanced set partition, balanced cluster set, ✲ balanced tree, balanced ✛ graph partition, balanced sign graph, balanced matrix, etc. ❍ ❥ ❍ Solving methods: Balancing problems/models: exact algorithms, balance partition, ✛ ✲ approximation load balancing, algorithms, assembly line heuristics, balancing, etc. metaheuristics ✻ ✻ ✻ ❄ ❄ ❄ Applications (applied systems: manufacturing, computing, communications, transportation, etc.) Fig. 2. General framework of balancing problems domains It is reasonable to point out the following main application domains with using the balanced structures: 1. hierarchical organization of storage and search processes in information systems and in computer systems (e.g., various balanced search trees BSTs: AVL trees, red-black trees, splay trees) [2,13,88,93, 103,106,143]; 2. balanced parallel scheduling of computing processes (e.g., computing in multi-processor systems, distributed computing) [12,31,145]; 3. service partitioning in a grid environment [119,120]; 4. balanced partitioning in networks (e.g., modularization), balanced allocation of centers in networks [18,54]; 5. balanced partitioning of algorithms [139]; 6. balanced manufacturing scheduling in manufacturing systems (e.g., assembly line balancing problems) [6,9,35,36,61,62,64,80]; 7. design of balanced hierarchical structures in organizations [10,129]; 8. design and management in communication systems (network design, routing, etc.) based on balanced hierarchical structures [91,110]; and 9. design of distributed defence systems [74,150]. Evidently, balanced clustering problems (including combinatorial clustering, constrained clustering, etc.) are used as the basic balancing combinatorial models for all domains [19,34,104,105]. Some basic balanced clustering problems are pointed out in Table 1. In general, the clustering problem is the following. Let A = {a1 , ..., aj , ..., an } be the initial set of elements (items, objects). Usually, the following characteristics are examined: (1) parameters of each element aj ∈ A as vector p(aj ) = (p1 (aj ), ..., pi (aj ), ..., pm (aj )); (2) structure(s) (binary relation(s)) over the elements set A: G = (A, E) where E is a set of edges/arcs (or weighted edges/arcs). A clustering solution consists of a set of clusters (e.g., without intersections) [104,105]: e = {X1 , ..., Xι , ..., Xλ }, X 3 i.e., dividing the set A into clusters: Xι ⊆ A ∀ι = 1, λ, ηι = |Xι | is the cluster size (cardinality of cluster Xι , ι ∈ 1, λ ). No. 1. 2. Table 1. Basic balanced clustering problems Basic types of initial data Results Set of elements, element Set of balanced clusters parameters Set of elements with relations: 2.1. Set of elements with precedence relation 2.2. Set of elements with various binary relation(s) (e.g., precedence, inclusion) 3. Set of element chains (trajectories) 4. Set of element structures (e.g., programs, data structures, groups of technological operations, teams) (1) chain over balanced clusters (balanced one-processor scheduling) (2) parallel balanced element groups (precedence over elements in each group, multiprocessor scheduling) (1) Tree/forest/hierachy over balanced clusters (search structure, hierarchical storage paging, balanced broadcasting) (2) k-layer network architecture (hierarchical communications, hierarchical distributed computing) Special time interval balanced scheduling of element chains (scheduling in homebuilding) Set of balanced clusters of element structures (e.g., distributed computing, technological plans) Some source(s) [19,34,97,104,107] [111,140,141,154] [1,14,44,51,77,98] [102,103,123,128] [142,151,152,154] [35] [104,106] The basic balance (or unbalance/mismatch) index (parameter) for clustering solution is the difference between the maximal cardinality of a cluster and minimal cardinality of a cluster (in the considered clustering solution): e = max ηι − min ηι . B c (X) ι=1,λ ι=1,λ Thus, the balanced clustering problem is targeted to search for the clustering solution with minimum balance index (e.g., index above). Clearly, additions to the balanced problem statement can involve the following: (a) some constraints: the fixed number of clusters, restriction(s) to cluster sizes (including specified integer interval), etc.; (b) objective function(s) (e.g., minimization of total interconnections weight between clusters, maximization of total element connections weight in clusters). This material contains an author preliminary outline of balanced clustering problems. The basic balanced structures are pointed out. New balance/unbalance indices for clustering solutions are suggested. Formulations of balanced optimization problems are described (including multicriteria problem formulations). Several numerical examples illustrate calculation of balance/unbalance indices for clustering solutions. A special example for design of student teams (as element multi-type cluster structure balanced clustering problem) is described. The material can be considered as a continuation of the author preprint on combinatorial clustering [104] and the corresponding article [105]. 4 2. Basic balanced structures The following basic balanced structures can be pointed out: 1. Balanced set partition (by cardinality, by element weights, element structure; in the general case, the obtained subsets can have intersections): (a) a basic illustration (Fig. 3), (b) balancing by element structure in each subset (Fig. 4). 2. Chain of balanced clusters (balanced manufacturing line, balanced chain of computing tasks groups, etc.) (Fig. 5). 3. Balanced packing of bins (e.g., multi-processor scheduling) (Fig. 6). 4. Balanced β-layer clustering (i.e., partitioning the initial element set into clusters and layers; e.g., to obtain a two-layer hierarchy with balances at the layer of clusters and at the layer of cluster groups, this is a two-balancing case) (Fig. 7). 5. Balanced trees [3,49,93]: 5.1. balanced trees: by height (Fig. 8), by degree (Fig. 9), 5.2. balanced search trees (as search index structures): (a) AVL trees, self-balancing (or height balancing) binary search tree [2], (b) B-trees (path length from the root to each leaf equals b or b + 1 (where b is a constant) (Fig. 8) [20,49,93], (c) Red-Black trees (symmetric binary B-tree) [21,49], etc. 6. Balanced graph partition (e.g., partition of a graph into balanced subgraphs/communities while taking into account vertex weights or/and edge weights) (Fig. 10). 7. k-optimal partition of directed graph (path partition) [22,26,27] (Fig. 11). 8. Balanced signed graph [4,75,79,133,134] (Fig. 12). 9. Multi-layer structure of balanced clusters in networking: 9.1 hierarchy over balanced clusters (networking) (Fig. 13); 9.2 balanced clustering based multi-layer network structure (Fig. 14). 10. Balanced matrices [25,47,131]. Balanced subsets (by (cardinalities, by element weights, by element structures) ✏ ★✥ ✓ ✓✏ ✓ ✏ ✶ ✏ ✏ ✒ ✑ Initial ✲✛ ✒✑ ✘ ✒ ✘ ✑ element ✛ set P q P ✚ ✙ ✧✦ ✚✙ Fig. 3. Balanced set partition Cluster Cluster X3 ✘ Cluster ✛ X1✘ ✛ X2✘ ✛ r❡ s r❡ s r❡ s ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ✚ ✙ ✚ ✙ ✚ ✙ Cluster X4✘ Cluster Cluster X6 ✘ Cluster X7 ✘ ✛ ✛ X5✘ ✛ ✛ r❡ s r❡ s r❡ r❡ s r❡ s s ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ✚ ✙ ✚ ✙ ✚ ✙ ✚ ✙ Fig. 4. Balanced cluster set (by subset structures) Multi-bin (multi-container, multi-processor, multi-knapsack) system ✬ ✩ ✎ ☞ ✲ ✈ t ✇ s ✉ Bin 1 ✲ ✍ Initial ✌ ✎ ☞ ✲ set of t s ✉ s t s Bin 2 elements ✲ ✍ ✌ ... (objects, ✲ ✎ ☞ items) ✲ ✉ t ✈ ✈ Bin k ✫ ✪ ✍ ✌ Fig. 6. Balanced packing of bins Chain of clusters ✩ (balanced manufacturing line, ✲ balanced chain of computing tasks groups) Initial set ✲ ✎ ✎ ☞ ✎ ☞ ✎ ☞ ☞ of elements ✲ ✍ ✌ ✍ ✌ ✍ ✌ (objects, ✲ ✍ ✌ items) ✲ ✫ ✪ Fig. 5. Chain of balanced clusters ★✥ ★ ✥ ✎ ☞ ☛ ✟ Two-layer ✶ ✏ ✏ ✍✟ ✌clustering ✡☛ ✠ ✈ ✟❍ Initial ✡ ✠✬ ✧ ✦ ✩ ✲✬ ✩ ✟✟ ❍❍ ☛ ✟ ✟ ✟ ☛ ☛ element ✟ ❍✉ ❍ ✟✉ ❍ ✟ set ✡ ✠ ✡ ✠ ❍❍s ✟ ✡ ✠ ✎ ☞☛ ✟ ✎ ☞ ☛ ✟ s s s s ✟ P q P ❍ ❍ ❅ ❅ ❅ ✡ ✠ ✍ ✌✡ ✠ q❝ q❝ ❝q q❝ ❅q❝ q❝ q❝ q❝ ❅q❝ q❝ ❅❍ q❝ ❍q❝ ✍ ✌ ✧✦ ✫ ✪ ✫ ✪ Fig. 7. Balanced two-layer clustering Fig. 8. Height-balanced tree ✬ 5 q❝ ✟✇ ✟ ❅ ✟ ✟ ✉ q❝ ❅✉ ❅ ❅ s q❝ ❅q❝ q❝ s ❅q❝ ❅ ❅ q❝ ❅q❝ q❝ q❝ ❅q❝ Fig. 9. 3-degree tree ′ Cluster X ′ Cluster 3 ★X✥ ✬ 2✩ q❝❢2 1 q❝❢ ✁❆ ✁❆ ′ 4 ✁ ❆4 ✁ ❆ Cluster ★X✥ 6 ❆r r❞✁5 ❆r❞ r7 3 r✁ ❆ ✁ ✁❆ ✫ ◗✪ ◗ ✬ ✩ ◗ ❆ ✁ 11✁ ❆ 9 q❝❢ ◗ ◗ ❆r✁10 ✦ ✁q❝❢ 12❆q❝❢ ❞ r 8 ✧ ◗ ✁ ❅ ◗ ❆ ◗❆ ✁ ❅ 13r ◗ ◗❆✁r❞ ❅r❞ 15 ✦ 14 Cluster ✧ ✫ ✪ X1′ Fig. 10. Graph partitioning → − ✩ ✬ G = (A, E ) µp−1 µp µ2 r❡ q❞ s✛ s µ1 ✻ ... ❅ ■ r❡ r ❅q❞ ✻ s ✻ ✻ ... ✻ r❡ r s q❞ ✻ ✻ ✻ ✻ ✻ r❡ r q❞ s ✫ ✪ Fig. 11. k-optimal partition of digraph r❡ r ❡ t “+” ❅ ❅ ❅ ❅ “-” “+” “-” “+” “-” ❅ “+” “-” ❅“-” ❅ ❅ r “-” t “+” ❅t “-” ❡ ❡ r “-” ❅t Fig. 12. Balanced sign graph Ordinary Base station/ Cluster ✎ ☞ nodes heads ☞ ✎ ❍ mobile observer ✑ ❥t ❍ ✰ q✑ ✟ ✟ t q ❏ ✍ ✌ ❍ ❍q ✌ ✬ ✩ ✍ ✎ ☞ ✎q ☞ ✎ ☞ ✲ ❏ ❄ Initial set ❫ ✟q t t t✟ ✲ ❏ ✟ ❍ ✐ ✟✍ r❢ ❍q of elements ✌ ✍ ✌ ✍ ✎q ☞ ✌ ✟ ✎ ☞ (objects, ✲ ❍ ✟q t✟ ✁❆ ❍❍ t✟ ✎q ☞ ✟ ❍ ❍q ✌ items, end- ✲ ✁ ❆ ✍ ❍ ✟q ✲ t✟ ❍ ✍ ✌ users) ❍ ❍q ✌ ✫ ✪ ✍ Fig. 13. Hierarchy over balanced clusters (network) Domain 1 (Up-layer) ✩ r ✲r ✘ ✿ ✘ ❍ ✬ ✩ ❥ ❍ ✘ ✲ r ✲ q r ❳❳❳ ✘✘ ❍❍ ③ ❝q ✲ q❞ ✘ PP ❥ ❍ r ❳ P Initial set ✲ ❳❳ ✻ P q q❝ P ③ ❝q ✫ ✪ of elements ✲ (objects, ✲ Domain 3 ✘ 4 Domain Domain 2 ✘ ✛ Domain 5 ✘ ✘ ✛ ✛ items) g ✲✛ ❄ h s ❝q ✲ r ✲ r 31 g g ✿ ✘ 0 r ✫ ✪ ✘ g ❄ ❄ ✲ ✲ h✟ ✘ ❝ q ❝ q s r h h ❳❳❳ 41✘✘ ❅ ✯❍ ❥ r✲ q❝ ❍ ❍ s✟ ❘s ❄ ❅ ❥ s42 ❍ ③ s g h32 ✾ s✘ shg53 hg51 s✠hg52 ✚ ✙ ✚ h33 ✙ ✚ ✙ ✚ ✙ Fig. 14. Balanced clustering based multi-layer network structure ✬ 6 3. Combinatorial balancing problems A list of basic balancing combinatorial optimization problems is presented in Table 2. No. I. 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 1.7. 1.8. 1.9. 1.10. 1.11. 1.12. 1.13. 1.14. 1.15. 1.16. 1.17. II. 2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.7. 2.7.1. 2.7.2. 2.7.3. 2.7.4. 2.7.5. 2.7.6. 2.8. 2.9. 2.10. 2.11. 2.12. Table 2. Basic balancing combinatorial (optimization) problems Combinatorial problem Some sources Balanced partitioning problems: Balanced partition problems (partition of set into balanced subsets) [75,82,94,115] k-balanced partitioning problem (partition of set into k balanced [69,73] subsets) Partitioning (hierarchically clustered) complex networks [104,116] via size-constrained graph clustering Uniform k-partition problem [58] Quadratic cost partition problem [76] Multi-constraint partitioning problem [81] Tree-balancing problems [2,13,88,93,143] Minimum graph bisection problem [75,83] Simple graph partitioning problem [75,144] Balanced graph partitioning (partition of graph into balanced [8,12,23,28,38] components) [66,72,95,113] Balanced partitioning of trees [71,100,103] Balanced partitioning of grids and related graphs [68] Directed acyclic graph (DAG) partition [29,99] Graph-clique partitioning problem [30,32,43,63,75] [85,92,126,127,132] Multiply balanced k-partitioning of graphs [7] Partitioning a sequence into clusters [89] with restrictions on their cardinalities General partition data model [117] Some basic balanced combinatorial optimization problems: Balanced knapsack problems, knapsack load balancing [15,75,114] Balanced bin packing, container loading [55,57,75] Balanced parallel processor scheduling, balanced job scheduling [42,48,75,135,145] in grids Balanced allocation [11,24,53,90] Balanced k-center problem, balanced k-weighted center problem [18,70,108] Matrix balancing [17,41,118,137,153] Load balancing problems in distributed systems: Load balancing in computer systems, in multiple processor [45,46,52,106,109] systems [121] Load balancing in telecommunications networks [138] Load balancing in structuring P2P systems [130] Load balancing in web-server systems [39] Load balancing in sensor networks [84] Special partition of multi-hop wireless network [78] (via graph coloring) for scheduling Assembly line balancing problems [5,9,36,37] [80,136] Balanced graph matching [50] Route balancing problems [87,96,122,124,125] Partition and balancing in meshes [59,60,146,147,148] Balanced combinatorial cooperative games [67] 7 4. Balance/unbalance indices for clustering solution e = {X1 , ..., Xι , ..., Xλ }. Let Here, balance/unbalance indices are described for clustering solution X p (Xι ) be a total parameter for cluster Xι (ι = 1, λ) (e.g, the number of elements, total weight). In e can be defined via two methods: general, a balance/unbalance index for clustering solution X bal Method 1: The balance (unbalance) index is defined as the following: e = max pbal (Xι ) − min pbal (Xι ). B(X) ι=1,λ ι=1,λ Note, assessment of pbal (Xι ) can be based on various scales: quantitative, ordinal, poset-like (e.g., multiset-based) [101,103]. Now, the following additional element parameters are considered: 1. The weight of item w(aj ) ∀aj ∈ A (e.g., w(aj ≥ 0). 2. The weight of edge/arc between items v(aj1 , aj2 ) ∀aj1 , aj2 ∈ A, (aj1 , aj2 ) ∈ E (e.g., v(aj1 , aj2 ) ≥ 0). 3. The structure of cluster by elements types is defined as a special multiset estimate [101,103]: e(Xι ), ι = 1, λ, e(Xι ) = (θ1 , ..., θγ , ..., θγ ), where θγ equals the number of element of type γ ( γ = 1, γ ) Pγ in cluster Xι , the set of element types is: {1, ..., γ, ..., γ}, γ=1 θγ = |Xι |. In Fig. 4, an example with e = {X1 , X2 , X3 , X4 , X5 , X6 , X7 }). three element types is depicted (clustering solution X In addition, a special “empty” element type is considered with the number γ + 1. This is a basis to consider the clusters of the same size (cardinality) to compare their structure: for each cluster multiset estimate the following element is added: θγ+1 , for cluster of the maximal size θγ+1 = 0, otherwise θγ+1 = |X|max − |Xι |, where |X|max is the maximal cluster size. As a result, the number of components in each multiset estimate of cluster structure will be the same. The proximity between structure estimates for two clusters will be examined as a way (the number of steps) from one estimate to another estimate [101,103] (this is a simplified definition of the multiset estimate proximity). Note, the element types are linear ordered by importance/complexity (example for four types) 1  2  3  4. The ordering can be considered as a complexity of communication node, for example: access point (1), transition node (2), end-node (3), “empty” element (4). Thus, corresponding lattice based scale can be used [101,103]. As a result, the following balance indices for clustering solution can be examined (for method 1): (1.1) balance index by cluster cardinality is: e = max |Xι | − min |Xι |. B c (X) ι=1,λ ι=1,λ (1.2) balance index by total cluster weight: X X e = max B w (X) w(aj ) − min w(aj ). ι=1,λ a ∈X j ι ι=1,λ a ∈X j ι (1.3) balance index by total inter-cluster edge/arc weight: X X e = max v(aj1 , aj2 ) − min v(aj1 , aj2 ). B v (X) ι=1,λ a ,a ∈X ι j2 j1 ι=1,λ a ,a ∈X ι j2 j1 (1.4) balance index by total cluster structure: e = max e(Xι ) − min e(Xι ). B s (X) ι=1,λ ι=1,λ Method 2. Here, the balance/unbalance index is defined as the following: b X) e = max |pbal (Xι ) − p0 , B( ι=1,λ where p0 is a special specified (e.g., average) parameter of a special reference (e.g., average) cluster X 0 (size, weight, interconnection weight, structure estimate). Thus, the following balance indices for clustering solution can be examined: 8 (2.1) balance index by cluster cardinality is: b c (X) e = max | |Xι | − p|X 0 | |, B ι=1,λ where p|X 0 | is a special specified (e.g., average) cluster size. (2.2) balance index by total cluster weight: X b w (X) e = max | B w(aj ) − pw0 |, ι=1,λ aj ∈Xι where pw0 is a special specified (e.g., average) cluster weight. (2.3) balance index by total inter-cluster edge/arc weight: X b v (X) e = max | v(aj1 , aj2 ) − pv0 |, B ι=1,λ aj1 ,aj2 ∈Xι where pv0 is a special specified (e.g., average) cluster weight of inter-cluster interconnections (i.e., edges/arcs). (2.4) balance index by total cluster structure: b s (X) e = max | e(Xι ) − ep0 |, B ι=1,λ where ep0 is a special specified (e.g., average) multiset estimate of cluster structure. Table 3 contains the list of the considered balance indices. Note, a hybrid balancing (i.e., by several balance parameters) can be examined as well. No. I. 1.1. 1.2. 1.3. 1.4. II. 2.1. 2.2. 2.3. 2.4. e Table 3. Balance/unbalance indices of clustering solution X Description Method 1 (difference between maximal and minimal values of cluster total parameters): Balance index by cluster cardinality Balance index by total cluster weight Balance index by total inter-cluster edge/arc weight Balance index by cluster element structure Method 2 (maximal difference between cluster total parameters and special reference specified (fixed) cluster total parameter): Balance index by cluster cardinality Balance index by total cluster weight Balance index by total inter-cluster edge/arc weight Balance index by cluster element structure Notation e B c (X) w e B (X) e B v (X) s e B (X) b c (X) e B w e b B (X) b v (X) e B s e b B (X) 9 5. Optimization problem formulations for balanced clustering Thus, the balanced clustering problem is targeted to search for the clustering solution with minimum balance index (e.g., index above). Clearly, additions to the balanced problem statement can involve the following: (a) some constraints: the fixed number of clusters, restriction(s) to cluster sizes (including specified integer interval), etc.; (b) objective function(s) (e.g., minimization of total interconnections weight between clusters, maximization of total element connections weight in clusters). The described balanced indices for clustering solutions can be used as objective functions and a basis for constraints in formulations of optimization balanced clustering models, for example: Problem 1: e min B c (X) e ≤ w0 , B s (X) e  e0 , s.t. B w (X) where w0 is a constraint for cluster weight difference, e0 is a constraint for cluster structure difference. Problem 2: e min B w (X) e ≤ c0 , B s (X) e  e0 , s.t. B c (X) where c0 is a constraint for cluster cardinality difference, e0 is a constraint for cluster structure difference. Problem 3: e min B w (X) e ≤ c0 , |X| e ≤ λ0 , s.t. B c (X) where c0 is a constraint for cluster cardinality difference, λ0 is a constraint for numbers of clusters in the clustering solution. Evidently, multicriteria optimization models can be examined as well, for example: Problem 4: e c (X), e e v (X) e min B min B e ≤ w0 , B e s (X) e  ee0 , s.t. B w (X) where w0 is a constraint for cluster weight difference, ee0 is a constraint for cluster structure difference based on a reference value. Problem 5: e c (X), e e w (X), e e v (X) e min B min B min B e s (X) e e e ≤ λ0 , s.t. B e0 , |X| where ee0 is a constraint for cluster structure difference based on a reference value, λ0 is a constraint for numbers of clusters in the clustering solution. Problem 6: e min B w (X), e v (X) e min B e ≤ c0 , B e s (X) e  ee0 , s.t. B c (X) where c0 is a constraint for cluster cardinality difference, ee0 is a constraint for cluster structure difference based on a reference value. 10 6. Illustrative examples 6.1. Illustration example for description of cluster structure Table 4 contains a description of cluster structures and corresponding multiset estimates for example from Fig. 4 (seven clusters, tree types of elements and additional “empty” element type). Table 5 contains the simplified proximity (or distance) between the multiset estimates of the clusters: δ(e(Xι1 ), e(Xι2 )), ι1 , ι2 ∈ {1, ..., 7}. Cluster Xι X1 X2 X3 X4 X5 X6 X7 Table 4. Cluster structures for example from Fig. 4 Element type: θ1 θ2 θ3 θ4 (“empty” element) Multiset estimate e(Xι ) 1 1 3 2 (1, 1, 3, 2) 1 1 3 2 (1, 1, 3, 2) 1 1 4 1 (1, 1, 4, 1) 1 1 3 2 (1, 1, 3, 2) 1 1 2 3 (1, 1, 2, 3) 2 1 4 0 (2, 1, 4, 0) 1 2 4 0 (1, 2, 4, 0) Table 5. Proximity for cluster structures (example from Fig. 4): Cluster Xι1 Cluster Xι2 : X1 X2 X3 X4 X5 X1 0 0 1 0 1 X2 0 0 1 0 1 X3 1 1 0 1 2 X4 0 0 1 0 1 X5 1 1 1 1 0 X6 4 4 3 4 5 X7 3 3 2 3 4 δ(e(Xι1 ), e(Xι2 )) X6 X7 4 3 4 3 3 2 4 3 5 4 0 1 1 0 For clustering solution from Fig. 4, the following balance indices are obtained: e = 7 − 4 = 3, B s (X) e = e(X6 ) − e(X5 ) = (2, 1, 4, 0) − (1, 1, 2, 3) = δ(e(X6 ), e(X5 )) = 5. B c (X) Further, cluster X1 is considered as a reference cluster with corresponding its parameters. As a result, the following balance indices are obtained: b c (X) e = |X6 | − |X1 | = 2, B b s (X) e = δ(e(X6 ), e(X1 )) = δ((2, 1, 4, 0), (1, 1, 3, 2)) = 4. B 6.2. Network-like illustration example In general, a wireless sensor network (WSN) can be considered as a multi-layer system (Fig. 15) [33,149]: (1) sensors, (2) clusters, (3) cluster heads, (4) sink, (5) database server, and (6) decision/control center. The design process of the architecture is based on element multi-type clustering (i.e., sensor/end nodes, cluster heads, etc). ✟ ❍ ✟ ❍❍Analysis/decision/control center✟❍ ✟ ❅ ✠ ❘ ❅ ✻ Control Control action action Database server ✻ ✲ Sink ✟ ✟✟ Cluster heads PP ✟ ✚ r❡✛ ✟ ✐ P ✶ r❡ ✏ PP ✏ ✚ ✬ P✩ ✏✏ ✚ ✏✏ r❡ ✛ PP ❨❍ ✯ ❍ ✟ r❳ r ✚ ✏ PP ✚ ✘✘ ❳❳ ■ ❍s ❅ ✾ ✘ ③ r❡✛ s✟✟ s✒ ✻ r❡ ✏ P✏ ✿ ② ❳ ✟✟ r✘✘✘ ❅ ❳❳rr Cluster 2 Sensors ✚ s ❅s ✛ ✘ ❩ ❩ r ❳ r ✘ ❳ Cluster 3 ✫ ✪ ✘ ③ ❳ ✾ ✲ r ✘ ②❳❳r ❳ ✿ r❡✘ Cluster 1 r✘ ✘ ✚ ✙ Fig. 15. Multi-layer architecture of WSN ✘ ✙ 11 Here, a numerical example from Fig. 10 is considered (three types of elements: ordinary nodes, nodes for relay, cluster heads): A = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}. Parameters of elements and their interconnection are presented in Table 6 (element weights, element types) and Table 7 (weights of edges, e ′ = {X ′ , X ′ , X ′ , X ′ } symmetric weighted binary relation). The considered four-cluster solution is: X 1 2 3 4 ′ ′ ′ ′ where X1 = {8, 9, 13, 14}. X2 = {1, 3, 4}, X3 = {2, 5, 6, 10}, and X4 = {7, 11, 12, 15}. Proximities between cluster structures are presented in Table 8. Fig. 16 depicts the poset-like scale P 4,4 [101,103] for cluster structure, where multiset estimate of the cluster structure is: e(Xι ) = (αθ1 , αθ2 , αθ3 , αθ4 ). ☛ ✟ ☛ ✟ Maximum (4, 0, 0, 0) point ✠ ✡ ✠ ✟ ☛ (3, 1, 0, 0) ✠ ✡ PP PP P ☛ ✟☛ ✟ ′ (3, 0, 1, 0) (2, 2, 0, 0) maxι e(Xι ) ✡ ✠✡ ✠ ❳❳❳ P P PP PP ❳❳ P PP ❳✟ P ❳ ③☛ ❳ ✟ ☛ ✟☛ (1, 3, 0, 0) ✠ (3, 0, 0, 1) ✠✡ (2, 1, 1, 0)✠✡ ✡ ❳ ❳✏ ❳✏ ✏✏ ❳❳❳ ✏ ✏ ✏ ✏ ✟☛ ✏✏ ❳✟ ❳☛ ☛ ✟☛ ✟ (2, 1, 0, 1) (1, 2, 1, 0) (0, 4, 0, 0) (2, 0, 2, 0) ✡ ✠✡ ✠✡ ✠✡ ✠Reference ❳ P P PP P❳ ❳❳ structure PP ❳ PP P ❳❳✟ ✠ ❳☛ ✟☛ ✟☛ ☛ ✟ ep0 (2, 0, 1, 1) ✠✡ (1, 2, 0, 1) ✠✡ (0, 3, 1, 0) ✠✡ (1, 1, 2, 0)✠ ✡ ✘❳ ❳ ❳ ✘ P PP ✘ ❳❳❳ ✘ PP ✘✘ ❳✟ ✘ ✘ ❳☛ ☛ ✟☛ ✟☛ ✟☛ ✟ (2, 0, 0, 2) (1, 1, 1, 1) (0, 2, 2, 0) (1, 0, 3, 0) (0, 3, 0, 1) ✡ ✠✡ ✠✡ ✠✡ ✠✡ ✠ ❳ ❳ ❳✏ ✏✏ minι e(Xι′ ) ✏ ❳❳ ✏ ✏ ❳❳❳ ✏ ✟☛ ✏✟ ✏ ✏ ✟ ✟☛ ✙ ✟ ☛ ✟ ☛ (0, 2, 1, 1) ✠ (1, 1, 0, 2) (1, 0, 2, 1) (0, 1, 3, 0) ✠✡ ✡ ✠✡ ✠ ✡ ✘ ✏✏ ✏✏ ✘✘✘ ✘ ✏ ✏ ✘ ✏ ✏ ✏ ✟☛ ✏✘ ✘☛ ✟ ✟ ✟ ☛ ☛ (1, 0, 1, 2) (0, 1, 2, 1) (0, 0, 4, 0) (0, 2, 0, 2) ✡ ✠✡ ✠✡ ✠ ✠ ✘✡ P P PP PP ✘✘ ✘ ✘ PP PP ✘ ✘ ✘ ☛ ✟☛ ✟☛ ✟ (1, 0, 0, 3) (0, 1, 1, 2) (0, 0, 3, 1) ✡ ✠✡ ✠✡ ✠ ✏ ✏ ✏ ✏ ✏✏ ✏✏ ✏ ✏ ✟☛ ✟ ☛ (0, 1, 0, 3) (0, 0, 2, 2) ✡ ✠✡ ✠ ✏✏ ✏ ✏✟ ✏ ☛ (0, 0, 1, 3) ✠ ✡ ✟ Minimum ☛ point (0, 0, 0, 4) ✡ ✠ Fig. 16. Poset-like scale P 4,4 for e(Xι′ ) = (αθ1 , αθ2 , αθ3 , αθ4 ) [101,103] The resultant integrated parameters of the clusters are contained in Table 9. e′ = Finally, the following balance indices on the basis of method 1 are obtained (clustering solution X ′ ′ ′ ′ c e′ w e′ v e′ s e′ {X1 , X2 , X3 , X4 }): B (X ) = 1, B (X ) = 6.7, B (X ) = 13.9, B (X ) = 4. Further, the following reference specified parameters for clusters are considered: p|X 0 | = 4, pw0 = 12.0, pv0 = 15.0. The reference cluster structure is: ep0 = (1, 1, 2, 0). Thus, the balance indices based on method 2 are: b c (X e ′ ) = 1, B b w (X e ′ ) = 4.7, B b v (X e ′ ) = 7.3, B b s (X e ′ ) = 2. B 12 Element aj a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 aj1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 aj2 : Table 6. Parameters of elements (example from Fig. 10) Cluster number ι (Xι′ ) Element weight w(aj ) Element 2 4.2 3 5.1 2 1.1 2 2.0 3 3.1 3 3.2 4 1.0 1 3.4 1 5.0 3 0.9 4 4.5 4 4.8 1 0.8 1 3.4 4 3.7 type θ(aj ) 1 1 3 3 2 2 3 2 1 3 1 1 3 2 2 Table 7. Interconnection edge weights for example from Fig. 10 2 3 4 5 6 7 8 9 10 11 12 13 4.1 2.1 4.4 4.5 4.1 1.5 2.1 1.5 3.0 2.9 0.7 4.4 3.6 3.0 1.0 4.5 3.6 0.8 2.5 3.2 3.0 4.0 2.9 3.0 4.0 1.6 3.1 0.7 1.0 0.8 1.6 5.0 2.5 5.0 6.2 3.2 6.2 3.1 3.2 6.0 5.0 3.3 4.3 4.2 1 Table 8. Proximity for cluster structures (example Cluster Xι′1 Cluster Xι′2 : X1′ X1′ 0 X2′ 2 X3′ 0 X4′ 1 Cluster X1′ X2′ X3′ X4′ 14 15 3.2 6.0 3.3 4.3 4.2 5.0 2.5 2.5 from Fig. 10): δ(e(Xι′1 ), e(Xι′2 )) X2′ X3′ X4′ 2 0 1 0 3 4 3 0 1 4 1 0 Table 9. Parameters of clustersP (example from Fig. 10) P ηι (Xι′ ) = |Xι′ | aj ∈Xι′ w(aj ) aj1 ,aj2 ∈Xι′ v(aj1 , aj2 ) 4 12.6 21.3 3 7.3 7.7 4 12.3 15.4 4 14.0 21.6 e(Xι′ ) (1, 2, 1, 0) (1, 0, 2, 1) (1, 2, 1, 0) (2, 1, 1, 0) e ′′ = {X ′′ , X ′′ , X ′′ , X ′′ } where X ′′ = {4, 8, 9, 13, 14}. The second considered four-cluster solution is: X 1 2 3 4 1 ′′ ′′ = {1, 3}, X3 = {2, 5, 6}, and X4 = {7, 10, 11, 12, 15}. Proximities between cluster structures are presented in Table 10. The resultant integrated parameters of the clusters are contained in Table 11. X2′′ 13 e ′′ = Finally, the following balance indices on the basis of method 1 are obtained (clustering solution X e ′′ ) = 3, B w (X e ′′ ) = 9.6, B v (X e ′′ ) = 25.8, B s (X e ′′ ) = 6. {X1′′ , X2′′ , X3′′ , X4′′ }): B c (X The basic reference specified parameters for clusters are considered as for previous clustering solution e ′ ): p|X 0 | = 4, pw0 = 12.0, pv0 = 15.0. (i.e., X The reference cluster structure is: ep0 = (1, 1, 3, 0), Thus, the balance indices based on method 2 are: b c (X e ′′ ) = 2, B b w (X e ′′ ) = 6.7, B b v (X e ′′ ) = 11.9, B b s (X e ′′ ) = 4. B e ′ and X e ′′ . Table 12 contains the obtained balance indices for the considered clustering solutions X Table 10. Proximity for cluster structures (example from Cluster Xι′′1 Cluster Xι′′2 : X1′′ X2′′ X1′′ 0 5 X2′′ 5 0 X3′′ 2 3 X4′′ 1 6 Cluster X1′′ X2′′ X3′′ X4′′ No. I. 1.1. 1.2. 1.3. 1.4. II. 2.1. 2.2. 2.3. 2.4. Fig. 10): δ(e(Xι′′1 ), e(Xι′′2 )) X3′′ X4′′ 2 1 3 6 0 3 3 0 Table 11. Parameters of clustersP (example from Fig. 10) P ηι (Xι′′ ) = |Xι′′ | w(a ) j aj ∈Xι′′ aj1 ,aj2 ∈Xι′′ v(aj1 , aj2 ) 5 14.6 27.2 2 5.3 4.1 3 11.4 12.5 5 14.9 29.9 e(Xι′′ ) (1, 2, 2, 0) (1, 0, 1, 3) (1, 2, 0, 2) (2, 1, 2, 0) e ′ and X e ′′ Table 12. Balance indices of clustering solutions X e′ Description Solution X Method 1: e ′) = 1 Balance index by cluster cardinality B c (X w e′ Balance index by total cluster weight B (X ) = 6.7 e ′ ) = 13.9 Balance index by total inter-cluster edge/arc weight B v (X s e′ Balance index by cluster element structure B (X ) = 4 Method 2: b c (X e ′) = 1 Balance index by cluster cardinality B b w (X e ′ ) = 4.7 Balance index by total cluster weight B v e′ b Balance index by total inter-cluster edge/arc weight B (X ) = 7.3 b s (X e ′) = 2 B Balance index by cluster element structure e ′′ Solution X e ′′ ) = 3 B c (X w e ′′ B (X ) = 9.6 e ′′ ) = 25.8 B v (X s e ′′ B (X ) = 6 b c (X e ′′ ) = 2 B b w (X e ′′ ) = 6.7 B v e ′′ b B (X ) = 11.9 b s (X e ′′ ) = 4 B 6.3. Cluster structure based balanced clustering for student teams The considered numerical example is a modification of an example from [104]. There is a set of 13 students A = {a1 , ..., aj , ..., a13 } (Table 13) in the field of radio engineering. Four inclination/skill properties of the students are considered as parameters/criteria (student estimates are shown in Table 13): (i) inclination (skill) for mathematics C1 , (2) inclination (skill) for theoretical radio engineering C2 , (3) skill for technical works in radio engineering (usage of radio devices, design of scheme, analysis of signals, etc.) C3 , (4) writing skill (e.g., to prepare a laboratory work report/paper) C4 . The following scale is used: [0, 1, 2, 3], where 0 corresponds to absent inclination/skill), 1 corresponds to low level of inclination/skill), 2 corresponds to medium level of inclination/skill), 3 corresponds to high level of inclination/skill). As a result, each student j (j = 1, 13) has a vector (4 component) estimate ξ(aj ) = (ξ 1 (aj ), ξ 2 (aj ), ξ 3 (aj ), ξ 4 (aj )). It is assumed, each student has as minimum one “positive” inclination/skill estimate (or more). A symmetric weighted binary relation of student friendship Rf = {ε(aj1 , aj2 )} (j1 , j2 = 1, 13) (ordinal scale [0, 1, 2, 3], 0 corresponds to incompatibility) is contained in Table 14. Some notations are as follows. The structure of cluster is Xι = {b1 , ..., bτ , ..., bµι }. Then the following cluster characteristics are examined: 1. The total vector estimate of the cluster structure is: ξ(Xι ) = (ξ 1 (Xι ), ξ 2 (Xι ), ξ 3 (Xι ), ξ 4 (Xι )), 14 where ξ κ (Xι ) = maxτ =1,µι ξ κ (bτ ), ∀κ = 1, 4 (index of criteria/parameter). 2. The total P estimate of the cluster by quality of intercluster compatibility is: ε(Xι ) = bτ ,bτ ∈Xι ,bτ <bτ ε(bτ1 , bτ2 ). 1 2 1 2 Table 13. Items/students, estimates upon criteria Item (student) C1 C2 C3 C4 Vector estimate aj (ξ 1 (aj )) (ξ 2 (aj )) (ξ 3 (aj )) (ξ 4 (aj )) ξ(aj ) Student 1 (a1 ) 1 2 3 3 (1,2,3,3) Student 2 (a2 ) 0 1 2 1 (0,1,2,1) Student 3 (a3 ) 2 3 3 2 (1,3,3,2) Student 4 (a4 ) 2 2 1 3 (3,2,1,3) Student 5 (a5 ) 0 1 2 1 (0,1,2,1) Student 6 (a6 ) 3 3 3 3 (3,3,3,3) Student 7 (a7 ) 0 1 1 1 (0,1,1,1) Student 8 (a8 ) 0 2 2 2 (0,2,2,2) Student 9 (a9 ) 3 3 3 3 (3,3,3,3) Student 10 (a10 ) 3 3 2 3 (3,3,2,3) Student 11 (a11 ) 0 1 3 2 (0,1,3,2) Student 12 (a12 ) 0 2 3 1 (0,2,3,1) Student 13 (a13 ) 0 1 1 1 (0,1,1,1) Table 14. Ordinal estimates of aj1 / aj2 a2 a3 a4 a1 2 3 3 a2 2 3 a3 3 a4 a5 a6 a7 a8 a9 a10 a11 a12 student friendship (compatibility) Rf = {ε(aj1 , aj2 )} a5 a6 a7 a8 a9 a10 a11 a12 a13 3 3 1 2 2 2 2 3 2 1 2 3 2 0 0 2 2 1 3 3 2 3 3 3 3 3 2 1 3 3 2 3 0 3 3 2 3 1 1 2 2 2 3 1 1 1 2 0 3 3 3 3 3 3 2 2 3 3 3 2 3 3 3 2 3 1 2 3 2 3 3 3 The clustering problem can be considered as the following: e = {X1 , ..., Xι , ..., Xλ }) (i.e., a set of student teams as clusters/groups Find the clustering solution X without intersection) for implementation of special laboratory work(s) (e.g., in radio engineering) while taking into account some requirements: (a) constraints for the number of elements (students) in each cluster (i.e., cluster cardinality): ηmin ≤ |Xι |; (b) constraint for total inclination/skill in the cluster: ξ(Xι )  ξ0 = (2, 3, 3, 2); e (c) the objective function 1 is to minimize the balance index by cluster cardinality B c (X); (d) the objective function 2 is to maximize (multicriteria case) the worst cluster structure estimate; (e) the objective function 3 is to maximize the worst inter-cluster cluster estimate of element compatibility. The version of the optimization problem for the example above can be considered as follows: e = max |Xι | − min |Xι |, min B c (X) ι=1,λ s.t. ι=1,λ 3 ≤ |Xι | ≤ 4 ∀ι = 1, λ, max min ξ(Xι ), ι=1,λ max min ε (Xι ) ι=1,λ ξ(Xι )  ξ0 = (2, 2, 3, 2) ∀ι = 1, λ. 15 The combinatorial optimization models of this kind are very complicated (i.e., NP-hard). Thus, enumerative algorithms or heuristics (metaheuristics) are used. Now, it is reasonable to describe a simplified heuristic (for the example above): Stage 1. Counting an approximate number of clusters (e.g., 4). Stage 2. Selection of the most important criteria: 1st choice: criterion 3, 2nd choice: criterion 2. Stage 3. Selection of the best elements (about 4) from the viewpoints of the selected criteria (e.g., by Pareto-rule) as kernels (“domain(s) leaders”) of the future clusters/teams. In general, small cliques or quasi-cliques can be considered as the kernels. In the example, the elements are: a1 , a3 , a6 , a9 . Stage 4. Extension of each kernel above by other elements while taking into account element compatibile = {X1 , X2 , X3 , X4 } (B c (X) e = 1), ity. As a result, the following clustering solution can be considered: X where the clusters are: (i) X1 = {a1 , a2 , a4 }, ξ(X1 ) = (2, 2, 3, 3), ε(X1 ) = 8; (ii) X2 = {a3 , a7 , a8 }, ξ(X2 ) = (2, 3, 3, 2), ε(X2 ) = 8; (iii) X3 = {a6 , a5 , a11 }, ξ(X3 ) = (3, 3, 3, 3), ε(X3 ) = 8; (iv) X4 = {a9 , a10 , a12 , a13 }, ξ(X4 ) = (3, 3, 3, 3), ε(X4 ) = 15. e = 7. Note, balance index by total inter-cluster edge weight is B v (X) e = {X1 , X2 , X3 , X4 } (edge weight/compatibility Fig. 17 depicts the obtained four clusters solution X estimates are pointed out). Cluster X1 a2 s ✁❆ 2✁ ❆ 3 ✁ ❆s a a1 s❡ 4 3 Cluster X2 a7 s ✁❆ 2✁ ❆ 3 ✁ ❆s a a3 s❡ 8 3 Cluster X3 a5 s ✁❆ 3✁ ❆ 2 a6 ✁s❡ 3 ❆sa11 Fig. 17. Clustering solution X4 a10Cluster s sa12 ◗ ✑ ◗ 3 ✑ ◗✑ 2 3 3 3✑ ◗ s❡ ◗s ✑ a9 a13 1 7. Conclusion The paper describes the author preliminary outline of various combinatorial balancing problems including new balance indices for clustering solutions, multicriteria combinatorial models and examples. It may be reasonable to point out some prospective future research directions: (1) special investigation of balance indices for balanced structures (degree of balance, etc.); (2) study of various balancing problems in combinatorial optimization (e.g., balanced knapsack-like problems, balanced allocation problems, balanced bin packing problems); (3) taking into account uncertainty in the balancing models; (4) examination of balancing clustering problems in networking (e.g., design of multi-layer communication networks, routing); (5) study of augmentation approaches to balance structures while taking into account the improvement of the structures balance; and (6) usage of the described approaches in CS/engineering education. 8. Acknowledgments The research was done in Institute for Information Transmission Problems of Russian Academy of Sciences and supported by the Russian Science Foundation (grant 14-50-00150, “Digital technologies and their applications”). REFERENCES 1. A.A. Abbasi, M. Younis, A survey on clustering algorithms for wireless sensor networks. Comp. Commun., 30(14-15), 2826–2841, 2007. 2. G.M. Adelson-Velsky, E.M. Landis, An algorithm for the organization of information. Soviet Math. Doklady, 3, 1259–1263, 1962. 16 3. A.V. Aho, J.E. Hopcroft, J.D. Ullman, Data Structures and Algorithms. Addison-Wesley, Readings, MA, 1983. 4. J. Akiyama, D. Avis, C. Chvatal, H. Era, Balancing sign graphs. Discr. Appl. Math., 3(4), 227–233, 1981. 5. M. Amen, Heuristic methods for cost-oriented assembly line balancing: a comparison on solution quality and computing time. Int. J. of Prod. Res., 69, 255–264, 2001. 6. M. Amen, Cost-oriented assembly line balancing: Model formulations, solution difficulty, upper and lower bounds. EJOR, 168(3), 747–770, 2006. 7. A. Amir, J. Ficler, R. Krauthgamer, L. Roditty, O.S. Shalom, Multiply balanced k-partitioning. In: LATIN14, pp. 586–597, 2014. 8. K. Andreev, H. Racke, Balanced graph partitioning. Theory of Comput. Syst., 39(6), 929–939, 2006. 9. C. Andres, C. Miralles, R. Pastor, Balancing and scheduling tasks in assembly lines with sequencedependent setup times. EJOR, 187(3), 1212–1223, 2008. 10. N.S. Argyres, B.S. Silverman, R&D, organization structure, and the development of corporate technological knowledge. Strategic Management J., 25(8-9), 929–958, 2004. 11. Y. Azar, A.Z. Broder, A.R. Karlin, E. Upfal, Balanced allocations. SIAM J. on Computing, 29(1), 180–200, 1999. 12. D.A. Bader, H. Meyerhenke, P. Sanders, D. Wagner (eds), Graph Partitioning and Graph Clustering. AMS, 2013. 13. J.-L. Baer, B. Schwab, A comparison of tree-balancing algorithms. Commun. of the ACM, 29(5), 322–330, 1977. 14. A. Balakrishnan, T. Magnanti, P. Mirchandani, A dual-based algorithm for multi-level network design. Manag. Sci., 40(5), 567–581, 1994. 15. M.M. Baldi, G. Perboli, R. Tadei, The three-dimensional knapsack problem with load balancing. Appl. Math. Comput., 218(19), 9802–9818, 2012. 16. C.Y. Baldwin, K.B. Clark, Design Rules: The Power of Modularity. MIT Press, Cambridge, Mass., 2000. 17. M.L. Balinski, G. Demange, Algorithms for proportional matrices in reals and integers. Math. Programming, 45, 193–210, 1989. 18. J. Bar-Ilan, G. Kortsarz, D. Peleg, How to allocate network centers. J. of Algorithms, 15(3), 385–415, 1993. 19. S. Basu, I. Davidson, K. Wagstaff (eds), Constrained Clustering: Advances in Algorithms, Theory, and Applications. CRC Press, 2008. 20. R. Bayer, E. McCreight, Organization and maintenance of large ordered indexes. Acta Informatica, 1(3), 173–189, 1972. 21. R. Bayer, Symmetric binary B-Trees: Data structure and maintenance algorithms. Acta Informatica, 1(4), 290–306, 1972. 22. I. Ben-Arroyo Hartman, Berge’s conjecture on directed path partitions - A survey. Discrete Math., 306(19-20), 2498–2514, 2006. 23. U. Benlic, J.K. Hao, An effective multilevel tabu search approach for balanced graph partitioning. Comp. and Oper. Res., 38(7), 1066–1075, 2011. 24. P. Berenbrink, A. Czumaj, A. Steger, B. Vocking, Balanced allocations: The heavily loaded case. In: Proc. of the 32rd Annual ACM Symp. on Theory of Computing (STOC), pp. 745–754, 2000. 25. C. Berge, Balanced matrices. Mathematical Programming, 2(1), 19–31, 1972. 26. C. Berge, k-optimal partitions of a directed graph. Eur. J. Comb., 3(2), 97–101, 1982. 27. E. Berger, I. Ben-Arroyo Hartman, Proof of Berge’s strong path partition conjecture for k = 2. Eur. J. of Combinatorics, 29(1), 179–192, 2008. 28. R. van Bevern, A.E. Feldmann, M. Sorge, O. Suchy, On the parameterized complexity of computing balanced partitions in graphs. Theory of Comput. Syst., 57(1), 1–35, 2015. 29. R. van Bevern, R. Bredereck, M. Chopin, S. Hartung, F. Huffner, A. Nichterlein, O. Suchy, Fixed-parameter algorithms for DAG partitioning. Electr. prepr., 33 p., Nov. 27, 2016. http://arxiv.org/abs/1611.08809 [cs.DS] 30. J. Bhasker, The clique-partitioning problem. Computers & Math. with Appl., 22(6), 1–11, 1991. 31. C.-E. Bichot, P. Siarry (eds), Graph Partitioning, Wiley-ISTE, 2013. 17 32. K. Biswas, V. Muthekkumarasamy, E. Sithirasenan, Maximal clique based clustering scheme for wireless sensor networks. In: 2013 Eight Int. Conf. on Intelligent Sensors, Sensor Networks and Information Processing, pp. 237–241, 2013. 33. A. Bonivento, C. Fischione, L. Necchi, F. Pianegiani, A. Sangiovanni-Vincentelli, System level design for clustered wireless sensor networks. IEEE Trans. Ind. Inf., 3(3), 202–214, 2007. 34. S. Borgwardt, S. Onn, Efficient solutions for weighted-balanced partitioning problems. Discr. Optim., 21, 71–84, 2016. 35. P.A. Borisovsky, X. Delorme, A. Dolgui, Balancing reconfigurable machining lines via a set partitioning model. Int. J. of Prod. Res., 52(13), 4052–4036, 2014. 36. N. Boysen, M. Fliedner, A. Scholl, A classification of assembly line balancing problems. EJOR, 183(2), 674–693, 2007. 37. N. Boysen, M. Fliedner, A. Scholl, Assembly line balancing: Which model to use when. Int. J. of Prod. Res., 111(2), 509–528, 2008. 38. A. Buluc, H. Meyerhenke, I. Safro, P. Sanders, C. Schulz, Recent advances in graph partitioning. Electr. prepr., 37 p., Feb 3, 2015. http://arxiv.org/abs/1311.3144 [cs.DS] 39. V. Cardellini, M. Colajanni, S.Yu. Philip, Dynamic load balancing on web-server systems. IEEE Internet Computing, 3(3), 28–39, 1999. 40. D. Cartwright, F. Harary, Structural balance: A generalization of Heider’s theory. Psychol. Rev., 63, 277–293, 1956. 41. Y. Censor, S.A. Zenios, Interval-constrained matrix balancing. Linear Algebra and Its Applications, 150, 393–421, 1991. 42. R.-S. Chang, J.-S. Chang, P.-S. Lin, An ant algorithm for balanced job scheduling in grids. Future Generation Computer Systems, 25(1), 20–27, 2009. 43. I. Charon, O. Hudry, A branch and bound method for a clique partitioning problem. In: Extended Abstracts of 9th Cologne-Twente Workshop on Graphs and Combinatorial Optimization, Cologne, Germany, May 25-27, CTW 2010, pp. 43–46, 2010. 44. H. Cheng, S. Yang, Genetic algorithms with elitism-based immigrants for dynamic load balanced clustering problem in mobile ad hoc networks. In: 2011 IEEE Symp. on Computational Intelligence in Dynamic and Uncertain Environments (CIDUE), pp. 1–7, 2011. 45. T.C.K. Chou, J.A. Abraham, Load balancing in distributed systems. IEEE Trans. on Software Engrg., 8(4), 401–412, 1982. 46. Y.C. Chow, W.H. Kohler, Models for dynamic load balancing in a heterogeneous multiple processor system. IEEE Trans. on Comp., 28(5), 354–361, 1979. 47. M. Conforti, G. Cornuejols, K. Vuskovic, Balanced matrices. In: K. Aardal, G.L. Nemhauser, R. Weismantel (eds), Handbooks in Operations Research and Management Science, Elsevier, vol. 12, pp. 277–319, 2005. 48. R.W. Conway, W.L. Maxwell, L.W. Miller, Theory of Scheduling. Addison-Wesley, Readings, Mass., 1967. 49. T.H. Cormen, C.E. Leiserson, R.L. Rivest, Introduction to Algorithms. 3rd ed., MIT Press and McGraw-Hill, 2009. 50. T. Cour, P. Srinivasan, J. Shi, Balanced graph matching. In: Neural Information Processing Systems (NIPS), pp. 313–320, 2006. 51. J. Current, C. ReVelle, J. Cohon, The hierarchical network design problem. EJOR, 27(1), 57–66, 1986. 52. G. Cybenko, Dynamic load balancing for distributed memory multiprocessors. Paral. Distr. Comput., 7, 279–301, 1989. 53. A. Czumaj, C. Riley, C. Scheideler, Perfectly balanced allocation. In: Proc. of the 7th Int. Workshop on Randomized and Approximation Techniques in Computer Science (RAN-DOM’03), pp. 240–251, 2003. 54. J. Dai, S. Wang, Clustering-based interference management in densely deployment femtocell networks. Digital Commun. and Netw., 2(4), 175–183, 2016. 55. A.P. Davies, E.E. Bischoff, Weight distribution considerations in container loading. EJOR 114(3), 509–527, 1999. 56. J.A. Davis, Clustering and structural balance in graphs. Human Relations, 20(2), 181–187, 1967. 18 57. P. Dell’Olmo, M.G. Speranza, Approximation algorithms for partitioning small items in unequal bins to minimize the total size. Discr. Appl. Math., 94(1-3), 181–191, 1999. 58. P. Dell’Olmo, P. Hansen, S. Pallottino, G. Storchi, On uniform k-partition problem. Discr. Appl. Math., 150(1–3), 121–139, 2005. 59. R. Diekmann, R. Preis, F. Schlimbach, C. Walshaw, Aspect ratio for mesh partitioning. In: Proc. of Euro-Par’98, LNCS 1470, Springer, pp. 347–351, 1998. 60. R. Diekmann, R. Preis, F. Schlimbach, C. Walshaw, Shape-optimized mesh partitioning and load balancing for parallel adaptive FEM. Paral. Comput., 26, 1555–1581, 2000. 61. A. Dolgui, Balancing assembly and transfer lines. EJOR, 168(3), 663–665, 2006. 62. A. Dolgui, N. Guschinsky, G. Levin, A special case of transfer lines balancing by graph approach. EJOR, 168(3), 732–746, 2006. 63. P. Erdos, R. Faudree, E.T. Ordman, Clique partitions and clique coverings. Discr. Math., 72, 93–101, 1988. 64. E. Erel, S.C. Sarin, A survey of the assembly line balancing procedures. Production Planning and Control, 9(5), 414–434, 1998. 65. S.K. Ethiraj, D. Levinthal, Modularity and innovation in complex systems. Manag. Sci. 50(2), 159– 173, 2004. 66. G. Even, J. Naor, S. Rao, B. Schieber, Fast approximate graph partitioning algorithms. SIAM J. on Comput., 28(6), 2187–2214, 1999. 67. U. Faigle, W. Kern, On some approximately balanced combinatorial cooperative games. Zeitschrift fur Operations Research, 38(2), 141–152, 1993. 68. A.E. Feldmann, Balanced partitioning of grids and related graphs: a theoretical study of data distribution in parallel finite element model simulation. Cuvilier ETH Zurich, 2012, 69. A.E. Feldmann, Fast balanced partitioning is hard even on grids and trees. Theor. Comp. Sci., 485, 61–68, 2013. 70. A.E. Feldmann, Fixed parameter approximations for k-center problems in low highway dimension graphs. Electr. prepr., 15 p., May 9, 2016. http://arxiv.org/abs/1605.02530 [cs.DS] 71. A.E. Feldmann, L. Foschini, Balanced partitions of trees and applications. Algorithmica, 71(2), 354– 376, 2015. 72. T.A. Feo, M. Khellaf, A class of bonded approximation algorithms for graph partitioning. Networks, 20(2), 181–195, 1990. 73. T.A. Feo, O. Goldschmidt, M. Khellaf, One-half approximation algorithms for the k-partition problem. Oper. Res., 40, 170–173, 1992. 74. Y.-G. Fu, J. Zhou, L. Deng, Yi-Ge Fu, Jie Zhou, Lei Deng, Surveillance of a 2D plane area with 3D deployment cameras. Sensors, 14(2), 1988–2011, 2014. 75. M.R. Garey, D.S. Johnson, Computers and Intractability. The Guide to the Theory of NPCompleteness. W.H. Freeman and Company, San Francisco, 1979. 76. B. Goldengorin, D. Ghosh, A multilevel search algorithm for the maximization of submodular functions applied to the quadratic cost partition problem. J. of Glob. Optim., 32(1), 65–82, 2005. 77. G. Gupta, M. Younis, Load-balanced clustering of wireless sensor networks. In: IEEE Int. Conf. on Communications ICC’03, vol. 3, pp. 1848–1852, 2003. 78. G.R. Gupta, N.B. Shroff, Practical scheduling schemes with throughput guaranties for multi-hop wireless networks. Comp. Netw., 54(5), 766–780, 2010. 79. F. Harary, On the notion of balance in signed graph. Michigan math., 2, 143–146, 1953. 80. T.R. Hoffmann, Assembly line balancing: a set of challenging problems. Int. J. of Prod. Res., 28, 1807–1815, 1990. 81. G. Horn, B.J. Oommen, Towards a learning automata solution to the multi-constraint partitioning problem. In: 2006 IEEE Conf. on Cybernetics and Intelligent Systems, pp. 1–8, 2006. 82. E. Horowitz, S. Sahni, Computing partitions with applications to the knapsack problem. J. of the ACM, 21(2), 277–292, 1974. 83. J. Hromkovic, B. Monien, The bisection problem for graphs of degree 4 (configuring transputer systems). In: 16th Symp. on Mathematical Foundations of Computer Science (MFCS), LNCS 520, Springer, pp. 211–220, 1991. 84. N. Israr, A. Awan, Coverage based inter-cluster communication for load-balancing in heterogeneous 19 wireless sensor networks. Telecommun. Syst., 38, 121–132, 2008. 85. X. Ji, J.E. Mitchell, Branch-and-price-and-cut on the clique partitioning problem with minimum clique size requirements. Discr. Optim., 4(1), 87–102, 2007. 86. A. Jose, M. Tollenaere, Modular and platform methods for product family design: literature analysis. J. Intell. Manuf. 16, 371–390, 2005. 87. N. Jozefowiez, F. Semet, E.G. Talbi, An evolutionary algorithm for the vehicle routing problem with route balancing. EJOR, 195(3), 761–769, 2009. 88. P.L. Karlton, S.H. Fuller, R.E. Scroggs, E.B. Kaehler, Performance of height-balanced trees. Commun. of the ACM, 19(1), 23–28, 1976. 89. A.V. Kel’manov, S.A. Khamidullin, V. I. Khandeev, L. V. Mikhailova, An approximation algorithm for one NP-hard problem of partitioning a sequence into clusters with restrictions on their cardinalities. In: Book of abstracts of the 11th Int. Conf. “Intelligent Data Processing” (IDP-2016), pp. 72–73, 2016. 90. K. Kenthapadi, R. Panigrahy, Balanced allocation on graphs. In: Proc. of the Seventeenth Annual ACM-SIAM Symp. on Discrete Math., SIAM, pp. 434–443, 2006. 91. A.W. Khan, A.H. Abdullah, M.H. Anisi, J.I. Bangash, A comprehensive study of data collection schemes using mobile sinks in wireless sensor networks. Sensors, 14(2), 2510–2548, 2014. 92. J.T. Kim, D.R. Shin, New efficient clique partitioning algorithms for register-transfer synthesis of data paths. J. Korean Phys. Soc., 40, 754–758, 2002. 93. D. Knuth, The Art of computing Programming. Vol. 3: Sorting and Searching, 3rd ed., AddisonWesley, pp. 458—475, 1997. 94. R.E. Korf, A complete anytime algorithm for number partitioning. Artif. Intell., 106(2), 181–203, 1998. 95. R. Krauthgamer, J. Naor, R. Schwattz, Partitioning graphs into balanced components. In: Proc. of the 20th Annual ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 942–949, 2009. 96. M.N. Kritikos, G. Ioannou, The balanced cargo vehicle routing problem with time windows. Int. J. of Prod. Econ., 123(1), 42–51, 2010. 97. P. Kuila, S.K. Gupta, P.K. Jana, A novel evolutionary approach for load balanced clustering problem for wireless sensor networks. Swarm and Evolution and Computation, 12, 48–56, 2013. 98. P. Kuila, P.K. Jana, Approximation schemes for load balanced clustering in wireless sensor networks. The J. of Supercomput., 68(1), 87–105, 2014. 99. J. Leskovec, L. Backstrom, J. Kleinberg, Meme-tracking and the dynamics of the news cycle. In: Proc. of the 15th ACM SIGKDD Int. Conf. on Knowledge Discovery and Data Mining (KDD’09), pp. 497–506, 2009. 100.M.Sh. Levin, An extremal problem of organization of data. Eng. Cybern., 19(5), 87–95, 1981. 101.M.Sh. Levin, Multiset estimates and combinatorial synthesis. Electr. prepr., 30 p., May 9, 2012. http://arxiv.org/abs/1205.2046 [cs.SY] 102.M.Sh. Levin, Towards design of system hierarchy (research survey). Electr. prepr., 36 p., Dec. 7, 2012. http://arxiv.org/abs/1212.1735 [math.OC] 103.M.Sh. Levin, Modular System Design and Evaluation, Sprigner, 2015. 104.M.Sh. Levin, Towards combinatorial clustering: preliminary research survey. Electr. prepr., 102 p., May 28, 2015. http://arxiv.org/abs/1505.07872 [cs.AI] 105.M.Sh. Levin, On combinatorial clustering: literature review, methods, examples. J. of Commun. Technol. and Electronics, 60(12), 1403–1428, 2015. 106.M.Sh. Levin, Data allocation on disks with solution reconfiguration (problems, heuristics). Elec. prepr., 10 p., Dec. 18, 2016. http://arxiv.org/abs/1612.04519 [cs.DC] 107.Y. Liao, H. Qi, W. Li, Load-balanced clustering algorithm with distributed self-organization for wireless sensor network. IEEE Sensors J., 13(5), 1498–1506, 2013. 108.A. Lim, B. Rodrigues, F. Wang, Zh. Xu, k-Center problem with minimum coverage. Theor. Comp. Sci., 332(1–3), 1–17, 2005. 109.F.C.H. Lin, R.M. Keller, The gradient model load balancing method. IEEE Trans. on Software Engrg., 13, 32–37, 1987. 110.X. Liu, A survey on clustering routing protocols in wireless sensor networks. Sensors, 12(8), 11113– 11153, 2012. 20 111.C.P. Low, C. Fang, J.M. Ng, Y.H. Ang, Efficient load-balanced clustering algorihtms for wireless sensor networks. Comp. Commun., 31(4), 750–759, 2008. 112.J. Ma, G.E. Okudan Kremer, A systematic literature review of modular product design (MPD) from the perspective of sustainability. Int. J. Adv. Manuf., 86(5), 1509–1539, 2016. 113.R.M. MacGegor, On Partitioning of Graphs: a Theoretical and Empirical Study. PhD thesis, Univ. of California, Berkeley, 1978. 114.K. Mathur, An integer-programming-based heuristic for the balanced loading problem. Oper. Res. Lett., 22(1), 19–25, 1998. 115.S. Mertens, A complete anytime algorithm for balanced number partitioning. Electr. prepr., 12 p., Mar. 9, 1999. http://arxiv.org/abs/9903011 [cs.DS] 116.H. Meyerhenke, P. Sanders, C. Schulz, Partitioning (hierarchically clustered) complex networks via size-constrained graph clustering. J. of Heuristics, 22(5), 759–782, 2016. 117.A. Molnar, A General Partition Data Model and a Contribution to the Theory of Functional Dependencies. PhD thesis, Eotvos Lorand Univer., Faculty of Informatics, Hungary, 2007. 118.C.L. Monma, T. Carpenter, Variations on Matrix Balancing for Telecommunication Demand Forecasting. Technical Report, Telcordia, 1997. 119.S.B. Musunoori, G. Horn, Ant-based approach to the quality aware application service partitioning in a grid environment. In: 2006 IEEE Int. Conf. on Evolutionary Computation, pp. 589–596, 2006. 120.S.B. Musunoori, G. Horn, Intelligent ant-based solution to the application service partitioning problem in a grid environment. In: Sixth Int. Conf. on Intelligent Systems Design and Applications, vol. 1, 416–424, 2006. 121.L.M. Ni, K. Hwang, Optimal load balancing in a multiple processor system with many job classes. IEEE Trans. on SE, 11(5), 491–496, 1985. 122.G. Nikolakopoulou, S. Kortesis, A. Synefaki, R. Kalfakakou, Solving a vehicle routing problem by balancing the vehicles time utilization. EJOR, 152(2), 520–527, 2004. 123.C. Obreque, M. Donoso, G. Gutierrez, V. Marianov, A branch and cut algorithm for the hierarchical network design problem. EJOR, 200(1), 28–35, 2010. 124.J. Oyola, A. Lokketangen, Grasp-asp: An algorithm for the cvrp with route balancing. J. of Heuristics, 20(4), 361–382, 2014. 125.V. Pandiri, A. Singh, Swarm intelligence approaches for multidepot salesmen problems with load balancing. Applied Intelligence, 44(4), 849–861, 2016. 126.J. Pattillo, S. Butenko, Clique, independent set, and graph coloring. In: J. Cochran (ed), Encyclopedia of Operations Research and Management Science, Wiley, pp. 3150–3163, 2011. 127.M. Pavan, M. Pelillo, Dominant sets and pairwise clustering. IEEE Trans. PAMI, 29(1), 167–172, 2007. 128.H. Pirkul, J. Current, V. Nagarajan, The hierarchical network design problem: A new formulation and solution procedures. Transp. Sci., 25(3), 175–182, 1991. 129.S. Raisch, Balanced structures: Designing organizations for profitable growth. Long Range Planning, 41(5), 483–508, 2008. 130.A. Rao, K. Lakshminarayanan, S. Surana, R. Karp, I. Stoica, Load balancing in structuring P2P systems. In: Int. Workshop on Peer-to-Peer Systems, Springer, pp. 68–79, 2003. 131.D.M. Rayan, J.C. Falkner, On the integer properties of scheduling set partitioning models. EJOR, 35(3), 442–456, 1988. 132.R. Rees, Minimal clique partitions and pairwise balanced designs. Discr. Math., 61(2–3), 269–280, 1986. 133.F.R. Roberts, Discrete Mathematical Models with Applications Social, Biological and Environmental Problems. Prentice Hall, Englewood Cliffs, NJ, 1976. 134.F.R. Roberts, Graph Theory and Its Applications to Problems of Society. SIAM, Philadelphia, 1976. 135.D. Saha, D. Menasce, S. Porto, Static and dynamic processor scheduling disciplines in heterogeneous parallel architectures. J. of Parallel and Distributed Computing, 28(1), 1–18, 1995. 136.T. Sawik, Balancing and scheduling of surface mount technology lines. Int. J. of Prod. Res., 40(9), 1973–1991, 2002. 137.M.H. Schneider, S.A. Zenios, A comparative study of algorithms for matrix balancing. Oper. Res., 38, 439–455, 1990. 21 138.R. Schoonderwoerd, O.E. Holland, J.L. Bruten, L.J. Rothkrantz, Ant-based load balancing in telecommunications networks. Adaptive Behavior, 5(2), 169–207, 1997. 139.W. Shang, J.A.B. Fortes, Independent partitioning of algorithms with uniform dependencies. IEEE Trans. on Computers, 41(2), 190–206, 1992. 140.F. Shang, Y. Lei, An energy-balanced clustering routing algorithm for wireless sensor network. Wir. Sens. Netw., 2(10), 777–783, 2010. 141.L.S. Shapley, On balanced sets and cores. Nav. Res. Log. Quart., 14, 453–460, 1967. 142.D. Simplot-Ryl, I. Stojmenovic, J. Wu, Energy efficient broadcasting, activity scheduling and area coverage in sensor networks. In: I. Stojmenovic (ed), Handbook of Sensor networks: Algorithms and Architectures, Wiley, pp. 343–379, 2005. 143.D.D. Sleater, R.E. Tarjan, Self-adjusting binary search trees. J. of the ACM, 32, 652–686, 1985. 144.M.M. Sorensen, Facet-defining inequalities for the simple graph partitioning polytope. Discr. Optim., 4(2), 221–231, 2007. 145.L.-H. Tsai, Asymptotic analysis of an algorithm for balanced parallel processor scheduling. SIAM J. Comput., 21(1), 59–64, 1992. 146.C. Walshaw. Variable partition inertia: Graph repartitioning and load balancing for adaptive meshes. In: M. Parashar, X. Li (eds), Advanced Computational Infrastructures for Parallel and Distributed Adaptive Applications, pp. 357-380. 2010. 147.C. Walshaw, M. Cross, Mesh partitioning: A multilevel balancing and refinement algorithm. SIAM J. on Scient. Comput., 22(1), 63-80, 2000. 148.C. Walshaw, M. Cross. Multilevel mesh partitioning for heterogeneous communication networks. Fut. Gen. Comp. Syst., 17(5), 601-623, 2001. 149.L. Wang, L. Da Xu, Z. Bi, Y. Xu, Data cleaning for RFID and WSN integration. IEEE Trans. on Industrial Informatics, 10(1), 408–418, 2014. 150.E. Yildiz, K. Akkaya, E. Sisiloglu, M. Sir, Optimal camera placement for providing angular coverage in wireless video sensor networks. IEEE Trans. on Computers, 63(7), 487–503, 2014. 151.O. Younis, S. Farmy, HEED: A hyubrid, energy-efficient, distributed clustering approach for Ad Hoc sensor networks. IEEE Trans. on Mob. Comput., 3(4), 660–669, 2004. 152.O. Younis, M. Krinz, S. Ramasubramanian, Node clustering in wireless sensor networks: Recent developments and deployment challenges. IEEE Networks, 20(3), 20–25, 2006. 153.S.A. Zenios, A. Drud, J.M. Mulvey, Balancing large social accounting matrices with nonlinear network programming. Networks, 19, 569–585, 1989. 154.M. Zhao, Y. Yang, C. Wang, Mobile data gathering with load balanced clustering and dual data uploading in wireless sensor networks. IEEE Trans. on Mob. Comput., 14(4), 770–785, 2015.
2cs.AI
Towards an Empirical Study of Affine Types for Isolated Actors in Scala Philipp Haller Fredrik Sommar KTH Royal Institute of Technology Stockholm, Sweden [email protected] KTH Royal Institute of Technology Stockholm, Sweden [email protected] LaCasa is a type system and programming model to enforce the object capability discipline in Scala, and to provide affine types. One important application of LaCasa’s type system is software isolation of concurrent processes. Isolation is important for several reasons including security and data-race freedom. Moreover, LaCasa’s affine references enable efficient, by-reference message passing while guaranteeing a “deep-copy” semantics. This deep-copy semantics enables programmers to seamlessly port concurrent programs running on a single machine to distributed programs running on large-scale clusters of machines. This paper presents an integration of LaCasa with actors in Scala, specifically, the Akka actorbased middleware, one of the most widely-used actor systems in industry. The goal of this integration is to statically ensure the isolation of Akka actors. Importantly, we present the results of an empirical study investigating the effort required to use LaCasa’s type system in existing open-source Akkabased systems and applications. 1 Introduction The desire for languages to catch more errors at compile time seems to have increased in the last couple of years. Recent languages, like Rust [15], show that a language does not have to sacrifice a lot, if any, convenience to gain access to safer workable environments. Entire classes of memory-related bugs can be eliminated, statically, through the use of affine types. In the context of this paper it is important that affine types can also enforce isolation of concurrent processes. L AC ASA [5] shows that affine types do not necessarily need to be constrained to new languages: it introduces affine types for Scala, an existing, widely-used language. L AC ASA is implemented as a compiler plugin for Scala 2.11.1 However, so far it has been unclear how big the effort is to apply L AC ASA in practice. This paper is a first step to investigate this question empirically on open-source Scala programs using the Akka actor framework [8]. Contributions This paper presents an integration of L AC ASA and Akka. Thus, our integration enforces isolation for an existing actor library. Furthermore, we present the results of an empirical study evaluating the effort to use isolation types in real applications. To our knowledge it is the first empirical study evaluating isolation types for actors in a widely-used language. Selected Related Work Active ownership [3] is a minimal variant of ownership types providing race freedom for active objects while enabling by-reference data transfer between active objects. The system is realized as an extended subset of Java. Kilim [14] combines static analysis and type checking to 1 See https://github.com/phaller/lacasa V.T. Vasconcelos and P. Haller (Eds.): Workshop on Programming Language Approaches to Concurrency- and Communication-cEntric Software (PLACES’17) EPTCS 246, 2017, pp. 3–9, doi:10.4204/EPTCS.246.3 c P. Haller & F. Sommar Towards an Empirical Study of Affine Types for Isolated Actors in Scala 4 provide isolated actors in Java. For neither of the two above systems, active ownership and Kilim, have the authors reported any empirical results on the syntactic overhead of the respective systems, unlike the present paper. SOTER [12] is a static analysis tool which infers if the content of a message is compatible with an ownership transfer semantics. This approach is complementary to a type system which enables developers to require ownership transfer semantics. Pony [4] and Rust [15] are new language designs with type systems to ensure data-race freedom in the presence of zero-copy transfer between actors/concurrent processes. It is unclear how to obtain empirical results on the syntactic overhead of the type systems of Pony or Rust. In contrast, L AC ASA extends an existing, widely-used language, enabling empirical studies. 2 Background In this paper we study affine types as provided by L AC ASA [5], an extension of the Scala programming language. L AC ASA is implemented as a combination of a compiler plugin for the Scala 2.11.x compiler and a small runtime library. L AC ASA provides affine references which may be consumed at most once. In L AC ASA an affine reference to a value of type T has type Box[T]. The name of type constructor Box indicates that access to an affine reference is restricted. Accessing the wrapped value of type T requires the use of a special open construct: 1 2 val box: Box[T] = ... box open { x => /* use ‘x‘ */ } open is implemented as a method which takes the closure { x => /* use ‘x‘ */ } as an argument. The closure body then provides access to the object x wrapped by the box of type Box[T]. However, L AC ASA restricts the environment (i.e., the captured variables) of the argument closure in order to ensure affinity: mutable variables may not be captured. Without this restriction it would be simple to duplicate the wrapped value, violating affinity: 1 2 3 4 5 6 val box: Box[T] = ... var leaked: Option[T] = None box open { x => leaked = Some(x) // illegal } val copy: T = leaked.get L AC ASA also protects against leaking wrapped values to global state: 1 2 3 4 5 6 7 8 9 10 11 12 obje t Global { var cnt: LeakyCounter = null } lass LeakyCounter { var state: Int = 0 def increment(): Unit = { state += 1 } def leak(): Unit = { Global.cnt = this } ... } val box: Box[LeakyCounter] = ... // illegal box open { cnt => cnt.leak() } val copy: LeakyCounter = Global.cnt The above LeakyCounter class is illegal to be wrapped in a box. The reason is that even without capturing a mutable variable within open, it is possible to create a copy of the counter, because the leak method leaks a reference to the counter to global mutable state (the Global singleton object). To prevent P. Haller & F. Sommar 5 def m[T](b: Box[T])(impli it p: CanAccess { type C = b.C }): Unit = { 1 2 3 b open { x => /* use ‘x‘ */ } } Figure 1: Boxes and permissions in L AC ASA. 1 2 3 4 5 6 7 lass Box[T] { self => type C def open(fun: T => Unit) (impli it p: CanAccess { type C = self.C }): Box[T] = { ... } } Figure 2: Type signature of the open method. this kind of affinity violation, L AC ASA restricts the creation of boxes of type Box[A] to types A which conform to the object capability discipline [11]. According to the object capability discipline, a method m may only use object references that have been passed explicitly to m, or this. Concretely, accessing Global on line 5 is illegal, since Global was not passed explicitly to method leak. In previous work [5] we have formalized the object capability discipline as a type system and we have shown that in combination with L AC ASA’s type system, affinity of box-typed references is ensured. Affine references, i.e., references of type Box[T], may be consumed, causing them to become unaccessible. Consumption is expressed using permissions which control access to box-typed references. Consuming an affine reference consumes its corresponding permission. Ensuring at-most-once consumption of affine references thus requires each permission to be linked to a specific box, and this link must be checked statically. In L AC ASA permissions are linked to boxes using path-dependent types [2]. For example, Figure 1 shows a method m which has two formal parameters: a box b and a permission p (its implicit modifier may be ignored for now). The type CanAccess of permissions has a type member C which is used to establish a static link to box b by requiring the equality type C = b.C to hold. The type b.C is a path-dependent type with the property that there is only a single runtime object, namely b, whose type member C is equal to type b.C. In order to prevent forging permissions, permissions are only created when creating boxes; it is impossible to create permissions for existing boxes. Since permissions may be consumed (as shown below), it is important that opening a box requires its permission to be available. Figure 2 shows how this is ensured using an implicit parameter [13] of the open method (line 5). Note that the shown type signature is simplified; the actual signature uses a spore type [10] instead of a function type on line 4 to ensure that the types of captured variables are immutable. Consuming Permissions Permissions in L AC ASA are just Scala implicit values. This means their availability is flow-insensitive. Therefore, changing the set of available permissions requires changing scope. In L AC ASA, calling a permission-consuming method requires passing an explicit continuation closure. The L AC ASA type checker enforces that the consumed permission is then no longer available in the scope of this continuation closure. Figure 3 shows an example. L AC ASA enforces that such continuation-passing methods do not return (see [5]), indicated by Scala’s bottom type, Nothing. Towards an Empirical Study of Affine Types for Isolated Actors in Scala 6 def m[T](b: Box[T])(cont: () => Unit)(impli it p: CanAccess { type C = b.C }): Nothing = { 1 2 3 4 5 6 7 8 9 b open { x => /* use ‘x‘ */ } consume(b) { // explicit continuation closure // permission ‘p‘ unavailable ... cont() // invoke outer continuation closure } } Figure 3: Consuming permissions in L AC ASA. 1 2 3 4 5 6 7 lass ExampleActor extends Actor { def receive = { ase msgpat1 => ... ase msgpatn => } } Figure 4: Defining actor behavior in Akka. 2.1 Akka Akka [8] is an implementation of the actor model [6, 1] for Scala. Actors are concurrent processes communicating via asynchronous messages. Each actor buffers received messages in a local “mailbox” – a queue of incoming messages. An Akka actor processes at most one incoming message at a time. Figure 4 shows the definition of an actor’s behavior in Akka. The behavior of each actor is defined by a subclass of a predefined Actor trait. The ExampleActor subclass implements the receive method which is abstract in trait Actor. The receive method returns a message handler defined as a block of pattern-matching cases. This message handler is used to process each message in the actor’s mailbox. The Actor subclass is then used to create a new actor as follows: 1 2 val ref: ActorRef = system.actorOf(Props[ExampleActor], "example-actor") ref ! msg The result of creating a new actor is a reference object (ref) of type ActorRef. An ActorRef is a handle that can be used to send asynchronous messages to the actor using the ! operator (line 2). 3 Integrating L AC ASA and Akka The Adapter The LaCasa-Akka adapter2 is an extension on top of Akka. During its design, an important constraint was to keep it separate from Akka’s internals – primarily to limit the effect of internal changes as Akka evolves. The adapter consists of two parts: SafeActor[T] and SafeActorRef[T], both with the same responsibilities as their counterparts in the Akka API. However, note that in contrast to the latter, they are generic over the message type. Akka instead relies on pattern matching to discern the types of received 2 See https://github.com/fsommar/lacasa/tree/akka P. Haller & F. Sommar 7 trait SafeActor[T] extends Actor { def receive(msg: Box[T])(impli it acc: CanAccess { type C = msg.C }): Unit 1 2 3 } Figure 5: Usage of L AC ASA’s boxes and permissions in SafeActor. Program ThreadRing Chameneos Banking Average LOC (Scala/Akka) 130 143 118 130 LOC (L AC ASA/Akka) 153 165 135 151 Changes 27 add./10 del. 26 add./7 del. 27 add./12 del. Changes (%) 28.5% 23.1% 33.1% 28.2% Table 1: Results of the empirical study. messages (see Section 2.1). For the LaCasa-Akka adapter, however, it is necessary to know the types of messages at compile time, to prevent the exchange of unsafe message types. SafeActor A subclass of Akka’s Actor, SafeActor provides a different receive method signature, which is the primary difference between the two. Instead of receiving an untyped message, of type Any, SafeActor[T] receives a boxed message of type T, and an access permission for the contents of the box (see Figure 5). SafeActorRef The API for SafeActorRef is a wrapper of Akka’s ActorRef, and contains a subset of the latter’s methods and functionality. It uses the same method names, but method signatures are different, to include necessary safety measures. For every method accepting a box, there is a dual method accepting a box and a continuation closure. Recall that it is the only way to enforce that boxes are consumed (see Section 2). The dual methods use the AndThen suffix to indicate that they accept a continuation closure. For message types that are immutable, the API can be significantly simplified, resembling that of a regular Akka ActorRef. Meanwhile, internally, the message is still boxed up and forwarded for handling by the SafeActor. Importantly, though, the box does not have to be consumed, enabling the method to return and continue execution – removing the need for the AndThen family of methods. 4 Empirical Study We converted several Scala/Akka programs to use the LaCasa-Akka adapter described in Section 3. The goal of this conversion is to evaluate the effort required to use L AC ASA’s type system in practice. The converted programs are part of the Savina actor benchmark suite [7]. Concretely, we converted the following programs: (1) In ThreadRing, an integer token message is passed around a ring of N connected actors. This benchmark is adopted from Theron [9]; (2) Chameneos is a micro-benchmark measuring the effects of contention on shared resources while processing messages; (3) Banking is a bank transaction micro-benchmark measuring synchronous request-response with interfering transactions. Table 1 shows the results. On average 28.2% of the lines of code of each program needed to be changed (we exclude changes to imports). It is important to note that we expect this number to be significantly lower for larger applications where sequential, non-actor-based code dominates the code Towards an Empirical Study of Affine Types for Isolated Actors in Scala 8 base. The most important reasons for code changes are (a) the declaration of safe message classes and (b) the insertion and removal of messages into/from boxes. For example, in ThreadRing 33.3% of added lines are due to declaring message classes as safe. 5 Conclusion L AC ASA extends Scala’s type system with affine types, with applications to race-free concurrent programming and safe off-heap memory management. This paper shows how L AC ASA can ensure the isolation of actors in Akka, a widely-used actor framework for Scala, while providing safe and efficient ownership transfer of asynchronous messages. According to our empirical study, adjusting existing Akka-based Scala programs requires changing 28.2% of the lines of code on average. However, this initial result represents a worst-case scenario, since the study only considered micro-benchmarks where actor-related code dominates, unlike larger real-world applications. An empirical study extending our results to medium-to-large open-source code bases is ongoing. References [1] Gul A. Agha (1986): ACTORS: A Model of Concurrent Computation in Distributed Systems. Series in Artificial Intelligence, The MIT Press, Cambridge, Massachusetts. [2] Nada Amin, Samuel Grütter, Martin Odersky, Tiark Rompf & Sandro Stucki (2016): The Essence of Dependent Object Types. In: A List of Successes That Can Change the World, Springer, pp. 249–272, doi:10. 1007/978-3-319-30936-1_14. [3] Dave Clarke, Tobias Wrigstad, Johan Östlund & Einar Broch Johnsen (2008): Minimal Ownership for Active Objects. In: APLAS, Springer, pp. 139–154, doi:10.1007/978-3-540-89330-1_11. [4] Sylvan Clebsch, Sophia Drossopoulou, Sebastian Blessing & Andy McNeil (2015): Deny capabilities for safe, fast actors. In: AGERE!@SPLASH, ACM, pp. 1–12, doi:10.1145/2824815.2824816. [5] Philipp Haller & Alex Loiko (2016): LaCasa: Lightweight affinity and object capabilities in Scala. In: OOPSLA, ACM, pp. 272–291, doi:10.1145/2983990.2984042. [6] Carl Hewitt, Peter Bishop & Richard Steiger (1973): A Universal Modular ACTOR Formalism for Artificial Intelligence. In: IJCAI, William Kaufmann, pp. 235–245. [7] Shams Mahmood Imam & Vivek Sarkar (2014): Savina - An Actor Benchmark Suite: Enabling Empirical Evaluation of Actor Libraries. In: AGERE!@SPLASH, ACM, pp. 67–80, doi:10.1145/2687357.2687368. [8] Lightbend, Inc. (2009): Akka. http://akka.io/. [9] Ashton Mason (2012): The ThreadRing benchmark. http://www.theron-library.com/index.php? t=page&p=threadring. [10] Heather Miller, Philipp Haller & Martin Odersky (2014): Spores: A Type-Based Foundation for Closures in the Age of Concurrency and Distribution. In: ECOOP, Springer, pp. 308–333, doi:10.1007/ 978-3-662-44202-9_13. [11] Mark Samuel Miller (2006): Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control. Ph.D. thesis, Johns Hopkins University, Baltimore, Maryland, USA. [12] Stas Negara, Rajesh K. Karmani & Gul A. Agha (2011): Inferring ownership transfer for efficient message passing. In: PPOPP, ACM, pp. 81–90, doi:10.1145/1941553.1941566. [13] Bruno C. d. S. Oliveira, Tom Schrijvers, Wontae Choi, Wonchan Lee & Kwangkeun Yi (2012): The implicit calculus: a new foundation for generic programming. In: PLDI, ACM, pp. 35–44, doi:10.1145/2254064. 2254070. P. Haller & F. Sommar 9 [14] Sriram Srinivasan & Alan Mycroft (2008): Kilim: Isolation-Typed Actors for Java. In: ECOOP, Springer, pp. 104–128, doi:10.1007/978-3-540-70592-5_6. [15] Aaron Turon (2017): Rust: from POPL to practice (keynote). In: POPL, ACM, p. 2, doi:10.1145/3009837. 3011999.
6cs.PL
Fibred product of commutative algebras: generators and relations arXiv:1307.2192v3 [math.AG] 13 Jul 2016 Nadezda V. TIMOFEEVA P.G. Demidov Yaroslavl’ State University Sovetskaya str. 14, 150000 Yaroslavl’, Russia e-mail: [email protected] The method of direct computation of universal (fibred) product in the category of commutative associative algebras of finite type with unity over a field is given and proven. The field of coefficients is not supposed to be algebraically closed and can be of any characteristic. Formation of fibred product of commutative associative algebras is an algebraic counterpart of gluing algebraic schemes by means of some equivalence relation in algebraic geometry. If initial algebras are finite-dimensional vector spaces the dimension of their product obeys Grassmann-like formula. Finite-dimensional case means geometrically the strict version of adding two collections of points containing some common part. The method involves description of algebras by generators and relations on input and returns similar description of the product algebra. It is ”readyto-eat” even for computer realization. The product algebra is well-defined: taking another descriptions of the same algebras leads to isomorphic product algebra. Also it is proven that the product algebra enjoys universal property, i.e. it is indeed fibred product. The input data is a triple of algebras and f2 f1 a pair of homomorphisms A1 → A0 ← A2 . Algebras and homomorphisms can be described in any fashion. We prove that for computing the fibred product it is enough to restrict to the case when fi , i = 1, 2 are surjective and describe how to reduce to surjective case. Also the way to choose generators and relations for input algebras is considered. Bibliography: 5 titles. Keywords: commutative algebras over a field, affine Grothendieck’ schemes, universal product, amalgamated sum Introduction 0.1 Motivation and General Problem For a motivating example consider affine plane A2 over a field k and two non-proportional irreducible polynomials g1 , g2 in two variables x, y over the same field. Let these polynomials have zero sets Z(g1 ) ⊂ A2 ⊃ Z(g2 ) and a set of common zeros Z(g1 , g2 ) = Z(g1 ) ∩ Z(g2 ). If k is algebraically closed Z(gi ) are irreducible curves for any gi , i = 1, 2, and 1 Z(g1 , g2 ) is a discrete collection of points. A union of curves Z(g1 ) ∪ Z(g2 ) is given by zeros of the product polynomial g1 g2 ,` i.e. Z(g1 ) ∪ Z(g2 ) = Z(g1 g2 ) and provides a simple example of amalgamated sum Z(g1 ) Z(g1 ,g2 ) Z(g2 ) of algebraic schemes Z(gi ), i = 1, 2 (precise definition will be given below). Transferring to algebraic counterpart one has k-algebras Ai = k[x, y]/(gi ), i = 1, 2 corresponding to curves Z(gi ), i = 1, 2 respectively, and the k-algebra of intersection locus A0 = k[x, y]/(g1 , g2 ). There are obvious k-algebra homomorphisms fi : Ai ։ A0 . Formation of the algebra k[x, y]/(g1 g2 ) for the union of two components provides an example of universal (fibred) product of k-algebras A1 ×A0 A2 . For our purposes it is enough to restrict by affine algebraic k-schemes of finite type, i.e. prime spectra (sets of prime ideals with natural topology and collection of local rings forming a structure sheaf on the spectrum) of commutative associative k-algebras of finite type with unity (for complete theory cf. [4, ch.2]). We focus on algebraic side and operate exclusively with underlying algebras. We describe general quotient problem in the category of algebraic schemes over a field k. The problem includes following ingredients: • a scheme X; • a subscheme R ⊂ X × X; • morphisms pi : R ⊂ X × X → X defined as composites of the immersion with the projection on ith factor. The subscheme R ⊂ X × X is said to be an equivalence relation; this means that it satisfies three requirements as follows: 1. R is reflexive, i.e. R ⊃ diag(X) where diag(X) is an image of the diagonal immersion diag : X ֒→ X × X; 2. R is symmetric, i.e. the immersion R ⊂ X × X is stable under the involution intertwining first and second factors of the product X × X; 3. R is transitive, i.e. pr13 (R × X ∩ X × R) ⊂ R where the intersection is taken in X × X × X. Here pr13 : X × X × X → X × X is the projection to the product of the 1st and 3rd factors. The question is [1, ch. 1, 4.3] to construct (if possible) the universal quotient X/R. This is an object fitting into the commutative diagram R p2 /X p1  / X/R  X such that for any other commutative square R p2 /X p1  X  /T 2 there is a unique morphism τ : X/R → T (in the appropriate category) fitting into the commutative diagram p2 /X R ✶✶ ✶✶ p1 ✶✶   ✶✶ X ◗◗◗ / X/R ✶✶ ❈ ◗◗◗ ◗◗◗ ❈❈❈τ✶✶✶ ◗◗◗ ❈❈ ✶ ◗◗◗ ❈❈✶ ◗◗(!  T The best result should be to know precisely when the universal quotient exist in some category (for example, in the category of algebraic schemes) and when it does not. 0.2 Particular Cases 1. The notion of algebraic space [2] which appears when morphisms pi , i = 1, 2 assumed to be étale. In this case the object X/R belongs to the category of algebraic spaces. F 2. Open covering F of a scheme Y when X = Uα is a disjoint union of open subschemes of Y , R = Rαβ and morphisms Rαβ → Uα and Rαβ → Uβ are local isomorphisms. In this case the object X/R is the scheme Y whose open cover was considered. 3. Let the scheme X is acted upon by an algebraic group G and R is a subscheme induced by G-equivalence [3]. In this case if X/G = X/R exists its universality means that it is a categorical quotient of the scheme X by G. 0.3 Case of Several Components F Now let X be a disjoint union of schemes X = X1 X2 . Then G G G X × X = X1 × X1 X1 × X2 X2 × X1 X2 × X2 and the equivalence relation is broken into 4 disjoint components G G G R = R11 R12 R21 R22 . The problem reduces to the search of the universal completion of the diagram Rij pj / Xj pi  Xi This universal completion is called an amalgam (or ` an amalgamated sum) of schemes Xi and Xj with respect to Rij and is denoted as Xi Rij Xj . If for each pair i, j = 1, 2 the ` ` ` ` amalgam Xi Rij Xj exists then X/R = X R X = i,j (Xi Rij Xj ). 3 0.4 Schemes and algebras We recall that affine Grothendieck’ scheme of finite type over a field k is a prime spectrum Spec A of associative commutative algebra A of finite type with unity over k. Recall that the k-algebra A is said to be of finite type if it admits a surjective homomorphism of polynomial algebra in finite set of variables k[x1 , . . . , xn ] ։ A. In particular this means that algebras A under consideration can have any finite Krull dimension (if A admits an epimorphism of polynomial algebra in n variables then the Krull dimension of A is not greater than n). In this case the algebra A as k-vector space can be infinitely-dimensional. Generally, fibred product and amalgam (or product and corpoduct, or small limits) are dual categorical notions [5, 1.17,1.18] and are not obliged to exist in any category. The schemes under consideration are prime spectra of associative commutative algebras of finite type over k. Duality is done by functorial correspondence taking k-algebra to its prime spectrum. The fibred product of associative commutative k-algebras of finite type as taken by this functor to the amalgam of corresponding spectra. The functorial behavior of fibred product of algebras is analogous to one of fibred product of schemes. Despite that existence of fibred product for associative commutative algebras is known, the method of explicit computation of it is not described in the literature. We fill this gap. Let A be a commutative associative algebra of finite type with unity; then it can be represented as a quotient algebra of n-generated polynomial algebra φ : k[x1 , . . . , xn ] ։ A where n depends on the structure of A. The representing homomorphism φ corresponds to the immersion of the scheme Spec A into k-affine space An = Spec k[x1 , . . . , xn ]. By means of this immersion we interpret the abstract k-scheme Z as a closed subscheme Z ⊂ An of affine space. We call the isomorphism A ∼ = k[x1 , . . . , xn ]/ker φ (resp., the immersion Z ⊂ An ) the affine representation of the algebra A (resp., scheme Z). This is the reason why any associative commutative algebra of finite type with unity is called an affine algebra. Then the k-algebra is affine if and only if it has affine representation. Any affine algebra has many different affine representations. We prove the following result. Theorem 1. The universal (fibred) product of affine algebras of finite type over a field can be compute explicitly by means of generators and relations. The method to compute fibred products of affine algebras constitutes the main subject of this article and described below. First we fix the terminology and describe the algorithm which constructs algebra to be a universal product of algebras by means of their appropriate affine representations. Then we confirm that choice of different appropriate affine representations leads to isomorphic algebras. Finally we prove the universality and hence confirm that the obtained algebra is indeed a fibred product. I would like to thank Laboratory of Discrete and Computational Geometry for the support during my work on this article (Grant No 1.1875.2014 (No 2014/258)) and my Diploma student I. Chistousov for testing the finite-dimensional version of the method by thoroughly computing various examples. 4 1 1.1 Construction Glossary We work with polynomial rings of view k[x1 , . . . , xn ], its ideals and quotients. The basis of the ideal I is any system of generators of I as k[x1 , . . . , xn ]-module. The basis is minimal if it does not span I whenever any of elements is excluded. The k-basis of polynomial algebra (which is not obliged to be with unity) is its basis if the algebra is considered as k-vector space. The k-relation between elements of the algebra A (which is not obliged to be with unity) is a nontrivial k-linear function (nontrivial k-linear combination) in these elements which equals 0 in A. As usually, linear combinations with finite number of nonzero coefficients are considered. Fix the natural ordering of variables x1 , . . . , xn ; then we can use shorthand notation αn 1 xα for the monomial xα 1 . . . xn . The symbol α denotes the row of degrees α1 , . . . , αn . 1.2 Algorithm Reduction to surjective morphisms f2 f1 We are given three algebras A0 , A1 , A2 with morphisms A1 −→ A0 ←− A2 . Show that we can assume that both fi , i = 1, 2 are surjective. Since the morphisms fi must include into commutative squares of the form AO 0 o f2 χ2 f1 A1 o (1.1) AO 2 χ1 AT then for any such a commutative square the composite morphisms f1 ◦χ1 and f2 ◦χ2 have coincident images in A0 . By commutativity of the square im f1 ◦ χ1 = im f2 ◦ χ2 ⊂ im fi , i = 1, 2. This means that im fi ◦ χi ⊂ im f1 ∩ im f2 and the morphism χi factors through the subalgebra fi−1 (im f1 ∩ im f2 ) ⊂ Ai for i = 1, 2. Then all algebras of interest AT complete the square im f1 ∩O im f2 o o O f2′ f2 −1 (im f1 ∩ im f2 ) O f1′ f1−1 (im f1 ∩ im f2 ) o to commute. f1′ AT f2′ Denote A′1 ։ A′0 և A′2 where A′0 = im f1 ∩ im f2 , A′i = fi−1 (A′0 ) and fi′ = fi |A′i , i = 1, 2. f1′ f2′ Let there is a fibred product A′1 ×A′0 A′2 for the case A′1 ։ A′0 և A′2 . Confirm that ′ A1 ×A′0 A′2 is also a universal product for the initial arbitrary data 5 f1 f2 A1 −→ A0 ←− A2 . By the construction of algebras A′i , i = 0, 1, 2, and by the definition of the algebra A′1 ×A′0 A′2 it includes into the commutative diagram AO 0 `❆o ❆❆ ❆❆ ❆❆ ❆ 0P f2 A′0 o O : A2 tt t tt tt t t ,t A′2 O f1 A1 A′1 o ⑥ Nn ⑥⑥ ⑥ ⑥⑥ ~⑥ ⑥ A′1 ×A′0 A′2 Let AT fit into the commutative diagram (1.1). Then by the universality of A′1 ×A′0 A′2 as a product there is a unique homomorphism ϕ : AT → A′1 ×A′0 A′2 which fits in the commutative diagram AO 0 `❆o ❆❆ ❆❆ ❆❆ ❆ 0P f2 9 AO 2 ttt t t ttt , ttt f2′ A′2 A′0 o O O [✼✼ ✼✼ f1′ f1 ✼✼ ✼✼ A′1 oj❚❚❚ A′1 ×A′0 A′2 ✼✼✼ ❚❚❚❚ ✼ ⑥ Nn ❚❚❚❚ d ϕ ✼✼ ⑥⑥ ❚ ⑥ ❚ ❚ ❚❚❚❚ ✼✼✼ ⑥⑥ ❚❚❚❚ ~⑥⑥ A1 o AT This diagram provides universality of the algebra A′1 ×A′0 A′2 as a product for initial data, i.e. A′1 ×A′0 A′2 = A1 ×A0 A2 . Now we can replace everywhere our initial arbitrary data by the more special case when morphisms fi , i = 1, 2, are surjective. Easy case Assume that Ai ∼ = k[x1 , . . . , xn ]/Ii , i = 0, 1, 2, so that A0 = A1 ⊗k[x1 ,...,xn ] A2 . This assumption says that the subscheme Spec A0 ∼ = Z0 ⊂ An is an intersection of subschemes n n ∼ Z1 ⊂ A and Z2 ⊂ A , Zi = Spec Ai , i = 1, 2. Choose minimal bases in ideals Ii , i = 1, 2. Consider set of those monomials in k[x1 , . . . , xn ] which are taken to 0 in both A1 and A2 by homomorphisms f1 and f2 respectively. It is clear that if xα is such a monomial that for all β ∈ Zn≥0 the monomial 6 xα+β is taken to 0 in both A1 , A2 . Then the set of monomials under consideration generates an ideal J. Quotient algebra k[x1 , . . . , xn ]/J includes into the commutative square AO 0 o o O f2 AO 2 O f1 A1 o o k[x1 , . . . , xn ]/J Consider k-basis elements in k[x1 , . . . , xn ]/J. Since Ai are not obliged to be finitedimensional over k, k[x1 , . . . , xn ]/J can also have infinite k-basis. We form the list L of k-relations among k-basis elements of k[x1 , . . . , xn ]/J as follows. P The k-relation aα xα between elements of k[x1 , . . . , xn ]/J (possibly monomial) is include into L if and only if it equals 0 in both of A1 , A2 . It is clear that the linear span < L > is an ideal in k[x1 , . . . , xn ]/J. Now set A = (k[x1 , . . . , xn ]/J)/ < L >= k[x1 , . . . , xn ]/(J+ < L >). Remark 1. By Hilbert’s basis theorem, ideals J, < L >, and J+ < L > admit finite bases. Remark 2. If A1 and A2 finite-dimensional then dim A1 ×A0 A2 = dim A1 + dim A2 − dim A0 . This follows immediately from the algorithm described. If k is algebraically closed then length Ai = dim Ai , i = 0, 1, 2, and then length A1 ×A0 A2 = length A1 + length A2 − length A0 . Hard case How to build up affine representations of algebras A0 , A1 , A2 to validate the Easy case, i.e. such that A0 = A1 ⊗k[x1 ,...,xn ] A2 ? Start with principal ideals in A0 : only those which are maximal under inclusion are necessary. Take a generator of each such an ideal. Choose any maximal k-linearly independent subset in the set of generators chosen. Since A0 is an algebra of finite type, this subset is obliged to be finite; let it consist of s elements g1 , . . . , gs . Each element gj corresponds to the variable xj in k[x1 , . . . , xs ]. The construction done fixes a homomorphism of k-algebras h0 : k[x1 , . . . , xs ] ։ A0 . Let K0 := ker h0 . Since k[x1 , . . . , xn ] in Noetherian then K0 is finitely generated ideal. Let gj′ be one of preimages of the element gj ∈ A0 in A1 , gj′′ be one of preimages of the same element in A2 . We complete the set g1′ , . . . , gs′ to form the set of k-linearly ′ ′ ∈ A1 . Sim, . . . .gm independent generators of the algebra A1 , by adding elements gs+1 ′′ ′′ ilarly, the set g1 , . . . , gs is completed to the set of k-linearly independent generators of ′′ the algebra A2 by adding elements gm+1 , . . . , gn′′ . We put the variables xs+1 , . . . , xm in ′ ′ the correspondence to the elements gs+1 , . . . , gm and the variables xm+1 , . . . , xn to the ′′ ′′ elements gm+1 , . . . , gn . This leads to homomorphisms hi : k[x1 , . . . , xn ] ։ Ai , i = 0, 1, 2, n ≥ s defined by 7 following correspondences h0 (xj ) = gj , j = 1, . . . , s, h0 (xj ) = 0, j = s + 1, . . . , n, h1 (xj ) = gj′ , j = 1, . . . , m, h1 (xj ) = 0, j = m + 1, . . . , n, h2 (xj ) = gj′′ , j = 1, . . . , s, m + 1, . . . , n, h2 (xj ) = 0, j = s + 1, . . . , m. In particular, h0 = fi ◦ hi . Affine representations of algebras A0 , A1 , A2 and their homomorphisms f1 , f2 lead to closed immersions of their spectra into affine space An according to the following commutative diagram ♯ h2 _ ? Spec A2 AO n e▲o O ▲▲▲ ♯ ▲▲h▲0 ♯ f♯ h1 ▲▲▲ ▲3 S  2 ? ? _ Spec A1 o ♯ ? Spec A0 f1 By some modification of representing homomorphisms hi , i = 0, 1, 2, we will easily achieve that in the appropriate affine space h♯0 (Spec A0 ) = h♯1 (Spec A1 ) ∩ h♯2 (Spec A2 ). For this purpose choose any system of generators κ1 , . . . , κr of the ideal K0 (as k[x1 , . . . , xn ]module). Add to the set of variables x1 , . . . , xn additional variables (whose number equals to the number r of generators if K0 chosen) y1 , . . . , yr , and consider in A1 ′ ), algebra A1 [y1 , . . . , yr ] an ideal K0′ generated by all relations of view yl − κl (g1′ , . . . , gm l = 1, . . . , r. Then we have a commutative diagram ′ h2 / / A2 k[x1 , . . . , xn , y1 , . . . , yr ] PPP P PPP ′ f2 PPPh0 h′1 PPP   P( ( / / A0 A1 [y1 , . . . yr ]/K ′ 0 There h′i (xj ) = hi (xj ) for j = 1, . . . , n and for i = 0, 1, 2, but h′i (yj ) = 0 for i = 0, 2 and j = 1, . . . , r. Lemma 1. There is an isomorphism of k-algebras A1 [y1 , . . . yr ]/K0′ ∼ = A1 . Proof. Let K1 = ker h1 . Denote by J ′ the ideal in the ring k[x1 , . . . , xn , y1 , . . . , yr ] which is generated by relations yl − κl (x1 , . . . , xn ), l = 1, . . . , r. Obviously, J ′ ⊂ ker h′1 . The isomorphism of k[x1 , . . . , xn , y1 , . . . , yr ]-modules A1 [y1 , . . . yr ]/K0′ ∼ = A1 follows from the 8 exact diagram of k[x1 , . . . , xn , y1 , . . . yr ]-modules 0  J′ 0 ∼  / (y1 , . . . , yr ) 0  / ker h′1  / k[x1 , . . . , xn , y1 , . . . , yr ] / A1 [y1 , . . . , yr ]/K0′ 0  / K1  / k[x1 , . . . , xn ]  / A1  0  0 /0 ≀ /0 where the isomorphism J ′ ∼ = (y1 , . . . , yr ) is an isomorphism of free modules of equal ranks done by the correspondence yl − κl (x1 , . . . , xn ) 7→ yl , l = 1, . . . , r. The k-algebra isomorphism A1 [y1 , . . . yr ]/K0′ ∼ = A1 follows from the fact that the quotient algebra ′ A1 [y1 , . . . yr ]/K0′ admits the same system of generators g1′ , . . . , gm as an algebra A1 , with same relations (equal to generators of the ideal K1 ). Proposition 2. The homomorphisms h′i lead to the expression A0 = A1 ⊗k[x1 ,...,xn ,y1 ,...,yr ] A2 . Proof. To prove the proposition one needs to confirm that A0 is universal as a coproduct. ϕ1 ϕ2 Let Q be a k-algebra supplied with two homomorphisms A1 −→ Q ←− A2 such that the following diagram commutes: h′2 / / A2 ✴✴ ✴✴ f2 h′1   ✴✴✴ f1 / / A0 ✴✴ϕ2 A1 ❯❯❯❯ ✴✴ ❯❯❯❯ ❯❯❯❯ ✴✴ ❯❯❯❯ ✴ ❯❯❯❯ ϕ1 ❯❯❯❯ ✴ *Q k[x1 , . . . , xn , y1 , . . . , yr ] Commutativity of the ambient contour guarantees that ϕ1 (A1 ) = ϕ2 (A2 ) and hence we can replace Q by ϕ1 (A1 ) = ϕ2 (A2 ). However we preserve the notation Q but assume that homomorphisms ϕi are surjective. By the construction of homomorphisms h′i , the algebra A0 is generated by the images of first s variables x1 , . . . , xs . Then by the commutativity of the ambient contour ϕ1 h′1 (xj ) = ϕ2 h′2 (xj ) for j = 1, . . . , n. In particular, by the construction of homomorphisms hi (and of homomorphisms h′i built up by means of them), ϕ1 h′1 (xj ) = ϕ2 h′2 (xj ) = 0 for j = s + 1, . . . , n. For 9 j = 1, . . . s we have 0 = ϕ1 ◦ h′1 (yl − κl (xj )) = ϕ2 ◦ h′2 (yl − κl (xj )) = −ϕ2 h′2 κl (xj ) for l = 1, . . . r since h′2 (yl ) = 0. This implies that homomorphisms ϕi , i = 1, 2, factor through the algebra A0 . The homomorphism ϕ0 : A0 → Q is uniquely defined on generators h′0 (xj ) of A0 by the correspondence h0 (xj ) 7→ ϕi ◦ h′i (xj ), i = 1, 2, j = 1, . . . , s. Remark 3. Proposition 2 means that affine representations constructed are such that the intersection of images of schemes Spec A1 and Spec A2 under closed immersions into Spec k[x1 , . . . , xn , y1 , . . . , yr ] = An+r is the image of Spec A0 . Remark 4. In further considerations we use the notation of the view h h 2 1 A2 k[x1 , . . . , xn ] −→ A1 ←− assuming that homomorphisms hi . i = 1, 2, are surjective and that they admit application of the Easy case, i.e. Proposition 2 holds for them. 2 Well-Definedness and Universality 2.1 Different affine representations chosen Proposition 3. Different affine representations of algebras A0 , A1 , A2 lead to isomorphic product algebras A. Proof. Let we have two pairs of different affine representations defined by pairs of homomorphisms ′ ′ h1 h2 A1 և k[x1 , . . . , xn ] ։ A2 h2 h1 and A1 և k[x′1 , . . . , x′m ] ։ A2 such that A0 = A1 ⊗k[x′1 ,...,x′m ] A2 = A1 ⊗k[x1 ,...,xn ] A2 . They correspond to two pairs of closed immersions of prime spectra h♯1 h♯2 Spec A1 ֒→ An ←֓ Spec A2 h′2 ♯ h′1 ♯ and Spec A1 ֒→ Am ←֓ Spec A2 ♯ ♯ such that h♯1 (Spec A1 ) ∩ h♯2 (Spec A2 ) = h♯0 (Spec A0 ) and h′1 (Spec A1 ) ∩ h′2 (Spec A2 ) = ♯ h′0 (Spec A0 ). This leads to closed immersions h♯i : Spec Ai ֒→ An × Am = An+m as composites with the diagonal immersion diag: (h♯i ,h′i ♯ ) diag h♯i : Spec Ai ֒→ Spec Ai × Spec Ai −−−→ An × Am . Now confirm that in this case also h♯1 (Spec A1 ) ∩ h♯2 (Spec A2 ) = h♯0 (Spec A0 ). Homomorphisms hi are defined as composites (hi ,h′i ) k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ] −−→ g1 ⊗ g2 7 → δ →i Ai , Ai ⊗k Ai hi (g1 ) ⊗ h′i (g2 ) 7→ hi (g1 ) · h′i (g2 ). Let Q be an algebra together with two homomorphisms ϕi : Ai → Q such that ϕ1 ◦ h1 = ϕ2 ◦ h2 . To confirm that A0 = A1 ⊗k[x1 ,...,xn ]⊗k k[x′1 ,...,x′m ] A2 it is necessary 10 to construct a unique homomorphism ϕ0 : A0 → AT such that ϕi = ϕ0 ◦ fi . Consider commutative diagrams (fi ,fi ) / A0 ⊗k A0 ✻✻ ✻ δi δ0 ✻✻ ✻✻   fi ✻✻ϕ′0 / Ai ❯❯❯❯ A0 ✻✻ ❯❯❯❯ ✻✻ ❯❯❯❯ ϕ0 ✻✻ ❯ ϕi ❯❯❯❯❯ ❯❯❯❯ ✻$  ❯* Q Ai ⊗k Ai for i = 1, 2. Let for any reducible tensor x ⊗ x′ ∈ Ai ⊗k Ai (fi , fi )(x ⊗ x′ ) = x ⊗ x′ ∈ A0 ⊗k A0 ; δ0 (x ⊗ x′ ) = x · x′ ∈ A0 ; fi (x · x′ ) = x ⊗ x′ ∈ A0 ; δi (x ⊗ x′ ) = x · x′ ∈ Ai . Since by universality of the product A0 ⊗k A0 = (A1 ⊗k A1 ) ⊗k[x1 ,...,xn ]⊗k k[x′1 ,...,x′m ] (A2 ⊗k A2 ) the homomorphism ϕ′0 is uniquely defined using homomorphisms (ϕi , ϕi ) : Ai ⊗k Ai → Q : x ⊗ x′ 7→ ϕi (x) · ϕi (x′ ) as ϕ′0 (x ⊗ x′ ) = ϕi (x) · ϕi (x′ ) ∈ Q then ϕ0 : A0 → Q is also uniquely defined as ϕ0 (y) = ϕi (y) for y = fi (y), y ∈ Ai . Now it rests to form product algebras for three different affine representations k[x1 , . . . , xn ] o o λ ρ k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ] hi / / k[x′1 , . . . , x′m ] h′i hi  Ai  Ai  Ai Horizontal homomorphisms are defined by correspondences λ : x′l 7→ 0, l = 1, . . . , m and ρ : xj 7→ 0, j = 1, . . . , n respectively. Denoting by A the product algebra for hi : k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ] ։ Ai , i = 0, 1, 2, we come to the commutative diagram k[x1 , . . . , xn ] o o λ k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ] h  Aoo associated to closed immersions  An  ✤ (x1 , . . . , xn )  A / / / k[x′1 , . . . , x′m ] h′ h pA ρ p′A An × Am o  / / A′ ? _ Am , / (x1 , . . . , xn , 0, . . . , 0), (0, . . . , 0, x′1 , . . . , x′m ) o 11 ✤ (x′ , . . . , x′ ). 1 m (2.1) Vertical homomorphisms in (2.1) define affine representations for product algebras built up according to the Easy case. Lower horizontal morphisms are surjective by commutativity of the diagram (2.1). To prove isomorphicity of lower homomorphisms in (2.1) consider sections of homoρ λ morphisms k[x1 , . . . , xn ] և k[x1 , . . . , xn ]⊗k k[x′1 , . . . , x′m ] ։ k[x1 , . . . , xm ], i.e. homomorphs1 s2 isms k[x1 , . . . , xn ] ֒→ k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ] ←֓ k[x1 , . . . , xm ] defined by following rules s1 : f 7→ f ⊗ 1, s2 : g 7→ 1 ⊗ g. A nonzero element from A has nonzero preimage in k[x1 , . . . , xn ] which haves nonzero image in k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ]. This image is taken to nonzero element of at least one of algebras A1 , A2 and hence has nonzero image in A. This leads to a homomorphism of k-algebras sA : A → A. It is a section of the homomorphism pA by its construction. Now remark that sA is surjective. Indeed, one can choose a system of k-generators (which is not obliged to be a basis) in A which are images of reducible tensors f ⊗ g from k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ], f ∈ k[x1 , . . . , xn ], g ∈ k[x′1 , . . . , x′m ]. This expression is defined up to the action of k ∗ = k \ 0. A polynomial f has nonzero image at least in one of algebras A1 , A2 . Hence it is taken to nonzero element in A. Since pA ◦ sA = idA then both sA and pA are isomorphisms. Isomorphicity of p′A is proven analogously. 2.2 Universality Proposition 4. The construction of product algebra A is indeed universal, i.e. A is true fibred product. Proof. Let AT be an affine k-algebra together with two homomorphisms χi : AT → Ai , i = 1, 2 such that χ1 ◦ f1 = χ2 ◦ f2 . We construct a homomorphism ϕ to complete the diagram AT ⑤ ❇❇❇ χ χ1 ⑤⑤ ❇❇ 2 ⑤ ϕ ❇❇ ⑤⑤ ❇  }⑤⑤ f 1 f2 ! o / A2 A1 A Choose appropriate affine representations of algebras AT , A, Ai , i = 1, 2. Perform the manipulations as described in the Easy case. Namely, let J be an ideal in k[x1 , . . . , xn ] generated by all monomials taken to 0 in AT , A and Ai , i = 1, 2. Quotient algebra k[x1 , . . . , xn ]/J includes in the commutative diagram AO 1 `❅i❙i ❙❙ ❅❅ ❙❙❙❙❙ ⑤ ⑤ f1 ⑤ ❙❙❙❙ ❅❅ ⑤ χ 1 ⑤ ❅f❅1 ❙❙❙❙ ❅ ❙ ~~⑤⑤⑤ k[x1 , . . . , xn ]/J Aoo A0 `❇ AT ` ❇❇ ⑦⑦ ❦❦❦ ❇❇ χ ⑦⑦f 2 ❦❦❦❦❦❦ ⑦ ❇❇ 2 f2 ❇  ~⑦⑦⑦❦❦❦❦❦❦ u❦u ❦ A2 Choose an arbitrary element α ∈ AT ; it is taken to χ1 (α) ∈ A1 and to χ2 (α) ∈ A2 so that f1 χ1 (α) = f2 χ2 (α). Any γ of preimages of α in k[x1 , . . . , xn ]/J is also taken to 12 f1 χ1 (α) = f2 χ2 (α) ∈ A0 and to some element α ∈ A. We claim that α does not depend on the choice of γ. Choose another γ ′ ∈ k[x1 , . . . , xn ]/J taken to α, then γ − γ ′ maps to zero in AT and hence it is mapped to zero in both Ai , i = 1, 2. Then by the construction of A (cf. Easy case) γ − γ ′ is taken to zero in A. This shows that there is a homomorphism ϕ : AT → A such that χi = ϕ ◦ f i , i = 1, 2, as required. It rests to confirm ourselves that the homomorphism ϕ : AT → A does not depend on the choice of affine representations of algebras AT , Ai , i = 0, 1, 2. For this sake assume that there are two different collections of affine representations include into commutative diagrams k[x′1 , . . . , x′m ] ✿ ☎☎ ′✿✿✿ ☎ hT ✿ ☎ ✿✿  ☎☎ ✿✿h′2 h′1 ☎☎ ✿ ☎ AT ▲ ☎ ▲▲▲ ✿✿✿ ☎ rrr ☎ ▲▲▲ ✿✿ ☎ rr ▲▲▲✿✿ ☎☎ rr ☎yr☎rrr ▲%   / A2 A A1 o▲ ▲▲ ▲▲▲ rrr r r ▲▲ ▲▲▲ rrr f1 %% yyrrr f2 A0 k[x1 , . . . , xn ] ✾✾ ✾ ✆✆ ✆ hT ✾✾ ✆ ✾✾ ✆  ✆  ✾✾h2 h1 ✆✆ ✾✾ AT ▲ ✆✆ ▲ r ✾ ✆ ▲ r ✆ ▲ r ▲▲▲ ✾✾✾ ✆ rrr ✆ ▲▲▲✾✾ ✆ rr ▲%   ✆ ✆yrrr / A2 A A1 o▲ ▲▲▲ rrr ▲▲ r ▲▲▲ rr rr f2 f1 ▲▲% r r y % yr A0 (2.2) Then consider the algebra k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ] and its homomorphisms on ρ λ quotient algebras k[x1 , . . . , xn ] ←− k[x1 , . . . , xn ]⊗k k[x′1 , . . . , x′m ] −→ k[x′1 , . . . , x′m ] which ′ ′ are defined by their kernels ker λ = (x1 , . . . , xm ), ker ρ = (x1 , . . . , xn ) and correspond to ρ♯ λ♯ immersions of subspaces An ֒→ An × Am ←֓ Am as linear subvarieties. Representations (2.2) define induced affine representations for algebras AT , Ai , i = 0, 1, 2, according to the following rule: hT (xj ⊗ x′l ) = hT (xj ) · h′T (x′l ), hi (xj ⊗ x′l ) = hi (xj ) · h′i (x′l ), i = 0, 1, 2, j = 1, . . . , n, l = 1, . . . , m. This rule corresponds to the composites of immersions of prime spectra ♯ hT ♯ hi diag : Spec AT ֒→ Spec AT × Spec AT diag : Spec Ai ֒→ Spec Ai × Spec Ai (h♯T ,h′T ♯ ) ֒→ (h♯i ,h′i ♯ ) ֒→ An × Am , An × Am . Let J be the ideal generated by all monomials in k[x1 , . . . , xn ] taken to 0 in AT and in Ai , i = 0, 1, 2, J ′ be the similar ideal in k[x′1 , . . . , x′m ], and J the similar ideal in k[x1 , . . . , xn ]⊗k k[x′1 , . . . , x′m ]. Quotient algebras by these ideals include into the following commutative diagram k[x1 , . . . , xn ] o  k[x1 , . . . , xn ]/J o o λ k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ]  k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ]/J 13 ρ / k[x′1 , . . . , x′m ]  / / k[x′ , . . . , x′ ]/J ′ 1 m Now we perform the construction of homomorphisms ϕ, ϕ′ and ϕ using quotient algebras k[x1 , . . . , xn ]/J, k[x′1 , . . . , x′m ]/J ′ and k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ]/J respectively, as described in the beginning of this subsection. This yields in two commutative diagrams k[x1 , . . . , xn ]/J o o ▼▼▼ ▼▼▼ ▼▼▼ ▼▼& & ♣♣♣ ♣♣♣ ♣ ♣  ♣♣♣♣ x♣x A AT ϕ k[x1 , . . . , xn ] ⊗k k[x′1 , . . . ,x′m ]/J ❙❙❙❙ ❙❙❙❙ ❙❙❙❙ ❙❙❙❙ ❙) ) AT ❥ ❥❥ ❥ ϕ ❥❥❥❥ ❥❥ ❥❥❥❥  ❥ ❥ u ❥❥ A u❥ k[x1 , . . . , xn ] ⊗k k[x′1 , . . . , x′m ]/J ❙❙❙❙ ❙❙❙❙ ❙❙❙❙ ❙❙❙❙ ❙) ) AT ❥ ❥ ❥ ❥ ϕ ❥❥❥❥❥ ❥❥  ❥❥❥❥ ❥ ❥ ❥ u❥ A u❥ / / k[x′ , . . . , x′ ]/J ′ 1 m▼ ▼▼▼ ▼▼▼ ▼▼▼ ▼▼& & AT ♣♣♣ ♣ ♣ ♣♣  ♣♣♣♣♣ ww♣ A ϕ′ what implies that ϕ = ϕ′ = ϕ. Example 1. For example consider A1 = A2 = k[x, y]/(x2 − y), A0 = k[x]/(x2 ), with homomorphisms fi : x 7→ x, y 7→ 0, i = 1, 2. The ”occasional” affine representation used in the definition of these algebras cannot be involved to construct their product since A1 ⊗k[x,y] A2 = k[x, y]/(x2 − y) 6= A0 . Then it is necessary to form a new affine representation which fits for constructing a product, using Hard case. The algebra A0 = k[x]/(x2 ) contains unique maximal principal ideal. Its generating element x corresponds to first variable x1 and gives rise to the affine representation k[x1 ] ։ A0 , x1 7→ x. Further, manipulations according to the Hard case lead to the polynomial algebra k[x1 , x2 , x3 , y] and representations for algebras A1 = k[x1 , x2 , x3 , y]/(x21 − x2 , x3 , x21 − y), A2 = k[x1 , x2 , x3 , y]/(x21 − x3 , x2 , y). These algebras represent geometrically two parabolas with common tangent line in two 2-dimensional planes in 4-dimensional affine space. Planes meet along this tangent line. In this case A1 ⊗k[x1 ,x2 ,x3 ,y] A2 = k[x1 , x2 , x3 , y]/(x21 − x2 , x3 , x21 − y, x21 − x3 , x2 , y) = k[x1 , x2 , x3 , y]/(x21 , x2 , x3 , y) = A0 . This means that our two parabolas intersect along the subscheme defined by the algebra A0 . This validates application of Easy case to affine representations we’ve constructed. The list J of monomials vanishing in both algebras Ai , i = 1, 2, is empty. The ideal < L > has a form < L >= (x21 − x2 − x3 , x2 − y, x2 x3 ), and A1 ×A0 A2 = k[x1 , x2 , x3 , y]/ < L >= k[x1 , x2 , x3 , y]/(x21 − x2 − x3 , x2 − y, x2 x3 ) = k[x1 , x2 , x3 ]/(x21 − x2 − x3 , x2 x3 ). From the 14 geometrical point of view this is union of two parabolas having a common tangent line at the origin. Parabolas lie in different 2-planes which meet along parabolas’ common tangent line. References [1] Danilov V.I. Algebraic manifolds and schemes. (Russian) // Sovremennye Problemy Matematiki. Fundamental’nye napravleniya (Contemporary Problems of Math. Fundamental Directions) Vol. 23 (Itogi nauki i tehn. VINITI RAN USSR), 1988, 172 – 302. [2] Knutson D. Algebraic Spaces. Lecture Notes in Mathematics, 203. Springer, 1971. [3] Mumford D., Fogarty J. Geometric Invariant Theory. Second enlarged Ed. Berlin – Heidelberg – New York, Springer-Verlag, 1982. [4] Hartshorne R. Algebraic Geometry (graduate texts in Math.: 52) New York. Springer-Verlag, 1977. [5] Gel’fand S. I., Manin Yu. I. Homological algebra (Russian) (Gomologicheskaya algebra) // Sovremennye Problemy Matematiki. Fundamental’nye napravleniya (Contemporary Problems of Math. Fundamental Directions). Itogi nauki i tehn. VINITI RAN USSR Vol. 38, 1989. P. 5 – 238. 15
0math.AC
arXiv:1710.03210v1 [cs.IT] 9 Oct 2017 Joint Coordination-Channel Coding for Strong Coordination over Noisy Channels Based on Polar Codes Sarah A. Obead, Jörg Kliewer Badri N. Vellambi Department of Electrical and Computer Engineering New Jersey Institute of Technology Newark, New Jersey 07102 Email:[email protected], [email protected] Research School of Computer Science Australian National University Acton, Australia 2601 Email: [email protected] Abstract—We construct a joint coordination-channel polar coding scheme for strong coordination of actions between two agents X and Y, which communicate over a discrete memoryless channel (DMC) such that the joint distribution of actions follows a prescribed probability distribution. We show that polar codes are able to achieve our previously established inner bound to the strong noisy coordination capacity region and thus provide a constructive alternative to a random coding proof. Our polar coding scheme also offers a constructive solution to a channel simulation problem where a DMC and shared randomness are together employed to simulate another DMC. In particular, our proposed solution is able to utilize the randomness of the DMC to reduce the amount of local randomness required to generate the sequence of actions at agent Y. By leveraging our earlier random coding results for this problem, we conclude that the proposed joint coordinationchannel coding scheme strictly outperforms a separate scheme in terms of achievable communication rate for the same amount of injected randomness into both systems. I. I NTRODUCTION A fundamental problem in decentralized networks is to coordinate activities of different agents with the goal of reaching a state of agreement. Such a problem arises in a multitude of applications, including networks of autonomous robots, smart traffic control, and distributed computing problems. For such applications, coordination is understood to be the ability to arrive at a prescribed joint distribution of actions at all agents in the network. In information theory, two different notions of coordination are explored: (i) empirical coordination, which only requires the normalized histogram of induced joint actions to approach a desired target distribution, and (ii) strong coordination, where the sequence of induced joint actions must be statistically close (i.e., nearly indistinguishable) from a given target probability mass function (pmf). A significant amount of work has been devoted to finding the capacity regions of various coordination problems based on both empirical and strong coordination [1]–[10], where [4], [6]–[8], [10] focus on small to moderate network settings. This work is supported by NSF grants CCF-1440014, CCF-1439465. While all these works address the noiseless case, coordination over noisy channels has received only little attention in the literature so far. However, notable exceptions are [11]– [13]. For example, in [11] joint empirical coordination of the channel inputs/outputs of a noisy communication channel with source and reproduction sequences is considered. Also, in [12] the notion of strong coordination is used to simulate a discrete memoryless channel via another channel. Recently, [13] explored the strong coordination variant of the problem investigated in [11]. As an alternative to the impracticalities of random coding, solutions for empirical and strong coordination problems have been proposed based on low-complexity polar-codes introduced by Arikan [14], [15]. For example, polar coding for strong point-to-point coordination is addressed in [16], [17], and empirical coordination for cascade networks in [18], respectively. The only existing design of polar codes for the noisy empirical coordination case [19] is based on the joint source-channel coordination approach in [11]. However, to the best of our knowledge, polar code designs for noisy strong coordination have not been proposed in the literature. In this work we consider the point-to-point coordination setup depicted in Fig. 1 where only source and reproduction sequences are coordinated via a suitable polar coding scheme over DMCs. In particular, we design an explicit lowcomplexity nested polar coding scheme for strong coordination over noisy channels that achieves the inner bound of the two-node network capacity region of our earlier work [20]. In this work, we show that a joint coordination-channel coding scheme is able to strictly outperform a separationbased scheme in terms of achievable communication rate if the same amount of randomness is injected into the system. Note that our proposed joint coordination-channel polar coding scheme employs nested codebooks similar to the polar codes for the broadcast channel [21]. Further, our polar coding scheme also offers a constructive solution to a channel simulation problem where a DMC is employed to simulate another DMC in the presence of shared randomness [12]. The remainder of the paper is organized as follows. Sec- tion II introduces the notation, the model under investigation, and a random coding construction. Section III provides our proposed joint coordination-channel coding design and a proof to show that this design achieves the random coding inner bound. II. P ROBLEM S TATEMENT A. Notation Let N , 2n , n ∈ N. We denote the source polarization transform as Gn = RF ⊗n , where R is the bit-reversal mapping defined in [14], F = [ 10 00 ] , and F ⊗n denotes the nth Kronecker power of F. Given X 1:N , (X 1 , X 2 , . . . , X N ) and A ⊂ J1, N K, we let X N [A] denote the components X i such that i ∈ A. Given two distributions PX (x) and QX (x) defined over an alphabet X , we let D(PX (x)||QX (x)) and kPX (x) − QX (x)kT V denote the Kullback-Leibler (KL) divergence and the total variation, respectively. Given a pmf PX (x) we let min∗ (PX ) = min {PX (x) : PX (x) > 0}. B. System Model The point-to-point coordination setup considered in this work is depicted in Fig. 1. Node X receives a sequence of actions X N ∈ X N specified by nature where X N is i.i.d. according to a pmf pX . Both nodes have access to shared randomness J at rate Ro bits/action from a common source, and each node possesses local randomness M` at rate ρ` , ` = 1, 2. strong coordination-channel random code with parameters (Rc , Ro , Ra , N ) [20], where I , J1, 2N Rc K, J , J1, 2N Ro K, and K , J1, 2N Ra K, consists of 1) Nested codebooks: A codebook C of size 2N (Ro +Rc ) is generated QN i.i.d. according to a pmf PC , i.e., N Cij ∼ l=1 PC (·) for all (i, j) ∈ I × J . A codebook A is generated by randomly selecting AN ijk ∼ QN N l=1 PA|C (·|Cij ) for all (i, j, k) ∈ I × J × K. 2) Encoding functions: C N : J1, 2N Rc K×J1, 2N Ro K → C N , AN : J1, 2N Rc K×J1, 2N Ro K×J1, 2N Ra K → AN . 3) The indices I, J, K are independent and uniformly distributed over I, J , and K, respectively. These N indices select the pair of codewords CIJ and AN IJK from codebooks C and A. 4) The selected codeword AN IJK is sent through the communication DMC PB|A , whose output B N is used N to decode codeword CIJ ˆ , and both are then passed through a DMC PY |BC to obtain Y N . The corresponding scheme is displayed in Fig. 2. Source of Common Randomness J XN Node X Encoder J AN DMC BN PB|A Node Y Decoder M1 YN M2 Fig. 1. Point-to-point strong coordination over a DMC. We wish to communicate a codeword AN corresponding to the coordination message over the rate-limited DMC PB|A to Node Y. The codeword AN is constructed based on the input action sequence X N , the local randomness M1 at Node X, and the common randomness J. Node Y generates a sequence of actions Y N ∈ Y N based on the received codeword B N , common randomness J, and local randomness M2 . By assumption, the common randomness is independent of the action specified at Node X. A strong coordination coding scheme with rates (Rc , Ro , ρ1 , ρ2 ) is deemed achievable if for each  > 0, there exists an N ∈ N such that the joint pmf of actions P̃X N ,Y N induced by this scheme and the N i.i.d. copies of desired joint pmf (X, Y ) ∼ qXY , QX N Y N , are close in total variation, i.e., kP̃X N Y N − QX N Y N kT V < . (1) C. Random Coding Construction Consider auxiliary random variables A ∈ A and C ∈ C with (A, C) ∼ PAC be jointly correlated with (X, Y ) as PXY ABC = PAC PX|AC PB|A PY |BC . The joint Fig. 2. Joint strong coordination-channel coding scheme. The following theorem provides the inner bound for strong coordination region achieved by such joint coordinationchannel code. Theorem 1. (Strong coordination inner bound [20]) A tuple (Ro , ρ1 , ρ2 ) is achievable for the strong noisy communication setup in Fig. 1 if for some Ra , Rc ≥ 0, Ra + Ro + Rc > I(XY ; AC), (2a) Ro + Rc > I(XY ; C), (2b) Ra + Rc > I(X; AC), (2c) Rc > I(X; C), (2d) Rc < I(B; C), (2e) ρ1 > Ra + Rc − I(X; AC), (2f) ρ2 > H(Y |BC). (2g) The underlying proofs and details of the coding mechanism for this joint coordination-channel coding scheme for noisy strong coordination are based on a complex channel resolvability framework [20]. Channel resolvability has been successfully used to study different strong coordination problems due to its ability to approximate channel output statistics with random codebooks [22]. We now propose a scheme based on polar codes that achieves the inner bound stated by Theorem 1 for the strong coordination region as follows. III. N ESTED P OLAR C ODE FOR S TRONG C OORDINATION OVER N OISY C HANNELS Since the proposed joint coordination-channel coding scheme is based on a channel resolvability framework, we adopt the channel resolvability-based polar construction for noise-free strong coordination [17] in combination with polar coding for the degraded broadcast channel [21]. A. Coding Scheme b distributed Consider the random variables X, Y, A, B, C, C according to QXY ABC Cb over X × Y × A × B × C such that b − Y . Assume that |A| = 2 and the X − (A, C) − (B, C) distribution QXY is achievable with |C| = 2 † . Let N , 2n . We describe the polar coding scheme as follows: β and δN , 2−N we define the very high and high entropy sets VC , {i ∈ J1, N K : H(U2i |U21:i−1 ) > 1 − δN }, VC|X , {i ∈ J1, N K : H(U2i |U21:i−1 X N ) > 1 − δN }, VC|XY , {i ∈ J1, N K : H(U2i |U21:i−1 X N Y N ) > 1 − δN }, HC|B , {i ∈ J1, N K : H(U2i |U21:i−1 B N ) > δN }, HC|A , {i ∈ J1, N K : H(U2i |U21:i−1 AN ) > δN }, (5) which by [24, Lemma 7] satisfy |VC|X | |VC | = H(C), lim = H(C|X), lim N →∞ N →∞ N N |HC|B | |VC|XY | = H(C|XY ), lim = H(C|B), lim N →∞ N →∞ N N |HC|A | lim = H(C|A). N →∞ N These sets are illustrated in Fig. 4. Note that the set HC|B indicates the noisy bits of the DMC PB|C (i.e., the unrecoverable bits of the codeword C N intended for the weaker user in the DM-BC setup in Fig. 3) and is in general not aligned with other sets. Let L1 , VC \ HC|A , Fig. 3. Block diagram of the superposition polar code. Consider a 2-user physically degraded discrete memoryless broadcast channel (DM-BC) PAB|A in Fig. 3 where A denotes the channel input and A, B denote the output to the first and second receiver, respectively. In particular, the channel DMC PB|A is physically degraded with respect to the perfect channel PA|A (i.e., PA|A  PB|A ), leading to the Markov chain A − A − B. We construct the nested polar coding scheme in a similar fashion as in [21] as this mimics the nesting of the codebooks C and A in Step 1) of the random coding construction in Section II-C. Here, the second (weaker) user is able to recover its intended message I, while the first (stronger) user is able to recover both messages K and I. Let C be the auxiliary random variable (cloud center) required for superposition coding over the DM-BC leading to the Markov chain C − A − (A, B). As a result, the channel PB|C is also degraded with respect to PA|C (i.e., PA|C  PB|C ) [21, Lemma 3]. Let V be a matrix of the selected codewords AN and C N as  N A V , . (3) CN Now, apply the polar linear transformation Gn as  N U U , 1N = V Gn . U2 (4) First, consider C N , U2N Gn from (3) and (4) where U2N is generated by the second encoder E2 in Fig. 3. For β < 12 † For the sake of exposition, we only focus on the set of joint distributions over X × Y that are achievable with binary auxiliary random variables C, A, and over a binary-input DMC. The scheme can be generalized to non-binary C, A with non-binary polar codes in a straightforward way [23]. L2 , VC \ HC|B , where the set HC|A indicates the noisy bits of the DMC PA|C (i.e., the unrecoverable bits of the codeword C N intended for the stronger user). From the relation PA|C  PB|C c c we obtain HC|B ⊆ HC|A . This ensures that the polarization indices are guaranteed to be aligned (i.e., L2 ⊆ L1 ) [25], [21, Lemma 4]. As a consequence, the bits decodable by the weaker user are also decodable by the stronger user. Now, consider AN , U1N Gn (see (3) and (4)), where U1N is generated by the first encoder E1 with C N as a side information as seen in Fig. 3. We define the very high entropy sets illustrated in Fig. 5 as Fig. 4. Index sets for codeword C. Fig. 5. Index sets for codeword A. VA , {i ∈ J1, N K : H(U1i |U11:i−1 ) > 1−δN}, VA|C , {i ∈ J1, N K : H(U1i |U11:i−1 C N ) > 1−δN}, VA|CX , {i ∈ J1, N K : H(U1i |U11:i−1 C N X N ) > 1−δN}, VA|CXY , {i ∈ J1, N K : H(U1i |U11:i−1 C N X N Y N ) > 1−δN} (6) satisfying |VA|CX | |VA | lim = H(A), lim = H(A|CX), N →∞ N N →∞ N |VA|CXY | |VA|C | = H(A|C), lim = H(A|CXY ). lim N →∞ N →∞ N N Note that, in contrast to Fig. 4, here there is no channel dependent set overlapping with all other sets as PA|A is a noiseless channel with rate H(A) and hence HA|A = ∅. Accordingly, in terms of the polarization sets in (5) and (6) we define the sets combining channel resolvability for strong coordination and broadcast channel construction c F1 , (VC|X \ VC|XY ) ∩ HC|B , c F2 , VC|XY ∩ HC|B , c F3 , VC|X ∩ HC|B = HC|B \ HC|BX , F4 , VC|X ∩ HC|B = HC|BX , F̂4 , HC|BXY , Fig. 6. Chaining construction for block encoding. the following block i + 1. This is possible by following the decodability constraint (see (2d), (2e) of Theorem 1) c that ensures that the size of the set F3 is smaller than the F5 , (VC \ VC|X ) ∩ HC|B , combined size of the sets F1 and F2 [19]. However, since F6 , VA|CX \ VA|CXY , these sets originally contain uniformly distributed common F7 , VA|CXY , randomness J [17], the bits of F3 can be embedded while maintaining the uniformity of the randomness by taking F8 , VA|C \ VA|CX , advantage of the Crypto Lemma [27, Lemma 2]. Then, to F9 , VA \ VA|C . ensure that F3 is equally distributed over F1 ∪ F2 , F3 is Finally, with Y N , T N Gn , we define the very high partitioned according to the ratio between |F1 | and |F2 |. To (i) entropy set: utilize the Crypto Lemma, we introduce F32 and F31 , which represent uniformly distributed common randomness used to VY |BC , {i ∈ J1, N K : H(T i |T 1:i−1 B N C N ) > log |Y|−δN }, randomize the information bits of F3 . The difference is that (7) F32 , as F2 , represents a fraction of common randomness satisfying that can be reused over k blocks whereas a realization of the |VY |BC | (i) = H(Y |BC). lim randomness in F31 needs to be provided in each new block. N →∞ N This set is useful for expressing the randomized generation Note that, as visualized in Fig. 6, both the subsets F́31 ⊂ F1 of Y N via simulating the channel PY |BC in Fig. 2 as a source and F́32 ⊂ F2 represent the resulting uniformly distributed polarization operation [17]. We now proceed to describe the bits of F3 of the previous block, where |F́31 | = |F31 | and |F́32 | = |F32 |. Finally, in an additional block k + 1 we use a encoding and decoding algorithms. 1) Encoding: The encoding protocol described in Algo- good channel code to reliably transmit the set F3 of the last rithm 1 is performed over k ∈ N blocks of length N . Since block k. 2) Decoding: The decoder is described in Algorithm 2. for strong coordination the goal is to approximate a target Recall that we are only interested in the message Iˆ intended joint distribution with a minimum amount of randomness, for the weak user channel given by PB|A in Figure 3. As a the encoding scheme performs channel resolvability while result, we only state the decoding protocol at D2 that recovers reusing a fraction of the common randomness over several b N . Note that the decoding is done in reverse the codeword C blocks (i.e., randomness recycling) as in [17]. However, since order after receiving the extra k + 1 block containing the bits the communication is over a noisy channel, the encoding of set F3 of the last block k. In particular, in each block scheme also considers a block chaining construction to i ∈ [1, k − 1] the bits in F3 are obtained by successfully mitigate the channel noise influence as in [19], [24]–[26]. recovering the bits in both F1 and F2 in block i + 1. More precisely, as demonstrated in Fig. 2, we are interested in successfully recovering the message I that is intended for B. Scheme Analysis the weak user channel given by PB|A in Fig. 3. However, the challenge is to communicate the set F3 that includes bits We now provide an analysis of the coding scheme of of the message I that are corrupted by the channel noise. Section III. The analysis is based on KL divergence which This suggests that we apply a variation of block chaining upper bounds the total variation in (1) by Pinsker’s inequality. only at encoder E2 generating the codeword C N as follows We start the analysis with a set of sequential lemmas. In (see Fig. 6). At encoder E2 , the set F3 of block i ∈ J1, kK particular, Lemma 1 is useful to show in Lemma 2 that the is embedded in the reliably decodable bits of F1 ∪ F2 of strong coordination scheme based on channel resolvability F̌4 , HC|BX \HC|BXY , Algorithm 1: Encoding algorithm at Node X for strong coordination Algorithm 2: Decoding algorithm at Node Y for strong coordination N Input: X1:k , uniformly distributed local randomness bits M11:k of the size k|F6 |, common randomness bits J¯ = (J¯1 , J¯2 ) of sizes |F2 ∪ F̂4 |, and |F7 |, respectively, and J1:k of size k|F̌4 ∪ F1 | shared with Node Y. eN Output: A 1:k 1. for i = 2, . . . , k do e N bit-by-bit as follows: 2. E2 in Fig. 3 constructs U 2i if i = 1 then e N [F1 ∪ F̌4 ] ← Ji • U 2i N e • U2i [F2 ∪ F̂4 ] ← J¯1 else (i) • Let F3 , F32 be sets of the size (|Fm | × 1 |F3 |)/(|F1 | + |F2 |) for m ∈ {1, 2}. e N [(F1 \ F́3 ) ∪ F̌4 ], F (i) ← Ji • U 2i 1 31  e N [(F2 \ F́3 ) ∪ F̂4 ], F3 ← J¯1 • U 2i 2 2 e N [F́3 ] ← U e N [F3 \ F3 ] ⊕ F (i) • U 2i 2i−1 1 2 31 e N [F́3 ] ← U e N [F3 \ F3 ] ⊕ F3 • U N Input: B1:k , uniformly distributed common randomness, ¯ J1 , and J1:k shared with Node X. N Output: Ye1:k 1. For block i = k, . . . , 1 do b N bit-by-bit as follows: 2. D2 in Fig. 3 constructs U 2i  b N [(F1 \ F́ ) ∪ F̌4 ], F (i) ← Ji • U 31 2i 31  b N [(F2 \ F́3 ) ∪ F̂4 ], F3 ← J¯1 • U 2i 2 2 N bN • Given B successively draw the components of U 2i 2 2i−1 1 2 end N • Given Xi , successively draw the remaining come N according to P̃ j 1:j−1 N defined ponents of U 2i U2 |U2 Xi i i by ( QU j |U 1:j−1 j ∈ VCc , 2 2 P̃U j |U 1:j−1 X N , 2i 2i i QU j |U 1:j−1 X N j ∈ F3 ∪ F5 . 2 2 (8) N N e e 3. Ci ← U2i Gn e N bit-by-bit as follows: 4. E1 in Fig. 3 constructs U 1i e N [F6 ] ← M1 • U 1i i e N [F7 ] ← J¯2 • U 1i N e N , successively draw the remaining • Given Xi and C i e N according to P̃ j 1:j−1 N N components of U 1i U1 |U1 Ci Xi i i defined by  c j ∈ VA , QU1j |U11:j−1  j ∈ F9 , P̃U j |U 1:j−1 C N X N , QU j |U 1:j−1 C N 1i 1i i i   1 1 QU j |U 1:j−1 C N X N j ∈ F8 . 1 1 (9) eN ← U e N Gn 5. A 1i i eN 6. Transmit A i 7. end for holds for each block individually regardless of the randomness recycling. 2i i according to P̃U j |U j−1 ,B N defined by 2i 2i i ( QU j |U 1:j−1 j ∈ VCc , 2 2 P̃U j |U j−1 B N , 2i 2i i QU j |U 1:j−1 B N j ∈ F́32 ∪ F́31 ∪F5 . 2 2 i (10) 3. if i = k then b N [F3 ] ← B N • U 2i k+1 else b N [F3 \ F3 ] ← U b N [F́3 ] ⊕ F (i+1) • U 2i 2i+1 2 1 31 N b [F3 \ F3 ] ← U b N [F́3 ] ⊕ F3 • U 2i 2i+1 1 2 2 4. Let b N [F́ ] ← F (i) • U 2i 31 31 b N [F́3 ] ← F3 • U 2i 2 2 N N b b 5. Ci ← U2i Gn b N and Bi N , successively 6. Channel simulation: given C i N e draw the components of Ti according to ( 1/|Y| j ∈ VY |BC , P̃T j |T 1:j−1 B N C N , i i i i QT j |T 1:j−1 B N C N j ∈ VYc |BC . (11) 5. YeiN ← TeiN Gn 6. end for Proof. We have N N) D(QAN C N X N ||P̃AN i Ci Xi (a) = D(QU1N U2N X N ||P̃U1N U2N XiN ) i i h i (b) = EQX N D(QU1N U2N |X N ||P̃U1N U2N |XiN ) i i h i = EQX N D(QU2N |X N QU1N |U2N X N ||P̃U2N |XiN P̃U1N |U2N XiN ) i i i h (c) = EQX N D(QU2N |X N ||P̃U2N |XiN ) i i + D(QU1N |U2N X N ||P̃U1N |U2N XiN ) i Lemma 1. For block i ∈ J1, kK, we have N (d) X = EQ 1:j−1 U2 X j=1 N N ) ≤ 2N δN . D(QAN C N X N ||P̃AN i Ci Xi + N X j=1 EQ i h D(QU j |U 1:j−1 X N ||P̃U j N 1:j−1 N N U1 U2 X 2 2 2i |U21:j−1 XiN ) i i h i D(QU j|U 1:j−1U NX N||P̃U j |U 1:j−1U NX N ) 1 1 2 1i 1i 2i i (e) h X = EQ j ∈F / 3 ∪F5 1:j−1 N U2 X X + EQ 1:j−1 N U1 U2 X j ∈F / 8 (f ) X = EQ X + 2 1:j−1 XiN 2i |U2i 2 h D(QU j |U 1:j−1U NX N ||P̃U j N 1 1:j−1 U2 X c ∪V j∈VC C|X D(QU j |U 1:j−1 X N ||P̃U j 1 2 1i 1i 2i i 1:j−1 XiN 2i |U2i 2 1:j−1 N N U1 U2 X D(QU j |U 1:j−1 U N X N ||P̃U j 1 = X  ) i h EQ c ∪V j∈VA A|CX ∪VA\VA|C (g) D(P̃XiN YiN ||QX N Y N ) i |U 1:j−1U NX N ) h D(QU j |U 1:j−1 X N ||P̃U j N 2 Lemma 2. For block i ∈ J1, kK, we have i ) 1 1:j−1 N U2 XiN 1i |U1i i 2 H(U2j |U21:j−1 ) − H(U2j |U21:j−1 X N ) ) i  c j∈VC X  +  1 − H(U2j |U21:j−1 X N ) X  H(U1j |U11:j−1 ) − H(U1j |U11:j−1 U2N X N )  c j∈VA X  + 1 − H(U1j |U11:j−1 U2N X N )  X H(U1j |U11:j−1 U2N ) − H(U1j |U11:j−1 U2N X N )  c c j∈VA|C \VA (h) = X  H(U2j |U21:j−1 ) − H(U2j |U21:j−1 X N )  X  1 − H(U2j |U21:j−1 X N )  + 1− + i i i i i = D(QB N |AN QCbN |B N ||QB N |AN P̃CbN |B N ) i  H(U1j |U11:j−1 C N X N ) i = D(QCbN |B N ||P̃CbN |B N ) i j∈VA|CX X i (a) c j∈VA + (f) follows from the chain rule of KL divergence [28]; (g) holds by [17, Lemma 14], where  µACB Cb , min∗a,c,b,ĉ QACB Cb ,  µY B Cb , min∗y,b,ĉ QY B Cb ; D(QB N CbN |AN C N ||P̃B N CbN |AN C N )  H(U1j |U11:j−1 ) − H(U1j |U11:j−1 C N X N ) X  √ (2) where δN , O( N 3 δN ). Proof. Consider the argument shown at the top of the following page. In this argument: (a) - (b) results from the Markov chain X N − AN C N − b N −Y N ; BN C (c) follows from [17, Lemma 16] where p √ (2) δ̂N , −N log(µXACB CY b ) 2 ln 2 2N δN ,  ∗ µXACB CY ; b , minx,y,a,c,b,ĉ QXACB CY b i j∈VC|X X  i (h) holds by bounding the terms D(QB N CbN |AN C N ||P̃B N CbN |AN C N ), and i i i i D(QY N |B N CbN ||P̃Y N |B N CbN ), as follows: c j∈VC + i  j∈VA|CX + i i i i (d) follows from the chain rule of KL divergence [28]; (e) holds by Lemma 1 and [17, Lemma 14] where p √ (1) δN , −N log(µXAC ) 2 ln 2 2N δN ,  µXAC , min∗x,a,c QXAC ; j∈VC|X + (2) ≤ D(P̃X N AN C N B N CbN Y N ||QX N AN C N B N CbN Y N ) ≤ δN i (b)  H(U1j |U11:j−1 C N ) − H(U1j |U11:j−1 C N X N )  = D(QUb N |B N ||P̃Ub N |B N ) i N (c) X = EQ c c j∈VA|C \VA (i) 1:j−1 N B U2 j=1 c ≤ (|VCc | + |VC|X | + |VA|XC | + |VA|C |)δN ≤ 2N δN (d) = where (a) holds by invertibility of Gn ; (b) - (d) follows from the chain rule of the KL divergence [28]; (e) results from the definitions of the conditional distributions in (8), and (9); (f) follows from the definitions of the index sets as shown in Figures 4 and 5; e N and U e N bit-by-bit (g) results from the encoding of U 1i 2i at E1 and E2 , respectively, with uniformly distributed randomness bits and message bits. These bits are generated by applying successive cancellation encoding using previous bits and side information with conditional distributions defined in (8) and (9); (h) holds by the one-to-one relation between U2N and C N ; (i) follows from the sets defined in (5) and (6).  X EQ 1:j−1 N U2 B X = 2 X 2 2i |U21:j−1 BiN ) 2 1:j−1 N U2 B i i D(QU j |U 1:j−1 B N ||P̃U j h EQ j∈HC|B ∪VC|X (e) D(QU j |U 1:j−1 B N ||P̃U j h c j∈VC + i h ) i 1:j−1 N Bi 2i |U2i 2 D(QU j|U 1:j−1B N||P̃U j |U 1:j−1B N) 2 2 2i H(U2j |U21:j−1 ) − H(U2j |U21:j−1 B N ) 2i i i  c j∈VC X +   1 − H(U2j |U21:j−1 B N ) j∈HC|B ∪VC|X (f ) ≤ |VCc |δN + |HC|B ∪ VC|X |δN ≤ N δN , where b and (a) results from the Markov chain C − A − B − C N N the fact that P̃BiN |AN = Q ; B |A i (b) holds by the one-to-one relation between U2N and CN ; (c) follows from the chain rule of KL divergence [28]; D(P̃X N AN C N B N CbN Y N ||QX N AN C N B N CbN Y N ) i i i i i i = D(P̃Y N |X N AN C N B N CbN P̃X N AN C N B N CbN ||QY N |X N AN C N B N CbN QX N AN C N B N CbN ) i i i i i i i i i i i (a) = D(P̃Y N |B N CbN P̃X N AN C N B N CbN ||QY N |B N CbN QX N AN C N B N CbN ) i i i i i i i i N ||Q N = D(P̃Y N |B N CbN P̃B N CbN |X N AN C N P̃XiN AN bN QB N C bN |X N AN C N QX N AN C N ) Y |B N C i Ci i i i i i i i i (b) N ||Q N = D(P̃Y N |B N CbN P̃B N CbN |AN C N P̃XiN AN bN QB N C bN |AN C N QX N AN C N ) Y |B N C i Ci i i (c) ≤ (2) δ̂N i i i i i N ||P̃ N + D(P̃Y N |B N CbN P̃B N CbN |AN C N P̃XiN AN bN P̃B N C bN |AN C N QX N AN C N ) Y |B N C i Ci i i i i i i i i i i i i i i + D(P̃Y N |B N CbN P̃B N CbN |AN C N QX N AN C N ||QY N |B N CbN QB N CbN |AN C N QX N AN C N ) i i (d) = (2) δ̂N (e) i i i i i N ||QX N AN C N ) + D(P̃ N + D(P̃XiN AN bN QB N C bN |AN C N ) bN P̃B N C bN |AN C N ||QY N |B N C Y |B N C i Ci i i (2) (1) (2) δ̂N + (1) δN + (1) δN i i i i i ≤ δ̂N + δN + D(P̃Y N |B N CbN P̃B N CbN |AN C N ||QY N |B N CbN QB N CbN |AN C N ) i (f ) i i i i i i + D(P̃Y N |B N CbN ||QY N |B N CbN ) + D(P̃B N CbN |AN C N ||QB N CbN |AN C N ) i i i i i i i q (g) √ (2) (1) ≤ δ̂N + δN − N log(µY B Cb ) 2 ln 2 D(QY N |B N CbN ||P̃Y N |B N CbN ) i i i q √ − N log(µACB Cb ) 2 ln 2 D(QB N CbN |AN C N ||P̃B N CbN |AN C N ) = i (h) ≤ (2) δ̂N i = j=1 (b) = X EQT 1:j−1BNCb N D(QT j |T 1:j−1B NCbN ||P̃T j |T 1:j−1B NCbN ) i = i i Lemma 4. We have i X  i i log |Y| − H(T j |T 1:j−1 B N C N ) i  N Y N || D P̃X1:k 1:k k Y P̃XiN YiN  (3) ≤ (k − 1)δN i=1 where (3) δN is defined in Lemma 3. Proof. We reuse the proof of [17, Lemma 4] with substitutions p̃Yi1:N ← P̃XiN YiN , and R̄1 ← J¯1 . This will result N N N eN in the Markov chain X1:i−2 Ye1:i−2 − J¯1 Xi−1 Yi−1 − XiN YeiN replacing the chain in [17, Lemma 4].  j∈VY |BC (d) ≤ |VY |BC |δN ≤ N δN , where (a) follows from the chain rule of KL divergence [28]; (b) - (c) results from the definitions of the conditional distribution in (11); (d) follows from the set defined in (7).  Now, Lemmas 3 and 4 provide the independence between two consecutive blocks and the independence between all blocks based on the results of Lemma 2. Lemma 3. For block i ∈ J2, kK, we have  i i h EQT 1:j−1BNCb N D(QT j |T 1:j−1B NCbN ||P̃T j |T 1:j−1B NCbN ) i i p̃Yi1:N ← P̃YiNXiN , and R̄1 ← J¯1 . This will result in the N eN Markov chain Xi−1 Yi−1 − J¯1 − XiNYeiN replacing the chain in [17, Lemma 3].  i h j∈VY |BC (c) i i p p √ − N log(µY B Cb ) 2 ln 2 N δN − N log(µACB Cb ) 2 ln 2 N δN (d) - (e) results from the definitions of the conditional distributions in (10); (f) follows from the sets defined in (5). D(QY N |B N CbN ||P̃Y N |B N CbN ) N (a) X i √ Finally, by the results of Lemma 4 we can show in Lemma 5 that the target distribution QX N Y N is approximated asymptotically over all blocks jointly. Lemma 5. We have   (4) N Y N ||QX 1:kN Y 1:kN D P̃X1:k ≤ δN . 1:k (4) 1/8 where δN , O(k 3/2 N 23/8 δN ) Proof. We reuse the proof of [17, Lemma 5] with substitutions qY 1:N ← QX N Y N , p̃Yi1:N ← P̃YiN XiN .  (3) N N N YN J D(P̃Xi−1:i ¯ P̃ N N ) ≤ δN Yi−1:i J¯1 ||P̃Xi−1 i−1 1 Xi Yi √ (3) where δN , O( 4 N 15 δN ). Proof. We reuse the proof of [17, Lemma 3] with substitutions qU 1:N ← QC N , qY 1:N ← QX NY N , p̃Ui1:N ← P̃CiN , Theorem 2. The polar coding scheme described in Algorithms 1, 2 achieves the region stated in Theorem 1. It satisfies (1) for a binary input DMC channel and a target distribution qXY defined over X ×Y, with an axillary random variable C defined over the binary alphabet. Proof. The common randomness rate Ro is given as |VC|XY | + k|VC|X \ VC|XY | |J¯1 | + |J1:k | = kN Nk |VC|XY | |VC|X \ VC|XY | = + kN N N →∞ H(C|XY ) −−−−→ + I(Y ; C|X) k k→∞ −−−−→ I(Y ; C|X). (12) The communication rate Rc is given as k|VC \ VC|X | |VC \ VC|X | k|F5 ∪ F3 | = = kN Nk N N →∞ −−−−→ I(X; C), (13) whereas Ra can be written as |VA|CXY | + k|F8 | |VA|CXY | + k|VA|C \ VA|CX | = kN kN |VA|CXY | |VA|C \ VA|CX | = + kN N H(A|CXY ) N →∞ −−−−→ I(A; X|C) + k k→∞ −−−−→ I(A; X|C). (14) The rates of local randomness ρ1 and ρ2 , respectively, are given as ρ1 = k|VA|CX \ VA|CXY | |VA|CX \ VA|CXY | k|F6 | = = kN Nk N N →∞ −−−−→ I(A; Y |CX) and (15) k|VY |BC | N →∞ ρ2 = −−−−→ H(Y |BC). (16) kN Finally we see that conditions (2a)-(2g) are satisfied by (12)-(16). Hence, given Ra , Ro , Rc satisfying Theorem 1, based on Lemma 5 and Pinsker’s inequality we have   N Y N − QX 1:kN Y 1:kN ||T V E ||P̃X1:k 1:k i hq N Y N ||QX 1:kN Y 1:kN ) ≤ E 2D(P̃X1:k 1:k q   N →∞ N Y N ||QX 1:kN Y 1:kN ) ≤ 2E D(P̃X1:k −→ 0. (17) 1:k As a result, from (17) there exists an N ∈ N for which the polar code-induced pmf between the pair of actions satisfies the strong coordination condition is given by (1).  R EFERENCES [1] E. Soljanin, “Compressing quantum mixed-state sources by sending classical information,” IEEE Trans. Inf. Theory, vol. 48, no. 8, pp. 2263–2275, Aug. 2002. [2] P. W. Cuff, H. H. Permuter, and T. M. Cover, “Coordination capacity,” IEEE Trans. Inf. Theory, vol. 56, no. 9, pp. 4181–4206, 2010. [3] A. A. Gohari and V. Anantharam, “Generating dependent random variables over networks,” in Proc. IEEE Inf. Theory Workshop, Paraty, Brazil, Oct. 2011, pp. 698–702. [4] F. Haddadpour, M. H. Yassaee, A. Gohari, and M. R. Aref, “Coordination via a relay,” in Proc. IEEE Int. Sympos. on Inform. Theory, Cambridge, MA, USA, Jul. 2012, pp. 3048–3052. [5] P. Cuff, “Distributed channel synthesis,” IEEE Trans. Inf. Theory, vol. 59, no. 11, pp. 7071–7096, 2013. [6] A. Bereyhi, M. Bahrami, M. Mirmohseni, and M. R. Aref, “Empirical coordination in a triangular multi-terminal network,” in Proc. IEEE Int. Sympos. on Inform. Theory, Istanbul, Turkey, 2013, pp. 2149– 2153. [7] M. R. Bloch and J. Kliewer, “Strong coordination over a line network,” in Proc. IEEE Int. Sympos. on Inform. Theory, Istanbul, Turkey, Jul. 2013, pp. 2319–2323. [8] ——, “Strong coordination over a three-terminal relay network,” in Proc. IEEE Inf. Theory Workshop, Hobart, Australia, Nov. 2014, pp. 646–650. [9] M. H. Yassaee, A. Gohari, and M. R. Aref, “Channel simulation via interactive communications,” IEEE Trans. Inf. Theory, vol. 61, no. 6, pp. 2964–2982, 2015. [10] B. N. Vellambi, J. Kliewer, and M. R. Bloch, “Strong coordination over multi-hop line networks,” arXiv preprint, 2016. [Online]. Available: http://arxiv.org/abs/1602.09001 [11] P. Cuff and C. Schieler, “Hybrid codes needed for coordination over the point-to-point channel,” in Proc. 49th Annual Allerton Conf. on Commun., Control, and Comp., Monticello, IL, Sep. 2011, pp. 235– 239. [12] F. Haddadpour, M. H. Yassaee, S. Beigi, A. Gohari, and M. R. Aref, “Simulation of a channel with another channel,” IEEE Trans. Inf. Theory, vol. 63, no. 5, pp. 2659–2677, May 2017. [13] G. Cervia, L. Luzzi, M. L. Treust, and M. Bloch, “Strong coordination of signals and actions over noisy channels,” in Proc. IEEE Int. Sympos. on Inform. Theory, Aachen, Germany, June 2017, pp. 2835–2839. [14] E. Arikan, “Channel polarization: A method for constructing capacityachieving codes for symmetric binary-input memoryless channels,” IEEE Trans. Inf. Theory, vol. 55, no. 7, pp. 3051–3073, July 2009. [15] ——, “Source polarization,” in Proc. IEEE Int. Sympos. on Inform. Theory, June 2010, pp. 899–903. [16] M. R. Bloch, L. Luzzi, and J. Kliewer, “Strong coordination with polar codes,” in 50th Annual Allerton Conference on Commununication, Control, and Computing, Monticello, IL, USA, Oct. 2012, pp. 565– 571. [17] R. A. Chou, M. Bloch, and J. Kliewer, “Empirical and strong coordination via soft covering with polar codes,” arXiv preprint, 2016. [Online]. Available: http://arxiv.org/abs/1608.08474 [18] R. Blasco-Serrano, R. Thobaben, and M. Skoglund, “Polar codes for coordination in cascade networks,” in International Zurich Seminar on Communications (IZS). Eidgenössische Technische Hochschule Zürich, 2012, pp. 55–58. [19] G. Cervia, L. Luzzi, M. R. Bloch, and M. L. Treust, “Polar coding for empirical coordination of signals and actions over noisy channels,” in Proc. IEEE Inf. Theory Workshop, Sept 2016, pp. 81–85. [20] S. A. Obead, B. N. Vellambi, and J. Kliewer, “Strong coordination over noisy channels: Is separation sufficient?” in Proc. IEEE Int. Sympos. on Inform. Theory, Aachen, Germany, June 2017, pp. 2840–2844. [21] N. Goela, E. Abbe, and M. Gastpar, “Polar codes for broadcast channels,” IEEE Trans. Inf. Theory, vol. 61, no. 2, pp. 758–782, Feb 2015. [22] T. S. Han and S. Verdú, “Approximation theory of output statistics,” IEEE Trans. Inf. Theory, vol. 39, no. 3, pp. 752–772, 1993. [23] E. Şaşoğlu, E. Telatar, and E. Arikan, “Polarization for arbitrary discrete memoryless channels,” in Proc. IEEE Inf. Theory Workshop, Oct 2009, pp. 144–148. [24] R. A. Chou and M. R. Bloch, “Polar coding for the broadcast channel with confidential messages: A random binning analogy,” IEEE Trans. Inf. Theory, vol. 62, no. 5, pp. 2410–2429, May 2016. [25] M. Mondelli, S. H. Hassani, I. Sason, and R. L. Urbanke, “Achieving Marton’s region for broadcast channels using polar codes,” IEEE Trans. Inf. Theory, vol. 61, no. 2, pp. 783–800, Feb 2015. [26] E. E. Gad, Y. Li, J. Kliewer, M. Langberg, A. A. Jiang, and J. Bruck, “Asymmetric error correction and flash-memory rewriting using polar codes,” IEEE Trans. Inf. Theory, vol. 62, no. 7, pp. 4024–4038, July 2016. [27] G. D. Forney Jr., “On the role of MMSE estimation in approaching the information-theoretic limits of linear Gaussian channels: Shannon meets Wiener,” in Proc. 41st Annual Allerton Conference on Communication, Control, and Computing, Monticello, IL, Oct 2003, pp. 430–439. [28] T. M. Cover and J. Thomas, Elements of Information Theorey, 2nd ed., ser. Wiley Series in Telecommunications and Signal Processing. Wiley-Interscience, 2006.
7cs.IT
Can Negligible Cooperation Increase Capacity? The Average-Error Case Parham Noorzad, Michelle Effros, Michael Langberg Abstract arXiv:1801.03655v1 [cs.IT] 11 Jan 2018 In communication networks, cooperative strategies are coding schemes where network nodes work together to improve network performance metrics such as sum-rate. This work studies encoder cooperation in the setting of a discrete multiple access channel with two encoders and a single decoder. A node in the network that is connected to both encoders via rate-limited links, referred to as the cooperation facilitator (CF), enables the cooperation strategy. Previously, the authors presented a class of multiple access channels where the average-error sum-capacity has an infinite derivative in the limit where CF output link capacities approach zero. The authors also demonstrated that for some channels, the maximal-error sum-capacity is not continuous at the point where the output link capacities of the CF equal zero. This work shows that the the average-error sum-capacity is continuous when CF output link capacities converge to zero; that is, the infinite derivative of the average-error sum-capacity is not a result of its discontinuity as in the maximal-error case. Index Terms Continuity, cooperation facilitator, edge removal problem, maximal-error capacity region, multiple access channel. I. I NTRODUCTION Interference is an important limiting factor in the capacity performance of communication networks. One way to reduce interference is for nodes in the network to work together to coordinate their transmissions. Any such strategy falls under the general definition of cooperation. While strategies such as time-sharing are one form of cooperation, the model we consider here is closer to the “conferencing” cooperation model [1]. In conferencing, unlike time-sharing, encoders share information about the messages they wish to transmit. In contrast to conferencing however, our cooperation model employs indirect communication; that is, the encoders communicate through another node which we call the cooperation facilitator (CF) [2], [3]. Figure 1 depicts the CF model in the two-user multiple access channel (MAC) scenario. The CF enables cooperation between the encoders through its rate-limited input and output links. Prior to the transmission of its codeword over the channel, each encoder sends a function of its message to the CF. The CF, This material is based upon work supported by the National Science Foundation under Grant Numbers 1527524 and 1526771. P. Noorzad was with the California Institute of Technology, Pasadena, CA 91125 USA. He is now with Qualcomm Research, San Diego, CA 92122 USA (email: [email protected]). M. Effros is with the California Institute of Technology, Pasadena, CA 91125 USA (email: [email protected]). M. Langberg is with the State University of New York at Buffalo, Buffalo, NY 14260 USA (email: [email protected]). 1 Figure 1. A network consisting of two encoders that initially cooperate via a CF and then, based on the information they receive, transmit their codewords over the MAC to the decoder. using the information it receives from both encoders, computes a rate-limited function for each encoder. It then transmits the computed values over its output links. Each encoder then selects a codeword using its message and the information it receives from the CF. To simplify our discussion in this section, suppose the CF input link capacities both equal Cin and the CF output link capacities both equal Cout . If Cin ≤ Cout , then the optimal strategy for the CF is “forwarding” [3]; that is, the CF simply forwards the information it receives from one encoder to the other. Using the capacity region of the MAC with conferencing encoders [1], it follows that the average-error sum-capacity gain of CF cooperation is bounded from above by 2Cin and does not explicitly depend on Cout . In the situation where Cin > Cout , however, the situation is more complicated since the CF can no longer forward all its incoming information. While the 2Cin upper bound is still valid, the dependence of the sum-capacity gain on Cout is less clear. If the CF simply forwards part of the information it receives, then again by [1], the average-error sum-capacity gain is at most 2Cout . While the 2Cout bound has an intuitive interpretation, in the sense that it reflects the amount of information the CF shares with the encoders, a much larger gain is possible. Specifically, in prior work [3], we show that for a class of MACs which includes the binary adder MAC,1 for fixed Cin > 0, the average-error sum-capacity has a derivative in Cout that is infinite at Cout = 0; that is, for small Cout , the gain resulting from cooperation exceeds any function with bounded derivative. The large sum-capacity gain described above is not limited to the average-error scenario. In fact, in related work [2], we show that for any MAC for which the average-error sum-capacity is strictly greater than the maximal-error sum-capacity in the absence of cooperation, adding a CF and measuring the maximal-error sum-capacity for fixed Cin > 0 gives a curve that is discontinuous at Cout = 0. In this case, we say that “negligible cooperation” results in a non-negligible benefit.2 Given these earlier results, the following question remains open: For fixed Cin > 0, can the average-error sumcapacity ever be discontinuous in Cout ? In the present work, we show that the answer is negative; that is, the 1 The 2 In binary adder MAC defined as Y = X1 + X2 , where X1 , X2 ∈ {0, 1}, and Y ∈ {0, 1, 2}. [4], Langberg and Effros further show that in a certain network, the transmission of even a single bit (over the entire blocklength) can strictly increase maximal-error capacity. 2 average-error sum-capacity is continuous even at Cout = 0. A related average-error continuity problem is the case of rate-limited feedback over the MAC. For such a network, Sarwate and Gastpar [5], using the dependence-balance bounds of Hekstra and Willems [6], show that as the feedback rate converges to zero, the average-error capacity region converges to the average-error capacity region of the same MAC in the absence of feedback. The problem we study here can also be formulated as an “edge removal problem” as introduced by Ho, Effros, and Jalali [7], [8]. The edge removal problem seeks to quantify the capacity effect of removing a single edge from a network. Except in the MAC with CF setting and a number of cases described in [7], [8], the problem remains open. In fact, Effros and Langberg show that this problem is connected to a number of other open problems in network coding, including the difference between the 0-error and -error capacity regions [9] and the difference between the lossless source coding regions for independent and dependent sources [10]. The question of whether the capacity region of a network consisting of noiseless links is continuous with respect to the link capacities is investigated by Gu, Effros, and Bakshi [11] and Chan and Grant [12]. The present work differs from [11], [12] in the network under consideration; while our network does have noiseless links (the CF input and output links), it also contains a multiterminal component (the MAC) which may exhibit interference or noise. In [13], Kosut and Kliewer present different variations of the edge removal problem in a unified setting. In their terminology, the present work investigates whether the network consisting of a MAC and a CF satisfies the “weak edge removal property” with respect to the average-error reliability criterion. In [14, Chapter 1], we discuss the known results for each variation of the edge removal problem. II. T HE C OOPERATION FACILITATOR M ODEL In this work, we study cooperation between two encoders that communicate their messages to a decoder over a discrete, memoryless, and stationary MAC. Such a MAC can be represented by the triple  X1 × X2 , p(y|x1 , x2 ), Y , where X1 , X2 , and Y are finite sets and p(y|x1 , x2 ) is a conditional probability mass function. The nth extension of the channel is given by p(y n |xn1 , xn2 ) := n Y p(yt |x1t , x2t ). t=1 For each positive integer n, called the “blocklength,” and nonnegative real numbers R1 and R2 , called the “rates,” we next define a  2nR1 , 2nR2 , n -code 1 2 1 2 for communication over a MAC with a (Cin , Cout )-CF. Here Cin = (Cin , Cin ) and Cout = (Cout , Cout ) represent the capacities of the CF input and output links, respectively. (See Figure 1.) 3 For i ∈ {1, 2}, the transmission of encoder i to the CF is represented by a mapping3 i ϕi : [2nRi ] → [2nCin ]. The CF, based on the information it receives from the encoders, computes a function 1 2 i ψi : [2nCin ] × [2nCin ] → [2nCout ] for encoder i, where i ∈ {1, 2}. Encoder i, using its message and what it receives from the CF, selects a codeword according to i fi : [2nRi ] × [2nCout ] → Xin . The decoder, using the channel output, aims to find the transmitted messages. It is represented by a mapping g : Y n → [2nR1 ] × [2nR2 ]. The collection of mappings ϕ1 , ϕ2 , ψ1 , ψ2 , f1 , f2 , g  defines a (2nR1 , 2nR2 , n)-code for the MAC with a (Cin , Cout )-CF.4 For a fixed code, the error probability for a particular message pair (w1 , w2 ) is given by X λn (w1 , w2 ) := p(y n |f1 (w1 , z1 ), f2 (w2 , z2 )), y n : g(y n )6=(w1 ,w2 ) where z1 and z2 are the CF outputs. For i ∈ {1, 2}, zi is calculated according to  zi = ψi ϕ1 (w1 ), ϕ2 (w2 ) . The average probability of error is given by (n) := Pe,avg 1 X 2n(R1 +R2 ) λn (w1 , w2 ), w1 ,w2 and the maximal probability of error is given by (n) := max λn (w1 , w2 ). Pe,max w1 ,w2 A rate pair (R1 , R2 ) is achievable with respect to the average-error reliability criterion if there exists a sequence (n) of (2nR1 , 2nR2 , n)-codes such that Pe,avg → 0 as n → ∞. The average-error capacity region of a MAC with a (Cin , Cout )-CF, denoted by Cavg (Cin , Cout ), is the closure of the set of all rate pairs that are achievable with respect to the average-error reliability criterion. The average-error sum-capacity is defined as Csum,avg (Cin , Cout ) := (n) max Cavg (Cin ,Cout ) (R1 + R2 ) (n) By replacing Pe,avg with Pe,max , we can similarly define achievable rates with respect to the maximalerror reliability criterion, the maximal-error capacity region, and the maximal-error sum-capacity. For a MAC 3 Henceforth, for every x ≥ 1, [x] denotes the set {1, . . . , bxc}. 4 Technically, the definition we present here is for a single round of cooperation. Similar to [2], it is possible to define cooperation via a CF over multiple rounds. However, this general scenario does not alter our main proofs. 4 with a (Cin , Cout )-CF, we denote the maximal-error capacity region and sum-capacity by Cmax (Cin , Cout ) and Cmax (Cin , Cout ), respectively. III. P RIOR R ESULTS ON THE S UM -C APACITY G AIN OF C OOPERATION We next describe results from [2], [3] that are relevant to our discussion here. We begin with sum-capacity results in the average-error case. Consider a discrete MAC (X1 × X2 , p(y|x1 , x2 ), Y). Let pind (x1 )pind (x2 ) be a distribution that satisfies Iind (X1 , X2 ; Y ) = max p(x1 )p(x2 ) I(X1 , X2 ; Y ). (1) In addition, suppose that there exists a distribution pdep (x1 , x2 ) whose support is contained in the support of pind (x1 )pind (x2 ), and satisfies  Idep (X1 , X2 ; Y ) + D pdep (y)kpind (y) > Iind (X1 , X2 ; Y ). (2) Let C ∗ denote the class of all discrete MACs for which input distributions pind and pdep , as described above, exist. Then the following theorem [3, Theorem 3] holds. Theorem 1. Let (X1 × X2 , p(y|x1 , x2 ), Y) be a MAC in C ∗ , and suppose (Cin , v) ∈ R2>0 × R2>0 . Then lim+ h→0 Csum,avg (Cin , hv) − Csum,avg (Cin , 0) = ∞. h Consider a MAC in C ∗ with a CF that has input links with equal capacity Cin and output links with equal capacity Cout . Then Theorem 1 implies that for fixed Cin > 0, the average-error sum-capacity has a derivative in Cout that is infinite at Cout = 0.5 We next describe the maximal-error sum-capacity gain. While it is possible in the average-error scenario to achieve a sum-capacity that has an infinite slope, more is known in the maximal-error case. There exists a class of MACs for which the maximal-error sum-capacity exhibits a discontinuity in the capacities of the CF output links. This is stated formally in the next proposition, which is a special case of [2, Proposition 5]. Proposition 2. Consider a discrete MAC for which6 Csum,avg (0, 0) > Csum,max (0, 0); (3) that is, the average-error sum-capacity is strictly greater than the maximal-error sum-capacity. Fix Cin ∈ R2>0 . Then Csum,max (Cin , Cout ) is not continuous at Cout = 0. The possibility of an infinite derivative in the average-error case (Theorem 1) and a discontinuity in the maximalerror scenario (Proposition 2) leads to the following question: Does there exist any MAC and any Cin for which 5 Note that Theorem 1 does not lead to any conclusions regarding continuity; a function f (x) with infinite derivative at x = 0 can be √ continuous (e.g., f (x) = x) or discontinuous (e.g., f (x) = dxe). 6 Dueck in [2]. [15] gives the first proof of the existence of a discrete MAC which satisfies (3). We investigate further properties of Dueck’s MAC 5 Csum,avg (Cin , Cout ) is not continuous at Cout = 0? This problem is posed in [2, Section IV]. We address this question in the next section, where we describe our results. IV. C ONTINUITY OF AVERAGE - AND M AXIMAL -E RROR S UM -C APACITIES In the prior section, for a fixed Cin , we discuss previous results regarding the continuity of Csum,avg (Cin , Cout ) and Csum,max (Cin , Cout ) as a function of Cout at Cout = 0. In this section, we do not limit ourselves to the point Cout = 0; rather, we study the continuity of Csum,avg (Cin , Cout ) over its entire domain. We begin by considering the case where the CF has full access to the messages. Formally, for a given discrete ∗1 ∗2 MAC (X1 × X2 , p(y|x1 , x2 ), Y), let the components of C∗in = (Cin , Cin ) be sufficiently large so that any CF with ∗1 ∗2 input link capacities Cin and Cin has full knowledge of the encoders’ messages. For example, we can choose C∗in such that ∗1 ∗2 min{Cin , Cin } > max I(X1 , X2 ; Y ). p(x1 ,x2 ) Our first result addresses the continuity of Csum,avg (C∗in , Cout ) as a function of Cout over R2≥0 . Theorem 3. For any discrete MAC, the mapping Cout 7→ Csum,avg (C∗in , Cout ), (4) defined on R2≥0 is continuous. We provide an overview of the proof in Section V and present the details in Section VII. While Theorem 3 focuses on the scenario where Cin = C∗in , its result is sufficiently strong to address the continuity problem for a fixed, arbitrary Cin at Cout = 0. To see this, note that for all Cin ∈ R2≥0 , Csum,avg (Cin , 0) ≤ Csum,avg (Cin , Cout ) ≤ Csum,avg (C∗in , Cout ). (5) Corollary 4, below, now follows from Theorem 3 by letting Cout approach zero in (5) and noting that for all Cin ∈ R2≥0 , Csum,avg (C∗in , 0) = Csum,avg (Cin , 0) = Csum,avg (0, 0). Corollary 4. For any discrete MAC and any Cin ∈ R2≥0 , the mapping Cout 7→ Csum,avg (Cin , Cout ), is continuous at Cout = 0. Recall that Proposition 2 gives a sufficient condition under which Csum,max (Cin , Cout ) is not continuous at Cout = 0 for a fixed Cin ∈ R2>0 . From Corollary 4, it follows that the sufficient condition is necessary as well. This is stated in the next corollary. The proof appears in Section VII. Corollary 5. Fix a discrete MAC and Cin ∈ R2>0 . Then Csum,max (Cin , Cout ) is not continuous at Cout = 0 if and only if Csum,avg (0, 0) > Csum,max (0, 0). (6) 6 We next describe the second main result of this paper. Our first main result, Theorem 3, shows the continuity of Csum,avg (C∗in , Cout ) over R2≥0 . The next result shows that proving the continuity of Csum,avg (Cin , Cout ) over R2≥0 × R2≥0 is equivalent to demonstrating its continuity on certain axes. Specifically, it suffices to check the 1 2 continuity of Csum,avg when one of Cout and Cout is approaching zero, while the other arguments of Csum,avg are fixed positive numbers. Theorem 6. For any discrete MAC, the mapping (Cin , Cout ) 7→ Csum,avg (Cin , Cout ), (7) defined on R2≥0 × R2≥0 is continuous if and only if for all (Cin , Cout ) ∈ R2>0 × R2>0 , we have lim 1 →0+ C̃out lim 2 →0+ C̃out   1 2 2 Csum,avg Cin , (C̃out , Cout ) = Csum,avg Cin , (0, Cout )   1 2 1 Csum,avg Cin , (Cout , C̃out ) = Csum,avg Cin , (Cout , 0) . We remark that using a time-sharing code, it is possible to show that Csum,avg is concave on R2≥0 × R2≥0 , and thus continuous on its interior. Thus it suffices to study the continuity of Csum,avg on the boundary of R2≥0 × R2≥0 . Sections V and VI provide proof overviews of Theorem 3 and Theorem 6, respectively. Detailed proofs of the lemmas presented in these sections appear in Section VII. V. C ONTINUITY OF S UM -C APACITY: T HE Cin = C∗in C ASE We start our study of the continuity of Csum (C∗in , Cout )7 by presenting lower and upper bounds in terms of an auxiliary function σ(δ) defined for δ ≥ 0 (Lemma 8). A similar function appears in Dueck [16]; our function differs with [16] in a time-sharing random variable. This random variable, denoted by U below, plays two roles. First it ensures σ is concave, which immediately proves the continuity of σ over R>0 . Second, together with a lemma from [16] (Lemma 11 below), it helps us find a single-letter upper bound for σ (Corollary 12). We then use the single-letter upper bound to prove continuity at δ = 0. The following definitions are useful for the description of our lower and upper bounds for Csum (C∗in , Cout ). For every finite alphabet U and all δ ≥ 0, define n o (n) PU (δ) := p(u, xn1 , xn2 ) I(X1n ; X2n |U ) ≤ nδ . For every n, define the function σn : R≥0 → R≥0 as8 σn (δ) := sup U max (n) p∈PU (δ) 1 I(X1n , X2n ; Y n |U ), n (8) where the supremum is over all finite sets U. As we see in Lemma 10, the conditioning on the random variable U in (8) ensures that σn is convex. 7 Henceforth, we write the average-error sum-capacity as Csum (C∗in , Cout ), since we are no longer concerned with the maximal-error sum-capacity. 8 For n = 1, this function also appears in the study of the MAC with negligible feedback [5]. 7 For every δ ≥ 0, (σn (δ))∞ n=1 satisfies a superadditivity property which appears in Lemma 7, below. Intuitively, this property says that the sum-rate of the best code of blocklength m + n is bounded from below by the sum-rate of the concatenation of the best codes of blocklengths m and n. Lemma 7. For all m, n ≥ 1 and all δ ≥ 0, (m + n)σm+n (δ) ≥ mσm (δ) + nσn (δ). Given Lemma 7, [17, Appendix 4A, Lemma 2] now implies that the sequence (σn (δ))∞ n=1 converges for every δ ≥ 0, and lim σn (δ) = sup σn (δ). n→∞ n Therefore, we can define the function σ : R≥0 → R≥0 as σ(δ) := lim σn (δ). n→∞ (9) We next present our lower and upper bounds for Csum (C∗in , Cout ) in terms of σ. The lower bound follows directly from [3, Corollary 8]. Lemma 8. For any discrete MAC and any Cout ∈ R2≥0 , we have 1 2 1 2 1 2 σ(Cout + Cout ) − min{Cout , Cout } ≤ Csum (C∗in , Cout ) ≤ σ(Cout + Cout ). From the remark following Theorem 6, we only need to prove that Csum (C∗in , Cout ) is continuous on the 1 2 boundary of R2≥0 . Note that on the boundary of R2≥0 , however, min{Cout , Cout } = 0. Thus it suffices to show that σ is continuous on R≥0 , which is stated in the next lemma. Lemma 9. For any finite alphabet MAC, the function σ, defined by (9), is continuous on R≥0 . To prove Lemma 9, we first consider the continuity of σ on R>0 and then deal with the point δ = 0. Note that σ is the pointwise limit of the sequence of functions (σn )∞ n=1 . Using a time-sharing argument as in [18], it is possible to show that each σn is concave (Lemma 10). Therefore, σ is concave as well, and since R>0 is open, σ is continuous on R>0 . Lemma 10 (Concavity of σn ). For all n ≥ 1, σn is concave on R≥0 . To prove the continuity of σ(δ) at δ = 0, we find an upper bound for σ in terms of σ1 . For some finite set U (n) and δ > 0, consider a distribution p ∈ PU (δ). With respect to p, I(X1n ; X2n |U ) ≤ nδ. (10) To find a bound for σ in terms of σ1 , we need a single-letter version of (10). In [16], Dueck presents such a bound. We present Dueck’s result in the next lemma and include its proof for completeness. 8 (n) Lemma 11 (Dueck’s Lemma [16]). Fix , δ > 0, positive integer n, and finite alphabet U. If p ∈ PU (δ), then there exists a set T ⊆ [n] satisfying |T | ≤ nδ ,  such that ∀t∈ / T : I(X1t ; X2t |U, X1T , X2T ) ≤ , where for i ∈ {1, 2}, XiT := (Xit )t∈T . Using Lemma 11, it is possible to find an upper bound for σ in terms of σ1 , which we present in the next corollary. The proof of this corollary combines ideas from [16] with results derived here. Corollary 12. For all , δ > 0, we have  δ σ δ ≤ log |X1 ||X2 | + σ1 ().  By Corollary 12, we have σ(0) ≤ lim+ σ(δ) ≤ σ1 (). δ→0 If we calculate the limit  → 0+ , we get σ(0) ≤ lim+ σ(δ) ≤ lim+ σ1 (). δ→0 →0 Since σ(0) = σ1 (0), it suffices to show that σ1 is continuous at δ = 0. Recall that σ1 is defined as σ1 (δ) := sup max I(X1 , X2 ; Y |U ). U (1) (11) p∈PU (δ) Since in (11), the supremum is over all finite sets U, it is difficult to find an upper bound for σ1 (δ) near δ = 0 directly. Instead we first show that it is possible to assume that U has at most two elements. Lemma 13 (Cardinality of U). In the definition of σ1 (δ), it suffices to calculate the supremum over all sets U with |U| ≤ 2. From Lemma 13, using standard tools, such as Pinsker’s inequality [19, Lemma 17.3.3] and the L1 bound on entropy [19, Lemma 11.6.1], the continuity of σ1 at δ = 0 follows.9 Lemma 14 (Continuity of σ1 ). The function σ1 is continuous on R≥0 . VI. C ONTINUITY OF S UM -C APACITY: A RBITRARY Cin In this section, we study the continuity of Csum (Cin , Cout ) over R2≥0 × R2≥0 with the aim of proving Theorem 6. 9 By Lemma 10, σ1 is concave on R≥0 ; thus, it is continuous on R>0 . 9 Fix (Cin , Cout ). For arbitrary (C̃in , C̃out ), the triangle inequality implies Csum (C̃in , C̃out ) − Csum (Cin , Cout ) ≤ Csum (C̃in , C̃out ) − Csum (Cin , C̃out ) + Csum (Cin , C̃out ) − Csum (Cin , Cout ) (12) We study this bound in the limit (C̃in , C̃out ) → (Cin , Cout ). We begin by considering the first term in (12). Lemma 15 (Continuity of Sum-Capacity in Cin ). There exists a function ∆ : R2≥0 × R2≥0 → R≥0 that satisfies lim ∆(Cin , C̃in ) = 0, C̃in →Cin and for any finite alphabet MAC and (Cin , C̃in , Cout ) ∈ R2≥0 × R2≥0 × R2≥0 , we have Csum (Cin , Cout ) − Csum (C̃in , Cout ) ≤ ∆(Cin , C̃in ). Applying Lemma 15 to (12), we get Csum (C̃in , C̃out ) − Csum (Cin , Cout ) ≤ ∆(Cin , C̃in ) + Csum (Cin , C̃out ) − Csum (Cin , Cout ) . Thus to calculate the limit (C̃in , C̃out ) → (Cin , Cout ), it suffices to consider lim Csum (Cin , C̃out ) − Csum (Cin , Cout ) . C̃out →Cout This is done in the next lemma. Lemma 16 (Continuity of Sum-Capacity in Cout ). For any finite alphabet MAC and (Cin , Cout ) ∈ R2≥0 × R2≥0 , proving that lim Csum (Cin , C̃out ) = Csum (Cin , Cout ). C̃out →Cout is equivalent to showing that for all (Cin , Cout ) ∈ R2>0 × R2>0 , we have lim 1 →0+ C̃out lim 2 →0+ C̃out   1 2 2 Csum Cin , (C̃out , Cout ) = Csum Cin , (0, Cout )   1 2 1 Csum Cin , (Cout , C̃out ) = Csum Cin , (Cout , 0) . VII. P ROOFS In this section, we begin with the proof of Corollary 5. We then provide detailed proofs of the lemmas appearing in Sections V and VI. 10 A. Proof of Corollary 5 (Necessary and Sufficient Condition for Discontinuity of Maximal-Error Sum-Capacity) If (6) holds, then by Proposition 2, Csum,max (Cin , Cout ) is not continuous at Cout = 0. Here we prove the reverse direction. To this end, we show that if Csum,avg (0, 0) = Csum,max (0, 0), (13) then Csum,max (Cin , Cout ) is continuous at Cout = 0. We begin by defining the function f : R≥0 → R≥0 as f (Cout ) := Csum,max (C∗in , (Cout , Cout )) Then by [2, Theorem 1] and (13), for all Cout ≥ 0, we have f (Cout ) = Csum,avg (C∗in , (Cout , Cout )). ∗ := 1 2 For each Cout ∈ R2≥0 , let Cout max{Cout , Cout }. Then for any Cin ∈ R2≥0 , ∗ f (0) ≤ Csum,max (Cin , Cout ) ≤ f (Cout ). If we now let Cout → 0 and apply Theorem 3, the continuity of Csum,max (Cin , Cout ) at Cout = 0 follows. B. Proof of Lemma 7 (n) By the definition of σn (δ), for all  > 0, there exist finite alphabets U0 and U1 and distributions pn ∈ PU0 (δ) (m) and pm ∈ PU1 (δ) such that In (X1n , X2n ; Y n |U0 ) ≥ nσn (δ) − n Im (X1m , X2m ; Y m |U1 ) ≥ mσm (δ) − m. Consider the distribution pn+m (u0 , u1 , xn+m , xn+m ) = pn (u0 , xn1 , xn2 )pm (u1 , xn+1:n+m , xn+1:n+m ). 1 2 1 2 (n+m) Let U := U0 × U1 . Then it is straightforward to show that that pn+m ∈ PU (δ), and In+m (X1n+m , X2n+m ; Y n+m |U0 , U1 ) ≥ nσn (δ) + mσm (δ) − (n + m), which implies the desired result. C. Proof of Lemma 8 We first prove the lower bound. For i ∈ {1, 2}, choose Cid such that i 0 ≤ Cid ≤ Cout . Let p(u, x1 , x2 ) be any distribution satisfying I(X1 ; X2 |U ) = C1d + C2d . 11 Then [3, Corollary 8] implies that Csum (C∗in , Cout ) ≥ I(X1 , X2 ; Y |U ) − min{C1d , C2d }. Applying the same corollary to the MAC p(y n |xn1 , xn2 ) = Y p(yt |x1t , x2t ), t∈[n] proves our lower bound. For the upper bound, consider a sequence of (2nR1 , 2nR2 , n)-codes for the MAC with a (C∗in , Cout )-CF. By the data processing inequality, 1 2 I(X1n ; X2n ) ≤ n(Cout + Cout ). In addition, from Fano’s inequality it follows that there exists a sequence (n )∞ n=1 such that H(W1 , W2 |Y n ) ≤ nn , and n → 0 as n → ∞. We have n(R1 + R2 ) = H(W1 , W2 ) = I(W1 , W2 ; Y n ) + H(W1 , W2 |Y n ) = I(X1n , X2n ; Y n ) + nn 1 2 ≤ nσ(Cout + Cout ) + nn . Dividing by n and taking the limit n → ∞ completes the proof. D. Proof of Lemma 10 (Concavity of σn ) It suffices to prove the result for n = 1. We apply the technique from [18]. Note that σ1 (δ) = sup max I(X1 , X2 ; Y |U ). U (1) p∈PU (δ) (1) Fix a, b ≥ 0, λ ∈ (0, 1), and  > 0. Then there exist finite sets U0 and U1 and distributions p0 ∈ PU0 (a) and (1) p1 ∈ PU1 (b) satisfying I0 (X1 , X2 ; Y |U0 ) ≥ σ1 (a) −  I1 (X1 , X2 ; Y |U1 ) ≥ σ1 (b) − , respectively. Define the alphabet V as V := {0} × U0 ∪ {1} × U1 . We denote an element of V by v = (v1 , v2 ). Define the distribution pλ (v, x1 , x2 ) as pλ (v, x1 , x2 ) = pλ (v1 )pv1 (v2 , x1 , x2 ), 12 where pλ (v1 ) =   1 − λ if v1 = 0  λ if v1 = 1. Then Iλ (X1 ; X2 |V ) = Iλ (X1 , X2 |V1 , V2 ) = (1 − λ)I(X1 ; X2 |V1 = 0, V2 ) + λI(X1 ; X2 |V1 = 1, V2 ) = (1 − λ)I0 (X1 ; X2 |U0 ) + λI1 (X1 ; X2 |U1 ) ≤ (1 − λ)a + λb, (1) which implies pλ ∈ PV ((1 − λ)a + λb). Similarly, Iλ (X1 , X2 ; Y |V ) = Iλ (X1 , X2 ; Y |V1 , V2 ) = (1 − λ)I(X1 , X2 ; Y |V1 = 0, V2 ) + λI(X1 , X2 ; Y |V1 = 1, V2 ) = (1 − λ)I0 (X1 , X2 ; Y |U0 ) + λI1 (X1 , X2 ; Y |U1 ) ≥ (1 − λ)σ1 (a) + λσ1 (b) − . Therefore,  σ1 (1 − λ)a + λb ≥ (1 − λ)σ1 (a) + λσ1 (b) − . The result now follows from the fact that the above equation holds for all  > 0. E. Proof of Lemma 13 (1) Let U be some finite set and let p∗ ∈ PU (δ) be a distribution that achieves max I(X1 , X2 ; Y |U ). (1) p∈PU (δ) Let Q ⊆ R|U | denote the set of all vectors (q(u))u∈U that satisfy q(u) ≥ 0 for all u ∈ U X q(u) = 1 u∈U X q(u)I ∗ (X1 ; X2 |U = u) = I ∗ (X1 ; X2 |U ), (14) u∈U where in (14), I ∗ (X1 ; X2 |U = u) and I ∗ (X1 ; X2 |U ) are calculated according to p∗ (x1 , x2 |u) and p∗ (u, x1 , x2 ), respectively. Consider the mapping F : Q → R≥0 defined by X F [q] := q(u)I ∗ (X1 , X2 ; Y |U = u), (15) u∈U where I ∗ (X1 , X2 ; Y |U = u) is calculated with respect to p∗ (x1 , x2 |u)p(y|x1 , x2 ). Note that since p∗ (u) ∈ Q, we have max F [q] = q∈Q max I(X1 , X2 ; Y |U ). (1) p∈PU (δ) 13 Thus it suffices to find q ∗ ∈ Q which has at most two non-zero components and at which F obtains its maximal value. Since F is linear in q, it is convex on Q, which is a bounded convex polyhedron in R|U | . Thus there exists an extreme point of Q, say q ∗ ∈ Q, at which F obtains its maximum. Since q ∗ is an extreme point, if we apply [20, p. 50, Theorem 2.3] to the definition of Q, we see that we must have q ∗ (u) = 0 for at least |U| − 2 values of u. This completes the proof. F. Proof of Lemma 14 (Continuity of σ1 ) By Lemma 13, without loss of generality, we can set U := {a, b}. For all δ ≥ 0, we have max I(X1 , X2 ; Y |U ). σ1 (δ) = (1) p∈PU (δ) (1) Fix δ > 0. Let p∗ (u, x1 , x2 ) be a distribution in PU (δ) achieving the maximum above, and define p∗ind (x1 , x2 |u) := p∗ (x1 |u)p∗ (x2 |u). Since X  p∗ (u)D p∗ (x1 , x2 |u)kp∗ind (x1 , x2 |u) = I ∗ (X1 ; X2 |U ) ≤ δ, u∈U by [19, Lemma 11.6.1], X p∗ (u) p∗ (x1 , x2 |u) − p∗ind (x1 , x2 |u) 2 L1 ≤ 2δ ln 2. (16) u∈U In addition, X p∗ (u) p∗ (y|u) − p∗ind (y|u) L1 u∈U ≤ X p∗ (u) ≤ p(y|x1 , x2 ) p∗ (x1 , x2 |u) − p∗ind (x1 , x2 |u) x1 ,x2 u∈U X X p∗ (u) p∗ (x1 , x2 |u) − p∗ind (x1 , x2 |u) L1 u∈U ≤ √ 2δ ln 2, (17) where (17) follows from (16) and the Cauchy-Schwarz inequality. Define the subset U0 ⊆ U as n U0 = u ∈ U : p∗ (y|u) − p∗ind (y|u) L1 o ≤ 1/2 . Clearly, by (17), X u∈U / 0 √ p∗ (u) ≤ 2 2δ ln 2. (18) 14 Thus ∗ H ∗ (Y |U ) − Hind (Y |U ) X ∗ (Y |U = u) ≤ p∗ (u) H ∗ (Y |U = u) − Hind u∈U √ ≤ 2 2δ ln 2 log |Y| (a) − X p∗ (u) p∗ (y|u) − p∗ind (y|u) L1 log u∈U0 p∗ (y|u) − p∗ind (y|u) |Y| L1  1 √  √ √ 2δ ln 2 ≤ 2 2δ ln 2 log |Y| − 2δ ln 2 log |Y| 3 √ |Y| = 2δ ln 2 log √ , 2δ ln 2 (b) (19) where (a) follows from (18) and [19, Theorem 17.3.3], and (b) follows from (17) and the fact that the mapping t 7→ −t log(t/|Y|) is concave on its domain and increasing for sufficiently small t.10 In addition, by (17), ∗ H ∗ (Y |U, X1 , X2 ) − Hind (Y |U, X1 , X2 ) X ≤ p∗ (u, x1 , x2 ) − p∗ind (u, x1 , x2 ) H(Y |X1 = x1 , X2 = x2 ) u,x1 ,x2 ≤ max H(Y |X1 = x1 , X2 = x2 ) · x1 ,x2 ≤  X p∗ (u) p∗ (x1 , x2 |u) − p∗ind (x1 , x2 |u) L1 u∈U0 log |Y| √ 2δ ln 2. (20) Thus by (19) and (20), σ1 (δ) = I ∗ (X1 , X2 ; Y |U ) = H ∗ (Y |U ) − H ∗ (Y |U, X1 , X2 ) ∗ ∗ (Y |U, X1 , X2 ) (Y |U ) + H ∗ (Y |U, X1 , X2 ) − Hind ≤ H ∗ (Y |U ) − Hind ∗ + Iind (X1 , X2 ; Y |U ) ≤ √ 2δ ln 2 log √  √ |Y|3 + log |Y| 2δ ln 2 + σ1 (0). 2δ ln 2 Since σ1 (0) ≤ σ1 (δ) for all δ ≥ 0, the continuity of σ1 at δ = 0+ follows. G. Proof of Lemma 11 (Dueck’s Lemma) If for all t ∈ [n], we have I(X1t ; X2t |U ) ≤ , then we define T := ∅. Otherwise, there exists t1 ∈ [n] such that I(X1t1 ; X2t1 |U ) > . 10 Precisely, the mapping t 7→ −t log(t/|Y|) is increasing on (0, |Y|/e). (21) 15 Let S1 := [n] \ {t1 }. Then I(X1n ; X2n |U ) = I(X1n ; X2t1 |U ) + I(X1n ; X2S1 |U, X2t1 ) = I(X1t1 ; X2t1 |U ) + I(X1S1 ; X2t1 |U, X1t1 ) + I(X1t1 ; X2S1 |U, X2t1 ) + I(X1S1 ; X2S1 |U, X1t1 , X2t1 ) ≥ I(X1t1 ; X2t1 |U ) + I(X1S1 ; X2S1 |U, X1t1 , X2t1 ). Since I(X1n ; X2n |U ) ≤ nδ, using (21), we get I(X1S1 ; X2S1 |U, X1t1 , X2t1 ) ≤ nδ − . Now if for all t ∈ S1 , I(X1t ; X2t |U, X1t1 , X2t1 ) ≤ , then we define T := {t1 }. Otherwise, there exists t2 ∈ [n] such that I(X1t2 ; X2t2 |U, X1t1 , X2t1 ) > . Similar to the above argument, if we define S2 := [n] \ {t1 , t2 }, then I(X1S2 ; X2S2 |U, X1t1 , X1t2 , X2t1 , X2t2 ) ≤ nδ − 2. If we continue this process, we eventually get a set T := {t1 , . . . , tk } such that c c I(X1T ; X2T |U, X1T , X2T ) ≤ nδ − |T |, (22) and for all t ∈ Sk := T c , I(X1t ; X2t |U, X1T , X2T ) ≤ . In addition, from (22) it follows that |T | ≤ nδ .  (23) H. Proof of Corollary 12 Fix a positive integer n. By Lemma 13, we can set U := {a, b}. From Lemma 11, it follows that there exists a set T ⊆ [n] such that 0 ≤ |T | ≤ nδ ,  (24) and ∀t∈ / T : I(X1t ; X2t |U, X1T , X2T ) ≤ . Thus c c I(X1n , X2n ; Y n |U ) = I(X1T , X2T ; Y n |U ) + I(X1T , X2T ; Y n |U, X1T , X2T ) c c ≤ |T | log |X1 ||X2 | + I(X1T , X2T ; Y n |U, X1T , X2T ). (25) 16 We further bound the second term on the right hand side by c c I(X1T , X2T ; Y n |U, X1T , X2T ) c c c c c c = I(X1T , X2T ; Y T |U, X1T , X2T ) + I(X1T , X2T ; Y T |U, X1T , X2T , Y T ) X ≤ I(X1t , X2t ; Yt |U, X1T , X2T ) t∈T / ≤ n max I(X1 , X2 ; Y |V ) ≤ nσ1 (), (1) (26) p∈PV () where |T | |T | V := U × X1 × X2 . Therefore, by (24), (25), and (26), δ 1 I(X1n , X2n ; Y n |U ) ≤ log |X1 ||X2 | + σ1 (), n  which completes the proof. I. Proof of Lemma 15 (Continuity of Sum-Capacity in Cin ) Fix Cout ∈ R2≥0 . Define the functions f, g : R2≥0 → R as f (Cin ) := Csum (Cin , Cout ) − Csum (Cin , 0) = Csum (Cin , Cout ) − Csum (0, 0) 1 2 g(Cin ) := Cin + Cin − g(Cin ). Note that since f is concave, g is convex. Thus for all λ ∈ [0, 1] and all (Cin , C̃in ), g(λCin + (1 − λ)C̃in ) ≤ λg(Cin ) + (1 − λ)g(C̃in ). Since g(0) = 0, setting C̃in = 0 gives g(λCin ) ≤ λg(Cin ) Note that by [3, Proposition 6], g is nonnegative. Thus g(λCin ) ≤ g(Cin ), which when written in terms of f , is equivalent to 1 2 f (Cin ) − f (λCin ) ≤ (1 − λ)(Cin + Cin ). Consider Cin , C̃in ∈ R2≥0 . Define the pairs Cin , C̄in ∈ R2≥0 as ¯ i i i := min{Cin ∀ i ∈ {1, 2} : Cin , C̃in } ¯ i i i := max{Cin ∀ i ∈ {1, 2} : C̄in , C̃in } (27) 17 Next define λ∗ (Cin , C̃in ) ∈ [0, 1] as11 i i /C̄in . λ∗ := min Cin i∈{1,2} ¯ Then f (Cin ) − f (C̃in ) ≤ f (Cin ) − f (Cin ) + f (Cin ) − f (C̃in ) ¯ ¯ (28) = f (Cin ) − f (Cin ) + f (C̃in ) − f (Cin ) ¯ ¯ (29) ≤ f (Cin ) − f (λ∗ Cin ) + f (C̃in ) − f (λ∗ C̃in ) (30) 1 2 1 2 ≤ (1 − λ∗ )(Cin + Cin ) + (1 − λ∗ )(C̃in + C̃in ), (31) where (28) follows from the triangle inequality, (29) follows from the definition of Cin , (30) follows from the ¯ definition of λ∗ , and (31) follows from (27). Finally, if we let C̃in → Cin in (30), we see that f (C̃in ) → f (Cin ), since lim λ∗ (Cin , C̃in ) = 1. C̃in →Cin J. Proof of Lemma 16 (Continuity of Sum-Capacity in Cout ) Recall that we only need to verify continuity on the boundary of R2≥0 × R2≥0 ; namely, the set of all points 1 2 1 2 (Cin , Cout ) where at least one of Cin , Cin , Cout , or Cout is zero. We first show that lim Csum (Cin , C̃out ) = Csum (Cin , Cout ). C̃out →Cout 1 2 holds if Cout = 0, or if either Cin = 0 or Cin = 0. For the case Cout = 0, note that Csum (Cin , C̃out ) − Csum (Cin , 0) = Csum (Cin , C̃out ) − Csum (0, 0) ≤ Csum (C∗in , C̃out ) − Csum (0, 0), which goes to zero as C̃out → 0 by Theorem 3. 2 Next suppose Cin = 0. In this case, we have   1 1 2 Csum (Cin , 0), C̃out = Csum (Cin , 0), (0, C̃out ) . Let f : R≥0 → R≥0 denote the function  2 1 2 f (Cout ) := Csum (Cin , 0), (0, Cout ) . 2 Note that f is continuous on R>0 since it is concave. To prove the continuity of f at Cout = 0, observe that 2 f (Cout ) equals the sum-capacity of a MAC with a (C12 , 0)-conference [1], where 1 2 C12 := min{Cin , Cout }. i = 0, set λ∗ := min{1, C 2 /C̄ 2 }. If C̄ 1 = C̄ 2 = 0, set λ∗ = 1. These definitions ensure the for some i ∈ {1, 2}, say i = 1, C̄in in in ¯ in in ∗ continuity of λ in (Cin , C̃in ). 11 If 18 From the capacity region given in [1], we have 2 1 2 f (Cout ) ≤ f (0) + min{Cin , Cout }, 2 1 from which implies that f is continuous at Cout = 0. The case where Cin = 0 follows similarly. 2 1 Finally, consider the case where Cout = 0, but Cout > 0. In this case, we apply the next lemma for concave functions that are nondecreasing as well. Lemma 17. Let f : R≥0 → R≥0 be concave and nondecreasing. Then if |x − y| ≤ min{x, y}, f (x) − f (y) ≤ f (|x − y|) − f (0). We have 1 2 1 Csum (Cin , (C̃out , C̃out )) − Csum (Cin , (Cout , 0)) (a) 1 2 1 1 2 1 2 , C̃out )) − Csum (Cin , (Cout , 0)) , C̃out )) − Csum (Cin , (Cout , C̃out )) + Csum (Cin , (Cout ≤ Csum (Cin , (C̃out (b) 1 1 2 2 − Cout |, C̃out )) − Csum (Cin , (0, C̃out )) ≤ Csum (Cin , (|C̃out 1 2 1 , C̃out )) − Csum (Cin , (Cout , 0)) , + Csum (Cin , (Cout 1 , 0), where (a) follows from the triangle inequality, and (b) follows from Lemma 17. If we now let C̃out → (Cout Corollary 4 implies lim 1 ,0) C̃out →(Cout 1 2 1 Csum (Cin , (C̃out , C̃out )) − Csum (Cin , (Cout , 0)) ≤ lim 2 →0 C̃out 1 2 1 Csum (Cin , (Cout , C̃out )) − Csum (Cin , (Cout , 0)) , 2 1 > 0. = 0, but Cout from which our result follows. An analogous proof applies in the case where Cout VIII. S UMMARY Consider a network consisting of a discrete MAC and a CF that has full knowledge of the messages. In this work, we show that the average-error sum-capacity of such a network is always a continuous function of the CF output link capacities; this is in contrast to our previous results on maximal-error sum-capacity [2]. Our proof method relies on finding lower and upper bounds on the average-error sum-capacity and then using a modified version of a technique developed by Dueck [16] to demonstrate continuity. R EFERENCES [1] F. M. J. Willems, “The discrete memoryless multiple access channel with partially cooperating encoders,” IEEE Trans. Inf. Theory, vol. IT-29, no. 3, pp. 441–445, 1983. [2] P. Noorzad, M. Effros, and M. Langberg, “Can negligible rate increase network reliability?” IEEE Trans. Inf. Theory, to be published. [Online]. Available: http://ieeexplore.ieee.org/document/7944667/ [3] ——, “The unbounded benefit of encoder cooperation for the k-user MAC,” IEEE Trans. Inf. Theory, to be published. [Online]. Available: http://ieeexplore.ieee.org/document/8125167/ [4] M. Langberg and M. Effros, “On the capacity advantage of a single bit,” in IEEE Globecom Workshops, 2016. 19 [5] A. D. Sarwate and M. Gastpar, “Some observations on limited feedback for multiaccess channels,” in IEEE Int. Symp. Information Theory (ISIT), 2009. [6] A. P. Hekstra and F. M. J. Willems, “Dependence balance bounds for single-output two-way channels,” IEEE Trans. Inf. Theory, vol. 35, no. 1, pp. 44–53, 1989. [7] T. Ho, M. Effros, and S. Jalali, “On equivalence between network topologies,” in Allerton Conf. Communication, Control, and Computing, 2010. [8] S. Jalali, M. Effros, and T. Ho, “On the impact of a single edge on the network coding capacity,” in Information Theory and Applications Workshop, 2011. [9] M. Langberg and M. Effros, “Network coding: Is zero error always possible?” in Allerton Conf. Communication, Control, and Computing, 2011. [10] ——, “Source coding for dependent sources,” in IEEE Information Theory Workshop, 2012. [11] W. Gu, M. Effros, and M. Bakshi, “A continuity theory for lossless source coding over networks,” in Proc. Allerton Conf. Communication, Control, and Computing, 2008. [12] T. Chan and A. Grant, “On capacity regions of non-multicast networks,” in Proc. IEEE Int. Symp. Information Theory, 2010. [13] O. Kosut and J. Kliewer, “Strong converses are just edge removal properties,” Jun. 2017. [Online]. Available: http://arxiv.org/abs/1706.08172 [14] P. Noorzad, “Network effects in small networks: A study of cooperation,” Ph.D. dissertation, California Institute of Technology, June 2017. [15] G. Dueck, “Maximal error capacity regions are smaller than average error capacity regions for multi-user channels,” Probl. Contr. Inform. Theory, vol. 7, no. 1, pp. 11–19, 1978. [16] ——, “The strong converse of the coding theorem for the multiple-access channel,” Journal of Combinatorics, Information, and System Sciences, vol. 6, pp. 187–196, 1981. [17] R. G. Gallager, Information Theory and Reliable Communication, 1st ed. Wiley, 1968. [18] T. M. Cover, A. El Gamal, and M. Salehi, “Multiple access channels with arbitrary correlated sources,” IEEE Trans. Inf. Theory, vol. IT-26, no. 6, pp. 648–657, 1980. [19] T. M. Cover and J. A. Thomas, Elements of Information Theory, 2nd ed. [20] D. Bertsimas and J. N. Tsitsiklis, Introduction to Linear Optimization. Wiley, 2006. Athena Scientific, 1997.
7cs.IT
MRI Tumor Segmentation with Densely Connected 3D CNN Lele Chen†1 , Yue Wu†1 , Adora M. DSouza2 , Anas Z. Abidin3 , Axel Wismüller2,3,4,5 , and Chenliang Xu1 1 Department of Computer Science, University of Rochester, NY, USA Department of Electrical Engineering, University of Rochester, NY, USA 3 Department of Biomedical Engineering, University of Rochester, NY, USA 4 Department of Imaging Sciences, University of Rochester, NY, USA 5 Faculty of Medicine and Institute of Clinical Radiology, Ludwig Maximilian University, Germany arXiv:1802.02427v2 [eess.IV] 9 Feb 2018 2 ABSTRACT Glioma is one of the most common and aggressive types of primary brain tumors. The accurate segmentation of subcortical brain structures is crucial to the study of gliomas in that it helps the monitoring of the progression of gliomas and aids the evaluation of treatment outcomes. However, the large amount of required human labor makes it difficult to obtain the manually segmented Magnetic Resonance Imaging (MRI) data, limiting the use of precise quantitative measurements in the clinical practice. In this work, we try to address this problem by developing a 3D Convolutional Neural Network (3D CNN) based model to automatically segment gliomas. The major difficulty of our segmentation model comes with the fact that the location, structure, and shape of gliomas vary significantly among different patients. In order to accurately classify each voxel, our model captures multiscale contextual information by extracting features from two scales of receptive fields. To fully exploit the tumor structure, we propose a novel architecture that hierarchically segments different lesion regions of the necrotic and non-enhancing tumor (NCR/NET), peritumoral edema (ED) and GD-enhancing tumor (ET). Additionally, we utilize densely connected convolutional blocks to further boost the performance. We train our model with a patch-wise training schema to mitigate the class imbalance problem. The proposed method is validated on the BraTS 2017 dataset1 and it achieves Dice scores of 0.72, 0.83 and 0.81 for the complete tumor, tumor core and enhancing tumor, respectively. These results are comparable to the reported state-of-the-art results, and our method is better than existing 3D-based methods in terms of compactness, time and space efficiency. Keywords: 3D CNN, Densely Connected Blocks, MRI, Segmentation 1. INTRODUCTION Glioma segmentation in MRI data provides valuable assistance for treatment planning, disease progression monitoring for oncological patients. Although deep learning technologies have shown a great potential in natural image segmentation, it is not straightforward to apply them for segmenting medical imaging data. In this work, we address the challenging problem of brain tumor segmentation using MRI scans. One of the major difficulties of this task is the class imbalance problem. Since the lesion areas in MRI scans can be extremely small in many cases, additional techniques need to be employed to avoid the background domination. A commonly used strategy is to extract small patches of the whole 3D volume with a pre-defined probability of being centered on lesion area, then train a Convolutional Neural Network (CNN) in a patch-wise fashion.2–6 This approach is an effective way to keep the positive and negative samples balanced. Among the literature that utilizes this patch-wise training schema, two prediction strategies are widely used. The first one can be regarded as patch classification 4–6 where the model predicts a label for the central voxel of that patch. The second one is patch segmentation 3 where the model tries to get a dense prediction of the labels for multiple voxels in that patch simultaneously. In either case, the contextual information of voxels is of great importance to accurate predictions. Kamnitsas et al.3 make dense predictions on a shrunken feature map of †These authors contributed equally. Send correspondence to C. Xu ([email protected]). Our code is available at https://github.com/lelechen63/MRI-tumor-segmentation-Brats. each patch. Their CNN nodes with the receptive field lying outside the input patch are not predicted and do not contribute to the loss. The performance of their method is on par with those using patch classification schema, while it substantially improves the efficiency. In this work, we further improve the performance by introducing a multi-stage 3D CNN to make dense predictions based on two scales of receptive fields. Furthermore, our model is built upon densely connected blocks7 and utilizes a hierarchical architecture to consider different types of brain tumors. Next, we introduce the motivations for each technologies we have employed one-by-one. In CNN, the receptive field of a node is the region of the input signal that is involved in the multi-layer convolution up to that node in a forward pass. Thus, the size of the receptive field determines how much contextual information is taken into account. Some voxels may require only its neighboring information to generate the correct prediction, while others may need distant information. To make the model robust, we predict each voxel based on two sizes of receptive field in a multi-stage architecture. The classification scores are added to obtain the final score. We observe that the multi-stage design significantly boosts the performance. Residual learning,8 since introduced, has gained popularity for all kinds of computer vision tasks. What sets it apart from traditional plain networks is the introduction of shortcut connections that enable the network to go much deeper.9 The shortcut connections attenuate the notorious gradient vanishing problem since gradients can be back-propagated directly through shortcuts. From another point of view, shortcut connections make the entire network a huge ensemble of shallow networks, which boosts the performance. Recently, DenseNet,7 being a successor of applying shortcut connections, incorporates features from all previous layers (thus dense). This change makes the network deeper while having a reduced number of parameters. It has led to improved effectiveness and efficiency in various image classification tasks. However, whether or not the dense connections can improve brain tumor segmentation remains unexplored. To fully exploit the hierarchical structure of the lesion area, we develop a novel architecture that hierarchically segments ED and its subregions, ET and NCR/NET. This is based on our observation that the ET and NCR/NET always lie inside of ED. We thus propose a two-pathway architecture to first segment ED with Fluid Attenuated Inversion Recovery (FLAIR) and T2-weighted (T2) scans, then segment ED and all subregions with all types of MRI scans. We test our models on the Multimodal Brian Tumor Segmentation (BraTS)1 2017 benchmark. The experimental results on BraTS indicate that our model achieves comparable performance to the state-of-the-art methods without bells and whistles, which suggests the potential of our model being applied for lesion segmentation tasks in MRI scans. The innovations introduced by our paper can be summarized as follows: 1) we generalize densely connected blocks to 3D scenarios for MRI brain tumor segmentation tasks; 2) we introduce multi-scale receptive fields for accurate voxel classification and efficient dense inference; 3) we propose a hierarchical segmentation structure inspired by the structure of lesion regions. 2. METHODS 2.1 Hierarchical Segmentation Structure The overall architecture of our model is illustrated in Fig. 1. We concatenate patches from FLAIR and T2, and concatenate patches from native (T1) and post contrast T1-weighted (T1-CE) to generate separate inputs for two independent feature extractors, which share the same structure. The top pathway in Fig. 1 performs a binary classification that segments the whole tumor from the background. The bottom pathway in Fig. 1 concatenates features extracted from T1 and T1-CE with those from FLAIR and T2 (extracted by the top pathway), then feeds them into a 4-class softmax classifier (e.g., background, ED, ET and NCR/NET). Both pathways are updated during the training phase together. In the testing phase, the final predictions are generated from the bottom pathway. This hierarchical pipeline boosts the performance since it follows the label hierarchy of lesion regions. The FLAIR and T2 scans are mainly responsible for separating out ED regions, which are always the largest lesion areas. The ET and NCR/NET regions, segmented with T1 and T1-CE, are inside of ED regions. We take 38 × 38 × 38 patches as inputs and predict the center 12 × 12 × 12 voxels simultaneously at each iteration. softmax 38 38 + 38 38 38 38 softmax Stage 1 T2 FLAIR softmax concatenate 38 38 Stage 2 38 38 38 softmax 38 Stage 1 T1 + Stage 2 T1-CE Figure 1: The overview of our segmentation approach with densely connected 3D CNN hierarchical structure. Stage 1 Conv Conv + Stage 2 3D Dense Block Conv 3D Dense Block + Conv + Figure 2: The structure of densely connected 3D CNN feature extractor. 2.2 Two-Stage Densely Connected 3D CNN Detailed information of our feature extractors is provided in Table 1. We use 24 kernels with each kernel having size of 33 for the initial convolution. In stage 1 and 2, two densely connected blocks are utilized respectively. An illustration is shown in Fig. 2. Each block has 6 convolutional layers with the growth rate of 12. A densely connected block is formulated as: xl+1 = H([x0 , x1 , ..., xl ]) , H(xi ) = W ∗ σ(B(xi )) , i ∈ {0, ..., l} , (1) (2) where W is the weight matrix, ∗ denotes convolution operation, B(·) represents batch normalization,10 σ(·) denotes rectified linear unit11 for activation and [x0 , x1 , ..., xl ] represents the concatenation of all outputs of previous layers before the layer of l + 1. The feature dimension dl of xl is calculated as: dl = d0 + g · l , (3) where g, the growth rate, is the number of kernels used in each convolutional layer, and d0 is the feature dimension after the initial convolution. Receptive field is a region of the input data that is involved in the calculation of a node in hidden layers of a CNN. The size of receptive field of a particular node, which is the output of a convolutional layer without pooling, can be obtained by: rl+1 = rl + (k − 1) · sl , (4) Stage Convolution Stage 1 Stage 2 Layers 3 × 24 conv. [33 × 12 conv.] × 6 [33 × 12 conv.] × 6 3 # Features. 24 96 168 Recep. Field 33 153 273 Table 1: Specifications of the two-stage feature extractor. A densely connected block is applied at each stage. where l is the layer index, k is the kernel size, and sl is the current stride size (we set as 1). In our model, we do not use any downsampling layers in order to preserve the high resolution of patches. Thus, the receptive fields of outputs of the two stages are 15 and 27, respectively, in each dimension of a 3D kernel. An 13 × 168 convolution operation follows the dense block of each stage. Due to the concatenation operations in dense blocks, features from the lowest to the highest level persist. The post 13 convolution serves the purpose of merging features from all levels of abstraction. We have the number of kernels the same as that of the output of the dense block. 3. EXPERIMENT AND RESULTS 3.1 Data One of the challenges in working with MRI data is the dealing with artifacts produced by inhomogeneity in the magnetic field, which is called bias field distortion. This type of distortion is prevalent in MRI scans, which may jeopardize the performance of CNN models. We employ N4ITK bias correction12 for all MRI sequences. This algorithm removes the intensity gradient of each scan. After normalizing the MRI sequences with N4ITK, we normalize each MRI sequence by subtracting the mean value and dividing by its standard deviation. We use the training data of BraTS 2017 challenge, which includes MRI scans of 210 patients, to train and test our model. This dataset is challenging since we are interested in segmenting not only the complete tumor, but also subregions of the tumor, e.g., the necrotic and non-enhancing tumor (NCR/NET), peritumoral edema (ED) and GD-enhancing tumor (ET). Fluid Attenuated Inversion Recovery (FLAIR), native (T1), post contrast T1-weighted (T1-CE) and T2-weighted (T2) scans are acquired for every subject. Each of these modalities captures different properties of the complete tumor and, hence, provides additional useful information required to segment gliomas subregions. We randomly split the whole dataset into training and testing sets, each with 168 (80%) and 42 (20%) MRI sequences. We do not have separate validation set due to the limited amount of data. Instead, we apply the 4-fold validation procedure to tune hyper-parameters. We generate the training patches by the following two steps: (1) randomly sample voxels with 50% being in lesion regions; (2) extract 38 × 38 × 38 3D patches and concatenate these patches from FLAIR and T2, and from T1 and T1-CE to obtain two 38 × 38 × 38 × 2 tensors as the inputs to our two-pathway architecture. 3.2 Training and Testing We use the cross entropy as the loss function, which is formulated as: (i) CE(y , z (i) )=− k X j=1 ezj 1{y (i) = j}log Pk l=1 ezl , (5) where y (i) is the ground-truth of the ith training sample, z (i) is the score output by the model and k is the number of classes. For each training epoch, we randomly extract 400 383 patches with 200 patches centered on the lesion area, and 200 patches centered on the background. Adam optimizer13 is applied with the initial learning rate of 5e-4. Our model is implemented in Tensorflow.14 It takes 2.5 hours to train for an epoch on a single NVIDIA GTX 1080 GPU. The network converges after approximately 5 epochs. To test our model, we first pre-process each testing MRI sequence with N4ITK and normalization. Then, we feed into the network the non-overlapping 383 patches extracted from each MRI sequence to obtain the prediction of 123 at the center of patches. We use sliding window approach to obtain a dense prediction for an MRI sequence. 3.3 Results 3.3.1 Metric We report the testing results in terms of Dice, a widely used metric for evaluating lesion segmentation models. Dice score is calculated as: 2TP , (6) Dice = FN + FP + 2TP where TP, FP and FN stands for “true positive”, “false positive” and “false negative” predictions, respectively. It measures the overlap area of the predicted lesion region and the ground-truth. 3.3.2 Qualitative Results We randomly select two MRI sequences (Brats17 TCIA 121 1 and Brats17 TCIA 377 1) and visualize the segmentation results in Fig. 3. The 2D MRI scan slices on the axial plane view, coronal plane and sagittal plane view are visualized in Fig. 3(a), Fig. 3(b) and Fig. 3(c), respectively. From these example segmentations, we notice that our model has a promising performance for 2D MRI slices. Figure 3(a) suggests that our model has the ability to accurately separate out lesion subregions. The segmentation results of the tumor core and enhancing tumor are most impressive. One limitation of our model, from our observation, is that the predictions are inconsistent along the axis perpendicular to the axial plane. In most cases, lesion regions are concentrated in the center of the whole MRI sequence. However, our model predicts that benign regions can be surrounded by lesion regions in Fig. 3(b) and Fig. 3(c) , which is unlikely to happen. One possible reason is that the 3D convolution cannot capture the long-term dependencies in MRI sequences due to our patch-wise training schema. Our future goal is to address this inconsistency in our predictions. 3.3.3 Quantitative Results Table 2 shows the performance of three state-of-the-art models and ours. The prediction of four subregions is aggregated to generate the “complete tumor” (label 1,2,4), “tumor core” (label 1,4) and “enhancing tumor” (label 4). Both Pereira et al.4 and Zhao et al.5 apply 2D CNN models that take 2D 33 × 33 patches as inputs and predict the label of the center voxel. These architectures can be substantially inefficient due to the repeated computation. Zhao et al.5 further apply conditional random field (CRF) to refine the predictions given by the CNN. The model proposed by Kamnitsas et al.3 makes dense predictions according to the receptive field of each voxel in the final feature map, which inspired the architecture of this work. They build two almost identical pathways that take the original MRI scans and downsampled ones into account, claiming that the use of lowresolution inputs helps incorporate larger contextual information. In our work, instead of modifying the inputs, we incorporate multi-scale contextual information by making predictions at different depths of the network, which makes our model incredibly efficient and boosts the performance. The proposed architecture achieves Dice Comp. Core Enh. 0.84 0.72 0.62 0.90 0.75 0.73 Zhao et al. 0.87 0.83 0.76 Ours 0.72 0.83 0.81 4 Pereira et al. 3 Kamnitsas et al. 5 Table 2: The Dice scores of selected existing models and the proposed model are presented in this table. Our model has the highest dice score in tumor core and enhancing tumor segmentation. scores of 0.72, 0.83 and 0.81 for the complete tumor, tumor core and enhancing tumor segmentation, respectively. Compared with previous models, our method achieves the highest Dice score in tumor core and enhancing tumor segmentation. Kamnitsas et al.3 obtain the highest score in the complete tumor segmentation. These results demonstrate the potential of our model in 3D MRI segmentation tasks. Figure 3: Randomly selected segmentation results of two MRI sequences. T1-CE scans, segmentations and the ground-truth are presented at the top, middle and bottom, respectively. The complete tumor, tumor core and enhancing tumor are indicated in yellow, green and red masks, respectively. (a), (b) and (c) are the slices from the axial plane, coronal plane and sagittal plane, respectively. 3.3.4 Ablation Study Comp. Core Enh. Non-Dense (See Tab. 4) 0.61 0.77 0.78 Non-Hierarchical 0.74 0.74 0.75 Single-Scale Recep. Field 0.62 0.64 0.62 Proposed 0.72 0.83 0.81 Table 3: The experiment results of our ablation study. We separately substantiate the effectiveness of densely connected block, hierarchical inference structure, and multi-scale receptive fields. It can be justified that the removal of each component impairs the overall performance to some extent. Non-Dense Structure. To indicate the improved performance of the dense structure, we build 6 convolutional layers (see Tab. 4) in the linear chain topology for each stage so that the size of the receptive field corresponds to that of the proposed model. Each upper convolution layer has 12 more kernels than the lower layer, which makes the number of features at the predictions layers equal to that of its counterpart. Other components of this non-dense architecture are the same with the proposed model. Non-Hierarchical Structure. To understand the effectiveness of the hierarchical inference structure, we discard the two pathways pipeline illustrated in Fig 1. We concatenate all four types of scans as the inputs, i.e., we extract 38 × 38 × 38 × 4 patches to feed into the network. The classification layers directly predict the scores for four labels. Other configurations remain the same as the proposed model. Stage Convolution Stage 1 Layers 33 × 24 conv. 33 × 36 conv. 33 × 48 conv. 33 × 60 conv. 33 × 72 conv. 33 × 84 conv. 33 × 96 conv. 33 × 108 conv. 33 × 120 conv. 33 × 132 conv. 33 × 144 conv. 33 × 156 conv. 33 × 168 conv. Single-Scale Recep. Field Structure. To verify the advantage of using multi-scale receptive fields, we remove all layers in stage 2 and make predictions only with the output of stage 1. We still make the model predict 123 in one iteration, so the dimension of the input patches becomes 26 × 26 × 26 × 2. Densely connected blocks and the hierarchical inference structure are still applied. These ablation study results (see Tab. 3) substantiate the effectiveness of each component of the proposed model. The non-hierarchical model achieves the closest overall performance to the proposed one. However, it is still outperformed by the proposed model by a large margin in tumor core and enhancing tumor segmentation. The non-dense counterpart is outStage 2 performed by the proposed model in all three categories. It suggests the effectiveness of densely connected blocks is obvious even though the network is relatively shallow compared with those ultra deep networks used in natural image recognition. It is worthwhile to mention that the non-dense network Table 4: Specifications of the two-stage feature extrac- is rather inefficient as more parameters are introtor with traditional convolutional layers (Non-Dense). duced. The model with single-scale receptive field This feature extractor has the same number of features has the lowest accuracy. It further demonstrates that as the densely connected counterpart at prediction lay- taking into account different levels of contextual iners. formation significantly boost the classification accuracy. 4. DISCUSSION AND CONCLUSION In this paper, we introduce a new approach for brain tumor segmentation in MRI scans. DenseNet was initially introduced for the image classification problem. In this work, we explore the potential of densely connected blocks in 3D segmentation tasks. Compared with traditional networks with no skip connections, the improved information flow extracts better features and significantly help the optimization. We take multi-scale receptive fields into account to accurately classify voxels. Our model is made to predict 123 voxels in one iteration to increase the efficiency. Experimental results indicate that the proposed model performs on par with the stateof-the-art models without advanced tricks. The ablation study substantiates the effectiveness of each component of the whole architecture. We thus conclude that the proposed model has great potential for MRI segmentation or other medical image segmentation tasks. REFERENCES [1] Menze, B. H., Jakab, A., Bauer, S., et al., “The multimodal brain tumor image segmentation benchmark (BRATS),” IEEE Trans. Med. Imaging 34(10), 1993–2024 (2015). [2] Havaei, M., Davy, A., Larochelle, H., et al., “Brain tumor segmentation with deep neural networks,” Medical Image Analysis 35, 18–31 (2017). [3] Kamnitsas, K., Ledig, C., Newcombe, V. F. J., Simpson, J. P., Kane, A. D., Menon, D. K., Rueckert, D., and Glocker, B., “Efficient multi-scale 3d CNN with fully connected CRF for accurate brain lesion segmentation,” Medical Image Analysis 36, 61–78 (2017). [4] Pereira, S., Pinto, A., Alves, V., and Silva, C. A., “Brain tumor segmentation using convolutional neural networks in MRI images,” IEEE Trans. Med. Imaging 35(5), 1240–1251 (2016). [5] Zhao, X., Wu, Y., Song, G., Li, Z., Fan, Y., and Zhang, Y., “Brain tumor segmentation using a fully convolutional neural network with conditional random fields,” MICCAI, Athens, Greece, October 17, 2016 , 75–87 (2016). [6] Brébisson, A. and Montana, G., “Deep neural networks for anatomical brain segmentation,” 2015 IEEE Conference on Computer Vision and Pattern Recognition Workshops, Boston, MA, USA, June 7-12, 2015 , 20–28 (2015). [7] Huang, G., Liu, Z., van der Maaten, L., and Weinberger, K. Q., “Densely connected convolutional networks,” in [2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017 ], 2261–2269 (2017). [8] He, K., Zhang, X., Ren, S., and Sun, J., “Deep residual learning for image recognition,” in [2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016 ], 770–778 (2016). [9] Szegedy, C., Liu, W., Jia, Y., Sermanet, P., Reed, S. E., Anguelov, D., Erhan, D., Vanhoucke, V., and Rabinovich, A., “Going deeper with convolutions,” in [IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2015, Boston, MA, USA, June 7-12, 2015 ], 1–9 (2015). [10] Ioffe, S. and Szegedy, C., “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” Proceedings of the 32nd International Conference on Machine Learning, Lille, France, 6-11 July 2015 , 448–456 (2015). [11] Nair, V. and Hinton, G. E., “Rectified linear units improve restricted boltzmann machines,” Proceedings of the 27th International Conference on Machine Learning, June 21-24, 2010, Haifa, Israel , 807–814 (2010). [12] Tustison, N. J., Avants, B. B., Cook, P. A., Zheng, Y., Egan, A., Yushkevich, P. A., and Gee, J. C., “N4ITK: improved N3 bias correction,” IEEE Trans. Med. Imaging 29(6), 1310–1320 (2010). [13] Kingma, D. P. and Ba, J., “Adam: A method for stochastic optimization,” CoRR abs/1412.6980 (2014). [14] Abadi, M., Agarwal, A., Yu, Y., Zheng, X., et al., “Tensorflow: Large-scale machine learning on heterogeneous distributed systems,” CoRR abs/1603.04467 (2016).
1cs.CV
Markov Brains: A Technical Introduction Arend Hintze1,2,3 , Jeffrey A. Edlund4 , Randal S. Olson5 , David B. Knoester3,10 , Jory Schossau1,2,3 , Larissa Albantakis6 , Ali Tehrani-Saleh1,3 9 Peter Kvam , Leigh Sheneman1,3 , Heather Goldsby1,2,3 , Clifford Bohm2,3 and Christoph Adami3,10,11 arXiv:1709.05601v1 [cs.AI] 17 Sep 2017 1 Department of Computer Science & Engineering, Michigan State University 2 Department of Integrative Biology, Michigan State University 3 BEACON Center for the Study of Evolution in Action, Michigan State University 4 Computation & Neural Systems, California Institute of Technology 5 Institute for Biomedical Informatics, University of Pennsylvania 6 Department of Psychiatry, University of Wisconsin 9 Department of Psychological & Brain Sciences, Indiana University 10 Department of Microbiology & Molecular Genetics, Michigan State University 11 Department of Physics & Astronomy, Michigan State University Abstract Markov Brains are a class of evolvable artificial neural networks (ANN). They differ from conventional ANNs in many aspects, but the key difference is that instead of a layered architecture, with each node performing the same function, Markov Brains are networks built from individual computational components. These computational components interact with each other, receive inputs from sensors, and control motor outputs. The function of the computational components, their connections to each other, as well as connections to sensors and motors are all subject to evolutionary optimization. Here we describe in detail how a Markov Brain works, what techniques can be used to study them, and how they can be evolved. Introduction Artificial neural networks (Russell and Norvig, 1995) (ANNs) have become a staple for classification problems as well as a common tool in neuro-evolution research. Here we assume that the reader knows how a simple three layer perceptron with input, hidden, and output layers works, what a recurrent neural network is, how an ANN can be used to control a robot or an embodied virtual agent, and what a perception action loop is (see Figure 1). As we will discuss methods to evolve Markov Brains (MB)1 , we further assume that the reader has general knowledge of genetic algorithms and digital evolution. The structure and function of a MB can be encoded by a genome, where mutations lead to functional and topological changes of the network. In this case, evolution occurs on the 1 In this report we use a capital B for brains that are specifically artificial brains of the Markov type. Biological brains continue to be just brains. level of the genotype. It is also possible to encode MBs directly, which means that the network itself evolves by experiencing rewiring and functional changes as well as additions and subtractions of computational components, governed by specific rules. We therefore distinguish between genetically and directly encoded MBs. Regardless of the encoding, a MB always is defined by a state buffer that contains all input, hidden, and output states. This buffer is sometimes referred to as the state vector, and we call individual components of this vector “states”, or “nodes”. This buffer can experience an update where the computational components read from this buffer and compute the next state of the buffer (called t → t + 1 update). Each of these Brain updates happen in parallel (even though one can also perform sequential computations if so desired). An agent is controlled by computing what the agent senses, feeding this data into the input states, performing a Brain update, reading from the output states of the buffer, and using these outputs to control the agent in the environment. This constitutes one whole perception-action loop, and if repeated, allows the MB to control an agent over a defined period or lifetime. There is no explicit restriction or definition on the number of Brain or world updates to be computed within one whole action-perception loop. For example, it is possible to update the world once, followed by ten Brain updates. The experimenter needs to decide this, and different applications might require different settings. The logic components do not necessarily read from all states of the buffer (like one layer of an ANN always reads from the previous layer), instead each component has a subset of connections that can select a subset of states from the buffer. In addition, each logic gate can write into many different states of the buffer. The connections can change over the course of evolution, and in theory one can conceive of A) Recurrent Artificial Neural Network input layer recurrent nodes hidden layer output layer B) Markov Brain sensor input time t computational components recurrent nodes time t+1 actuator output Figure 1: Illustration of a recurrent artificial neural network and a Markov Brain. A) The recurrent artificial neural network has an input layer that contains additional recurrent nodes. All nodes of each layer are connected to all nodes of the next layer. ANNs can have hidden layers, but that is not a requirement. Connections between nodes typically specify a connection weight, in most cases all nodes of an ANN are updated using the same transfer and threshold function, but that is also not a requirement. A special class of ANNs that do not have this topology are NEAT and HyperNEAT ANNs (Gauci and Stanley, 2010) which also have an evolvable topology, as well as an evolvable transfer and threshold function. B) A MB is defined by a state buffer (sometimes called state vector) where each element represents one node. Inputs are written into a part of that buffer. A Brain update applies a set of computations defined by the computational components (sometimes referred to as “logic gates”) on this buffer. Outputs are read from a subset of the buffer. Since inputs are generally overridden by the environment they should not be considered part of what is recurring. However, the outputs of the last update are generally accessible by the computational components and are thus part of the recurrence. Here computational components are illustrated using the same shape, however MBs in practice are evolved using different types of computational components. a gate that changes its connectivity even during the lifetime of a MB, for example, in an implementation that features learning. Connecting the outputs of computational components arbitrarily to the hidden states creates situations in which a single state of the buffer becomes updated by more than one computational component. Computational components being executed sequentially would lead to states being overridden. However, computational components are updated in parallel, and thus states that receive multiple inputs integrate their signal by summation. (In older implementations the states were binary and then an OR function was applied instead of the summation used now). We think of the computational components as roughly analogous to neurons, and the zeros and ones of the binary logic operations as the absence or presence of an action potential. Along an axon you either do, or do not, have an action potential, and thus we think that a summation resembles this phenomenon best. Computational components are allowed to write into input states of the buffer (as well as read from output states) it just so happens that those input states will be overridden by the world once a new percept is computed. Reading from output states (proprioception) is sometimes not desired and then output states are set to 0 before a new Brain update is computed. The state buffer is a vector of continuous variables (64 bit double precision). At the same time, many earlier implementations used only discrete binary values as states (0 and 1). Therefore, gates that require binary inputs use a discretizer that interprets all values larger than 0 as a 1, while all other values become a 0. Any type of computational component needs two types of values to be defined properly. All the values that define function and connectivity as well as the ranges within these values can vary. While evolution optimizes the values that define a computational component the ranges are set by the experimenter (which we call parameters). For example, the experimenter could limit the number of input connections to 2 and the number of output connections to 8. If a mutation to the number of inputs or outputs occurs, the new value will be kept within those predefined conditions. How these values are encoded by a genome can vary between implementations, and also varies between the different kinds of components. Computational Components MBs are made from different types of computational components that interact with each other and the outside world. Many different such components are available, and new such units are being designed that will be added to this document on a regular basis. Earlier publications using MB technology used fairly simple components, but there is technically no limit to what these components can be. Traditionally, MBs used deterministic or probabilistic logic gates as their computational building blocks. We added components that simulate classical artificial neural networks, as well as thresholding functions, timers and counters. We defined logic gates that can process feedback and perform lifetime learning, as well as gates that resemble biological neurons and gates that can perform ternary logic operations. Here we present each of these components. Gates can read from multiple inputs and write into multiple outputs – how this extends the logic of a conventional logic gate is explained in the section for deterministic logic gates, but applies to all other gates if not stated otherwise. logic tables (see below), we use a different notation that defines both outputs at the same time. An example of such a table for the same 2-in-2-out gate as above is: The same IA 0 0 1 1 IB 0 1 0 1 0,0 1 0 0 0 0,1 0 1 1 0 1,0 0 0 0 1 1,1 0 0 0 0 Deterministic Logic Logic gates are commonly known to perform the essential functions of computation, such as: AND, NOT, OR, XOR, NAND, etc. These gates typically receive two binary inputs (or one in the case of the NOT gate) and return the result of their computation as a single bit. This constitutes what we call a 2-in-1-out gate. However, logic gates can be built for more inputs and outputs. A multi-AND might have eight inputs and only returns a 1 (true) if all its eight inputs are also 1 (true) and a 0 (false) in all other 255 possible input cases. This would be an example of a 8-in-1-out gate. A three-bit multiplexer has three inputs and eight outputs (3in-8-out gate) and the three inputs control which of the eight output wires is on. Similarly, the deterministic logic gates that MBs use can have an arbitrary number of inputs and outputs. We typically limit them to four inputs and four outputs maximally, and require at least one input and one output. The logic of the gate is defined by a logic table. An AND gate with the inputs IA and IB and a single output O, for example, would have the following logic table: IA 0 0 1 1 IB 0 1 0 1 O 0 0 0 1 Table 1: A 2-in-1-out logic table for an AND gate This becomes a more complicated table if multiple outputs are involved. Imagine a 2-in-2-out deterministic logic gate with the two inputs IA and IB , as well as the two outputs OA and OB . The resulting logic table would become: IA 0 0 1 1 IB 0 1 0 1 OA 0 0 0 1 OB 0 1 1 0 Table 2: Logic table for a 2-in-2-out gate, where output OA is following the AND logic for the inputs, while output OB is the XOR logic However, as we will later need to define probabilistic Table 3: Logic table for a 2-in-2-out gate, where output OA is following the AND logic for the inputs and output OB has the XOR logic. The output of OA and OB is now noted in the same column. For example if both inputs are 0 both outputs must be 0 as well, indicated by the column labeled 0,0 containing a 1 for and input of 0,0. Similarly, if both inputs are 1, output OA must be 1 due to the AND logic, while output OB must be 0 due to the XOR logic. This is indicated as output 1,0, as seen in the column title principle applies to larger logic gates. Probabilistic Logic Gates Probabilistic logic gates work similarly to deterministic logic gates in that they compute a mapping between a set of inputs and outputs. However, this mapping is probabilistic. Instead of using a deterministic logic table, we use a probabilistic one, which means that we can use the same table with deterministic mappings (1s and 0s) swapped out for stochastic ones (p ranging from 0.0 to 1.0). In this case, the output table is interpreted as a matrix of probabilities. The probability matrix for the 2-in-2-out table from above defining an AND and an XOR would look like this: IA 0 0 1 1 IB 0 1 0 1 0, 0 1.0 0.0 0.0 0.0 0, 1 0.0 1.0 1.0 0.0 1, 0 0.0 0.0 0.0 1.0 1, 1 0.0 0.0 0.0 0.0 Table 4: Probabilistic logic table for a 2-in-2-out gate, where output OA follows AND logic for the inputs and output OB follows XOR logic. Note that all probabilities are 0.0 and 1.0 only and thus, even though we use probabilities, the logic remains deterministic. Each column represents the probability for one of the four possible outputs to occur. We can see that deterministic logic gates are a special case of probabilistic logic gates. At the same time, we can create probability matrices that are not deterministic, like the one shown in the following table: Let us use introduce the mathematical definitions here: Each gate has a defined number of inputs (nI ) and a defined number of outputs (nO ). We call the input a gate receives IA 0 0 1 1 IB 0 1 0 1 P (0, 0) 0.1 0.5 0.1 0.25 P (0, 1) 0.2 0.1 0.1 0.25 P (1, 0) 0.3 0.2 0.1 0.25 P (1, 1) 0.4 0.2 0.7 0.25 Timer Gate This gate does not need inputs, and fires a 1 on all its outputs after a predefined number of updates passed. Feedback Gates Table 5: Probabilistic logic table for a 2-in-2-out gate, where output OA is following the AND logic for the inputs, while output OB is the XOR logic. I, where I can range from 0 to 2nO since inputs are binary and this range defines all possible combinations. Similarly, there are at most 2nO possible outputs which we call O. At every update a gate receives an input I and needs to produce an output O defined by a probability matrix we call P . This table has the dimension of 2nI ∗ 2nO , where each element of this matrix PIO defines the likelihood of an input I resulting in an output O. As a consequence, each row of the matrix P needs to sum to 1.0: 1.0 = n j<2 XO PIj (1) j=0 When this matrix is read from a genome, for example, the table will be filled with arbitrary values read from the genome that will automatically be normalized. If ever a row would be filled with 0.0 everywhere, the row would become a row of equal probabilities. ANN Gate This type of gate also has a flexible number of inputs and outputs. It implements a single-layer artificial neural network that straddles between the inputs and outputs of the gate. Each output node is connected to each input node of the gate, and each connection has a weight. The transfer function for each node j is the sum over all weight input products, where Imax defines the number of all inputs: Tj = i<I max X Ii Wij (2) i=0 The standard hyperbolic tangent is used as the threshold function. Threshold Gate The threshold gate discretizes the inputs into 0 and 1 and accumulates them. If their accumulated values reach a genetically determined threshold, all outputs return a 1, and the internal accumulator is reset to zero. Otherwise this gate returns 0 on all outputs. Note that this gate itself contains a hidden value or state. In general feedback gates are very similar to probabilistic gates regarding inputs and outputs, as well as their probability table. However, they have two additional inputs, which are used to detect positive or negative feedback. At any given update, this gate receives a specific input and returns a specific output depending on the evaluation of the probability table. The resulting outputs typically directly control an actuator or result in changes to the state buffer, which over time affect the actuators and thus the behavior of the agent. In turn, the actions of the agent might be beneficial or detrimental. This information is not directly given to the agent; instead, the agent needs to also evolve machinery that assesses the sensory input as positive or negative feedback. This means that at the time point the output for a gate is computed, it is not clear if the output is a good or bad one. Therefore, this gate keeps track of previous input-to-output mappings in order to apply feedback at later stages. The number of previous mappings that are remembered is genetically encoded, and thus evolvable. Specifically, for an input I received at time point t an output O is generated for time point t + 1. Since this gate is technically similar to the probabilistic logic gate, we also have a probability matrix P (see above). The input output pair IO was generated by the probability matrix P , specifically by the element PIt Ot+1 . Technically, it is the entire row PIt that is responsible, but for now we define that PIt Ot+1 was ”responsible“. This is very similar to the process in Q-learning with delayed rewards where this probability would be defined as Q(st , at )(Russell and Norvig, 1995). If the computation the gate performed resulted in positive feedback the probability PIt Ot+1 should be increased, whereas in the case of negative feedback it should be decreased. However, relevant or pertinent feedback might arrive only much later than at the time point t + 1. On the one hand, information takes time to propagate through the MB, and on the other hand, the action of the agent might have delayed rewards. Therefore, the feedback gates store past input-output pairs [(It , Ot+1 ), (It−1 , Ot+1−1 ), ..., (It−n , Ot+1−n )]. The range of this buffer n is an evolvable property of the gate. In case positive feedback is received, the gate sequentially increases each entry in the probability matrix defined by the (I, O) pairs in the buffer. It increases these values using a random number drawn from a uniform random number between 0.0 and a maximum value which again is evolvable. After each increase of PIt ,Ot the row PIt becomes normalized again, before the next change is applied. The negative feedback mechanism works similarly, except that the value defined by PIt ,Ot are decreased by the random value instead of increased. We prevent values from dropping below a lower threshold (typically 0.01, which can be set by the experimenter). Ternary Logic Gates Ternary logic gates first of all discretize inputs differently. Values that are 1.0 and above are considered to be a 1, values −1.0 and lower are interpreted as a −1, and all values in between are interpreted as a 0. After that, these gates function like deterministic logic gates, except that they can compute ternary logic, and can return three different values −1, 0, and 1 as their outputs. As a consequence, the logic table for a probabilistic 2→1 gate, for example, is determined by 27 probabilities (three probabilities for each of the nine possible inputs). There are different (hypothetical) reasons for using (or testing) ternary logic gates in MBs. For example, voltage-gated ion channels have three states: closed, open, and blocked (Alberts et al., 2002), which implies that neurons cannot immediately fire after having fired. Furthermore, there is good evidence that information is sometimes stored in ternary logic using three different firing rates, such as in the Reichardt detectors that sense motion in the visual system (to encode motion towards the detector, motion away from the detector, and no motion). Encoding So far we listed the possible components a MB can have, and one can easily imagine more. How these components are encoded genetically is crucial, as the manner of encoding will determine how the component reacts to mutations. In principle we could use a direct encoding in which mutations are applied to the Brain itself. For example, we might randomly select probabilities in the gate table to change, gates to rewire randomly, gates to disappear, or new gates to be added. But it is well-known that direct encodings are usually fragile, and all prior implementations of MBs have used a genetic encoding. This encoding varies slightly from implementation to implementation and we did not experience any significant change to evolvability for example. To encode a MB, we use a vector of (currently) up to 20,000 elements that is interpreted from the beginning to the end (left to right). This is analogous to a strand of DNA where each site codes for a particular nucleotide. Here, instead of nucleotides, we use numbers (in older implementation these were bytes, presently these loci can be arbitrary values whose range can be set by the experimenter). While parsing this vector, pairs of numbers are used to identify sections that encode a single gate. This idea is inspired by how the beginning of genes are marked in DNA, namely by start codons that mark the point of transcription initiation. Theoretically, it is possible to add transcriptional regulation to the expression of MB genes that either activates or deactivates genes/gates based on environmental signals, but this idea has not yet been tested. Once a start codon is found in the genome, the stretch of sites following it is used to define all values relevant for the gate. This stretch is called a gene to stay within the biological metaphor. Since there is a wide variety of gates, how each gene is decoded is subject to the gate it defines. Generally the first pair of sites defines the number of inputs and outputs the gate has. Since the minimal and maximal number of connections for the inputs and outputs can be defined by the experimenter, the value that is read from each site it transformed into a value between the allowed minimum and maximum. The next sections define the nodes of the state buffer to be read from and written into. After that, the diversity in gates becomes so large that there is no common denominator except that the following stretch is responsible to encode the function of each gate. In the case of a probabilistic logic gate it would define the probability table, whereas a timer gate interprets the next value as the interval in which it should signal. This also implies that different gates can have different sizes on the genome. For a general description how a gene encodes a gate see Figure 2. The start codon used for probabilistic logic gates are 42 followed by 213, whereas deterministic logic gates use 43 followed by 212 (other gates use other codons). The choice of start codons is arbitrary, while ‘42’ was picked in homage to Douglas Adams’s: “The Hitchhikers Guide to the Galaxy” (Adams, 2012), where ‘42’ represents the “Answer to the Ultimate Question of Life, the Universe, and Everything”. It is unwise to choose ‘0’ or ‘1’ as a start codon, as this would imply that large sections of the probability table would be interpreted as start signals, thus giving rise to overlapping genes that are hard to interpret. Similarly, it would have been unwise to create start codons consisting of three bytes, as new gates would be formed too rarely. When a start codon is found close to the end of the genome, the missing bytes are read from the beginning, making the genome effectively circular. If a start codon is found inside the coding region of another gate, another gate is made accordingly, leading to overlapping “reading frames”. This device, often found in nature to protect genetic information, is also useful in the evolution of MBs. In principle, genomes can be organized into many chromosomes, as well as being diploid or polyploid, even including genders or other variations known to occur in nature. Mutations to the Genome Since a MB is encoded by a genome, it is the genome that becomes transmitted to the next generation, and it is the genome that can experience mutations. After mutations are applied, the genome becomes translated into the brain again, and all changes manifest themselves as differences to the MB. When a genome is copied, we allow for point mutations, insertions, and gene duplications. Each site has a chance to mutate at every replication event. In addition, there is typi- start codon 34 2 255 non-coding sites 17 42 nr. of outputs states the outputs connect to 213 nr. of inputs states the inputs connect to values to define the function of a gate Figure 2: Encoding scheme illustration. The sequence of sites of a genome is read from beginning to end. Most sites are non-coding, but when a start codon in found the following stretch of sites is defining the connections and function of a gate (analogous to a gene). After the start codon, the next sites are encoding the number of inputs and outputs, followed by sites which encode the specific nodes in the state buffer the gate receives inputs from and in which the outputs of the gate write. The last stretch of sites is used to encode the specific values needs to specify the function of each gate. cally a 20% chance for a section of the genome to be deleted randomly. The size of that section is between 256 and 512 sites (about 300 sites are needed to encode for probabilistic logic gate for example, while a timer gate needs about 15 sites). Deletions can only occur if the genome is larger than 1000 bytes. Similarly, there is a 20% chance for a section of 256 to 512 sites to be copied and randomly inserted anywhere in the genome (similar to a transposition event in genetics). This is not allowed if the genome is already above 20,000 sites. Both limits on insertions and deletions prevent genomes from disappearing or becoming intractably large. Note that the lower and upper limit of the genome size can be set by the experimenter. In principle, other kinds of mutations (including whole-genome duplications) are possible, and the hard-coded lower and upper limits of genome size are just practical values that can be changed arbitrarily. Evolutionary Optimization MBs are typically used to control an agent or to act as a classifier or decision maker. In order to optimize the performance of each MB, the performance needs to be quantifiable so that MBs can be ranked in performance. Generally speaking, MBs that perform better will be given more offspring than poor performers. This essential dynamic in Darwinian evolution can be implemented in many different ways, the standard ‘Moran process’ or ‘Tournament selection’ are just two examples. Once a MB genome is selected for replication, it experiences the mutations described above. The quantity and quality of these changes and how they are applied (genetically or directly) is controlled by the experimenter. Typically, evolution needs thousands of generations for a population of 100 MBs to converge on a solution. The types of gates that are utilized plays an important role in shaping the adaptive trajectory. For example, we have experienced that for most behavioral tasks, deterministic MBs evolve faster than those that are made from stochastic elements. Analysis Methods Visualizing a MB We use several different ways to visualize a MB, and typically the idea is to give the user some information about the placement of gates and how they connect to nodes, or to show the user how nodes relay information to each other. The first way (see Figure 3), illustrates the state buffer at time point t on top of the figure and the updated buffer at time point t + 1 at the bottom. All gates are added as boxes, and if gate types matter, either colors or additional kinds of shapes can be used. The input connections for each gate are then drawn between the upper state buffer, while the output connections are drawn to the bottom state buffer. This symbolizes how information changes from update to update. Alternatively, if the gates and their function or type is of lesser importance, the same MB can be represented as a graph, only showing the states and how they influence each other (see Figure 4). This type of illustration also removes all nodes that do not have a connection and are therefore meaningless to the computation. In order to illustrate which nodes are sensors, and which ones are actuators, colors or shapes can be used. State-to-State Transition Diagrams Over the lifetime, the state of a MB constantly changes. Recording the state of a Brain at every update allows the reconstruction of the state-to-state transition matrix that depicts the probability that a particular state is followed by a particular other state. In case continuous values are used as brain states a discretization step has to be performed first. In deterministic MBs, the state-to-state transitions are only affected by the sequence of inputs, and not by the probabilities of the computational components. Fig. 5 shows an example state-to-state transition graph for a deterministic MB with a single auditory sensor (a brain that listens to a periodic tone, tasked to make decisions conditional on what it hears). In this simple case, the transition is only influenced by whether the tone is present (“1”) or absent “0”, and each input usually moves the brain from one particular state to another (unless the brain does not pay attention to the tone). Often (as in Fig. 5) states are labelled by the decimal equiv- 0 1 2 3 4 5 6 7 8 9 10 11 time t gate 1 gate 2 time t+1 0 1 2 3 4 5 6 7 8 9 10 11 Figure 3: Illustration of a MB with 12 states and two gates. 0 2 7 6 8 11 Figure 4: Illustration of the same MB used in figure 3, but as a graph that shows only the nodes of the state buffer and how gates relay information between them. alent of the binary state vector. Thus, prior to experiencing any input, the Brain begins in state ‘0’. In the example in Fig. 5, hearing a ‘1’ moves this Brain (with a state vector of 15 nodes) from state 0 to state 28,753, which stands for the activation pattern 110110011001101. It is important to note that the state-to-state diagram implies that the Brain’s future behavior is strongly influenced by what state it is in, and that therefore its computations are highly dependent on its past experience. In this example, a particular sequence of tones will “put the brain into a particular state”, which will determine how it will respond to future tones as it anticipates only a few different future tones from this state. This state-dependence of computations makes MBs qualitatively different from standard (non-recurrent) ANNs. While recurrent ANNs can also perform state-dependent computations, in these networks all nodes of one layer are connected to all other nodes of the next, which implies that the current state of an ANN is best described as a conglomerate (an average), which gives rise to the large basins of attraction that are precisely what makes these networks good at classification tasks. In MBs, on the other hand, connections are sparse and thus states are much more interdependent and conditional on each other. As a consequence, the state of a MB can be changed much more easily, which makes MB in our experience a better substrate for fine-grained behavior, as well as better suited for the integration of temporal information. When Brains receive inputs from multiple sources, stateto-state transition diagrams focusing on a single source can reveal important dynamics, but either must keep the state of other inputs fixed, or else show different arrows for each combination of inputs. Brain Size and Complexity Estimates While for natural organisms we can weigh a brain or estimate the number of cells involved, we really cannot easily estimate a brain’s complexity. It is not trivial to estimate the size or complexity of any particular MB either, because there are many different quantities that measure different aspects of the Brain’s performance. Is the number of gates analogous to the number of neurons or is it the size of the state buffer that determines the brain’s performance? In fact, this problem is no different than other quests to define functional complexity. We could use Brain “size” as a proxy for complexity, but the size of the state buffer is predefined and thus limited (a limitation we already removed for some implementations). Also, the maximum size of the genome is limited and thus affects complexity as well. Lastly, because elements of the Brain do not cost anything, increasing the number of components may not reflect functionality. Regardless of these caveats, it is possible to count the number of gates, the number of hidden states used, the diameter of the causal graph (see Figure 4), the number of connections, or the size of the genome, as a proxy to assess Brain complexity. In principle, it would be useful to define the equivalent of a Vapnik-Chervonenkis dimension for MBs to measure the capacity of the Brain to learn new functions, but it is not a priori clear that such a capacity is the 14416 1 1 0 0 0 28753 2641 0 19024 18513 0 1 0 30801 19025 0 0 31297 1 0 21073 23120 1 31313 0 1 1 12305 0 1 28736 0 0 0 20561 8273 0 12352 0 1 0 29249 25152 0 1 0 14929 0 23121 0 1 19008 0 1 31312 1 16465 0 0 1 1 28737 1 16960 Figure 5: State-to-state transition diagram for a 16-node brain that listens to a periodic tone (different lengths and periods), delivered to a single input. State labels are constructed as the decimal equivalent of the binary state vector of the functional brain (with inert nodes removed), not including the neuron that determines the transitions, whose state is indicated by boxes next to the arrows. This state-to-state diagram depicts only the transitions that are relevant to the Brain’s fitness, which are the transitions shaped by evolution. A Brain is initialized in the quiescent state, which translates to the state ‘0’. right way to quantify MB performance because brains must do more than just store patterns: they have to know things so that they can behave appropriately. Brain Density Estimates In addition to Brain “size”, we might ask how interconnected these Brains are. The general idea is that a sparsely connected brain does not relay a lot of information between computational units, whereas a fully connected brain allows all computational units to have access to all information. It is not clear if this distinction has an actual impact on the computations performed. We define the density of a MB as the actual number of connections between states and the total possible number of connections between states. A connection in this context is the number of connections between nodes in the state buffer. Specifically, we count two nodes as connected if a gate relays information from one node to the other. Multiple connections between states are counted as one connection, otherwise an infinite amount of connections would be possible. Nodes that do not receive inputs from gates, and nodes that are not read from by gates are removed and do not count as having connections, since their state is either always 0 or does not contribute to the computation. Knockout Analysis A genetic knockout is a powerful tool to find causal functional relations within a Brain. The idea is to define a com- ponent’s function by comparing the “wild-type” behavior of the system to the behavior of the system after a component has been knocked out, just as in classical genetics. Knockouts can be performed on a MB on different levels. Sections of the genome can be removed, gates can be removed, or states can be silenced. While it is obvious how gates and parts of the genome can be knocked out, this is not simple for modifying states. A state cannot just be removed, since it would now leave gates with connections to nowhere. Therefore, the next plausible thing to do would be to set all states to 0. Alternatively, the state could be set to 1, or a random number for that matter. The loss of function would depend on the kind of knockout performed. Neuro-correlate Φ The ability of a MB to integrate information can be measured using the neuro-correlate Φ (Balduzzi and Tononi, 2008; Oizumi et al., 2014), which is a measure of how well a particular network integrates information (see below for references). Calculating the Φ of a network is a rather complex and time-consuming procedure, and requires the user to record the state-to-state transitions over the lifetime of the MB, and for later Φ-measures (Oizumi et al., 2014), the connectivity of the MB. However, MBs were instrumental in validating this measure as a possible way to measure brain complexity (Edlund et al., 2011; Joshi et al., 2013; Albantakis et al., 2014). Neuro-correlate R Another possible way of estimating brain complexity is to quantify how much of the world is represented within the MB’s internal states, meaning, how much the brain knows about the world without consulting any of its sensors. We have shown that a quantitative measure of representation, R, is highly predictive of the brain’s fitness (and therefore function) (Marstaller et al., 2010, 2013)). It is important to note here that the work on representation showed that MBs do not evolve to use a single state to store a specific piece of information, but that instead information is smeared–or distributed–over many states, and that the concepts that are being represented within these groups of states are generally not simple concepts, but rather compound concepts. Modularity The modularity of MBs can be assessed using the graph representation of the Brain (see Figure 4). However, we found that this only gives meaningful results once Brains are larger than 100 nodes. Also note that such modularity measures would only quantify topological modularity, not functional modularity because to do the latter, nodes would need to be assigned to particular functions. When performing functional analysis and knockouts, we find that states contribute to many functions, which makes it impossible to use generic modularity measures in which nodes must be assigned to one function only. One way out of this dilemma is to use the modularity measure QH (Hintze and Adami, 2010) which allows the user to measure modularity for systems whose components are in several modules at the same time. Mutational Robustness Mutational robustness is a measure that seeks to assess if a MB can tolerate multiple mutations, or if it is very brittle. To this end–either exhaustively or by sampling–the fitness of a MB is measured when experiencing single, double, triple, and even more mutations at the same time. When plotting the mean fitness over the number of mutations, we can assess the robustness of the system (see Figure 6). This also works for arbitrary sources of noise, not just mutations. In those cases we would ascertain the robustness of the MB with respect to that particular form of noise. Quantification of Behavior Beyond just visualizing the agent controlled by a MB as a movie, behavior can also be quantified differently. While we highly recommend that each experimenter observes the behavior of an agent visually if at all possible, we need to point out that such an assessment is subjective, not quantitative, and at best anecdotal. The simplest way of collecting behavioral data is to record the sequence of all actions taken, given the sequence of inputs received. The changes in frequencies of actions can be robust pro po W rtio na l brittle noise Figure 6: Illustration of mutational robustness, the average fitness (W̄ ) is shown as a function of the number of mutations or noise experienced (black). If this curve remains high (green) for more mutations it indicates that the system is very robust. A quick loss of functionality indicates a brittle system (red). indicative. Also, which action is followed by which other action might be an interesting source of information. Beyond the sequence of actions, we have also deployed other measures to assess the behavior of agents, for example how much they swarm (Olson et al., 2013a), that is, act collectively as a group. Other measures such as distance travelled, food collected, or any other property that can be recorded might be useful. The important concept we try to relay here is that any type of quantifiable data together with a properly executed statistical analysis is better than any subjective observation and interpretation of behavior, much as in standard behavioral biology. History It is not clear from a search of the literature to what extent MBs were already defined in this particular way before, and whether they have been used or evolved earlier by others. The concept of a probabilistic finite state machine controlled by inputs is implicit in any hidden Markov model of a process. A standard example are the Hidden Markov models (HMMs) trained to recognize–or even synthesize–particular molecular sequences, and the name we chose for the technology refers directly to this heritage. The development of MBs owes a great deal to the insights of Jeff Hawkins (discussed for example in his book “On Intelligence” (Hawkins and Blakeslee, 2004)), who correctly views human brains as prediction machines that are deeply and fundamentally conditioned by their past experience. Their recurrent nature, as well as the idea to create a complex system with an extreme bandwidth that is still being made from individual computational units was inspired by the book “I am a strange loop” (Hofstadter, 2008) from Douglas R. Hofstadter. The fact that many different computational implementations result in Turing complete machines implies that it is always possible to implement the functionality of system using a different technology. When a MB is a network of deterministic gates, it could in principle implement an IBM 8088 chip, and therefore simulate a universal computer. Whether evolution ever would optimize MBs towards such an architecture is, however, extremely unlikely. Ultimately, we should think of a MB as a finite state machine, whose current state is defined by the state buffer, which becomes updated according to the inputs and the current states (much as in Bayesian inference) but with access to internal models for shaping the priors. If the computational components are deterministic the MB would resemble a deterministic finite state machine, while a MB made from (or at least containing some) probabilistic computational components would resemble a probabilistic finite state machine. It is, as a consequence, difficult to find a proper classification of MBs. Are they a strange implementation of a finite state machine, or a weird implementation of a Hidden Markov process? Also, where does the definition of a MB start and end? Does it necessarily include a genetic encoding that is very flexible and can be varied, or could it even be ignored in the case of direct encoding? Regardless of an actual answer, MBs and a method to evolve them have now been implemented multiple times already, independently, and for various purposes. Here we will give a brief historic overview of those implementations. Integrated Information The first implementation was written by Jeffrey Edlund, and this installment used a stack of genes without non-coding regions, instead of a full genome that uses start codons and thus could have significant stretches of non-functional code. This implementation was quickly changed to the genetic encoding in the same project. Without having performed a quantitative comparison of both systems, the consensus was that the genetic encoding (using start codons) evolved faster, and to higher fitness, on average. This implementation also used only one type of start codon, and only probabilistic logic gates. In 2011 we published the first article using this implementation of MBs (Edlund et al., 2011). Representations The original work on representation (Marstaller et al., 2010, 2013) has been expanded and now includes multiple different start codons that define gates both deterministic amd probabilistic logic gates, as well as a precursor of the artificial neuronal network gates. This framework was written by Arend Hintze, and has been expanded and adapted several times and for several other experiments (Hintze and Miromeni, 2014; Albantakis et al., 2014; Albantakis and Tononi, 2015; Kvam et al., 2015). Adding threshold and timer gates enabled the evolution of social hierarchies in digital agents (Hintze and Miromeni, 2014). Swarming Allowing for the evolution of swarms as well as predator prey dynamic required the expansion of the framework mentioned above. All work that involves swarms of agents was performed using the extension written by Randal Olson made (Olson et al., 2013a,b; Haley et al., 2014; Olson, 2015; Haley et al., 2015; Hintze et al., 2016; Olson et al., 2015; Tehrani-Saleh et al., 2016; Olson et al., 2016b,a, 2012). This work also resulted in a Python implementation of Brains that can use deterministic and probabilistic logic gates https: //github.com/rhiever/MarkovNetwork. Learning Studying the evolution of learning further expanded the framework. This work added feedback gates to study agents that were able to adapt to an environment within their lifetime, and was performed by Leigh Sheneman and Arend Hintze (Sheneman and Hintze, 2017). EALib MBs were also added by David Knoester to EALib (EALib; https://github.com/dknoester/ealib), which is a software library to develop a wide range of different evolutionary computational experiments. This framework was used in several publications since then (Chapman et al., 2013, 2017; Goldsby et al., 2014a,b, 2017; Knoester and McKinley, 2012, 2011). This implementation allowed for much larger brains (thousands of states) and used a somewhat different encoding of gates. MABE Two key insights about software development that have emerged within the last decade are the importance of platform independence, and the importance of code “recycling”, that is, to enable an environment where code can easily be re-purposed, akin to “horizontal transfer” of genetic code in biological organisms. Creating a platform that is specific to MBs runs the risk of producing results that are germane to their particular implementation, and thus question the generality of the results obtained. Therefore, ideally experiments should be repeated using other types of computational brains, and a modern platform should provide a level of modularity that makes this easy. Secondly, code that was developed for one experiment should be used in other experiments (possibly suitably modified), either as a control or as an improvement. This only works if the code is designed to be modular, and to explicitly allow for this kind of exchange without it breaking earlier constraints. MABE (Bohm et al., 2017), the Modular Agent Based Evolver framework, is based on these two principles: substrate independence and modular design. MABE supports all prior experiments, and contains some of them as examples. The platform is designed to support a vast variety of future experiments, and most importantly it is designed in such a way that contributions from one experimenter can be used by others. This mix and match (or plug-and-play) philosophy already allowed for a set of other experiments (Bartlett et al., 2015; Schossau et al., 2015, 2017), and we suggest that future experiments should be done using MABE. Acknowledgements This work was supported in part by NSF’s BEACON Center for the Study of Evolution in Action, under Contract No. DBI-0939454 and by the Paul G. Allen Family Foundation. We are grateful to Christof Koch and Giulio Tononi for support, discussions, and crucial insights. We thank Fred Dyer, Frank Bartlett, Lars Marstaller, Devin McAuley, Heather Eisthen, Nikhil Joshi, Samuel D. Chapman, Tim Pleskac, and Ralph Hertwig for attempting to keep us honest with respect to neuroscience, as well as the intelligence and behavior of real animals (including people). References Douglas Adams. The Complete Hitchhiker’s Guide to the Galaxy: The Trilogy of Five. Tor UK, 2012. Larissa Albantakis and Giulio Tononi. Fitness and neural complexity of animats exposed to environmental change. BMC Neuroscience, 16:P262, 2015. Jeffrey A Edlund, Nicolas Chaumont, Arend Hintze, Christof Koch, Giulio Tononi, and Christoph Adami. Integrated information increases with fitness in the evolution of animats. PLoS Computational Biology, 7(10):e1002236, 2011. Jason Gauci and Kenneth O Stanley. Autonomous evolution of topographic regularities in artificial neural networks. Neural computation, 22(7):1860–1898, 2010. Heather Goldsby, David B. Knoester, Charles Ofria, and Benjamin Kerr. The evolutionary origin of somatic cells under the dirty work hypothesis. PLoS Biology, 12(5):e1001858, 2014a. Heather J Goldsby, David B Knoester, Benjamin Kerr, and Charles Ofria. The effect of conflicting pressures on the evolution of division of labor. PloS one, 9(8):e102713, 2014b. Heather J Goldsby, Rebecca L Young, Hans A Hofmann, and Arend Hintze. Increasing the complexity of solutions produced by an evolutionary developmental system. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pages 57–58. ACM, 2017. Patrick B Haley, Randal S Olson, Fred C Dyer, and Christoph Adami. Exploring conditions that select for the evolution of cooperative group foraging. In Proceedings of the Fourteenth International Conference on the Synthesis and Simulation of Living Systems, pages 310–311. MIT Press, 2014. Patrick B Haley, Randal S Olson, Fred C Dyer, and Christoph Adami. Evolving an optimal group size in groups of prey under predation. In Proceedings of the European Conference on Artificial Life 2015 (ECAL 2015), volume 13, page 620. MIT Press, 2015. J. Hawkins and S. Blakeslee. On Intelligence. Henry Holt and Co., New York, NY, 2004. Larissa Albantakis, Arend Hintze, Christof Koch, Christoph Adami, and Giulio Tononi. Evolution of integrated causal structures in animats exposed to environments of increasing complexity. PLoS computational biology, 10(12):e1003966, 2014. Arend Hintze and Christoph Adami. Modularity and antimodularity in networks with arbitrary degree distribution. Biology Direct, 5:32, 2010. Bruce Alberts, Alexander Johnson, Julian Lewisand Martin Raff, Keith Roberts, and Peter Walter. Molecular Biology of the Cell. Garland Science, New York, 2nd edition edition, 2002. Arend Hintze and Masoud Miromeni. Evolution of autonomous hierarchy formation and maintenance. In ALIFE 14: The Fourteenth Conference on the Synthesis and Simulation of Living Systems, volume 14, pages 366–367, 2014. David Balduzzi and Giulio Tononi. Integrated information in discrete dynamical systems: motivation and theoretical framework. PLoS Comput Biol, 4(6):e1000091, 2008. Frank Bartlett, Arend Hintze, and Fred Dyer. Resetting behavior as an evolved solution to navigational uncertainties in animats. submitted, 2015. Clifford Bohm, Nitash CG, and Arend Hintze. MABE (modular agent based evolver): A framework for digital evolution research. Proceedings of the European Conference of Artificial Life, 2017. Samuel Chapman, David Knoester, Arend Hintze, and Christoph Adami. Evolution of an artificial visual cortex for image recognition. In Advances in Artificial Life, ECAL, volume 12, pages 1067–1074, 2013. Samuel D Chapman, Christoph Adami, Claus O Wilke, and Dukka B KC. The evolution of logic circuits for the purpose of protein contact map prediction. PeerJ, 5:e3139, 2017. Arend Hintze, Randal S Olson, and Joel Lehman. Orthogonally evolved ai to improve difficulty adjustment in video games. In European Conference on the Applications of Evolutionary Computation, pages 525–540. Springer, Cham, 2016. Douglas R Hofstadter. I am a strange loop. Basic books, 2008. Nikhil J Joshi, Giulio Tononi, and Christof Koch. The minimal complexity of adapting agents increases with fitness. PLoS computational biology, 9(7):e1003111, 2013. David B Knoester and Philip K McKinley. Neuroevolution of controllers for self-organizing mobile ad hoc networks. In SelfAdaptive and Self-Organizing Systems (SASO), 2011 Fifth IEEE International Conference on, pages 188–197. IEEE, 2011. David B Knoester and Philip K McKinley. Constructing communication networks with evolved digital organisms. In SelfAdaptive and Self-Organizing Systems (SASO), 2012 IEEE Sixth International Conference on, pages 139–148. IEEE, 2012. Peter Kvam, Joseph Cesario, Jory Schossau, Heather Eisthen, and Arend Hintze. Computational evolution of decision-making strategies. In Proceedings of the Cognitive Science Society, 2015. Lars Marstaller, Arend Hintze, and Christoph Adami. Measuring representation. In Proeedings ASCS09: 9th Conference of the Australasian Society for Cognitive Science, pages 232–237. North Ryde, NSW: Macquarie Centre for Cognitive Science, 2010. Lars Marstaller, Arend Hintze, and Christoph Adami. The evolution of representation in simple cognitive networks. Neural computation, 25(8):2079–2107, 2013. Masafumi Oizumi, Larissa Albantakis, and Giulio Tononi. From the Phenomenology to the Mechanisms of Consciousness: Integrated Information Theory 3.0. PLoS Computational Biology, 10(5):e1003588, 2014. Randal S Olson. Elucidating the evolutionary origins of collective animal behavior. PhD thesis, Michigan State University, 2015. Randal S Olson, Christoph Adami, Fred C Dyer, and Arend Hintze. A bottom-up approach to the evolution of swarming. In Proceedings of the Thirteenth International Conference on the Synthesis and Simulation of Living Systems, pages 567–568. MIT Press, 2012. Randal S Olson, Arend Hintze, Fred C Dyer, David B Knoester, and Christoph Adami. Predator confusion is sufficient to evolve swarming behaviour. Journal of The Royal Society Interface, 10(85):20130305, 2013a. Randal S. Olson, David B. Knoester, and Christoph Adami. Critical interplay between density-dependent predation and evolution of the selfish herd. In Proceedings of the 15th International Conference on Genetic and Evolutionary Computation (GECCO 2013). ACM, 2013b. Randal S Olson, Patrick B Haley, Fred C Dyer, and Christoph Adami. Exploring the evolution of a trade-off between vigilance and foraging in group-living organisms. Journal of the Royal Society Open Science, 2(9), 2015. Randal S Olson, Arend Hintze, Fred C Dyer, Jason H Moore, and Christoph Adami. Exploring the coevolution of predator and prey morphology and behavior. In Proceedings of the Fifteenth International Conference on the Synthesis and Simulation of Living Systems, pages 250–257. MIT Press, 2016a. Randal S Olson, David B Knoester, and Christoph Adami. Evolution of swarming behavior is shaped by how predators attack. Artificial Life, 22(3):299–318, 2016b. Stuart Russell and Peter Norvig. Artificial Intelligence: A modern approach. Prentice-Hall, Englewood Cliffs, 1995. Jory Schossau, Christoph Adami, and Arend Hintze. Informationtheoretic neuro-correlates boost evolution of cognitive systems. Entropy, 18(1):6, 2015. Jory Schossau, Larissa Albantakis, and Arend Hintze. The role of conditional independence in the evolution of intelligent systems. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pages 139–140. ACM, 2017. Leigh Sheneman and Arend Hintze. Machine-learned learning machines. arXiv preprint arXiv:1705.10201, 2017. Ali Tehrani-Saleh, Randal S Olson, and Christoph Adami. Flies as ship captains? Digital evolution unravels selective pressures to avoid collision in Drosophila. In Proceedings of the Fifteenth International Conference on the Synthesis and Simulation of Living Systems, pages 554–561. MIT Press, 2016.
2cs.AI
On a frame theoretic measure of quality of LTI systems arXiv:1703.07539v1 [math.OC] 22 Mar 2017 Mohammed Rayyan Sheriff, Debasish Chatterjee Abstract—It is of practical significance to define the notion of a measure of quality of a control system, i.e., a quantitative extension of the classical notion of controllability. In this article we demonstrate that the three standard measures of quality involving the trace, minimum eigenvalue, and the determinant of the controllability grammian achieve their optimum values when the columns of the controllability matrix from a tight frame. Motivated by this, and in view of some recent developments in frame theoretic signal processing, we provide a measure of quality for LTI systems based on a measure of tightness of the columns of the reachability matrix . AB B (a) 2 A′ B ′ A′ B ′ B′ (b) Figure 1: Comparison of the orientation of the columns of C(A,B,T ) and C(A′ ,B ′ ,T ) We see that for the system (A′ , B ′ ), since the vectors 2 B , A′ B ′ , A′ B ′ form small angles with each other, intuitively, the transfer of the system state to final states xT that is in approximately orthogonal directions to these vectors will demand control with higher magnitudes. In contrast, for the system (A, B) the vectors are spread out in space and will in general require lower control magnitude. Such a collection of vectors are called as tight frames. It turns out that tight frames have many practical advantages over generic collection of vectors [1], [2], [3], [4], [5] from signal processing perspective. In this article we shall establish that if the columns of C(A,B,T ) constitute a tight frame, one also gets several control theoretic advantages. In particular, we provide a notion of quantitative controllability, which we shall refer to as the Measure Of Quality (MOQ) of a control system. Intuitively speaking, any measure of quality should relate to some important characteristics of the system like average control energy / control effort required, robustness to input / noise, ability to control the systems with sparse controls etc We shall see below that such intuitive ideas are indeed justified. mT Let us define the control effort −→ R of a control  J :R sequence u(0), . . . , u(T − 1) , defined by ′ I. I NTRODUCTION Let us consider a linear time invariant controlled system x(t + 1) = Ax(t) + Bu(t) for t = 1, 2, . . . , A2 B (1) where A ∈ Rn×n and B ∈ Rn×m , with n and m some positive integers 1 . For T ∈ N, let Rn×T m ∋ C(A,B,T ) ≔ B AB · · · AT −1 B . Then the reachable space R(A,B) and the reachability index τ of the LTI system (1) are defined by  R(A,B) ≔ image C(A,B,n) ,   τ ≔ min t ∈ N| image C(A,B,t) = R(A,B) . We say that the control system (1) is controllable in the classi- cal sense if it admits a control sequence u(0), . . . , u(T − 1) that can transfer the states of the system (1) from x(0) = x0 to x(T ) = xT for preassigned values of x0 , xT whenever T ≥ τ . It is common knowledge that the LTI system (1) is controllable if and only if the matrix C(A,B,τ ) is of rank n. However, in most of the practical scenarios, information about the system behavior provided by the classical notion of controllability is limited. In particular, no assessment of “how controllable” is a given LTI system is provided by the classical ideas. Naturally, together with knowing whether a control system is controllable or not, one would also like to know how controllable or how good is the control system. In other words, there is a clear need to quantify the notion of controllability. For instance, let us consider two second order LTI systems described by the pairs (A, B) and (A′ , B ′ ) such that for T = 3 the columns of the matrices C(A,B,T ) , C(A′ ,B ′ ,T ) are as shown in the following figure. 1 The set of n×n real symmetric positive definite and positive semi definite n×n matrices are denoted by Rn×n respectively, image(M ) is the ++ and R+ column space of the matrix M , tr(M ) is the trace of the matrix M , x⊤ is the transpose of the vector x, kxk2 is the ℓ2 -norm of the vector x. −1  TX 2 J u(0), . . . , u(T − 1) ≔ ku(t)k2 , t=0 is a quantity of practical significance. For example, the value of the control effort in an electronic circuit system would involve information of the amount of power drawn to control the system. One of the primary objectives in controlling a dynamical system efficiently could be to minimize the required control effort. Therefore, let us consider the following optimal control problem:  minimize J u(0), . . . , u(T − 1) u(t) subject to x(0) = 0, x(T ) = x, x(t) evolves according to (1). (2) Let the grammian G(A,B,T ) be defined by G(A,B,T ) ≔ T −1 X t=0 other examples of the tight frames of R2 are shown in figure below. ⊤ At BB ⊤ (A⊤ )t = C(A,B,T ) C(A,B,T ). We know that the optimal control problem (2) admits  an unique optimal control sequence u∗ (0), . . . , u∗ (T − 1) with the optimum control effort J(A, B, x) given by: ⊤ ⊤ ⊤ + u∗ (T − 1) · · · u∗ (0) ≔ C(A,B,T ) x,  ∗ ∗ ⊤ −1 J(A, B, x) ≔ J u (0), . . . , u (T − 1) = x G(A,B,T ) x. (3) We briefly review some of the most well known MOQ’s studied in the literature [6], [7], [8]; they capture someinformation pertaining to optimum control effort needed to control the system:  (i) tr G−1 (A,B,T ) : This is proportional to the average optimal control effort needed to transfer the system state from origin (i.e., x0 = 0,) to a random point that is uniformly distributed on the unit sphere.  (ii) λ−1 G : This gives the maximum control effort (A,B,T ) min needed to transfer the system state from origin to any point on the unit  sphere. (iii) det G(A,B,T ) : This proportional to the volume of the ellipsoid containing points to which the system state can be transferred to from the origin using at most unit control effort. A finite value of the MOQ in (i) and (ii), and a nonzero value in (iii), implies that the system (1) is controllable in the classical sense. In addition, since these quantities also contain some information about the optimal control effort, they can be considered as valid candidates for an MOQ. However, these MOQ’s are increasingly difficult to compute as the size of the system becomes larger, and since they arise primarily in the context of the optimal control problem (2), they do not provide meaningful insights about properties such as immunity to noise, robustness, ability to generate sparse controls etc. For the dynamical system (1), we shall motivate the notion of an MOQ from the perspective of the orientation of the columns of the matrix C(A,B,T ) . We shall prove in this article that the three MOQ’s discussed above achieve their optimum value when the columns of the matrix C(A,B,T ) constitute a tight frame. We provide an MOQ for the system (1) as a measure of the tightness of the columns of C(A,B,T ) , and provide a sufficient condition for the classical controllability of the system (1) in terms of the proposed MOQ. (a) (b) (c) Figure 2: Tight frames of R2 . The collection of vectors pointing towards the corners of platonic solids also constitute tight frames; several other examples may be found in [9]. The study of frames was started by Duffin and Schaeffer [10] and improvised greatly by work of Daubechies et al. in [11]. Recent work on characterization of tight frames as minimizers of a certain potential function was done in [9] and [12]. The growing interest in developing the theory of tight frames is mainly because, tight frames possess several desirable properties. For example, the representation of signals using tight frames exhibits better resilience to noise and quantization [2], [3]. Tight frames are also considered to be good for representing signals sparsely, and are the ℓ2 optimal dictionaries for representing vectors that are uniformly distributed over spheres [1, Proposition 2.13, p. 10]. These are just a few among the plethora of useful properties of tight frames that make them relevant and important for many applications. We now formally discuss the concept of tight frames, their properties, and their characterization. Definition 2. The fame operator G(v1 ,...,vK ) : Hn −→ Hn of a sequence (v1 , . . . , vK ) of vectors is defined by G(v1 ,...,vK ) (v) ≔ K X i=1 hv, vm ivm . The following result provides the necessary and sufficient conditions for tightness of a frame. Theorem 3. [12, Proposition 1, p. 2, ] [9, Theorem 2.1, p. 4] A sequence of vectors (v1 , . . . , vK ) ⊂ Hn is a tight frame to Hn with some constant a > 0, if and only if • The lengths kvi k of the frame vectors satisfy K 2 II. R EVIEW max kvi k ≤ a ≔ OF TIGHT FRAMES Definition 1. For an n dimensional Hilbert space Hn with an inner product h·, ·i, a sequence of vectors (v1 , . . . , vK ) ⊂ Hn is said to be a frame of Hn if it spans Hn ; a frame is said to be tight, if there exists a number that for every P a > 0 such 2 |hv, v i| holds. v ∈ Hn , the equality a kvk2 = K i i=1 A classical example of a tight frame is an orthonormal basis of Hn that satisfies the definition with a = 1 and K = n. Some i=1,...,K • 1X 2 kvi k . n i=1 The frame operator satisfies G(v1 ,...,vK ) = aIn , where In is the identity operator on Hn . A. Characterization of Tight Frames We observe that the definition of a tight frame does not give a direct method to compute them. One of the ways to compute tight frames is by minimizing a certain potential function that is motivated from physical examples briefly outlined in [9], [12]. The following definitions are relevant for this article: We get the following analogue of Theorem 6. Definition 4. The frame force FF : Hn × Hn −→ Hn experienced by a point u ∈ Hn due to another point v ∈ Hn is defined by Proposition 7. For any sequence of vectors (v1 , . . . , vK ) ⊂ Hn , we have 1 NFP(v1 , . . . , vK ) ≥ . n FF (u, v) ≔ 2 hu, vi (u − v). The preceding inequality is satisfied with the equality if and only if (v1 , . . . , vK ) is a tight frame of Hn . Definition 5. The frame potential function FP : HnK −→ R of a sequence of vectors (v1 , . . . , vK ) is defined by FP(v1 , . . . , vK ) ≔ K X K X i=1 j=1 tr G2(v1 ,...,vK ) = FP(v1 , . . . , vK ) and it also follows that, |hvj , vi i|2 . Observe that the frame force between any two points in Hn pushes them towards orthogonality. In this sense we can say that a tight frame is the “most orthogonal” collection of vectors in Hn ; alternatively, a tight frame is a collection of vectors that are maximally spread out in the space. It was established in [12], [9] that finite tight frames for Hn are in an equilibrium configuration under the frame force, and hence are the local minimizers of the associated frame potential. Thus, tight frames are characterized as the minimizers of the frame potential, and can be computed by variational techniques. This particular fact is the assertion of the following theorem. Theorem 6. [12, Proposition 4, p. 8] For any sequence of vectors (v1 , . . . , vK ) ⊂ Hn , the following holds 2  K 1 X 2 kvi k ≤ FP(v1 , . . . , vK ). n i=1 The preceding inequality is satisfied with equality if and only if (v1 , . . . , vK ) is a tight frame of Hn . From Theorem 6 we conclude that tight frames are not only local, but are global minimizers of the frame potential, subject to the constraint that the length of each vector in the sequence is fixed. Thus, we can say that the frame potential of a given sequence (v1 , . . . , vK ) gives us a measure of its tightness. However, the lower bound of the frame potential given by Theorem 6 depends on the sequence itself. This restricts the use of the frame potential of a sequence as a measure of its tightness when comparing two generic frames. For example,  let us consider the frames F1 ≔ √ (1, 0)⊤ , (1, 1)⊤ and √  F2 ≔ (10, 0)⊤ , (−5, −5 3)⊤ , (−5, 5 3)⊤ of R2 . From Definition 5, the frame potential of the frames F1 and F2 are 7 and 45000 respectively. Even though 7 < 45000, from the second assertion of Theorem 3 we see that the frame F1 is not tight, where as F2 is a tight frame. To address this issue, we normalize the frame potential by appropriately scaling the vectors so that the frame potential calculated this way is a constant for every tight frame. Let (v1 , . . . , vK ) ⊂ Hn be any sequence of vectors, we define the Normalized Frame Potential ( NFP ) of the sequence (v1 , . . . , vK ) using its frame operator as NFP(v1 , . . . , vK ) ≔  tr G2(v1 ,...,vK ) 2 . tr G(v1 ,...,vK ) Proof. From [13, Lemma 1, p. 7] tr G(v1 ,...,vK ) = i=1 Then kvi k2 . FP(v1 , . . . , vK ) NFP(v1 , . . . , vK ) =  P 2 , K 2 kv k i i=1 and the assertion follows immediately from Theorem 6. The NFP of the frames F1 and F2 are 7/9 and 1/2 respectively, which clearly indicates that the frame F2 is tighter than the frame F1 . Our NFP (4) allows us to compare the tightness of any two arbitrary sequences of vectors in Hn and therefore can be regarded as a valid measure of tightness of the given sequence of vectors. III. M AIN R ESULTS We would like to find the optimal orientations of the columns of the matrix C(A,B,T ) , that optimize the three mea sure of qualities discussed in Section I, namely, tr G−1 (A,B,T ) , λ−1 min (G(A,B,T ) ) and det(G(A,B,T ) ). Let us consider a generic sequence (v1 , . . . , vK ) ⊂ Rn of vectors. Then the three MOQ’s stated above evaluated for the generic sequence (v1 , . . . , vK ) are given in terms of the corresponding frame −1 operator G(v1 ,...,vK ) by tr G−1 (v1 ,...,vK ) , λmin G(v1 ,...,v  K)  and det G(v1 ,...,vK ) respectively. Let α1 , . . . , αK be a non increasing sequence of positive real numbers such that P α α1 ≤ n1 K i=1 i . In order to find the optimal orientation of the vectors,  we optimize the three objective functions tr G−1 , (v ,...,v ) 1 K   −1 λmin G(v1 ,...,vK ) and det G(v1 ,...,vK ) , subject to the constraint that the lengths of the vectors are fixed, i.e., hvi , vi i = αi for all i = 1, . . . , K. Thus, we have the following three optimization problems:   minimize tr G−1 (v1 ,...,vK ) vi subject to hvi , vi i = αi for all i = 1, . . . , K, (5) span(v1 , . . . , vK ) = Rn . minimize vi (4) K X subject to   λ−1 min G(v1 ,...,vK ) hvi , vi i = αi for all i = 1, . . . , K, span(v1 , . . . , vK ) = Rn . (6) maximize vi subject to   det G(v1 ,...,vK ) hvi , vi i = αi for all i = 1, . . . , K, span(v1 , . . . , vK ) = Rn . (7) Theorem 8. A sequence of vectors (v1 , . . . , vK ), that is feasible for the optimization problems (5), (6) and (7) is an optimal solution if and only if it is a tight frame of Rn . Proof. For the non increasing finite sequences λ ≔ (λ1 , . . . , λn ), and α ≔ (α1 , . . . , αK ) of positive real numbers we define the relation λ ≻ α if the following two conditions hold: m m X X λi ≥ αi for all m = 1, . . . , n − 1, and i=1 i=1 K X i=1 λi = (8) αi . i=1 The conditions of (8) are analogue of the standard majorization conditions [14, Chapter 1]. n×n For a symmetric non negative definite matrix G ∈ R+ , we define λ(G) ≔ λ1 (G), . . . , λn (G) to be the non increasingP sequence  of the eigenvalues of the matrix G. Let K a ≔ n1 i=1 αi . We will use the following result related to the decomposition of non-negative definite matrices. Lemma 9. [15, Theorem 4.6] [13, Theorem 2.8, p. 4] For any given sequence of positive real numbers α and a non n×n with K ≥ n, the following negative definite matrix G ∈ R++ statements are equivalent: n • There exists a sequence of vectors (v1 , . . . , vK ) ⊂ R such that G = G(v1 ,...,vK ) and hvi , vi i = αi for all i = 1, 2, . . . , K. • λ(G) ≻ α. On the one hand, for any sequence of vectors (v1 , . . . , vK ) that are feasible for the optimization problems (5), (6) and (7), n×n from Lemma 9 it follows that G(v1 ,...,vK ) ∈ R++ and λ(G) ≻ α. On the other hand, for any symmetric positive definite matrix G such that λ(G) ≻ α, we conclude again from Lemma 9 that there exists a sequence of vectors (v1 , . . . , vK ) ⊂ Rn such that G = G(v1 ,...,vK ) , span(v1 , . . . , vK ) = Rn , and hvi , vi i = αi for all i = 1, . . . , K. Therefore, under the mapping n×n Rn×K ∋ (v1 , . . . , vK ) 7−→ G(v1 ,...,vK ) ∈ R+ , (9) the optimization problems: minimize G ∈ Rn×n ++ tr(G−1 ) subject to λ(G) ≻ α, λ−1 min (G) subject to λ(G) ≻ α, maximize det(G) subject to λ(G) ≻ α, G ∈ Rn×n ++ Note that the optimization problems (5), (6) and (7) are optimization problems over sequences of vectors. The next Theorem characterizes and provides solutions of (5), (6) and (7); in its proof we get equivalent optimization problems with non negative definite matrices as variables. n X minimize (10) G ∈ Rn×n ++ (11) (12) are equivalent to (5), (6) and (7) respectively. Claim 10. G∗ ≔ aIn is the unique (corresponding to a given α) optimal solution of the optimization problem (10). Proof. Let us consider the following optimization problem: minimize tr(G−1 ) subject to tr(G) = na. G ∈ Rn×n ++ (13) The optimization problem (13) is the same as (22) in [1, p. 17] with ΣV = In , whose solution is given in (25) of the same article. Therefore, from [1] we conclude that G∗ ≔ aIn is the unique optimal solution to the problem (13). It is easy to see that for a symmetric non negative definite matrix G, the condition that λ(G) ≻ α is sufficient for the equality tr(G) = na to hold. Therefore, the optimum value tr(G∗ −1 ) in the optimization problem (13) is a lower bound of the optimal value (if it exists) of the problem (10). However, it can be easily verified that λ(G∗ ) ≻ α; thus, G∗ is feasible for the optimization problem (10), and the objective function evaluated at G = G∗ is equal to tr(G∗ −1 ), which is a lower bound of the optimal value of (10). Therefore, the optimization problem (10) admits an optimal solution. Since G∗ is the unique solution to (13), we conclude that G∗ is the unique optimal solution to (10) as well. Claim 11. G∗ ≔ aIn is the unique (corresponding to a given α) optimal solution of the optimization problem (11). Proof. The objective function and the constraint in problem (11) can be explicitly characterized in terms of the eigenvalues of the variable matrix G. Then under the map n×n R++ ∋ G 7−→ λ(G), (14) we get the following optimization problem equivalent to (11). −1 minimize min{λ1 , . . . , λn } λi >0 (15) subject to λ ≻ α. For every sequence (λ1 , . . . , λn ) that for the optiPK Pnis feasible mization problem (15), we see that i=1 λi = i=1 αi = na. Therefore, min{λ1 , . . . , λn } ≤ a, leading to, −1 min{λ1 , . . . , λn } ≥ a−1 . Therefore, the value a−1 is a lower bound of the optimal value (if it exists) of the optimization problem (15). Let us define λ∗i ≔ a for all i = 1, 2, . . . , n. It can be easily verified that (λ∗1 , . . . , λ∗n ) ≻ α and (16) −1 min{λ∗1 , . . . , λ∗n } = a−1 . From (16) it follows that the sequence (λ∗1 , . . . , λ∗n ) is feasible for the optimization problem (15), and that the objective function evaluated at (λ∗1 , . . . , λ∗n ) is equal to the lower bound a−1 . Therefore, we conclude that the optimization problem (15) admits an optimal solution, and that the sequence (λ∗1 , . . . , λ∗n ) is an optimal solution. It should also be noted that (λ∗1 , . . . , λ∗n ) is the unique sequence of positive real numbers that satisfies (16). Therefore, the sequence (λ∗1 , . . . , λ∗n ) is the unique optimal solution of the problem (15). Due to the equivalence of the optimization problems (11) and (15), we conclude that the optimization problem (11) also admits an optimal solution. A non negative definite symmetric matrix G∗ is an optimal solution of the problem (11) if and only if it satisfies λi (G∗ ) = a for all i = 1, 2, . . . , n, (17) and we know for a fact that aIn is the only matrix that satisfies (17) that is also feasible for the problem (11). Thus, G∗ = aIn is the unique optimal solution of the problem (11). Claim 12. G∗ ≔ aIn is the unique (corresponding to a given α) optimal solution to the optimization problem (12). Proof. Writing the objective function and the constraints of the optimization problem (12) in terms of the eigenvalues λ(G) of the matrix G, we get the following optimization problem equivalent to (12). n Y maximize λi >0 λi (18) i=1 λ ≻ α. subject to For every sequence (λ1 , . . . , λn ) that is feasible for the problem (18), it follows that n Y i=1 λi ≤ n 1 X n i=1 λi n = K 1 X n αi i=1 n = an . (19) Therefore, the value an is an upper bound to the optimal value (if it exists) of the optimization problem (18). Let us define λ∗i ≔ a for all i = 1, 2, . . . , n, it follows that (λ∗1 , . . . , λ∗n ) ≻ α, and n Y λ∗i = an . (20) i=1 It should also be noted that (λ∗1 , . . . , λ∗n ) is the unique sequence of positive real numbers that satisfies (20). Therefore, the optimization problem (18) admits an unique optimal solution and the sequence (λ∗1 , . . . , λ∗n ) is the unique optimizer. Equivalently, as we have seen in the proof of Claim 11, G∗ ≔ aIn is the unique optimal solution to the optimization problem (12). Due to the equivalence of the optimization problem pairs (5)-(10), (6)-(11) and (7)-(12), we conclude from the Claims 10, 11, and 12 that a sequence (v1 , . . . , vK ) of vectors is an optimal solution if and only if its frame operator satisfies G(v1 ,...,vK ) = aIn , which in turn is true if and only if (v1 , . . . , vK ) is a tight frame (from Theorem 3). In addition to the fact that tight frames are optimal solutions of the optimization problems (5), (6) and (7), we have previously listed some desirable properties of tight frames for representation of generic vectors in Section II. Most of the reachability(both ballistic and servomechanism [16, p. 7475]) control problems arising in practice, involve solving the following linear equation for various values of x0 and xT : xT − AT x0 = T −1 X i=0 Ai B u(T − 1 − i) (21) either directly or indirectly. This is equivalent to expressing the vector xT − AT x0 as a linear combination of the columns of C(A,B,T ) . We would like to have the the columns of C(A,B,T ) to be oriented as tightly as possible in order to inherit those advantages. Thus, a measure of quality of the LTI system (1) should be the measure of tightness of the columns of the matrix C(A,B,T ) ; this is a key proposal of this article. Definition 13. We define a measure of quality η(A, B, T ) for the LTI system (1) as a measure of the tightness of the columns of C(A,B,T ) ; defined by η(A, B, T ) ≔ tr G2(A,B,T ) 2 . tr G(A,B,T ) (22) From Proposition 7, for any LTI system given by the pair (A, B) ∈ (Rn×n × Rn×m ) and N ∋ T ≥ τ , we have η(A, B, T ) ≥ 1/n, (23) and equality holds only when the columns of matrix C(A,B,T ) constitute a tight frame for Rn . A direct application of the Proposition 7 gives us the following sufficient condition for the controllability of the LTI system in terms of the MOQ η(A, B, T ). 1 Proposition 14. For the LTI system (1), if η(A, B, T ) < n−1 for some T ∈ N, then the LTI system is controllable in the classical sense. Proof. Suppose not, i.e., the system (A, B) is not controllable 1 but satisfies η(A, B, T ) < n−1 for some T ∈ N. Let vi be the th i column of the matrix C(A,B,T ) for i = 1, . . . , mT . Then span(v1 , . . . , vmT ) is a d dimensional subspace of Rn , where d ≤ n − 1. In particular, each vi belongs to this subspace, which is a Hilbert space in its own right. From Proposition 7 we conclude that 1 1 , η(A, B, T ) = NFP(v1 , . . . , vmT ) ≥ ≥ d n−1 which is a contradiction. The assertion follows. R EFERENCES [1] M. R. Sheriff and D. Chatterjee, “Optimal dictionary for least squares representation,” arXiv preprint arXiv:1603.02074, 2016. [2] L. Shen, M. Papadakis, I. A. Kakadiaris, I. Konstantinidis, D. Kouri, and D. Hoffman, “Image denoising using a tight frame,” IEEE transactions on image processing, vol. 15, no. 5, pp. 1254–1263, 2006. [3] W. Zhou, S. Yang, C. Zhang, and S. Fu, “Adaptive tight frame based multiplicative noise removal,” SpringerPlus, vol. 5, no. 1, p. 122, 2016. [4] T. Strohmer and R. W. Heath, “Grassmannian frames with applications to coding and communication,” Applied and computational harmonic analysis, vol. 14, no. 3, pp. 257–275, 2003. [5] R. B. Holmes and V. I. Paulsen, “Optimal frames for erasures,” Linear Algebra and its Applications, vol. 377, pp. 31–51, 2004. [6] P. Müller and H. Weber, “Analysis and optimization of certain qualities of controllability and observability for linear dynamical systems,” Automatica, vol. 8, no. 3, pp. 237–246, 1972. [7] C. Johnson, “Optimization of a certain quality of complete controllability and 0bservability for linear dynamical systems’,” 1969. [8] F. Pasqualetti, S. Zampieri, and F. Bullo, “Controllability metrics, limitations and algorithms for complex networks,” IEEE Transactions on Control of Network Systems, vol. 1, no. 1, pp. 40–52, 2014. [9] J. J. Benedetto and M. Fickus, “Finite normalized tight frames,” Advances in Computational Mathematics, vol. 18, no. 2-4, pp. 357–385, 2003. [10] R. J. Duffin and A. C. Schaeffer, “A class of nonharmonic fourier series,” Transactions of the American Mathematical Society, vol. 72, no. 2, pp. 341–366, 1952. [11] I. Daubechies, A. Grossmann, and Y. Meyer, “Painless nonorthogonal expansions,” Journal of Mathematical Physics, vol. 27, no. 5, pp. 1271– 1283, 1986. [12] P. G. Casazza, M. Fickus, J. Kovačević, M. T. Leon, and J. C. Tremain, “A physical interpretation of tight frames,” in Harmonic analysis and applications. Springer, 2006, pp. 51–76. [13] P. G. Casazza and N. Leonhard, “Classes of finite equal norm parseval frames,” Contemporary Mathematics, vol. 451, pp. 11–32, 2008. [14] A. W. Marshall, I. Olkin, and B. C. Arnold, Inequalities: theory of majorization and its applications. Springer, 1979, vol. 143. [15] J. Antezana, P. Massey, M. Ruiz, D. Stojanoff et al., “The schur-horn theorem for operators and frames with prescribed norms and frame operator,” Illinois Journal of Mathematics, vol. 51, no. 2, pp. 537–560, 2007. [16] R. W. Brockett, Finite dimensional linear systems. SIAM, 2015.
3cs.SY
Approximate Hierarchical Clustering via Sparsest Cut and Spreading Metrics arXiv:1609.09548v1 [cs.DS] 29 Sep 2016 Moses Charikar∗ Vaggos Chatziafratis∗ October 3, 2016 Abstract Dasgupta recently introduced a cost function for the hierarchical clustering of a set of points given pairwise similarities between them. He showed that this function is N P -hard to optimize, but a top-down recursive partitioning heuristic based on an αn -approximation algorithm for uniform sparsest cut gives an approximation of O(αn log n) (the current best algorithm has √ αn = O( log n)). We show that the aforementioned sparsest cut heuristic in fact obtains an O(αn )-approximation. The algorithm also applies to a generalized cost function studied by Dasgupta. Moreover, we obtain a strong inapproximability result, showing that the Hierarchical Clustering objective is hard to approximate to within any constant factor assuming the SmallSet Expansion (SSE) Hypothesis. Finally, we discuss approximation algorithms based on convex relaxations. We present a spreading metric SDP relaxation for the problem and show that it √ has integrality gap at most O( log n). The advantage of the SDP relative to the sparsest cut heuristic is that it provides an explicit lower bound on the optimal solution and could potentially yield an even better approximation for hierarchical clustering. In fact our analysis of this SDP served as the inspiration for our improved analysis of the sparsest cut heuristic. We also show that a spreading metric LP relaxation gives an O(log n)-approximation. ∗ Computer Science Department, Stanford University, [email protected], [email protected] 1 1 Introduction Hierarchical Clustering (HC) of a data set is a recursive partitioning of the data into clusters. Such methods are widely used in data analysis. To be more formal, in the Hierarchical Clustering (HC) problem, the input is a weighted undirected graph G = (V, E, w). Each data point corresponds to a node in the graph and edges connect similar points. The heavier the edge weight the stronger the similarity between the data points. The goal is to produce a partitioning of the data into successively smaller clusters, starting from the original graph G as the initial cluster and ending with n singleton clusters. The HC is represented as a tree with leaves corresponding to data points and internal nodes corresponding to clusters in the hierarchy. Such a hierarchical decomposition of data has several advantages over flat clustering (k-means, k-center etc): firstly, there is no need to fix the number k of clusters we want to create; secondly, large datasets are understood simultaneously at many levels of granularity and thirdly, many greedy heuristics with provable approximation guarantees ([Das16]) can be used to construct it. Despite its important applications for many scientific areas such as biology (e.g. gene expression), data analysis, phylogenetics, social sciences and statistics, HC and the algorithms we use to solve it in practice are not yet well-understood. Many heuristics have been proposed, some of which are based on a natural “bottom-up” approach by recursively merging data that are similar: at the beginning each data point is a separate cluster and we start merging them based on their similarity as we go up the hierarchy. These are the so-called agglomerative methods that are provided by standard Data Analysis packages and include for example single-linkage, average linkage etc. ([JD88, JMF99, BLG14, HTF09]). These methods are specified procedurally rather than in terms of an objective function for HC; this lack of objective functions for the problem of HC was addressed by the recent work of Dasgupta ([Das16]). He introduced a simple cost function that, given pairwise similarities between data points, assigns a score to any possible tree on those points. The tree corresponds to the hierarchical decomposition of the data and its score reflects the quality of the solution. Let T be any rooted (not necessarily binary) tree that has a leaf for each point in our dataset. For a node u in T , we denote with T [u] the subtree rooted at u, and with leaves(T [u]) ⊆ V we denote the leaves of this subtree. For leaves i, j ∈ V , the expression i ∨ j denotes their lowest common ancestor in T , i.e. T [i ∨ j] is the smallest subtree whose leaves include both i and j. The following cost function is the HC cost function: X costG (T ) = wij |leaves(T [i ∨ j])|. (1) ij∈E We observe that a heavy edge should not be cut at the top of the tree because it would cause a high cost due to the term |leaves(T [i ∨ j])| that would be large. For example, if an edge {i, j} of unit weight is cut at the first split of the data, then we pay n. If it is cut further down, in a subtree that contains a δ fraction of the data, then we pay δn. We would like to find a tree T ∗ that minimizes the above cost. It is not difficult to see that there must always exist an optimal tree that is binary, since by converting any split that creates more than two subtrees to a sequence of binary splits, we can never increase the cost. A generalized version for the cost function is also considered in [Das16]: X costG (T ) = wij f (|leaves(T [i ∨ j])|). (2) ij∈E 2 1.1 Related Work Dasgupta introduced the cost function (1) and explained why it is a good objective function for hierarchical clustering. He presented some interesting special cases (e.g. planted partitions) for which optimizing (1) actually finds the correct underlying HC. He showed that optimizing it is an NP-hard problem and showed that a simple heuristic based on an αn approximation for Sparsest Cut will √ achieve a factor O(αn · log n) approximation. The current best αn ratio for Sparsest Cut is O( log n) from a breakthrough result of [ARV09]. The heuristic starts by taking Sparsest Cut for the input graph G, splitting it into (G1 , G2 ) and then applying Sparsest Cut recursively to the pieces G1 , G2 . Dasgupta also proved that a slightly modified heuristic yields basically the same approximation guarantee for optimizing (2). Another natural approach for dealing with HC is to try to optimize standard popular cost functions for flat clustering, such as the k-means, k-median or k-center([DL05, Pla03, LNRW10]). However, with this approach, it is necessary to cut at some level the hierarchy so that we get k clusters at the end or use many different values of k to achieve a satisfying depth of decomposition. People have also studied methods of HC in terms of statistical consistency ([Har85, CDKL14, EBW15]), where data points are sampled from a fixed underlying distribution and we are interested in the convergence of the tree structure obtained from the data as the sample size goes to infinity. Only a few methods are known to be consistent ([CDKL14, EBW15]). Furthermore, the authors of [BLG14] study the performance of agglomerative clustering techniques in the presence of noise and they propose a new algorithm that is more robust and performs better in cases with noisy data where traditional agglomerative algorithms fail. Recently we were informed that independently of our work, Roy and Pokutta [RP16] got a similar result for Hierarchical Clustering via spreading metrics. In particular, they used an LP relaxation based on ultrametrics to prove an O(log n) approximation. The LP relaxation they formulated was similar √ to ours but we viewed it as a vector programming relaxation and we managed to obtain an O( log n) approximation. As far as their analysis is concerned they used the extensively studied (in the context of graph partitioning) idea of sphere growing (see [LR88, GVY93, ENRS99, CGW03, ENRS00]). On the other hand, we got our initial O(log n) approximation by proving that the hierarchical clustering objective function falls into the divide and conquer approximation algorithms via spreading metrics paradigm of [ENRS00] and combining it with a result of Bartal ([Bar04]). Finally, they also gave the same constant factor inapproximability result as we did, based on the small set expansion hypothesis. 1.2 Our results and structure of the paper We show (Section 2) that the recursive sparsest cut (RSC) algorithm that uses any αn -approximation algorithm for uniform sparsest cut achieves an O(αn ) approximation for hierarchical clustering, shaving a log n factor from Dasgupta’s analysis. The analysis can be modified to prove that the same guarantee holds even for the generalized cost function (2). We also present (Section 3) a strong inapproximability result for HC, in particular, that it is hard to approximate HC to within any constant factor assuming the Small Set Expansion (SSE) Hypothesis. In Section √ 4, we present an SDP relaxation based on spreading metrics with integrality gap at most O( log n) for HC. The advantage of the SDP relative to the sparsest cut heuristic is that it provides an explicit lower bound on the optimal solution and could potentially yield an even better approximation for hierarchical clustering. In fact, we first developed a rounding algorithm for this SDP and our analysis later served as the inspiration for our improved analysis of the sparsest cut heuristic for both cost functions (1) and (2). Finally, we show how the spreading metrics paradigm of [ENRS00] 3 in combination with a result of Bartal [Bar04] (Appendix B) can be exploited in order to get an O(log n) approximation for hierarchical clustering via a linear program (Appendix C). We conclude in Section 5 with questions for further research. Some preliminaries are deferred to the Appendix A and omitted proofs are given in Appendix D. A key idea behind our analysis of the recursive sparsest cut algorithm as well as the formulation of the SDP relaxation is to view a hierarchical clustering of n data points as a collection of partitions of the data, one for each level t = n − 1, . . . , 1. Here the partition for a particular level t consists of maximal clusters in the hierarchical clustering of size at most t. When we partition a cluster of size r, we charge this to levels t ∈ [r/4, r/2] of this collection of partitions. This is crucial for eliminating the log n term in the approximation guarantee. 2 Better Analysis for Recursive Sparsest Cut (RSC) As discussed previously, Dasgupta [Das16] showed that a simple top-down Recursive Sparsest Cuts (RSC) heuristic that uses an αn -approximation algorithm for uniform sparsest cut gives an approximation of O(αn log n) for hierarchical clustering. More precisely, the RSC heuristic starts from the given graph G = (V, E), uses any αn -approximation algorithm for sparsest cut, thus splitting G into (G1 , G2 ) and then recurses on G1 and G2 . The output is a binary tree of the sequence of cuts performed by the algorithm. In this section, by drawing inspiration from our SDP construction and analysis presented later in Section 4, we present an improved analysis for this simple heuristic, dropping the log n factor and showing that it actually yields an O(αn ) approximation. This is satisfying since any improvement for Sparsest Cut would immediately yield a better approximation result for hierarchical clustering. Additionally, fast algorithms (i.e. nearly linear time algorithms) for Sparsest Cut ([She09]) render the heuristic useful in practice. 2.1 Analysis of RSC heuristic Let the given graph be G = (V, E). We suppose for clarity of presentation that it is unweighted; the analysis applies directly to weighted graphs and later, we see how to generalize it for more general cost functions. Let OPT be the optimal solution for hierarchical clustering (we abuse notation slightly by using OPT to denote both the solution as well as its objective function value). Let OP T (t) be the maximal clusters in OPT of size at most t. Note that OP T (t) is a partition of V . We denote EOP T (t) the edges that are cut in OP T (t), i.e. edges with end points in different clusters in OP T (t). For convenience, we also define EOP T (0) , E. Pn−1 Claim 2.1. OP T = t=0 |EOP T (t)|. Proof. Consider any edge (u, v) ∈ E. Suppose that the size of the minimal cluster in OPT that contains both u and v is r. Then the contribution of (u, v) to the LHS is r. On the other hand, (u, v) ∈ EOP T (t) for all t ∈ {0, . . . , r − 1}. Hence the contribution to the RHS is also r. It will be convenient to use the following bound that is directly implied by the above claim: 2OP T = 2 · n−1 X t=0 |EOP T (t)| ≥ n X EOP T (⌊t/2⌋) (3) t=0 Let’s look at a cluster A with size |A| = r in the solution produced by RSC. Using a sparsest cut approximation algorithm, we create two clusters B1 , B2 with sizes s, (r − s) respectively, with 4 B1 being the smaller, i.e. s ≤ ⌊r/2⌋. The contribution of this cut to the hierarchical clustering objective function is: |E(B1 , B2 )| · r. We basically want to charge this cost to OP T (⌊r/2⌋) and for that we first observe that the edges cut in OP T (⌊r/2⌋), when restricted to the cluster A (i.e. having both endpoints in A), satisfy the following: s · |EOP T (⌊r/2⌋) ∩ A| ≤ r X t=r−s+1 |EOP T (⌊t/2⌋) ∩ A|. (4) This follows easily from the fact that |EOP T (t) ∩ A| ≤ |EOP T (t − 1) ∩ A|. Now in order to explain our charging scheme, let’s look at the partition A1 , ..., Ak induced inside the cluster A by OP T (⌊r/2⌋) ∩ A, where by design the size of each |Ai | = γi |A|, γi ≤ 1/2. We have: |E(Ai , A \ Ai )| |E(Ai , A \ Ai )| = , ∀i ∈ 1, ..., k |Ai ||A \ Ai | γi (1 − γi )r 2 We take the minimum over all i (an upper bound on the sparsest cut in A) and we have: P |EOP T (⌊r/2⌋) ∩ A| |E(Ai , A \ Ai )| |EOP T (⌊r/2⌋) ∩ A| i |E(Ai , A \ Ai )| =4· ≤ P min ≤2· 2 2 2 i γi (1 − γi )r r /2 r2 i γi (1 − γi )r The first inequalityPabove, trivially by definition for the minimum and the second inPk follows k 2 equality holds because i=1 γi = 1, i=1 γi ≤ 1/2 and the factor of 2 is introduced since we double counted every edge. We partition A using an αn -approximation for sparsest cut and so: |E(B1 , B2 )| 4 ≤ αn · 2 · |EOP T (⌊r/2⌋) ∩ A| s(r − s) r since the RHS (without the αn factor) is an upper bound of the optimal sparsest cut value. The contribution of this step to the hierarchical clustering objective function is: 4αn s(r − s) · |EOP T (⌊r/2⌋) ∩ A| ≤ 4αn s · |EOP T (⌊r/2⌋) ∩ A|. r We claim the following: r|E(B1 , B2 )| ≤ (5) Claim 2.2. Let A be a cluster of size rA in our hierarchical clustering solution, that we split into 2 pieces (B1 , B2 ) of size sA , rA − sA respectively with |B1 | ≤ |B2 |. Then, summing over all clusters A: X A rA X t=rA −sA +1 |EOP T (⌊t/2⌋) ∩ A| ≤ n X t=1 |EOP T (⌊t/2⌋)| (6) Proof. For a fixed value of t and A, the LHS is: |EOP T (⌊t/2⌋) ∩ A|. Consider which clusters A contribute such a term to the LHS. From the fact that rA − sA + 1 ≤ t ≤ rA , we need to have that |B2 | < t and since B2 is the larger piece that was created when A was split, we deduce that A is a minimal cluster of size |A| ≥ t > |B2 | ≥ |B1 |, i.e. if both A’s children are of size less than t, then this cluster A contributes such a term. The set of all such A form a disjoint partition of V because of the definition for minimality (in order for them to overlap in the hierarchical clustering, one of them needs to be ancestor of the other and this cannot happen because of minimality). Since EOP T (⌊t/2⌋) ∩ A for all such A forms a disjoint partition of EOP T (⌊t/2⌋), the claim follows by summing up over all t. Theorem 2.3. Given an unweighted graph G, the Recursive Sparsest Cut algorithm achieves an O(αn ) approximation for the hierarchical clustering problem. Proof. The proof follows easily by combining (3), (4), (5), (6) and summing over all clusters A created by RSC. See Appendix D. 5 2.2 Generalized Cost Function and RSC In the original [Das16] paper introducing the objective function P of hierarchical clustering, Dasgupta also considered the more general cost function: costG (T ) = ij∈E wij f (|leaves(T [i ∨ j])|), where f is defined on the non-negative reals, is strictly increasing, and has f (0) = 0 (e.g. f (x) = ln(1 + x) or f (x) = x2 ). For this more general cost function, he proved that a slightly modified greedy topw(S, V \ S) 1 2 down heuristic (using with |V | ≤ |S| ≤ |V |, instead of Sparsest Cuts) min((f |S|), f (|V \ S|)) 3 3 f (n′ ) ). Now, we continues to yield an O(αn · log n · cf ) approximation1 , where cf , max1≤n′ ≤n f (n′ /3) analyze the previous RSC algorithm (with no modifications), but in the case of a weighted graph G and when we are trying to optimize the generalized cost function. We again make the natural assumptions that the function f acting on the number of leaves in subtrees, is defined on the nonnegative reals, is strictly increasing and f (0) = 0 (also see Remark 1). f (n′ ) . For what follows, we abuse notation We also define: cf , max1≤n′ ≤n f (⌊n′ /2⌋) − f (⌊n′ /4⌋) slightly for ease of presentation and write r/2, r/4 etc. instead of ⌊r/2⌋, ⌊r/4⌋ etc. As in the simple unweighted case, we use here the same definitions for OP T and EOP T (t). Let w(EOP T (t)) denote the total weight of the edges EOP T (t), i.e. the edges cut by OP PTr−1at level t, where we define w(∅) = 0 and we also define g(t) , f (t + 1) − f (t). We note that t=0 g(t) = f (r) − f (0) = f (r). Pn−1 Claim 2.4. t=0 w(EOP T (t)) · g(t) = OP T Proof. We will prove that the contributions of an edge e = (u, v) to the LHS and RHS are equal. Let A (|A| = re ) be the minimal cluster in the optimal solution that contains both u, v. The contribution of e to the RHS is: we · f (re ). As for the contribution to the LHS, since A is minimal and |A| = re , we deduce that e ∈ OP T (t), ∀t < re . Also for levels t ≥ re we have e ∈ A or some superset of A Pr−1 and thus e 6∈ OP T (t) Hence the contribution to the LHS is: we · t=0 g(t) = we · f (r). Focus on a cluster A (|A| = r) in the solution produced by the algorithm. Let cut(A) denote the edges in A cut by partitioning A. This contributes w(cut(A)) · f (r) to the objective. We will charge Pr/2−1 our cost using the following quantity related to the optimum solution: t=r/4 w(EOP T (t)∩A)·g(t). For that, we look at OP T (r/2) ∩ A and let’s say that clusters A1 , A2 , ..., Ak are induced by this partition, each being of size |Ai | = γi |A| ≤ |A|/2 = r/2 (γi ≤ 1/2). Then, P w(Ai , A \ Ai ) 2 · w(EOP T (r/2) ∩ A) ≤ SC(A) ≤ 2i P r r 2 · 1/2 i γi (1 − γi ) where SC(A) is the optimum sparsest cut (value) for A. Since we used an αn -approximation, w(cut(A)) 4αn · (w(EOP T (r/2) ∩ A) ≤ αn · SC(A) ≤ =⇒ s(r − s) r2 s w(cut(A)) · f (r) ≤ 4αn · · w(EOP T (r/2) ∩ A) · f (r) r Since w(EOP T (t) ∩ A) ≥ w(EOP T (t + 1) ∩ A), we have: r/2−1 X t=r/4 (7) r/2−1 w(EOP T (t) ∩ A) · g(t) ≥ w(EOP T (r/2) ∩ A) · X g(t) = t=r/4 = (f (r/2) − f (r/4)) · w(EOP T (r/2) ∩ A) 1 (8) There isn’t a direct polynomial time implementation of this heuristic for arbitrary functions f to the best of our knowledge; however, a heuristic based on balanced cut will achieve similar guarantees. 6 Using equations (7), (8), we get that: w(cut(A)) · f (r) ≤ 4αn · r/2−1 X s f (r) · · w(EOP T (t) ∩ A) · g(t) r f (r/2) − f (r/4) (9) t=r/4 We now sum up the cost contributions of all clusters created in our hierarchical clustering solution. Let s(A) be the size of the smaller piece produced in partitioning A. costRSC = X A w(cut(A)) · f (|A|) ≤ 4αn · cf X X s(A) |A|/2−1 A |A| t=|A|/4 w(EOP T (t) ∩ A) · g(t) To complete our argument we need to make the comparison between OPT which is: g(t) and the sum X s(A) |A|/2−1 X w(EOP T (t) ∩ A) · g(t), |A| A Pn−1 t=0 (10) w(EOP T (t))· (11) t=|A|/4 where the first summation goes over all clusters A in the solution we produce. Claim 2.5. P s(A) P|A|/2−1 Pn−1 w(EOP T (t) ∩ A) · g(t) ≤ 2 · t=0 w(EOP T (t)) · g(t) A t=|A|/4 |A| Proof. Consider some edge e = (u, v) ∈ EOP T (t). Focus on sets A in the solution produced such P|A|/2−1 that e ∈ EOP T (t) ∩ A so that e contributes to the term t=|A|/4 w(EOP T (t) ∩ A) · g(t) in the LHS. For all such clusters A, we need to have: |A|/4 ≤ t < |A|/2 =⇒ 2t < |A| ≤ 4t. Let A1 , A2 , ..., Ak−1 be the sets for which the term w(EOP T (t) ∩ A) appears: A1 is the largest cluster (satisfying 2t < |A1 | ≤ 4t) that contains the edge e = (u, v) and when split we call its larger piece A2 (again this set contains e) etc., Ak−1 is the last set for which the term appears and (u, v) does not appear in Ak (Ak is the larger piece of the two that we got when we partitioned Ak−1 ). We have: Pk−1 k−1 X s(Ai ) |A1 | − |A2 | |A2 | − |A3 | |Ak−1 | − |Ak | |A1 | |Ai | − |Ai+1 | = + + ... + ≤ i=1 ≤ ≤ 2. |Ai | |A1 | |A2 | |Ak−1 | mini |Ai | 2t i=1 (12) (the constant can be optimized, but it does not change the asymptotic bound). Thus the contribution of every edge e ∈ EOP T (t) to the LHS is at most 2we g(t). Note that this is exactly the contribution to the RHS. This establishes the claim. Theorem 2.6. RSC achieves an O(cf · αn ) approximation of the generalized objective function for Hierarchical Clustering. Proof. The proof follows from (10), Claim 2.4, (7), (8), (9), (11), and (12). See Appendix D. Remark 1. In order for our guarantee to be useful, we need cf to be a constant (or a slowly growing quantity). This would mean that f is polynomially growing. We observe that in the case where the function f is exponentially growing then our guarantee is not interesting (and in fact we may need to use a different strategy than RSC) and in the case f is logarithmic, then we would get a factor ≈ O(αn log n) approximation, which is the same guarantee as [Das16]. 7 3 Hierarchical Clustering Hardness and the Small Set Expansion Hypothesis In this section, we prove a strong inapproximability result, showing that, even in unweighted graphs (i.e. unit cost edges), the Hierarchical Clustering objective is hard to approximate to within any constant factor, assuming the Small Set Expansion hypothesis. 3.1 SSE and hardness amplification Given a graph G(V, E), define the following quantities for non-empty subsets S ⊂ V : normalized set size µ(S) , |S|/|V |, and edge expansion ΦG (S) , |E(S, V \ S)| P (here di is the degree of i). The i∈S di Small Set Expansion hypothesis was introduced by Raghavendra and Steurer [RS10]. Problem 3.1 (Small-Set Expansion(η, δ)). Given a regular graph G(V, E), distinguish between the following two cases: Yes: There exists a non-expanding set S ⊆ V with µ(S) = δ and ΦG (S) ≤ η. No: All sets S ⊆ V with µ(S) = δ are highly expanding with ΦG (S) ≥ 1 − η. Hypothesis 3.2 (Hardness of approximating Small-Set Expansion). For all η > 0, there exists δ > 0 such that the promise problem Small-Set Expansion(η, δ) is NP-hard. [RS10] showed that the Small Set Expansion Hypothesis implies the Unique Games Conjecture of Khot [Kho02]. A decision problem is said to be SSE-hard if Small-Set Expansion(η, δ) reduces to it by a polynomial time reduction for some constant η and all δ > 0. Raghavendra, Steurer and Tulsiani [RST10] showed the following hardness amplification result for graph expansion (see Preliminaries for Gaussian Graphs definitions): Theorem 3.3. For all q ∈ N and ǫ, γ > 0, it is SSE-hard to distinguish between the following two cases for a given graph H = (VH , EH ): Yes: There exist q disjoint sets S1 , ..., Sq ⊆ VH satisfying for all l ∈ [q]: µ(Sl ) = 1/q and ΦH (Sl ) ≤ ǫ + o(ǫ). No: For all sets S ⊆ VH : ΦH (S) ≥ ΦG(1−ǫ/2) (µ(S)) − γ/µ(S), where ΦG(1−ǫ/2) (µ(S)) is the expansion of sets of volume µ(S) in the infinite Gaussian graph G(1 − ǫ/2). 3.2 Hierarchical Clustering Hardness Now we are ready to prove our main hardness result. Our proof follows the argument of [RST10] for establishing the hardness of Minimum Linear Arrangement. We prove the following: Theorem 3.4. (Hardness of Hierarchical Clustering). For every ǫ > 0, it is SSE-hard to distinguish between the following two cases for a given graph G = (V, E), with |V | = n: Yes: There exists a decomposition tree T of the graph such that costG (T ) ≤ ǫn|E| √ No: For any decomposition tree T of the graph costG (T ) ≥ c ǫn|E|. Proof. We apply Theorem 3.3 for the following values: q = ⌈2/ǫ⌉, ǫ′ = ǫ/3 and γ = ǫ. We need to first handle the Yes case. We get that the vertices can be divided into sets S1 , S2 , ..., Sq , each having size n/q = nǫ/2, such that at most ǫ′ + o(ǫ′ ) fraction of edges leave the sets (i.e. go across sets). Now consider the hierarchical clustering solution that first partitions the vertices into the sets S1 , S2 , ..., Sq and then partitions each Si arbitrarily. Edges inside the set Si contribute at most |Si | to the objective function and this is |Si | = n/q = ǫn/2. Moreover, edges whose endpoints are 8 in different sets will have contribution at most n; but there are at most ǫ/2 fraction of such edges and so the overall objective for this hierarchical clustering solution is at most ǫn|E|. Now, we handle the No case by using the argument of [RST10] for Minimum Linear Arrangement that follows from an observation of [DKSV06] and the fact that the objective function of Minimum Linear Arrangement is always less than the cost of Hierarchical Clustering. To see the latter, observe that if we have a hierarchical clustering tree T then consider the ordering of the vertices induced by the order that they appear as leaves in T (like projecting the leaves to a line). Then, the stretch of an edge (u, v) that is cut, can be at most the size of the subtree that corresponds to that edge and this is exactly the quantity: |leaves(T [u∨v])|. Since we know ([RST10, DKSV06]) √ that in the No case, for all orderings π : V → [n], E(u,v)∼E [|π(u) − π(v)|] ≥ c ǫn, it immediately √ follows that: costG (T ) ≥ c ǫn|E|. 4 Approximation for HC using SDP In this section, we present our SDP relaxation for HC based on spreading metrics, we point out its relation with the SDP relaxation of k-balanced partitioning in [KNS09] and we prove that it is an √ O( log n) approximation for both the simple and the generalized cost function. 4.1 Writing the SDP We view a hierarchical clustering of n data points as a collection of partitions of the data, one for each level t = n − 1, . . . , 1. The partition for a particular level t satisfies the property that every cluster has size at most t; additionally, for every vertex i, the cluster containing vertex i at level t is the maximal cluster in the hierarchy with size at most t. The partition at level (t − 1) is a refinement of the partition at level t. Note that the partition corresponding to t = 1 must consist of n singleton clusters. We represent the partition at level t by the set of variables xtij , i, j ∈ V , where xtij = 1 if i and j are in different clusters in the partition at level t and xtij = 0 if i and j are in the same cluster. We point out some properties of these variables xtij satisfied by an integer solution corresponding to an actual hierarchical clustering: 1. refinement: xtij ≤ xt−1 ij . If i and j are separated at level t, then they continue to be separated at level t − 1. 2. triangle inequality: xtij + xtjk ≥ xtik . In the clustering at level t, if i and j are the same cluster, j and k are in the same cluster, then i and k are in the same cluster. 3. ℓ22 metric: The triangle inequality condition implies that xtij is a metric. Further, we can associate unit vectors vit with vertices i at level t such that xtij = 21 ||vit − vjt ||22 . In order to do this, all vertices in the same cluster at level t are assigned the same vector, and vertices in different clusters are assigned orthogonal vectors. P t 4. spreading: j xij ≥ n − t. For the clustering at level t, there are at most t vertices in the same cluster as i. Hence there are at least n − t vertices in different clusters. For each such vertex j, xtij = 1 implying the inequality. 5. cluster size: The of the smallest cluster in the hierarchy containing both vertices i and Psize n−1 t j is given by 1 + t=1 xij . Suppose C is the smallest cluster containing both i and j. Then for t ≥ |C|, the partition at level t must contain C or some superset of C. Hence xtij = 0 for 9 t ≥ |C|. For t <P |C|, the clustering at level t must have i and j in different clusters, hence n−1 t t xij = 1. Hence t=1 xij = |C| − 1. Finally, we can write the SDP relaxation SDP-HC as follows: min n−1 X X xtij wij = min X 1 kv t − vjt k22 wij 2 i (SDP-HC) t=1 ij∈E t=1 ij∈E such that: n−1 X xtij ≤ xt−1 ij , t = n − 1, n − 2, ...1 x0ij = 1, ∀i, j ∈ V and xtij ≤ 1, ∀i, j, t 1 xtij = kvit − vjt k22 and kvit k22 = 1, ∀i ∈ V 2 X t t t xtij ≥ n − t, ∀i, t xij ≤ xjk + xik , ∀i, j, k ∈ V, ∀t and j It is easy to see that an optimal solution to SDP-HC can be computed in polynomial time. By the preceding discussion, we have shown that SDP-HC is a valid relaxation for HC: Lemma 4.1. The value of an optimal solution to SDP-HC can be computed in polynomial time, and gives a lower bound on the cost of an optimal solution to the hierarchical clustering problem. 4.2 Connections of SDP-HC with Balanced Partitioning The authors of [KNS09] write an SDP relaxation for the problem of k-Balanced Partitioning (k-BP) which was the following (SDP-k-BP): min X ij∈E 1 wij · kvi − vj k22 2 (SDP-k-BP) such that: kvi − vj k22 + kvj − vk k22 ≥ kvi − vk k22 , ∀i, j, k ∈ V X1 n kvi − vj k22 ≥ |S| − , ∀S ⊆ V, i ∈ S 2 k j∈S √ Their result was that the above relaxation is an O( log k log n) approximation (bi-criteria ν = 2) algorithm for k-BP, that will create pieces of size at most 2n/k. Claim 4.2. Let A be a cluster of size r. SDP-HC solution restricted to set A, at level t = r/4 is a valid solution for k-balanced partitioning based on the SDP-k-BP relaxation, where k = 4. Proof. See Appendix D. In order to produce a hierarchical clustering from the SDP solution, we recursively partition V in a top down fashion: while partitioning a cluster A, we use the SDP-HC solution restricted to set A at level t = |A|/4 as a valid solution for 4-balanced partitioning and invoke the algorithm of [KNS09] as a black box. Let EA be the edges cut by the algorithm when splitting cluster A. From the analysis of [KNS09] , we get that (for us k = 4, so log k is constant): p w(EA ) ≤ O( log n) · SDPA (r/4) (13) and we partition A into pieces of size at most ≤ 2 · r/4 = r/2 (bi-criteria). In the analysis that follows we will use this result as a black box. 10 4.3 √ O( log n) approximation for Hierarchical Clustering √ Now we go on to see that the integrality gap of our SDP-HC is O( log n). Let r be the size of a cluster A in the solution produced. For our charging argument, we observe that the we pay r · w(EA ) where EA are the edges cut by the [KNS09] algorithm when partitioning A. We will Pr/4 r charge this cost to t=r/8+1 SDPA (t) ≥ SDPA (r/4) (note that as t decreases more edges are 8 cut). Thus, using [KNS09], the total cost of the solution produced (where r depends on A): costHC = X A Claim 4.3. P P|A|/4 A r/4 X X p r · w(EA ) ≤ O( log n) SDPA (t). t=|A|/8+1 SDPA (t) (14) A t=r/8+1 ≤ O(SDP-HC). Proof. See Appendix D. Theorem 4.4. √ The cost of the solution produced by the SDP-HC rounding algorithm is within a factor of O( log n) from the SDP value. √ Proof. Using Claim D.4 and (14) we get that costOP T ≤ O( log n)·SDP-HC. 4.4 The case of the generalized cost function Now, we consider the performance of SDP-HC-gen (where SDP-HC-gen is essentially the same as SDP-HC where actually we multiply each term in the objective function by g(t) = f (t + 1) − f (t)) for the generalized cost function and we show essentially the same guarantee (for the proof, see Appendix D): Theorem 4.5. The cost of the solution produced by the SDP-HC-gen rounding algorithm is within √ f (r) a factor of O( log n · cf ) from the SDP value where cf , maxr∈{1,...,n} . f (r/4) − f (r/8) 5 Conclusion and Further Research We proved that the recently introduced objective function for hierarchical clustering in [Das16], can be approximated within √ a factor of O(αn ) by repeatedly taking (αn approximations to) Sparsest Cuts and within O( log n) using a spreading metric SDP relaxation. We also proved that it is hard to approximate the HC objective function within any constant factor assuming the Small Set Expansion Hypothsesis, which was the first strong inapproximability for the problem to the best of our knowledge. We finally presented an LP based O(log n) approximation by showing that HC falls into the spreading metrics paradigm of [ENRS00]. We would like to conclude the paper asking if we can do even better for this particular problem. The reason why we might face difficulties in improving the approximation guarantee may have to do with the much more basic problem of Minimum Balanced Bisection. It seems implausible that we would get a better approximation for hierarchical clustering before getting an improvement in the current best approximation guarantee for Balanced Bisection. It is also interesting to try to come up with other suitable cost functions for HC, apart from those considered here. Another direction for research is that of beyond worst case analysis. What can we say about exact recovery on γ-stable instances under Bilu-Linial [BL12b] notion of stability? For example, in [MMV14] they show that the standard SDP relaxation for Max-Cut is integral if the instance is 11 √ sufficiently stable (γ ≥ c log n log n for some absolute constant c > 0). It would be nice to formalize and say something similar for our problem, since this would not only explain the success of certain heuristics for HC based on finding sparsest cuts, but also justify their use in practice, assuming that in real applications most instances are stable (such an assumption for clustering problem is widely accepted; for more see [BL12a, BL12b, MMV14] and references therein). Finally, we also find interesting the scenario where the input graph is drawn from a probability distribution for which there is a truly hierarchical structure. Can we then prove that a suitable SDP relaxation will indeed find a hierarchical structure close to the actual underlying hierarchy with high probability? 12 References [AMS11] Christoph Ambühl, Monaldo Mastrolilli, and Ola Svensson. Inapproximability results for maximum edge biclique, minimum linear arrangement, and sparsest cut. SIAM Journal on Computing, 40(2):567–596, 2011. [ARV09] Sanjeev Arora, Satish Rao, and Umesh Vazirani. Expander flows, geometric embeddings and graph partitioning. Journal of the ACM (JACM), 56(2):5, 2009. [Bar04] Yair Bartal. Graph decomposition lemmas and their role in metric embedding methods. In European Symposium on Algorithms, pages 89–97. Springer, 2004. [BL12a] Maria Florina Balcan and Yingyu Liang. Clustering under perturbation resilience. In International Colloquium on Automata, Languages, and Programming, pages 63–74. Springer, 2012. [BL12b] Yonatan Bilu and Nathan Linial. Are stable instances easy? Combinatorics, Probability and Computing, 21(05):643–660, 2012. [BLG14] Maria-Florina Balcan, Yingyu Liang, and Pramod Gupta. Robust hierarchical clustering. Journal of Machine Learning Research, 15:3831, 2014. [CDKL14] Kamalika Chaudhuri, Sanjoy Dasgupta, Samory Kpotufe, and Ulrike Luxburg. Consistent procedures for cluster tree estimation and pruning. IEEE Transactions on Information Theory, 60(12):7900–7912, 2014. [CGW03] Moses Charikar, Venkatesan Guruswami, and Anthony Wirth. Clustering with qualitative information. In Foundations of Computer Science, 2003. Proceedings. 44th Annual IEEE Symposium on, pages 524–533. IEEE, 2003. [CHKR06] Moses Charikar, Mohammad Taghi Hajiaghayi, Howard Karloff, and Satish Rao. l22 spreading metrics for vertex ordering problems. In Proceedings of the seventeenth annual ACM-SIAM symposium on Discrete algorithm, pages 1018–1027. Society for Industrial and Applied Mathematics, 2006. [Das16] Sanjoy Dasgupta. A cost function for similarity-based hierarchical clustering. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, pages 118–127, New York, NY, USA, 2016. ACM. [DKSV06] Nikhil R Devanur, Subhash A Khot, Rishi Saket, and Nisheeth K Vishnoi. Integrality gaps for sparsest cut and minimum linear arrangement problems. In Proceedings of the thirty-eighth annual ACM symposium on Theory of computing, pages 537–546. ACM, 2006. [DL05] Sanjoy Dasgupta and Philip M Long. Performance guarantees for hierarchical clustering. Journal of Computer and System Sciences, 70(4):555–569, 2005. [EBW15] Justin Eldridge, Mikhail Belkin, and Yusu Wang. Beyond hartigan consistency: merge distortion metric for hierarchical clustering. 2015. [ENRS99] Guy Even, Joseph Naor, Satish Rao, and Baruch Schieber. Fast approximate graph partitioning algorithms. SIAM Journal on Computing, 28(6):2187–2214, 1999. 13 [ENRS00] Guy Even, Joseph Seffi Naor, Satish Rao, and Baruch Schieber. Divide-and-conquer approximation algorithms via spreading metrics. Journal of the ACM (JACM), 47(4):585– 616, 2000. [FL07] Uriel Feige and James R Lee. An improved approximation ratio for the minimum linear arrangement problem. Information Processing Letters, 101(1):26–29, 2007. [GVY93] Naveen Garg, Vijay V Vazirani, and Mihalis Yannakakis. Approximate max-flow min(multi) cut theorems and their applications. In Proceedings of the twenty-fifth annual ACM symposium on Theory of computing, pages 698–707. ACM, 1993. [Har85] J. A. Hartigan. Statistical theory in clustering. Journal of Classification, 2(1):63–76, 1985. [HTF09] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. Springer, 2nd edition, 2009. [JD88] Anil K Jain and Richard C Dubes. Algorithms for clustering data. Prentice-Hall, Inc., 1988. [JMF99] Anil K Jain, M Narasimha Murty, and Patrick J Flynn. Data clustering: a review. ACM computing surveys (CSUR), 31(3):264–323, 1999. [Kho02] Subhash Khot. On the power of unique 2-prover 1-round games. In Proceedings of the thiry-fourth annual ACM symposium on Theory of computing, pages 767–775. ACM, 2002. [KNS09] Robert Krauthgamer, Joseph Seffi Naor, and Roy Schwartz. Partitioning graphs into balanced components. In Proceedings of the twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 942–949. Society for Industrial and Applied Mathematics, 2009. [LNRW10] Guolong Lin, Chandrashekhar Nagarajan, Rajmohan Rajaraman, and David P Williamson. A general approach for incremental approximation and hierarchical clustering. SIAM Journal on Computing, 39(8):3633–3669, 2010. [LR88] Tom Leighton and Satish Rao. An approximate max-flow min-cut theorem for uniform multicommodity flow problems with applications to approximation algorithms. In Foundations of Computer Science, 1988., 29th Annual Symposium on, pages 422–431. IEEE, 1988. [LR99] Tom Leighton and Satish Rao. Multicommodity max-flow min-cut theorems and their use in designing approximation algorithms. Journal of the ACM (JACM), 46(6):787– 832, 1999. [MMV14] Konstantin Makarychev, Yury Makarychev, and Aravindan Vijayaraghavan. Bilu-linial stable instances of max cut and minimum multiway cut. In Proceedings of the TwentyFifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’14, pages 890– 906, Philadelphia, PA, USA, 2014. Society for Industrial and Applied Mathematics. [Pla03] C Greg Plaxton. Approximation algorithms for hierarchical location problems. In Proceedings of the thirty-fifth annual ACM symposium on Theory of computing, pages 40–49. ACM, 2003. 14 [RP16] Aurko Roy and Sebastian Pokutta. Hierarchical clustering via spreading metrics. 2016. [RS10] Prasad Raghavendra and David Steurer. Graph expansion and the unique games conjecture. In Proceedings of the forty-second ACM symposium on Theory of computing, pages 755–764. ACM, 2010. [RST10] Prasad Raghavendra, David Steurer, and Madhur Tulsiani. Reductions between expansion problems. In Computational Complexity (CCC), 2012 IEEE 27th Annual Conference on, pages 64–73. IEEE, 2010. [She09] Jonah Sherman. Breaking the multicommodity flow barrier for o (vlog n)approximations to sparsest cut. In Foundations of Computer Science, 2009. FOCS’09. 50th Annual IEEE Symposium on, pages 363–372. IEEE, 2009. 15 A Preliminaries Here, we would like to briefly discuss some important problems and definitions that will frequently come up in the rest of the paper. Some additional definitions and facts may be presented in the sections for which they are relevant. Sparsest Cut. Given a weighted, undirected graph G = (V, E, w) (|V | = n) we want to find a set S 6= ∅, V that minimizes the ratio: w(S, V \ S) |S| · |V \ S| It is an NP-hard problem for which many important results are known including the LP relaxation of Leighton-Rao [LR99] with approximation ratio O(log n) and the SDP √ relaxation with triangle inequality of Arora, Rao, Vazirani [ARV09] with approximation ratio O( log n); it is a major open question if we can improve this approximation ratio. Small-Set Expansion. SSE is a hardness assumption that informally tells us the following: Given a graph G, it should be hard to distinguish between the case where there exists a small set S that has only a few edges leaving it versus the case where for all small sets S there are many edges leaving the sets. For a formal statement see Section 3. This hardness assumption is closely connected to the Unique Games Conjecture (UGC) of [Kho02] and its variants. In particular, the SSE Hypothesis implies UGC([RS10]) and it has been used to prove many inapproximability results for problems like balanced separator and minimum linear arrangement ([RST10]). k-Balanced Partitioning. Given a weighted undirected graph G on n vertices, the goal is to partition the vertices into k equally sized components of size roughly n/k so that the total weight of the edges connecting different components is small. It is an important generalization of wellknown graph partitioning problems, including minimum bisection (k=2) and minimum balanced cut and it has applications in VLSI design, data mining (clustering), social network analysis etc. It is an NP-hard problem and the authors of [KNS09] present a bi-criteria (which means that pieces√may have size 2n/k rather than n/k) approximation algorithm achieving an approximation of O( log n log k). Their result will be useful in our analysis for our spreading metrics SDP in Section 4. However, for us the dependence on k will be unimportant since in our analysis we only need k to be a small constant (e.g. k=4). Minimum Linear Arrangement. Given a weighted undirected multigraph G(V, E, w) (|V | = n) we want to find a permutation π : V → {1, 2, . . . , |V |} that minimizes: X w(x, y) · |σ(y) − σ(x)| (x,y)∈E,x<y √ A factor O( log n log log n) approximation for MLA was shown in [CHKR06, FL07]. In addition, some recent hardness results are also known: in [RST10] it is shown that it is SSE-hard to approximate MLA to within any fixed constant factor and in [AMS11] the authors prove that MLA has no polynomial time approximation scheme, unless NP-complete problems can be solved in randomized subexponential time. Gaussian Graphs. For a constant ρ ∈ (−1, 1), let G(ρ) denote the infinite graph over R where the weight of an edge (x, y) is the probability that two standard Gaussian random variables X, Y with correlation ρ equal x and y respectively. The expansion profile of Gaussian graphs is given by ΦG(ρ) (µ) = 1 − Γρ (µ)/µ where the quantity Γρ (µ) defined as Γρ (µ) , P(x,y)∼Gρ (x ≥ t, y ≥ t), 16 where Gρ is the 2-dimensional Gaussian distribution with covariance matrix:   1 ρ ρ 1 and t ≥ 0 is such that P(x,y)∼Gρ {x ≥ t} = µ. B Spreading Metrics and Bartal’s Decomposition Bartal ([Bar04]) presented a graph decomposition lemma and used it as a key ingredient in order to prove an O(log n) approximation guarantee for the spreading metrics paradigm in undirected graphs, thus improving the results for many problems considered in [ENRS00]. At a high level, the decomposition finds a cluster in the graph that has a low diameter, such that the weight of the cut created is small with respect to the weight of the cluster. The decomposition is essentially based on the decomposition of [GVY93] performed in a careful manner so as to achieve a more refined bound on the ratio between the cut and the cluster’s weight. Let G = (V, E) be an undirected graph with two weight functions w, l : E → R+ . We interpret l(e) to be the length of the edge e, and the distance d(u, v) between pairs of vertices u, v in the graph, is determined by the length of the shortest path between them. Given a subgraph H = (VH , EH ) of G, let dH denote the distance in H, P let ∆(H) denote the diameter of H, and ∆ = ∆(G). We also define the volume of H, φ(H) = e∈EH w(e)l(e). Given a subset S ⊆ V , G(S) denotes the subgraph Pof G induced by S. Given partition (S, S̄), let Γ(S) = {(u, v) ∈ E; u ∈ S, v ∈ S̄} and cut(S) = e∈Γ(S) w(e). For a vertex v and r ≥ 0, the ball at radius r around v is defined as B(v, r) = {u ∈ V |d(u, v) ≤ r}. Let S = B(v, r). Define φ̄(S) = φ̄(v, r) = X w(e)l(e) + e=(u,w):u,w∈S X e=(u,w)∈Γ(S) w(e)(r − d(v, u)). Given a subgraph H, we can similarly define φ̄H with respect to the subgraph H. Define the spherical-volume of H, φ∗ (H) = max φ̄H (v, v∈H ∆(H) ). 4 In the following, we state three basic lemmas, which are based on a standard argument similar to that of [GVY93], before stating the main result in B.4. For the proofs, we refer the reader to [Bar04]. Lemma B.1. Given a graph G, there exists a partition (S, S̄) of G, where S is a ball and cut(S) ≤ 8 ln(φ∗ (G)/φ∗ (G(S))) ¯ · φ(S). ∆(G) The decomposition will become useful when it is applied recursively. This is particularly important for our main application which is hierarchical clustering and we can have a recursive approach where we find a good cut, creating two subgraphs and then we continue with the two new components. More generally, for the second lemma of [Bar04], we will be interested in applications which are associated with a cost function cost over subgraphs Ĝ of G which is nonnegative, 0 on singletons and obeys the following natural recursion rule: 17 cost(Ĝ) ≤ cost(Ĝ(S)) + cost(Ĝ(S̄)) + ∆(Ĝ) · cut(S). (15) Now we state the second basic lemma: Lemma B.2. Any cost function defined by (15) obeys cost(G) ≤ O(log(φ/φ0 )) · φ(G), where φ = φ(G) and φ0 is the minimum value of φ(Ĝ) on non-singleton subgraphs Ĝ. Finally, we have the third lemma which will give us the O(log n) approximation. We can obtain a bound depending only on n, by modifying the process slightly by associating a volume φ(G)/n with the nodes, like in [GVY93]. This will ensure that φ0 ≥ φ(G)/n and by substituting we get what we want: Lemma B.3. The function defined by (15) using the modified procedure obeys cost(G) ≤ O(log n) · φ(G). Now we turn our attention to the connection with the spreading metrics paradigm. Having the definition of a spreading metric in mind (see Section C) and the previous three recursive graph decomposition lemmas we can easily obtain the following theorem, as proved in [Bar04]: Theorem B.4. There exists an O(log n) approximation for problems in the spreading metrics paradigm. C LP Spreading Metrics and O(log n) approximation We prove here that the hierarchical clustering objective function defined above falls into the divide and conquer approximation algorithms via spreading metrics paradigm of [ENRS00]. The spreading metric paradigm applies to minimization problems on undirected graphs G = (V, E) with edge weights w(e) ≥ 1. We also have an auxiliary graph H and a scaler function on subgraphs of H (e.g. size of the components of H). A decomposition tree T is a tree with nodes corresponding to non-overlapping subsets of V , forming a recursive partition of the nodes V . For a node t of T , we denote by Vt the subset at t. Associated are the subgraphs Gt , Ht induced by Vt . Let P Ft be the set of edges that connect vertices that belong to different children of t, and P w(Ft ) = e∈Ft w(e). The cost of T is cost(T ) = t∈T scaler(Ht ) · w(Ft ). Definition C.1. A spreading metric is a function on the edges of the graph l : E → R+ satisfying the following two properties: P 1. Lower bound property: The volume of the graph e∈E w(e)l(e) is a lower bound on the optimal cost. 2. Diameter property: For any U ⊆ V and HU the subgraph of H induced by U , has diameter ∆(U ) ≥ scaler(HU ). We closely follow their formulation for the Linear Arrangement problem, which also falls into the spreading metrics paradigm, but we make the necessary semantic changes. We need to show the divide and conquer applicability and the spreading metrics applicability of their result for our problem. Firstly, to establish the divide and conquer applicability we consider any binary decomposition tree T that fully decomposes the problem.(we normalize the edge weights by dividing with the minimum edge weight). Note that there is a 1 − 1 correspondence between the leaves of T and the 18 vertices of G. The solution to the hierarchical clustering problem that is represented by T is easily given by the cuts, in G, induced by the internal nodes of T . The cost of the tree T is: X costG (T ) = |Vt |w(Ft ). (16) t∈T where Vt and Ft are the set of vertices and cut corresponding to the tree node t and w(Ft ) is the total weight of the edges cut at this internal node t. We need to show that this cost bounds the cost of solutions built up from T . For this we prove that for every tree node t the cost of the subtree rooted at t, denoted Tt , bounds the cost of solutions built up from Tt to the hierarchical clustering problem for the subgraph of G induced by the set of vertices Vt . We prove the claim by induction on the level of the tree nodes. The claim clearly holds for all leaves of T . Consider an internal tree node t ∈ T and denote its two children by tL and tR . By induction the claim holds for both tL and tR . The solution represented by Tt is given by concatenating the solutions represented by TtL and TtR . Note that the additional cost is at most |Vt | times the capacity of the cut Ft that separates VtL from VtR . We get costG (Tt ) ≤ costG (TtL ) + costG (TtR ) + |Vt |w(Ft ). (17) The inductive claim follows. We now show how to compute the spreading metric that assigns length l(e) to an edge e ∈ E of the graph. Consider the following linear program (LP1): X w(e) · l(e) (18) 1 (|U |2 − 1) 4 (19) ∀e ∈ E : l(e) ≥ 0 (20) min e∈E s.t. ∀U ⊆ V, ∀v ∈ V : X u∈U distl (u, v) ≥ In the linear program, we follow the notation that regards l(e) as edge lengths, and distl (u, v) is the length of the shortest path from u to v. We will refer to constraint (6) as the spreading constraint. The linear program can be solved in polynomial time since we can construct a separation oracle. In order to verify that the spreading constraint (19) is satisfied, for each vertex v, we sort the vertices in V in increasing order of distance distl (u, v) and verify the spreading constraint for all prefixes U of this sorted order. Lemma. Let l(e) denote a feasible solution of the linear program. For every U ⊆ V with (|U | > 1), 1 and for every vertex v ∈ U there is a vertex u ∈ U for which distl (u, v) ≥ |U |. 10 1 Proof. The average distance of a node u ∈ U − {v} from v is greater than (|U | − 1), because of the 4 constraint corresponding to U and v. Therefore, there exists a vertex u ∈ U whose distance from v is 1 1 at least the average distance from v, and the lemma follows, since distl (u, v) ≥ (|U | − 1) ≥ |U |. 4 10 (|U | > 1) Note that the previous lemma comes short of the diameter guarantee by a factor of 10: while the diameter guarantee requires that the diameter of a subset U be greater than |U |, the proven bound is only |U |/10. However, it is known that this only affects the constant in the approximation factor. 19 In the next lemma, we prove that the volume of an optimal solution of the linear program satisfies the lower bound property. Lemma. The cost of an optimal solution of the linear program is a lower bound on the cost of an optimal hierarchical clustering of G. Proof. Consider any binary hierarchical clustering given by the sequence of cuts in the decomposition tree T and define l(e) = |leaves(T [i ∨ j])| for edge e = (i, j) ∈ E. It is easy to see that this is indeed a metric and it is actually an ultrametric. We show that l(e) is a feasible solution for P the linear program. The cost e∈E w(e) · l(e) equals the cost of the hierarchical clustering induced by the tree T . The feasibility of l(e) is proved as follows: Consider a subset U ⊆ V and a vertex v ∈ U . We observe that the average distance from v of the vertices in U will be minimized when U is “packed around” v, meaning that with each cut we peel off only one vertex at a time. We have that: X 1 1 distl (u, v) = 2 + 3 + ... + |U | ≥ (|U |2 − 1) ≥ (|U |2 − 1) 2 4 u∈U Hence, l(·) is a feasible solution and the lemma follows. With the above two lemmas we have proved that our hierarchical clustering objective function falls into the spreading metrics paradigm, because it satisfies the lower bound property and the diameter property. Using Bartal’s decomposition and specifically Theorem B.4 from Section B we get an approximation guarantee of O(log n): Theorem C.1. There exists an O(log n) approximation for the hierarchical clustering objective function defined by (1). D Omitted Proofs Theorem D.1. Given an unweighted graph G, the Recursive Sparsest Cut algorithm achieves an O(αn ) approximation for the hierarchical clustering problem. Proof. By combining (3), (4), (5), (6) and summing over all clusters A created by RSC, we get the following result for the overall performance guarantee: costRSC = X A ≤ 4αn X A r X t=r−s+1 r · |E(B1 , B2 )| ≤ X A 4αn s|EOP T (⌊r/2⌋) ∩ A| ≤ |EOP T (⌊t/2⌋) ∩ A| ≤ 4αn n X t=1 |EOP T (⌊t/2⌋)| ≤ 8αn · OP T Theorem D.2. RSC achieves a O(cf · αn ) approximation of the generalized objective function for Hierarchical Clustering. Proof. From (10), costRSC ≤ 4αn · cf X X s(A) |A|/2−1 A |A| t=|A|/4 20 w(EOP T (t) ∩ A) · g(t) Combining the above with Claim 2.4, (7), (8), (9), (11), (12), we get that the total cost of the RSC is at most costRSC ≤ (8cf αn ) · OP T = O(cf · αn ). Claim D.3. Let A be a cluster of size r. SDP-HC solution restricted to set A, at level t = r/4 is a valid solution for k-balanced partitioning based on the SDP-k-BP relaxation, where k = 4. Proof. To see this we need to compare the set of constraints imposed by SDP-HC and SDP-k-BP. In SDP-HC, we have some additional constraints: xtij ≤ 1 and vit ≤ 1, but that is fine since imposing extra constraints P just makes a stricterPrelaxation. Now let’s look at the spreading constraints: In t SDP-HC we have j xtij ≥ n−t =⇒ j∈S xij ≥ |S|−t which is basically the SDP-k-BP spreading constraints. Thus, by looking at the SDP-HC solution restricted to set A (|A| = r), at level t = r/4, we can get a valid 4-balanced partitioning solution of A. P P|A|/4 Claim D.4. A t=|A|/8+1 SDPA (t) ≤ O(SDP-HC). Proof. The flavor of this analysis is similar to our RSC result from Section 2. Let’s look at an edge e = (u, v) at a fixed level t. For which sets A do we get the term SDPA (t) where both endpoints u, v ∈ A? In order for u, v to belong to A: t ∈ |A|/8, |A|/4 =⇒ 4t ≤ |A| < 8t. There can be at most one such |A|, so LHS is charged only once. To see why A is unique, suppose we had two such clusters |A1 |, |A2 | that both contained u, v with their sizes |A1 |, |A2 | ∈ [4t, 8t). Since we have a hierarchical decomposition, one of A1 , A2 is ancestor of the other. Let’s say, wlog, A1 is ancestor of A2 . But then, all of its descendants are of size below the range [4t, 8t) due to the 4-partition, which is a contradiction. Remark 2. In the above analysis, whenever we write |A|/4 we mean ⌊|A|/4⌋. However this will not affect the result. Plus, we used O(SDP-HC), because some additional constants might be introduced whenever the set A is small (|A| < 8). Theorem D.5. The cost of the solution produced by the SDP-HC-gen rounding algorithm is within √ f (r) a factor of O( log n · cf ) from the SDP value where cf , maxr∈{1,...,n} . f (r/4) − f (r/8) Proof. Let A be a cluster of size |A| = r and let g(t) = f (t + 1) − f (t). We want to compare the cost of OPT for splitting A with our solution SDPA (t) for levels t = r/8 + 1, ..., r/4. Using (13): p costOP T (A) = f (r) · w(EA ) ≤ O( log n)f (r) · SDPA (r/4) ≤ p ≤ O( log n) f (r) f (r/4) − f (r/8) p ≤ O( log n) · cf r/4 X r/4 X t=r/8+1 t=r/8+1 SDPA (t) · g(t) ≤ SDPA (t) · g(t). Using now Claim D.4 and summing over all clusters A in the hierarchical clustering we get: where P Pr/4 A p OP T ≤ O( log n) · cf · SDP-HC. t=r/8+1 SDPA (t) · g(t) ≤ O(SDP-HC) holds from Claim 2.5 (slightly modified). Remark 3. As in Remark 1, here f should be polynomially growing. 21
8cs.DS
Published as a conference paper at ICLR 2018 M ODELING L ATENT ATTENTION W ITHIN N EURAL N ETWORKS arXiv:1706.00536v2 [cs.AI] 30 Dec 2017 Christopher Grimm [email protected] Department of Computer Science & Engineering University of Michigan Dilip Arumugam, Siddharth Karamcheti, David Abel, Lawson L.S. Wong, Michael L. Littman {dilip_arumugam, siddharth_karamcheti, david_abel, lsw, michael_littman}@brown.edu Department of Computer Science Brown University Providence, RI 02912 A BSTRACT Deep neural networks are able to solve tasks across a variety of domains and modalities of data. Despite many empirical successes, we lack the ability to clearly understand and interpret the learned mechanisms that contribute to such effective behaviors and more critically, failure modes. In this work, we present a general method for visualizing an arbitrary neural network’s inner mechanisms and their power and limitations. Our dataset-centric method produces visualizations of how a trained network attends to components of its inputs. The computed “attention masks” support improved interpretability by highlighting which input attributes are critical in determining output. We demonstrate the effectiveness of our framework on a variety of deep neural network architectures in domains from computer vision and natural language processing. The primary contribution of our approach is an interpretable visualization of attention that provides unique insights into the network’s underlying decision-making process irrespective of the data modality. 1 I NTRODUCTION Machine-learning systems are ubiquitous, even in safety-critical areas. Trained models used in self-driving cars, healthcare, and environmental science must not only strive to be error free but, in the face of failures, must be amenable to rapid diagnosis and recovery. This trend toward realworld applications is largely being driven by recent advances in the area of deep learning. Deep neural networks have achieved state-of-the-art performance on fundamental domains such as image classification (Krizhevsky et al., 2012), language modeling (Bengio et al., 2000; Mikolov et al., 2010), and reinforcement learning from raw pixels (Mnih et al., 2015). Unlike traditional linear models, deep neural networks offer the significant advantage of being able to learn their own feature representation for the completion of a given task. While learning such a representation removes the need for manual feature engineering and generally boosts performance, the resulting models are often hard to interpret, making it significantly more difficult to assign credit (or blame) to the model’s behaviors. The use of deep learning models in increasingly important application areas underscores the need for techniques to gain insight into their failure modes, limitations, and decision-making mechanisms. Substantial prior work investigates methods for increasing interpretability of these systems. One body of work focuses on visualizing various aspects of networks or their relationship to each datum they take as input Yosinski et al. (2015); Zeiler & Fergus (2015). Other work investigates algorithms for eliciting an explanation from trained machine-learning systems for each decision they make Ribeiro et al. (2016); Baehrens et al. (2010); Robnik-Šikonja & Kononenko (2008). A third line of work, of which our method is most aligned, seeks to capture and understand what networks focus on and what they ignore through attention mechanisms. Attention-based approaches focus on network architectures that specifically attend to regions of their input space. These “explicit” attention mechanisms were developed primarily to improve 1 Published as a conference paper at ICLR 2018 network behavior, but additionally offer increased interpretability of network decision making through highlighting key attributes of the input data (Vinyals et al., 2015; Hermann et al., 2015; Oh et al., 2016; Kumar et al., 2016). Crucially, these explicit attention mechanisms act as filters on the input. As such, the filtered components of the input could be replaced with reasonably generated noise without dramatically affecting the final network output. The ability to selectively replace irrelevant components of the input space is a direct consequence of the explicit attention mechanism. The insight at the heart of the present work is that it is possible to evaluate the property of “selective replaceability” to better understand a network that lacks any explicit attention mechanism. An architecture without explicit attention may still depend more on specific facets of its input data when constructing its learned, internal representation, resulting in a “latent” attention mechanism. In this work, we propose a novel approach for indirectly measuring latent attention mechanisms in arbitrary neural networks using the notion of selective replaceability. Concretely, we learn an auxiliary, “Latent Attention Network” (LAN), that consumes an input data sample and generates a corresponding mask (of the same shape) indicating the degree to which each of the input’s components are replaceable with noise. We train this LAN by corrupting the inputs to a pre-trained network according to generated LAN masks and observing the resulting corrupted outputs. We define a loss function that trades off maximizing the corruption of the input while minimizing the deviation between the outputs generated by the pre-trained network using the true and corrupted inputs, independently. The resultant LAN masks must learn to identify the components of the input data that are most critical to producing the existing network’s output (i.e. those regions that are given the most attention by the existing network.) We empirically demonstrate that the LAN framework can provide unique insights into the inner workings of various pre-trained networks. Specifically, we show that classifiers trained on a Translated MNIST domain learn a two-stage process of first localizing a digit within the image before determining its class. We use this interpretation to predict regions on the screen where digits are less likely to be properly classified. Additionally, we use our framework to visualize the latent attention mechanisms of classifiers on both image classification (to learn the visual features most important to the network’s prediction), and natural language document classification domains (to identify the words most relevant to certain output classes). Finally, we examine techniques for generating attention masks for specific samples, illustrating the capability of our approach to highlight salient features in individual members of a dataset. 2 R ELATED W ORK We now survey relevant literature focused on understanding deep neural networks, with a special focus on approaches that make use of attention. Attention has primarily been applied to neural networks to improve performance Mnih et al. (2014); Gregor et al. (2015); Bahdanau et al. (2014). Typically, the added attention scheme provides an informative prior that can ease the burden of learning a complex, highly structured output space (as in machine translation). For instance, Cho et al. (2015) survey existing content-based attention models to improve performance in a variety of supervised learning tasks, including speech recognition, machine translation, image caption generation, and more. Similarly, Yang et al. (2016) apply stacked attention networks to better answer natural language questions about images, and Goyal et al. (2016) investigate a complementary method for networks specifically designed to answer questions about visual content; their approach visualizes which content in the image is used to inform the network’s answer. They use a strategy similar to that of attention to visualize what a network focuses on when tasked with visual question answering problems. Yosinski et al. (2015) highlight an important distinction for techniques that visualize aspects of networks: dataset-centric methods, which require a trained network and data for that network, and network-centric methods, which target visualizing aspects of the network independent of any data. In general, dataset-centric methods for visualization have the distinct advantange of being network agnostic. Namely, they can treat the network to visualize entirely as a black box. All prior work for visualizing networks, of both dataset-centric and network-centric methodologies, is specific to particular network architectures (such as convolutional networks). For example, Zeiler & Fergus (2015) introduce a visualization method for convolutional neural networks (CNNs) that illustrates which input patterns activate feature maps at each layer of the network. Their core methodology 2 Published as a conference paper at ICLR 2018 x A A(x) ⌘ ⌦ x̃ F F F (x̃) F (x) Figure 1: Diagram of the Latent Attention Network (LAN) framework. is to project activations of nodes at any layer of the network back to the input pixel space using a Deconvolutional Network introduced by Zeiler et al. (2011), resulting in highly interpretable feature visualizations. An exciting line of work has continued advancing these methods, as in Nguyen et al. (2016); Simonyan et al. (2013), building on the earlier work of Erhan et al. (2009) and Berkes & Wiskott (2005). A different line of work focuses on strategies for eliciting explanations from machine learning systems to increase interpretability Ribeiro et al. (2016); Baehrens et al. (2010); Robnik-Šikonja & Kononenko (2008). Lei et al. (2016) forces networks to output a short “rationale” that (ideally) justifies the network’s decision in Natural Language Processing tasks. Bahdanau et al. (2014) advance a similar technique in which neural translation training is augmented by incentivizing networks to jointly align and translate source texts. Lastly, Zintgraf et al. (2017) describe a method for eliciting visualizations that offer explanation for decisions made by networks by highlighting regions of the input that are considered evidence for or against a particular decision. In contrast to all of the discussed methods, we develop a dataset-centric method for visualizing attention in an arbitrary network architecture. To the best of our knowledge, the approach we develop is the first of its kind in this regard. One similar class of methods is sensitivity analysis, introduced by Garson (1991), which seeks to understand input variables’ contribution to decisions made by the network Wang et al. (2000); Gedeon (1997); Gevrey et al. (2006). Sensitivity analysis has known limitations Mazurowski & Szecowka (2006), including failures in highly dependent input spaces and restriction to ordered, quantitative input spaces Montano & Palmer (2003). 3 M ETHOD A key distinguishing feature of our approach is that we assume minimal knowledge about the network to be visualized. We only require that the network F : Rd 7→ R` be provided as a black-box function (that is, we can provide input x to F and obtain output F (x)) through which gradients can be computed. Since we do not have access to the network architecture, we can only probe the network either at its input or its output. In particular, our strategy is to modify the input by selectively replacing components via an attention mask, produced by a learned Latent Attention Network (LAN). 3.1 L ATENT ATTENTION N ETWORK F RAMEWORK A Latent Attention Network is a function A : Rd 7→ [0, 1]d that, given an input x (for the original network F ), produces an attention mask A(x) of the same shape as x. The attention mask seeks to identify input components of x that are critical to producing the output F (x). Equivalently, the attention mask determines the degree to which each component of x can be corrupted by noise while minimally affecting F (x). To formalize this notion, we need two additional design components: LF : R` × R` 7→ R d H : R 7→ R a loss function in the output space of F , a noise probability density over the input space of F . 3 (1) Published as a conference paper at ICLR 2018 We can now complete the specification of the LAN framework. As illustrated in Figure 1, given an input x, we draw a noisy vector η ∼ H and corrupt x according to A(x) as follows: x̃ = A(x) · η + (1 − A(x)) · x, (2) where 1 denotes a tensor of ones with the same shape as A(x), and all operations are performed element-wise. Under this definition of x̃, the components of A(x) that are close to 0 indicate that the corresponding components of x represent signal/importance, and those close to 1 represent noise/irrelevance. Finally, we can apply the black-box network F to x̃ and compare the output F (x̃) to the original F (x) using the loss function LF . An ideal attention mask A(x) replaces/corrupts as many input components as possible (it has A(x) components close to 1), while minimally distorting the original output F (x), as measured by LF . Hence we train the LAN A by minimizing the following training objective for each input x: h i LLAN (x) = Eη∼H LF (F (x̃), F (x)) − βA(x) , (3) where A(x) denotes the mean value of the attention mask for a given input, x̃ is a function of both η and A(x) as in Equation 2, and β > 0 is a hyperparameter for weighting the amount of corruption applied to the input against the reproducibility error with respect to LF , for more information about this trade-off see Section E in the Appendix. 3.2 L ATENT ATTENTION N ETWORK D ESIGN To specify a LAN, we provide two components: the loss function LF and the noise distribution H. The choice of these two components depends on the particular visualization task. Typically, the loss function LF is the same as the one used to train F itself, although it is not necessary. For example, if a network F was pre-trained on some original task but later applied as a black-box within some novel task, one may wish to visualize the latent attention with respect to the new task’s loss to verify that F is considering expected parts of the input. The noise distribution H should reflect the expected space of inputs to F , since input components’ importance is measured with respect to variation determined by H. In the general setting, H could be a uniform distribution over Rd ; however, we often operate in significantly more structured spaces (e.g. images, text). In these structured cases, we suspect it is important to ensure that the noise vector η lies near the manifold of the input samples. Based on this principle, we propose two methods of defining H via the generating process for η: • Constant noise η const : In domains where input features represent quantities with default value c (e.g. 0 word counts in a bag of words, 0 binary valued images), set η = c1, where 1 is a tensor of ones with the appropriate shape and c ∈ R. • Bootstrapped noise η boot : Draw uniform random samples from the training dataset. We expect that the latter approach is particularly effective in domains where the data occupies a small manifold of the input space. For example, consider that that the set of natural images is much smaller than the set of possible images. Randomly selecting an image guarantees that we will be near that manifold, whereas other basic forms of randomness are unlikely to have this property. 3.3 S AMPLE -S PECIFIC L ATENT ATTENTION M ASKS In addition to optimizing whole networks that map arbitrary inputs to attention masks, we can also directly estimate that attention-scheme of a single input. This sample-specific approach simplifies a LAN from a whole network to just a single, trainable variable that is the same shape as the input. This translates to the following optimization procedure: h i LxSSL = Eη∼H LF (F (x̃), F (x)) − βA(x) (4) where A(x) represents the attention mask learned specifically for sample x and x̃ is a function of η, A and x defined in Eq. (2). 4 Published as a conference paper at ICLR 2018 Figure 2: Visualization of attention maps for different translated MNIST digits. For each pair of images, the original translated MNIST digit is displayed on the top, and a visualization of the attention map is displayed on the bottom (where warmer colors indicate more important regions to the pre-trained classifier). Notice the blobs of network importance around each digit, and the seemingly constant “griding” pattern present in each of the samples. 4 E XPERIMENTS To illustrate the wide applicability of the LAN framework, we conduct experiments in a variety of typical learning tasks, including digit classification and object classification in natural images. The goal of these experiments is to demonstrate the effectiveness of LANs to visualize latent attention mechanisms of different network types. Additionally, we conduct an experiment in a topicmodeling task to demonstrate the flexibility of LANs across multiple modalities. While LANs can be implemented with arbitrary network architectures, we restrict our focus here to fully-connected LANs and leave investigations of more expressive LAN architectures to future work. More specifically, our LAN implementations range from 2–5 fully-connected layers each with fewer than 1000 hidden units. At a high level, these tasks are as follows (see supplementary material for training details): Translated MNIST Data : A dataset of 28 × 28 grayscale images with MNIST digits, scaled down to 12 × 12, are placed in random locations. No modifications are made to the orientation of the digits. Task : We train a standard deep network for digit classification. CIFAR-10 Data : A dataset of 3-channel 32 × 32 color images of objects or animals, each belonging to one of ten unique classes. The images are typically centered around the classes they depict. Task : We train a standard CNN for object detection. Newsgroup-20 Data : A dataset consisting of news articles belonging to one of twenty different topics. The list of topics includes politics, electronics, space, and religion, amongst others. Task : We train a bag-of-words neural network, similar to the Deep Averaging Network (DAN) of Iyyer et al. (2015) to classify documents into one of the twenty different categories. For each experiment, we train a network F (designed for the given task) to convergence. Then, we train a Latent Attention Network, A on F . For all experiments conducted with image data, we used bootstrapped noise while our exploratory experiment with natural language used constant noise. Since LANs capture attention in the input space, the result of the latter training procedure is to visualize the attention mechanism of F on any sample in the input. For a detailed description of all experiments and associated network architectures, please consult the supplementary material. 5 5.1 R ESULTS T RANSLATED MNIST R ESULTS Results are shown in Figure 2. We provide side-by-side visualizations of samples from the Translated MNIST dataset and their corresponding attention maps produced by the LAN network. In these 5 Published as a conference paper at ICLR 2018 attention maps, there are two striking features: (1) a blob of attention surrounding the digit and (2) an unchanging grid pattern across the background. This grid pattern is depicted in Figure 3a. In what follows, we support an interpretation of the grid effect illustrated in Figure 3a. Through subsequent experiments, we demonstrate that our attention masks have illustrated that the classifier network operates in two distinct phases: 1. Detect the presence of a digit somewhere in the input space. 2. Direct attention to the region in which the digit was found to determine its class. Under this interpretation, one would expect classification accuracy to decrease in regions not spanned by the constant grid pattern. To test this idea, we estimated the error of the classifier on digits centered at various locations in the image. We rescaled the digits to 7 × 7 pixels to make it easier to fit them in the regions not spanned by the constant grid. Visualizations of the resulting accuracies are displayed in Figure 3b. Notice how the normalized accuracy falls off around the edges of the image (where the constant grid is least present). This effect is particularly pronounced with smaller digits, which would be harder to detect with a fixed detection grid. To further corroborate our hypothesis, we conducted an additional experiment with a modified version of the Translated MNIST domain. In this new domain, digits are scaled to 12 × 12 pixels and never occur in the bottom right 12 × 12 region of the image. Under these conditions, we retrained our classifier and LAN, obtaining the visualization of the constant grid pattern and probability representation presented in Figure 3(c-d). Notice how the grid pattern is absent from the bottom right-hand corner where digits never appeared at training time. Consequently, the accuracy of the classifier falls off if tested on digits in this region. Through these results, we showcase the capability of LANs to produce attention masks that not only provide insights into the inner workings of a trained network but also serve as a diagnostic for predicting likely failure modes. (a) (b) (c) (d) Figure 3: (a) Constant grid pattern observed in the attention masks on Translated MNIST. (b) Accuracy of the pre-trained classifier on 7 × 7 digits centered at different pixels. Each pixel in the images is colored according to the estimated normalized accuracy on digits centered at that pixel where warmer colors indicate higher normalized accuracy. Only pixels that correspond to a possible digit center are represented in these images, with other pixels colored dark blue. (c–d) Duplicate of (a) and (b) for a pre-trained network on a modified Translated MNIST domain where no digits can appear in the bottom right hand corner. 5.2 CIFAR-10 CNN In Figure 4, we provide samples of original images from the CIFAR-10 dataset alongside the corresponding attention masks produced by the LAN. Notice that, for images belonging to the same class, the resulting masks capture common visual features such as tail feathers for birds or hulls/masts for ships. The presence of these features in the mask suggests that the underlying classifier learns a canonical representation of each class to discriminate between images and to confirm its classification. We further note that, in addition to revealing high level concepts in the learned classifier, the LAN appears to demonstrate the ability to compose those concepts so as to discriminate between classes. This property is most apparent between the horse and deer classes, both of which show extremely similar regions of attention for capturing legs while deviating in their structure to confirm the presence of a heads or antlers, respectively. 6 Published as a conference paper at ICLR 2018 Figure 4: Each frame pairs an input image (left) with its LAN attention mask (right). Each column represents a different category: horse, plane, truck, bird, ship, and deer. 5.3 N EWSGROUP -20 D OCUMENT C LASSIFICATION R ESULTS Tables 1 and 2 contrast words present in documents against the 15 most important words, as determined by the corresponding attention mask, for topic classification. We note that these important words generally tend to be either in the document itself (highlighted in yellow) or closely associated with the category that the document belongs to. The absence of important words from other classes is explained by our choice of η0 -noise, which produces more visually appealing attention-masks, but doesn’t penalize the LAN for ignoring such words. We suspect that category-associated words not present in the document occur due to the capacity limitations on the fully-connected LAN architecture on a high dimensional and poorly structured bag-of-words input space. Future work will further explore the use of LANs in natural language tasks. Document Topic Document Words (Unordered) 15 Most Important Words comp.sys.mac.hardware ralph, rutgers, rom, univ, mac, gonzalez, gandalf, work, use, you, phone, drives, internet, camden, party, floppy, science, edu, roms, drive, upgrade, disks, computer mac, drive, computer, problem, can, this, drives, disk, use, controller, UNK memory, for, boot, fax Table 1: A visualization of the attention mask generated for a specific document in the Newsgroup20 Dataset. The document consists of the words above, and is labeled under the category “comp.sys.mac.hardware” which consists about topics relating to Apple Macintosh computer hardware. Note the top 15 words identified by the LAN Mask, and how they seem to be picking important words relevant to the true class of the given document. 5.4 S AMPLE -S PECIFIC ATTENTION M ASKS In all of the previous results, there is a strong sense in which the resultant attention masks are highly correlated with the pre-trained network outputs and less sensitive to variations in the individual input samples. Here we present results on the same datasets (see Figures 5, 3 and 4) using the sample specific objective defined in Eq. (4). We notice that these learned attention masks are more representative of nuances present in each invididual sample. This increase in contained information seems reasonable when considering the comparative ease of optimizing a single attention mask for a single sample rather than a full LAN that must learn to map from all inputs to their corresponding attention masks. 6 C ONCLUSION As deep neural networks continue to find application to a growing collection of tasks, understanding their decision-making processes becomes increasingly important. Furthermore, as this space of tasks 7 Published as a conference paper at ICLR 2018 Document Topic Document Words (Unordered) 15 Most Important Words soc.religion.christian UNK, death, university, point, complaining, atheists, acs, isn, since, doesn, never, that, matters, god, incestuous, atterlep, rejection, forever, hell, step, based, talk, vela, eternal, edu, asked, worse, you, tread, will, not, and, rochester, fear, opinions, die, faith, fact, earth oakland, lot, don, christians, alan, melissa, rushing, angels, comparison, heaven, terlep UNK, clh, jesus, this church, christians, interested, lord, christian, answer, will, heaven, find, worship, light Table 2: Another visualization of the attention mask generated for a specific document in the Newsgroup-20 Dataset. This document consists of the words above, and is labeled under the category “soc.religion.christian”, which consists of topics relating to Christianity. The presence of UNK as an important word in this religious documents could be attributed to a statistically significant number of references to people and places from Abrahamic texts which are converted to UNK due to their relative uncommonness in the other document classes. Figure 5: Each image pair contains a CIFAR-10 image and its corresponding sample-specific attention mask. Each column contains images from a different category: car, cat deer, dog, horse and ship. Notice how these sample-specific attention masks retain the class specific features mentioned in Section 5.2 while more closely tracking the subjects of the images. Document Topic Document Words (Unordered) 15 Most Important Words comp.sys.ibm.pc.hardware UNK, video, chip, used, color, card, washington, drivers, name, edu, driver, chipset, suffice, functions, for, type, cica card, chip, video, drivers, driver, type, used, cica, edu, washington, bike, functions, time, sale, color Table 3: A visualization of the sample specific attention mask generated for a specific document in the Newsgroup-20 Dataset. The document consists of the words above and is labeled under the category “comp.sys.ibm.pc.hardware” which consists of topics relating to personal computing and hardware. Words that are both in the document and detected by the sample specific attention mask are highlighted in yellow. grows to include areas where there is a small margin for error, the ability to explore and diagnose problems within erroneous models becomes crucial. 8 Published as a conference paper at ICLR 2018 Document Topic Document Words (Unordered) 15 Most Important Words talk.religion.misc newton, jesus, spread, died, writes, truth, ignorance, bliss, sandvik, not, strength, article, that, good, apple, kent ignorance, died, sandvik, kent, newton, bliss, jesus, truth, good, can, strength, for, writes, computer, article Table 4: A visualization of the sample specific attention mask generated for a specific document in the Newsgroup-20 Dataset. The document consists of the words above and is labeled under the category “talk.religion.misc” which consists of topics relating to religion. Words that are both in the document and detected by the sample specific attention mask are highlighted in yellow. In this work, we proposed Latent Attention Networks as a framework for capturing the latent attention mechanisms of arbitrary neural networks that draws parallels between noise-based input corruption and attention. We have shown that the analysis of these attention measurements can effectively diagnose failure modes in pre-trained networks and provide unique perspectives on the mechanism by which arbitrary networks perform their designated tasks. We believe there are several interesting research directions that arise from our framework. First, there are interesting parallels between this work and the popular Generative Adversarial Networks (Goodfellow et al., 2014). It may be possible to simultaneously train F and A as adversaries. Since both F and A are differentiable, one could potentially exploit this property and use A to encourage a specific attention mechanism on F , speeding up learning in challenging domains and otherwise allowing for novel interactions between deep networks. Furthermore, we explored two types of noise for input corruption: η const and η boot . It may be possible to make the process of generating noise a part of the network itself by learning a nonlinear transformation and applying it to some standard variety of noise (such as Normal or Uniform). Since our method depends on being able to sample noise that is similar to the “background noise” of the domain, better mechanisms for capturing noise could potentially enhance the LAN’s ability to pick out regions of attention and eliminate the need for choosing a specific type of noise at design time. Doing so would allow the LAN to pick up more specific features of the input space that are relevant to the decision-making process of arbitrary classifier networks. R EFERENCES David Baehrens, Timon Schroeter, Stefan Harmeling, Motoaki Kawanabe, Katja Hansen, and KlausRobert MÞller. How to explain individual classification decisions. Journal of Machine Learning Research, 11(Jun):1803–1831, 2010. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. Yoshua Bengio, Réjean Ducharme, Pascal Vincent, and Christian Janvin. A neural probabilistic language model. In Journal of Machine Learning Research, 2000. Pietro Berkes and Laurenz Wiskott. Slow feature analysis yields a rich repertoire of complex cell properties. Journal of vision, 5(6):9–9, 2005. Kyunghyun Cho, Aaron Courville, and Yoshua Bengio. Describing multimedia content using attention-based encoder-decoder networks. IEEE Transactions on Multimedia, 17(11):1875–1886, 2015. Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. Visualizing higher-layer features of a deep network. University of Montreal, 1341:3, 2009. David G Garson. Interpreting neural network connection weights. 1991. Tamás D Gedeon. Data mining of inputs: analysing magnitude and functional measures. International Journal of Neural Systems, 8(02):209–218, 1997. Muriel Gevrey, Ioannis Dimopoulos, and Sovan Lek. Two-way interaction of input variables in the sensitivity analysis of neural network models. Ecological modelling, 195(1):43–50, 2006. 9 Published as a conference paper at ICLR 2018 Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. Yash Goyal, Akrit Mohapatra, Devi Parikh, and Dhruv Batra. Towards transparent ai systems: Interpreting visual question answering models. arXiv preprint arXiv:1608.08974, 2016. Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. Karl Moritz Hermann, Tomás Kociský, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, 2015. Mohit Iyyer, Varun Manjunatha, Jordan L. Boyd-Graber, and Hal Daumé. Deep unordered composition rivals syntactic methods for text classification. In ACL, 2015. Diederik P. Kingma and Jimmy Ba. abs/1412.6980, 2014. Adam: A method for stochastic optimization. CoRR, Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In ICML, 2016. Tao Lei, Regina Barzilay, and Tommi Jaakkola. Rationalizing Neural Predictions. Naacl, 2016. Andrew L. Maas, Awni Y. Hannun, and Andrew Y. Ng. Rectifier nonlinearities improve neural network acoustic models. 2013. Maciej A Mazurowski and Przemyslaw M Szecowka. Limitations of sensitivity analysis for neural networks in cases with dependent inputs. In Computational Cybernetics, 2006. ICCC 2006. IEEE International Conference on, pp. 1–5. IEEE, 2006. Tomas Mikolov, Martin Karafiát, Lukás Burget, Jan Cernocký, and Sanjeev Khudanpur. Recurrent neural network based language model. In INTERSPEECH, 2010. Volodymyr Mnih, Nicolas Heess, Alex Graves, et al. Recurrent models of visual attention. In Advances in neural information processing systems, pp. 2204–2212, 2014. Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin A. Riedmiller, Andreas Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518 7540:529–33, 2015. JJ Montano and A Palmer. Numeric sensitivity analysis applied to feedforward neural networks. Neural Computing & Applications, 12(2):119–125, 2003. Anh Mai Nguyen, Jason Yosinski, and Jeff Clune. Multifaceted feature visualization: Uncovering the different types of features learned by each neuron in deep neural networks. CoRR, abs/1602.03616, 2016. Junhyuk Oh, Valliappa Chockalingam, Satinder P. Singh, and Honglak Lee. Control of memory, active perception, and action in minecraft. In ICML, 2016. Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Why should i trust you?: Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1135–1144. ACM, 2016. Marko Robnik-Šikonja and Igor Kononenko. Explaining classifications for individual instances. IEEE Transactions on Knowledge and Data Engineering, 20(5):589–600, 2008. Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013. 10 Published as a conference paper at ICLR 2018 Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015. Oriol Vinyals, Lukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey E. Hinton. Grammar as a foreign language. In NIPS, 2015. Wenjia Wang, Phillis Jones, and Derek Partridge. Assessing the impact of input features in a feedforward neural network. Neural Computing & Applications, 9(2):101–112, 2000. Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 21–29, 2016. Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. arXiv preprint arXiv:1506.06579, 2015. Eliezer Yudkowsky. Artificial intelligence as a positive and negative factor in global risk. Global catastrophic risks, 1(303):184, 2008. Matthew Zeiler and Rob Fergus. Visualizing and Understanding Convolutional Networks. pp. 1–11, 2015. ISSN 16113349. Matthew D Zeiler, Graham W Taylor, and Rob Fergus. Adaptive deconvolutional networks for mid and high level feature learning. In Computer Vision (ICCV), 2011 IEEE International Conference on, pp. 2018–2025. IEEE, 2011. Luisa M Zintgraf, Taco S Cohen, Tameem Adel, and Max Welling. Visualizing deep neural network decisions: Prediction difference analysis. arXiv preprint arXiv:1702.04595, 2017. 11 Published as a conference paper at ICLR 2018 In the following experiment subsections we describe network architectures by sequentially listing their layers using an abbreviated notation: Conv (hNum Filtersi, hStridei, hFilter Dimensionsi, hActivation Functioni) ConvTrans (hNum Filtersi, hStridei, hFilter Dimensionsi, hActivation Functioni) FC (hNum Hidden Unitsi, hActivation Functioni) (5) for convolutional, convolutional-transpose and fully connected layers respectively. In all network architectures, `-ReLU denotes the leaky-ReLU Maas et al. (2013). We now describe each experiment in greater detail. A T RANSLATED MNIST H ANDWRITTEN D IGIT C LASSIFIER Here we investigate the attention masks produced by a LAN trained on a digit classifier. We show how LANs provide intuition about the particular method a neural network uses to complete its task and highlight failure-modes. Specifically, we construct a “translated MNIST” domain, where the original digits are scaled down from 28 × 28 to 12 × 12 and positioned in random locations in the original 28 × 28 image. The network F is a classifier, outputting the probability of each digit being present in a given image. The pre-trained network, F has the following architecture: Conv(10, 2, (4 × 4), `-ReLU), Conv(20, 2, (4 × 4), `-ReLU), FC(10, softmax). F is trained P with the Adam Optimizer for 100, 000 iterations with a learning rate of 0.001 and with LF = − i yi log F (x)i where y ∈ R10 is a one-hot vector indicating the digit class. The latent attention network, A has the following architecture: FC(100, `-ReLU), FC(784, sigmoid), with its output being reshaped to a 28 × 28 image. A is trained with the Adam Optimizer for 100, 000 iterations with a learning rate of 0.0001. We use β = 5.0 and η = ηboot for this experiment. B CIFAR-10 CNN In this experiment we demonstrate that the LAN framework can illuminate the decision making of classifier (based on the Alexnet architecture) on natural images. To avoid overfitting, we augment the CIFAR-10 dataset by applying small random affine transformations to the images at train time. We used β = 5.0 for this experiment. The pre-trained network, F has the following architecture: Conv(64, 2, (5 × 5), `-ReLU), Conv(64, 2, (5 × 5), `-ReLU), Conv(64, 1, (3 × 3), `-ReLU), Conv(64, 1, (3 × 3), `-ReLU), Conv(32, 2, (3 × 3), `-ReLU), FC(384, tanh), FC(192, tanh), FC(10, softmax), where dropout and local response normalization is applied at each layer. F is trainedPwith the Adam Optimizer for 250, 000 iterations with a learning rate of 0.0001 and with LF = − i yi log F (x)i where y ∈ R20 is a one-hot vector indicating the image class. The latent attention network, A has the following architecture: FC(500, `-ReLU), FC(500, `-ReLU), FC(500, `-ReLU), FC(1024, sigmoid), with its output being reshaped to a 32 × 32 × 1 image and tiled 3 times on the channel dimension to produce a mask over the pixels. A is trained with the Adam Optimizer for 250, 000 iterations with a learning rate of 0.0005. We used β = 7.0 and η = ηboot for this experiment. C 20 N EWSGROUPS D OCUMENT C LASSIFICATION In this experiment, we extend the LAN framework for use on non-visual tasks. Namely, we show that it can be used to provide insight into the decision-making process of a bag-of-words document classifier, and identify individual words in a document that inform its predicted class label. To do this, we train a Deep Averaging Network (DAN) (Iyyer et al., 2015) for classifying documents from the Newsgroup-20 dataset. The 20 Newsgroups Dataset consists of 18,821 total documents, partioned into a training set of 11,293 documents, and a test set of 7,528 documents. Each document belongs to 1 of 20 different categories, including topics in religion, sports, computer hardware, and 12 Published as a conference paper at ICLR 2018 politics, to name a few. In our experiments, we utilize the version of the dataset with stop words (common words like “the”, “his”, “her”) removed. The DAN Architecture is very simple - each document is represented with a bag-of-words histogram vector, with dimension equal to the number of unique words in the dataset (the size of the vocabulary). This bag of words vector is then multiplied with an embedding matrix and divided by the number of words in the document, to generate a low-dimension normalized representation. This vector is then passed through two separate hidden layers (with dropout), and then a final softmax layer, to produce a distribution over the 20 possible classes. In our experiments we use an embedding size of 50, and hidden layer sizes of 200 and 150 units, respectively. We train the model for 1,000,000 mini-batches, with a batch size of 32. Like with our previous experiments, we utilize the Adam Optimizer Kingma & Ba (2014), with a learning rate of 0.00005. The latent attention network, A has the following architecture: FC(100, `-ReLU), FC(1000, `-ReLU), FC(vocab-size, sigmoid). A is trained with the Adam Optimizer for 100, 000 iterations with a learning rate of 0.001. We used β = 50.0 and η = ηconst with a constant value of 0. D S AMPLE S PECIFIC E XPERIMENTS In the sample specific experiments the same pre-trained networks are used as in the standard CIFAR10 and Newsgroup-20 experiments. To train the sample specific masks, we used a learning rate of 0.001 and 0.05 for the Newsgroup-20 and CIFAR-10 experiments respectively. Both experiments used the Adam Optimizer and each mask is trained for 10, 000 iterations. We used β = 50.0 and η = ηboot for both experiments. E B ETA H YPERPARAMETERS In this section, we illustrate the role of the β hyperparameter in the sample specific experiments. As stated earlier, β controls the trade-off between the amount of corruption in the input and the similarity of the corrupted and uncorrupted inputs (measured as a function of the respective pretrained network outputs). Based on the loss functions presented in equations 3 and 4, high values of β encourage a larger amount of input corruption and weight the corresponding term more heavily in the loss computation. Intuitively, we would like to identify the minimal number of dimensions in the input space that most critically affect the output of the pre-trained network. The small amount of input corruption that corresponds to a low value of β would make the problem of reconstructing pre-trained network outputs too simple, resulting in attention masks that deem all or nearly all input dimensions as important; conversely, a heavily corrupted input from a high value of β could make output reconstruction impossible. We illustrate this for individual images from the CIFAR-10 dataset below: 0.25 2 0.75 13 4 5 Published as a conference paper at ICLR 2018 F I MAGENET R ESULTS To demonstrate the capacity of our technique to scale up, we visualize attention masks learned on top of the Inception network architecture introduced in Szegedy et al. (2015) and trained for the ILSVRC 2014 image classification challenge. We utilize a publicly available Tensorflow implementation of the pre-trained model1 . In these experiments we learned sample-specific attention masks for different settings of β on the images shown below. For our input corruption, we used uniformly sampled RGB noise: η ∼ Uniform(0, 1). We note that the attention masks produced on this domain seem to produce much richer patterns of contours than in the CIFAR-10 experiments. We attribute this difference to both the increased size of the images and the increased number of classes between the two problems(1000 vs 10). 1.5 G 3 5 M OTIVATING E XAMPLE : TANK D ETECTION In this section, we motivate our approach by demonstrating how it identifies failure modes within a real-world application of machine learning techniques. There is a popular and (allegedly) apocryphal story, relayed in Yudkowsky (2008), that revolves around the efforts of a US military branch to use neural networks for the detection of camouflaged tanks within forests. Naturally, the researchers tasked with this binary classification problem collected images of camouflaged tanks and empty forests in order to compile a dataset. After training, the neural network model performed well on the testing data and yet, when independently evaluated by other government agencies, failed to achieve performance better than random chance. It was later determined that the original dataset only collected positive tank examples on cloudy days leading to a classifier that discriminated based on weather patterns rather than the presence of camouflaged tanks. We design a simple domain for highlighting the effectiveness of our approach, using the aforementioned story as motivation. The problem objective is to train an image classifier for detecting the presence of tanks in forests. Our dataset is composed of synthetic images generated through the 1 https://github.com/tensorflow/models/tree/master/research/slim 14 Published as a conference paper at ICLR 2018 random placement of trees, clouds and tanks. A representative image from this dataset is provided below on the left with its component objects highlighted and displayed on the right: As in the story, our training and testing datasets are generated such that clouds are only present in positive examples of camouflaged tanks. A simple convolutional neural network architecture is then trained on this data and treated as the pre-trained network in our LAN framework. Unsurprisingly, this classifier suffers from the same problems outlined in Yudkowsky (2008); despite high accuracy on testing data, the classifier fails to detect tanks without the presence of clouds. We now observe the sample-specific attention masks trained from this classifier: The resulting attention mask (β = 1.0 with bootstrapped noise η = ηboot ) assigns high importance to the pixels associated with the cloud while giving no importance to the region of the image containing the tank. With this example, we underscore the utility of our methods in providing a means of visualizing the underlying “rationale” of a network for producing a given output. Our attention mask help recognize that the classifier’s basis for detecting tanks is incorrectly based on the presence of clouds. 15
2cs.AI
1 Minimal Reachability is Hard To Approximate arXiv:1710.10244v3 [cs.SY] 20 Feb 2018 A. Jadbabaie, A. Olshevsky, G. J. Pappas, V. Tzoumas Abstract—In this note, we consider the problem of choosing which nodes of a linear dynamical system should be actuated so that the state transfer from the system’s initial condition to a given final state is possible. Assuming a standard complexity hypothesis, we show that this problem cannot be efficiently solved or approximated in polynomial, or even quasi-polynomial, time. x1 (t) x2 (t) x3 (t) x4 (t) ··· xn (t) I. I NTRODUCTION During the last decade, researchers in systems, optimization, and control have focused on questions such as: • (Actuator Selection) How many nodes do we need to actuate in a gene regulatory network to control it? [1], [2] • (Input Selection) How many inputs are needed to drive the nodes of a power system to fully control its dynamics? [3] • (Leader Selection) Which UAVs do we need to choose in a multi-UAV system as leaders for the system to complete a surveillance task despite communication noise? [4], [5] The effort to answer such questions has resulted in numerous papers on topics such as actuator placement for controllability [6], [7]; actuator selection and scheduling for bounded control effort [8]–[11]; resilient actuator placement against failures and attacks [12], [13]; and sensor selection for target tracking and optimal Kalman filtering [14]–[17]. In all these papers the underlying optimization problems have been proven (i) either polynomially-time solvable [1]–[3] (ii) or NP-hard, in which case polynomial-time algorithms have been proposed for their approximate solution [4]–[17]. But in systems, optimization, and control, such as in power systems [18], [19], transportation networks [20], and neural circuits [21], [22], the following problem also arises: Minimal Reachability Problem. Given times t0 and t1 such that t1 > t0 , vectors x0 and x1 , and a linear dynamical system with state vector x(t) such that x(t0 ) = x0 , find the minimal number of system nodes we need to actuate so that the state transfer from x(t0 ) = x0 to x(t1 ) = x1 is feasible. For example, the stability of power systems is ensured by placing a few generators such that the state transfers from a set of possible initial conditions to the zero state are feasible [19]. The minimal reachability problem relaxes the objectives of the applications in [1]–[17]. For example, in comparison to the actuator placement problem for controllability [6], the minimal A. Jadbabaie is with the Institute for Data, Systems, and Society, Massachusetts Institute of Technology, Cambridge, MA 02139 USA, [email protected]. A. Olshevsky is with the Department of Electrical and Computer Engineering and the Division of Systems Engineering, Boston University, Boston, MA 02215 USA, [email protected]. G. J. Pappas and V. Tzoumas are with the Department of Electrical and Computer Engineering, University of Pennsylvania, Philadelphia, PA 19104 USA, [email protected], [email protected]. Fig. 1. Graphical representation of the linear system ẋ1 (t) = P n ẋi (t) = 0, i = 2, . . . , n; each node represents an entry j=2 xj (t), of the system’s state (x1 (t), x2 (t), . . . , xn (t)), where t represents time; the edges denote that the evolution in time of x1 depends on (x2 , x3 , . . . , xn ). reachability problem aims to place a few actuators only to make a single transfer between two states feasible, whereas the minimal controllability problem aims to place a few actuators to make the transfer among any two states feasible [6], [7]. The fact that the minimal reachability problem relaxes the objectives of the papers [1]–[17] is an important distinction whenever we are interested in the feasibility of only a few state transfers by a small number of placed actuators. The reason is that under the objective of minimal reachability the number of placed actuators can be much smaller in comparison to the number of placed actuators under the objective of controllability. For example, in the system of Fig. 1 the number of placed actuators under the objective of minimal reachability from (0, . . . , 0) to (1, . . . , 0) is one, whereas the number of placed actuators under the objective of controllability grows linearly with the system’s size. The minimal reachability problem was introduced in [23], where it was found to be NP-hard. Similar versions of the reachability problem were studied in the context of power systems in [19] and [24]. For the polynomial-time solution of the reachability problems in [19], [23], [24], greedy approximation algorithms were proposed therein. The approximation performance of these algorithms was claimed by relying on the modularity result [25, Lemma 8.1], which states that the distance from a point to a subspace created by the span of a set of vectors is supermodular in the choice of the vectors. In this note, we first show that the modularity result [25, Lemma 8.1] is incorrect. In particular, we show this via a counterexample to [25, Lemma 8.1], and as a result, we prove that the distance from a point to a subspace created by the span of a set of vectors is non-supermodular in the choice of the vectors. Then, we also prove the following strong intractability result for the minimal reachability problem, which is our main contribution in this paper: Contribution 1. Assuming NP ∈ / BPTIME(npoly log n ), we show that for each δ > 0, there is no polynomial-time 2 algorithm that can distinguish1 between the two cases where: – the reachability problem has a solution with cardinality k; – the reachability problem has no solution with cardinality 1−δ k2Ω(log n), where n is the dimension of the system. We note that the complexity hypothesis NP ∈ / BPTIME(npoly log n ) means there is no randomized algorithm c which, after running for O(n(log n) ) time for some constant c, outputs correct solutions to problems in NP with probability 2/3; see [26] for more details. Notably, Contribution 1 remains true even if we allow the algorithm to search for an approximate solution that is relaxed as follows: instead of choosing the actuators to make the state transfer from the initial state x0 to a given final state x1 possible, some other state x b1 that satisfies kx1 − x b1 k22 ≤ ǫ should be reachable from x0 . This is a substantial relaxation of the reachability problem’s objective, and yet, we show that the intractability result of Contribution 1 still holds. The rest of this note is organized as follows. In Section II, we introduce formally the minimal reachability problem. In Section III, we provide a counterexample to [25, Lemma 8.1]. In Section IV, we present Contribution 1; in Section V, we prove it. Section VI concludes the paper. II. M INIMAL R EACHABILITY P ROBLEM In this section we formalize the minimal reachability problem. We start by introducing the systems considered in this paper and the notions of system node and of actuated node set. System. We consider linear systems of the form ẋ(t) = Ax(t) + Bu(t), t ≥ t0 , (1) where t0 is a given starting time, x(t)∈ Rn is the system’s state at time t, and u(t)∈ Rm is the system’s input vector. ◭ In this paper, we want to actuate the minimal number of the nodes of the system in eq. (1) to make a desired statetransfer feasible (not achieving necessarily controllability). We formalize this objective using the following two definitions. Definition 1 (System node). Given a system as in eq. (1), where x(t) ∈ Rn, we let x1 (t), x2 (t), . . . , xn (t) ∈ R be the components of x(t), i.e., x(t) = (x1 (t), x2 (t), . . . , xn (t)). We refer to each xi (t) as a system node. ◭ Definition 2 (Actuated node set). Given a system as in eq. (1), we say that the set S ⊆ {1, 2, . . . , n} is an actuated node set if the system dynamics can be written as ẋ(t) = Ax(t) + I(S)Bu(t), t ≥ t0 , (2) where I(S) is a diagonal matrix such that if i ∈ S, the i-th entry of I(S)’s diagonal is 1, otherwise it is 0. ◭ The definition of I(S) in eq. (2) implies that the input u(t) affects only the system nodes xi (t) where i ∈ S. 1 We say that an algorithm can distinguish between two (disjoint) cases A and B if, when fed with an input that is guaranteed to be in either A or B, the algorithm is able to determine which of the two is the case (e.g., by outputing 1 if the input belongs A, and 0 if it belongs to B). Problem 1 (Minimal Reachability). Given • times t0 and t1 such that t1 > t0 , n • vectors x0 , x1 ∈ R , and • a system ẋ(t) = Ax(t) + Bu(t), t ≥ t0 , as in eq. (1), with initial condition x(t0 ) = x0 , find an actuated node set with minimal cardinality such that there exists an input u(t) defined over the time interval (t0 , t1 ) that achieves x(t1 ) = x1 . Formally, using the notation |S| to denote the cardinality of a set S: minimize S⊆{1,2,...,n} |S| such that there exist u : (t0 , t1 ) 7→ Rm, x : (t0 , t1 ) 7→ Rn with ẋ(t) = Ax(t) + I(S)Bu(t), x(t0 ) = x0 , x(t1 ) = x1 . t ≥ t0 , A special case of interest is when B is the identity matrix. Then minimal reachability asks for the fewest system nodes to be actuated directly so that at time t1 the state x1 is reachable from the system’s initial condition x(t0 ) = x0 . III. N ON - SUPERMODULARITY OF DISTANCE FROM POINT TO SUBSPACE In this section, we provide a counterexample to the supermodularity result [25, Lemma 8.1]. We begin with some notation. In particular, given a matrix M ∈ Rn×n, a vector v ∈ Rn, and a set S ⊂ {1, . . . , n}, let M (S) denote the matrix obtained by throwing away columns of M not in S. In addition, for any set S ⊂ {1, . . . , n}, we define the set function f (S) = dist2 (v, Range(M (S))), where dist(y, X) is the distance from a point to a subspace: dist(y, X) = min ||y − x||2 . x∈X We show there exist a vector v and a matrix M such that the function f : {1, 2, . . . , n} 7→ dist2 (v, Range(M (S))) is non-supermodular. We start by defining the monotonicity and supermodularity of set functions. Definition 3 (Monotonicity). Consider any finite set V. The set function f : 2V 7→ R is non-decreasing if and only if for any A ⊆ A′ ⊆ V, we have f (A) ≤ f (A′ ). ◭ In words, a set function f : 2V 7→ R is non-decreasing if and only if by adding elements in any set A ⊆ V we cannot decrease the value of f (A). Definition 4 (Supermodularity [27, Proposition 2.1]). Consider any finite set V. The set function f : 2V 7→ R is supermodular if and only if for any A ⊆ A′ ⊆ V and x ∈ V, f (A) − f (A ∪ {x}) ≥ f (A′ ) − f (A′ ∪ {x}). ◭ In words, a set function f : 2V 7→ R is supermodular if and only if it satisfies the following diminishing returns property: for any element x ∈ V, the marginal decrease f (A) − f (A ∪ {x}) diminishes as the set A grows; equivalently, for any A ⊆ V and x ∈ V, f (A) − f (A ∪ {x}) is non-increasing. 3 Example 1. We show that for    −1 1 v =  1 , M = 1 1 0  0 1 1 0 , 0 1 the set function f : 2{1,2,3} 7→ dist2 (v, Range(M (S))) is non-supermodular. In particular, since the vector v is orthogonal to the first and third columns of M , f ({1}) = dist2 (v, M ({1})) = 2 f ({1, 3}) = dist (v, M ({1, 3})) = ||v||22 ||v||22 Therefore, f ({1}) − f ({1, 3}) = 0. At the same time, the span of the first two columns of M is the subspace {x ∈ R3 : x3 = 0}. Thus, f ({1, 2}) = dist2 (v, M ({1, 2})) = 1. Also, since the three columns of M are linearly independent, f ({1, 2, 3}) = dist2 (v, M ({1, 2, 3})) = 0, and as a result, f ({1, 2}) − f ({1, 2, 3}) = 1. In sum, f ({1, 2}) − f ({1, 2, 3}) > f ({1}) − f ({1, 3}); hence, for the vector v and matrix M in this example, f : 2{1,2,3} 7→ dist2 (v, Range(M (S))) is non-supermodular. ◭ We remark that the same argument as in Example 1 shows that the set function g : {1, 2, . . . , n} 7→ R such that g(S) = [dist(v, Range(M (S))]c is not supermodular for any c > 0. IV. I NAPPROXIMABILITY OF M INIMAL R EACHABILITY P ROBLEM We show that, subject to a widely believed conjecture in complexity theory, there is no efficient algorithm that solves, even approximately, Problem 1. Towards the statement of this result, we next introduce a definition of approximability and the definition of quasi-polynomial running time. Definition 5 (Approximability). Consider the minimal reachability Problem 1, and let the set S ⋆ to denote one of its optimal solutions. We say that an algorithm renders Problem 1 (∆1 (n), ∆2 (n))-approximable if it returns a set S such that: • there is a state x b1 such that there is an input u(t) such that at time t1 we have x(t1 ) = x b1 and ||b x1 − x1 k2 ≤ ∆1 (n); ⋆ • the cardinality of the set S is at most ∆2 (n)|S |. ◭ Hence, the definition of (∆1 (n), ∆2 (n))-approximability allows some slack both in the quality of the reachability requirement (first point in the itemization in Definition 5), and in the number of actuators utilized to achieve it (second point in the itemization in Definition 5). We introduce next the definition of quasi-polynomial algorithms, using the following big O notation. Definition 6 (Big O notation). Let N be the set of natural numbers, and consider two functions h : N 7→ R and g : N 7→ R that take only non-negative values. The big O notation in the equality h(n) = O(g(n)) means there exists some constant c > 0 such that for all large enough n, it is h(n) ≤ cg(n). ◭ Definition 6, given a non-negative function g, implies that O(g(n)) denotes the collection of non-negative functions h that are bounded asymptotically by g, up to a constant factor. Definition 7 (Quasi-polynomial running time). An algorithm c is quasi-polynomial if it runs in 2O[(log n) ] time, where c is a constant. ◭ We note that any polynomial-time algorithm is a quasipolynomial time algorithm since nk = 2k log n. At the same time, a quasi-polynomial algorithm is asymptotically faster than an exponential-time algorithm, since exponential-time ǫ algorithms run in O(2n ) time, for some ǫ > 0. Definition 8 (Big Omega notation). Let N be the set of natural numbers, and consider the functions h : N 7→ R and g : N 7→ R that take only non-negative values. The big Omega notation in the equality h(n) = Ω(g(n)) means that there exists some constant c > 0 such that for all large enough n, it is h(n) ≥ cg(n). ◭ Definition 8, given a non-negative g, implies that Ω(g(n)) denotes the collection of non-negative functions h that are lower bounded asymptotically by g, up to a constant factor. We present next our main result in this paper. Theorem 1 (Inapproximability). For each δ ∈ (0, 1), there is a collection of instances of Problem 1 where: • the initial condition is x(t0 ) = 0; ⊤ • the final state x1 is of the form [1, 1, . . . , 1, 0, 0, . . . , 0] ; • the input matrix is B = I, where I is the identity matrix, along with a polynomial ∆1 (n) and a function ∆2 (n) = 1−δ 2Ω(log n), such that unless NP∈ BPTIME(npoly log n ), there is no quasi-polynomial algorithm rendering Problem 1 (∆1 (n), ∆2 (n))-approximable. Theorem 1 says that if NP ∈ / BPTIME(npoly log n ) there is no polynomial time algorithm (or quasi-polynomial time algorithm) that can choose which entries of the system’s x state to actuate so that x(t1 ) is even approximately close to a desired state x1 = [1, 1, . . . , 1, 0, 0, . . . , 0]⊤ at time t1 . To make sense of Theorem 1, first observe that we can always actuate every entry of the system’s state, i.e., we can choose S = {1, 2, . . . , n}. This means every system is (0, n)approximable; let us rephrase this by saying that every system is (0, 2log n ) approximate. Theorem 1 tells us that we cannot 1−δ achieve (0, 2O(log n) )-approximability for any δ > 0. In other words, improving the guarantee of the strategy that actuates every state by just a little bit, in the sense of replacing δ = 0 with some δ > 0, is not possible —subject to the complexity-theoretic hypothesis NP ∈ / BPTIME(npoly log n ). Furthermore, the theorem tells us it remains impossible even if we allow ourselves some error ∆(n) in the target state, i.e., 1−δ even (∆(n), 2O(log n) )–approximability is ruled out. 4 Remark 1. In [23, Theorem 3] it is claimed that for any  ǫ > 0 the minimal reachability Problem 1 is ǫ, O log nǫ approximable, which contradicts Theorem 1. However, the proof of this claim was based on [25, Lemma 8.1], which we proved incorrect in Section III. ◭ to pick y ∈ Rl that is an optimal solution to the following optimization problem. Remark 2. The minimal controllability problem [6] seeks to place the fewest number of actuators to make the system controllable. Theorem 1 is arguably surprising, as it was shown in [6] that the sparsest set of actuators for controllability can be approximated to a multiplicative factor of O(log n) in polynomial time. By contrast, we showed in this note that an almost exponentially worse approximation ratio cannot be achieved for minimum reachability. ◭ where ||y||0 refers to the number of non-zero entries of y. V. P ROOF OF I NAPPROXIMABILITY OF M INIMAL R EACHABILITY We next provide a proof of our main result, namely Theorem 1. We use some standard notation throughout: 1k is the all-ones vector in Rk , 0k is the zero vector in Rk , and ek is the k’th standard basis vector. We begin with some standard definitions related to the reachability space of a linear system. A. Reachability Space for continuous-time linear systems Definition 9 (Reachability space). Consider a system ẋ(t) = Ax(t) + Bu(t) as in eq. (1) whose size is n. The Range([B, AB, A2 B, . . . , An−1 B]) is called the reachability space of ẋ(t) = Ax(t) + Bu(t). ◭ The reason why Definition 9 is called the reachability space is explained in the following proposition. Proposition 1 ([28, Proof of Theorem 6.1]). Consider a system as in eq. (1), with initial condition x0 . There exists a real input u(t) defined over the time interval (t0 , t1 ) such that the solution of ẋ = Ax + Bu, x(t0 ) = x0 satisfies x(t1 ) = x1 if and only if x1 − eA(t1 −t0 ) x0 ∈ Range([B, AB, A2 B, . . . , An−1 B]). The notion of reachability space allows us to redefine the minimal reachability Problem 1 as follows. Corollary 1. Problem 1 is equivalent to minimize |S| S⊆{1,2,...,n} such that x1 − eA(t1 −t0 ) x0 ∈ Range([I(S)B, AI(S)B, . . . , An−1 I(S)B]). Overall, Problem 1 is equivalent to picking the fewest rows of the input matrix B such that x1 − eA(t1 −t0 ) x0 is in the linear span of the columns of [I(S)B, AI(S)B, A2 I(S)B, . . . , An−1 I(S)B]. B. Variable Selection Problem We show the intractability of the minimum reachability by reducing it to the variable selection problem, defined next. Problem 2 (Variable Selection). Let U ∈ Rm×l , z ∈ Rm , and let ∆ be a positive number. The variable selection problem is minimize y∈Rl such that kyk0 kU y − zk2 ≤ ∆, The variable selection Problem 2 is found in [29] to be inapproximable, even in quasi-polynomial time: Theorem 2 ([29, Proposition 6]). Unless it is NP∈ BPTIME(npoly log n ), for each δ ∈ (0, 1) there exist: Ω(log1−δ l) • a function q1 (l) which is in 2 ; 2 • a polynomial p1 (l) which is in O(l); • a polynomial ∆(l); • a polynomial m(l), and a zero-one m(l) × l matrix U such that no quasipolynomial time algorithm can distinguish between the following two cases for large l: 1) There exists a vector y ∈ Rl such that U y = 1m(l) and ||y||0 ≤ p1 (l). 2) For any vector y ∈ Rl such that ||U y − 1m(l) ||22 ≤ ∆(l), we have ||y||0 ≥ p1 (l)q1 (l). Informally, unless NP∈BPTIME(npoly log n ), Theorem 2 says that Problem 2 is inapproximable even in quasipolynomial time, in the sense that for large l there is no quasipolynomial algorithm that can distinguish between the two mutually exclusive cases 1) and 2). To see that these cases are indeed mutually exclusive for large l, observe that q1 (l) > 1 1−δ when l is large, because q1 (l) = 2Ω(log l). C. Sketch of Proof of Theorem 1 We begin by sketching the intuition behind the proof of Theorem 1. Our general approach is to find instances of Problem 1 that are as hard as inapproximable instances of the variable selection Problem 2. We begin by discussing a construction that does not work, and then explain how to fix it. Given the matrix U coming from a variable selection Problem 2, we first attempt to construct an instance of the minimal reachability Problem 1 where: • the system’s initial condition is x(t0 ) = 0; ⊤ • the destination state x1 at time t1 is of the form [1, 0] (the exact dimensions of 1 and 0 are to be determined); • the input matrix is B = I; • the system matrix A is   0 U A= , (3) 0 0 where the number of zeros is large so that A2 = 0. Whereas the variable selection problem involves finding the smallest set of columns of U so that a certain vector is in their span, for the minimum reachability problem, every time we add the k-th state to the set of actuated variables S, the 2 In this context, a function with a fractional exponent is considered to be a polynomial, e.g., l1/5 is considered to be a polynomial in l. 5 reachability span expands by adding the span of the set of columns of the controllability matrix that correspond to the vector ek being added in I(S). In particular, for the above construction, because A2 = 0, when the k-th state is added to the set of actuated variables, the span of the two columns ek and U ek is added to the reachability space. In other words, with the above construction we are basically constrained to make “moves” which add columns in pairs, and we are looking for the smallest number of such “moves” making a certain vector lie in the span of the columns. It should be clear that there is a strong parallel between this and variable selection (where the columns are added one at a time). However, because the columns are being added in pairs, this attempt to connect minimum reachability with variable selection does not quite work. To fix this idea, we want only the columns of U to contribute meaningfully to the addition of the span, with any vectors ek we add along the way being redundant; this would reduce minimal reachability to exactly variable selection. We accomplish this by further defining:   U  U    U′ =  .  ,  ..  U where we stack U some large termined in the main proof of We then set:  0 A= 0 number of times (to be deTheorem 1 at Section V-D).  U′ . (4) 0 The idea is because U is stacked many times, adding a column of U to a set of vectors expands the span much more than adding any vector ek , so there is never an incentive to consider the contributions of any ek to the reachability space. We make the aforementioned construction of the system matrix A precise: given a matrix M ∈ Rm×l, for n ≥ max{m, l}d we define φn,d (M ) to be the n × n matrix which stacksM in the top-right hand corner d times. For example,   0 0 0 1 2  0 0 0 3 4      1 2  M= , φ5,2 (M ) =   0 0 0 1 2 , 3 4  0 0 0 3 4  0 0 0 0 0 i.e., φ5,2 (M ) stacks M twice, and then pads it with enough zeros to make the resulting matrix 5 × 5. Observe that φn,d (M )2 = 0 for n ≥ max{m, l}(d + 1). Overall, in the next section, we set A = φn,d (U ) for large enough d, and n = max{m, l}(d + 1), and we prove Theorem 1. D. Proof of Theorem 1 Adopting the notation in Theorem 2, we focus on problem instances where for large enough l it is q1 (l) > 1, per the proof of Theorem 2, i.e., of [29, Theorem 2]. In addition, we let d = ⌈p1 (l)q1 (l)⌉, and n = max{m(l), l}(d+1). Moreover, for simplicity, we use henceforth m and m(l) interchangeably. Finally, we consider the instances of Problem 1 where: • the initial condition is x(t0 ) = 0n ; ⊤ ⊤ the destination state x1 at time t1 is [1⊤ md , 0n−md ] ; • the input matrix is B = I, where I is the identity matrix; • the system matrix is A = φn,d (U ). Given the above, to prove Theorem 1 we first define the following four statements: S1) There exists a vector y ∈ Rl such that U y = 1m and ||y||0 ≤ p1 (l). S2) For any vector y ∈ Rl such that ||U y − 1m ||22 ≤ ∆(l), we have ||y||0 ≥ p1 (l)q1 (l). ′ S1 ) There exists a set S ⊆ {1, 2, . . . , n} with |S| ≤ p1 (l) ⊤ ⊤ such that the state x1 = [1⊤ md , 0n−md ] is reachable. ′ S2 ) There is no set S ⊆ {1, 2, . . . , n} with cardinality strictly less than p1 (l)q1 (l) that makes reachable some x b1 with ⊤ ⊤ 2 ||b x1 − [1⊤ md , 0n−md ] ||2 ≤ ∆(l). Recall that in Section V-B we stated that the statements S1S2 are mutually exclusive for q1 (l) > 1 (which is the case for the instances we consider in this proof), and that Theorem 2 implies there is no quasi-polynomial algorithm (unless NP∈ BPTIME(npoly log n )) that can distinguish between S1 and S2. Given the above, we next proceed with the proof of Theorem 1 by proving first that statement S1 implies statement S1′ , and then that also statement S2 implies statement S2′. Proof that statement S1 implies statement S1′ : We prove that if statement S1 is true, then statement S1′ also is. In particular, suppose there exists a vector y ∈ Rl with U y = 1m and ||y||0 ≤ p1 (l) (statement S1). In this case, we claim there exists a set S ⊆ {1, 2, . . . , n} with |S| ≤ p1 (l) such that ⊤ ⊤ ′ x1 =[1⊤ md , 0n−md ] is reachable (statement S1 ). Indeed, let S be a set of columns of U that have 1m in their span, and set S = {k + n − l | k ∈ S}. Then |S| ≤ p1 (l), and X 1m = yk Uk , (5) • k∈S where yk denotes the k-th element of the vector y, and Uk denotes the k-th column of the matrix U . Due to eq. (5), we ⊤ ⊤ can rewrite the vector x1 =[1⊤ md , 0n−md ] as follows:     yk Uk 1m        1m  X  yk U k  1md     . . .. .. =  =  0n−md      1m  k∈S  yk Uk  0n−md 0n−md X = yk Ak+n−l , (6) k∈S where the vector 1m in the second term from the left is repeated ⌈p1 (l)q1 (l)⌉ times, since d = ⌈p1 (l)q1 (l)⌉, and where the final step (eq. (6)) follows by definitions of A as A = φn,d (U ), and where Ak+n−l denotes the (k + n − l)-th column of A. Now, each of the vectors Ak+n−l in the last ⊤ ⊤ term is a column of AI(S), so [1⊤ md , 0n−md ] indeed lies in the range of the controllability matrix and, as a result, the state ⊤ ⊤ x1 = [1⊤ md , 0n−md ] is reachable by actuating S. Proof that statement S2 implies statement S2′ : We prove that if the statement S2 is true, then the statement S2′ also is. In particular, per statement S2 suppose that any vector y with ||U y − 1m ||22 ≤ ∆(l) has the property that ||y||0 ≥ p1 (l)q1 (l). 6 We claim that in this case there is no set S ⊆ {1, 2, . . . , n} with cardinality strictly less than p1 (l)q1 (l) that makes reach⊤ ⊤ 2 able some x b1 with ||b x1 −[1⊤ md , 0n−md ] ||2 ≤ ∆(l) (statement ′ S2 ). To prove this, assume the contrary, i.e., assume there exists S with cardinality strictly less than p1 (l)q1 (l) that makes ⊤ ⊤ 2 reachable some x b1 with ||b x1 −[1⊤ md , 0n−md ] ||2 ≤ ∆(l) —we call this assumption A1. We obtain a contradiction as follows: the pigeonhole principle implies that in the set {1, 2, . . . , md} there is some interval E = {κm + 1, κm + 2, . . . , κm + m}, where κ is a non-negative integer, such that S∩E = ∅, because |S| < p1 (l)q1 (l) and md ≥ m⌈p1 (l)q1 (l)⌉. Define the vector x bE ∈ Rm by taking the rows of x b1 corresponding to indexes in E. Then, ||[b xE − 1m ||22 ≤ ∆(l), ⊤ ⊤ 2 since x b1 with ||b x1 − [1⊤ md , 0n−md ] ||2 ≤ ∆(l). Moreover, we next prove that x bE is in the span of |S| columns of U . To this end, we make the following observations: since x b1 is reachable, it is: x b1 ∈ Range[I(S), AI(S), A2 I(S), . . . , An−1 I(S)] = Range[I(S), AI(S)], (7) 2 where the equality in eq, (7) holds since A = 0. Now, eq. (7) implies there exists a vector z such that: [I(S), AI(S)]z = x b1 . (8) If we break up the set S into two sets, (i) the set of indexes corresponding to A’s first n − l columns, which we denote henceforth by S1:n−l , and (ii) the set of indexes corresponding to A’s last l columns, which we denote henceforth by Sn−l+1:n , such that S = S1:n−l ∪ Sn−l+1:n , and recall A’s definition, we can write the term AI(S) in eq. (8) as follows:    0 U′ I(S1:n−l ) 0 AI(S) = 0 0 0 I(Sn−l+1:n )   ′ 0 U I(Sn−l+1:n ) = , (9) 0 0 where U ′ is, per the definition of A, the matrix that is created by stacking d copies of U the one on top of the other. Therefore, using this definition of U ′, the term U ′ I(Sn−l+1:n ) in eq. (9) is re-written as follows:   U I(Sn−l+1:n )  U I(Sn−l+1:n )    U ′ I(Sn−l+1:n ) =  (10) , ..   . U I(Sn−l+1:n ) where the term U I(Sn−l+1:n ) is repeated d times. Let now z1 be the vector that is constructed by z by keeping all the elements of z that in eq. (8) multiply the matrix I(S), and let z2 be the vector that is constructed by z by keeping all the elements of z that in eq. (8) multiply the non-zero part of the matrix AI(S), which is stated in eq. (10). Then, due to eq. (9) and eq. (10), the eq. (8) gives:   U I(Sn−l+1:n )z2  U I(Sn−l+1:n )z2      .. b1 , (11) I(S)z1 +  =x .    U I(Sn−l+1:n )z2  0 Moreover, x bE , due to its definition, is in the span of the vectors obtained by taking the rows κm + 1, . . . , κm + m of the columns of the reachability matrix [I(S), AI(S)]; in particular, since it is S ∩ E = ∅, from eq. (11) we get: U I(Sn−l+1:n )z2 = x bE , (12) and indeed we have shown that the vector x bE is in the span of at most |S| columns of U (eq. (12)). The contradiction is now obtained because assumption A1 tells us that |S| < p1 (l)q1 (l) while the statement S2 (which we have assumed initially to hold) tells us the opposite. As a result, the truth of statement S2 implies the truth of statement S2′. In sum, we proved that the statement S1 implies the statement S1′ , as well as, that the statement S2 implies the statement S2′ and, as a result, we showed how Problem 1 can be reduced to the (inapproximable in quasi-polynomial time) Problem 2. Moreover, the reduction is made in polynomial time, since all involved matrices are of polynomial size in l. We complete Theorem 1’s proof with the steps below: • Recall that Theorem 2 shows that, unless NP∈BPTIME(npoly log n ), no quasi-polynomial time algorithm can distinguish between the statements S1 and S2; this implies that, under the same assumption, no quasi-polynomial time algorithm can distinguish between the statement S1′ and the statement S2′. Ω(log1−δ l) • Since for any δ ∈ (0, 1) we can take q1 (l) = 2 in Theorem 2, this implies that the smallest number ⊤ of inputs rendering [1⊤ md , 0n−dm ] reachable cannot be approximated within a multiplicative factor of q1 (l). Indeed, any algorithm which gives an approximation of the smallest number of inputs with a multiplicative factor smaller than q1 (l) would make it possible to distinguish between case S1′ and case S2′. By Theorem 2, the 1−δ inapproximability factor q1 (l) grows as 2Ω(log l), and since l can be upper and lower bounded by a polynomial in n (since n ≥ l, and n is at most polynomial in l), we 1−δ set ∆2 (n) = 2Ω(log n) in the statement of Theorem 1. • Since ∆(l) is a polynomial in l, as well as, l ≤ n, we may replace ∆(l) by some polynomial ∆1 (n), as in the statement of Theorem 1. VI. C ONCLUDING R EMARKS We focused on the minimal reachability Problem 1, which is a fundamental question in optimization and control with applications such as power systems and neural circuits. By exploiting the connection to the variable selection Problem 2, we proved that Problem 1 is hard to approximate. Future work will focus on properties for the system matrix A so that Problem 1 is approximable in polynomial time. We conclude with an open problem. As we have discussed, the minimum reachability problem is (0, 2log n )approximable by the algorithm which actuates every variable; 1−δ but (0, 2O(log n) ) is impossible for any positive δ. We wonder, therefore, whether the minimum number of actuators can of say, √ be approximated to within a multiplicative factor c n in polynomial time, or, more generally, n for some √ c ∈ (0, 1). Indeed, observe that since n = 2(1/2) log n, the 7 √ 1−δ function n does not belong to 2O(log n) for any δ > 0. Thus, the present paper does not rule out the possibility of approximating the minimum reachability problem up to a √ factor of n, or more broadly, nc for c ∈ (0, 1). We remark that such an approximation guarantee would have considerable repercussions in the context of effective control, as at the moment the best polynomial-time protocol for actuation to meet a reachability goal (in terms of worst-case approximation guarantee) is to actuate every variable. R EFERENCES [1] Y.-Y. Liu, J.-J. Slotine, and A.-L. Barabási, “Controllability of complex networks,” Nature, vol. 473, no. 7346, p. 167, 2011. [2] F. Muller and A. Schuppert, “Few inputs can reprogram biological networks,” Nature, vol. 478, no. 7369, pp. E4–E4, 2011. [3] T. Zhou, “Minimal inputs/outputs for a networked system,” IEEE Control Systems Letters, vol. 1, no. 2, pp. 298–303, 2017. [4] A. Clark, B. Alomair, L. Bushnell, and R. Poovendran, “Minimizing convergence error in multi-agent systems via leader selection: A supermodular optimization approach,” IEEE Transactions on Automatic Control, vol. 59, no. 6, pp. 1480–1494, 2014. [5] A. Clark, L. Bushnell, and R. Poovendran, “A supermodular optimization framework for leader selection under link noise in multi-agent systems,” IEEE Trans. on Automatic Control, vol. 59, no. 2, pp. 283–296, 2014. [6] A. Olshevsky, “Minimal controllability problems,” IEEE Transactions on Control of Network Systems, vol. 1, no. 3, pp. 249–258, 2014. [7] S. Pequito, S. Kar, and A. P. Aguiar, “A framework for structural input/output and control configuration selection in large-scale systems,” IEEE Trans. on Automatic Control, vol. 61, no. 2, pp. 303–318, 2016. [8] F. Pasqualetti, S. Zampieri, and F. Bullo, “Controllability metrics, limitations and algorithms for complex networks,” IEEE Transactions on Control of Network Systems, vol. 1, no. 1, pp. 40–52, 2014. [9] T. H. Summers, F. L. Cortesi, and J. Lygeros, “On submodularity and controllability in complex dynamical networks,” IEEE Transactions on Control of Network Systems, vol. 3, no. 1, pp. 91–101, 2016. [10] V. Tzoumas, M. A. Rahimian, G. J. Pappas, and A. Jadbabaie, “Minimal actuator placement with bounds on control effort,” IEEE Transactions on Control of Network Systems, vol. 3, no. 1, pp. 67–78, 2016. [11] Y. Zhao, F. Pasqualetti, and J. Cortés, “Scheduling of control nodes for improved network controllability,” in Proceedings of the IEEE 55th Conference on Decision and Control, 2016, pp. 1859–1864. [12] S. Pequito, G. Ramos, S. Kar, A. Aguiar, and J. Ramos, “Robust minimal controllability problem,” Automatica, vol. 82, pp. 261–268, 2017. [13] V. Tzoumas, K. Gatsis, A. Jadbabaie, and G. J. Pappas, “Resilient monotone submodular function maximization,” in Proceedings of the IEEE 56th Annual Conference on Decision and Control, 2017, to appear. [14] V. Tzoumas, A. Jadbabaie, and G. J. Pappas, “Sensor placement for optimal kalman filtering,” in Proceedings of the American Control Conference, 2016, pp. 191–196. [15] ——, “Near-optimal sensor scheduling for batch state estimation,” in Proceedings of the IEEE 55th Conference on Decision and Control, 2016, pp. 2695–2702. [16] H. Zhang, R. Ayoub, and S. Sundaram, “Sensor selection for kalman filtering of linear dynamical systems: Complexity, limitations and greedy algorithms,” Automatica, vol. 78, pp. 202–210, 2017. [17] L. Carlone and S. Karaman, “Attention and anticipation in fast visualinertial navigation,” in Proceedings of the IEEE International Conference on Robotics and Automation, 2017, pp. 3886–3893. [18] M. Amin and J. Stringer, “The electric power grid: Today and tomorrow,” MRS bulletin, vol. 33, no. 04, pp. 399–407, 2008. [19] Z. Liu, A. Clark, P. Lee, L. Bushnell, D. Kirschen, and R. Poovendran, “MinGen: Minimal generator set selection for small signal stability in power systems: A submodular framework,” in Proceedings of the IEEE 55th Conference on Decision and Control, 2016, pp. 4122–4129. [20] California Partners for Advanced Transit and Highways, 2006. [Online]. Available: http://www.path.berkeley.edu/ [21] S. Gu et al., “Controllability of structural brain networks,” Nature communications, vol. 6, p. 8414, 2015. [22] C. Tu, R. P. Rocha, M. Corbetta, S. Zampieri, M. Zorzi, and S. Suweis, “Warnings and Caveats in Brain Controllability,” ArXiv e-prints, 2017. [23] V. Tzoumas, A. Jadbabaie, and G. J. Pappas, “Minimal reachability problems,” in Proceedings of the IEEE 54th Annual Conference on Decision and Control, 2015, pp. 4220–4225. [24] Z. Liu, A. Clark, P. Lee, L. Bushnell, D. Kirschen, and R. Poovendran, “Towards scalable voltage control in smart grid: A submodular optimization approach,” in Proceedings of the 7th International Conference on Cyber-Physical Systems, 2016, p. 20. [25] M. Sviridenko, J. Vondrák, and J. Ward, “Optimal approximation for submodular and supermodular optimization with bounded curvature,” in Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms. SIAM, 2014, pp. 1134–1148. [26] S. Arora and B. Barak, Computational complexity: a modern approach. Cambridge University Press, 2009. [27] G. Nemhauser, L. Wolsey, and M. Fisher, “An analysis of approximations for maximizing submodular set functions – I,” Mathematical Programming, vol. 14, no. 1, pp. 265–294, 1978. [28] C.-T. Chen, Linear System Theory and Design, 3rd ed. New York, NY, USA: Oxford University Press, Inc., 1998. [29] D. Foster, H. Karloff, and J. Thaler, “Variable selection is hard,” in Proceedings of the Conference on Learning Theory, 2015, pp. 696–709.
3cs.SY
Synthesizing Neural Network Controllers with Probabilistic Model-Based Reinforcement Learning arXiv:1803.02291v1 [cs.RO] 6 Mar 2018 Juan Camilo Gamboa Higuera, David Meger, and Gregory Dudek Abstract— We present an algorithm for rapidly learning controllers for robotics systems. The algorithm follows the model-based reinforcement learning paradigm, and improves upon existing algorithms; namely Probabilistic learning in Control (PILCO) and a sample-based version of PILCO with neural network dynamics (Deep-PILCO). We propose training a neural network dynamics model using variational dropout with truncated Log-Normal noise. This allows us to obtain a dynamics model with calibrated uncertainty, which can be used to simulate controller executions via rollouts. We also describe set of techniques, inspired by viewing PILCO as a recurrent neural network model, that are crucial to improve the convergence of the method. We test our method on a variety of benchmark tasks, demonstrating data-efficiency that is competitive with PILCO, while being able to optimize complex neural network controllers. Finally, we assess the performance of the algorithm for learning motor controllers for a six legged autonomous underwater vehicle. This demonstrates the potential of the algorithm for scaling up the dimensionality and dataset sizes, in more complex control tasks. I. I NTRODUCTION Model-based reinforcement learning (RL) is an attractive framework for addressing the synthesis of controllers for robots of all kinds due to its promise of data-efficiency. By using experience data to produce state-transition dynamics models via fitting, an RL agent can search for good controllers, using these models to evaluate policies in simulation. This allows for minimizing costly trials on a target robot platform. Minimizing interactions, however, means that experience datasets will often not be large enough to obtain accurate dynamics models. Bayesian models are very helpful in this situation. Instead of requiring an accurate model, the robotic agent may keep track of a distribution over dynamics models that are compatible with its experience. Evaluating a controller then involves quantifying its performance over the dynamics model distribution. To improve its chances of working in the real world an effective controller should perform well, on average, when drawing a model from this distribution. Two successful applications of this idea are the PILCO 1 and Deep-PILCO algorithms. PILCO [1] uses Gaussian Process (GP) models to fit one-step dynamics and networks of radial basis functions (RBFs) for feedback policies. PILCO has been shown to perform very well with little data in benchmark simulated tasks and on real robots [1]. We have used PILCO successfully for synthesizing swimming The authors are part of the Center for Intelligent Machines and the School of Computer Science, McGill University, Montreal, Canada. This work was supported by NSERC through funding for the NSERC Canadian Field Robotics Network {gamboa,dmeger,dudek}@cim.mcgill.ca 1 Probabilistic Inference and Learning for COntrol Fig. 1: The AQUA robot executing a 6-leg knife edge maneuver. The robot starts in its resting position and must swim forward at a constant depth while stabilizing a roll angle of 90 degrees. The sequence of images illustrates the controller learned with the methods described in this work. controllers for an underwater swimming robot [2]. However, PILCO is computationally expensive. Model fitting scales O(Dn3 ) and long-term predictions scale O(D3 n2 ), where n is the dataset size and D is the number of state dimensions, limiting its applicability only to scenarios with small datasets and a small number of dimensions. Deep-PILCO [3] aims to address these limitations by employing Bayesian Neural Networks (BNN), implemented using binary dropout [4], [5]. Deep-PILCO uses BNNs to fit a dynamics model, and performs a sampling-based procedure for simulation. Policy search and model learning are done via stochastic gradient optimization: computations with linear scaling in the dataset size and state dimensionality. DeepPILCO has been shown to result in better performing policies for the cart-pole swing-up benchmark task, but show reduced data efficiency when compared with PILCO on the same task. In this work, we extend on the results of [3]. We demonstrate that Deep-PILCO can match the data efficiency of PILCO on the cart-pole swing-up task with a small number of heuristics to stabilize optimization. We demonstrate that using neural network controllers improves the data efficiency of Deep-PILCO. We also show that using Log-Normal multiplicative noise [6] removes the need for searching for the appropriate dropout rate, and outperforms the original version of Deep-PILCO with binary dropout on the cartdouble pendulum swing-up task. II. R ELATED W ORK Dynamics models have long been a core element in the modeling and control of robotic systems. For example, trajectory optimization approaches [7], [8], [9] can produce highly effective controllers for complex robotic systems when precise analytical models are available. For complex and stochastic systems such as swimming robots, classical models are less reliable. In these cases, either performing online system identification [10] or learning complete dynamics models from data has proven to be effective, and can be integrated tightly with model-based control schemes [11], [12], [13], [14]. Multiple authors have recently considered the use of Deep RL methods to learn continuous control tasks up to an including full-body control of acrobatic humanoid characters [15]. These methods do not assume a known reward function, and thus estimate the value of each action only from experience. Along with their model-free nature, this factor results in much lower data efficiency compared with the methods we consider here, but there are ongoing efforts to connect modelbased and model-free approaches [16]. The most similar works to our own are those which utilize uncertain learned dynamics models for policy optimization. Locally linear controllers can be learned in this fashion, for example by extending the classical Differential Dynamic Programming (DDP) [17] method or Iterative LQG [18] to apply over trajectory distributions. For more complex robots, it is desirable to learn complex non-linear policies using the predictions of learned dynamics. Considering Gaussian Process dynamics, a gradient-free policy search approach, Black-DROPS [19], has recently shown promising performance along with the gradient-based PILCO [1]. As yet, we are only aware of Bayesian Neural Networks being optimized in the model-learning loop within Deep PILCO [3], which is the method we directly improve upon in this work. Our approach is the first model-based RL approach to utilize BNNs for both the dynamics as well as the policy network. III. P ROBLEM S TATEMENT 𝐱𝑡 𝐱𝑡 𝜋𝜃 policy 𝑓𝜓 𝐮𝑡 model Fig. 2: An overview diagram of the components used for sampling 27 simulated trajectories. When both the policy and the model are implemented with neural networks, this model is effectively a simple recurrent neural network (RNN); with the same problems with long-term dependencies as traditional RNNs. IV. M ETHODS A. Learning a dynamics model A key to data-efficiency is avoiding model bias, which happens when optimizing the objective in Equation 1 with a model that makes bad predictions high confidence. Bayesian neural networks (BNN) avoid model bias by finding a posterior distributions over the parameters of the network. Given a network fψ , with parameters ψ, and a training dataset D = {X, Y} we would like to use the posterior p(ψ|X, Y) to make predictions at novel test points. This distribution represents how certain we are about the true value of the parameters, which inRturn induces uncertainty on the model predictions: p(y) = p(y|fψ )p(ψ|x, X, Y)dψ, where y is the estimated predictions for a test point x. Using the true posterior for predictions on a neural network is intractable. Fortunately, various methods based on variational inference have been proposed, which use a tractable approximate posterior and Monte Carlo inference for predictions [20], [21], [5], [22], [23]. Fitting is done by minimizing the Kullback-Leibler (KL) divergence between the true and the approximate posterior. In most of these variational approximations, the objective function for fitting the model is of the form L(ψ) = −LD (ψ) + DKL (q(ψ)|p(ψ) We consider target systems that can be modeled with discrete-time first-order dynamics xt+1 = f (xt , ut ), where f is unknown, with states xt ∈ RD and controls ut ∈ RU , indexed by time-step t. The goal is to find the parameters θ of a control policy πθ that minimize a state-dependent cost function c accumulated over a finite time horizon H, (H ) X (1) arg min J(θ) = Eτ c(xt ) θ . θ i=1 The expectation is due to not knowing the true dynamics f , which induces a distribution over trajectories p(τ ) = p(x1 , u1 , ..., xH , uH ). The objective could be estimated by black-box optimization or likelihood ratio method, obtaining trajectory samples directly from the target system. However, such methods are known to require a large number of evaluations, which may be impractical for applications on physical robot systems. An alternative is to use experience to fit an estimated model, and use the model to evaluate the objective in Equation 1. 𝐱𝑡+1 (2) where LD is the likelihood of the data, q(ψ) is the approximate posterior and p(ψ) is some user-defined prior on the parameters. To fit the dynamics model, we build the dataset D of tuples h(xt , ut ), ∆t i; where (xt , ut ) ∈ RD+U are the state-action pairs that we use as input to the dynamics models, and ∆t = xt − xt−1 ∈ RX are the changes in state observed after applying action ut at state xt . Fitting the model is done by minimizing The objective 2 via stochastic gradient descent. In this work, we evaluate the use of BNN models based on the dropout approximation [5] and the truncated Log-Normal approximation [6]. B. Policy optimization To estimate the objective function in Equation 1, we base our approach on the Deep-PILCO method [3]. This consists on performing forward simulations using the model fψ , as illustrated in Figure 2. Specifically, samples from p(τ ) are obtained by first sampling an ensemble of K dynamics (k) (k) models f˜ψ and K initial state particles x1 , with k = 1, ..., K. These states are fed into the policy to obtain a set (k) of corresponding actions u1 . The states and actions are used (k) by the corresponding model f˜ψ to produce a set of particles (k) for the next state x2 . Finally, the particles are resampled (k) by fitting a Gaussian distribution to the particles x2 , and sampling K new particles from this Gaussian. The process is repeated for the next states until reaching time step H. This procedure can be summarized by the following model: (k) (k) x1 ∼ p(x1 ), f˜ψ ∼ q(ψ),   (k) (k) (k) (k) (k) (k) (k) ut ∼ πθ ut |xt , yt+1 ∼ p(xt+1 |xt , ut , fψ(k) ), (k) (k) xt+1 ∼ N (xt+1 |µyt , Σyt ). (3) Finally, the objective is approximated via Monte Carlo integration arg min θ K X H X (k) ˜ = 1 c(xt ). J(θ) K i=1 (4) k=1 We optimize this objective via stochastic gradient descent since the task-dependent cost is assumed to be differentiable, and policy evaluations and dynamics model predictions are differentiable. V. I MPROVEMENTS TO D EEP -PILCO In this section we enumerate the changes we have done to the Deep-PILCO, and that were crucial for improving its data-efficiency and obtaining the results we describe in the following sections. A. Common random numbers (CRN) and PEGASUS policy evaluation The convergence of Deep-PILCO is highly dependent ˆ on the variance of the estimated gradient ∇θ J(θ) = PK (k) 1 (k) ˆ ∇ J(θ| f , x ). The variance of this gradient is, θ 1 k K among other things, dependent on p(x1 ), the random numbers used for Monte Carlo integration, and the number of particles K. In our initial experiments we increased K from 10 to 100, and found it to improve convergence with small penalty on running time. Increasing the number of particles also enables us to further reduce variance by using common random numbers (CRN). The generative model in Eq. 3, implemented with BNNs in Deep-PILCO, relies on the re-parameterization trick [21] to propagate policy gradients over the simulation horizon. If we provide the random numbers for the policy evaluation step of Deep-PILCO, we obtain a variant of the PEGASUS2 algorithm [24]. This approach requires intermediate moment-matching and re-sampling steps. To reduce the impact of biases from deterministic policy evaluations, we resample the random numbers after each trial, but they remain fixed during the policy optimization phase. 2 Policy Evaluation-of-Goodness And Search Using Scenarios B. Gradient Clipping As noted in [3], the recurrent application of BNNs to implement the generative model in Eq. 3 can be interpreted as a Recurrent Neural Network (RNN) model. As such, DeepPILCO is prone to suffer from vanishing and exploding gradients [25], especially when dealing with tasks that require long time horizon or very deep models for the dynamics and policy. Although numerous techniques have been proposed in the RNN literature, we found the gradient clipping strategy to be effective in our experiments; as shown in Figure 6b. C. Training neural network controllers While Deep-PILCO had been limited to training singlelayer Radial Basis Function policies, the application of gradient clipping and CRNs allows stable training of deep neural network policies, opening the door for richer behaviors. We found that adding dropout regularization to the policy networks improves performance. During policy evaluation, we sample from policies with a similar scheme to that used for dynamics models. For each particle, we sample one dynamics model and one policy, and keep them fixed during policy evaluation. This can be viewed as attempting to learn a distribution of controllers that are likely to perform well over plausible dynamic models. We decided to make the policy stochastic during execution, by using a single dropout sample of the policy at every time step. This provides a limited amount of exploration, which we found beneficial, in particular, for the double cart-pole swing-up task. D. BNNs with Log-Normal multiplicative noise Deep-PILCO with binary dropout requires tuning the dropout probability to a value appropriate for the model size. We experimented with other BNN models [26], [22], [6] to enable learning the dropout probabilities from data. The best performing method in our experiments was using Log-Normal dropout with a truncated log-uniform prior LogU[−10,0] . The multiplicative noise is constrained to values between 0 and 1 [6]. Other methods we may explore in the future include Concrete Dropout [23] and Beta distributed multiplicative noise. VI. R ESULTS In our experiments, we use the ADAM algorithm [27] for model fitting and policy optimization, with the default parameters suggested by the authors. We report the best results we obtained after minimal manual hyper-parameter tuning. A. Cart-pole and double pendulum on cart swing-up tasks We tested the improvements, described in Section III, on two benchmark scenarios: swinging up and stabilizing an inverted pendulum on a cart, and swinging up and stabilizing a double pendulum on a cart. These tasks are illustrated in Figure 3. The first task was meant to compare performance on the same experimental setup as [3]. We chose the second scenario to compare the methods with a harder long-term 𝜃2,𝑡 𝜃𝑡 𝜃1,𝑡 𝐮𝑡 𝐮𝑡 𝑥𝑡 (a) Cart-pole task 𝑥𝑡 (a) Cart-pole RBF Policies (b) Double cart-pole task Fig. 3: Illustration of the benchmark tasks for the experiments in section VI-A. In both tasks, the tip of the pendulum starts downright, with the cart centered at x = 0. The goal is to balance the the tip of the pole at its highest possible location, while keeping the cart at x = 0. This occurs when θ = 0 in the cart-pole task, and when θ1 = 0, θ2 = 0 in the double cart-pole task. prediction task; due to the chaotic dynamics of the doublependulum. In both cases, the system is controlled by applying a horizontal force u to the cart. Figure 4 summarizes our results for the cart-pole domain. The top image, (4a), compares PILCO with sparse spectrum GP regression [28] for the dynamics, with two versions of Deep-PILCO using BNN dynamics; one using binary dropout with dropout probability p = 0.1, and the other using Log-Normal dropout with a truncated log-uniform LogU[−10,0] . The BNN models are ReLU networks with two hidden layers of 200 units and a linear output layer. We do not discard older data during training. The learning rate was set to 10−4 for model fitting and 10−3 for policy learning. While fitting the models to experience data, we learn a homoscedastic measurement noise parameter for each output dimension. This noise is used to corrupt the input to the policy. The policies are RBF networks with 30 units. The first interaction with the system corresponds to applying controls uniformly-at-random. The bottom image, (4b) provides a comparison of policies. Here the same task and BNN dynamics are applied as we have just discussed. The policy networks are ReLU networks with two hidden layers of 200 units. The initial experience consists of a single trial with uniformly random controls. The reader should note that we are able to train complex neural network controllers and that the resulting performance is stronger than either PILCO or Deep-PILCO with RBF controllers, without reducing data efficiency. This result is not possible using any existing technique, to our knowledge. The code used in these experiments is available at https://github.com/ juancamilog/kusanagi. Figure 5 illustrates the effect of the techniques on the more complicated double cart-pole swing-up task. The setup is similar to the cart-pole task, but we change the networks architecture slightly as the dynamics are more complex. The 25 (b) Cart-pole Deep Policies Fig. 4: Cost per trial on the cart-pole swing-up task. The shaded regions correspond to half a standard deviation (for clarity). In (a), RBF policies are learned with various methods, as has been examined by prior work. NN policies are learned in (b), which demonstrate that Deep-PILCO, with deterministic policy evaluations, can match the data efficiency of PILCO in the cart-pole task. dynamics models are ReLU networks with 4 hidden layers of 200 units and a linear output layer. The policies are ReLU networks with four hidden layers of 50 units. The learning rate for policy learning was set to 10−4 for this experiment. In this case, the differences in performance are even more pronounced. Our proposed method converged after 42 trials, corresponding to 126 s of experience at 10 Hz. This is close to the 84 s at 13.3 Hz reported in [29]. However, here we see the combination of BNN dynamics and BNN policy both learns the fastest, in terms of data efficiency, and that it learns the most effective (lowest cost) final policies at steady-state. We believe our method’s more complex policy class accounts for its increasing performance margin with respect to simpler methods as task dimensionality and complexity increases. Figure 6a(a) shows a comparison between using fixed random numbers and re-sampling a new set of particles at each optimization step, for the cart-pole balancing task. In this experiment, we use a similar setup to the one for the results in Figure 4. The initial experience consists of one trial with randomized controls and one trial applying the initial policy. The learning rate was set to 10−4 . While previous experiments combining PILCO with PEGASUS were unsuccessful [29], we found the combination of Deep- Fig. 5: Cost per trial on the double cart-pole swing-up task. The shaded regions correspond to half a standard deviation (for clarity). This demonstrates the benefit of using Log-Normal multiplicative noise for the dynamics with dropout regularization for the policies PILCO with this type of deterministic policy evaluation to be necessary for convergence when training neural network policies. We did not find parameters for Deep-PILCO, with stochastic policy evaluation, to produce successful policies in the double cart-pole swing-up task. We experimented with fixing the dropout masks across optimizer iterations, and using CRNs for the particle re-sampling step in Deep-PILCO. Both of these had a noticeable impact on convergence and reduced the computational cost of every policy update. We observed an improvement on the number of trials required for finding successful policies, and a reduction on the final accumulated cost. Our analysis of the effect of gradient clipping is illustrated in Figure 6a(b). The trend is that any value of gradient clipping we attempted made a large improvement over not clipping at all and that the specific choice of clipping values was highly stable. The remainder of our experiments are all run with clipping value 1.0, and the reader is reminded that the strong performance in these other plots would not be possible without this innovation, which is a novel contribution in our method. B. Learning swimming gaits on an underwater robot We evaluate our approach on the gait learning tasks for an underwater hexapod robot [2]. These tasks consists of finding feedback controllers that enable controlling the robot’s 3D pose via periodic motion of its legs. Figure 1 illustrates the execution of a gait learned using our methods. Additional examples of learned gaits can be seen in the accompanying video. The robot’s state space consists of readings from its inertial measurement unit (IMU), its depth sensor and motor encoders. To compare with previously published results, the action space is defined as the parameters of the periodic leg command (PLC) pattern generator [2], with the same constraints and limits as prior work. We conducted experiments on the following control tasks: 1) knife edge: Swimming straight-ahead with 90 deg roll 2) belly up: Swimming straight-ahead with 180 deg roll 3) corkscrew: Swimming straight-ahead with 120 deg rolling velocity (anti-clockwise) (a) CRN comparison (b) Clipping comparison Fig. 6: (a) Illustrates the benefit of fixing random numbers for policy evaluation (as in [24]) versus using stochastic policy evaluations (as in the approach of [3]), and (b) Shows the area under the learning curve for the cart-pole (sum of average cost across all trials – lower is better) for various gradient clipping strategies. 4) 1 m depth change: Diving and stabilizing 1 meter below current depth. There were two versions of these experiments. In the first one, which we call 2-leg tasks, the robot controls only the amplitudes and offsets of the two back legs (4 control dimensions). Its state corresponds to the angles and angular velocities, as measured by the IMU, and the depth sensor measurement (7 state dimensions). In the second version, the robot controls amplitudes and offsets and phases for all 6 legs (18 control dimensions). In this case, the state consists of the IMU and depths sensor readings plus the leg angles as measured form the motor encoders (13 state dimensions). We transform angle dimensions into their complex representation before passing the state as input to the dynamics model and policy, as described in [29]. For all the experiments, we trained dynamics models and policies with 4 hidden layers of 200 units. The dynamics models use the truncated Log-Normal dropout approximation. Similar to the cart-pole and double cart-pole experiments, we enable dropout for the policy. We used a learning rate of 10− 4 and clip gradients to a maximum magnitude of 1.0. The experience dataset is initialized with 5 random trials, common to all the experiments with the same state Roll Pitch 0.8 0.4 Yaw 0.6 0.2 Depth Average cost (over 10 runs) 1.0 0.0 1 5 10 15 20 25 30 35 40 Number of interactions (20.0 secs at 1.0 Hz each) 45 50 90.0 0.0 -90.0 20.0 0.0 -20.0 0.0 -30.0 -60.0 1.4 1.0 0.6 1 5 10 20 Episode Index 30 40 50 5 10 20 Episode Index 30 40 50 5 10 20 Episode Index 30 40 50 5 10 20 Episode Index 30 40 50 0.25 Roll 0.50 Pitch 0.75 180.0 90.0 0.0 -90.0 30.0 0.0 -30.0 -60.0 Yaw 1.00 30.0 0.0 -30.0 -60.0 Depth Average cost (over 10 runs) (a) 2-Leg Knife edge 0.00 1 5 10 15 20 25 30 35 40 Number of interactions (20.0 secs at 1.0 Hz each) 45 50 1.4 1.0 0.6 1 Roll 900.0 540.0 180.0 -180.0 Pitch 30.0 0.0 -30.0 -60.0 0.4 Yaw 0.2 30.0 0.0 -30.0 -60.0 Depth Average cost (over 10 runs) (b) 2-Leg Belly up 1.0 0.8 0.6 0.0 1 5 10 15 20 25 30 35 40 Number of interactions (20.0 secs at 1.0 Hz each) 45 50 1.4 1.0 0.6 1 Roll 1.0 0.0 Pitch 30.0 0.0 -30.0 -60.0 0.6 Yaw -90.0 30.0 0.0 -30.0 -60.0 0.4 Depth Average cost (over 10 runs) (c) 2-Leg Corkscrew 0.8 1 5 10 15 20 25 30 35 40 Number of interactions (20.0 secs at 1.0 Hz each) 45 50 1.8 1.4 1.0 0.6 1 (d) 2-Leg Depth change Fig. 7: Learning curve and the evolution of the trajectory distribution as learning progresses, for the 2-leg tasks. The robot is learning to control its pose by setting the appropriate amplitudes and leg offsets angles for its back 2 legs. The dashed lines represent the desired target states. and action spaces. The code used for these experiments is available at https://github.com/juancamilog/ robot_learning. Figures 7 and 8 show the results of gait learning in the simulation environment described in [2]. We seek a similar objective to the previous evaluations: rapid and stable learning for this now much more complex robotic system. In addition to learning curves on the left of each task panel, detailed state telemetry is provided for selected learning episodes on the right to provide intuition on stability and learning progression. In each case attempted, our method was able to learn effective swimming behavior, to coordinate the motions of multiple flippers and overcome simulated hydrodynamic effects without any prior model. The trend is that 6 flipper tasks, with their intrinsically higher policy search space take roughly double the learning iterations, but all tasks are still converged by trial 50, which remains practical for real deployment. We point the reader to the shading, which visualizes the predicted uncertainty in the state telemetry displays. We can see that as more data is collected and the policy is refined, the BNN dynamics become increasingly confident about their state predictions, which feeds back to more information to guide policy learning. This is the nature of a properly functioning uncertain-model-based RL iteration, and it is quite clearly effective to learn gaits for this swimming robot. VII. C ONCLUSION We have presented improvements to a probabilistic modelbased reinforcement learning algorithm, Deep-PILCO, to enable fast synthesis of controllers for robotics applications. Our algorithm is based on treating neural network models Roll Pitch 0.8 Yaw 0.6 0.4 Depth Average cost (over 10 runs) 1.0 0.2 0.0 1 5 10 15 20 25 30 35 40 Number of interactions (20.0 secs at 2.0 Hz each) 45 50 90.0 0.0 -90.0 0.0 -30.0 -60.0 0.0 -30.0 -60.0 1.4 1.0 0.6 1 5 10 20 Episode Index 30 40 50 5 10 20 Episode Index 30 40 50 5 10 20 Episode Index 30 40 50 5 10 20 Episode Index 30 40 50 Roll 1.0 Pitch 0.8 0.6 Yaw 0.4 0.2 Depth Average cost (over 10 runs) (a) 6-Leg Knife edge 0.0 1 5 10 15 20 25 30 35 40 Number of interactions (20.0 secs at 2.0 Hz each) 45 50 180.0 90.0 0.0 -90.0 0.0 -30.0 -60.0 0.0 -30.0 -60.0 1.4 1.0 0.6 0.2 1 0.4 Roll 0.6 Pitch 0.8 900.0 540.0 180.0 -180.0 30.0 0.0 -30.0 -60.0 Yaw 1.0 30.0 0.0 -30.0 -60.0 Depth Average cost (over 10 runs) (b) 6-Leg Belly up 0.2 1 5 10 15 20 25 30 35 40 Number of interactions (20.0 secs at 2.0 Hz each) 45 50 1.4 1.0 0.6 1 Roll 1.0 0.0 0.6 0.4 Pitch 0.8 30.0 0.0 -30.0 -60.0 Yaw -90.0 30.0 0.0 -30.0 -60.0 Depth Average cost (over 10 runs) (c) 6-Leg Corkscrew 0.2 1 5 10 15 20 25 30 35 40 Number of interactions (40.0 secs at 1.0 Hz each) 45 50 1.8 1.4 1.0 0.6 1 (d) 6-Leg Depth change Fig. 8: Learning curve and the evolution of the trajectory distribution as learning progresses, for the 6-leg tasks. In this case, the robot is trying to control the amplitudes, leg angle offsets, and phase offsets for all 6 legs. The algorithm takes longer to converge in this case, when compared to the 2-leg tasks. This is possibly due to the larger state and action spaces (13 state dimensions + 18 action dimensions). Nevertheless, this demonstrates that the algorithm finds can scale to higher dimensional problems. trained with dropout as an approximation to the posterior distribution of dynamics models given the experience data. Sampling dynamics models from this distribution helps in avoiding model-bias during policy optimization; policies are optimized for a finite sample of dynamics models, instead of optimizing for the mean (as it is done with standard dropout). Our changes enable training of neural network controllers, which we demonstrate to outperform RBF controllers on the cart-pole swing-up task. We also demonstrate competitive performance on the task of swing-up and stabilization of a double pendulum on a cart. Finally, we demonstrated the usefulness of the algorithm on the higher dimensional tasks of learning gaits for pose stabilization for a six legged underwater robot. We replicate previous results [2] where we control the robot with 2 flippers, and provide new results on learning to control the robot using all 6 legs, now including phase offsets. While the ability to train deep network dynamics predictors is clearly effective in control, this is by no means the only application possible for this ability within a robot system. We are currently investigating extensions of these basic approaches to adaptive planning and active sensing. The task of active data gathering to optimize self-knowledge has long been a key to effective system identification and model learning. The consistent uncertainty predictions that result from our approach’s stable training regime will be an excellent tool to study this active learning problem. R EFERENCES [1] M. P. Deisenroth, D. Fox, and C. E. Rasmussen, “Gaussian processes for data-efficient learning in robotics and control,” IEEE Transactions [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] on Pattern Analysis and Machine Intelligence, vol. 37, no. 2, pp. 408– 423, 2015. D. Meger, J. C. G. Higuera, A. Xu, P. Giguere, and G. Dudek, “Learning legged swimming gaits from experience,” in Robotics and Automation (ICRA), 2015 IEEE International Conference on. IEEE, 2015, pp. 2332–2338. Y. Gal, R. McAllister, and C. E. Rasmussen, “Improving PILCO with Bayesian neural network dynamics models,” in Data-Efficient Machine Learning workshop, ICML, Apr. 2016. 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. Y. Gal and Z. Ghahramani, “Dropout as a bayesian approximation: Representing model uncertainty in deep learning,” in international conference on machine learning, 2016, pp. 1050–1059. K. Neklyudov, D. Molchanov, A. Ashukha, and D. P. Vetrov, “Structured bayesian pruning via log-normal multiplicative noise,” in Advances in Neural Information Processing Systems, 2017, pp. 6778– 6787. D. H. Jacobson and D. Q. Mayne, Differential Dynamic Programming. Elsevier, 1970. W. Li and E. Todorov, “Iterative linear quadratic regulator design for nonlinear biological movement systems,” in Proceedings of the 1st International Conference on Informatics in Control, Automation and Robotics, 2004. Y. Tassa, N. Mansard, and E. Todorov, “Control-limited differential dynamic programming,” in Proceedings of the International Conference on Robotics and Automation (ICRA), 2014. A. D. Marchese, R. Tedrake, and D. Rus, “Dynamics and trajectory optimization for a soft spatial fluidic elastomer manipulator,” International Journal of Robotics Research, vol. 35, pp. 1000 – 1019, 2015. D. Nguyen-Tuong and J. Peters, “Model learning for robot control: a survey,” Cognitive Processing, vol. 12, no. 4, pp. 319–340, Nov 2011. C. G. Atkeson, A. W. Moore, and S. Schaal, “Locally weighted learning for control,” Lazy learning, pp. 75 – 113, 1997. P. Abbeel, A. Coates, M. Quigley, and A. Y. Ng, “An application of reinforcement learning to aerobatic helicopter flight,” in Proceedings of Neural Information Processing Systems (NIPS), 2006. S. Levine and P. Abbeel, “Learning neural network policies with guided policy search under unknown dynamics,” in Advances in Neural Information Processing Systems, 2014, pp. 1071–1079. T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra, “Continuous control with deep reinforcement learning,” CoRR, vol. abs/1509.02971, 2015. S. Bansal, R. Calandra, S. Levine, and C. Tomlin, “MBMF: modelbased priors for model-free reinforcement learning,” CoRR, vol. abs/1709.03153, 2017. Y. Pan and E. Theodorou, “Probabilistic differential dynamic programming,” in Advances in Neural Information Processing Systems, 2014, pp. 1907–1915. G. Lee, S. S. Srinivasa, and M. T. Mason, “GP-ILQG: data-driven robust optimal control for uncertain nonlinear dynamical systems,” CoRR, vol. abs/1705.05344, 2017. K. Chatzilygeroudis, R. Rama, R. Kaushik, D. Goepp, V. Vassiliades, and J.-B. Mouret, “Black-box data-efcient policy search for robotics,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017. C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra, “Weight uncertainty in neural network,” in International Conference on Machine Learning, 2015, pp. 1613–1622. D. P. Kingma, T. Salimans, and M. Welling, “Variational dropout and the local reparameterization trick,” in Advances in Neural Information Processing Systems, 2015, pp. 2575–2583. D. Molchanov, A. Ashukha, and D. Vetrov, “Variational dropout sparsifies deep neural networks,” arXiv preprint arXiv:1701.05369, 2017. Y. Gal, J. Hron, and A. Kendall, “Concrete dropout,” in Advances in Neural Information Processing Systems, 2017, pp. 3584–3593. A. Y. Ng and M. Jordan, “Pegasus: A policy search method for large mdps and pomdps,” in Proceedings of the Sixteenth conference on Uncertainty in artificial intelligence, 2000, pp. 406–415. R. Pascanu, T. Mikolov, and Y. Bengio, “On the difficulty of training recurrent neural networks,” in International Conference on Machine Learning, 2013, pp. 1310–1318. [26] D. P. Kingma, T. Salimans, and M. Welling, “Variational dropout and the local reparameterization trick,” in Advances in Neural Information Processing Systems, 2015. [27] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” CoRR, vol. abs/1412.6980, 2014. [Online]. Available: http://arxiv.org/abs/1412.6980 [28] M. Lázaro-Gredilla, J. Quiñonero Candela, C. E. Rasmussen, and A. R. Figueiras-Vidal, “Sparse spectrum gaussian process regression,” J. Mach. Learn. Res., vol. 11, pp. 1865–1881, Aug. 2010. [29] M. P. Deisenroth, Efficient reinforcement learning using Gaussian processes. KIT Scientific Publishing, 2010, vol. 9.
2cs.AI
arXiv:1509.08255v2 [cs.NE] 8 Oct 2015 Encoding Reality: Prediction-Assisted Cortical Learning Algorithm in Hierarchical Temporal Memory Fergal Byrne HTM Theory Group, Dublin, Ireland [email protected] http://inbits.com In the decade since Jeff Hawkins proposed Hierarchical Temporal Memory (HTM) as a model of neocortical computation, the theory and the algorithms have evolved dramatically. This paper presents a detailed description of HTM’s Cortical Learning Algorithm (CLA), including for the first time a rigorous mathematical formulation of all aspects of the computations. Prediction Assisted CLA (paCLA), a refinement of the CLA, is presented, which is both closer to the neuroscience and adds significantly to the computational power. Finally, we summarise the key functions of neocortex which are expressed in paCLA implementations. An Open Source project, Comportex, is the leading implementation of this evolving theory of the brain. 1 Introduction We present an up-to-date description of Hierarchical Temporal Memory (HTM) which includes a mathematical model of its computations, developed for this paper. The description and mathematics are presented here in order to provide an axiomatic basis for understanding the computational power of each component in a HTM system, as well as a foundation for comparing HTM computational models with empirical evidence of strcture and function in neocortex. In particular, we demonstrate the following: 1. A layer of HTM neurons automatically learns to efficiently represent sensory and sensorimotor inputs using semantic encodings in the form of Sparse Distributed Representations 1 (SDRs). These representations are robust to noise and missing or masked inputs, and generalise gracefully in a semantically useful manner. 2. A HTM layer automatically learns high-dimensional transitions between SDRs, makes predictions of the future evolution of its inputs, detects anomalies in the dynamics, and learns high-order sequences of sensory or sensorimotor patterns. 3. Transition Memory uses temporal and hierarchical context to assist recognition of feedforward patterns, enhancing bottom-up input pattern recognition and providing for stabilisation in the face of uncertainty. 4. HTM’s Temporal Pooling models the learnable processing of fast-changing inputs in Layer 4 of cortex into slower-changing, stable representations in Layer 2/3 of sequences, orbits and trajectories of L4 SDRs. 2 Hierarchical Temporal Memory and the Cortical Learning Algorithm Hierarchical Temporal Memory was developed by Jeff Hawkins and Dileep George [George and Hawkins, 2009] and substantially refined by Hawkins and his colleagues at Numenta. The most recent description produced by Numenta, Hawkins and Ahmad [2011] has been updated by the author in Byrne [2015]. HTM is a model of cortex in which each region in a hierarchy performs an identical process on its own inputs, forming sequence memories of recognised spatial patterns. The Cortical Learning Algorithm (CLA) describes in detail how each region works. The HTM Model Neuron The model neuron in HTM is substantially more realistic and com- plex when compared to a point neuron in Artificial Neural Networks, such as the McCullochPitts neuron [McCulloch and Pitts, 1943], that led to Rosenblatt’s perceptron. An ANN neuron simply passes its inputs (weighted by synaptic strengths and summed) through a nonlinearity such as a sigmoid or rectifier. The extra complexity is intended to more carefully resemble the structure and function of real cortical neurons, while remaining simple compared with models based on electrical characteristics. 2 OR OR Figure 1: A HTM neuron. Feedforward inputs (green) appear on a proximal dendrite, where they enter the cell body or Soma. A set of distal dendrites (blue) receive predictive contextual inputs from within the layer and from higher layers/regions. Each dendrite detects coincidental inputs and produces a dendritic spike only if its inputs exceed a threshold. From Byrne [2015] The HTM model neuron has two kinds of dendrites, in order to process its two kinds of input. Feedforward inputs appear on a dendrite segment which is adjacent, or proximal, to the cell body (soma), and the sum of these inputs is directly fed into the soma. In addition, however, the cell has a greater number of distal dendrite segments, each of which is an active unit capable of detecting the coincident activity of its own inputs. The distal inputs are from nearby cells in the same layer, as well as cells in higher regions of the network. These cells provide predictive context to assist the neuron in forming a decision to fire. Each distal segment learns to recognise its own set of contextual patterns, and provides input to the neuron only when sufficient input activity appears on its synapses. For simplicity, CLA uses binary activation vectors to communicate between neurons. This is justified by empirical evidence regarding the very high failure rate of individual synapses and the inherent noise found in biological neuron circuits. HTM Mini-columns Real layers of cortex have been found to organise their neurons in mini- columns of about 30 cells, which have strongly correlated feedforward response. CLA relies on an interpretation of this structure in order to model prediction and sequence memory. In 3 Hawkins’ original design, the column and its contained cells play separate, but co-operative roles in the computational model. We present here a more integrated design for the minicolumn, which provides extra power in the computation and directly produces a semantic interpretation of the representations. We’ll return to mini-columns when describing prediction. Figure 2: An HTM Column. The spheres are pyramidal model neurons, with their feedforward proximal dendrites at left and their individual distal dendrites at right. The elongated vertical structure is an inhibitory column cell, which shares the same feedforward input as its contained cells. Sparse Distributed Representations (SDRs) A final key feature of HTM is the Sparse Distributed Representation (SDR), which is a very sparse binary representation in which each active bit has some semantic meaning. For further detail on SDRs, see Ahmad and Hawkins [2015]. The next section describes the processes in CLA in more detail, and provides a full mathematical description in terms of vector operations. 4 3 Pattern Memory (aka Spatial Pooling) We’ll begin to describe the details and mathematics of HTM by describing the simplest operation in HTM’s Cortical Learning Algorithm: Pattern Memory, also known as Spatial Pooling, forms a Sparse Distributed Representation from a binary feedforward input vector. Pattern Memory is a kind of learned spatial pattern recognition, capable of identifying and representing single inputs. We begin with a layer (a 1- or 2-dimensional array) of single neurons, which will form a pattern of activity aimed at efficiently representing the input vectors. Figure 3: A single layer of CLA neurons, forming a Sparse Distributed Representation of active cells (yellow). 3.1 Feedforward Processing on Proximal Dendrites The HTM model neuron has a single proximal dendrite, which is used to process and recognise feedforward or afferent inputs to the neuron. We model the entire feedforward input to a cortical layer as a bit vector xFF ∈ {0, 1}nFF , where nFF is the width of the input. The dendrite is composed of ns synapses which each act as a binary gate for a single bit in the input vector. Each synapse i has a permanence pi ∈ [0, 1] which represents the size and 5 efficiency of the dendritic spine and synaptic junction. The synapse will transmit a 1-bit (or on-bit) if the permanence exceeds a threshold θi (often a global constant θi = θ = 0.2). When this is true, we say the synapse is connected.  Each neuron samples ns bits from the nFF feedforward inputs, and so there are nnFFs possible choices of input for a single neuron. A single proximal dendrite represents a projection πj : {0, 1}nFF → {0, 1}ns , so a population of neurons corresponds to a set of subspaces of the sensory space. Each dendrite has an input vector xj = πj (xFF ) which is the projection of the entire input into this neuron’s subspace. ~ A synapse is connected if its permanence pi exceeds its threshold θi . If we subtract p − θ, take the elementwise sign of the result, and map to {0, 1}, we derive the binary connection vector cj for the dendrite. Thus: ci = (1 + sgn(pi − θi ))/2 The dot product oj (x) = cj · xj now represents the feedforward overlap of the neuron with the input, ie the number of connected synapses which have an incoming activation potential. Later, we’ll see how this number is used in the neuron’s processing. The elementwise product oj = cj xj is the vector in the neuron’s subspace which represents the input vector xFF as ”seen” by this neuron. This is known as the overlap vector. The length oj = koj k`1 of this vector corresponds to the extent to which the neuron recognises the input, and the direction (in the neuron’s subspace) is that vector which has on-bits shared by both the connection vector and the input. If we project this vector back into the input space, the result x̂j = π −1 (oj ) is this neuron’s approximation of the part of the input vector which this neuron matches. If we add a set of such vectors, we will form an increasingly close approximation to the original input vector as we choose more and more neurons to collectively represent it. 3.2 Sparse Distributed Representations (SDRs) We now show how a layer of neurons transforms an input vector into a sparse representation. From the above description, every neuron is producing an estimate x̂j of the input xFF , with length oj  nFF reflecting how well the neuron represents or recognises the input. We form a sparse representation of the input by choosing a set YSDR of the top nSDR = sN neurons, where N is the number of neurons in the layer, and s is the chosen sparsity we wish to impose (typically 6 s = 0.02 = 2%). The algorithm for choosing the top nSDR neurons may vary. In neocortex, this is achieved using a mechanism involving cascading inhibition: a cell firing quickly (because it depolarises quickly due to its input) activates nearby inhibitory cells, which shut down neighbouring excitatory cells, and also nearby inhibitory cells, which spread the inhibition outwards. This type of local inhibition can also be used in software simulations, but it is expensive and is only used where the design involves spatial topology (ie where the semantics of the data is to be reflected in the position of the neurons). A more efficient global inhibition algorithm - simply choosing the top nSDR neurons by their depolarisation values - is often used in practise. If we form a bit vector ySDR ∈ {0, 1}N where yj = 1 ⇔ j ∈ YSDR , we have a function which maps an input xFF ∈ {0, 1}nFF to a sparse output ySDR ∈ {0, 1}N , where the length of each output vector is kySDR k`1 = sN  N . The reverse mapping or estimate x̂ of the input vector by the set YSDR of neurons in the SDR is given by the sum: X j∈YSDR x̂j = X YSDR πj−1 (oj ) = X πj−1 (cj xj ) = X YSDR YSDR 7 πj−1 (cj πj (xFF )) = X j∈YSDR πj−1 (cj ) xFF Input n1 n5 n2 n3 n4 Figure 4: Visualisation of SDR Formation. The high-dimensional input space is projected to 3D for illustration. In red, the input vector has a particular orientation. The vectors n1-n5 represent a number of neurons in the layer, their length is proportional to the overlap with the input. Only neurons n1 and n2 have enough overlap to take part in the SDR, as these two are the best estimates of the input. 3.3 Matrix Form The above can be represented straightforwardly in matrix form. The projection πj : {0, 1}nFF → {0, 1}ns can be represented as a matrix Πj ∈ {0, 1}ns × nFF . Alternatively, we can stay in the input space Bnff , and model πj as a vector ~πj = πj−1 (1ns ), ie where πj,i = 1 ⇔ (πj−1 (1ns ))i = 1. The elementwise product x~j = πj−1 (xj ) = π~j xFF represents the neuron’s view of the input vector xFF . We can similarly project the connection vector for the dendrite by elementwise multiplication: c~j = πj−1 (cj ), and thus o~j (xFF ) = c~j xFF is the overlap vector projected back into BnFF , and the dot product oj (xFF ) = c~j · xFF gives the same overlap score for the neuron given xFF as input. Note that o~j (xFF ) = x̂j , the partial estimate of the input produced by neuron j. We can reconstruct the estimate of the input by an SDR of neurons YSDR : 8 x̂SDR = X x̂j = j∈YSDR X ~oj = j∈YSDR X ~cj xFF = CSDR xFF j∈YSDR where CSDR is a matrix formed from the ~cj for j ∈ YSDR . 3.4 Learning in HTM as an Optimisation Problem We can now measure the distance between the input vector xFF and the reconstructed estimate x̂SDR by taking a norm of the diference. Using this, we can frame learning in HTM as an optimisation problem. We wish to minimise the estimation error over all inputs to the layer. Given a set of (usually random) projection vectors ~πj for the N neurons, the parameters of the model are the permanence vectors p~j , which we adjust using a simple Hebbian update model. The update model for the permanence of a synapse pi on neuron j is: (t+1) pi  (t)  (1 + δinc )pi = (1 − δdec )p(t) i   (t) pi (t) if j ∈ YSDR , (xj )i = 1 and pi ≥ θi (t) if j ∈ YSDR and ((xj )i = 0 or pi < θi ) otherwise This update rule increases the permanence of active synapses, those that were connected to an active input when the cell became active, and decreases those which were either disconnected or received a zero when the cell fired. In addition to this rule, an external process gently boosts synapses on cells which either have a lower than target rate of activation, or a lower than target average overlap score. In the visualisation above (see Figure 4), this will tend to move the vectors belonging to successful neurons closer to the input vector by increasing the number of overlapping synapses, and it will also make the vectors more likely to remain active even in the face of noise in the input. 3.5 Computational Power of SDR-forming Circuits An SDR is a form of k-winner-takes-all (k-WTA) representation. Maass [2000] proves that a single k-WTA gate has the same computational power as a polynomially larger multi-layer network of threshold artificial neurons, and that the soft (continuous) version can approximate any continuous function (exactly as a multilayer ANN network can - see Maass [1997]). 9 4 Transition Memory - Making Predictions We saw how a layer of neurons learns to form a Sparse Distributed Representation (SDR) of an input pattern. In this section, we’ll describe the process of learning temporal sequences. We showed earlier that the HTM model neuron learns to recognise subpatterns of feedforward input on its proximal dendrites. This is somewhat similar to the manner by which a Restricted Boltzmann Machine can learn to represent its input in an unsupervised learning process. One distinguishing feature of HTM is that the evolution of the world over time is a critical aspect of what, and how, the system learns. The premise for this is that objects and processes in the world persist over time, and may only display a portion of their structure at any given moment. By learning to model this evolving revelation of structure, the neocortex can more efficiently recognise and remember objects and concepts in the world. 4.1 Distal Dendrites and Prediction In addition to its one proximal dendrite, a HTM model neuron has a collection of distal (far) dendrite segments, or simply dendrites, which gather information from sources other than the feedforward inputs to the layer. In some layers of neocortex, these dendrites combine signals from neurons in the same layer as well as from other layers in the same region, and even receive indirect inputs from neurons in higher regions of cortex. We will describe the structure and function of each of these. The simplest case involves distal dendrites which gather signals from neurons within the same layer. Earlier, we showed that a layer of N neurons converted an input vector x ∈ Bnff into a SDR ySDR ∈ BN , with length kySDR k`1 = sN  N , where the sparsity s is usually of the order of 2% (N is typically 2048, so the SDR ySDR will have 40 active neurons). The layer of HTM neurons can now be extended to treat its own activation pattern as a separate and complementary input for the next timestep. This is done using a collection of distal dendrite segments, which each receive as input the signals from other neurons in the layer itself. Unlike the proximal dendrite, which transmits signals directly to the neuron, each distal dendrite acts individually as an active coincidence detector, firing only when it receives enough signals to exceed its individual threshold. We proceed with the analysis in a manner analogous to the earlier discussion. The input (t−1) to the distal dendrite segment k at time t is a sample of the bit vector ySDR . We have nds 10 distal synapses per segment, a permanence vector pk ∈ [0, 1]nds and a synapse threshold vector θ~k ∈ [0, 1]nds , where typically θi = θ = 0.2 for all synapses. Following the process for proximal dendrites, we get the distal segment’s connection vector ck : ck,i = (1 + sgn(pk,i − θk,i ))/2 (t−1) (t−1) The input for segment k is the vector yk {0, 1}N −1 → {0, 1}nds = φk (ySDR ) formed by the projection φk :  from the SDR to the subspace of the segment. There are Nn−1 such ds projections (there are no connections from a neuron to itself, so there are N −1 to choose from). (t−1) (t−1) The overlap of the segment for a given ySDR is the dot product otk = ck · yk . If this overlap exceeds the threshold λk of the segment, the segment is active and sends a dendritic spike of size sk to the neuron’s cell body. This process takes place before the processing of the feedforward input, which allows the layer to combine contextual knowledge of recent activity with recognition of the incoming feedforward signals. In order to facilitate this, we will change the algorithm for Pattern Memory as follows. Each neuron j begins a timestep t by performing the above processing on its ndd distal dendrites. This results in some number 0 . . . ndd of segments becoming active and sending spikes to the neuron. The total predictive activation potential is given by: X opred,j = sk otk ≥λk The predictive potential is combined with the overlap score from the feedforward overlap coming from the proximal dendrite to give the total activation potential: atj = αj off,j + βj opred,j and these aj potentials are used to choose the top neurons, forming the SDR YSDR at time t. The mixing factors αk and βk are design parameters of the simulation. 4.2 Learning Predictions We use a very similar learning rule for distal dendrite segments as we did for the feedforward inputs: 11 pi,j (t+1)  (t)  (1 + σinc )pi = (1 − σdec )p(t) i   (t) pi if cell j active, segment k active, synapse i active if cell j active, segment k active, synapse i not active otherwise Again, this reinforces synapses which contribute to activity of the cell, and decreases the contribution of synapses which don’t. A boosting rule, similar to that for proximal synapses, allows poorly performing distal connections to improve until they are good enough to use the main rule. Interpretation We can now view the layer of neurons as forming a number of representations at each timestep. The field of predictive potentials opred,j can be viewed as a map of the layer’s confidence in its prediction of the next input. The field of feedforward potentials off,j can be viewed as a map of the layer’s recognition of current reality. Combined, these maps allow for prediction-assisted recognition, which, in the presence of temporal correlations between sensory inputs, will improve the recognition and representation significantly. We can quantify the properties of the predictions formed by such a layer in terms of the mutual information between the SDRs at time t and t + 1. . A layer of neurons connected as described here is a Transition Memory, and is a kind of first-order memory of temporally correlated transitions between sensory patterns. This kind of memory may only learn one-step transitions, because the SDR is formed only by combining potentials one timestep in the past with current inputs. Since the neocortex clearly learns to identify and model much longer sequences, we need to modify our layer significantly in order to construct a system which can learn high-order sequences. This is the subject of the next section. 4.3 Higher-order Prediction The current Numenta Cortical Learning Algorithm (or CLA, the detailed computational model in HTM) separates feedforward and predictive stages of processing. A modification of this model (which we call prediction-assisted recognition or paCLA) combines these into a single step involving competition between highly predictive pyramidal cells and their surrounding columnar inhibitory sheaths. Neural network models generally model a neuron as somehow ”combining” a set of inputs to produce an output. This is based on the idea that input signals cause ion currents to flow 12 into the neuron’s cell body, which raises its voltage (depolarises), until it reaches a threshold level and fires (outputs a signal). paCLA also models this idea, with the added complication that there are two separate pathways (proximal and distal) for input signals to be converted into effects on the voltage of the cell. In addition, paCLA treats the effect of the inputs as a rate of change of potential, rather than as a final potential level as found in standard CLA. Slow-motion Timeline of paCLA Consider a single column of pyramidal cells in a layer of cortex. Along with the set of pyramidal cells {P1 , P2 ..Pn }, we also model each columnar sheath of inhibitory cells as a single cell I. All the Pi and I are provided with the same feedforward input vector xt , and they also have similar (but not necessarily identical) synaptic connection vectors cPi and cI to those inputs (the bits of xt are the incoming sensory activation potentials, while bit j of a connection vector c is 1 if synapse j is connected). The feedforward overlap offPi (xt ) = xt · cPi is the output of the proximal dendrite of cell Pi (and similarly for cell I). In addition, each pyramidal cell (but not the inhibitory sheath) receives signals on its distal dendrites. Each dendrite segment acts separately on its own inputs ykt−1 , which come from other neurons in the same layer as well as other sublayers in the region (and from other regions in some cases). When a dendrite segment k has a sufficient distal overlap, exceeding a threshold λk , the segment emits a dendritic spike of size sk . The output of the distal dendrites is then given by: opred = X sk otk ≥λk The predictive potential is combined with the overlap score from the feedforward overlap coming from the proximal dendrite to give the total depolarisation rate: ∂Vj = αj offPj + βj opred Pj ∂t where αj and βj are parameters which transform the proximal and distal contributions into dj = a rate of change of potential (and also control the relative effects of feedforward and predictive inputs). For the inhibitory sheath I, there is only the feedforward component αI offI , but we assume this is larger than any of the feedforward contributions αj offPj for the pyramidal cells. Now, the time a neuron takes to reach firing threshold is inversely proportional to its depolarisation rate. This imposes an ordering of the set {P1 ..Pn , I} according to their (prospective) 13 firing times τPj = γP d1j (and τI = γI d1I ). Formation of the SDR in Transition Memory Zooming out from the single column to a neighbourhood (or sublayer) L1 of columns Cm , we see that there is a local sequence S in which all the pyramidal cells (and the inhibitory sheaths) would fire if inhibition didn’t take place. The actual sequence of cells which do fire can now be established by taking into account the effects of inhibition. Let’s partition the sequence as follows: S = Ppred k Ipred k Iff k Pburst k Ispread where: 1. Ppred is the (possibly empty) sequence of pyramidal cells in a highly predictive state, which fire before their inhibitory sheaths (ie Ppred = {P | τP < τIm , P ∈ Cm }); 2. Ipred is the sequence of inhibitory sheaths which fire due to triggering by their contained predictively firing neurons in Ppred - these cells fire in advance of their feedforward times due to inputs from Ppred ; 3. Iff is the sequence of inhibitory sheaths which fire as a result of feedforward input alone; 4. Pburst is the sequence of cells in columns where the inhibitory sheaths have just fired but their vertical inhibition has not had a chance to reach these cells (this is known as bursting) - ie Pburst = {P | τP < τIm + ∆τvert , P ∈ Cm }; 5. Finally, Ispread is the sequence of all the other inhibitory sheaths which are triggered by earlier-firing neighbours, which spreads a wave of inhibition imposing sparsity in the neighbourhood. Note that there may be some overlap in these sequences, depending on the exact sequence of firing and the distances between active columns. 14 1 3 2 4 time 5 7 6 8 9 10 11 12 13 Predictive Cell Fires Bursting Cell Fires 1-6 7-13 Inhibitory Sheath Fires Cascading Inhibition Figure 5: Schematic of SDR Formation by Inhibition. Top: A small slice of a CLA layer columns activated by prediction assistance (green), bursting due to feedforward input (orange), and inhibited (white). Bottom: Timeline (going downwards) showing activation and inhibition. The output of a sublayer is the SDR composed of the pyramidal cells from Ppred k Pburst in that order. We say that the sublayer has predicted perfectly if Pburst = ∅ and that the sublayer is bursting otherwise. The cardinality of the SDR is minimal under perfect prediction, with some columns having a sequence of extra, bursting cells otherwise. The bursting columns represent feedforward inputs which were well recognised (causing their inhibitory sheaths to fire quickly) but less well predicted (no cell was predictive enough to beat the sheath), and the number of cells firing indicates the uncertainty of which prediction corresponds to reality. The actual cells which get to burst are representative of the most plausible contexts for the unexpected input. Transmission and Reception of SDRs A sublayer L2 which receives this L1 SDR as input will first see the minimal SDR Ppred representing the perfect match of input and prediction, followed by the bursting SDR elements Pburst in decreasing order of prediction-reality match. 15 This favours cells in L2 which have learned to respond to this SDR, and even more so for the subset which are also predictive due to their own contextual inputs (this biasing happens regardless of whether the receiving cells are proximally or distally enervated). The more sparse (well-predicted) the incoming SDR, the more sparse the activation of L2 . When there is a bursting component in the SDR, this will tend to add significant (or overwhelming) extra signal to the minimal SDR, leading to high probability of a change in the SDR formed byL2 , because several cells inL2 will have a stronger feedforward response to the extra inputs than those which respond to the small number of signals in the minimal SDR. For example, in software we typically use layers containing 2,048 columns of 32 pyramidal neurons (64K cells), with a minimal column SDR of 40 columns (c. 2%). At perfect prediction, the SDR has 40 cells (0.06%), while total bursting would create an SDR of 1280 cells. In between, the effect is quite uneven, since each bursting column produces several signals, while all non-bursting columns stay at one. Assuming some locality of the mapping between L1 and L2 , this will have dramatic local effects where there is bursting. The response in L2 to bursting in its input will not only be a change in the columnar representation, but may also cause bursting in L2 itself if the new state was not well predicted using L2 ’s context. This will cause bursting to propagate downstream, from sublayer to sublayer (including cycles in feedback loops), until some sublayer can stop the cascade either by predicting its input or by causing a change in its external world which indirectly restores predictability. Since we typically do not see reverberating, self-reinforcing cycles of bursting in neocortex, we must assume that the brain has learned to halt these cascades using some combination of eventual predictive resolution and remediating output from regions. Note that each sublayer has its own version of ”output” in this sense - it’s not just the obvious motor output of L5 which can ”change the world”. For example, L6 can output a new SDR which it transmits down to lower regions, changing the high-level context imposed on those regions and thus the environment in which they are trying (and failing somewhat) to predict their own inputs. L6 can also respond by altering its influence over thalamic connections, thus mediating or eliminating the source of disturbance. L2/3 and L5 both send SDRs up to higher regions, which may be able to better handle their deviations from predictability. And of course L5 can cause real changes in the world by acting on motor circuits. 16 How is Self-Stabilisation Learned? When time is slowed down to the extent we’ve seen in this discussion, it is relatively easy to see how neurons can learn to contribute to self-stabilisation of sparse activation patterns in cortex. Recall the general principle of Hebbian learning in synapses - the more often a synapse receives an input within a short time before its cell fires, the more it grows to respond to that input. Consider again the sequence of firing neurons in a sublayer: S = Ppred k Ipred k Iff k Pburst k Ispread This sequence does not include the very many cells in a sublayer which do not fire at all, because they are contained either in columns which become active, but are not fast enough to burst, or more commonly they are in columns inhibited by a spreading wave from active columns. Let’s call this set Pinactive . A particular neuron will, at any moment, be a member of one of these sets. How often the cell fires depends on the average amount of time it spends in each set, and how often a cell fires characteristically for each set. Clearly, the highly predictive cells in Ppred will have a higher typical firing frequency than those in Pburst , while those in Pinactive have zero frequency when in that set. Note that the numbers used earlier (65536 cells, 40 cells active in perfect prediction, 1280 in total bursting) mean that the percentage of the time cells are firing on average is massively increased if they are in the predictive population. Bursting cells only fire once following a failure of prediction, with the most predictive of them effectively winning and firing if the same input persists. Some cells will simply be lucky enough to find themselves in the most predictive set and will strengthen the synapses which will keep them there. Because of their much higher frequency of firing, these cells will be increasingly hard to dislodge and demote from the predictive state. Some cells will spend much of their time only bursting. This unstable status will cause a bifurcation among this population. A portion of these cells will simply strengthen the right connections and join the ranks of the sparsely predictive cells (which will eliminate their column from bursting on the current inputs). Others will weaken the optimal connections in favour of some other combination of context and inputs (which will drop them from bursting to inactive on current inputs). The remainder, lacking the ability to improve to predictive and the attraction of an alternative set of inputs, will continue to form part of the short-lived bursting behaviour. 17 In order to compete with inactive cells in the same column, these metastable cells will have to have an output which tends to feed back into the same state which led to them bursting in the first place. Cells which get to fire (either predictively or by bursting) have a further advantage - they can specialise their sensitivity to feedforward inputs given the contexts which caused them to fire, and this will give them an ever-improving chance of beating the inhibitory sheath (which has no context to help it learn). This is another mechanism which will allow cells to graduate from bursting to predictive on a given set of inputs (and context). Since only active cells have any effect in neocortex, we see that there is an emergent drive towards stability and sparsity in a sublayer. Cells, given the opportunity, will graduate up the ladder from inactive to bursting to predictive when presented with the right inputs. Cells which fail to improve will be overtaken by their neighbours in the same column, and demoted back down towards inactive. A cell which has recently started to burst (having been inactive on the same inputs) will be reinforced in that status if its firing gives rise to a transient change in the world which causes its inputs to recur. With enough repetition, a cell will graduate to predictive on its favoured inputs, and will participate in a sparse, stable predictive pattern of activity in the sublayer and its region. The effect of its output will correspondingly change from a transient restorative effect to a self-sustaining, self-reinforcing effect. 4.4 Spatial/Columnar Interpretation of Transition Memory SDRs Since cells in each TM column share very similar feedforward response, we can just consider which columns contain active cells when presented with each input. This columnar SDR will be very similar to the SDR formed by the Pattern Memory alone (ie without prediction), differing only where the prediction has changed the outcome of the inhibition stage, favouring columns which have strongly predictive cells. The TM columnar SDR will be more invariant to occlusion or noise in the inputs, but will also potentially hallucinate some inputs as it causes the layer to see what is expected rather than what is actually seen. It is likely that this balance between error correction and hallucination is dynamically adjusted in real cortex. 5 Sequence Memory - High-Order Sequences A CLA layer which has multi-cell columns is capable of learning high-order sequences of feedforward input patterns, ie sequences in which the next input xt+1 can be predicted based on all 18 the observed patterns {xt−i |0 ≤ i ≤ k} for some k steps in the past, rather than just the current input xt . Thus, a layer which has seen the sequences ABCD and XBCY will correctly predict D after seeing ABC and Y after seeing XBC. To explain this important function, consider the columns representing B in the above sequences. In each column, one cell will have a distal dendrite segment which receives inputs representing A, and another will have learned to recognise a previous X. So, while (essentially) the same columns become active for both B’s, the active cells in each case will be different. Thus the TM activation encodes an entire sequence of patterns at every step. This chain of individual cell-level representations persists across multiple common inputs, such as BC in this example, allowing the CLA to correctly predict the D or X as appropriate. In addition, this allows the layer to distinguish between repeated patterns in a sequence, such as the S’s in M ISSISSIP P I, notes in music, or words in a sentence (eg 5 distinct repetitions of the word in have already appeared in this one). 6 Multiple levels of representation Note that a CLA layer is producing a number of representations of its inputs simultaneously, and these representations can be seen as nested one within another. CLA Layer Figure 6: A small slice of a CLA layer. Predicted columns in green, bursting columns in orange. Active cells in yellow. Columnar SDR The simplest and least detailed representation is the Columnar SDR, which is just a simple representation of the pattern currently seen by the layer. This is what you would 19 see if you looked down on the layer and just observed which columns had active cells.  N The number of patterns which can be represented is nSDR . In the typical software layer  2048 (2048 columns, 40 active), we can have 40 = 2.37178 ∗ 1084 SDRs. (See [Ahmad and Hawkins, 2015] for a detailed treatment of the combinatorics of SDRs). Column SDR Figure 7: The Columnar SDR from the previous CLA layer. Cellular SDR The cell-level SDR encodes both the Columnar SDR (if you ignore the choices of cells) and the context/sequence in which it occurred. We can produce a one-cell-per-column SDR by choosing the most predictive cell in each active column (and choose randomly in the case of bursting cells). In fact, this is how cells are chosen for learning in most implementations of CLA. Interestingly, the capacity of this SDR is very large. For every Columnar SDR (ie for each spatial input), there are nnSDR distinct contexts, if each column contains n cells. Again, in typical software, nSDR = 40, n = 32, so each feedforward input can appear in up to 1.60694 ∗ 1060 different contexts. Multiplying these, we get 3.8113 ∗ 10144 distinct Cellular SDRs. Predicted/Bursting Columnar SDR This more detailed SDR is composed of the sub-SDRs (or vectors) representing a) what was predicted and confirmed by reality and b) what was present in the input but not well-predicted. The layer’s combined output vector can thus be seen as the sum of two vectors - one representing the correctly predicted reality and the other a perpendicular prediction error vector: ySDR = ypred + yburst As we’ll see in the next section, this decomposition is crucial to the process of Temporal Pooling, in which a downstream layer can learn to stably represent a single representation by learning to recognise successive ypred vectors. 20 Predicted Columnar SDR Prediction Error Columnar SDR Figure 8: Columnar SDRs split into predicted (top) and prediction error (bottom) columnar SDRs Predicted/Bursting Cellular SDR This is the cellular equivalent of the previous SDR (equiv- alently the previous SDR is the column-level version of this one). This SDR encodes the precise sequence/context identity as well as the split between predicted and prediction error vectors. In addition, looked at columnwise, the error SDR is actually the union of all the vectors representing how the input and prediction differed, thus forming a cloud in the output space whose volume reflects the confusion of the layer. As noted earlier, the size, or `1 norm, of the Predicted/Bursting Cellular SDR varies dramatically with the relative number of predicted vs bursting columns. In a typical CLA software layer, 40 ≤ kySDR k`1 ≤ 1280, a 32x range. 21 Predicted Cellular SDR Bursting (Error) Cellular SDR Figure 9: Cellular SDRs for predicted input (top) and prediction error (bottom) Prediction-ordered SDR Sequences Even more detail is produced by treating the SDR as a sequence of individual activations, as we did earlier when deriving the sequence: S = Ppred k Pburst Each of the two subsequences is ordered by the activation levels of the individual cells, in decreasing order. Each thus represents a sequence of recognitions, with the most confident recognitions appearing earliest. 22 Predicted Sequence Prediction Error Sequence Figure 10: The SDR represented as a sequence for the predicted input (green) and the prediction error (orange). 7 Temporal Pooling: from single- to multi-layer models One well-understood aspect of the structure of the neocortex is the hierarchical organisation of visual cortex. The key feature of this hierarchy is that the spatial and temporal scale of receptive fields increases from low-level to high-level regions. 23 Figure 11: Schematic of cortical hierarchy. From [Byrne, 2015] Early versions of HTM resembled Artificial Neural Networks, or Deep Learning Networks, in having a single layer for each region in the hierarchy George and Hawkins [2009]. The current CLA as described in [Byrne, 2015] continues this design, modelling only a single layer, equivalent to Layer 2/3 in cortex in each region. The latest developments in HTM involve a new mechanism called Temporal Pooling, which models both Layer 4 and Layer 2/3. This section describes Temporal Pooling and its role in extracting hierarchical spatiotemporal information from sensory and sensorimotor inputs. 24 Inference (high-order) 4 Sequence memory: Inference (sensory-motor) 5 Sequence memory: Motor 6 Sequence memory: Attention Sensor data Feedback Sequence memory: Higher region Lower region Copy of motor commands Feed forward 2/3 Sub-cortical Motor centers Figure 12: Hawkins’ Multilayer Schematic Hawkins proposes that each layer is performing a similar task of learning sequences of its inputs, but with differences in the processing in each layer. For this discussion, the layers of interest are Layer 4, which receives direct sensorimotor feedforward input, and Layer 2/3, which receives as input the output of Layer 4, producing the representation which is passed up the hierarchy. The idea of Temporal Pooling is as follows. Layer 4 is receiving a stream of fast-changing sensorimotor inputs, and uses its Transition Memory to form predictions of the next input in the stream. If this succeeds, the sequence of SDRs produced in Layer 4 will each be a sparse set of predictive cells. Temporal Pooling cells in Layer 2/3 which have proximal synapses to many L4 cells in a particular sequence will then repeatedly become active as L4 evolves through the sequence, and will form a stable, slowly-changing representation of the sequence undergone by L4. 25 time t=1 t=2 t=3 t=4 Figure 13: Sketch of Temporal Pooling. Four successive snapshots are shown. Above each CLA Layer 4 slice is a proximal dendrite belonging to a Layer 2/3 cell which has learnt to temporally pool over this sequence in L4. The pooling cell is connected to 8 L4 cells (purple), which together provide between 2 and 4 active inputs (red arrows) each timestep in the sequence. The L2/3 cell will thus stay active while this sequence is predictable in L4. Learning in Temporal Pooling A simple extension of the Pattern Memory learning rule is sufficient to explain Temporal Pooling learning. Recall the original rule, the update model for the permanence of a synapse pi on neuron j is: (t+1) pi  (t)  (1 + δinc )pi = (1 − δdec )p(t) i   (t) pi (t) if j ∈ YSDR , (xj )i = 1 and pi ≥ θi (t) if j ∈ YSDR and ((xj )i = 0 or pi < θi ) otherwise 26 Temporal Pooling simply uses different values for δinc and δdec depending on whther the input is from a predictive or bursting neuron in L4. For predicted neurons, δinc is increased, and δdec is decreased, and for bursting neurons δinc is decreased and δdec is increased. This causes the pooling neuron to preferentially learn sequences of predicted SDRs in L4. Extension to Cycles and Trajectories in L4 Hawkins’ original description of Temporal Pooling Hawkins [2014] referred to sequences in L4, but since then it appears that his conception of L4 sequence memory involves low- or zeroorder memory rather than the long high-order sequences learned in the CLA we’ve already been describing. It is likely that real cortex exploits the spectrum of L4 sequence capacity in order to match the dynamics of each region’s sensory inputs. 8 Summary and Resources This theory aims to combine a reasonably simple abstraction of neocortical function with several key computational features which we believe are central to understanding both mammalian and artificial intelligence. Using a simple but powerful mathematical description of the paCLA algorithms, we can reason about their computational power and learning capabilities. This paper also provides a sound basis for extending the theory in new directions. Indeed, we are developing a new, multilayer model of neocortex based on the current work. Comportex [Andrews and Lewis, 2015] is an Open Source implementation of HTM/CLA which demonstrates most of the theory presented here, including both paCLA and Temporal Pooling. For other resources on HTM, we recommend the website of the open source community at Numenta.org [2015]. References and Notes Subutai Ahmad and Jeff Hawkins. Properties of Sparse Distributed Representations and their Application to Hierarchical Temporal Memory. arXiv:1503.07469 [q-bio.NC], Jul 2015. URL http://arxiv.org/abs/1503.07469. Felix Andrews and Marcus Lewis. Functionally composable cortex, an implementa27 tion of Hierarchical Temporal Memory, Sep 2015. URL https://github.com/ nupic-community/comportex. Github Repository. Fergal Byrne. Hierarchical Temporal Memory including HTM Cortical Learning Algo- rithms. Revision of Hawkins and Ahmad, 2011, Oct 2015. URL http://bit.ly/ htm-white-paper. Dileep George and Jeff Hawkins. Towards a mathematical theory of cortical micro-circuits. PLoS Comput Biol, 5(10):e1000532, 2009. doi: 10.1371/journal.pcbi.1000532. URL http: //bit.ly/george-2009. Jeff Hawkins. New ideas about temporal pooling. Wiki Page, Jan 2014. URL http://bit. ly/temporal-pooling. Jeff Hawkins and Subutai Ahmad. Hierarchical Temporal Memory including HTM Cortical Learning Algorithms. Hosted at Numenta.org, 2011. URL http://numenta.org/ resources/HTM_CorticalLearningAlgorithms.pdf. Wolfgang Maass. Networks of spiking neurons: the third generation of neural network models. Neural networks, 10(9):1659–1671, 1997. URL http://amath.kaist.ac.kr/ ˜nipl/am621/lecturenotes/spiking_neurons_2.pdf. Wolfgang Maass. On the computational power of winner-take-all. Neural Computation, 12 (11):2519–2535, 2015/09/19 2000. doi: 10.1162/089976600300014827. URL http:// dx.doi.org/10.1162/089976600300014827. Warren S McCulloch and Walter Pitts. A logical calculus of the ideas immanent in nervous activity. The bulletin of mathematical biophysics, 5(4):115–133, 1943. URL http:// bit.ly/mcculloch-pitts. Numenta.org. Numenta.org - Hierarchical Temporal Memory open source community, Sep 2015. URL http://numenta.org. Community Website. 28
9cs.NE
arXiv:1709.06502v1 [math.AC] 19 Sep 2017 RIESZ SPACE-VALUED STATES ON PSEUDO MV-ALGEBRAS ANATOLIJ DVUREČENSKIJ1,2 1 Mathematical Institute, Slovak Academy of Sciences Štefánikova 49, SK-814 73 Bratislava, Slovakia 2 Depart. Algebra Geom., Palacký Univer. 17. listopadu 12, CZ-771 46 Olomouc, Czech Republic E-mail: [email protected] Abstract. We introduce Riesz space-valued states, called (R, 1R )-states, on a pseudo MV-algebra, where R is a Riesz space with a fixed strong unit 1R . Pseudo MV-algebras are a non-commutative generalization of MV-algebras. Such a Riesz space-valued state is a generalization of usual states on MValgebras. Any (R, 1R )-state is an additive mapping preserving a partial addition in pseudo MV-algebras. Besides we introduce (R, 1R )-state-morphisms and extremal (R, 1R )-states, and we study relations between them. We study metrical completion of unital ℓ-groups with respect to an (R, 1R )-state. If the unital Riesz space is Dedekind complete, we study when the space of (R, 1R )states is a Choquet simplex or even a Bauer simplex. 1. Introduction The notion of a state is a basic one in the theory of quantum structures, see e.g. [DvPu]. It is an analogue of a finitely additive probability measure. MV-algebras as well as its non-commutative generalization, pseudo MV-algebras, introduced in [GeIo, Rac], form an important subclass of quantum structures. Mundici defined a notion of a state on an MV-algebra in [Mun2] as averaging the truth-value in Lukasiewicz logic. States on MV-algebras are studied very intensively last 10–15 years when many important results as an integral representation of states by regular σ-additive probability measures, [Kro, Pan], or the MV-algebraic approach to de Finetti’s notion of coherence, see [KuMu], have been established. Some applications of states on MV-algebras can be found in [RiMu]. In the last period, the so-called Riesz MV-algebras have been studied in the frames of MV-algebras, see [DiLe]. A prototypical example of Riesz MV-algebras is an interval in a unital Riesz space, when we use Mundici’s representation functor Γ, see [Mun1, CDM]. The converse is also true: For any Riesz MV-algebra M , there is a unital Riesz space (R, 1R ) such that M ∼ = Γ(R, 1R ), [DiLe, Thm 3]. Whereas MV-algebras are algebraic semantic of the Lukasiewicz logic, [Cha], Riesz MV-algebras are an extension of the Lukasiewicz logic: The propositional calculus 1 Keywords: MV-algebra, pseudo MV-algebra, state, state-morphism, unital Riesz space, (R, 1R )-state, extremal (R, 1R )-state, (R, 1R )-state-morphism, R-Jordan signed measure, Choquet simplex, Bauer simplex AMS classification: 06D35, 06C15 The paper has been supported by grant of the Slovak Research and Development Agency under contract APVV-16-0073, by the grant VEGA No. 2/0069/16 SAV and GAČR 15-15286S. 1 2 ANATOLIJ DVUREČENSKIJ that has Riesz MV-algebras as models is a conservative extension of Lukasiewicz infinite-valued propositional calculus, [DiLe]. Moreover, these structures have also several applications, among which we mention artificial neural networks, image compression, game theory, etc., see [ADG, KrMa]. Fuzzy logics with noncommutative conjunctions inspired by pseudo MV-algebras were studied in [Haj]. For more information about MV-algebras, see [CDM] and about states on MValgebras, see [Mun3], and for the most fresh survey on states on MV-algebras, see [FlKr]. States on pseudo MV-algebras have been studied in [Dvu1]. For pseudo MValgebras there is a basic representation by unital ℓ-groups not necessarily Abelian, [Dvu2], which generalizes Mundici’s representation of MV-algebras, see [Mun2]. A state on a pseudo MV-algebra is defined as an additive functional with nonnegative real values which at the top element of the MV-algebra attains the value 1. Whereas every MV-algebra (with 0 6= 1) admits at least one value, this is not a case for pseudo MV-algebras, because as it was shown in [Dvu1], there are stateless pseudo MV-algebras. Moreover, a pseudo MV-algebra admits at least one state if and only if the pseudo MV-algebra has at least one normal ideal that is also maximal. Therefore, every linearly ordered pseudo MV-algebras, representable pseudo MV-algebras or normal valued ones have at least one state. Riesz space-valued states on MV-algebras have been firstly introduced in [BDV] under the name generalized states. In the present paper, we introduce an (R, 1R )state on a pseudo MV-algebra as a mapping which attains values in the interval [0, 1R ] of the unital Riesz space (R, 1R ), where R is a Riesz space and 1R is a fixed strong unit of R, Section 3. Besides we introduce extremal (R, 1R )-states and (R, 1R )-state-morphisms as homomorphisms of pseudo MV-algebras into the interval [0, 1R ]. We show relations between them and we discuss when the latter two kinds of (R, 1R )-states coincide and when not. Whereas according to [Dvu1], there is a one-to-one correspondence among extremal states, state-morphisms and maximal ideals that are normal, respectively, we show that for (R, 1R )-states this is not a case, in general. We will study cases when (R, 1R ) is an Archimedean unital Riesz space or even a Dedekind complete unital Riesz space. In Section 4, we present metrical completion of a unital ℓ-group by an (R, 1R )-state. In Section 5, we introduce also R-measures and R-Jordan signed measures and we study situations when the (R, 1R )-state space is a simplex, or a Choquet simplex or even a Bauer simplex and when every (R, 1R )-state lies in the weak closure of the convex hull of extremal (R, 1R )-states. The paper is endowed with a couple of illustrating examples. 2. Pseudo MV-algebras and Riesz Spaces In the present section we gather basic notions and results on pseudo MV-algebras and Riesz spaces. Pseudo MV-algebras as a non-commutative generalization of MV-algebras were defined independently in [GeIo] as pseudo MV-algebras and in [Rac] as generalized MV-algebras. Definition 2.1. A pseudo MV-algebra is an algebra (M ; ⊕,− ,∼ , 0, 1) of type (2, 1, 1, 0, 0) such that the following axioms hold for all x, y, z ∈ M with an additional binary operation ⊙ defined via y ⊙ x = (x− ⊕ y − )∼ RIESZ SPACE-VALUED STATES (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) 3 x ⊕ (y ⊕ z) = (x ⊕ y) ⊕ z; x ⊕ 0 = 0 ⊕ x = x; x ⊕ 1 = 1 ⊕ x = 1; 1∼ = 0; 1− = 0; (x− ⊕ y − )∼ = (x∼ ⊕ y ∼ )− ; x ⊕ x∼ ⊙ y = y ⊕ y ∼ ⊙ x = x ⊙ y − ⊕ y = y ⊙ x− ⊕ x; x ⊙ (x− ⊕ y) = (x ⊕ y ∼ ) ⊙ y; (x− )∼ = x. We shall assume that 0 6= 1. If we define x ≤ y iff x− ⊕ y = 1, then ≤ is a partial order such that M is a distributive lattice with x ∨ y = x ⊕ (x∼ ⊙ y) and x ∧ y = x ⊙ (x− ⊕ y). We recall that a pseudo MV-algebra is an MV-algebra iff ⊕ is a commutative binary operation. As usually, we assume that ⊙ has higher binding priority than ∧ and ⊕, and ⊕ is higher than ∨. A non-void subset I of M is an ideal of M if (i) a ≤ b ∈ I implies a ∈ I, and (ii) if a, b ∈ I, then a ⊕ b ∈ I. The sets M and {0} are ideals of M . An ideal I 6= M of M is maximal if it is not a proper subset of any proper ideal of M . An ideal I of M is normal if a ⊕ I := {a ⊕ b : b ∈ I} = {c ⊕ a : c ∈ I} =: I ⊕ a for any a ∈ M . For basic properties of pseudo MV-algebras see [GeIo]. Pseudo MV-algebras are intimately connected with ℓ-groups. We remind that a po-group is a group (G; +, −, 0) written additively endowed with a partial order ≤ such that, for g, h ∈ G with g ≤ h we have a + g + b ≤ a + h + b for all a, b ∈ G. If the partial order ≤ is a lattice order, G is said to be an ℓ-group. The positive cone of a po-group G is the set G+ = {g ∈ G : 0 ≤ g}. A po-group G satisfies interpolation if, for x1 , x2 , y1 , y2 ∈ G with x1 , x2 ≤ y1 , y2 , there is an element z ∈ G such that x1 , x2 ≤ z ≤ y1 , y2 . An element u ≥ 0 is a strong unit of G if, given g ∈ G, there is an integer n ≥ 1 such that g ≤ nu. A couple (G, u), where G is an ℓ-group and u is a fixed strong unit of G, is said to be a unital ℓ-group. An ℓ-group G is (i) Archimedean if, for a, b ∈ G, na ≤ b for each integer n ≥ 1 implies a ≤ 0, (ii) Dedekind σ-complete if any sequence {gn } of elements of G that is bounded W from above by some element g0 ∈ G has supremum n gn ∈ G, and (iii) Dedekind complete if any family {gt : t ∈ T } of W elements of G which is bounded from above by some element g0 ∈ G has supremum t∈T gt ∈ G. An ℓ-ideal of an ℓ-group G is any ℓ-subgroup P of G such that a ∈ P and |a| ≤ |b| yield a ∈ P . Here |g| = g + + g − , g + = g ∨ 0 and g − = −(g ∧ 0) for each g ∈ G. For non-explained notions about ℓ-groups, please, consult e.g. [Fuc, Gla]. A prototypical example of pseudo MV-algebras is from ℓ-groups: If u is a strong unit of a (not necessarily Abelian) ℓ-group G, Γ(G, u) := [0, u] and x ⊕ y := (x + y) ∧ u, x− := u − x, x∼ := −x + u, x ⊙ y := (x − u + y) ∨ 0, then Γ(G, u) := ([0, u]; ⊕,− ,∼ , 0, u) is a pseudo MV-algebra [GeIo]. Conversely, for every pseudo MV-algebra M , there is a unique unital ℓ-group (G, u) (up to 4 ANATOLIJ DVUREČENSKIJ isomorphism of unital ℓ-groups) such that M ∼ = Γ(G, u), and there is a categorical equivalence between the category of pseudo MV-algebras and the category of unital ℓ-groups as it follows from the basic representation theorem [Dvu2] given by the functor (G, u) 7→ Γ(G, u). We define a partial operation, +, on M in such a way: x + y is defined in M iff x ⊙ y = 0, and in such a case, we set x + y := x ⊕ y. Using representation of pseudo MV-algebras by unital ℓ-groups, we see that the partial operation + coincides with the group addition restricted to M . The operation + is associative. We note, that if x ≤ y for x, y ∈ M , then there are two unique elements z1 , z2 ∈ M such that z1 + x = y = x + z2 . We denote them by z1 = y − x and z2 = −x + y, and using the group representation, − coincides with the group subtraction. Since + is associative, we say that a finite system (ai )ni=1 of M is summable if there is an element a = a1 + · · · + an ∈ M ; a is said to be the sum of (ai )ni=1 and the sequence (ai )ni=1 is said to be summable. Since there is a categorical equivalence between pseudo MV-algebras and unital ℓ-groups, [Dvu2], for the partial addition + on any pseudo MV-algebra the following form of the Riesz Decomposition property, called the strong Riesz Decomposition Property, RDP2 for short, holds: If for any a1 , a2 , b1 , b2 ∈ M such that a1 + a2 = b1 + b2 there are four elements c11 , c12 , c21 , c22 ∈ M such that a1 = c11 + c12 , a2 = c21 + c22 , b1 = c11 + c21 , b2 = c12 + c22 and c12 ∧ c21 = 0. It is derived from such a decomposition holding in ℓ-groups, see [Fuc, Thm V.1] and [DvVe1, DvVe2]. Equivalently, if a1 , . . . , am and b1 , . . . , bn are elements of a pseudo MV-algebra M such that a1 + · · ·+ am = b1 + · · ·+ bn , there is a system {cij : 1 ≤ i ≤ m, 1 ≤ j ≤ n} of elements of M satisfying ai = ci1 + · · · + cin , bj = c1j + · · · + cmj , (2.1) for all 1 ≤ i ≤ m, 1 ≤ j ≤ n, and (ci+1,j + · · · + cmj ) ∧ (ci,j+1 + · · · + cin ) = 0, i < m, j < n. (2.2) For any x ∈ M and any integer n ≥ 0, we define x0 = 1, xn+1 = xn ⊙ x, n ≥ 1, 0 ⊙ x = 0, (n + 1) ⊙ x = (n ⊙ x) ⊙ x, n ≥ 1, 0x = 0, (n + 1)x = nx + x, n ≥ 1, if nx + x exists in M. A real vector space R with a fixed partial order ≤ is a Riesz space if (i) R with respect to ≤ is an ℓ-group; (ii) f ∈ R+ implies af ∈ R+ for every real number a ≥ 0. A Riesz space R is Archimedean if it is Archimedean as an ℓ-group, analogously R is Dedekind σ-complete or Dedekind complete if so is R as an ℓ-group. We note that if R is Dedekind complete, then it is Dedekind σ-complete, and if R is Dedekind σ-complete then it is Archimedean. A Riesz ideal of R is any ℓ-ideal of R. We note that any Riesz ideal of R is a Riesz subspace of R. A unital Riesz space is a couple (R, 1R ) where R is a Riesz space and 1R is a fixed strong unit of R. Important examples of unital Archimedean Riesz spaces are spaces of real-valued functions on some topological space: Let T 6= ∅ be a compact Hausdorff topological space. We denote by C(T ) and Cb (T ) the system of all continuous real-valued functions of T and the system of all bounded real-valued functions on T , respectively. Then C(T ) and Cb (T ) are Archimedean Riesz spaces RIESZ SPACE-VALUED STATES 5 with respect to the partial order of functions f ≤ g iff f (t) ≤ g(t) for each t ∈ T . The function 1T defined by 1T (t) = 1 for each t ∈ T is a strong unit for both C(T ) and Cb (T ). Both spaces are closed under usual product of two functions, so that both spaces are Banach algebras. The space C(T ) has an important property: If T ′ is another non-void compact Hausdorff space, then there is an isomorphism of Riesz spaces between (C(T ), 1T ) and (C(T ′ ), 1T ′ ) preserving product of functions iff T and T ′ are homeomorphic, see [DuSc, Thm IV.6.26]. In addition, let T ′ = M(C(T )) denote the space of maximal ideals of C(T ). Under the hull-kernel topology, T ′ is homeomorphic to T and C(T ) and C(T ′ ) are isometric and isomorphic Riesz spaces, see [LuZa, Ex 45.7]. In the last period, there has appeared a class of important MV-algebras, Riesz MV-algebras, which are connected with Riesz spaces, for more details, see [DiLe]. We note that if (R, 1R ) is a unital Riesz space, then the MV-algebra Γ(R, 1R ) is a characteristic example of a Riesz MV-algebra. For Archimedean unital Riesz spaces there is a representation theorem by Yosida, see [Yos] or [LuZa, Thm 45.3]: Theorem 2.2. [Yosida Theorem] Let (R, 1R ) be an Archimedean unital Riesz space. Then there is a compact Hausdorff topological space T such that R can be embedded as a Riesz subspace into C(T ), the Riesz space of continuous real-valued functions on T , such that 1R maps to the constant function 1T , where 1T (t) = 1, t ∈ T . In addition, T can be chosen such that the image of the embedding of R into C(T ) is uniformly dense in C(T ), i.e. the uniform closure of the image of R is C(T ). We remind that there are nice topological characterizations, Nakano’s theorems, when the Riesz space C(T ) (T 6= ∅ compact and Hausdorff) is Dedekind σ-complete and Dedekind complete, respectively: (1) C(T ) is Dedekind σ-complete iff T is a basically disconnected space, that is, the closure of every open Fσ subset of T is open, see e.g. [Go, Cor 9.3], [LuZa, Thm 43.9]. (2) C(T ) is Dedekind complete iff T is extremally disconnected, that is, the closure of every open set of T is open, see [LuZa, Thm 43.11]. We note that the same characterizations hold also for the Riesz space Cb (T ) of bounded real-valued functions on T . General Dedekind σ-complete unital Riesz spaces are characterized as follows, see [LuZa, Thm 45.4]: Theorem 2.3. If (R, 1R ) is a Dedekind σ-complete Riesz space, then it is isomorphic to some (C(T ), 1T ), where T 6= ∅ is a compact basically disconnected Hausdorff topological space. In addition, if (R, 1R ) is even Dedekind complete, then T is extremally disconnected. In both cases, the space T can be chosen as the set of maximal ideals of R topologized by the hull-kernel topology. More about Riesz spaces can be found in [LuZa] and some information about representations of Archimedean Riesz spaces by systems of functions attaining also infinite values are in the survey [Fil]. 3. (R, 1R )-states on Pseudo MV-algebras In the present section, we define states on pseudo MV-algebras and then we define (R, 1R )-states as additively defined mappings on a pseudo MV-algebra M which preserve the partial addition + on M and have values in the interval [0, 1R ] 6 ANATOLIJ DVUREČENSKIJ of a unital Riesz space (R, 1R ) mapping the top element 1 ∈ M onto the strong unit 1R ∈ R. We introduce also extremal (R, 1R )-states, (R, 1R )-state-morphisms, and we show relationships between them. States, analogues of finitely additive measures, on pseudo MV-algebras were introduced in [Dvu1] as follows: Let M be a pseudo MV-algebra. A state on M is any real-valued mapping s : M → [0, 1] such that (i) s(1) = 1, and (ii) s(x + y) = s(x) + s(y) whenever x + y is defined in M . According to [Dvu1, Prop 4.1], if s is a state on M , then (i) s(0) = 0, (ii) s(a) ≤ s(b) if a ≤ b, (iii) s(x− ) = 1−s(x) = s(x∼ ), (iv) s(x= ) = s(x) = s(x≈ ), (v) s(x∨y)+ s(x∧y) = s(x)+ s(y) = s(x⊕ y)+ s(x⊙ y), (vi) s(x ⊕ y) = s(y ⊕ x). A state s is extremal if from s = λs1 + (1 − λ)s2 for states s1 , s2 on M and λ ∈ (0, 1) we have have s1 = s2 . Let S(M ) and S∂ (M ) denote the set of all states and extremal states, respectively, on M . It can happen that S(M ) = ∅, see [Dvu1, Cor 7.4], however, if M is an MV-algebra, M has at least one state, [Go, Cor 4.4]. We note that a pseudo MV-algebra possesses at least one state iff M has at least one maximal ideal that is also normal, see [Dvu1]. We say that a net {sα }α of states on M converges weakly to a states s if s(x) = limα sα (x) for each x ∈ M . Then S(E) and S∂ (M ) are either simultaneously the empty sets or non-void compact Hausdorff topological spaces, and due to the Krein–Mil’man Theorem, every state s on M is a weak limit of a net of convex combinations of extremal states. Now we extend the notion of a state to a Riesz space-valued mapping. Definition 3.1. Let 1R be a strong unit of a Riesz space R. An (R, 1R )-state on a pseudo MV-algebra M is any mapping s : M → [0, 1R ] such that (i) s(1) = 1R and (ii) s(x + y) = s(x) + s(y) whenever x + y is defined in M . An (R, 1R )-state-morphism on a pseudo MV-algebra M is any homomorphism of pseudo MV-algebras s : M → Γ(R, 1R ). We denote by R the group of real numbers. It is evident that any (R, 1)-state is a state on M . An (R, 1)-state-morphism on M is said to be a state-morphism. It is clear that any (R, 1R )-state-morphism is in fact an (R, 1R )-state on M . The converse is not true, in general. We can define also an (R, 1R )-state on every unital ℓ-group (G, u) as follows: It is a mapping s : G → R such that (i) s(g) ≥ 0 if g ≥ 0, (ii) s(g + h) = s(g) + s(h) for all g, h ∈ G, and (iii) s(u) = 1R . The restriction of any (R, 1R )-state on (G, u) onto the pseudo MV-algebra Γ(G, u) gives an (R, 1R )-state on Γ(G, u), and using the categorical equivalence between pseudo MV-algebras and unital ℓ-groups, see [Dvu2, Thm 6.4], every (R, 1R )-state on Γ(G, u) can be extended to a unique (R, 1R )-state on (G, u). It is worthy of recalling that if s is an (R, 1R )-state on Γ(S, 1S ), where (S, 1S ) is a unital Riesz space, then s(tx) = ts(x) for each x ∈ Γ(S, 1S ) and any real number t ∈ [0, 1]. Indeed, since s(x) = s(n n1 x) = ns( n1 x), i.e. s( n1 x) = n1 s(x). Then 1 1 m for each integer m = 0, 1, . . . , n, we have s( m n x) = s(m n x) = ms( n x) = n s(x). The statement is trivially satisfied if t = 0, 1. Thus let t ∈ (0, 1). There are two sequences of rational numbers {pn } and {qn } from the interval (0, 1) such that {sn } ր t and {qn } ց t which implies pn s(x) = s(pn x) ≤ s(tx) ≤ s(qn x) = qn s(x), so that s(tx) = ts(x). In addition, if s is an (R, 1R )-state on a unital Riesz space (S, 1S ), we can show that s(ta) = ts(a) for each a ∈ S and t ∈ R. Proposition 3.2. Let s be an (R, 1R )-state on a pseudo MV-algebra M . Then RIESZ SPACE-VALUED STATES 7 (i) s(0) = 0. (ii) If x ≤ y, then s(x) ≤ s(y), and s(y ⊙ x− ) = s(y) − s(x) = s(x∼ ⊙ y). s(x− ) = 1 − s(x) = s(x∼ ). s(x= ) = s(x) = s(x≈ ). s(x ∨ y) + s(x ∧ y) = s(x) + s(y). s(x ⊕ y) + s(x ⊙ y) = s(x) + s(y). s(x ⊕ y) ⊕ s(x ⊙ y) = s(x) ⊕ s(y). The kernel of s, Ker(s) := {x ∈ M : s(x) = 0}, is a normal ideal of M . [x] = [y] if and only if s(x) = s(x ∧ y) = s(y), where where [x] and [y] are the cosets in M/Ker(s) determined by x, y ∈ M . (x) There is a unique (R, 1R )-state s̃ on M/Ker(s) such that s̃([x]) = s(x) for each [x] ∈ M/Ker(s). (xi) s̃([x]) = 0 if and only if [x] = [0]. (xii) s(x⊕y) = s(y ⊕x) whenever R is an Archimedean Riesz space. In addition, M/Ker(s) is an Archimedean MV-algebra. (iii) (iv) (v) (vi) (vii) (viii) (ix) Proof. Assume M = Γ(G, u) for some unital ℓ-group (G, u). Properties (i)–(iv) follow directly from definition of pseudo MV-algebras and (R, 1R )-states. (v) It follows from equalities (x∨y)⊙ y − = (x∨y)− y = x− (x∧y) = x⊙ (x∧y)− which hold in the ℓ-group G and the pseudo MV-algebra M . (vi) It follows from the identity x = (x ⊕ y) ⊙ y − + (y ⊙ x), see [GeIo, Prop 1.25] and (ii). (vii) It follows from (vi) and from the identity r1 ⊕ r1 = (r1 + r2 ) ∧ 1R for r1 , r2 ∈ [0, 1R ]. (viii) If s(x), s(y) = 0, then by (vi), we have s(x ⊕ y) = 0. By (ii) we conclude Ker(s) is an ideal of M . To show that Ker(s) is normal, let a ∈ M and x ∈ Ker(s). Then s(a ⊕ x) = s(a) = s(x ⊕ a) and a ⊕ x = (a ⊕ x) ⊙ a− ⊕ a so that, s((a ⊕ x) ⊙ a− ) = 0. In a similar way, we prove that x ⊕ a = a ⊕ (a∼ ⊙ (x ⊕ a)) and a∼ ⊙ (x ⊕ a)) ∈ Ker(s). (ix) It is evident. (x) Let [x] ≤ [y]− . We define x0 = x ∧ y − . Then x0 ≤ y − and [x0 ] = [x ∧ y − ], so that s̃([x] + [y]) = s̃([x ⊕ y]) = s̃([x0 + y]) = s(x0 + y) = s(x0 ) + s(y) = s̃([x0 ]) + s̃([y]) = s̃([x]) + s̃([y]) which proves that s̃ is an (R, 1R )-state on M/Ker(s). By (ix), [x] = [y] implies s(x) = s(y). (xi) It follows from (ix). (xii) Due to (xi), s̃([x]) = 0 iff [x] = [0]. We claim that M/Ker(s) is an Archimedean pseudo MV-algebra. Indeed, let n[x] be defined in M/Ker(s) for any integer n ≥ 1. Then s̃(n[x]) = ns̃([x]) = n s(x) ≤ 1R for any n. Therefore, s̃([x]) = s(x) = 0. The Archimedeanicity of M/Ker(s) entails the commutativity of M/Ker(s), see [Dvu1, Thm 4.2]. Therefore, s(x ⊕ y) = s̃([x ⊕ y]) = s̃([x] ⊕ [y]) = s̃([y] ⊕ [x]) = s̃([y ⊕ x]) = s(y ⊕ x).  In the same way as for states, we can define extremal (R, 1R )-states. Let S(M, R, 1R ), SM(M, R, 1R ), and S∂ (M, R, 1R ) denote the set of (R, 1R )-states, 8 ANATOLIJ DVUREČENSKIJ (R, 1R )-state-morphisms and extremal (R, 1R )-states, respectively, on M . Analogously, we can define extremal (R, 1R )-states on unital ℓ-groups. In addition, using the categorical equivalence [Dvu2, Thm 6.4], if M = Γ(G, u), then an (R, 1R )state s on M is extremal iff the unique extension of s to an (R, 1R )-state on (G, u) is extremal and vice-versa, that is, an (R, 1R )-state on (G, u) is extremal iff its restriction to Γ(G, u) is extremal. Lemma 3.3. An (R, 1R )-state s on M is extremal if and only if s̃ is extremal on M/Ker(s). Proof. (1) Let s be extremal and let s̃ = λm1 + (1 − λ)m2 , where m1 , m2 are (R, 1R )-states on M/Ker(s) and λ ∈ (0, 1). Then si (x) := mi ([x]), x ∈ M , i = 1, 2, is an (R, 1R )-state on M , and s = λs1 + (1 − λ)s2 so that s1 = s2 and m1 = m2 proving s̃ is extremal. Conversely, let s̃ be extremal and let s = λs1 + (1 − λ)s2 for (R, 1R )-states s1 , s2 on M and λ ∈ (0, 1). Then Ker(s) = Ker(s1 ) ∩ Ker(s2 ). We assert that mi ([x]) := si (x), [x] ∈ M/Ker(s), is an (R, 1R )-state on M/Ker(s) for i = 1, 2. Indeed, first we show that mi is correctly defined. Thus let [x] = [y]. By (ix) of Proposition 3.2, we have s(x) = s(x ∧ y) = s(y) so that s(x ⊙ y − ) = 0 = s(y ⊙ x− ) which yields si (x ⊙ y − ) = 0 = si (y ⊙ x− ) and si (x) = si (x ∧ y) = si (y) for i = 1, 2. So that, we have mi ([x]) = mi ([y]). Therefore, mi is an (R, 1R )-state. Then s̃ = λm1 + (1 − λ)m2 implying m1 = m2 and s1 = s2 .  We note that it can happen that on M there is no (R, 1R )-state even for (R, 1R ) = (R, 1) as it was already mentioned. In the following proposition, we show that if M is an MV-algebra, then S(M, R, 1R ) is non-void. Proposition 3.4. Every MV-algebra has at least one (R, 1R )-state for every unital Riesz space (R, 1R ). Proof. Due to [Go, Cor 4.4], any MV-algebra M has at least one state; denote it by s0 . Then the mapping s : M → [0, 1R ] defined by s(x) := s0 (x)1R , x ∈ M , is an (R, 1R )-state on M .  The following result was established in [Dvu1] for states on MV-algebras. In the following proposition, we extend it for (R, 1R )-states. Proposition 3.5. Let (R, 1R ) be a unital Riesz space. The following statements are equivalent: (i) The pseudo MV-algebra M possesses at least one (R, 1R )-state. (ii) M has has at least one maximal ideal that is normal. (iii) M has at least one state. (1) Every linearly ordered pseudo MV-algebra possesses at least one (R, 1R )-state. The same is true if M is representable, i.e. it is representable as a subdirect product of linearly ordered pseudo MV-algebras. (2) If M is a linearly ordered pseudo MV-algebra and (R, 1R ) is an Archimedean unital Riesz space, then M possesses only a unique (R, 1R )-state. Proof. By [Dvu1, Prop 4.3], (ii) and (iii) are equivalent. (i) ⇒ (ii). Let s be an (R, 1R )-state on M . Since Γ(R, 1R ) is an MV-algebra, it has at least one state, say s0 . Then the mapping s0 ◦ s is a state on M , which by [Dvu1, Prop 4.3] means that M has at least one maximal ideal that is normal. RIESZ SPACE-VALUED STATES 9 (ii) ⇒ (i). Let I be a maximal ideal of M that is normal. By [Dvu1, Cor 3.5], M/I is an MV-algebra. Due to Proposition 3.4, M/I possesses at least one (R, 1R )state, say s0 . Then the mapping s(x) := s0 (x/I), x ∈ M , is an (R, 1R )-state on M. (1) Now suppose that M is linearly ordered. By [Dvu1, Prop 5.4], M possesses a unique maximal ideal and this ideal is normal. Applying just proved equivalences, M possesses an (R, 1R )-state. Q If M is representable, then it can be embedded into a direct product t Mt∈T of linearly ordered pseudo MV-algebras {Mt : t ∈ T }, i.e. there is an embedding Q of pseudo MV-algebras h : M → M such that πt ◦ h : M → Mt is a surjective t t Q homomorphism, where πt : t∈T Mt → Mt is the t-th projection for each t ∈ T . Every Mt possesses an (R, 1R )-state st , so that st ◦ πt ◦ h is an (R, 1R )-state on M . (2) Let M be linearly ordered and (R, 1R ) be an Archimedean unital Riesz space. By the Yosida Representation Theorem, Theorem 2.2, there is a compact Hausdorff topological space such that R can be embedded into the Riesz space C(T ) of continuous real-valued functions on T as its Riesz subspace. Given t ∈ T , define a mapping st : Γ(C(T ), 1T ) → [0, 1] defined by st (f ) = f (t), f ∈ Γ(C(T ), 1T ); it is a state on Γ(C(T ), 1T ). Due to (1) of the present proof, M admits at least one (R, 1R )-state. Let s1 , s2 be (R, 1R )-states on M . Then st ◦ si is a state on M for i = 1, 2 and each t ∈ T . According to [Dvu1, Thm 5.5], M admits only one state. Therefore, st ◦ s1 = st ◦ s2 for each t ∈ T , i.e. s1 = s2 .  For additional relationships between (R, 1R )-state-morphisms and their kernels as maximal ideals, see Propositions 3.20–3.21 below. We note that in (2) of the latter proposition, if (R, 1R ) is not Archimedean, then it can happen that M has uncountably many (R, 1R )-states and each of these states is an (R, 1R )-state-morphism, see Example 3.8 below. Proposition 3.6. (1) An (R, 1R )-state s on a pseudo MV-algebra M is an (R, 1R )state-morphism if and only if s(x ∧ y) = s(x) ∧ s(y), x, y ∈ M. (3.1) (2) An (R, 1R )-state s on M is an (R, 1R )-state-morphism if and only if the (R, 1R )state s̃ on M/Ker(s) induced by s is an (R, 1R )-state-morphism on M/Ker(s). Proof. (1) Assume that s is an (R, 1R )-state-morphism. Then s(x ∧ y) = s(x ⊙ (x− ⊕ y)) = s(x) ⊙ (s(x− ) ⊕ s(y)) = s(x) ∧ s(y). Conversely, let (3.1) hold. Then x ⊕ y = x + (x∼ ⊙ (x ⊕ y)) = x + (x∼ ∧ y), so that s(x⊕y) = s(x)+s(x∼ ∧y) = s(x)+(1R −s(x))∧s(y) = (s(x)+s(y))∧1R = s(x)⊕s(y) proving s is an (R, 1R )-state-morphism. (2) Using Proposition 3.2, we have s(x ∧ y) = s̃([x ∧ y]) = s̃([x] ∧ [y]). Applying (1), we have the assertion in question.  By [Dvu1, Prop 4.3], a state s on a pseudo MV-algebra M is a state-morphism iff Ker(s) is maximal. In what follows, we exhibit this criterion for the case of (R, 1R )-state-morphisms. Proposition 3.7. (1) Let s be an (R, 1R )-state on M . If Ker(s) is a maximal ideal of M , then s is an (R, 1R )-state-morphism. (2) In addition, let (R, 1R ) be a unital Riesz space such that every element of R+ \ {0} is a strong unit. If s is an (R, 1R )-state-morphism, then Ker(s) is a maximal ideal. 10 ANATOLIJ DVUREČENSKIJ Proof. (1) Assume Ker(s) is a maximal ideal of M . By [GeIo, (i) Prop 1.25], x ⊙ y − ∧ y ⊙ x− = 0 for all x, y ∈ M , that is [x] ⊙ [y]− ∧ [y] ⊙ [x]− = [0] and due to [Dvu1, Cor 3.5], M/Ker(s) is an Archimedean linearly ordered MV-algebra which entails either s(x ⊙ y − ) = 0 or s(y ⊙ x− ) = 0. In the first case we have 0 = s(x ⊙ y − ) = s(x ⊙ (x ∧ y)− ) = s(x) − s(x ∧ y). Similarly, 0 = s(y ⊙ x− ) entails s(y) − s(x ∧ y) = 0, i.e., s(x ∧ y) = min{s(x), s(y)} = s(x) ∧ s(y), which by Proposition 3.6 means that s is an (R, 1R )-state-morphism. (2) Let (R, 1R ) be a Riesz space such that every strictly positive element of R is a strong unit; then R is Archimedean. Let s be an (R, 1R )-state-morphism on M and let x ∈ M be an element such that s(x) 6= 0. Denote by Ker(s)x the ideal of M generated by Ker(s) and x. By [GeIo, Lem 3.4], Ker(s)x = {y ∈ M : y ≤ n ⊙ x ⊕ h for some n ≥ 1 and some h ∈ Ker(s)}. Let z be an arbitrary element of M . Since s(x) is a strong unit of R, there exists an integer n ≥ 1 such that s(z) < ns(x), so that s(z) ≤ n ⊙ s(x). Then s((n ⊙ x)∼ ⊙ z) = 0. Since z = (n⊙x)∧z⊕((n⊙x)∧z)∼ ⊙z = (n⊙x)∧z⊕(n⊙x)∼ ⊙z ≤ n⊙x⊕(n⊙x)∼ ⊙z, it proves that z ∈ Ker(s)x , consequently, M = Ker(s)x which shows that Ker(s) is a maximal ideal of M .  We notify that (2) of the preceding proposition follows directly from Theorem 3.12. We have left here the proof of (2) only to present different used methods. We note that if s is an (R, 1R )-state-morphism and (R, 1R ) is not Archimedean, then Ker(s) is not necessarily maximal as the following example shows. In addition, it can happen that every (R, 1R )-state is an (R, 1R )-state-morphism but not every (R, 1R )-state-morphism is extremal. → − Example 3.8. Let M = Γ(Z × Z, (1, 0)), where Z is the group of integers, R = → − R × R be the lexicographic product of the real line R with itself, and choose 1R = (1, 0). Then R is a linearly ordered Riesz space that is not Archimedean, and every element of the form (0, x), where x > 0, is strictly positive but no strong unit for R. The mapping s : M → [0, 1R ] defined by s(a, b) = (a, b) for (a, b) ∈ M is an (R, 1R )-state-morphism and Ker(s) = {(0, 0)} is an ideal that is not a maximal ideal of M because it is properly contained in the maximal ideal I = {(0, n) : n ≥ 0} which is a unique maximal ideal of M . In addition, M has uncountably many (R, 1R )-states, any (R, 1R )-state on M is an (R, 1R )-state-morphism, and there is a unique (R, 1R )-state having maximal kernel and it is a unique extremal (R, 1R )-state M . Proof. Let s be any (R, 1R )-state on M . Then s(0, 1) = (a, b) for some unique → − (a, b) ∈ Γ(R × R, (1, 0)), where a ≥ 0. Since s(0, n) = (na, nb) ≤ (1, 0), n ≥ 0, we have a = 0 and b ≥ 0. Therefore, s(1, −n) = (1, −nb). We denote this (R, 1R )state by sb . Hence, there is a one-to-one correspondence between (R, 1R )-states on M and the positive real axis [0, ∞) given by b 7→ sb , b ∈ [0, ∞). Then every (R, 1R )-state sb is an (R, 1R )-state-morphism, Ker(sb ) = {(0, 0)} for b > 0 which is an ideal of M but not maximal, and only s0 is an extremal (R, 1R )-state on M and Ker(s0 ) = {(0, n) : n ≥ 0} is a maximal ideal.  We note that in Example 3.17 and Proposition 3.18 we will show also cases of (R, 1R )-state-morphisms for an Archimedean Riesz space (R, 1R ) whose kernel is not maximal. RIESZ SPACE-VALUED STATES 11 We remind the following result from [Dvu1, Lem 4.4] which follows e.g. from [CDM, Prop 7.2.5]. Lemma 3.9. (i) Let G1 and G2 be two subgroups of (R; +) each containing a common non-zero element g0 . If there is an injective group-homomorphism φ of G1 into G2 preserving the order such that φ(g0 ) = g0 , then G1 ⊆ G2 and φ is the identity on G1 . If, in addition, φ is surjective, then G1 = G2 . (ii) Let M1 and M2 be two MV-subalgebras of the standard MV-algebra [0, 1]. If there is an MV-isomorphism ψ from M1 onto M2 , then M1 = M2 , and ψ is the identity. Theorem 3.10. Let (R, 1R ) be an Archimedean unital Riesz space. Let s1 , s2 be two (R, 1R )-state-morphisms on a pseudo MV-algebra M such that their kernels are maximal ideals of M and Ker(s1 ) = Ker(s2 ). Then s1 = s2 . Proof. Since R is an Archimedean Riesz space with a strong unit 1R , due to the Yosida Representation Theorem, Theorem 2.2, there is a compact Hausdorff topological space T 6= ∅ and an injective homomorphism of Riesz spaces φ : R → C(T ) with φ(1R ) = 1T , where (C(T ), 1T ) is the unital Riesz space of continuous realvalued functions on T . Then Mi := si (M ) are MV-subalgebras of the MV-algebra Γ(R, 1R ) for i = 1, 2. Define a mapping sit : φ(Mi ) → [0, 1] for each t ∈ T by sit (φ(si (x))) = (φ(si (x)))(t) for each t ∈ T . Then the mapping ŝit := sit ◦ φ ◦ si is a state-morphism on M , and Prop 4.3], each Ker(ŝit ) is a maximal T by [Dvu1, i ideal of M . Since Ker(si ) = t∈T Ker(ŝt ) and Ker(si ) ⊆ Ker(ŝit ) are also maximal ideals of M , we conclude that Ker(ŝ1t ) = Ker(s1 ) = Ker(s2 ) = Ker(ŝ2t ) for each t ∈ T which by [Dvu1, Prop 4.5] means that s1t = s2t for each t ∈ T . Then φ(s1 (x))(t) = φ(s2 (x))(t), t ∈ T , i.e. s1 = s2 .  We note that if (R, 1R ) is not Archimedean, then Theorem 3.10 is not necessarily valid, see Example 3.8. Proposition 3.11. Let I be a maximal and normal ideal of a pseudo MV-algebra M and let (R, 1R ) be a unital Riesz space. Then there is an (R, 1R )-state-morphism s such that Ker(s) = I. If, in addition, R is Archimedean, there is a unique (R, 1R )state-morphism s such that Ker(s) = I. Proof. Since M/I is by [Dvu1, Prop 3.4] an Archimedean linearly ordered MValgebra, it is isomorphic by Lemma 3.9 to a unique MV-subalgebra of Γ(R, 1); identify it with its image in R. Define a mapping s : M → R as follows: s(x) = x/I1R , x ∈ M . Then s is an (R, 1R )-state-morphism on M such that Ker(s) = I. Let, in addition, R be an Archimedean Riesz space. By Theorem 3.10, if s′ is another (R, 1R )-state-morphism on M with Ker(s′ ) = I, then s = s′ .  The following result says about a one-to-one correspondence between (R, 1R )states and states on pseudo MV-algebras for a special kind of Archimedean unital Riesz spaces. Theorem 3.12. Let (R, 1R ) be a unital Riesz space such that every strictly positive element of R is a strong unit for R. Given a state m on M , the mapping s(x) := m(x)1R , is an (R, 1R )-state on M . x ∈ M, 12 ANATOLIJ DVUREČENSKIJ Conversely, if s is an (R, 1R )-state on a pseudo MV-algebra M , there is a unique state ms on M such s(x) := ms (x)1R , x ∈ M. The mapping s 7→ ms is a bijective affine mapping from S(M ) onto S(M, R, 1R ). In addition, the following statements are equivalent: (i) (ii) (iii) (iv) s is an extremal (R, 1R )-state on M . s is an (R, 1R )-state-morphism on M . s(x ∧ y) = s(x) ∧ s(y), x, y ∈ M . s is an (R, 1R )-state-morphism on M if an only if ms is a state-morphism on M . Proof. First, we characterize Riesz spaces from the assumptions of the theorem: Since every strictly positive element of R is a strong unit, by [Go, Lem 14.1], R is a simple ℓ-group, i.e., the only ℓ-ideals of R are {0} and R. Therefore, the ideal {0} is a unique maximal ideal of Γ(R, 1R ), so that by Proposition 3.7(1) and Proposition 3.11, there is a unique state µ on Γ(R, 1R ), it is a state-morphism as well as an extremal state, so that, Ker(µ) = {0} and µ(a) = µ(b) for a, b ∈ Γ(R, 1R ) if and only if a = b. Now, let m be a state on M . Then the mapping s(x) := m(x)1R , x ∈ M , is trivially an (R, 1R )-state on M . This is true for each unital Riesz space. Conversely, let s be an arbitrary (R, 1R )-state on M . By the Yosida Theorem 2.2, there is a compact Hausdorff topological space T 6= ∅ such that the unital Riesz space (R, 1R ) can be injectively embedded into the unital Riesz space (C(T ), 1T ) of continuous functions on T as its Riesz subspace. If φ is this embedding, then (φ(R), 1R ) is a unital Riesz space whose every strictly positive element is a strong unit for φ(R). For any t ∈ T , let us define st : Γ(φ(R), 1T ) → [0, 1] by st (f ) := f (t), f ∈ Γ(φ(R), 1T ). Then each st is a state-morphism on Γ(φ(R), 1T ). Define a mapping ŝt : M → [0, 1] as ŝt = st ◦ φ ◦ s. Since every strictly positive element of φ(R) is a strong unit for it, by the above first note from the beginning of our proof, we conclude that st = st′ for all t, t′ ∈ T . Hence, ŝt = ŝt′ . Thus we denote by ŝ = ŝt0 for an arbitrary t0 ∈ T . Consequently, ŝ(x) is a constant function on T for each x ∈ M , and the range of ŝ is a linearly ordered set, therefore, the range of s(M ) is a linearly ordered set in R. If we define ms (x) := st0 (φ(s(x))), x ∈ M , then ms is a state on M . Consequently, s(x) := ms (x)1R , x ∈ M . Now it is clear that the mapping Φ : S(M, R, 1R ) → S(M ) defined by Φ(s) := ms , s ∈ S(M, R, 1R ), is a bijective affine mapping. Due to this bijective affine mapping Φ, we see that in view of [Dvu1, Prop 4.7], statements (i)–(iv) are mutually equivalent.  We note that the results of the precedent theorem are not surprising because if (R, 1R ) is a unital Riesz space, whose every strictly positive element is a strong unit for R, then (R, 1R ) ∼ = (R, 1). Indeed, since every ℓ-ideal of R is also a Riesz ideal of R and vice versa (this is true for each Riesz space), then {0} is a unique proper Riesz ideal of R, see [Go, Lem 14.1], therefore, it is maximal, and since R is Archimedean, by the proof of the Yosida Representation Theorem, see [LuZa, Chap 45], T is in RIESZ SPACE-VALUED STATES 13 fact the set of maximal Riesz ideals of (R, 1R ) which is topologized by the hullkernel topology and in our case, T is a singleton. Consequently, (R, 1R ) ∼ = (R, 1), and we can apply [Dvu1, Prop 4.7]. In the next proposition we show that if every strictly positive element of a unital ℓ-group (G, u) is a strong unit for G and (R, 1R ) is Archimedean, then M = Γ(G, u) possesses a unique (R, 1R )-state. Proposition 3.13. Let M = Γ(G, u) and every non-zero element of M be a strong unit for G. Then every (R, 1R )-state s on M is an (R, 1R )-state-morphism for every unital Riesz space (R, 1R ), Ker(s) is a maximal ideal of M , M is an MValgebra, and S(M, R, 1R ) 6= ∅. If, in addition, (R, 1R ) is an Archimedean unital Riesz space, then |S(M, R, 1R )| = 1. Proof. The hypotheses imply that M is Archimedean, and by [Dvu2, Thm 4.2], M is an MV-algebra. Whence, every strictly positive element of G is a strong unit of G, where (G, u) is a unital ℓ-group such that M ∼ = Γ(G, u). Therefore, (G, u) is an Abelian unital ℓ-group. By [Go, Lem 14.1], G is a simple ℓ-group, so that G has a unique proper ℓ-ideal, namely the zero ℓ-ideal. Then {0} is a unique maximal ℓ-ideal of M . Hence, by Proposition 3.4, M possesses an (R, 1R )-state for every unital Riesz space (R, 1R ). Let s be an (R, 1R )-state on M . Since Ker(s) 6= M , Ker(s) = {0}, and hence Ker(s) is a maximal ideal of M . By Proposition 3.7(1), s is an (R, 1R )-statemorphism on M . Now let (R, 1R ) be an Archimedean unital Riesz space. Let s1 and s2 be (R, 1R )states on M . Then s := 1/2s1 + 1/2s2 is also an (R, 1R )-state on M and in view of the first part of the present proof, s, s1 , s2 are (R, 1R )-state-morphisms such that Ker(s) = Ker(s1 ) = Ker(s2 ) = {0} are maximal ideals of M , which by Theorem 3.10 yields s1 = s = s2 . In particular, the unique (R, 1R )-state on M is extremal.  Proposition 3.14. Let T be a non-void set and R = Cb (T ) be the Riesz space of bounded real-valued functions on T , and let 1T be the constant function 1T (t) = 1, t ∈ T . Then 1R = 1T is a strong unit for R. Let s be an (R, 1R )-state on a pseudo MV-algebra M . The following statements are equivalent: (i) s is an extremal (R, 1R )-state on M . (ii) s is an (R, 1R )-state-morphism on M . (iii) s(x ∧ y) = s(x) ∧ s(y), x, y ∈ M . In addition, S∂ (M, R, 1R ) = SM(M, R, 1R ). (3.2) Proof. (i) ⇒ (ii). Let s be an extremal (R, 1R )-state on M . If we define an MValgebra Γ(R, 1R ), then every mapping st : Γ(R, 1R ) → [0, 1] defined by st (f ) = f (t), f ∈ Γ(R, 1R ), is a state-morphism on Γ(R, 1R ). We assert that st ◦ s is an extremal state on M for each t ∈ T . Indeed, let mt1 , mt2 be states on M and λ ∈ (0, 1) such that st ◦ s = λmt1 + (1 − λ)mt2 . Define a function mi : M → [0, 1R ] such that (mi (x))(t) = mti (x) for t ∈ T where x ∈ M and i = 1, 2. Then m1 (x), m2 (x) ∈ Cb (T ) for each x ∈ M , so that m1 , m2 are (R, 1R )-states on M such that s = λm1 + (1 − λ)m2 . Since s is extremal, s = s1 = s2 which gives st ◦ s = mt1 = mt2 for each t ∈ T , and st ◦ s is an extremal state on M . By [Dvu1, Prop 4.7], st ◦ s is a state-morphism on M , therefore, st (s(x ∧ y)) = min{st (s(x)), st (s(y))}, that is s(x ∧ y) = s(x) ∧ s(y) for all x, y ∈ M and s is an (R, 1R )-state morphism, see Proposition 3.6. 14 ANATOLIJ DVUREČENSKIJ (ii) ⇒ (i). Let s be an (R, 1R )-state-morphism on M and let s1 , s2 be (R, 1R )states on M such that s = λs1 + (1 − λ)s2 for some λ ∈ (0, 1). Let st be a state-morphism from the foregoing implication for every t ∈ T . Then st ◦ s = λst ◦ s1 + (1 − λ)st ◦ s2 . Applying [Dvu1, Prop 4.7], we have st ◦ s is an extremal state because st ◦ s is a state-morphism on M . Therefore, st ◦ s = st ◦ s1 = st ◦ s2 for each t ∈ T which in other words means that s = s1 = s2 , that is, s is an extremal (R, 1R )-state on M . The equivalence of (ii) and (iii) was established in Proposition 3.6. Equation (3.2) follows from the equivalence of (i) and (ii).  Corollary 3.15. Let (R, 1R ) = (Rn , 1Rn ), n ≥ 1, where 1R = (1, . . . , 1), and let s be an (R, 1R )-state on a pseudo MV-algebra M . The following statements are equivalent: (i) s is an extremal (R, 1R )-state on M . (ii) s is an (R, 1R )-state-morphism on M . (iii) s(x ∧ y) = s(x) ∧ s(y), x, y ∈ M . Moreover, (3.2) holds. Proof. It follows from Proposition 3.14 because (Rn , 1Rn ) ∼ = (Cb (T ), 1T ), where |T | = n.  The latter result extends a characterization of state-morphisms and extremal states from [Dvu1, Prop 4.7], because if T is a singleton, then (C(T ), 1T ) corresponds in fact to (R, 1). Theorem 3.16. Let (R, 1R ) be an Archimedean unital Riesz space, M a pseudo MV-algebra, and s, s1 , s2 be (R, 1R )-states on M . (1) If s is an (R, 1R )-state-morphism on M , then s is an extremal (R, 1R )-state. (2) If s is an (R, 1R )-state such that Ker(s) is a maximal ideal, then s is an (R, 1R )-state-morphism and an extremal (R, 1R )-state on M as well. (3) Let s1 , s2 be (R, 1R )-states on M such that Ker(s1 ) = Ker(s2 ) and Ker(s1 ) is a maximal ideal. Then s1 and s2 are (R, 1R )-state-morphisms and extremal (R, 1R )-states such that s1 = s2 . (4) Let s be an (R, 1R )-state on M such that Ms = M/Ker(s) is linearly ordered. Then s is an (R, 1R )-state-morphism and an extremal (R, 1R )-state, and Ker(s) is a maximal ideal of M . Proof. (1) Due to the Yosida Representation Theorem 2.2, there is a compact Hausdorff topological space T 6= ∅ such that (R, 1R ) can be embedded into (C(T ), 1T ) as its Riesz subspace; let φ be the embedding. For each t ∈ T , the function st : Γ(C(T ), 1T ) → [0, 1] defined by st (f ) := f (t), f ∈ C(T ), is a state-morphism on Γ(C(T ), 1T ) for each t ∈ T . Then the mapping mt := st ◦ φ ◦ s is a statemorphism on M , so that by [Dvu1, Prop 4.7], mt is an extremal state on M . Let s = λs1 + (1 − λ)s2 , where s1 , s2 are (R, 1R )-states on M and λ ∈ (0, 1). Then mt = st ◦ φ ◦ s = λst ◦ φ ◦ s1 + (1 − λ) ◦ φs2 , which implies mt = st ◦ φ ◦ s1 = st ◦ φ ◦ s2 for each t ∈ T . Hence, φ(s(x)) = φ(s1 (x)) = φ(s2 (x)) for every x ∈ M , that is s(x) = s1 (x) = s2 (x), and finally s = s1 = s2 . RIESZ SPACE-VALUED STATES 15 (2) Let s be an (R, 1R )-state on M such that Ker(s) is a maximal ideal. By Proposition 3.7, s is an (R, 1R )-state-morphism which by the first part of the present proof entails s is extremal. (3) Let s1 , s2 be (R, 1R )-states on M such that Ker(s1 ) = Ker(s2 ) and Ker(s1 ) is a maximal ideal. By (2), s1 and s2 are extremal, and by Proposition 3.7, s1 and s2 are also (R, 1R )-state-morphisms on M , so that Theorem 3.10 implies s1 = s2 . (4) Assume Ms is linearly ordered. By Proposition 3.2(xii), Ms is an MVsubalgebra of the standard MV-algebra Γ(R, 1) of the real line R. Then, for the (R, 1R )-state s̃ on M/Ker(s) = Ms induced by s, we have Ker(s̃) = {0} is a maximal ideal of Ms and Ker(s) is a maximal ideal of M . Hence, there is a subgroup R0 of R such that 1 ∈ R0 and Ms ∼ = Γ(R0 , 1). Then there is a unique state-morphism (= extremal state in this case) m on Ms . The mapping s0 (x) := m(x)1R for each x ∈ M is an (R, 1R )-state-morphism on M . Since R0 is a simple ℓ-group, applying Proposition 3.13, we have s = s0 and s is an (R, 1R )-state-morphism and an extremal (R, 1R )-state on M , as well.  By [Dvu1, Prop 4.3], a state s on a pseudo MV-algebra is a state-morphism iff Ker(s) is a maximal ideal. In the following example and proposition we show that it can happen that an (R, 1R )-state-morphism s, consequently an extremal (R, 1R )state, has the kernel Ker(s) that is not maximal even for an Archimedean Riesz space (R, 1R ). We note that in Example 3.8 we had an analogous counterexample for a non-Archimedean Riesz space. Example 3.17. There are a pseudo MV-algebra M , an Archimedean unital Riesz space (R, 1R ), and an (R, 1R )-state-morphism s on M , consequently an extremal (R, 1R )-state, such that Ker(s) is not maximal. Proof. Let (R, 1R ) = (Rn , 1Rn ), M = Γ(Rn , 1Rn ) and s : M → [0, 1Rn ] be such that s(x) = x, x ∈ M . Then s is an (R, 1R )-state-morphism, and by Theorem 3.16(1) it is an extremal (R, 1R )-state. Because Ker(s) = {0}, then Ker(s) is a maximal ideal of M iff n = 1.  According to [GeIo], we say that an element e of a pseudo MV-algebra M is Boolean if e ∧ e− = 0, equivalently, e ∧ e∼ = 0, equivalently e ⊕ e = e. Let B(M ) be the set of Boolean elements, then B(M ) is a Boolean algebra that is an MV-algebra and subalgebra of M , and e− = e∼ ; we put e′ = e− . If s is an (R, 1R )state-morphism and e is a Boolean element of M , then s(e) is a Boolean element of the MV-algebra Γ(R, 1R ). We recall that for a sequence (ai )ni=1 of Boolean elements of M we have that it is summable iff ai ∧ aj = 0 for i 6= j; in such a case, a1 + · · · + an = a1 ∨ · · · ∨ an . If we say that for an ordered finite system (a1 , . . . , an ) of Boolean elements of M we assume that a1 + · · · + an = 1, it can happen that some of ai are zeros. We exhibit the latter example in more details. We note that the MV-algebra Γ(Rn , 1Rn ) has each ideal I of M of the form I = I1 × · · · × In , where Ii ∈ {{0}, R} for each i = 1, . . . , n. In particular, all maximal ideals are of the form I1 × · · · × In where exactly one Ii = {0} and Ij = R for j 6= i. Proposition 3.18. Let M = Γ(Rn , 1Rn ), (R, 1R ) = (Rn , 1Rn ), and let B(M ) be the set of Boolean elements of M . 16 ANATOLIJ DVUREČENSKIJ (1) Let (a1 , . . . , an ) be an n-tuple of summable elements of B(M ) such 1. Then the mapping s(x) = x1 a1 + · · · + xn an , x = (x1 , . . . , xn ) ∈ M, Pn i=1 ai = (3.3) n n is both an (R , 1Rn )-state-morphism and an extremal (R , 1Rn )-state on M as well. Conversely, each (Rn , 1Rn )-state-morphism on M can be obtained in this way. (2) If σ is an arbitrary permutation of the set {1, . . . , n}, then sσ (x1 , . . . , xn ) = (xσ(1) , . . . , xσ(n) ), x = (x1 , . . . , xn ) ∈ M , is an (R, 1R )-state-morphism such that Ker(sσ ) = {0}. If s0 (x) = x, x ∈ M , s0 is an (R, 1R )-state-morphism on M corresponding to the identical permutation. Conversely, every (Rn , 1Rn )-state-morphism s on M such that Ker(s) = {0} can be obtained in this way. In addition, S(M, R, 1R ) = S∂ (M, R, 1R ) = {s0 } = SM(M, R, 1R ). (3) For each i = 1, . . . , n, let πi be the i-th projection from M onto [0, 1]. Then each si , where si (x) = πi (x)1Rn , x ∈ M , is an (Rn , 1Rn )-state-morphism such that Ker(si ) is a maximal ideal of M , and conversely, every (Rn , 1Rn )-state-morphism on M whose kernel is a maximal ideal of M is of this form. (4) |S∂ (M, Rn , 1Rn )| = nn = |SM(M, Rn , 1Rn )| and S(Rn , 1Rn ) = Con(S∂ (Rn , 1Rn )) = Con(SM(Rn , 1Rn )), where Con denotes the convex hull. Proof. Since the Archimedean unital Riesz space (Rn , 1Rn ) satisfies the conditions of Corollary 3.15, we have that S∂ (M, Rn , 1Rn ) = SM(M, Rn , 1Rn ). For each i = 1, . . . , n, let ei be the vector of M whose all coordinates are zeros, only at the i-th place there is 1. The elements e1 , . . . , en are unique atoms of the Boolean algebra B(M ) and e1 + · · · + en = 1. The set of Boolean elements of M has 2n elements, and each Boolean element of M is a vector e ∈ M whose coordinates are only 0 and 1. Let s0 (x) = x, x ∈ M . If n = 1, then S∂ (M, R, 1R ) = {s0 }. (1) Let (a1 , . . . , an ) be a summable sequence of Boolean elements of M such that a1 + · · · + an = 1. We define a mapping s by (3.3). Then it is clear that s is an (Rn , 1Rn )-state on M . To show that s is also an (Rn , 1Rn )-state-morphism, we verify the criterion (iii) of Corollary 3.15. Let x = (x1 , . . . , xn ) ∈ M and y = (y1 , . . . , yn ) ∈ M . Then x ∧ y = (x1 ∧ y1 , . . . , xn ∧ yn ). Therefore, s(x) ∧ s(y) = (x1 a1 + · · · + xn an ) ∧ (y1 a1 + · · · + yn an ) = (x1 a1 ∨ · · · ∨ xn an ) ∧ (y1 a1 ∨ · · · ∨ yn an ) = (x1 ∧ y1 )a1 + · · · + (xn ∧ yn )an = s(x ∧ y), when we have used the fact that in ℓ-groups if, for a, b ∈ G+ , a ∧ b = 0, then a + b = a ∨ b. Consequently, s is an (Rn , 1Rn )-state-morphism on M . Conversely, let n ≥ 2 and let s be an (Rn , 1Rn )-state-morphism on M . We define s fi = s(ei ). For i = 1, we have s(1, 0, . . . , 0) = s(n/n, 0, . . . , 0) = ns(1/n, 0, . . . , 0) so that f1s /n = s(1/n, 0, . . . , 0). Now let 0 ≤ m ≤ n. Then s(m/n, 0, . . . , 0) = s ms(1/n, 0, . . . , 0) = m n f1 . Now let t be a real number from (0, 1). Passing to two monotone sequences of rational numbers {pn } ր t and {qn } ց t, we obtain pn s(1, 0, . . . , 0) ≤ s(t, 0, . . . , 0) ≤ qn s(1, 0, . . . , 0), so that s(t, 0, . . . , 0) = tf1s . RIESZ SPACE-VALUED STATES 17 The same is true for each i, i.e. s(0, . . . , t, . . . , 0) = tfis . Hence, for each x = (x1 , . . . , xn ) ∈ M , we have n X xi fis . (3.4) s(x) = i=1 From (3.4) we see that if we put ai = fis for each i = 1, . . . , n, then we obtain formula (3.3). (2) Assume Ker(s) = {0}. Then each fis 6= 0 and all fis ’s are mutually different. Since 1Rn = f1s + · · · + fns , we assert that each fis ∈ {e1 , . . . , en }. Indeed, if some fis has two coordinates equal 1, then one of fjs for j 6= i has to be zero. Therefore, for each fis , there is a unique eji such that fis = eji . This defines a permutation σ such that s = sσ . Conversely, each sσ is an (Rn , 1Rn )-state-morphism, consequently an extremal (Rn , 1Rn )-state whose kernel is {0}. (3) Now we exhibit (Rn , 1Rn )-state-morphisms s whose kernel is a maximal ideal of M . It is easy to verify that every s1 , . . . , sn defined in the proposition is an (Rn , 1Rn )-state-morphism on M whose kernel is a maximal ideal. Conversely, let s be an (Rn , 1Rn )-state-morphism on M such that Ker(s) is a maximal ideal. From (3.3) we conclude, that there is a unique i = 1, . . . , n such that ai = 1 and aj = 0 for each j 6= i which entails the result. (4) Let τ : {1, . . . , n} → {1, . . . , n}, i.e. τ ∈ {1, . . . , n}{1,...,n} . Then the mapping sτ : M → [0, 1Rn ] defined by sτ (x1 , . . . , xn ) = (xτ (1) , . . . , xτ (n) ), x = (x1 , . . . , xn ) ∈ M , is an (Rn , 1Rn )-state-morphism on M . Since every ai for i = 1, . . . , n is a finite sum of some Boolean elements of e1 , . . . , en , using (3.3), we see that every (Rn , 1Rn )-state-morphism on M is of this form. Finally, we say that a net {sα }α of (Rn , 1Rn )-states on M converges weakly to an w n (R , 1Rn )-state s, and we write {sα }α → s, if, for each i = 1, . . . , n, limα πi (sα (x)) = πi (s(x)) for each x ∈ M . Since πi ◦ s is in fact a state on M , it is easy to see that we have the weak convergence of states on M which gives a compact Hausdorff topology on the state space of M . Whence if, for some net {sα }α of (Rn , 1Rn )states, we have that there is, for each i = 1, . . . , n, limα πi (sα (x)) = si (x), x ∈ M , then every si is a state on M , so that s(x) := (s1 (x), . . . , sn (x)), x ∈ M , is an w (Rn , 1Rn )-state such that {sα }α → s. Consequently, the space S(M, Rn , 1Rn ) is a non-void convex compact Hausdorff space, so that by the Krein–Mil’man theorem, [Go, Thm 5.17], we see that every (Rn , 1Rn )-state lies in the weak closure of the convex hull of S∂ (M, Rn , 1Rn ) = SM(M, Rn , 1Rn ). Since the space SM(M, Rn , 1Rn ) has exactly nn elements, let SM(M, Rn , 1Rn ) = {s1 , . . . , snn }, so that every element s of Con(SM(M, Rn , 1Rn )) is of the form s = λ1 s1 + · · · + λnn snn , where each α λj ∈ [0, 1] and λ1 + · · · + λnn . Hence, there is a net {λα 1 s1 + · · · + λnn }α from the n n convex hull which converges weakly to the (R , 1R )-state s. In addition, for each α αβ i = 1, . . . , nn , there is a subnet {λi β }β of the net {λα = λi . i }α such that limβ λi Whence λ1 +· · ·+λnn = 1 and s = λ1 s1 +· · ·+λnn λnn which finishes the proof.  A more general type of the weak convergence of (R, 1R )-states for a Dedekind σ-complete Riesz space will be studied in Proposition 5.3 below. The latter proposition can be extended for (Rm , 1Rm )-state-morphisms on the MV-algebra Mn = Γ(Rn , 1Rn ) for all integers m, n ≥ 1. Proposition 3.19. Let n, m ≥ 1 be integers and let (a1 , . . . , an ) be a summable sequence of Boolean elements from Mm = Γ(Rm , 1Rm ). Then the mapping s(x) := 18 ANATOLIJ DVUREČENSKIJ x1 a1 + · · · + xn an , x = (x1 , . . . , xn ) ∈ Mn , is an (Rm , 1Rm )-state-morphism on Mn , and conversely, each (Rm , 1Rm )-state-morphism on Mn can be described in this way. Equivalently, let τ be any mapping from {1, . . . , m} into {1, . . . , n}. Then the mapping sτ (x1 , . . . , xn ) = (xτ (1) , . . . , xτ (m) ), x = (x1 , . . . , xn ) ∈ Mn , is is an (Rm , 1Rm )-state-morphism on Mn , and conversely, each (Rm , 1Rm )-state-morphism on Mn can be described in this way. In particular, |SM(Mn , Rm , 1Rm )| = nm = |S∂ (Mn , Rm , 1Rm )|. An (Rm , 1Rm )-state-morphism s on Mn has maximal kernel if and only if there is i = 1, . . . , n such that s(x) = πi (x)1Rm , x ∈ Mn , where πi : Rn → R is the i-th projection. Proof. The proof follows methods of the proof of Proposition 3.18.  Now we present a criterion for (R, 1R ) when the kernel of every (R, 1R )-statemorphism on an arbitrary pseudo MV-algebra is a maximal ideal. Proposition 3.20. Let (R, 1R ) be a unital Riesz space. Then every (R, 1R )-statemorphism on an arbitrary pseudo MV-algebra has the kernel a maximal ideal if and only if (R, 1R ) is isomorphic to (R, 1). Proof. Let (R, 1R ) ∼ = (R, 1) and let M be an arbitrary pseudo MV-algebra. Let s be an (R, 1R )-state-morphism on M . According to [Dvu1, Prop 4.3], Ker(s) is a maximal ideal of M . Conversely, let M be an arbitrary pseudo MV-algebra with an (R, 1R )-statemorphism s such that Ker(s) is a maximal ideal of M . Take the special MV-algebra M = Γ(R, 1R ) and let s(x) = x, x ∈ M . Then clearly s is an (R, 1R )-statemorphism with Ker(s) = {0}, and by the assumption, Ker(s) = {0} is a maximal ideal of M . Therefore, M has only the zero ideal and M . Due to the categorical equivalence of Abelian unital ℓ-groups and MV-algebras, the Riesz space (R, 1R ) has only two ℓ-ideals, {0} and R which by [Go, Lem 14.1] yields that every strictly positive element of R is a strong unit of R. As it was shown just after Theorem 3.12, this means that (R, 1R ) ∼ = (R, 1). The same result we obtain if take into account that the ℓ-ideal {0} of R is a maximal ℓ-ideal of R generated by Ker(s). Therefore, R ∼ = R/{0} and the quotient unital Riesz space (R/{0}, 1R/{0}) can be identify with a unital subgroup (R0 , 1) of (R, 1). Since α = α1 ∈ R0 for each real number α, we conclude R0 = R.  Now we present another criterion of maximality of Ker(s) for an (R, 1R )-statemorphism s when (R, 1R ) is an Archimedean unital Riesz space. Proposition 3.21. Let T be a non-void compact Hausdorff space and M be a pseudo MV-algebra. Then the kernel of a (C(T ), 1T )-state-morphism s on M is a maximal ideal if and only if there is a state-morphism s0 on M such that s(x) = s0 (x)1T , x ∈ M . The same statement holds for a (Cb (T ), 1T )-state-morphism on M . Proof. Let s be a (C(T ), 1T )-state-morphism on M , and for each t ∈ T , let st : M → [0, 1] be a mapping given by stT (x) := s(x)(t), x ∈ M . Then each st is a state-morphism on M , and Ker(s) = t∈T Ker(st ). Hence, if Ker(s) is maximal, then from Ker(s) ⊆ Ker(st ) we conclude Ker(s) = Ker(st ) because every Ker(st ) is a maximal ideal of M , see [Dvu1, Prop 4.3], so that st = st′ for all t, t′ ∈ T which gives the desired result. The converse statement is evident.  RIESZ SPACE-VALUED STATES 19 Using [Go, Lem 8.10], it is possible to show that if s is an extremal state on an MV-algebra M , then for each Boolean element e ∈ B(M ), we have s(e) ∈ {0, 1}. Using the Proposition 3.18, we can show that this is not true for each extremal (R, 1R )-state. Example 3.22. There are an MV-algebra M , an Archimedean unital Riesz space (R, 1R ), an (R, 1R )-state-morphism, i.e. an extremal (R, 1R )-state-morphism s and a Boolean element e ∈ B(M ) such that s(e) ∈ / {0, 1R }. Proof. Take a particular case of Proposition 3.18, namely (R, 1R ) = (R3 , 1R3 ), M = Γ(R3 , 1R3 ) and let s be an (R3 , 1R3 )-state-morphism given by (3.3), where a1 = (1, 0, 0), a2 = (0, 1, 0), e3 = (0, 0, 1). If we take the Boolean element e = (1, 0, 0), then s(e) = a1 ∈ / {0, (1, 1, 1)}.  4. Metrical Completion of Unital ℓ-groups with Respect (R, 1R )-States In this section, we show that if (R, 1R ) is a unital Archimedean or even a Dedekind complete Riesz space and s is an (R, 1R )-state on a unital ℓ-group (G, u), then G can be metrically completed with respect to a norm induced by s. If R is Dedekind complete, in particular, if (R, 1R ) = (Rn , 1Rn ), where 1Rn = (1, . . . , 1), then the metrical completion of G gives a Dedekind complete ℓ-group. Let T be a compact Hausdorff topological space. We endow C(T ) with the uniform topology generated by the norm k · kT , i.e. kf kT = sup{|f (t)| : t ∈ T }. Let (R, 1R ) be an Archimedean unital Riesz space. By the Yosida Representation Theorem, Theorem 2.2, there is a compact Hausdorff topological space T such that (R, 1R ) can be embedded into (C(T ), 1T ) as its Riesz subspace. If φ is this embedding, then the image φ(R) is uniformly dense in C(T ). More precisely, let T be the set of maximal ideals of (R, 1R ). If we define the hull-kernel topology on T , T becomes a non-void compact Hausdorff topological space. If I is a maximal ideal of (R, 1R ), then the quotient R/I can be identify with a unital subgroup (R0 , 1) of (R, 1) (in fact, R0 = R). Moreover, given x ∈ R, the mapping x b : T → R given by x b(I) := x/I, I ∈ T , is a continuous function on T , and the mapping φ : R → C(T ) defined by φ(x) = x b, x ∈ R, is by [LuZa, Thm 45.3] an isomorphic embedding of the unital Archimedean space (R, 1R ) into (C(T ), 1T ) such that φ(R) is uniformly dense in C(T ). We call this embedding the canonical embedding, the triple (C(T ), 1T , φ) is said to be the canonical representation of (R, 1R ), and we shall write (R, 1R ) ∼ (C(T ), 1T , φ). We note that according to [LuZa, Thm 45.4] if, in addition, (R, 1R ) is Dedekind σ-complete, then φ(R) = C(T ), and φ is an isomorphism of Riesz spaces. Thus, let (R, 1R ) be an Archimedean unital Riesz space with the canonical representation (C(T ), 1T , φ). Let s be an (R, 1R )-state on a pseudo MV-algebra M . Assume M = Γ(G, u) for some unital ℓ-group (G, u). Due to the categorical equivalence, s can be extended to a unique (R, 1R )-state on (G, u); we denote it by ŝ. Due to (ix) and (xii) of Proposition 3.2, we have that Ms := M/Ker(s) is an Archimidean MV-algebra, and Ms ∼ = Γ(Gs , u/Is ), where Gs = G/Is and Is is an ℓ-ideal of G generated by Ker(s). Then the (R, 1R )-state s̃ on Ms can be uniquely extended to a unique (R, 1R )-state b̃ s on (Gs , u/Is ). In addition, Is = {x ∈ G : ŝ(|x|) = 0}, where |x| = x+ + x− , x+ = x ∨ 0 and x− = −(x ∧ 0). In general, if s is an (R, 1R )-state on a unital ℓ-group (G, u), then the kernel of s is the set Ker(s) = {x ∈ G : s(|x|) = 0}. 20 ANATOLIJ DVUREČENSKIJ We define a pseudo norm | · |s on M as follows |x|s := kφ(s(x))kT := sup{|φ(s(x))(t)| : t ∈ T }, x ∈ M, This pseudo norm can be extended to a pseudo norm | · |s on G as follows |x|s := kφ(ŝ(x))kT = sup{|φ(ŝ(x))(t)| : t ∈ T }, x ∈ G. The simple properties of | · |s are as follows: For x, y, ∈ G, we have (i) |x + y|s ≤ |x|s + |y|s . (ii) |φ(ŝ(x))(t) − φ(ŝ(y))(t)| ≤ |x − y|s , t ∈ T . (ii) |nx|s ≤ |n| · |x|s , n ∈ Z. (iv) | − x|s = |x|s , |0|s = 0. (v) If y ∈ G+ and −y ≤ x ≤ y, then |x|s ≤ |y|s . Since our aim is to study extremal (R, 1R )-states on M and in view of Lemma 3.3, an (R, 1R )-state s on M is extremal iff so is s̃ on Ms := M/Ker(s), without loss of generality we will assume that M is an Archimedean MV-algebra, (G, u) is an Archimedean (Abelian) unital ℓ-group, and s(x) = 0 for x ∈ M iff x = 0 because s̃([x]) = 0 iff [x] = 0. Then | · |s is a norm on M and (G, u), respectively, and ds (x, y) := |x − y|s defines a metric called the s-metric. Because of triangle inequality (i), addition and subtraction in G are uniformly continuous with respect to ds . Hence, the ds -completion G of G is a topological Abelian group, and the natural mapping ψ : G → G is a continuous group homomorphism. We define a relation ≤ on G so that for any x, y ∈ G, we put x ≤ y iff y − x lies in the closure of ψ(G+ ). We note Ker(ψ) = {x ∈ G : |x|s = 0}. In the following statement we show, in particular, that this relation is a translationinvariant partial order on G, that is, given x, y, z ∈ G, x ≤ y implies x + z ≤ y + z. In what follows, we are inspired by ideas and proofs from [Go, Chap 12, Thm 12.2]. Proposition 4.1. Let (R, 1R ) be an Archimedean unital Riesz space with (R, 1R ) ∼ (C(T ), 1T , φ). Let (G, u) be an Archimedean unital ℓ-group, and s an (R, 1R )-state on (G, u) such that if s(x) = 0 for some x ≥ 0, then x = 0. Let G be the ds completion of G, ψ : G → G be the natural embedding, and let ds denote the induced metric on G. Then (i) G is a directed po-group with positive cone equal to the closure of ψ(G+ ). (ii) There is a unique continuous mapping s : G → C(T ) such that φ ◦ s = s ◦ ψ, and s is a positive homomorphism of po-groups. (iii) ds (g, 0) = ks(g)kT for each g ∈ G, and ds (g, 0) = |g|s = kφ(s(g))kT for each g ∈ G. Proof. (i) Let C be the closure of ψ(G+ ) in G. Since ψ(0) = 0, we have 0 ∈ C. As ψ(G+ ) is closed under addition, the continuity of addition in G entails that G is closed under addition, so that C is a cone. Now let x, −x ∈ C. Take two sequences {xn } and {yn } in G+ such that ψ(xn ) → x and ψ(yn ) → −x. Then ψ(xn +yn ) → 0. Since ds (ψ(xn + yn ), 0) = ds (xn + yn , 0) = |xn + yn |s = kφ(s(xn + yn ))kT → 0 for all n, consequently, the sum φ(s(xn )) + φ(s(yn )) of positive real-valued continuous functions on T converges uniformly on T to the zero function 0T on T . Then 0T ≤ φ(s(xn )) ≤ φ(s(xn + yn )) for all n. Whence, φ(s(xn )) ⇒ 0T , and therefore, x = 0. Thus C is a strict cone, and G becomes a po-group with positive cone C. RIESZ SPACE-VALUED STATES 21 Now we show that G is directed. Let x ∈ G, and let us choose a sequence {xn } in G such that |xn+1 − xn |s < 1/2n for all n. Then xn+1 − xn = an − bn , where an = (xn+1 − xn ) ∨ 0 ∈ G+ and bn = −((xn+1 − xn ) ∧ 0) ∈ G+ . Then |xn+1 − xn |s = |an + bn |s < 1/2n . n Since an ≤ an + bn , we have P |an |s ≤ |an + bn |s < 1/2 for all n. Therefore, the partial sums of the series n an form a Cauchy sequence with respect to ds . P Consequently, the series n ψ(an ) converges to an element a ∈ G. As the partial + sums of this series all lie in ψ(G+ ), then a ∈ G . In the same way, the series P + n ψ(bn ) converges to an element b ∈ G . We have a − b = lim k k X n=1 ψ(an − bn ) = lim k k X ψ(xn+1 − xn ) n=1 = lim(ψ(xk+1 ) − ψ(x1 )) = x − ψ(x1 ). k Since x1 = c − d for some c, d ∈ G+ , we have x = (a + ψ(c)) − (b + ψ(d)) with + a + ψ(c) and b + ψ(d) ∈ G which established G is directed. (ii) Let g ∈ G. Choose two sequences {fn } and {hn } in G such that ds (fn , g) → 0 and ds (hn , g) → 0. Then φ(s(fn )) ⇒ f ∈ C(T ) and φ(s(hn )) ⇒ h ∈ C(T ). We assert that f = h. Indeed kf − hkT = kf − φ(s(fn ))kT + |φ(s(fn )) − φ(s(hn ))|s + kφ(s(hn )) − hkT = kf − φ(s(fn ))kT + |fn − hn |s + kφ(s(hn )) − hkT → 0, which yields f = h. Therefore, we can define unambiguously s : G → C(T ) as follows: s(g) = limn φ(s(gn )), g ∈ G, for any sequence {gn } of elements of G such + that ds (gn , g) → 0. Then evidently s(g) ≥ 0T if g ∈ G , and s(g + h) = s(g) + s(h) for all f, g ∈ G as well as φ ◦ s = s ◦ ψ. In addition, ds (g, 0) = ks(g)kT , g ∈ G. If ds (g, gn ) → 0 for g ∈ G and for a sequence {gn } of elements of G, then ks(g) − s(Gn )kT = ds (g, gn ) → 0, so that s is continuous on G. If s′ : G → C(T ) is a continuous positive homomorphism of po-groups such that φ ◦ s = s′ ◦ ψ, then s(g) and s′ (g) coincide for each g ∈ G, so that s′ = s. (iii) It follows from the end of the proof of (ii).  Remark 4.2. The po-group G from the latter proposition is said to be the metrical completion of G with respect to an (R, 1R )-state s. Nevertheless that it was supposed that G is an Archimedean ℓ-group and s has the property s(x) = 0 for x ∈ G+ implies x, passing to the (R, 1R )-state b̃ s on Gs , the metrical completion of Gs from Proposition 4.1 with respect to the (R, 1R )-state b̃ s is also in fact a metrical completion of G with respect to the (R, 1R )-state s. In other words, G can be homomorphically embedded into an Abelian metrically complete po-group G. Proposition 4.3. Let the conditions of Proposition 4.1 hold. If {xα }α and {yα }α be nets in G such that xα → x and yα → y. If xα ≤ yα for each α, then x ≤ y. + Proof. The differences yα − xα form a net in G which converges to y − x. As G +  is closed in G, we have that y − x lies in G , and consequently, x ≤ y. In what follows, we show that the metrical completion G of G enjoys also some lattice completeness properties. In order to do that, we have to strengthen conditions posed to the Riesz space (R, 1R ) assuming R is Dedekind complete. Then due 22 ANATOLIJ DVUREČENSKIJ to Theorem 2.3, we have the canonical representation (R, 1R ) ∼ (C(T ), 1T , φ) and (R, 1R ) ∼ = (C(T ), 1T ), where T 6= ∅ is a compact Hausdorff extremally disconnected topological space. Such a situation is e.g. when (R, 1R ) = (Rn , 1Rn ), n ≥ 1, then (R, 1R ) ∼ = (C(T ), T ), where |T | = n and every singleton of T is clopen. Proposition 4.4. Let (R, 1R ) be a Dedekind complete unital Riesz space with the canonical representation (R, 1R ) ∼ (C(T ), 1T , φ), where T 6= ∅ is a Hausdorff compact extremally disconnect topological space. Let (G, u) be an Archimedean unital ℓ-group and let s be an (R, 1R )-state on (G, u) such that if s(x) = 0 for some x ≥ 0, then x = 0. Let G be the ds -completion of G, ψ : G → G be the natural mapping, and let ds denote the induced metric on G. Let {xα : α ∈ A} be a net of elements of G which is bounded above and xα ≤ xβ whenever α ≤ β, α, β ∈ A. Then there is an element x∗ ∈ G such that xα → x∗ and x∗ is the supremum of {xα : α ∈ A} in G. Proof. Since C(T W ) is Dedekind complete, there is a continuous function f ∈ C(T ) such that f = α s(xα ). Then f (t) = supα s(xα )(t) = limα s(xα )(t) for each t ∈ T . Applying the Dini Theorem, see e.g. [Kel, p. 239], for the net {s(xα ) : α ∈ A} of continuous functions on T , the net converges uniformly to f . Consequently, {xα : α ∈ A} is a Cauchy net in G, so that it converges to some x∗ ∈ G. For any xα , the subnet {xβ : xβ ≥ xα } also converges to x∗ , whence by Proposition 4.3, x∗ ≥ xα . Now, let z ∈ G be any upper bound for {xα : α ∈ A}. Applying again Proposition 4.3, we conclude x∗ ≤ z, which proves that x∗ is the supremum in question.  Proposition 4.5. Let the conditions of Proposition 4.4 hold. Then G has interpolation. Proof. We show that G has interpolation, that is, if x1 , x2 ≤ y1 , y2 for x1 , x2 , y1 , y2 ∈ G, there is a z ∈ G such that x1 , x2 ≤ z ≤ y1 , y2 . To prove this we follow ideas of the proof of [Go, Thm 12.7]. There are four sequences of elements of G, {xin }n , {yin }n for i = 1, 2, such that ds (ψ(xin ), xi ) < 1/2n+5 and ds (ψ(yjn ), yj ) < 1/2n+5 for all i, j = 1, 2 and all n. For all i, n, we have |xi,n+1 − xin |s = ds (ψ(xi,n+1 ), ψ(xin )) ≤ ds (ψ(xi,n+1 ), xi ) + ds (xi , ψ(xin )) < 1/2n+6 + 1/2n+5 < 1/2n+4 . Similarly, |yj,n+1 − yjn |s < 1/2n+4 . We shall construct Cauchy sequences {bn } and {zn } of elements in G such that bn → 0 and xin ≤ zn ≤ yjn + bn for all i, j, n. The limit {ψ(zn )} provides an element in G to interpolate between x1 , x2 and y1 , y2 . We first construct elements a1 , a2 , . . . in G such that |an |s < 1/2n+2 for all n and also xin − an ≤ xi,n+1 ≤ xin + an and yjn − an ≤ yj,n+1 ≤ yjn + an for all i, j, n. For each i, n, we have ds (ψ(xi,n+1 ), ψ(xin )) < 1/2n+4 , so that xi,n+1 − xin = pin − qin + for some pin , qin ∈ G satisfying |pin + qin |s < 1/2n+4 . Similarly, each yj,n+1 − yin = rjn − sjn RIESZ SPACE-VALUED STATES 23 for some rjn , sjn ∈ G+ satisfying |rjn + sjn |s < 1/2n+4. Set an := p1n + q1n + p2n + q2n + r1n + s1n + r2n + s2n for all n. Then |an |s < 4/2n+4 = 1/2n+2 . Moreover, xin − an ≤ xin − qin = xi,n+1 − pin ≤ xi,n+1 ≤ xi,n+1 + qin = xin + pin ≤ xin + an , yjn − an ≤ yjn − sjn = yj,n+1 − rjn ≤ yj,n+1 ≤ yj,n+1 + sjn = yjn + rjn ≤ yjn + an for all i, j, n. Next, we construct elements b1 , b2 , . . . in G+ such that |bn |s < 1/2n+1 for all n, while also xin ≤ yjn + bn for all i, j, n. + Fix n for a while. Since each yj − xi lies in G , we have ds (ψ(tij ), yj − xi ) < 1/2n+4 for some tij ∈ G+ . Then |tij − (yjn − xin )|s = ds (ψ(tij ), ψ(yjn ) − ψ(xin )) ≤ ds (ψ(tij ), yj − xi ) + ds (yj , ψ(yjn )) + ds (ψ(xin ), xi ) < 1/2n+4 + 1/2n+5 + 1/2n+5 = 1/2n+3 , and consequently, tij − yjn + xin = uij − vij for some uij , vij ∈ G satisfying |uij + vij |s < 1/2n+3 . Set + then |bn |s ≤ P bn := u11 + u12 + u21 + u22 , |uij + vij |s < 4/2n+3 = 1/2n+1 . Moreover, xin ≤ xin + tij = yjn + uij − vij ≤ yjn + uij ≤ yjn + bn for all i, j. Finally, we construct elements z1 , z2 , . . . in G such that xin ≤ zn ≤ yij + bn for all i, j, n, while also |zn+1 − zn |s ≤ 1/2n . As xi1 ≤ yj1 + b1 for all i, j, interpolation in G immediately provides us an element z1 . Now suppose that z1 , . . . , zn have been constructed, for some n. Then xi,n+1 ≤ yj,n+1 + bn+1 , xi,n+1 ≤ xin + an ≤ zn + an , zn − bn − an ≤ yjn − an ≤ yj,n+1 ≤ yj,n+1 + bn+1 for all i, j. Hence, there exists zn+1 ∈ G such that xi,n+1 ≤ zn+1 ≤ y1,n+1 + bn+1 x2,n+1 z n − b n − an ≤ zn+1 ≤ zn+1 ≤ y2,n+1 + bn+1 ≤ z n + an . Since −(an + bn ) ≤ zn+1 − zn ≤ an ≤ an + bn , we conclude from property (v) of | · |s that |zn+1 − zn |s ≤ |an + bn |s = |an |s + |bn |s < 1/2n+2 + 1/2n+1 < 1/2n 24 ANATOLIJ DVUREČENSKIJ which completes the induction. The sequence {zn } is a Cauchy sequence in G, and hence, there is z ∈ G such that ψ(zn ) → z. In view of ds (ψ(bn ), 0) = |bn |s < 1/2n+1 for all n, we also have ψ(bn ) → 0. Since ψ(xin ) ≤ ψ(zn ) ≤ ψ(yjn ) + ψ(bn ) for all i, j, n, we have finally xi ≤ z ≤ yj for all i, j which proves that G has interpolation.  Theorem 4.6. Let the conditions of Proposition 4.4 hold. Then G is a Dedekind complete ℓ-group. Proof. Let x, y ∈ G. Let A be the set of lower bounds for {x, y}. Then A is a non-empty set. In view of Proposition 4.5, G has interpolation, so that A is an upwards directed set, and therefore, if A is indexed by itself, A satisfies condition of Proposition 4.4, so that A has supremum a in G, and clearly, a = x∧y. Similarly, (−x) ∧ (−y) exists in G, and −((−x) ∧ (−y)) = x ∨ y exists in G proving G is an ℓ-group. Applying Proposition 4.4, we see G is a Dedekind complete ℓ-group.  As an important corollary of the latter theorem we have that if (R, 1R ) = (Rn , 1Rn ), n ≥ 1, then the metrical completion G of G with respect to any (R, 1R )state is a Dedekind complete ℓ-group which generalizes [Go, Thm 12.7]: Theorem 4.7. Let s be any (Rn , 1Rn )-state on a unital ℓ-group (G, u), n ≥ 1. There is a metrical completion G of G with respect to s such that G is a Dedekind complete ℓ-group. s is in Proof. By Remark 4.2, the metrical completion G of Gs with respect to b̃ fact a metrical completion of G with respect to s. The desired result follows from Theorem 4.6.  Theorem 4.8. Let the conditions of Proposition 4.4 hold with an (R, 1R )-state s on (G, u) and let (R, 1R ) = (C(T ), 1T ), where T 6= ∅ is a Hausdorff compact extremally disconnected topological space. If G0 is an ℓ-subgroup of G generated by ψ(u), then the restriction s0 of s onto G0 is an (R, 1R )-state on the unital Dedekind complete ℓ-group (G0 , ψ(u)), where s is a continuous mapping defined in Proposition 4.1(ii). In addition, s0 is an extremal (R, 1R )-state on (G0 , ψ(u)) if and only if so is s on (G, u). Proof. Let s be an (R, 1R )-state on (G, u) and let G0 be the ℓ-subgroup of G generated by ψ(u). Due to Theorem 4.6, (G0 , ψ(u)) is an Abelian Dedekind complete unital ℓ-group. By Proposition 4.1(ii), there is a unique continuous mapping s : G → (R, 1R ) = (C(T ), 1T ) such that φ ◦ s = s ◦ ψ (the mapping φ : R → C(T ) is the identity). Consequently, s0 is an (R, 1R )-state on (G0 , ψ(u)). Assume that s is an extremal (R, 1R )-state and let s0 = λm1 + (1 − λ)m2 , where m1 , m2 are (R, 1R )-states on (G0 , ψ(u)) and λ ∈ (0, 1). The mappings si (x) := mi (ψ(x)), x ∈ G, are (R, 1R )-states on (G, u) for each i = 1, 2, and s(x) = λs1 (x) + (1 − λ)s2 (x), x ∈ G. The extremality of s entails s(x) = s1 (x) = s2 (x) for each x ∈ G. We have to show that s0 = m1 = m2 . RIESZ SPACE-VALUED STATES 25 Since s0 (g), m1 (g), m2 (g) are in fact continuous functions on T , then they are + positive functions for each g ∈ G0 , and hence, s0 (g)/λ ≥ m1 (g) and s0 (g)/(1−λ) ≥ + + m2 (g) for each g ∈ G0 . For any g ∈ G+ such 0 , there is a sequence {xn } in G that ψ(xn ) ≤ ψ(xn+1 ) ≤ g and ψ(xn ) → g. Then km1 (g) − m1 (ψ(xn ))kT ≤ ks(g) − s(ψ(xn ))kT /λ → 0 and whence, m1 (g) = limn m1 (ψ(xn )) = limn s1 (xn ) = limn s(xn ) = s(g). In a similar way we have m2 (g) = limn s2 (xn ) = limn s(xn ) = s(g). Then m1 (g) = m2 (g) = s(g) = s0 (g) for each g ∈ G0 which shows that s0 is an extremal (R, 1R )-state on (G0 , ψ(u)). Conversely, let s0 be an extremal (R, 1R )-state on (G0 , ψ(u)) and let s = λs1 + (1 − λ)s2 , where s1 , s2 are (R, 1R )-states on (G, u) and λ ∈ (0, 1). We define mappings mi : G0 → R for i = 1, 2 as follows. First, we put mi (ψ(x)) = si (x) for x ∈ G+ and i = 1, 2. Then each mi is a well-defined mapping on ψ(G)+ . Now let + g ∈ G+ with ψ(xn ) ≤ ψ(xn+1 ) ≤ g such that 0 . There is a sequence {xn } in G g = limn ψ(xn ). Since for continuous functions we have 0 ≤ ψ(xm ) − ψ(xn ) for each m ≥ n, then ks1 (ψ(xm )) − s1 (ψ(xn ))kT ≤ ks0 (ψ(xm )) − s0 (ψ(xn ))kT /λ → 0 and ks2 (ψ(xm )) − s2 (ψ(xn ))kT ≤ ks0 (ψ(xm )) − s0 (ψ(xn ))kT /(1 − λ) → 0 when m, n → ∞. Then {si (ψ(xn ))} is a Cauchy sequence in C(T ) = R, and there is fi ∈ C(T )+ such that si (ψ(xn )) ⇒ fi for i = 1, 2. If {yn } in G+ is another sequence in G+ 0 such that ψ(yn ) ≤ ψ(yn+1 ) ≤ g and g = limn ψ(yn ), then limn si ((ψ(xn ))) = fi = limn si (ψ(yn )), and therefore, the extension of mi to G+ 0 is defined by mi (g) := limn mi (ψ(xn )) whenever {xn } is a sequence in G+ with ψ(xn ) ≤ ψ(xn+1 ) ≤ g such that g = limn ψ(xn ). Finally, mi can be extended to the whole G0 , so that every mi is an (R, 1R )-state on (G, u), and s0 = λm1 + (1 − λ)m2 . This yields s0 = m1 = m2 and consequently, s = s1 = s2 proving s is an extremal (R, 1R )-state on (G, u).  5. Lattice Properties of R-measures and Simplices In this section we extend the notion of an (R, 1R )-state to R-measures and RJordan signed measures on a pseudo MV-algebra. If R is a Dedekind complete Riesz space, we show that the space of R-Jordan signed measures can be converted into a Dedekind complete Riesz space. This allows us to show when the space of (R, 1R )-states on a pseudo MV-algebra is a Choquet simplex or even a Bauer simplex. In addition, we show when every state is a weak limit of a net of convex combinations of (R, 1R )-state-morphisms. Thus let M be a pseudo MV-algebra and R be a Riesz space. A mapping m : M → R is said to be an R-signed measure if m(x + y) = m(x) + m(y) whenever x + y is defined in M . An R-signed state is (i) an R-measure if m(x) ≥ 0 for each x ∈ M , (ii) an R-Jordan signed measure if m is a difference of two R-measures. It is clear that (i) every (R, 1R )-state is an R-measure, (ii) m(0) = 0 for each R-signed measure m, (iii) if x ≤ y, then m(x) ≤ m(y) whenever x ≤ y for each Rmeasure m. We denote by J SM(M, R) and M(M, R) the set of R-Jordan signed measures and R-measures, respectively, on M . Then J SM(M, R) is a real vector space and if for two R-Jordan signed measures m1 and m2 we put m1 ≤+ m2 , then J SM(M ) is an Abelian po-group with respect to the partial order ≤+ with positive cone M(M, R). Using ideas from [Go, p. 38–41], we show that J SM(M, R) is a Dedekind complete Riesz space whenever R is a Dedekind complete Riesz space. We note that in [Go] this was established for Abelian interpolation po-groups G whereas we have functions on M with the partial operation + that is not assumed to be commutative a priori. 26 ANATOLIJ DVUREČENSKIJ In this section, let R be a Dedekind complete Riesz space and M be a pseudo MV-algebra. A mapping d : M → R is said to be subadditive provided d(0) = 0 and d(x+ y) ≤ d(x) + d(y) whenever x + y ∈ M . Proposition 5.1. Let M be a pseudo MV-algebra, R a Dedekind complete Riesz space, and let d : M → R be a subadditive mapping. For all x ∈ M , assume that the set D(x) := {d(x1 ) + · · · + d(xn ) : x = x1 + · · · + xn , x1 , . . . , xn ∈ M, n ≥ 1} (5.1) is bounded W above in R. Then there is an R-signed measure m : M → R such that m(x) = D(x) for all x ∈ M . W Proof. The map m(x) := D(x) is a well-defined mapping for all x ∈ M . It is clear that m(0) = 0 and now we show that m is additive on M . Let x + y ∈ M be given. For all decompositions x = x1 + · · · + xn and y = y1 + · · · + yk with all xi , yj ∈ M , we have x + y = x1 + · · · + xn + y1 + · · · + yk , which yields X X d(yj ) ≤ m(x + y). d(xi ) + j i Therefore, s + t ≤ W m(x + y) for all s, t ∈ D(x). Since R is a Dedekind complete Abelian ℓ-group, is distributive with respect to +, see [Go, Prop 1.4]. Whence _  _ (s + m(y)) m(x) + m(y) = D(x) + m(y) = = _  s+ u∈D(x) ≤ m(x + y). _ s∈D(x)  D(y) = _ _ (s + t) s∈D(x) y∈D(y) Conversely, let x + y = z1 + · · · + zn be a decomposition of x + y where each zi ∈ M . Then the strong Riesz decomposition Property RDP2 with (2.1)–(2.2) implies that there are elements x1 , . . . , xn , y1 , . . . , yn ∈ M such that x = x1 + · · · + xn , y = y1 + · · · + yn and zi = xi + yi for i = 1, . . . , n. This yields ! ! X X X X d(yi ) ≤ m(x) + m(y), d(xi ) + (d(xi ) + d(yi )) = d(zi ) ≤ i i i i and therefore, m(x + y) ≤ m(x) + m(y) and finally, m(x + y) = m(x) + m(y) for all x, y ∈ M such that x + y is defined in M , so that m is an R-signed measure on M.  Theorem 5.2. Let M be a pseudo MV-algebra and R be a Dedekind complete Riesz space. For the set J (M, R) of R-Jordan signed measures on M we have: (a) J (M, R) is a Dedekind complete ℓ-group with respect to the partial order ≤+ . (b) If {mi }W i∈I is a non-empty set of J (M, R) that is bounded above, and if d(x) = i mi (x) for all x ∈ M , then ! _ _ mi (x) = {d(x1 ) + · · · + d(xn ) : x = x1 + · · · + xn , x1 , . . . , xn ∈ M } i RIESZ SPACE-VALUED STATES 27 for all x ∈ M . (c) If {mi }V i∈I is a non-empty set of J (M, R) that is bounded below, and if e(x) = i mi (x) for all x ∈ M , then ! ^ ^ mi (x) = {e(x1 ) + · · · + e(xn ) : x = x1 + · · · + xn , x1 , . . . , xn ∈ M } i for all x ∈ M . (d) The set J (M, R) is a Dedekind complete Riesz space. Proof. Let m0 ∈ J (M, R) be an upper bound for {m Wi }i∈I . For any x ∈ M , we have mi (x) ≤ m0 (x), so that the mapping d(x) = i mi (x) defined on M is a subadditive mapping on the pseudo MV-algebra M . For any x ∈ M and any decomposition x = x1 + · · · + xn with all xi ∈ M , we conclude d(x1 ) + · · · + d(xn ) ≤ m(x1 ) + · · · + m(xn ) ≤ m0 (x). Hence, m0 (x) is an upper bound for D(x) defined by (5.1). By Proposition W 5.1, we conclude that there is an R-signed measure m : M → R such that m(x) = D(x). For every x ∈ M and every mi we have mi (x) ≤ d(x) ≤ m(x), which gives mi ≤+ m. The mappings m − mi are positive R-measures − belonging to J (M, R), so that m − mi =: fi ∈ M(M, R), and m = m+ i + f i − mi , − + − where m+ i , mi ∈ M(M, R) and mi = mi − mi . Consequently, m ∈ J (M, R). If h ∈ J (M, R) is an R-Jordan signed measure such that mi ≤+ h for any i ∈ I, then d(x) ≤ h(x) for any x ∈ M . As in the preceding paragraph, we can show that h(x) is also an upper bound for D(x), whence m(x) ≤ h(x) for any x ∈ M , which gives m ≤+ h. In other words, we have proved that m is the supremum of {mi }i∈I , and its form is given by (b). Now if we apply the order anti-automorphism z 7→ −z holding in the Riesz space R, we see that if the set {mi }i∈I in J (M, R) is bounded below, then it has an infimum given by (c). It is clear that J (M, R) is directed. Combining (b) and (c), we see that J (M, R) is a Dedekind complete ℓ-group. (d) If m is an R-Jordan signed measure on M and α ∈ R, then clearly αm ∈ J (M, R) and if, in addition α ≥ 0, then αm an R-measure whenever m is an R-measure. Consequently, J (M, R) is a Dedekind complete Riesz space.  Now let, for an Archimedean unital Riesz space (R, 1R ), (C(T ), 1T , φ) be its canonical representation, i.e. (R, 1R ) ∼ (C(T ), 1T , φ). We say that a net of (R, 1R )states {sα }α on a pseudo MV-algebra M converges weakly to an (R, 1R )-state s on w M , and we write {sα }α → s, if kφ ◦ sα (x) − φ ◦ s(x)kT → 0 for each x ∈ M . We note that the weak convergence introduced in the proof of (4) of Proposition 3.18 is a special case of the present definition. If (R, 1R ) = (R, 1), then (R, 1R )-states are usual states on pseudo MV-algebras, therefore, the weak convergence of (R, 1R )-states coincides with the weak convergence of states introduced in the beginning of Section 3. w First, we show that if, for a net of (R, 1R )-states on M , we have {sα }α → s w and {sα }α → s′ , then s = s′ . Indeed, if s′ is another (R, 1R )-state on M such that kφ ◦ sα (x) − φ ◦ s′ (x)kT → 0 for each x ∈ M , then kφ(s(x) − s′ (x))kT ≤ kφ(s(x) − sα (x))kT + kφ(sα (x) − s′ (x))kT → 0 so that φ(s(x)) = φ(s′ (x)) which proves s(x) = s′ (x) for each x ∈ M and finally, we have s = s′ . 28 ANATOLIJ DVUREČENSKIJ We note that the weak convergence of (R, 1R )-states on M can be defined also in another but equivalent form: Let (R, 1R ) be an Archimedean unital Riesz space. For any r ∈ R, we set krk1R := inf{α ∈ R+ : |r| ≤ α1R }. Then k·k1R is a norm on R. In particular, for each f ∈ C(T ), we have kf kT = kf k1T . In addition, if (R, 1R ) ∼ (C(T ), 1T , φ), then kxk1R = kφ(x)kT for each x ∈ R. Therefore, a net {sα }α of (R, 1R )-states converges weakly to an (R, 1R )-state s iff limα ksα (x) − s(x)k1R = 0 for each x ∈ M . Proposition 5.3. Let M be a pseudo MV-algebra and (R, 1R ) be a Dedekind σcomplete unital Riesz space. Then the space S(M, R, 1R ) is either empty or a nonempty convex compact set under the weak convergence. Proof. By Proposition 3.5, M has at least one state iff M possesses at least one normal ideal that is also maximal. In particular, if M is an MV-algebra, with 0 6= 1, M admits at least one state. Thus, let M have at least one (R, 1R )-state. Clearly, S(M, R, 1R ) is a convex set. Since R is Dedekind σ-complete, according to [LuZa, Thm 45.4], see also Theorem 2.3, (R, 1R ) has the canonical representation (C(T ), 1T , φ), and φ is bijective, where T is the set of maximal ideals of (R, 1R ) with the hull-kernel topology. Let D := {f ∈ C(T ) : kf kT ≤ 1}. If s is an (R, 1R )-state, then φ ◦ s ∈ DM . Since D is compact in the norm-topology k · kT , DM is due to Tychonoff’s theorem a compact Hausdorff topological space in the product topology of DM . The set φ(S(M, R, 1R )) := {φ ◦ s : s ∈ S(M, R, 1R )} is a subset of the cube DM . Let us assume that {sα }α is a net of (R, 1R )-states on M such that there exists the limit µ(x) = limα φ ◦ sα (x) ∈ D ⊂ C(T ) for each x ∈ M . Then µ : x 7→ µ(x), x ∈ M , is a (C(T ), 1T )-state on M . Put s(x) := φ−1 (µ(x)) for each x ∈ M . w Then s : x 7→ s(x), x ∈ M , is an (R, 1R )-state on M such that {sα }α → s, which says that φ(S(M, R, 1R )) is a closed subset of DM . Since D is compact in the norm-topology k · kT , and φ(S(M, R, 1R )) is a closed subset of DM , φ(S(M, R, 1R )) is compact. Consequently, S(M, R, 1R ) is a compact set in the weak topology of (R, 1R )-states.  Corollary 5.4. Under the conditions of Proposition 5.3 every (R, 1R )-state on M lies in the closure of the convex hull of extremal (R, 1R )-states on M , where the closure is given in the weak topology of (R, 1R )-states, i.e. S(M, R, 1R ) = (Con(S∂ (M, R, 1R )))− . Proof. It is a direct application of the Krein–Mil’man Theorem, Theorem [Go, Thm 5.17], and Proposition 5.3.  Proposition 5.5. Let M be a pseudo MV-algebra and (R, 1R ) be a unital Riesz space isomorphic to the unital Riesz space (Cb (T ), 1T ) of bounded real-valued functions on T , where T 6= ∅ is a basically disconnected compact Hausdorff topological space. Then the set of extremal (R, 1R )-states on M is closed in the weak topology of (R, 1R )-states. Proof. According to Proposition 3.14, every extremal (R, 1R )-state on M is an (R, 1R )-state-morphism on M and vice-versa. Since T is basically disconnected, by Nakano’s theorem (Cb (T ), 1T ) is a Dedekind σ-complete Riesz space, consequently, RIESZ SPACE-VALUED STATES 29 so is (R, 1R ). By Proposition 5.3, we can introduce the weak topology of (R, 1R )states on M which gives a compact space S(M, R, 1R ). Applying the criterion (iii) of Proposition 3.14, we see that the space SM(M, R, 1R ) of (R, 1R )-state-morphisms is closed and compact. Due to (3.2), we have S∂ (M, R, 1R ) = SM(M, R, 1R ) is also compact.  Corollary 5.6. Under the conditions of Proposition 5.5 every (R, 1R )-state on M lies in the closure of the convex hull of (R, 1R )-state-morphisms on M , where the closure is given in the weak topology of (R, 1R )-states, i.e. S(M, R, 1R ) = (Con(SM(M, R, 1R )))− . Proof. Due to (3.2), we have S∂ (M, R, 1R ) = SM(M, R, 1R ). Applying Corollary 5.4, we have the result.  Now we present some results when the space of (R, 1R )-states on a pseudo MValgebra is a Choquet simplex or even a Bauer simplex. Therefore, we introduce some notions about simplices. For more info about them see the books [Alf, Go]. We recall that a convex cone in a real linear space V is any subset C of V such that (i) 0 ∈ C, (ii) if x1 , x2 ∈ C, then α1 x1 +α2 x2 ∈ C for any α1 , α2 ∈ R+ . A strict cone is any convex cone C such that C ∩ −C = {0}, where −C = {−x : x ∈ C}. A base for a convex cone C is any convex subset K of C such that every non-zero element y ∈ C may be uniquely expressed in the form y = αx for some α ∈ R+ and some x ∈ K. Any strict cone C of V defines a partial order ≤C on V via x ≤C y iff y − x ∈ C. It is clear that C = {x ∈ V : 0 ≤C x}. A lattice cone is any strict convex cone C in V such that C is a lattice under ≤C . A simplex in a linear space V is any convex subset K of V that is affinely isomorphic to a base for a lattice cone in some real linear space. A simplex K in a locally convex Hausdorff space is said to be (i) Choquet if K is compact, and (ii) Bauer if K and K∂ are compact, where K∂ is the set of extreme points of K. Theorem 5.7. Let M be a pseudo MV-algebra and (R, 1R ) be a Dedekind complete unital Riesz space. Then the set of (R, 1R )-states on M is either empty set or a non-void Choquet simplex. Proof. By Proposition 3.5, M has at least one (R, 1R ) state iff M has at least one normal ideal that is also normal. Thus assume that M admits at least one (R, 1R )state. According to Theorem 5.2, the space J (M, R) of R-Jordan signed measures on M is a Dedekind complete Riesz space. Since the positive cone of J (M, R) is the set M(M, R) of R-measures on M that is also a strict lattice cone of J (M, R), it is clear that the set S(M, R, 1R ) of (R, 1R )-states is a base for J (M, R). Whence, S(M, R, 1R ) is a simplex. Now applying Proposition 5.3, we see that S(M, R, 1R ) is compact in the weak topology of (R, 1R )-states, which gives the result.  Something more we can say when (R, 1R ) ∼ = (Cb (T ), 1T ) for some extremally disconnected space T . Theorem 5.8. Let M be a pseudo MV-algebra and (R, 1R ) ∼ = (Cb (T ), 1T ) for some extremally disconnected space T 6= ∅. Then S(M, R, 1R ) is either the empty set or a non-void a Bauer simplex. 30 ANATOLIJ DVUREČENSKIJ Proof. Assume that M possesses at least one (R, 1R )-state. Due to the Nakano theorem, (Cb (T ), 1T ) is a unital Dedekind complete Riesz space, consequently, so is (R, 1R ). Applying Theorem 5.7, we have S(M, R, 1R ) is compact and by Proposition 5.5, the space of extremal states is compact in the weak topology of (R, 1R )-states, so that S(M, R, 1R ) is a Bauer simplex.  6. Conclusion In the paper, we have introduced (R, 1R )-states on pseudo MV-algebras, where R is a Riesz space with a fixed strong unit 1R , as additive functionals on a pseudo MV-algebra M with values in the interval [0, 1R ] preserving partial addition + and mapping the top element of M onto 1R . (R, 1R )-states generalize usual states because every (R, 1)-state is a state and vice versa. Besides we have introduced (R, 1R )-state-morphisms and extremal (R, 1R )-states. If (R, 1R ) is an Archimedean unital Riesz space, every (R, 1R )-state-morphism is an extremal (R, 1R )-state, Theorem 3.16. We note that there are (R, 1R )-state-morphisms whose kernel is not maximal ideal, Proposition 3.18, whereas, if an (R, 1R )-state has a maximal ideal, it is an (R, 1R )-state-morphism, Proposition 3.7. Metrical completion of a unital ℓgroup with respect to an (R, 1R )-state, when (R, 1R ) is a Dedekind complete unital Riesz space, gives a Dedekind complete ℓ-group, Theorem 4.6. Theorem 5.2 shows that the space of R-Jordan signed measures, when R is a Dedekind complete Riesz space, can be converted into a Dedekind complete Riesz space. This allows us to show when the space (R, 1R )-states is a compact set, Proposition 5.3, and when every (R, 1R )-state is in the weak closure of the convex hull of extremal (R, 1R )-states, Corollary 5.6. We have showed that the space of (R, 1R )-states, when (R, 1R ) is Dedekind complete, is a Choquet simplex, Theorem 5.7, and we proved when it is even a Bauer simplex, Theorem 5.8. References [Alf] E.M. Alfsen, “Compact Convex Sets and Boundary Integrals”, Springer-Verlag, Berlin, 1971. [ADG] P. Amato, A. Di Nola, B. Gerla, Neural networks and rational Lukasiewicz logic, in: Fuzzy Information Processing Society, 2002. Proceedings. NAFIPS. 2002 Annual Meeting of the North American, IEEE, 2002, pp. 506–510. [BDV] A. Boccuto, A. Di Nola, G. Vitale, Affine representations of ℓ-groups and MV-algebras, Algebra Universalis, to appear. [Cha] C.C. Chang, Algebraic analysis of many valued logics, Trans. Amer. Math. Soc. 88 (1958), 467–490. [CDM] R. Cignoli, I.M.L. D’Ottaviano, D. Mundici, ”Algebraic Foundations of Many-valued Reasoning”, Kluwer Academic Publ., Dordrecht, 2000. [DiLe] A. Di Nola, I. Leuştean, Lukasiewicz logic and Riesz spaces, Soft Computing 18 (2014), 2349–2363. [DuSc] N. Dunford, J.T. Schwartz, “Linear Operators, Part I, General Theory”, Interscience Publ., Inc., New York, 1957. [Dvu1] A. Dvurečenskij, States on pseudo MV-algebras, Studia Logica 68 (2001), 301–327. [Dvu2] A. Dvurečenskij, Pseudo MV-algebras are intervals in ℓ-groups, J. Austral. Math. Soc. 72 (2002), 427–445. [DvPu] A. Dvurečenskij, S. Pulmannová, “New Trends in Quantum Structures”, Kluwer Academic Publ., Dordrecht, Ister Science, Bratislava, 2000, 541 + xvi pp. [DvVe1] A. Dvurečenskij, T. Vetterlein, Pseudoeffect algebras. I. Basic properties, Inter. J. Theor. Phys. 40 (2001), 685–701. [DvVe2] A. Dvurečenskij, T. Vetterlein, Pseudoeffect algebras. II. Group representation, Inter. J. Theor. Phys. 40 (2001), 703–726. RIESZ SPACE-VALUED STATES [Fil] [FlKr] [Fuc] [GeIo] [Gla] [Go] [Haj] [Kel] [Kro] [KrMa] [KuMu] [LuZa] [Mun1] [Mun2] [Mun3] [Pan] [Rac] [RiMu] [Yos] 31 W. Filter, Representations of Archimedean Riesz spaces, Rocky Mt. Math. J. 24 (1994), 771–851. T. Flaminio, T. Kroupa, States on MV-algebras. In: Handbook of Mathematical Fuzzy Logic, vol. III. Eds. P. Cintula, Ch.G. Fermueller, C. Noguera, Volume 58 of Studies in Logic, Mathematical Logic and Foundations, College Publications, London, 2015, pp. 1191–1245. L. Fuchs, “Partially Ordered Algebraic Systems”, Pergamon Press, Oxford, New York, 1963. G. Georgescu, A. Iorgulescu, Pseudo-MV algebras, Multi-Valued Logic 6 (2001), 95–135. A.M.W. Glass, “Partially Ordered Groups”, World Scientific, Singapore, 1999. K.R. Goodearl, “Partially Ordered Abelian Groups with Interpolation”, Math. Surveys and Monographs No. 20, Amer. Math. Soc., Providence, Rhode Island, 1986. P. Hájek, Fuzzy logics with noncommutative conjunctions, J. Logic Comput. 13 (2003), 469–479. J.L. Kelley, “General Topology”, Van Nostrand, Priceton, New Jersey, 1955. T. Kroupa, Every state on semisimple MV-algebra is integral, Fuzzy Sets and Systems 157 (2006), 2771–2782. T. Kroupa, O. Majer, Nash equilibria in a class of constant-sum games represented by McNaughton functions, Logic, Algebra and Truth Degrees (2012), 94–97. J. Kühr, D. Mundici, De Finetti theorem and Borel states in [0, ]-valued algebraic logic, Inter. J. Approx. Reasoning 46 (2007), 605–616. W.A.J. Luxemburg, A.C. Zaanen, “Riesz Spaces I”, North-Holland, Amsterdam, London, 1971. D. Mundici, Interpretations of AF C ⋆ -algebras in Lukasiewicz sentential calculus, J. Funct. Analysis 65 (1986), 15–63. D. Mundici, Averaging the truth-value in Lukasiewicz logic, Studia Logica 55 (1995), 113–127. D. Mundici, “Advanced Lukasiewicz calculus and MV-algebras”, Springer, Netherlands, 2011. G. Panti, Invariant measures in free MV-algebras, Comm. Algebra 36 (2008), 2849–2861. J. Rachůnek, A non-commutative generalization of MV-algebras, Czechoslovak Math. J. 52 (2002), 255–273. B. Riečan, D. Mundici, Probability on MV-algebras, In: Handbook of Measure Theory, E. Pap (Editor), Elsevier Science, Amsterdam, 2002, Vol. II, pp. 869–909. K. Yosida, On vector lattice with a unit, Proc. Imper. Acad. Tokyo 17 (1940–41), 121– 124.
0math.AC
arXiv:1303.3469v1 [cs.NE] 14 Mar 2013 Hybrid Evolutionary Computation for Continuous Optimization Technical Memorandum 2011-v.01 School of Computer Science, University of Manchester, Kilburn Building, Oxford Road, MANCHESTER, M13 9PL Supervisor: Dr. Richard Neville Author: Hassan A Bashir November 9, 2011 This material represents the opinion of the author only and does not necessarily represent the opinion of the School or the University. While every attempt has been made to ensure the accuracy of this publication, neither the author, the School or the University can accept liability for mistakes that may exist. Please inform the author of any mistakes so they can be corrected in further printings. 1 Abstract Hybrid optimization algorithms have gained popularity as it has become apparent there cannot be a universal optimization strategy which is globally more beneficial than any other. Despite their popularity, hybridization frameworks require more detailed categorization regarding: the nature of the problem domain, the constituent algorithms, the coupling schema and the intended area of application. This report proposes a hybrid algorithm for solving small to large-scale continuous global optimization problems. It comprises evolutionary computation (EC) algorithms and a sequential quadratic programming (SQP) algorithm; combined in a collaborative portfolio. The SQP is a gradient based local search method. To optimize the individual contributions of the EC and SQP algorithms for the overall success of the proposed hybrid system, improvements were made in key features of these algorithms. The report proposes enhancements in: i) the evolutionary algorithm, ii) a new convergence detection mechanism was proposed; and iii) in the methods for evaluating the search directions and step sizes for the SQP local search algorithm. The proposed hybrid design aim was to ensure that the two algorithms complement each other by exploring and exploiting the problem search space. Preliminary results justify that an adept hybridization of evolutionary algorithms with a suitable local search method, could yield a robust and efficient means of solving wide range of global optimization problems. Finally, a discussion of the outcomes of the initial investigation and a review of the associated challenges and inherent limitations of the proposed method is presented to complete the investigation. The report highlights extensive research, particularly, some potential case studies and application areas. List of Algorithms 2.1 A Canonical Model of Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . 16 2.2 The Proposed Adaptive Elitism . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.1 The SQP local optimization algorithm . . . . . . . . . . . . . . . . . . . . . . . . 71 4.2 A constructor class template for an automatic differentiation object 5.1 The proposed hybrid EC/SQP algorithm . . . . . . . . . . . . . . . . . . . . . . . 93 1 . . . . . . . 81 List of Figures 2.1 Flowchart of a Typical Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . 15 2.2 Simulation of Genotype-Phenotype Mapping Functions . . . . . . . . . . . . . . . 17 2.3 Minimal Population Sizes for q−ary Representations . . . . . . . . . . . . . . . . 25 3.1 Fitness comparison plots and the effect of genetic operators . . . . . . . . . . . . 53 3.2 Visualizing ±σ (standard deviations) for the effect of genetic operators . . . . . . 58 3.3 Convergence detection by monitoring the contribution of crossover operator . . . 59 4.1 Algorithmic evaluation graph for a 2-dimensional sample problem . . . . . . . . . 73 5.1 A concise categorization of hybrid algorithms . . . . . . . . . . . . . . . . . . . . 90 5.2 Hybrid EC/SQP hybrid algorithm: Scalability test . . . . . . . . . . . . . . . . . 96 5.3 Hybrid EC/SQP hybrid algorithm: Fitness comparison test . . . . . . . . . . . . 98 2 List of Tables 2.1 Representation methods in Genetic Algorithms . . . . . . . . . . . . . . . . . . . 24 2.2 Standard Parameters of a Typical GA . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1 GA Parameter Settings for the proposed Price’s Experiment . . . . . . . . . . . . 50 3.2 Parameter Settings for Experiments 1 & 2 with RWS and BTS . . . . . . . . . . 52 3.3 Comparison of RWS and BTS methods 4.1 Comparison of the three major gradient based algorithms . . . . . . . . . . . . . 68 4.2 A list of variables definitions for a 2-dimensional sample problem . . . . . . . . . 73 4.3 A list of values and derivatives for the forward mode AD on a sample problem . 75 4.4 A list of values and derivatives for the reverse mode AD on a sample problem . . 77 5.1 A survey of hybrid optimization algorithms in various applications domain . . . . 92 5.2 Parameter settings of the proposed hybrid algorithm . . . . . . . . . . . . . . . . 94 3 . . . . . . . . . . . . . . . . . . . . . . . 52 Contents Abstract 1 1 Introduction 7 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Motivations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3 Aims and Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4 Hypotheses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.5 Scope and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.6 Chapter Organization and Summary . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 Evolutionary Computation Algorithms–An Overview 7 13 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Background and Process Dynamics of Evolutionary Computations . . . . . . . . 14 2.2.1 A Generalized Model for Genetic Algorithm . . . . . . . . . . . . . . . . . 15 2.3 Simulation of Evolution: Phenotype and Genotype Spaces . . . . . . . . . . . . . 16 2.4 Initialization of Evolutionary Computation Algorithms . . . . . . . . . . . . . . . 17 2.5 2.6 2.7 2.8 2.4.1 Representation in Evolutionary Algorithms . . . . . . . . . . . . . . . . . 18 2.4.2 2.4.3 Real-Binary Encoding and Mapping functions . . . . . . . . . . . . . . . . 18 Other representations in the Literature . . . . . . . . . . . . . . . . . . . 20 2.4.4 EC Population: Creation and Sizing . . . . . . . . . . . . . . . . . . . . . 23 The Selection Process in Evolutionary Algorithms . . . . . . . . . . . . . . . . . 26 2.5.1 Fitness Proportionate Selection methods . . . . . . . . . . . . . . . . . . . 27 2.5.2 Ranking methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.5.3 Tournament selection methods . . . . . . . . . . . . . . . . . . . . . . . . 29 Recombination and Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.6.1 Implementation of Crossover in EAs . . . . . . . . . . . . . . . . . . . . . 34 2.6.2 Implementation of Mutation in EAs . . . . . . . . . . . . . . . . . . . . . 36 Replacement Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.7.1 Elitism in Evolutionary Computations . . . . . . . . . . . . . . . . . . . . 38 2.7.2 Overlapping Populations and Steady State GAs . . . . . . . . . . . . . . . 38 Parameterization in Evolutionary Computations . . . . . . . . . . . . . . . . . . 40 2.8.1 The Standard Parameter Settings 2.8.2 Adaptive and Dynamic Parameters in EC . . . . . . . . . . . . . . . . . . 41 4 . . . . . . . . . . . . . . . . . . . . . . 40 CONTENTS 2.8.3 2.9 5 A Parameter-less GA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 The Proposed Adaptive Elitism . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 2.10 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.11 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3 Convergence Analysis in EC Algorithms 45 3.1 The Need for Convergence Measure in EC Algorithms . . . . . . . . . . . . . . . 45 3.2 Conventional Measures of EC Convergence 3.3 Monitoring the Effect of EC Operators with Price’s Equation . . . . . . . . . . . 47 3.3.1 3.4 Extension of Price’s Equation . . . . . . . . . . . . . . . . . . . . . . . . . 49 Analysing Evolution Progress with Extended Price’s Equation . . . . . . . . . . . 50 3.4.1 3.5 . . . . . . . . . . . . . . . . . . . . . 45 Results: Comparing RWS and BTS methods . . . . . . . . . . . . . . . . 51 Using Extended Price’s Equation to Measure Convergence . . . . . . . . . . . . . 56 3.5.1 The proposed convergence threshold parameter . . . . . . . . . . . . . . . 59 3.6 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.7 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4 Local Search Algorithms for Optimization 62 4.1 An Overview of Local Optimization Algorithms . . . . . . . . . . . . . . . . . . . 62 4.2 Line Search Based Local Optimization Methods . . . . . . . . . . . . . . . . . . . 63 4.3 Search Directions and Step Length in Gradient Based Algorithms . . . . . . . . . 64 4.3.1 Methods of Evaluating Descent Search Directions . . . . . . . . . . . . . . 64 4.3.2 Methods of Evaluating the Step Length Parameter . . . . . . . . . . . . . 66 4.4 Convergence Analysis of Gradient Based Algorithms . . . . . . . . . . . . . . . . 67 4.5 Sequential Quadratic Programming Algorithm 4.6 Interior Point Method for Solving Quadratic Problems . . . . . . . . . . . . . . . 69 4.7 Automatic Differentiation for Exact Derivatives Evaluation . . . . . . . . . . . . 71 . . . . . . . . . . . . . . . . . . . 69 4.7.1 Graphical Representation and Algorithmic Evaluation of Functions . . . . 72 4.7.2 Modes of Automatic Differentiation and their Complexities . . . . . . . . 74 4.7.3 Implementation Techniques of Automatic Differentiation . . . . . . . . . . 78 4.7.4 The Proposed Matlab Implementation of the AD Algorithm . . . . . . . . 78 4.7.5 Overloaded Operators and Functions for AD Objects . . . . . . . . . . . . 80 4.7.6 Example: Comparing Symbolic and Forward mode AD methods . . . . . 84 4.8 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.9 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 5 Hybridizing Evolutionary Computation Algorithms 88 5.1 Why the need for hybrid algorithms . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.2 Taxonomy of Hybrid Evolutionary Algorithms . . . . . . . . . . . . . . . . . . . . 89 5.3 The Proposed Task-Switching Hybrid Evolutionary Algorithm . . . . . . . . . . . 91 5.4 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.4.1 Characteristics of Global Optimization Test Problems . . . . . . . . . . . 93 5.4.2 Selected Benchmark Test Problems . . . . . . . . . . . . . . . . . . . . . . 94 CONTENTS 6 5.4.3 Results and Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.5 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 5.6 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 6 Discussion and Conclusions 101 6.1 Development of Ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.2 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 6.4 Research Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 6.5 Further work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 References 106 Chapter 1 Hybrid Evolutionary Computation for Optimization of Continuous Problems 1.1 Introduction As a vital aspect for successful achievement of our everyday goals, optimization arises naturally in our daily lives. It deals with the task of selecting the best out of the many possible decisions encountered in a typical real-life environment. For instance, searching for a shortest and/or fastest route to school or workplace is an everyday affair that requires dealing with optimization problem. A manufacturer seeking to boost production rate while cutting down the cost of production is also faced with an optimization task. In essence, optimization encompasses our routine need for maximizing gain, profit, quality, etc. or minimizing loss, cost, energy, time, etc. and it is as a result a prime facet of our everyday endeavour. Of interest is the fact that optimization has over the years become a subject that is widely used in sciences, engineering, management and economics, and in the industry. This has led to the growing need for thorough understanding of optimization problems and their solution methods. As a research field in particular, optimization has been expanding in all directions at an astonishing rate during the last few decades and it has attracted extra attention from both academic and industrial communities. The recent growth in the development of new algorithmic and modelling techniques and in the theoretical background has largely led to the rapid diffusion of optimization into other disciplines. The striking emphasis on the interdisciplinary nature of the field has shifted it from being a mere tool in applied and computational mathematics to all areas of engineering, medicine, economics and other sciences. As pointed out by Yuqi He of Harvard University, a member of the US National Academy of Engineering: “Optimization is a cornerstone for the development of civilization” [1]. Formally, the subject is involved in determining optimal solutions for problems which are 7 CHAPTER 1. INTRODUCTION 8 defined mathematically. It often requires the assessment of the problem’s optimality conditions, model construction, building the algorithmic method of solution, establishment of convergence theories and series of experimentations with various categories of problems. Although optimization problems include but not limited to the continuous problems, discrete or combinatorial problems, multiobjective optimization problems etc., the focus of this work was on the global linear/nonlinear continuous optimization problems potentially subject to some constraints and bounds. This was due to the fact that there are a great many applications from various domains that can be formulated as continuous optimization problems. For instance in: • Controlling a chemical process or a mechanical device to optimize performance or meet standards of robustness; • Designing an investment portfolio to maximize expected return while maintaining an acceptable level of risk; • Finding an optimal trajectory for an aircraft or a robot arm; • Computing the optimal shape of an automobile or aircraft component in a manufacturing and process plant; • Scheduling tasks such as school time tabling or operations in manufacturing plants to maximize production level within the limited available resources while meeting the required quality standards and satisfying customer demands, etc. Worth noting is that all these situations share the following three important aspects: 1. Objective: Also called an overall goal, it is a measure used to assess the extent to which the ultimate target in the activity is being realized and it is technically termed as the objective function which is typically modelled mathematically. 2. Constraints: This reflects the requirements within which the quest to optimizing the objective must be limited. It can be a limitation due to resource, time or space and or acceptable error levels or tolerance. 3. Design variables: This constitutes the set of all possible choices that must be made to ensure successful realization of the overall objective while satisfying the constraints. These implicit choices are technically referred to as decision or design variables and are the parameters around which the optimization task can be formulated. Obviously, any parameter that does not affect the objective or the constraints is not considered as a part of the design variables. Several solution techniques exist for the different types of the aforementioned optimization problems. However, the classical solution approach involves the use of numerical algorithms that have originated ever since the invention of the popular simplex algorithm for linear programming by Dantzig [1] in the late 1940s. Thereafter, many numerical algorithms such as gradient-based methods, conjugate gradient methods, Newton and quasi-Newton methods have evolved into powerful techniques for solving large scale nonlinear optimization problems. This category CHAPTER 1. INTRODUCTION 9 of algorithms is classified as exact or complete methods and constitutes the start-of-the-art approaches for solving various types of optimization problems in diverse fields. Subsequent to the development of the exact methods, a number of solution methods that are based on various heuristics are developed. This category of algorithms also called approximate algorithms can be successfully applied to a wide range of optimization problems with little or no modifications in order to adapt to any specific problem. The term metaheuristics originally coined by [2] is a generic term that was introduced to delineate a universal algorithmic framework designed to solve different optimization problems based on probabilistic decisions made during the search process. These approximate methods are usually easier to implement than their exact counterparts like the classical gradient-based algorithms. Although the approximate algorithms are mainly stochastic in nature, their main difference to pure random search is that randomness is guided in an intelligent and/or biased manner [2]. A large number of algorithms established on different theoretical paradigms and backgrounds such as the evolutionary computations (EC) like genetic algorithms (GA), genetic programming (GP) and evolutionary strategy (ES), simulated annealing, tabu search, ant colony optimization, artificial immune system, scatter search, estimation of distribution algorithms, multi-start and iterated local search algorithms, to mention a few, are typical examples of metaheuristics that fall into the category of approximate algorithms. It has become evident that [3], many real-world large scale optimization problems elude acceptable solutions via simple exact methods or even the approximate metaheuristics when applied independently. Therefore, in the recent years, researchers have become increasingly interested in the concepts that are not limited to the use of a single traditional algorithm, but combine various algorithmic ideas from different branches of artificial intelligence, operations research and computer science [2]. The combination of such algorithms is what is referred to as hybrid algorithms or hybrid metaheuristics. A skilful hybridization of algorithms is believed to provide a more flexible and efficient solution method that is suitable for large scale real-world problems. In fact, the need for hybrid algorithms surfaces and gains popularity after competing research communities have waived their traditional stance and believe in the invincibility of some classes of algorithms and philosophies that were regarded as generally the best. It has become apparent that there cannot be a general optimization strategy which is globally better than any other. This argument was initially resolved—to some degree—following the proposal by Wolpert and Macready of the well known no free lunch (NFL) theorem [4]. The NFL theorem proved that on average over all possible functions/problems, the performance of all search/optimization methods that satisfy certain conditions is the same. Hence, as declared by [5, 6] among others, the primary motivation behind the notion of hybridizing algorithms was to come up with robust systems that harness the benefits of the individual algorithms while discarding their inherent weaknesses. CHAPTER 1. INTRODUCTION 1.2 10 Motivations Despite the growing interest in the area of hybrid algorithms, more needs to be done to address matters of crucial importance vis-à-vis: • Establishing a proper categorization of the hybrid strategies based on the expected precision or solution quality required for any given problem instance in the intended area of application. • Assessing based on the overall optimization goal the composition of the hybrid scheme as to whether it should comprise of algorithms from only approximate metaheuristics, exact algorithms or a mixture of the two. • Ascertaining when and why the identified approaches should be combined in an interleaved, paralleled or sequential manner. • Enhancing the capabilities of the individual algorithms prior to hybridization, specifically focusing on the identified key features of the algorithms that are expected to play major roles in the hybridized system. • Identifying at what stages of the solution process the key features of the algorithms can effectively be exploited to optimally benefit from the hybridization scheme. For instance, ensuring proper convergence assessment and maintenance of useful level of diversity at different stages of a typical EC algorithm. • Use of the well-known measures of problem difficulties [3] to judge the complexity of the problem categories upon which the hybrid algorithms are expected to be applied. • Developing hybrids that combine approximate algorithms with the state-of-the-art of exact optimization techniques like the sequential quadratic programming (SQP) algorithm1 . This type of hybridization scheme is also called memetic algorithms [7]. It is believed that although the approach can be very successful in practice, so far not much work exists in this direction [8, 9]. 1.3 Aims and Objectives The aim of this research was; to analyse and elucidate the current trend in hybridization of algorithms for optimization; to propose a novel hybrid optimization method that combines EC algorithm (for global searching) and an interior point method (IPM) based SQP algorithm (for local searching) to address large scale global optimization problems. And ultimately, to extend and apply the proposed system to deal with complex practical optimization problems such as dynamic optimization problems and control of feedback systems like PID tuning2 in an efficient manner. 1 SQP is a gradient-based local search algorithm that is guaranteed to yield a solution for every finite size instance of constrained optimization problem in bounded time. 2 PID stands for proportional-integral-derivative and PID controller is a generic control loop feedback mechanism that is widely used in industrial control systems. As one of the most commonly used feedback controllers, PID requires optimal tuning of its parameters. CHAPTER 1. INTRODUCTION 11 The first objective of this report was to examine evolutionary computation algorithms (GA in specific) and their hybrids. We conduct an in-depth investigation on the parameterization aspect of EC algorithms. We investigate the effect of elitism in EC algorithms and propose a novel adaptive elitism method based on the overlapping population technique. We further analyse the convergence criteria of EC algorithms, model and quantify the individual contributions of the genetic operators involved in the evolution dynamics using extended Price’s equation. We also demonstrate how to use the resulting Price’s equation model as a criterion to measure and fully assess the convergence of the proposed EC algorithm. Secondly, we review local search optimization algorithms giving emphasis to quasi-Newton based numerical techniques. We investigate various methods for approximating and updating the Hessian matrix. We then extend the IPM based SQP algorithm [10] that uses BFGS Hessian approximation3 to use exact Hessians so as to effectively solve complex constrained nonlinear optimization problems. The third objective was to study the technique of automatic differentiation (AD) for exact gradient and Hessian calculations. We investigate both the forward and reverse accumulation methods and then design an automatic differentiation tool based on the operator overloading principle. We implement the AD tool using object oriented design principle in Matlab environment. We then demonstrate how to adopt the AD tool to boost the capabilities of the proposed local search algorithm. Finally, we examine the current trends in the design and applications of hybridization methods for system optimization. And for the various techniques reported in the literature, we adopt the proposal in [5] to devise a generalization that categorizes the hybrid systems based on the types of the combined algorithms and how they are combined in view of the overall optimization goal. We then design a hybrid system that combines the proposed global and local algorithms in a collaborative, batched and weakly-coupled manner with a built-in self-checking procedure for validation. The technique is hoped to ensure improvements not only in the efficiency4 , but also in the robustness5 of the proposed hybrid system. 1.4 Hypotheses In the following, we recast the aims of this research into the following hypotheses. Therefore, our overall objective is to verify the following: #H1: Hybrid global and local search methodologies provide good search strategies. #H2: Specific types of local search algorithms (e.g. SQP/IPM)[10] are efficient in locating local optima. #H3: Local optimization methods alone may not provide fast convergence to the global optimal solution. 3 In numerical optimization, the Broyden-Fletcher-Goldfarb-Shanno (BFGS) method permits approximation of the Hessian matrix using rank-one updates specified by gradient evaluations (or approximate gradient evaluations) [11]. 4 Efficient: The overhead as a result of the combination of the two algorithms will be minimized. 5 Robust: It will ensure convergence to the optimal solution for wider range of problems with different levels of difficulties. CHAPTER 1. INTRODUCTION 12 #H4: Hybridization of global and local optimization algorithms should provide fast convergence to the optimal solution. #H4.1: The global and local algorithms can serve as a means to validate each other’s result. 1.5 Scope and Limitations The scope of this work was to deal with continuous optimization problems that are either local or global in nature. Hereby, the report is limited to problems that can be mathematically modelled in form of differentiable functions with at least second derivatives available. 1.6 Chapter Organization and Summary Besides the introduction in this chapter, chapter 2 and 3 focus mainly on the principles and dynamics of evolutionary computation algorithms. Chapter 2 provides an in-depth review on the current trend and challenges militating against the development and simulation of evolutionary processes, particularly, the parameterization aspect of evolutionary algorithms in examined. This chapter lays out the evolutionary paradigm that will be used throughout this report. Chapter 3 further analyse the convergence characteristics of evolutionary algorithms and presents a fundamentally new way of perceiving the individual roles of evolutionary operators/processes towards the success of the evolution. It then empirically analyse the efficacy of crossover in convergence detection in evolutionary computation. The chapter provides a foundation that will aid establishing a new hybrid strategy for the proposed system. Chapter 4 investigates the framework of local optimization algorithms with particular emphasis on the gradient-based methods. The design of the sequential quadratic programming (SQP) algorithm and interior point method is investigated. The chapter then presents how an algorithmic approach for effective evaluation of derivatives could improve the convergence characteristics of the local search SQP algorithm. In chapter 5, various techniques for hybridizing optimization algorithms are examined and a chronological taxonomy of various categories of hybrid algorithms is presented. The chapter presents a novel approach for hybridizing the EC algorithm with the SQP algorithm. A series of experiments undertaken to evaluate the proposed hybrid system are then analyzed. Finally, Chapter 6 summarises the current work, discusses, in general, the outcome of our initial investigations. The chapter then concludes by pinpointing the open questions that will guide our further research in this direction. Chapter 2 Evolutionary Computation Algorithms–An Overview In this part of the report, a review focusing on the foundation, development processes, mechanics and simulation of evolutionary computation (EC) algorithms will be provided. Details of parameterization aspect of EC will be investigated. Emphasis will be given on the rise in the earlier notion of standard parameter sets to the current trends of adaptive and dynamic systems that lead to the development of improved genetic algorithms. The chapter will conclude with the proposal of a novel adaptive elitism technique. 2.1 Introduction Evolution is a process that originated from the biologically inspired neo-Darwinian paradigm [12] (i.e. the principle of survival of the fittest). It is believed to be a collection of stochastic processes that act on and within populations of species. These processes include reproduction, mutation, competition and selection [13]. In the late 1950s, evolution was understood as an optimization process that naturally shapes and maintains the balance in the existence and progress of individuals’ life. As reported in [14], a salient rule of thumb of evolution as have come to be understood is that ”Darwinian evolution is essentially an optimization technique. It is not a predictive theory, nor is it a tautology”. Thus, as in most optimization processes, the solution point(s) are discovered via a trial and error search process. The far reaching impact of the idea of evolution has gone beyond the classical boundaries of biological thoughts. In what is termed as evolutionary computation (EC), the process of evolution has now become an optimization tool that can be simulated and applied in solving complex engineering problems. Evolutionary computation algorithms are designed to mimic the intrinsic mechanisms of natural evolution and progressively yield improved solutions to a wide range of optimization problems. This is evident because, the success of these algorithms is always not directly inclined to the domain knowledge specific to any problem. The three popular evolutionary computation algorithms that stand out are genetic algorithm 13 CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 14 (GA), evolutionary strategies (ES) and evolutionary programming (EP). These techniques are all built around the common principles of natural evolution and rose almost independently of each other. They are strongly interrelated and differ mainly in the data structures used to represent individual solutions, the types of genetic alterations on current individuals to create new ones (i.e. genetic operations such as reproduction and mutation) and the techniques for selection after competition. In the original implementation of genetic algorithms, their data structure enforces representation of candidate solutions as binary vectors. In their distinct nature, evolutionary programming algorithms use finite state machines for representing candidate solutions, whereas in evolutionary strategies solution points are directly represented as real valued vectors. With the growing interrelations among these techniques, their minor differences blurred especially with regards to the choice of data structure and genetic operators. Recently, a number of experimental results have shown that [15, 14], problem dependent representation of candidate solutions can significantly improve the effectiveness of the overall optimization process thereby avoiding the problem of mapping between various representations. As highlighted in the previous chapter, the aim of this work was to use genetic algorithms as global optimization method. Thus, subsequent treatment of the evolutionary computation literature will focus mainly on the evolution principles of genetic algorithms. 2.2 Background and Process Dynamics of Evolutionary Computation Genetic algorithms are evolutionary based algorithms originally inspired by Holland in the 1970s and the principles of which is extensively disseminated in his book Adaptation in Natural and Artificial Systems [16]. Although Holland’s contribution to the development of the original ideas has been quite remarkable, history has shown that quite a number of researchers working on the same area have also contributed immensely in the design and development of these techniques. In late 1960s, an independent work by Schewefel and Rechenberg [9] led to their proposal of the technique of evolutionary strategies. Parallel to that Fogel [17, 18] and his colleagues implemented the idea of evolutionary programming which also is based on natural evolution principles. Hitherto the work of Goldberg [19] who researched and extensively outlined the typical form of the genetic algorithm used today, prior proposals were mainly mutation and selection based without incorporation of the recombination operator. Detailed historical background on genetic algorithms can be found in the excellent collection by David Fogel [20]. Genetic algorithms have proven to provide a heuristic means of solving complex optimization problems that require a robust solution method. Recently, they have been successfully applied in the areas of computing and industrial engineering such as vehicle routing [21], scheduling and sequencing [22], network design and synthesis [23, 24], reliability design [25], facility layout and location [26], to mention a few. Contrary to the traditional optimization methods, as depicted by figure 2.1, genetic algorithm is an iterative procedure that starts with an initial fixed set or pool of candidate solutions called population. A candidate solution point is called an individual and represents a possible CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 15 Evolution Computation – GA Principles Initial Population Evaluation Stopping Condition Selection Crossover Best Solution Evolution Spaces Phenotype Genotype Mutation 5 Figure 2.1: Flowchart of a Typical Genetic Algorithm solution to the problem under consideration. An individual is represented by a computational data structure called a chromosome. Usually, a chromosome is encoded as a string of symbols of finite-length called genes. The possible values a gene can take correspond to the allele. As proclaimed by [27, 28], a chromosome can be a binary bit string or any otherwise representation. The chromosomes in the initial population are usually created randomly or via a simple heuristic construction. During each iteration step, called a generation, a stochastic selection process is applied on the initial population to choose better solutions following an evaluation that is based on some measures of fitness. Chromosomes that survive through the selection process constitute a new set called parents and are qualified to take part in the remaining stages of the evolution process. In order to explore other areas of the search space, the parent chromosomes undergo recombination and/or mutation operations and generate a new set of chromosomes called offspring. The recombination entails exchange of characteristics by merging two parent chromosomes using a crossover operator, while mutation operation is a genetic alteration of a randomly chosen parent chromosome by a mutation operator. A new generation of chromosomes is then formed by selecting from either the combined pool of parents and offspring or the offspring pool based on a prescribed fitness measure. Fitter chromosomes have higher chances of being selected and the average fitness of the population is expected to grow with successive generations. The process continues until a termination criterion is met or it ultimately converges to the best chromosome which hopefully represents the optimum or suboptimal solution to the problem. Notice how figure 2.1 categorizes the key GA components on the basis of the evolution space they operate, details on this will be given in section 2.3. 2.2.1 A Generalized Model for Genetic Algorithm Based on the foregoing discussion on GA dynamics, without loss of generality, the evolution processes involved in a typical genetic algorithm can be modelled as shown in Algorithm 2.1. For any generation t, the parameters P (t), Qs (t), Qr (t) and Qm (t) used in this algorithm CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 16 respectively represent the population at the initial generation, at the end of selection, and after recombination and mutation operations. Algorithm 2.1 A Canonical Model of Genetic Algorithm begin t ← 0; initialize P (t); evaluate P (t); while not termination do Qs (t) ← select P (t); Qr (t) ← recombine Qs (t); Qm (t) ← mutate Qr (t); evaluate Qm (t); P (t + 1) ← select Qm (t) ∪ Pm (t); t ← t + 1; end while end Because of their simple and stochastic nature, GAs require only the evaluation of the objective function but not its gradients. Such a derivative-free nature relieved GAs of the computational burden of evaluating derivatives especially when dealing with complex objective functions where derivatives are difficult to compute. The randomness in GAs improves their versatility in escaping the trap of suboptimal solution which is the major drawback of gradient based optimization techniques. Goldberg [29] summarises the following key features of GAs that made them robust optimization search methods. • Genetic algorithms search from a population of solutions, not a single solution; • The genetic operations (i.e. recombination and mutation) work on the encoded solution set, not the solution themselves; • The evolution operation (i.e. selection) uses a fitness measure rather than derivative or other auxiliary knowledge; • The progress of the process relies on probabilistic transition rules, not deterministic rules. 2.3 Simulation of Evolution: Phenotype and Genotype Spaces In spite of the simplicity in the informational physics of the processes governing evolutionary system, it has always been an area of misunderstanding to clearly delineate which part of the evolution occurs at what space. Atmar [14] argued that it is only possible to adopt and successfully simulate the process of natural evolution for engineering purposes if the physics of evolution is well understood and the sequence of causation is represented appropriately. Formally, evolutionary system inherently runs in two distinct spaces: phenotypic and genotypic spaces [30]. The phenotype space P represents the behavioural or physical characteristics of an individual or chromosome, whereas the genotype space G is the encoding space and represents CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 17 the exact genetic makeup of a chromosome. Figure 2.2 shows a simple simulation of evolution processes within and across generations depicting various genotype-phenotype mapping functions. 1st Generation 2nd Generation P f2 P f1 P f2 f3 G Nth Generation f1 f4 f2 f3 G f1 f4 G Figure 2.2: Simulation of Genotype-Phenotype Mapping Functions Very often, simulated evolution mimic the natural evolution by creating the initial population as a set of chromosomes encoded in a genotype space. Thus, the process usually begins in a genotype space with gi ∈ G population that evolve over generations and finally ends with a solution set pi ∈ P in a phenotype space as described in the following steps. i) The first mapping function f1 : g → p decodes from G to P space such that each gi is translated into phenotype pi and get evaluated. Thus, the function shifts the evolution from the genotype to the phenotype space. ii) The second mapping function f2 : p → p describes the selection operation. It is the process of choosing individuals for reproduction and it occurs entirely in the phenotypic space. iii) The third mapping function f3 : p → g describes the genotypic representation. It is the process of encoding the genotype prior to reproduction and shifts the evolution back to genotype space. iv) The fourth mapping function f4 : g → g is the reproduction function. It is where the variation operations such as recombination and mutation take place. It incorporates the rules of random and directed coding alteration during the reproduction process. This process entirely happens in the genotype space and it is where the transition from current generation to the next occurs. Lewontin [30] stressed that although the distinction between evolutionary spaces P and G is sometimes illusory, it is very important to clearly understand which part of the evolutionary process take place at which state space. Failure to clearly delineate the two spaces led to the confusion that surrounds the theory of evolutionary dynamics. 2.4 Initialization of Evolutionary Computation Algorithms A number of questions need to be answered in order to properly set up an EC model for any optimization problem under consideration. Of primary importance are the choices of suitable CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 18 data structure (i.e. chromosome representation and encoding), the method of creating the initial population and its size. In the following we will consider binary encoding in EC and its mapping method between the genotype and phenotype spaces. 2.4.1 Representation in Evolutionary Computations Defining a proper representation scheme for an EC algorithm is crucial to its overall performance with regard to efficiency and robustness. Holland’s original idea [16] advocates the use of binary representation and was based on the motive of ensuring the genetic processes operate in a domain (i.e. space) that is distinct from that of the original problem. This will ultimately enhance the robustness of evolutionary algorithms by making them more problem-independent. Furthermore, binary representation can ease the task of design and implementation of the major evolutionary reproduction operators. As a crucial part in EC algorithms, [31] categorizes the parameterization aspect of EC algorithms into two groups: structural and numerical and argue that representation constitute the major part of the structural group. The following section will show how the mapping between a genotypic space (encoded in binary) and a phenotypic space (in real-valued) can be achieved with any level of precision. 2.4.2 Real-Binary Encoding and Mapping functions Since our goal is to design a hybrid EC algorithm for solving continuous linear/nonlinear problems where in most cases the design variables are usually real-valued, integer or mixture of the two, a real-coded binary representation will make a good choice. Consider the problem shown in equation (2.1) [32]. It is a continuous optimization problem that requires maximizing the function over the search space v = {x ∈ R : x = {−5.0, 5.0}}. The optimal solution x∗ is a real number in the range [−5.0, 5.0]. This problem can adequately be encoded if the range of the design variables and the precision requirement is known. f (x) = n X xi sin p  |xi | ; −5.0 ≤ xi ≤ 5.0; n = 1, 2, ... (2.1) i=1 The first step is to encode the problem domain data from the phenotype space into a sensible formulation for the EC process (i.e. the genotype space). For any variable ai ≤ xi ≤ bi : a, b ∈ R, assuming the precision requirement p is two places after decimal, i.e. p = 10−2 , then, length for the binary bits li required to map the real variable xi into a corresponding binary variable x0i can be derived from: 2li −1 ≤ (bi − ai ) × 1 ≤ 2li : li ∈ N p Thus, for the problem in (2.1), we have: 2li −1 ≤ (5 − (−5)) × 1 ≤ 2li 10−2 2li −1 ≤ 1000 ≤ 2li (2.2) CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 19 29 ≤ 1000 ≤ 210 Hence, the required bit length for the variable x0i is li = 10. Now, for any multidimensional function having x1 , x2 , ..., xn real variables, if each of these variables is mapped to its corresponding binary variable x01 , x02 , ..., x0n , then, for a population of size N , every individual binary chromosome x̃k is obtained by concatenating all the binary variables as follows: x̃k = x01 | x02 | ... | x0n : k = 1, 2, ..., N (2.3) Hence, the length of the resulting binary chromosome x̃k is L which is equal to the sum of the bit length li of all the n binary variables x0i , such that L= n X li . (2.4) i=1 It is worth mentioning at this point that the precision requirement for the decision variables may differ from one variable to another within a given problem. Thus, in a general case, if a decision variable is defined in the range ai ≤ xi ≤ bi : a, b ∈ R, in order to map it to a binary string of length li , the precision is: pi = bi − ai . 2li − 1 (2.5) Having successfully encoded the problem into binary (i.e. the genotype space), decoding chromosomes back to the phenotype space is a reverse process and it is necessary for evaluating their fitness before selection. This process entails the following two steps: First: Decomposing the binary chromosome x̃ into its constituent binary variables x0i . This requires splitting the L bits of x̃ into a chunk of li bits corresponding to the x0i binary variables. Then, the corresponding real variables xi are derived via binary to decimal transformation of the li bits of x0i , such that: xi = li X bj 2li −j : i = 1, 2, ..., n. (2.6) j=1 where bj are the binary bits of x0i , li is its length and n is the total number of these variables. Second: Mapping the obtained real variables xi to conform to their originally defined ranges ai ≤ xi ≤ bi , such that: xi = ai + bi − ai 0 x : ∀i = 1, 2, ..., n 2li − 1 i Hence, for the problem under consideration (2.1), we have xi = −5.0 + 5.0 − (−5.0) 0 xi . 210 − 1 (2.7) CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 20 xi = −5.0 + 0.009775x0i . Example Supposing for the problem in (2.1), the value of the first variable is x1 = 3.0, and its precision requirement p1 = 10−2 , then, based on equation (2.2), the required bit length to represent (−5.0 ≤ x1 ≤ 5.0 : x1 = 3.0) in binary is determined to be l1 = 10. Hence, the 10 bits binary equivalent of x1 is: x01 = 0000000011. Suppose after the parent chromosome of x01 undergoes genetic reproduction (i.e. crossover and mutation), the value of x01 get transformed to x01 = 1011000010. Then, in order to derive the corresponding phenotype value, this is first converted to a decimal value x1 = 706, and then mapped to its prescribed domain/range according to equation (2.7) to obtain the true phenotype value of x1 as follows: x1 = −5.0 + 0.009775x0i = −5.0 + 0.009775 × 706 = −4.37  Although this may seldom happen, situations arise where binary representation is not only promising but is also the natural choice. The knapsack problem in operations research is a typical example. The 0-1 knapsack problem consists of a set of n items to be packed into a knapsack of size K units. If each item has a weight wi and is of size ki units, then the goal is to maximize the weight for a given subset I of the items such that: max X wi : i∈I X ki ≤ K. i∈I Reeves et al. [9] have shown that the knapsack problem can be reformulated as an integer programming problem and a solution can be represented as a binary string of length n. In such case, there will be no distinction between the genotype and the phenotype and thus completely eliminating the need for mapping functions. In the past, the general view in the EC community regarding problem’s data structure and the choice of suitable EC algorithm was to match the problem to an appropriate EC algorithm. Evolutionary strategies were designed based on real valued representation and are therefore used for continuous problems. Genetic algorithms were primarily designed for discrete optimization and thus originally use binary representation as a norm. However, many researchers [2, 15, 33] have pointed out that this is not the case at the moment as every one of these algorithms is been successfully used with all kinds of representations for various optimization problems. 2.4.3 Other representations in the Literature Many types of representations for genetic algorithms are echoed in the literature for different problem domains. Special cases arise where the binary representation is inadequate or even unsuitable for the problem under investigation. Greenhalgh et al. [34] argue that although CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 21 Goldberg’s [29] notion of implicit parallelism in genetic processing favours binary representation, practitioners report better performance with non-binary representations in many applications [35]. Rees et al. [36] extend their results from binary to alphabets of cardinality of powers of 2 (i.e. 2x ) and uphold the use of higher cardinality representation by deriving an upper bound for the required number of iterations for such higher cardinality GAs to visit all individuals in a population. Thus, in some situations, use of problem dependent representations is necessary. For instance, the rotor stacking problem originally described by [37] is a typical discrete non-binary problem that requires higher cardinality (k-ary) to be properly represented. For a set of n rotors having q holes to be stacked, a straightforward representation is to create a candidate solution with a fixed length of n-bits with cardinality q-ary corresponding to the number of holes in a rotor. This means that for a problem of stacking 10 rotors each having 3 holes, a candidate solution is a string of length 10 that is made from a 3−ary dataset. It is interesting to note that for q = 2, rotor stacking problem reduces to binary and therefore, binary representation would be the best choice. Very often, apparent representation schemes exist that can best suit the problem to be modelled. Optimization of permutation problems is a typical example where there is a natural choice for representation. Here, the representation can directly be defined over the range of all the possible permutations. A typical example is the work on flowshop sequencing scheduling problem by [38]. Flowshop sequencing is a permutation problem in which n jobs are to be processed on m machines over a certain time limit. The objective was to find the permutation of jobs that will minimize the total time required to complete all the jobs (i.e. the makespan). For any job i on machine j with a job permutation set {J1 , J2 , ..., Jn }, instead of developing a complex representation, the authors directly represent the schedule as a k−ary integer problem and develop suitable genetic operators that will ensure generation of feasible solutions. In a similar approach, Man et al. [22] proposed a non-binary representation for a combinatorial optimization problem of scheduling partially ordered tasks in a multiple processor environment. The goal was to schedule an optimal execution of τi ∈ T set of tasks with each requiring a duration di on a set of pi ∈ P processors. Each processor can only execute one task at a time and the entire problem is subject to a set of temporal ordering constraints O. The authors developed an interesting problem specific representation that best suit the problem’s requirement and use specialized genetic operators for the reproduction operation. Elsewhere, Chambers [33] proposed a generalized model for scheduling problems in which a scheduling strategy is parameterized and used in matching various loop characteristics to system environment. The various parameters for the generalized loop scheduling strategy are concatenated into a binary chromosome representing a candidate solution for the problem. The binary representations are decoded into integer values during the simulation process. The author argued that since GA does not impose any specific rules in encoding chromosomes, the quality of the resultant solutions does not depend on the arrangement of the parameters within the chromosomes. As noted by [23], majority of the researches on network configuration and distribution systems have adopted direct representation for the state of the network [39, 40, 41]. This entails CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 22 setting the bits of the chromosomes to the status of the switches (i.e. open or close state) in the network with each chromosome having a length equal to the number of the switches. The advantage is that no extra decoding task is required as the design made the genotype to map directly to the phenotype. However, with this representation, genetic operators often yield infeasible solutions which require a repair mechanism. This adds a computational overhead and intuitively offsets the paradigm of natural evolution. Realizing the critical role of chromosome representation in the overall success of GA, Queiroz et al. [23] suggest a tree-like representation for the network reconfiguration problem of finding a topology that will minimize technical losses throughout a given planning period. They adopted the so-called network random keys (NRK) [42] representation for minimum spanning tree problem. NRK is an arc-based representation that can exploit the sparsity in the distribution networks graphs. The representation defines chromosomes to be of length equal to the number of arcs in the network and to consist of integer weights corresponding to each arc. The authors used minimum spanning tree algorithm to map the chromosome into a tree for evaluation and argued that the proposed design ensures production of feasible solution by crossover and mutation operators. Although the formulation yields a suitable data structure for the evolution operators in genetic algorithm, the authors admit that it leads to a larger optimization problems than was needed to identify the best configuration for the fixed demands due to apparent increase in the number of variables. Worth mentioning at this point is the assertion that designing representation schemes that easily map the genotype to phenotype is very essential as it limits the overhead caused by complex mapping functions [43]. Very often, complex encoding functions tend to introduce additional nonlinearities, discontinuities and multimodalities to the optimization problem. This can hinder the search process substantially thereby making the combined objective function more complex than that of the original problem. Elsewhere, Radcliff et al. [7] introduced the concept of allelic-representation and described how it distinctively differs from the traditional genetic representation. The authors present formalizations for both the genetic and allelic representations and use it to model a typical travelling salesman problem (TSP). They argue that unlike the former, the latter representation can always yield feasible solutions following the action genetic operations. For a search space P (of phenotypes) and a representation space G (of genotypes), given any solution in P, a representation function ρ(P, G): ρ: P→G (2.8) returns the chromosome in G that represents it. The representation function is injective such that there is a one-to-one mapping between any solution point in the phenotype P to any chromosome represented in the genotype G. In the context of genetic representation, a formal allele is formulated as an ordered pair consisting of a gene and one of its possible values, such that a chromosome: χ = (x1 , x2 , ..., xn ) has alleles (1, x1 ) , (2, x2 ) , ..., (n, xn ). Thus, in an allelic representation, instead of being a CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 23 vector, a chromosome is a set whose elements are drawn from some universal set A. A rather recent application of GA on feature selection problem by [44] demonstrates how binary representation can be used to appropriately represent chromosomes. The author noted that feature selection problems have exponential search space making genetic algorithms the natural choice for their optimization. A string of binary digits is used to represent a feature with values of 1 and 0 indicating a selected and removed feature respectively. Thus, a chromosome D has a length equal to the size of the feature set and each gene in the chromosome carries the status of the feature. A chromosome 01001010 has the second, fifth and seventh features selected with the rest turned off. Controlled mutation and crossover operators were used to ensure generation of feasible chromosomes. Nevertheless, a common point of consensus in the field of hybrid metaheuristics is that use of problem specific representation is viewed by many [2, 15, 44, 8] as an act of hybridizing genetic algorithms. This kind of hybridization is believed to crucially affect the performance of the EC algorithm. Details on hybridization techniques will be presented in later sections. Table 2.1 compares and summarises the various representation techniques reviewed from various domains of the evolutionary computation. It highlights the cases when phenotype-genotype mapping functions is necessary and pinpoints a suitable category of the genetic operators to adopt. Ultimately, although problem specific representations have received wide acceptance in the EC community, they still have both their merits and demerits and should be used with great caution. This is because, although using them may improve the performance of an EC algorithm, the improvement is usually limited to only that specific problem. It also risks losing the problem independence nature of EC algorithms which is what make them robust and widely applicable. 2.4.4 EC Population: Creation and Sizing Evolutionary computation algorithms enjoy global search capabilities mainly due to their population based nature. The initial population in a typical genetic algorithm is mainly created randomly and of fixed size. For some problems where domain knowledge is cheaply available, simple heuristic constructions allow creation of suitable initial population or via seeding process in which some supposedly good solution are injected into an initially random population. If we consider the initial population as representing a set of points in the search space of all possible populations, then, evolving over one generation effectively shifts the initial population to a different set of points in the search space. Thus, this action of evolution can be seen as a dynamic process that build-up the quality of the initial population that was randomly created. At low population sizes, a GA makes many decision errors and the quality of convergence suffers, but larger population sizes allow GA to easily discriminate between good and bad building blocks. And as suggested by [45], it is the parallel processing and recombination of these building blocks that lead to deriving quick solution of even large and deceptive problems. Empirical investigations by De Jong [46] have shown that for a standard GA having binary representation, population sizes of 50−100 are sufficient for wide range of optimization problems. In spite of the several theoretical viewpoints to the choice of population size, the underlying CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 24 Table 2.1: A Summary of Commonly used Representation Methods in Genetic Algorithms Category Discrete Binary Discrete Non-Binary Permutation Example Problems Knapsack problem [9] Network distribution [39, 40, 41] Feature selection [44] Rotor stacking [37] Network reconfiguration [23] Flowshop sequencing [38] TSP problem [7] Process scheduling problem [22] Combinatorial Parameterized scheduling strategy [33] Continues Non-discrete linear/nonlinear problems Representation Type PhenotypeGenotype mapping Genetic Operators Type Direct binary No Generic Direct binary No Generic Direct binary No Generic Yes Problem specific Yes Problem specific Higher cardinality q−ary representation, q>2 NRK, using minimum spanning tree algorithm Direct integer, range of permutation Allelic, using ordered pairs No Yes Problem specific Problem specific Problem specific Direct integer No Binary encoding Yes Generic Real encoding Binary encoding Gray code No Yes Yes Generic Generic Generic trade off between efficiency and effectiveness remains. For a given string length, larger population sizes facilitate exploration of the problems search space but can impair the efficiency of the search process. On the other hand, too small population size would not permit adequate exploration of the promising areas of the search space and may risk convergence to a suboptimal solution. Hence, determination of appropriate optimal population size still remains an open area of further research [47]. In an attempt to establish the relationship between population size and string length, using the idea of schemata Goldberg [48] had earlier suggested an exponential growth in population size with respect to string length. This was later denounced after a number of empirical investigations by Schaffer [49] and Grefensette [50] which show that a linear relation is sufficient. Since string length significantly increases with even a slight increase in problem size and/or parameter precision, a point of further argument remains what could be regarded as the minimum population size for a realistic evolutionary search. An interesting finding by [51] reveals that at the very least, there should be one instance of every allele at each locus in the whole population of strings. This sets a minimum requirement for every point in the search space to be reachable from the initial population by a recombinative CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 25 genetic algorithm (i.e. a GA having only crossover operator). For a typical binary representation, the probability that at least one allele is present at each locus was found by [51] to be P =   N −1 !l  1 −l , 1− ≈ exp 2 2N −1 (2.9) where N is population size, l is the strength length. Thus, for 99.9% confidence interval, i.e. P ≥ 99.9% , the minimum population size N can be evaluated as: & log ln−lP N ≈ 1+ log 2 28 '   log (999.5 × l) ≈ 1+ . log 2 (2.10) CHAPTER 2. BASIC PRINCIPLES Worth noting is that the expression for N here does not set the optimum value for the population size. It however prescribed a threshold value below which the population may not guarantee adequate exploration of the problem space by a genetic algorithm. Thus, in the experimentations presented in the later chapters, a much larger population size is used to avoid undersampling the search space. Nevertheless, extended application of formulation (2.10) for higher cardinality representations can be found in [51] and an interesting plot for the threshold values of the minimum population sizes N for higher q−ary representations is shown in figure 2.3. Figure 2.3: Minimal Population sizes N for 99.9% confidence interval of having all allele in the initial population [9], where q is the arity of the representation, e.g. q = 2 for binary. As can be seen from the family of curves in figure 2.3, the minimum population size required when a binary representation (i.e. when q = 2) is used with up to a string length of 200 bits is not more than 20 individuals. However, this threshold grows as the cardinality of the problem’s representation increases. We must remark here that the values shown by the curves are not the optimal values for the population size, neither are they sufficient for a realistic global search, but they are necessary and can be used to justify why it is possible for GA to converge to the optimal solution with an extraordinarily small population size. The study of evolutionary properties of a typical population under the influence of genetic CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 26 operators resulted into an interesting development of a dynamical system model for the space of all possible population. A population sizing equation was proposed by [45] that facilitates accurate statistical decision making among competing building blocks1 in a population-based search methods like GA. Parallel to that Rowe [47] proposes a mathematical model for a population and use it to analyse the effect of selection, mutation and crossover operators. The model permits investigation of the probability distribution of the next population, predicting the expected next population and analysing the long-term behaviour of the population. Assuming binary representation with string length l having a search space S = 2l , a population P of size N can be represented as a vector comprising of the proportions of each element Si in the search space S such that: P = (p0 , p1 , ..., pS−1 ) ; pi ∈ R : pi = Si N (2.11) Supposing a population of size N = 10 contains one copy of 00, three copies of 01, two copies of 10 and four copies of 11, then, the corresponding population vector P can be represented as P = (0.1, 0.3, 0.2, 0.4) Rowe argued that the population vector P which is an element of vector space RS satisfies the following three important properties that qualifies it as a simplex and can be denoted by Λ. First, a number of population vectors are added together will yield another vector which is also in the search space RS . Second, since each element pi ∈ P is a proportion, then, 0 ≤ pi ≤ 1. And finally, the sum of all elements in a given population vector is 1, i.e. n−1 X pi = 1. i=0 As GA progresses from one generation to another, in spite of the randomness induced by stochastic evolutionary operators, the dynamical model makes it possible to predict the expected next population since the probability distribution of the population vector P is always a member of the set Λ. Consequently, if the population size is large enough (i.e. as N → ∞), the chances of having the next population been the expected one grows. In the limit, when the population size is infinite, the next population can accurately be predicted thereby turning the search process into a deterministic one. Because of this important property, the dynamical system model is often referred to as infinite population model. And in essence, this concept is now used to predict the behaviour of finite populations typically used in genetic algorithms. Details can be found in [47]. 2.5 The Selection Process in Evolutionary Algorithms As argued by many [52, 2], selection is the driving force in evolutionary algorithms. Although evolution as a whole is seen as a set of processes that operate on chromosomes represented in 1 The phrase Building Block (BB) was used by Holland [16] to represent the short, low order (or low defininglength) schemata. Building Block Hypothesis (BBH) suggests that GA performs adaptation efficiently by combining and processing these short, low order schemata (BB) which have above average fitness [29]. CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 27 the genotype space, selection process works on the original form of the encoded problem, i.e. in the phenotype space. According to Darwinian notion of natural selection [14], so long as the genes (encoding space) and the behaviour (phenotype space) are separate entities, as they are almost always are, selection optimizes the functional behaviour not the underlying code. Thus, selection methods in simulated evolution also imitate the process of natural selection by choosing chromosomes that encode successful structures to undergo reproduction more often than others that do not. Successful chromosomes hereby refer to those individuals that after been evaluated happen to have higher fitness values relative to their counterparts. We must remark here that some researchers [53] in the area of evolutionary computation do take issue with this idea and raise questions like, “does natural selection always favours those behavioural strategies that seek to minimize expected loss?” In practice, there are varieties of selection methods in evolutionary computing, but not all of them directly use the fitness as the only criteria for carrying out the selection operation. The choice of appropriate selection method can be difficult as it involves deciding on crucial parameters like selection pressure, selection intensity, growth rate, takeover time etc. which consequently dictate the mode and rate of convergence of the EC. Thus, selection plays an important role in the parameterization of EC and as [54] asserts, selection is critical to the overall success of an EC algorithm. 2.5.1 Fitness Proportionate Selection methods Roulette wheel selection (RWS) is the simplest and most commonly used fitness proportionate (FPS) means of selection in EC. In this technique, an individual is selected in proportion to its fitness on the evaluation function, relative to the average fitness of the entire population. In other words, RWS has a probability distribution such that the probability of choosing an individual is always directly proportional to its fitness. This probability intuitively corresponds to the area of a sector of a roulette wheel (or the angle subtended by the sector at the centre of the wheel). The larger the sector, the higher the chances of having the individual been selected. Hence, the name of the roulette wheel selection method. For a simple construction of the roulette wheel, consider a population of size N consisting of a set of chromosomes {xi } : i = 1, 2, ..., N . Let the fitness evaluation function be f , then, the total fitness of the population F is F = N X f (xi ). (2.12) i=1 Therefore, the proportion of the fitness of chromosome xi corresponds to its probability, p(xi ): p(xi ) = f (xi ) : i = 1, 2, ..., N F (2.13) CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 28 and its cumulative probability q(xi ) is: q(xk ) = k X p(xj ) : k = 1, 2, ..., N ; q(xk ) ∈ [0, 1] . (2.14) j=1 Selection of N chromosomes requires spinning the wheel N -times which corresponds to N times sampling (with replacement) from a pseudo-random sequence rand ∈ [0, 1]. After every spin, chromosome xk is selected if the random number falls within the interval of its cumulative probability and that of its predecessor, i.e. if q(xk−1 ) ≤ rand ≤ q(xk ). It is not difficult to notice that chromosomes with higher fitness values will have larger cumulative probabilities and hence higher chances of been selected. Although RWS scheme enjoys a great level of simplicity, it suffers from at least three critical problems: (i) Sampling error: Because RWS uses pseudo-random numbers to choose an individual for reproduction, the expected number of times an individual is selected may significantly differ from the actual value as a result of high stochastic variability. In the worst case, the tendency of not having higher (best) fit individuals being selected by the roulette wheel increases. (ii) Scaling: In fitness proportionate selection methods, for any given evaluation function, if an individual has a fitness value of 2 and another has 4, the method will allocate twice chances of reproduction to the latter individual than the former. A mere shift of their fitness values by 1 (i.e. to fitness values of 3 and 5) will change the selection preference of the second over the first from twice to only 1.67-times. Another possible drawback of this lack of scaling in RWS is that at the early stages of evolution, majority of the individuals have fairly lower levels of fitness, if any individual happens to have relatively higher fitness value the selection method will favour it too much to the extent that the search process may prematurely converge to a sub optimal solution. (iii) Selection pressure: For the reason described in (ii) above, as the average fitness of the entire population increases, selection pressure falls. Thus, chances of selecting the best fit individual over the average (or worst) individuals dramatically drop. This may lead to stagnation of the entire search process. In summary, it is easier for FPS schemes to distinguish between values like (5 and 10) than (105 and 110). Thus, while too high genetic variation among individuals within a population results in excessive selection pressure and risk premature convergence, too little of this genetic variation collapses selection pressure and halts the evolution in FPS selection methods. A proposal by Baker [55] to address the sampling error caused by the excessive stochastic variability inherent in the RWS method is to use a multi-armed roulette wheel having equally spaced n-arms. Spinning the wheel ones will corresponds to sampling n pseudo-random numbers thereby allowing n selections at once. Thus, Hancock et al. [52] argue that this is a systematic random sampling and is superior from the statistical point of view over the traditional RWS CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 29 method. Another variety of RWS method can be found in [56] where RWS is used in job scheduling in a setup that favours lower fit individuals against those with higher fitness values. The commonly used measures [52, 33, 9] to tackle the lack of scaling in RWS include windowing and scaling (linear, sigma). Indeed these techniques can to some degree serve as a remedy to the scaling problem in RWS as empirically proven by [52]. However, in addition to the overhead involved, they principally fail to eliminate the sampling error inherent in FPS selection schemes. This is no doubt one of the reasons why, we can roughly argue from our literature survey that whenever an FPS selection method like RWS is utilized, elitist strategy will be explicitly adopted to avoid the risk of losing promising individuals due to sampling errors. 2.5.2 Ranking methods Ranking is another method developed to tackle the problems in FPS selection schemes. Originally proposed by Baker [57] it entails ranking the chromosomes in order of their fitness values. Although ranking can lead to loss of some information regarding the actual fitness of the chromosomes, it successfully eliminates the need of rescaling and yields a simple and efficient selection algorithm. Ranking technique assigns new fitness value f to a ranked chromosome i inversely proportional to its rank N in the population. The best individual is assigned a fitness value s : 1 ≤ s ≤ 2, the worse is assigned a value 2 − s while the intermediate individuals are assigned fitness by interpolation according to the following linear ranking equation. f (i) = s − 2i(s − 1) . N −1 (2.15) Apart from linear ranking, exponential ranking is another variant of ranked selection method designed to give more diverse population. The method favours worst individuals at the expense of the above average ones. Both linear and exponential ranking methods facilitate maintenance and tunability of the selection pressure throughout the evolution process. One major drawback [52] of ranking methods is the loss of information about the actual fitness values of the chromosomes. This can negatively alter the correlation between fitness and chances of reproductive success. 2.5.3 Tournament selection methods Tournament selection method is a non-direct fitness proportionate selection scheme. It was inspired by the natural mating contest in which a group of individuals compete for reproduction. Out of a population of size N , k individuals are selected at random for the contest. An individual with higher fitness value wins the contest and is forwarded to the reproduction phase. The process is repeated until the required number of individuals is selected. It can be observed that this technique may have several varieties since for instance; selecting the contestants can be carried out with or without replacement. It is worth noting that running a series of tournaments with replacement risks having the higher (best) fit individuals not been selected for any of the contests. This can primarily give rise to sampling errors in tournament selection that is done with replacement. Further, the tournament size k can be varied with CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 30 the consequence that larger k leads to increased selection pressure. Hence, this method gives improved control over the selection pressure and is immune to any scaling problem that usually lead to collapse of selection pressure as the average fitness of the population grows. A complete tournament selection cycle that yields N chosen individuals will require each chromosome taking part in a contest k times. Naturally, the best individual will win all its k contests, an average individual is expected to win half of its k contest and at the other extreme, the worse individual will lose all its contests. This kind of setup is what is referred to as the strict tournament selection and is the most commonly used method. There is however other variants like the so-called soft tournaments where in any contest, the fitter individual only wins the tournament with a probability p < 1. This method is also called stochastic tournament selection since for example, instead of the best individual to be selected k times, it is now reduced to kp. A value of p = 0.5 will turn the process into a random selection with no preference given to the best individual. It is clear that even with p > 0.5, stochastic tournament selection will occasionally suffer from possible sampling errors. A tournament selection of size k = 2 is called binary tournament and it was analytically shown that [58, 52], the dynamics of a binary strict tournament selection resembles that of a specific form of linear ranking where the best ranked individual is assigned a new fitness value of 2 (i.e. s = 2 in equation (2.15)). On the other hand, a stochastic tournament selection has been shown to resemble a linear ranking with s < 2. And finally, it is not a coincidence that a stochastic tournament with p = 0.5 is equivalent to a linear ranking having s = 2. Other selection schemes include truncation selection [59], steady state GAs or Genitor [54, 52], and the (λ, µ) and (λ + µ) methods originally inherited from evolutionary programming and evolutionary strategies [9, 54]. Discussions on elitism and its varieties will follow in section 2.7.1 of this chapter. As previously highlighted, when investigating selection schemes it is imperative to understand the crucial parameters that govern the choice of appropriate selection scheme. Some of these parameters are said to have originated from field of quantitative genetics [60] and are presented below: i. Response to selection R(t): As the name implies, this measure quantifies the difference in the average fitness of population between two successive generations. In other words, the difference between the average fitness of population at generation t and its average fitness at generation t − 1. R(t) = f (t) − f (t − 1) (2.16) where f (t) is the average fitness of the population at generation t. ii. Selection Differential S(t): Conversely, this measures the difference between the average fitness of the parent set f p (t) (i.e. individuals selected for reproduction) at generation t and the average fitness of the entire population f (t) also at generation t. S(t) = f p (t) − f (t) (2.17) CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 31 where f (t) and f p (t) are the average fitness of the entire population and that of the parent population respectively. iii. Selection Intensity I(t): This is a dimensionless quantity derived by taking the ratio of the selection differential S(t) with the population standard deviation also at generation t such that: I(t) = f p (t) − f (t − 1) S(t) = σ(t) σ(t) (2.18) where σ(t) is the population’s standard deviation at generation t. Although this definition restricts the use of selection intensity to analyse the effect of selection to a specific generation in the evolution, it can be deployed to investigate the effect of selection for the entire evolution run if the distribution of the population vector is normal and remains constant (which is often true [9]). In this case, I(t) = I. Goldberg et al. [54] argued that when the population vector has a standard normal fitness distribution, the selection intensity is basically the expected average fitness of the population under the influence of the selection algorithm. iv. Selection Pressure P : Notice that although selection intensity I(t) can be useful for comparison purposes, it is application is limited to generational GAs where there is a clear set of parent population, i.e. I(t) cannot be used to analyse elitist or steady state GAs. Thus, selection pressure is another measure that estimates the expected number of offspring a best fit individual will have after selection. It is highly related to the convergence rate and can be defined in various ways as noted by [52]. A straight forward definition for P as given in [9] is in terms of the ratio of probabilities: P = P r(selecting best string) P r(average string) (2.19) v. Takeover time: This is a measure that estimates how long it will take the best individual to take over the entire population. For any selection method applied on a population of size N consisting of a single copy of the best individual, takeover time can be determined by evaluating the expected number of generations before getting a population vector that entirely consists of the copies of the best individual from the initial population. Majority of the studies on takeover time [58, 54] are conducted on selection-only genetic algorithms or an elitist GA with mutation. Nevertheless, it remains an important measure that furnishes valuable insight into the complexity, growth rate and many other characteristics of selection methods. An early work by Goldberg et al. [54] reviewed various selection methods and compare them based on their time complexities, takeover times, growth ratios and selection pressure. They analytically prove that the complexity of the fitness proportional selection methods is at its best O(n log n) and the worse case can be O(n2 ). Ranking methods are also no different. However, tournament selection methods have a polynomial complexity of order O(n). EC algorithms are increasingly popular because many of the evolution processes involved can easily be executed in parallel. However, selection operators are originally designed to work on CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 32 the entire population and thus, their traditional implementation is sequential and can severely inhibit performance. Bäck et al. [43] suggest applying a parallel algorithm to conduct local selection within subpopulations or neighbourhoods such as in migration or diffusion models. Goldberg et al. [54] share the same view with regard to the need for global information by various selection methods, but they argue that tournament selection is an exception. Tournament selection scheme can easily be parallelized since it naturally works by setting up contests on subpopulations rather than the entire population as a whole. With regard to selection pressure, while on one hand [61, 45] noted that fitness proportionate methods are slower and have the least selection pressure as compared to ranking and tournament selection methods. Although this may occasionally be beneficial on the quality of convergence (since less pressure is applied to force bad decisions), it simply heightens the number of unnecessary function evaluations. It may also exacerbate the effect of genetic drift [62] thereby forestalling convergence to promising solutions. On the other hand, steady state genetic algorithms (such as genitor) have the highest selection pressure. [54] stressed that the selection pressure of genitor is twofold (one for always selecting the best and the other for always having to replace the worse individual). The consequence of this is intense susceptibility to premature convergence to suboptimal solutions as a result of rapid loss of diversity. We therefore argue that with tournament selection method, moderate levels of selection pressure can be maintained throughout the evolution process and it can easily be tuned by simply varying the tournament size. Detailed discussion on selection pressure from the perspective of natural evolution can be found in [14]. Moreover, successful choice of a selection method requires analysing their convergence characteristics. Based on the normal distribution theory, Thierens et al. [59] developed elegant convergence models for the fitness proportional, truncation, tournament and elitist recombination selection schemes. Their analysis reveals that selection essentially leads to build-up of covariance among allele, and, the growth rate in fitness proportional selection is directly proportional to the fitness variance but inversely proportional to the mean fitness. This fully agrees with the Darwins original idea of sexual selection [14] which he described as a milder form of natural selection and is proportional to population variance. Thus explaining why selection progress in FPS methods drops as the average fitness of the population grows. Rudolph et al. [58] modelled the takeover times of various tournament methods as Markov chains and cautioned that stochastic tournament methods just like FPS are prone to sampling errors and should be used with care. They also admit that in spite of the significance of takeover time, it is not sufficient to critically decide on the choice of selection scheme. The effect of noise on various selection schemes was investigated by Hancock [52]. Gaussian noise was added to the evaluation functions and the growth rates in the presence of mutation for various selection methods were observed. Hancock argued that contrary to the traditional judgement that genetic algorithms are immune to noisy evaluation functions, some empirical results have shown that noise effectively increases sampling error due to selection and consequently lowers selection pressure. Elsewhere, [63] investigates the placement of selection operation in a typical run of evolution algorithms from two different perspectives. In a classic GA setup, the evolution process begins CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 33 with selection, crossover and then mutation. This setup is called parent selection because it applies the selection operation on the parents. However, a common practice in ES but also used in GA is to put the selection operation at the tail of the evolution, such that the process begins with crossover, mutation and then selection. Because selection is applied on the offspring population to generate the next population, this setup is called survival selection. While these two techniques are intuitively similar and may yield same end results, they differ in the way they generate their intermediate populations because, while survival selection ends with a selection operation, parent selection only begins with it. In the area of hybrid evolutionary computation further investigation of selection techniques yields some novel selection methods. For instance, [64] hybridizes a genetic algorithm by embedding a Nelder-Meid simplex algorithm into different niches of the genetic algorithm. The simplex algorithm serves as a crossover operator and was used together with simplex multi direction search to improve the selection process in GA. In a similar fashion, [65] utilizes a simulated annealing (SA) algorithm to undertake selection on the population of candidate solutions such that the SA algorithm is integrated as an operator in the parent genetic algorithm. Some other hybrid algorithms that compare various standard selection algorithms include; [66] which compares FPS with tournament selection and [67] which compares ranking and RWS selection methods with the view to categorize their proposed hybrid algorithm. Detailed and interesting comparison of various tournament selection methods can be found in [58, 68]. Further discussions and comparisons of various selection schemes based on the aforementioned parameters can be found in [54, 60, 59]. To sum up, tournament selection method strikes a perfect balance between the FPS methods that tend to be too inclined to the biological evolution (i.e. adaptation) and the steady state GAs that tend to be too inclined to the simulated evolution (i.e. optimization). It maintains moderate level of selection pressure and steady growth rate which are key ingredients that guide the evolution process to converge to optimal solution. These and many other remarkable features of tournament selection are the reasons that we have chosen to adopt this method for the proposed hybrid evolutionary computation algorithm. 2.6 Recombination and Mutation Having chosen the parent population via what is basically a biased process (selection) in the first phase, some variation operations are necessary for the evolution to make progress by exploring other areas of the search space. This second phase of evolution is called the reproduction phase and it consists of two main operations, namely recombination (i.e. crossover) and mutation. All the operations in the reproduction phase are taking place in the encoding (genotype) space and that is where the hidden power of evolutionary algorithms lies. It is interesting to note that as the only source of introducing new individuals in to the population of candidate solutions, the reproduction phase is completely unaware of the original problem formulation (phenotype) and that is what made evolutionary algorithms problem-independent and robust means of global optimization. Researchers in evolutionary computation [31] categorize parameters in genetic algorithms CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 34 into structural and numerical parameters (detailed under the parameterization section). The reproduction operators are involved in both category of parameterization and are therefore critical to the successful design of any evolutionary algorithm. Many practitioners of genetic algorithms [69] are of the view that crossover is the primary reproduction operator that clearly distinguish genetic algorithms from other types of optimization algorithms because mutation can be regarded as a sort of local search or hill climbing operation. Besides crossover and mutation, Holland’s [16] original proposal includes another variation operator called inversion, this operator differs slightly from mutation and has not receive wide acceptance in the evolutionary computation community. Thus, inversion will not be covered in the following background as it is not utilized in our proposed hybrid algorithm. 2.6.1 Implementation of Crossover in EAs In its simplest form, crossover operator yields two offspring by exchange of genetic materials between two parent strings subject to probabilistic decisions. In a typical genetic algorithm in which individuals are represented as binary strings, if any two parents P1 and P2 are to participate in crossover operation, then, they will exchange their bits to the right of a randomly chosen locus called a crossover point to yield two new strings (offspring) O1 and O2 . Suppose every individual is encoded with 7 bits and the random crossover point happens to be at locus 3, then, parents P1 and P2 will produce O1 and O2 after crossover, for example: P1 = 1010110 O1 = 1011101 P1 = 0101101 O2 = 0100110 This kind of crossover is called single point (or 1X ) and can easily be extended to a number of variants by creating a number of random crossover points after which the parent strings exchange their bits. This extended version of one point crossover is therefore called multi-point (m−point) crossover, m > 1. As agreed by many [50, 31], crossover plays two key roles in evolution. First it provide a chance for further examination of the already available hyperplane, like offspring O1 simply continues with the exploitation of the hyperplane 101 ? ? ? ?2 . Second, it allow exploration of new area of the search space like the hyperplane ?1001 ? ? in offspring O2 . Hence, every evaluation of a string of length l guides the search process by adding knowledge of 2l hyperplanes. These two complementary roles of crossover are critical for a successful evolutionary search. Hence, the success of GA in many applications has been attributed [70] to the adopted method of reproduction. An argument reported in [71] reveals that two bias sources (positional and distributional) are central to the implementation of crossover operators in genetic algorithms. The single point crossover operator is said to suffer positional bias because it tends to favour substrings of contiguous bits. It however lacks distributional bias since the crossover point is randomly chosen from a uniform distribution. Yet, [9] argued that none of these biases can be said to be working for the betterment or otherwise of the search process. 2 The ? fields stand for any possible allele value, e.g. 1 or 0. CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 35 Out of the several proposals to tackle the bias in crossover, a popular alternative is the so-called uniform crossover. Uniform crossover seeks to eliminate the bias by making the operation completely random. The process requires representing the crossover operator as a binary mask obtained from a typical Bernoulli distribution. Analyses by De Jong [46] reveal that the disruption caused by uniform crossover can be tuned by varying the Bernoulli parameter p associated with the distribution. A value of p = 0.5 results in a completely random generation of the crossover mask and can eliminate any bias in genetic algorithm due to the crossover. Other Implementation issues Not every optimization problem can be adequately represented in binary, even if it is possible to do so, utilizing any of the aforementioned crossover operators on some optimization problems would simply lead to creation of infeasible solutions. This necessitates the need for specially designed crossover operators for scheduling problems, permutation problems like the TSP and their like. Specially designed crossover operators such as partially matched crossover (PMX) [72] and order crossover are designed for TSP and other permutation problems. A generalized n−point crossover (GNX) [7] is designed to be representation-independent and suitable for all problem domains. Thus, it sets up a general framework for recombination and seeks to alleviate the need for several ad hoc crossover implementations. Nevertheless, many problem dependent crossover operators are still proposed [73, 64, 21] and applied on various problem domains. Man et al. [22] argued that conventional crossover operators do not perform well on complex optimization problems because they lack problemspecific knowledge in their encoding. Thus, elsewhere, an improved genetic algorithm (IGA) featuring a new crossover operator was proposed by [74]. The new operator was designed to balance the exploitation-exploration trade off by producing two offspring biased for exploitation and another two biased for exploitation. As mentioned earlier, crossover operator is commonly applied across a population of individuals based on some probabilistic decisions. A survey of various theoretical analyses [43] have shown that crossover probabilities Pc = [0.6, 1.0] are considered optimal for most global optimization problems. Elsewhere, Grefenstette [50] uses a multi-level genetic algorithm where the parameters of an outer GA are optimized by another GA running internally. Experimental results from [50] have shown that while smaller population sizes requires high crossover rate, larger sizes do not. In other words, crossover rate can be safely reduced as population size increases. The results suggest that Pc = 0.30 or 0.88 are respectively suitable for population sizes of N = 80 or 30. Although these proposals have proven to be quite effective on wide range of global optimization problems, several recombination operators that automatically adapt their rates [26] have been proposed. In this regard, a statistics-based adaptive non-uniform crossover was proposed by [75]. They argue that there is an implicit convergence trend that leads to the build-up of building blocks by alleles of each string which the conventional crossover operators fail to exploit. Hence, they suggest using some statistical information of alleles at each locus to adaptively calculate its crossover probability. Some experimental results on deceptive test functions have shown that the adaptive crossover performs better than both the conventional CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 36 multi-point and uniform crossover operators. Punctuated crossover [43] is another typical example of m−point crossover where both the positions and number of crossover points can be adapted. 2.6.2 Implementation of Mutation in EAs Commonly, evolutionary algorithms rely on two variation operators for the reproduction of new individuals. Besides crossover, mutation is the second variation operator that also works in the genotype space and is capable of producing new individual(s) from a single parent string. Unlike the crossover operator that require large population sizes to effectively exploit the necessary information from parent strings, mutation can effectively guide the exploration of the search space when applied to a small population for large number of generations. It involves simple bit flip operations for binary represented strings or a random addition of Gaussian noise to individuals represented in real values. Consider the following binary represented parent string P of length l = 8 in a hyperplane 101 ? ? ? ??3 . Mutating bits 2 and 6 yields an offspring O located at an entirely different hyperplane 111 ? ? ? ??. Thus, as accorded by many [76, 75] mutation principally enables the search process to escape from sub-optimal regions by jumping across hyperplanes thereby preserving the required diversity in a population. P = 10101101 ⇒4 O = 11101001 Notice that applying mutation to a q−ary (where q > 2) represented population will require a more careful treatment because each mutated bit can take up to q − 1 possible allelic values. This may somewhat introduce some complications in the mutation operation. Thus, decisions must be made as to whether to allow stochastic replacement of the mutated bit by any possible allele or bias the choice to alleles with values nearer to the current bit. In addition to the aforementioned structural parameterization issues, the numerical aspect of the mutation operator involves its application subject to a probabilistic decision. For a simple genetic algorithm having individuals represented as binary strings of length l, the rate of application of mutation is usually defined as the probability of flipping a bit and is denoted by the parameter Pm . Experimental results by [50] have shown that a range of mutation probabilities of Pm = [0.01, 0.05] is sufficient for wide range of global optimization problems. A universal setting [46] for adapting the probability of mutation is to set Pm = 1/l. This has received wider acceptance [43] in the genetic algorithms community. However these settings are not without some criticism from some researchers. Salomon [32] argued that small mutation rates are mostly suitable for problems of unimodal or (pseudo-unimodal)5 type, but multimodal problems will require larger rates. Also, Bäck [78] criticised the universal rate of Pm = 1/l as being too independent and unaware of the fitness landscape. There have been several proposals [75] for some kind of adaptive mutation with the aim 3 The ? fields stand for any possible allele value, e.g. 1 or 0. parent P yields the offspring O. 5 pseudo-unimodal problems are multimodal problems having a general convex shape, example is the well known Griewank [77] benchmark function. 4 The CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 37 of reducing the burden of parameterization in GAs. Adapting the probability of mutation Pm is mainly aimed at eliminating the tuning problem associated with this parameter in order to make genetic algorithms more parameter-independent. Queiroz et al. [23] proposed an excellent adaptive mutation strategy that assesses the current population diversity prior to setting the mutation rate. Elsewhere, a new mutation operator for permutation problems was proposed by [56] that allows every individual and gene to mutate at different mutation rates. In a similar trend, Bassett et al. [79] applied an adaptive Gaussian mutation operator to a real valued optimization problem. They argue that the adaptive mutation is more disruptive, but it can contribute more to the search process. Bäck [78] suggests a new measure called effective fitness which helps to categorize the fitness landscape prior to adapting the mutation rate. Furthermore, in the field of hybrid optimization algorithms, proposals by [80, 81] suggest annealing the rate of mutation as the population nears convergence. In a hybrid setup, a simulated annealing algorithm is integrated into a GA to serve as the mutation operator. Elsewhere, Hong et al. [82] use various mutation operators simultaneously and argue that dynamically choosing an appropriate mutation operator for a given problem at a given stage of optimization can significantly enhance the robustness of the search process. Thus, although many other strategies are possible, it is evident that many authors use varying mutation rates as a diversity maintenance policy. As can be noticed from the foregoing, in spite of the wide acceptance of the standard reproduction operators, there have been quite a large number of adaptive, dynamic and problemdependent operators that have been tried in the literature. A somewhat strange proposal by [22] in a set up of a hybrid genetic algorithm features a number of specially designed pairs of reproduction operators. The design entails restarting the evolution process with a new pair of operators whenever progress stalls by a given pair of operators. And the process continues until all operator pairs are exhausted. To sum up, without loss of generality, we argue that crossover and mutation are the main reproduction means in genetic algorithm. Thus, if appropriately set, they can facilitate the exploration and reachability of the entire search space even in problems having rough and complicated landscapes. Possible consequences of trying to adapt these settings may lead to increased complexity and in the worse case, it risks losing the problem independence characteristics of evolutionary algorithms as a whole. Yet, reproduction operators play a major role to the success of evolutionary search. And as emphasized by [79], it is not the average individuals that drive the evolution forward, but the occasionally exceptional individuals created by crossover and mutation that keep the population improving over generations. 2.7 Replacement Strategies The field of evolutionary computation as highlighted earlier has three major sub-fields: genetic algorithms, evolutionary strategies and evolutionary programming. The standard replacement strategy in genetic algorithms recommended by Holland [16] is the generational replacement scheme. This scheme mimics the natural evolution in such a way that subsequent to reproduction phase, an offspring population completely replaces the parent population. In the ES and CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 38 EP communities, this strategy is popularly referred to as (λ, µ) strategy. In addition to this, a (λ + µ) strategy combines both parent and offspring population and then select the best fit individuals in the combined set such that the size N of the resulting new population is equal to that of the original population. The gap between these fields of evolutionary computing has been blurred and every replacement strategy has now been tried everywhere else. It is quite easy to realize the risk involved in the generational replacement method. It genuinely fits the natural evolution but it is unsuitable for actual optimization purpose where the goal is to explore and keep the best solution found. Realization of the danger of losing the optimum solution [34, 46] over generations following disruptions caused by crossover and mutation has led to the proposals of elitism and its variants details of which will be considered in the next section. 2.7.1 Elitism in Evolutionary Computations The notion of elitism was originally coined by [46, 50] after critical analysis of the behavioural trend in the evolution dynamics based on several empirical experiments. The concept is basically aimed at preserving the candidate solution having the best fitness value as the population evolves over successive generations. Hence, the best fit individual can only be lost if the new population contains another candidate solution of higher fitness value. Thus, while the idea seems contrary to the Holland’s original generational replacement, it conforms better to the overall goal of optimization which is to determine the best solution rather than merely improving the average fitness of a solution set via an evolutionary technique. Thereafter, many other variants of the elitist strategy quickly surface. A generalized categorization of replacement schemes by [43] is: i. Generational: Also called non-elitist simple GA (sGA), it corresponds to the ES (λ, µ) strategy. ii. Elitist: This follows the standard elitism and mildly corresponds to the ES (λ+µ) strategy. iii. Overlapping: This generalizes other variants of the elitist strategy and can simply be represented as (λ, k, µ) strategy where k is an aging parameter 1 ≤ k ≤ ∞ signifying an individual’s life span. i.e. the maximum number of generation an individual can survive. 2.7.2 Overlapping Populations and Steady State GAs As highlighted earlier, overlapping population refers to the replacement strategy in which the parent and offspring populations compete such that some percentage of the parent population survive across generations. In the original elitist strategy, only a single (best) individual from the parent population is carried along to the next generation. The overall influence of which tends to diminish as the population size grows. Thus, overlapping populations are meant to address this lack of scalability associated with the original elitist strategy. The degree of overlap of populations between two successive generations (also called generation gap) can vary significantly depending on the ultimate goal of the optimization set up. For instance, [23] CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 39 replace only 8 worst individuals in the parent population with the 8 best new individuals from the offspring population to generate new population. Also a product of overlapping population, the steady state GA (ssGA) is a special case that permits replacing only a single or two individual(s) from the parent population by an individual with best fitness value from the offspring population. It is also popularly known as incremental replacement scheme and is what the Whitley’s genitor [83, 52] is uniquely known for. Studies [68, 83] have shown that ssGAs have in many cases outperformed the standard genetic algorithms for reasons attributed to their ability to effectively exploit promising regions of the search space while retaining the necessary diversity. Worth noting is that the idea of always replacing the worst by the best individual can severely heighten selection pressure. Thus, most of ssGA implementations require some radical measures to evade premature convergence due to potential loss of diversity. One of the typical ways used to stabilize the selection pressure in ssGAs is to deploy excessively higher mutation rates. Kaur et al. [84] use an overlapping population with 50% overlap for optimization of a TSP problem but adopt a mutation rate of Pm = 0.85 and utilize RWS selection method. Recall that fitness proportionate selection methods like RWS inherently have lower selection pressure that continue to fall over generations. Therefore, utilizing RWS with overlapping populations like ssGA is also a common practice [80, 7, 85, 67, 86, 87, 88] that aids balance their disproportionate selection pressure. In agreement with the above issue, Il-Seok et al. [44] recommend setting the crossover probability as Pc = 1 for the elitists, overlapping replacement schemes and all their variants like ssGA. They however argued that a much lower value like Pc = 0.6 is necessary for a generational replacement scheme in order to ensure the highly fit individuals survive across generations. Also, in an attempt to preserve population diversity in ssGAs, a recent proposal [68] advocates replacing only the worst individual that has the least contribution to diversity in the parent population. They defined the contribution to diversity as a measure of the similarity between an individual and its nearest neighbour in the population. Elsewhere, a replacement strategy called elitist recombination was proposed by [59] in which the replacement and recombination operations are interleaved. Thierens [60] justified the effectiveness of the method and derived the expressions for its selection intensity and selection pressure. Other strategies include the use of niching and crowding. A niche is a subset of individuals in a given population that share some similarity. The idea is to allow a new individual to replace only those individual in its own niche, rather than potentially any individual in the population. Several other replacement schemes include restricted tournament selection (RTS), worst among most similar replacement policy (WAMS), family competition replacement schemes [68] such as correlative family-based selection to mention but a few. To sum up, it is worth mentioning that the main purpose of elitist replacement scheme and its variants is not to guard against sampling error due to selection algorithms [52], but as a safeguard to possible disruptions caused by crossover and mutation operators. Moreover, as compared to original elitist strategy, the overlapping populations prove to perform better [89, 77] for both GA and ES evolutionary algorithms. Finally, even though elitism has proven CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 40 Table 2.2: Standard Parameters of a Typical Genetic Algorithm Parameter Name Population Size Selection Scheme Crossover Probability Mutation Probability Replacement Scheme Termination Criteria Symbol N – Pc Pm – – Typical Values/Types [50 − 200] FPS, Ranking, Tournament, etc. [0.6 − 1.0] [0.01 − 0.05] or 1/l where l = string length Generational, Elitist, Overlap, etc. Maximum limits on: Runtime, Generations/Evaluations or any heuristic convergence measure. effective and widely accepted, Whitley et al. [77] cautioned that the strategy might be a poor choice when dealing with problems having dynamically changing landscape. 2.8 Parameterization in Evolutionary Computations It can be noticed from the foregoing that unlike the gradient-based optimization techniques, evolutionary computation algorithms are involved with a huge number of parameters upon which their overall success relies. Worth noting is that because the performance of an evolutionary algorithm heavily relies on the correct settings of these parameters, tuning the parameters of a simple GA to their optimal values is by itself a complex optimization problem. Thus, [50] who wishes to derive the optimal parameters of a genetic algorithm for some specified problems put forward a meta-level GA. The design consists of an internal user parameterized genetic algorithm that is used to tune the parameters of a main genetic algorithm. The parameters of a typical genetic algorithm can be classified into two main categories i. Structural Parameters: These include choice of data type (i.e. representation scheme) and the types of genetic operators used. ii. Numerical Parameters: These include but not limited to the population size, probabilities of mutation and crossover, maximum number of generations and so on. 2.8.1 The Standard Parameter Settings Early works in genetic algorithms by Holland [16] and later by De Jong [46] have led to the development of the most widely used standard parameter sets. Although mainly obtained from empirical experiments, many other theoretical studies [78, 54, 31] have reinforced the validity of these standard parameters. The space of a simple genetic algorithm comprises of at least six basic parameters depicted in table 2.2. The table shows the ranges and commonly used types of the standard parameters for small to medium sized global optimization problems. CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 2.8.2 41 Adaptive and Dynamic Parameters in EC In order to alleviate the need for tuning and fine tuning of GA parameters as the nature of problems or optimization goals vary, several proposals of adaptive, self-adaptive or dynamic parameters are made. A proposal by [87] suggest adapting the probabilities of crossover and mutation based on the population entropy at any stage of the evolution. They described the population entropy as the distribution of individuals in the population. The greater is the difference among the individuals in a population, the higher the entropy and vice versa. The idea is to avoid loss of diversity by adaptively raising the probabilities of crossover and mutation as the population entropy drops. In a similar trend, [90] use varying mutation rates and argue that mutation rates that decrease exponentially as the population average fitness grows over generations have superior performance over their non-adaptive counterparts. In a different respect, Niehaus et al. [91] adopt three new methods of dynamically adjusting the probabilities of reproduction operators in GA. The aim was to establish an adaptive system that can not only perform better than randomly chosen settings, but compete with the empirically proven standard settings. The adaptation methods used were: population-level dynamic probabilities, individual-level dynamic probabilities and fitness-based dynamic probabilities. An earlier work by [35] exhibited similar argument. Elsewhere, Spears [92] studies the role of crossover in GA, EP and other fields of evolutionary computation and noted that despite the wealth of theoretical analysis, it is sometimes difficult to decide a priori which type of crossover to use and at what rate. Spears then suggests an adaptive mechanism for controlling the use of crossover operator in evolutionary algorithms and argue that the method can also be used to enhance the performance of non-adaptive EAs. Detailed background on various evolutionary algorithms with adaptive and dynamic operators can be found in [70, 92]. 2.8.3 A Parameter-less GA From a somewhat extreme angle of parameter adaptation in evolutionary algorithms, Harik et al. [61] noted that majority of the target end users of EAs barely have sufficient understanding of the EA dynamics. Thus, users may lack the knowhow on manual tuning of its parameters for optimal performance. They argued that having an evolutionary algorithm showcased as a black-box is necessary to relieve its user from having to care about the required population size, crossover or mutation probabilities or the type of selection scheme. They proposed self adaption of the population size by starting multiple instances of a recombinative (i.e. crossover-only) GA running with different and increasing population sizes. The schema theory of building-blocks was used to adapt the crossover probabilities. Although it is quite a remarkable idea, the proposed technique can severely increase the computational cost as a result of naively running many instance of the GA at all times. Moreover, the idea used to adapt the crossover probability is based on the Holland’s building-block theory the soundness of which cannot be justified by many EA theorists [9]. Finally, the adaptation is limited to crossover operator without addressing the mutation aspect. To sum of, some researchers have a contrary view to the original conception of GAs as been problem-independent. For instance, Boyabaltli et al. [31] argue that if viewed from the CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 42 parameterization perspective, GAs can be very problem specific algorithms. We would like to emphasize here that this is not the view of many EA practitioners. Results from several empirical and analytical experiments [50] have shown that the parameters of a GA need not to be overly tuned to suit a particular problem, the algorithm can perform fairly optimal for much wider range of problems so long as its parameters are set to within the range of the standard parameter settings. 2.9 The Proposed Adaptive Elitism Considering the fact that GAs using the elitist strategy always perform better than most of the generational GAs. However, as described previously, with basic elitism, the single elite individual may lack influence on the fitness growth in the population (i.e., scalability problem). Also, increasing the size of the elite population may lead to rapid loss of diversity in the evolution. Therefore, we propose a new variant of elitist strategy, an adaptive overlapping population having a variable generation gap that is some percentage (G%) of the total population size N . We will henceforth refer to this parameter as adaptive overlap size. The technique ensures that up to G% of the best individuals in the parent population always scale to the next generation so long as the following two conditions are concurrently met. A maximization problem is assumed. i. If the population average fitness value f (t) in the current generation t is no better than that at the previous generation (t − 1), and; ii. If the population fitness variance V arf (t) in the current generation t is no less than that of the previous generation (t − 1). The procedure in algorithm 2.2 elaborates the proposed scheme. Notice from algorithm 2.2 that the size of the elite population is initially set to some percentage (i.e. G%) of the original population size (line 4). This however gets continuously halved at the end of every generation so long as the population’s average fitness grows and its fitness variance does not shrink (line 15 − 21). After the initialization stages (lines: 2 − 5), the initial population is evaluated and ranked based on the fitness of the candidate solutions (line 6). The elite population constitute the top best individuals in the parent population (line 7). Lines (8 − 9) compute and store the average fitness and fitness variance of the current population. Thereafter, the evolution process (line 11) which includes the selection, crossover and mutation continues iteratively until some convergence measure is satisfied (lines 10 − 23). The proposed idea of the adaptive elitism has two main goals. First, it safeguards individuals with high fitness values from been lost due to potential catastrophic effect of genetic operators at early stages of the evolution. Second, it ensures maintenance of useful diversity by adaptively shrinking the size of the elite population (i.e. the generation gap) as the quality of the population improves over generations. A generation gap of 5% was chosen following empirical experiments on some global optimization test problems with various population sizes. Because a strict binary tournament selection method is adopted, the successive halving of the elite population size will not stop the best individual from surviving across generations. Ultimately, optimum level of CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 43 Algorithm 2.2 The Proposed Adaptive Elitism 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: begin t←0 N ← size of P (t) NElite ← G% of N initialize P (t) fP (t) ← evaluate and rank P (t) PElite (t) ← Top NElite of P (t) f p (t) ← average of fP (t) V arfP (t) ← variance of fP (t) while not converged do Q(t) ← evolve P (t) fQ (t) ← evaluate and rank Q(t) f Q (t) ← average of fQ (t) V arfQ (t) ← variance of fQ (t) if f Q (t) > f P (t) and V arfQ (t) > V arfP (t) then NElite ← G% of NElite PElite (t) ← Top NElite of P (t) P (t + 1) ← Q(t) ∪ PElite (t) else P (t + 1) ← Q(t) ∪ PElite (t) end if t←t+1 end while end selection pressure can be maintained and the risk of premature convergence to sub-optimal regions of the search space will be avoided. 2.10 Contributions In addition to the wide survey and analysis on small and major aspects of evolutionary computation algorithms, the chapter gives an in-depth treatment on parameterization issues upon which development of successful global optimization methods relied. Thereafter, a new replacement technique (adaptive elitism) aimed at enhancing evolutionary algorithms to efficiently exploit high quality areas of the search space without compromising exploration of other potentially viable regions was developed. Ultimately, the insight derived from this investigation could pave a way for further improvements in the design of not only efficient, but robust EAs. 2.11 Remarks This chapter commenced with an overview of the historical foundation and investigates the development and simulation of evolutionary computations. Key initialization aspects such as problem representation, creation and sizing of the initial population are reviewed. Major parameterization issues such as the choice of selection scheme and replacement strategy, the type of crossover and mutation operators and their probabilities are investigated. Finally, CHAPTER 2. EVOLUTIONARY COMPUTATION ALGORITHMS–AN OVERVIEW 44 the chapter presented a novel adaptive elitism technique designed to enhance the ability of evolutionary algorithms to fully exploit the promising regions of their search space. In the next chapter, various stopping criteria of genetic algorithms will be investigated and the convergence analysis of these algorithms will be examined. Chapter 3 Convergence Measurement in EC using Price’s Equation This chapter will focus on investigating the convergence of evolutionary algorithms. After a brief introduction, some commonly used stopping and convergence measures will be reviewed. Price’s theorem will be examined and the use of the extended Price’s equation to view the effect of genetic operators on evolution progress will be investigated. Finally, a novel convergence measure built on the extended Price’s equation will be presented. 3.1 The Need for Convergence Measure in EC Algorithms Subsequent to the earlier investigation of the dynamics of evolutionary computations, it is imperative to carefully assess the long-term behaviour of these algorithms. Evolutionary computations are naturally inspired stochastic algorithms that by design are capable of running perpetually. However, for the purpose of solving optimization problems, it is always necessary to prescribe a set of definitive stopping criteria that if satisfied, the process could be brought to a halt. Typically, at some stage of evolution, the search progress slows and the quality of the candidate solutions barely improve, this is a signal for convergence and majority of the convergence measures are designed to detect such conditions. After the search process is halted, the best candidate solution obtained so far is returned as the supposedly optimal solution. 3.2 Conventional Measures of EC Convergence Beside terminating evolution based on some user prescribed limits on evaluations, generations or execution time for a run, more sophisticated convergence measures that are mainly based on population diversity are used to automatically terminate the evolution. In this respect, population diversity could relate to the genotype, phenotype or even the average fitness of the population directly. A common practice is to measure the diversity by assessing the similarity among the candidate solutions in the genotype space using a distance measure [62] such as the 45 CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 46 Hamming distance. This agrees well with the notion that GA converges when the candidate solutions in the population become identical. While the convergence characteristics of all evolutionary algorithms rely on several factors, the most important factors are the types of selection mechanism, the reproduction operators and the size of the population of candidate solutions. The selection operation being an exploitation process, it mainly favours the fitter individuals at the expense of the weaker ones and is seen as the major derive to convergence in EC. Thierens et al. [59] use the normal fitness distribution method to model the convergence characteristics of various selection methods. Simple yet elegant ordinary differential equations (ode) models that estimate the true convergence behaviours of the fitness proportional selection (FPS), tournament selection, truncation selection and elitist recombination were developed and the convergence speed was related to the takeover time1 of the associated selection method. They argue that FPS selection schemes have the longest convergence time and can further slow down as the search approaches optimal solution. Regarding the manner in which the reproduction operators influence GA convergence, it is important to realize that besides the types of the operators, the frequency of their application also play a major role. A new diversity measure that estimates the average Hamming distance in the population was proposed by [62]. They noted that while mutation and its probability of application can severely influence the convergence rate, vast majority of the traditional crossover operators such as n−point, uniform and punctuated crossover have little effect on GA convergence. They analytically prove that the new diversity measure (i.e., average Hamming distance) is not affected by crossover operators but mostly influenced by the selection mechanism. The measure was then used to predict the average Hamming distance at convergence and thus define an upper bound limit on the evolution run time. Similarly, Sharapov et al. [93] derive the mean convergence rate of genetic algorithms due to various reproduction operators. Although no numerical experimentation was conducted, probabilistic models were used to theoretically analyse the convergence characteristics due to crossover, mutation and inversion operators. Elsewhere, Greenhalgh et al. [34] investigate convergence on the ground of population’s fitness. They consider the maximum iteration limit, on-line and off-line performances as the three basic stopping criteria and convergence measures for genetic algorithms. The on-line performance reflects the average of all fitness functions evaluated up to and including the current trial, while the off-line performance is the running average of the best fitness value to a particular time. They use Markov chains to determine an upper bound on the maximum iterations limit that will guarantee convergence to global optimum with certain level of confidence based on a predefined probability. Hybridization approaches also play vital role to improving GA convergence rate. As reported by Miura et al. [94], for most nonlinear optimization problems, the time required by a genetic algorithm to converge to an optimal solution can be reduced by incorporating some information about the gradients of the problem’s variables. Thus, they propose hybridizing GA with a steepest descent algorithm and argue that this can positively influence the overall convergence 1 Takeover time is the number of generations needed for the best individual in the population to take over the entire population. CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 47 rate. Similar proposals were made by [95, 96, 72, 44, 97] where genetic algorithms are combined (in various ways) with various local search methods to speed up convergence. Nearly 200% improvement in the convergence rate was reported by Kaur et al. [84] as a result of hybridizing a genetic algorithm with a nearest neighbour search in solving a TSP combinatorial optimization problem. Worth mentioning is that all the aforementioned approaches for estimating GA convergence share their merits and demerits. For instance, in a typical binary coded GA, monitoring the similarity among chromosomes using a distance measure such as Hamming distance can allow effective analysis of the diversity profile in a given population. This is backed by the assertion that whenever evolutionary search nears convergence, its search space draws near a Hamming landscape. However, we observe that this similarity measure works in the genotype space and lacks any knowledge of the dynamics in the solution space. Thus, depending on the mapping technique, individuals that seem very similar in the genotype space may differ significantly in the phenotype space. In other words, a binary represented chromosome a1 = 10110111 (on hyperplane 10 ? ? ? ? ? ?) looks more similar to chromosome a2 = 01110111 (which is on an entirely different hyperplane 01 ? ? ? ? ? ?) than chromosome a3 = 10 ? ? ? ?00 that shares the same hyperplane. We further observe that estimating GA convergence by marrying the two diversity measures that monitor similarity in both the encoding and solution spaces might not totally eliminate dissension between the methods which could trigger false alarms for convergence. Moreover, the combination can severely increase the computational cost of the convergence detection process. We therefore argue that since progress in evolutionary search is internally governed by the actions of genetic operators (selection and reproduction operators like crossover and mutation), building a convergence measure that assesses the activities of these operators can be a promising alternative to tackling this dilemma. Thus, a proposal for utilizing the extended Price’s equation to investigate the individual role of genetic operators to the progress of evolution will be presented in the next section. A new convergence measure will then be proposed. 3.3 Monitoring the Effect of EC Operators with Price’s Equation In order to examine the individual effect of evolution operators while in interaction, George Price [98] formulated a theorem that permits decomposition of the evolutionary process to separate the genetic effect (or contribution) of the selection operator from that of other reproduction operators (i.e. crossover and mutation). Although Price’s work was mainly in the field of evolutionary genetics, the proposed equation (3.1) provides greater insight into general selection processes beyond the originally intended genetical selection. Price’s equation states that: Cov(z, q) ∆Q = + z̄ PN i=1 zi ∆qi N z̄ (3.1) where ∆Q = Q2 − Q1 is the change in the measured characteristics (such as fitness), N is CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 48 the number of individuals in the parent population (i.e., population size), zi is the number of P offspring of parent i, and z̄ = i zi /N is the average number of the offspring produced. Also, ∆qi = qi0 − qi where qi is the fitness of parent i and qi0 is the average value of the measured qi in the offspring of parent i. And finally, z and q are vectors of zi and qi respectively. The two terms in the Price’s equation (3.1) represent the contribution of different operators as the mean of the characteristic being measured. Since we deploy the Price’s equation to analyse convergence in EC, the measured characteristic Q in this case will be fitness. The first term represents the contribution of selection operator while the second term gives an aggregated contribution of the reproduction operators involved. Notice that the effect due to selection is modelled in terms of the covariance between the individuals z and their fitness q. This conforms to the Fisher’s fundamental theory of natural selection that relates the change in the mean fitness in a population to the population’s fitness variance. It also agrees with the argument presented by [99] that sees the covariance between the phenotypic values of individuals and their fitness as the cause of differential productivity that leads to the change in phenotype. The following lemmas 1 and 2 will elaborate how Price’s equation decomposes the fitness progress into separate contributions from the selection operator and other reproduction operators. Lemma 1: Supposing the fitness qi ∈ R of each member of the parent population in equation (3.1) is represented by a vector q such that: q = [q1 , q2 , ..., qN ] T (3.2) Suppose also the number of offspring zi ∈ Z produced by each one of the N parent is represented by a vector z such that: T z = [z1 , z2 , ..., zN ] (3.3) Then, the following expansion of the two terms in equation (3.1) will demonstrate that it is only the first term that represents the contribution of the selection operator. First term:  (z1 − µz1 ) (q1 − µq1 )    Cov(z, q) = mean   z̄  (z2 − µz2 ) (q2 − µq2 ) .. .    /z̄   (3.4) (zN − µzN ) (qN − µqN ) where µzi is the mean of the number of offspring of parent i and µqi is the mean fitness of the parents. Second term: PN i=1 zi ∆qi N z̄ = 0 − qN ) z1 (q10 − q1 ) + z2 (q20 − q2 ) + · · · + zN (qN N z̄ (3.5) Recall that following any typical evolutionary selection process, the resulting offspring have the same fitness as their parents (i.e. selection process adds no new solutions to the CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 49 population), therefore, ∆qi = qi0 − qi = 0. (3.6) Consequently, the value of equation (3.5) (i.e., the second term of Price’s equation) sums to zero. Therefore, the contribution of selection operator is only in the first term of the Price’s equation.  Lemma 2: Unlike in the above case for selection process, the following examination of the Price’s equation (3.1) will show that the second term of the Price’s equation uniquely represents the contribution of the reproduction operators. Assuming any traditional n−point crossover operator is employed; crossing any two parents yields two offspring. Therefore, if all parents undergo the crossover operation (i.e. Pc = 1) and the population size N is even, then, the number of offspring produced will always be equal to the number of their parents, i.e., µzi = zi . Hence, the first term of the Price’s equation, i.e. equation (3.4) is equal to zero. This is also true for any bit-flip mutation operation where a parent chromosome yields a single offspring after mutation. A worth noting exception here is that if the population size N is odd or in the case where not all chromosomes undergo the crossover operation (i.e., when Pc < 1), then µzi 6= zi and thus Cov(z,q) z̄ 6= 0. This is contrary to the traditional notion of decomposing Price’s equation in the literature [63] where it is often assumed that the contribution of the reproduction operators in the first term of Price’s equation is always zero. This investigation reveals the contrary if taking into account the special cases mentioned above. Now, expanding the second term as in equation (3.5) reveals that the summation is nonzero since the fitness qi of any parent i is different from that of all its offspring2 , and hence, qi0 6= qi (at least in most cases). Hence the contribution of crossover and mutation operators is mainly from the second term of Price’s equation though it may include the first term in the exceptional situations noted above.  3.3.1 Extension of Price’s Equation Bassett et al. [79, 76] extend the second term (3.5) of Price’s equation to allow monitoring the contribution of individual reproduction operators so as to ascertain which among them is more effective at various stages of the evolution process. It was argued that utilizing fitness averages alone will not guarantee accurate conclusions on the convergence of the evolution. This is because the average individuals are not the major driving force for the evolution. Thus, it become essential to dynamically analyse the fitness variance throughout the population paying attention to the exceptional (best and worst) individuals mainly created by the reproduction operators. 2 Although it is possible for any or all the offspring resulting from crossover to have equal fitness as their parent, this is rare and usually only occur when the population diversity collapses. Thus it signals convergence. CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 50 The extended Price’s equation can be defined as: k ∆Q = Cov(z, q) X + z̄ j=1 PN i=1 zi ∆qij N z̄ ; k = 1, 2, ... (3.7) where k is the number of genetic operators, qij is the average value of the fitness of all the 0 offspring of parent i after the application of operator j, and ∆qij = qij − qi(j−1) is the difference between the average value q (i.e., fitness) of the offspring of parent i measured before and after the application of operator j. For the proposed hybrid evolution algorithm, we deploy only the mutation and crossover operators, thus, k = 2. Therefore, the following proposed extension to the Price’s equation (3.8) contains only three terms; a term for the selection, crossover and mutation respectively. Cov(z, q) + ∆Q = z̄ PN i=1 zi ∆qiCrossover N z̄ PN + i=1 zi ∆qiM utation N z̄ (3.8) Hence, each of the terms in this equation estimates the changes in the mean of the population’s fitness due to one of the three genetic operators. 3.4 Analysing Evolution Progress with Extended Price’s Equation In order to analyse the effect of the proposed extension of Price’s equation (3.8), we conduct a number of experiments with a genetic algorithm having some standard parameters previously highlighted in table 2.2 and some newly proposed parameters previously described in section 2.9. Table 3.1 shows the detailed parameter settings for these experiments. Various multidimensional global optimization problems are used. However, the results that will be presented here3 are those obtained on simulating the solution process of the well known Schwefel function previously described in (2.1). Table 3.1: GA Parameter Settings for Investigating the Proposed Extended Price’s Equation Parameter Name Population Size Representation Selection Scheme Crossover Probability Mutation Probability Replacement Scheme Adaptive overlap size Termination Criteria 3 Similar ted. Symbol N – – Pc Pm – G MaxGen Typical Values/Types 50 − 100 Binary encoding Roulette wheel and Binary Tournament selection without replacement 1.0 or 100% 1/l where l =string length The Proposed Adaptive Elitist, see section 2.9 0.05 i.e. 5% of population size N Maximum generations limit 100 results are obtained with many other global optimization benchmark functions, and therefore omit- CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 51 The objectives for this experiment are: • To observe and analyse the growth in the fitness of the population of candidate solutions as the evolution progresses; and • To investigate the change in fitness that can be attributed to the selection operator, and changes due to the crossover and the mutation operator respectively. Ultimately, the outcome of this experiment is aimed at providing better insight through observation of the manner in which the selection, crossover and mutation operators collectively move the evolutionary search forward. It will also give insight on their individual effect on ensuring sustainable balance for the exploitation and exploration of problem search space, making GAs effective and promising global search mechanisms. Experiment 1: Visualizing Evolution with Roulette Wheel Selection (RWS) In this experiment, RWS is used to investigate the individual effects of the genetic operators over the entire period of evolution. Table 3.2 shows the various parameter sets for this experiment. Experiment 2: Visualizing Evolution with Binary Tournament Selection (BTS) Here a binary tournament selection without replacement is used to investigate the effects of the genetic operators during the evolution process. Similar parameter sets are used as in table 3.2. Notice from table 3.2 that there are six parameter sets for testing each of the two selection methods. The first half will be tested with a population size of 50 while for the other half, a population size of 100 will be used. Note that with the parameter sets in tables 3.1 and 3.2, a population size of 50 is fairly sufficient for the proposed GA to converge to the optimum of the 2-dimensional Schwefel problem (2.1) used in the test. However, the motive here is to investigate whether changes in population size has any significant effect on the behaviour4 of the genetic operators during evolution. Finally, in these experiments all the six simulation runs were carried out with a maximum generation limit of 100 and all results are averaged over 100 runs for enhanced statistical significance. 3.4.1 Results: Comparing RWS and BTS methods The results obtained for the above experiments 1 and 2 are summarized in table 3.3. The table compares RWS and BTS methods from two perspectives. First, on their performance under two different population sizes N (50 and 100). Second, on their performance against three different settings for the probabilities of crossover Pc and mutation Pm . Notice from table 3.3 that for the two different population sizes, the results obtained with the BTS clearly outperform those when RWS selection method is used. Also, when BTS method is utilized, the results obtained with a population size of 50 are fairly close to when the population size is doubled to 100. Of key interest here is the fact that although setup (iii) generally appears 4 The contribuion of the genetic operators on the fitness growth defined in the extended Price’s equation (3.8). CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 52 Table 3.2: Parameter Settings for Experiments 1 & 2 with RWS and BTS. Pc and Pm are crossover and mutation probabilities respectively, MaxGen is the maximum generation limit and l is the string length for the binary chromosome. Population Size N Pc Pm MaxGen Total Runs 50 1.0 0.6 0.7 1/l 0.01 0.05 100 100 100 100 100 100 100 1.0 0.6 0.7 1/l 0.01 0.05 100 100 100 100 100 100 Table 3.3: Results for Experiments 1 & 2: Comparing RWS and BTS methods for three sets of crossover and mutation probabilities (Pc , Pm ) under increasing population size N . Maximum generation limit is 100 and all results are obtained after averaging 100 runs. Test Setup Best Fitness values for: Population Size N Test Pc Pm RWS BTS 50 (i) (ii) (iii) 1.0 0.6 0.7 1/l 0.01 0.05 794.76 791.52 808.15 834.14 828.75 835.87 100 (i) (ii) (iii) 1.0 0.6 0.7 1/l 0.01 0.05 826.74 825.08 830.18 837.93 836.89 837.93 to yield better results5 , a careful comparison of the two bold face and two underlined values confirm that setup (i) is as good (especially when the population size N = 100). Recall that the overall goal is to explore which among the setting will lead to highest fitness and at the same time ensure convergence detection with ease. Therefore, with the results presented in table 3.3 and the analysis of the following figures 3.1 and 3.2 for the Price’s plots, we infer that setup (i) (i.e., Pc = 1.0, Pm = 1/l with BTS) has the following two key peculiarities: First: With setup (i), convergence to a good approximation of the optimum solution is possible even with low population sizes. Thus, it is computationally cheap since the required function evaluations can be minimized. Second: As will be seen from figures 3.1 and 3.2, setup (i) is more suitable for convergence detection via monitoring the effect of genetic operators. Therefore, setup (i) is the best candidate for achieving the proposed objective. The plots shown in figure 3.1 are for setup (i) (see table 3.3) where Pm = 1/l and Pc = 1.0, the remaining setups are relatively similar and therefore figures omitted. The fitness comparison 5 It benefits from the high mutation rate of 0.05, which increase the chances for further exploration of the problem space. This however may increase wasteful function evaluations. CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS Fitness Comparison Plot: Compares Best, Worst with Average fit individuals 1000 Change in Fitness (DQ) Fitness 500 BestFit WorstFit AvgFit BestFitRun −500 Price’s plot: Comparing changes in mean fitness (DQ) due to Selection, Crossover & Mutation operators 100 0 X = 100 Y = 826.7435 0 X = 100 Y = 837.9303 Change Change inin Fitness Fitness (DQ) (DQ) Change inFitness Fitness (DQ) −200 −300 −500 0 20 A −100 DQSelection DQCrossover DQMutation −400 40 60 80 100 Generations (a) Fitness Comparison Plot: Price’s Plot for theWorst changes mean (DQ) & standard Compares Best, within Average fit individuals deviations (std) of fitness due to Crossover operator 1000 300 800 200 53 600 100 0 400 −100 200 −200 0 −300 −200 −400 20 40 60 80 100 Generations (b) Price’s plot: Comparing changes in mean fitness (DQ) Price’s for the changes in & mean (DQ) operators & standard due toPlot Selection, Crossover Mutation deviations (std) of fitness due to Mutation operator 600 200 DQSelection 500 DQCrossover 100 DQMutation 400 0 300 200 −100 100 −200 0 Change in Fitness (DQ) Change in Fitness (DQ) BestFit −300 +1stdCrossover +1stdMutation −100 WorstFit −1stdCrossover −1stdMutation AvgFit −200 −400 DQCrossover DQMutation BestFitRun DQSelection DQSelection −400 −300 −500 −5000 20 40 60 80 100 20 40 60 80 100 20 40 60 80 100 20 40 60 80 100 Generations Generations Generations Generations (a) (b) (d) (c) (c) (d) Price’s Plot for the changes in mean (DQ) & standard Price’s Plot for the changes in mean (DQ) & standard Figure deviations 3.1: Simulation results: Experiment 1 (RWS): Plot (std) (a) of fitness comparison for the (std) of fitness due to Crossover operator deviations fitness due to Mutation plot operator 600 and average fitness achieved over a maximum 600 best, worst generation limit of 100. Plot (b) is +1stdMutation a comparison plot+1stdCrossover for the effect of genetic operators using extended Price’s equation (3.8) on 500 −1stdCrossover −1stdMutation maximization of aDQCrossover 2 dimensional Schwefel function400 with global optimum at 838. Plots (c and DQMutation d) show400the corresponding results for Experiment 2 (BTS). For all plots Pc = 1.0, Pm = 1/l DQSelection DQSelection and N 300 = 100 and results averaged over 100 runs. 200 200 100 0 A −100 −200 −400 −200 −300 0 20 40 60 Generations (c) 80 100 −600 20 40 60 Generations (d) 80 100 CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 54 plots in figures 3.1(a and c) compare the best, worst and the average fitness. The Price’s plots (figures 3.1(b and d)) on the other hand depict the changes in the averages of the population’s fitness due to each of the three genetic operators according to the definitions in equation (3.8), i.e., it shows the average contributions of the selection, crossover and mutation operators to the fitness progress over the entire generations. All results are obtained after averaging 100 runs of the evolution. Discussion of Results for Experiments 1: RWS selection A quick glimpse at the curves in the Price’s plot in figure 3.1(b) for the contribution of operators barely allows any meaningful conclusion. One might naively infer that the idea of decomposing the fitness progress to investigate the individual effect of the genetic operators provides no additional information on the evolution dynamics. However, we would like to make the following observations: i. It can be noticed from figure 3.1(b) that the curves for all the three operators fluctuate above and below zero on the fitness axis in a somewhat random manner. Thus, the plot provides no vital information as to which among the three operators ensures continues growth in fitness (i.e. exploitation) and which is responsible for maintenance of diversity in the population by exploring other areas of the search space. ii. A careful look at the initial shape of the curve for the selection operator in figure 3.1(b) reveals that there is a huge selection pressure at the early generations. This corresponds to the steep gradient in the best and average fitness curves (figure 3.1(a)) during the early generations. However, the selection pressure suddenly drops after around the first 10 generations and thereafter, it continues to fluctuate within a somewhat uniform range for the rest of the generations. Consequently, the roles for the crossover and selection operator throughout this period remain quite undifferentiated. It is therefore hard to clearly identify which among the two operators is responsible for exploitation or exploration and at what stage of the evolution does it contribute most. iii. Another crucial observation is that because all the curves for the three operators in figure 3.1(b) continuously effect changes in the population’s fitness, the population tends to slowly evolve thereby growing the average fitness (see figure 3.1(a)) continuously (although at a slower rate) till the evolution is terminated. This unwanted phenomenon thwarts any possibility of detecting the precise moment at which the evolution converges. Nevertheless, the above behaviour of the selection operator agrees with the fact that RWS is a fitness proportionate selection method and as previously discussed in section 2.5.1, it suffers inherent stochastic sampling errors6 . These sampling errors increase as the average fitness of the population grows. Thus, it is this phenomenon that led to the sudden collapse in the selection pressure just after the very early generations. 6 Some selection methods like Fitness proportionate and tournament (with replacement) due to being stochastic may lose the best member of the population by simply not picking it for any contest. CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 55 Moreover, as can be seen from the Price’s plot in figure 3.1(b), the contribution of the selection operator to the fitness progress becomes quite similar to (or no better than) that of the crossover and mutation operators. In other words, all the three operators play the role of exploration and exploitation of the search space. This effect may not be suitable for optimization purpose where the ultimate aim is to explore and as much as possible converge to the optimum solution point. Discussion of Results for Experiments 2: BTS The plots shown in figure 3.1(c and d) convey similar information to those in experiment 1 above but now BTS is employed. Moreover, contrary to the results obtained in experiment 1, an examination of the actions of the individual operators, and comparing their interactions against the changes in fitness over generations in these plots led to the following deductions: i. A simple observation of the fitness curves in figure 3.1(c) reveals that both the average and the best fit individuals in the population rapidly grow with a steep gradient to their peak values within the very early generations of the evolution. It is interesting to note how at the same time useful diversity is maintained in the population by retaining a reasonable amount of the worst fit individuals throughout the evolution. This is a clear manifestation of achieving proper separation of roles among the three genetic operators as will be analysed shortly. Hence, while the BTS operator is undertaking its role of exploitation, mutation is ensuring effective exploration and the crossover operator serves as a regulator by performing both roles. ii. Notice from figure 3.1(d) that the curve for the selection operator is always above zero on the fitness axis. Thus, the selection operator can now be seen as a biased process that primarily guides the search towards the fitter individuals seen so far. It effectively drives the evolution towards converging to the promising regions of the search space thereby increasing the population’s average fitness. We therefore acknowledged that this behaviour conforms to the characteristics of a typical tournament selection method previously described in section 2.5.3, and thus, it is as expected. iii. Notice also from the same figure that the curve for the crossover operator swing above and below zero on the fitness axis. This is indicative of the fact that the crossover operator has both exploration and exploitation effects. In other words, while crossover improves the population’s average fitness via exploitation, it also lowers it during exploration. A worth noting observation is that the effect of crossover lessens over generations and eventually, neither its exploitation nor its exploration effect tend to influence the fitness growth in the population as convergence sets in. iv. Contrary to the previous operators, notice that the curve for the mutation operator always lie beneath zero on the fitness axis (see figure 3.1(d)). This is because mutation operator improves population’s diversity by exploring other parts of the search space. But in so doing, it tends to drastically lower the fitness growth in the population. Moreover, the CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 56 manner in which mutation affects the fitness growth is unaffected by convergence. Therefore, the effect of mutation on the overall fitness progress remains fairly constant over the entire run. Following the above observations, it is thought that among all the three genetic operators, it is the behaviour of the crossover operator with regard to the fitness growth in the population that is most crucial to effective detection of convergence of the evolution process. This is because both the mutation and selection operators continue to evolve throughout the evolution. Moreover, as highlighted in (ii) above, the selection operator is a mere biased process that favours highly fit solutions. It lacks the ability to add any new solution points into the population. It is therefore not suitable for convergence detection. Finally, for the same set of parameters (test setup (i)), it is interesting to notice how the best and average fitness curves in the fitness comparison plot in figure 3.1(c) (where BTS is used) clearly outperform those in figure 3.1(a) (where RWS is used) by converging rapidly towards the global optimum solution of 838. In the following section an investigation on how the crossover can be used to detect convergence will be presented. 3.5 Using Extended Price’s Equation to Measure Convergence Having decided, during the discussions of the previous section 3.4.1, that the crossover operator can be utilized as a means for assessing convergence in the evolution, this section will focus on formulating and setting up the parameter for the convergence measurement. A graphical means for evaluating this parameter will also be developed. Recall from equation (3.8) that ∆Q is only the collective change in the average fitness due to the three genetic operators. As argued by [79] observing changes in averages alone does not convey sufficient information on the true effect of an operator. This is evident from the plot of the crossover operator in figure 3.1(d) where it is hard to appreciate its effect on the fitness even during the early generations of the evolution. Therefore monitoring the spread in fitness in the population by exploring the best and worst individuals produced by an operator is a viable alternative that could yield better insight. The spread can be measured by evaluating the change in fitness variance in the population caused by application of the genetic operator. From equation (3.8), let the change in fitness due to a genetic operator j (crossover in this case) be: PN ∆Qij = i=1 zi ∆qij N z̄ (3.9) 0 Then, since ∆qij = qij − qij is the random variable of interest, the expectation and variance of the crossover term can be obtained by respectively taking the first and second moment of (3.9) with respect to the ∆qij values, i.e., the changes in fitness in the individuals of the population CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 57 due to the crossover operator, such that: PN E [∆qij ] = where P zi P i=1 zi N z̄ ∆qij zi PN P zi = i=1 zi N z̄ ∆qij (3.10) is the sum over all the children of parent i. Typically, there will be two children for each parent when a crossover probability of Pc = 1.0 is used. All other parameters are as previously defined in section 3.3. The variance, V ar [∆qij ] is:  2 2 V ar [∆qij ] = E ∆qij − [E(∆qij )] . (3.11) Hence, the standard deviation is: σ [∆qij ] = q V ar [∆qij ]. (3.12) Now, overlaying the curves for the one standard deviation interval (±σ) on the plot of the ∆Q changes in the average fitness due to the crossover operator yield the envelope of the shaded areas shown in plots (a and c) of figure 3.2. The plots give a better impression of the distribution of the effect of this operator on changes in fitness in the population over generations. A similar technique was used to generate the plot for the effect of mutation operator shown in plots (b and d) of the same figure. Plots (a and b) in figure 3.2 show the results for experiment 1 where RWS is used. The shaded area above the curve for the change in the average fitness due to crossover in figure 3.2(a) reveal that crossover operator does indeed contribute to the fitness growth, but at the same time, the shaded area underneath it which lie under zero on the fitness axis indicates how much the operator contributed to producing low fit individuals. Notice how the ±σ (standard deviation) envelopes for both the crossover and mutation opeators (plots 3.2(a and b)) remain uniformly constant throughout the period of the evolution. Hence, when RWS is utilized, the effects of both crossover and mutation on fitness growth continue till evolution is terminated. Similarly, plots (c and d) of figure 3.2 show the results for experiment 2 where BTS is utilized. From the crossover plot (c) it is interesting to note how the envelope for the ±σ shrinks towards zero as the curve for the change in the average fitness settles around zero on the fitness axis. This is indicative of the fact that beyond this stage, the crossover operator barely contribute to the fitness progress. Hence, it shows how the use of BTS method facilitates monitoring the effect of crossover operator to effectively detect loss of diversity in the population. Therefore, this justifies the previous supposition that crossover operator can be used to sufficiently detect convergence in EC. On the other hand, an observation of plot 3.2(d) reveals that the curve for the change in the average fitness due to mutation operator lie and remain beneath zero on the fitness axis throughout the evolution. Also, larger portion of the shaded area for the ±σ envelope is beneath zero7 . This is contrary to its behaviour when RWS is used (see figure 3.2(b)) where mutation lacks precise role. Nevertheless, the standard deviation envelopes for the mutation operator in 7 It means mutation operator particularly ensures maintenance of diversity in the population by producing lower fit individuals when BTS is used. Compares Best, Worst with Average fit individuals 1000 due to Selection, Crossover & Mutation operators 100 0 Change in Fitness (DQ) X = 100 Y = 826.7435 Fitness 500 −100 CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 0 BestFit WorstFit AvgFit BestFitRun −500 20 40 60 Generations (a) −500 0 100 X = 100 Y = 837.9303 100 600 0 400 −100 200 −200 0 −300 −200 −400 BestFit +1stdCrossover WorstFit −1stdCrossover AvgFit DQCrossover BestFitRun DQSelection −400 −500 20 40 60 80 100 20 40 60 80 100 Generations Generations (a) (c) (c) (a) Price’s Plot for the changes in mean (DQ) & standard deviations (std) of fitness due to Crossover operator 600 +1stdCrossover 500 −1stdCrossover DQCrossover 400 DQSelection 300 200 100 0 A −100 DQSelection DQCrossover DQMutation 20 40 60 Generations (b) 80 100 Price’s plot: Comparing changes in mean fitness (DQ) Price’s Plot for the changes in mean (DQ) & standard due to Selection, Crossover & Mutation operators deviations (std) of fitness due to Mutation operator 600 200 DQSelection 500 DQCrossover 100 DQMutation 400 0 300 200 −100 100 −200 0 −300 −100 +1stdMutation −1stdMutation −400 −200 DQMutation DQSelection −300 −5000 20 40 60 80 100 20 40 60 80 100 Generations Generations (b) (d) (d) (b) Price’s Plot for the changes in mean (DQ) & standard deviations (std) of fitness due to Mutation operator 600 +1stdMutation −1stdMutation 400 DQMutation DQSelection 200 0 −200 −400 −200 −300 Change in Fitness (DQ) Change inFitness Fitness (DQ) Change in Fitness (DQ) A Change ChangeininFitness Fitness(DQ) (DQ) Fitness Comparison Plot: Price’s Plot for the changes in mean (DQ) & standard Compares Best, Worst with Average fit individuals deviations (std) of fitness due to Crossover operator 1000 300 800 200 −300 −400 80 58 −200 20 40 60 Generations (c) 80 100 −600 20 40 60 Generations (d) 80 100 Figure 3.2: Visualizing one standard deviations for the effect of crossover and mutation operators: Experiment 1 (RWS): Plot (a) shows the average and the ±σ (shaded areas) for the crossover operator. Plot (b) shows the average and the ±σ (shaded areas) for the mutation operator. Plots (c and d) show the corresponding results for Experiment 2 (BTS). For all plots Pc = 1.0, Pm = 1/l and N = 100 and results averaged over 100 runs. CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 59 both plots (b and d) of figure 3.2 remain virtually uniform (without shrinking) throughout the evolution. This means the effect of mutation on the fitness of the population continues for the entire evolution run. Therefore, it cannot be deployed to conduct any convergence detection. Fitness Comparison Plot: Compares Best, Worst with Average fit individuals 1000 A Change in Fitness (DQ) X = 100 Y = 837.9303 600 Fitness 400 200 0 BestFit WorstFit AvgFit BestFitRun −200 Change in Fitness (DQ) −400 20 40 60 Generations (a) 80 200 100 A −100 100 0 −100 20 40 60 Generations (b) 80 100 Price’s Plot for the changes in mean (DQ) & standard deviations (std) of fitness due to Mutation operator 600 +1stdMutation −1stdMutation 400 DQMutation DQSelection 200 0 −200 −400 −200 −300 200 −300 0 100 Price’s Plot for the changes in mean (DQ) & standard deviations (std) of fitness due to Crossover operator 600 +1stdCrossover 500 −1stdCrossover DQCrossover 400 DQSelection 300 0 300 −200 Change in Fitness (DQ) 800 Price’s plot: Comparing changes in mean fitness (DQ) due to Selection, Crossover & Mutation operators 600 DQSelection 500 DQCrossover DQMutation 400 20 40 60 Generations (c) 80 100 −600 20 40 60 Generations (d) 80 100 Figure 3.3: Convergence detection by monitoring the ±σ (standard deviation) interval of the contribution of crossover operator with BTS: Plot (a) is a fitness comparison plot for the best, worst and average fitness. Plot (b) compares the effect of genetic operators using extended Price’s equation (3.8). Plots (c and d) show the average and the ±σ (shaded areas) for the crossover and mutation operators respectively. For all plots Pc = 1.0, Pm = 1/l and N = 100 and results are averaged over 100 runs. The label A on plot (c) marks the generation at which the evolution converges and it corresponds to label A on plot (a) where fitness progress stalls. 3.5.1 The proposed convergence threshold parameter Having used one standard deviation interval to analyse the effect of genetic operators, then, the width of the ±σ envelope for the effect of an operator j (crossover in this case) on the fitness CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 60 growth at every kth generation lies within the interval: [∆Qjk − σjk , ∆Qjk + σjk ] (3.13) where ∆Qjk is the change in the average fitness of the population at iteration k due to operator j and σjk is the corresponding standard deviation. Let the width be represented by σqjk , then it can be determined as follows: σqjk = (∆Qjk + σjk ) − (∆Qjk − σjk ) = 2σjk . (3.14) Consider the complete set of plots for experiment 1 (for BTS) shown on figure 3.3, the point labelled A on plot (a) directly corresponds to the point labelled A on plot (c) when read from the x-axis (i.e., the generations axis). It is fairly easy to notice that the more the width of the ±σ envelope for the crossover operator shrinks to zero (plot (c)), the flatter the gradient of the best and average fitness curves on plot (a). In other words, the width σqjk in equation (3.14) indirectly represent the available diversity in the population. Hence, the generation at which σqjk tends to zero signifies the beginning of convergence in the overall search process. Therefore, the proposed convergence measure is to prescribe a threshold value for the parameter σqjk such that whenever σqjk falls below this threshold, the evolutionary search process is automatically terminated. We must remark here that this threshold parameter is user defined and its appropriate value is determined empirically, preliminary investigations reveal that a value of σqjk ≤ 0.01 is suitable for crossover and mutation probabilities of Pc = 1.0 and Pm = 1/l respectively. Ultimately, since determining optimum value for this threshold parameter relies on some other EC parameters, as part of our further investigations, a thorough sensitivity analysis will be carried out. 3.6 Contribution This chapter provides insight on the relevance of convergence detection in EC and sheds light on some conventional convergence measures. Most importantly, it provides insight on the interactions among the genetic operators during the evolutionary search process. A visual means for investigating the individual roles of genetic operators on fitness progress is developed using the extended Price’s equation. The experimental results obtained after comparing the plots for the contribution of the genetic operators using RWS and BTS reveal two interesting findings. First, while using the RWS method, the proposed technique for visualizing the effect of genetic operators using extended Price’s equation have shown that all the three operators play random roles of exploiting and exploring the search space throughout the evolution period. This has made it infeasible to deploy their individual effect as a means to measure convergence when RWS is utilized. Second, substituting the RWS with a BTS method reveals the contrary. The extended Price’s plots in this case demonstrate a clear separation of roles among the three genetic operators. The BTS operator takes the lead in exploiting the highly fit areas of the search space; the mutation CHAPTER 3. CONVERGENCE ANALYSIS IN EC ALGORITHMS 61 operator handles the exploration aspect while the crossover operator serves as a moderator between the two. This has made it possible to monitor and use the crossover’s effect as an effective means of detecting convergence in the evolution. Consequently, the insight gathered above led to the development of a novel convergence measure (section 3.5) that can allow automatic convergence detection in EC. 3.7 Remarks While the earlier chapters have introduced and analysed the initialization and developmental aspects of evolutionary computation algorithms, this chapter augments the previous work by analysing the process that could lead to successful termination of the evolutionary search, which is a prerequisite to achieving one of the objectives for the proposed hybrid optimization algorithm. Therefore, in the following chapter an investigation of the principles of gradient based methods for local optimization will be presented. This will then be utilized in the later chapters for the proposed hybrid optimization algorithm. Chapter 4 Local Search Algorithms for Optimization In the previous chapters, detailed investigation and analysis on evolutionary computations was given. Such algorithms are global search approximate techniques where success relies upon some stochastic heuristics. The design of the proposed hybrid algorithm requires combining features form both the approximate and exact methods. Thus, before plunging into the hybrid algorithms, this chapter will present the general idea behind the state-of-the-art gradient-based local optimization algorithms. Details on the design of the Newton-based local optimization techniques (i.e. interior point method (IPM) and the sequential quadratic programming (SQP) algorithm) that will be used for the hybridization will be given. An algorithmic approach for effective evaluation of derivatives will then be presented. 4.1 An Overview of Local Optimization Algorithms Consider a general expression of a continuous optimization problem shown in equation (4.1), the objective function to be optimized1 f : Rn → R is defined in terms of a vector of the design variables x of length n that is in the set of real numbers R. min f (x) : f ∈ Rn ; n ≥ 1 (4.1) Commonly, gradient based optimization algorithms sequentially generate at every k th iteration, a vector of solution points xk that is expected to terminate at x∗ (i.e the optimal solution) when either no more progress can be made or when the optimal solution has been attained with sufficient accuracy. Beginning with an arbitrarily chosen initial solution point x0 , the iterative progression from point xk to xk+1 depends on the ability of the algorithm to decide on the nature of the gradient of the objective function f at any point xk , and possibly, some additional information about the previous points xk−1 , xk−2 , ..., x0 . Typically, every new solution point xk+1 is expected to yield a lower function value than its 1 Minimization or Maximization. 62 CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 63 predecessor xk . In fact, a critical distinction between the various local optimization algorithms is on the nature of their successive iterations. A class of algorithms that insists on reduction in the function value at every iteration enforces f (xk ) < f (xk−1 ) and constitutes the so-called greedy algorithms [100]. The Newton and quasi-Newton algorithms are part of this class. The other class that do not insist on minimizing the value of the objective function at the end of every iteration usually enforces f (xk ) < f (xk−m ); where m > 1 is the maximum acceptable iterations without a decrease in the objective function value. This is the class of nonmonotone algorithms which are non-greedy descent algorithms. Another major categorization of the gradient based algorithms is on their approach for stepping from one iteration point xk to the next xk+1 . The approach for taking a step is always either a line search or a trust region based. The general expression for deriving the next iteration point xk+1 is dependent on two key parameters; the evaluated search direction dk ∈ Rn and an estimated value for the step length parameter αk : {αk ∈ R : 0 < αk ≤ 1} along the obtained direction such that: xk+1 = xk + αk dk . (4.2) The line search based algorithms evaluate the search direction and then decide on how long to search along that direction by estimating a suitable value for the step length parameter αk . On the contrary, trust region based algorithms start by defining a region around the current iteration point xk within which they believe a model derived from the second order Taylor approximation of the objective function (4.4) is a good approximation of the actual objective function. Based on the size of the defined trust region, these algorithms choose the search direction and the step length simultaneously. One might have noticed that for the line search based methods, if the step length parameter does not lead to a decrease in the value of the objective function, the algorithm can easily try to re-evaluate a feasible one. However, in trust region methods, both the search direction and the step length must be discarded, the size of the trust region must be contracted and the procedure repeated. This and many other reasons made the line search based optimization algorithms computationally cheaper than their trust region counterparts. Nevertheless, we must remark here that some researchers [11] have the view that trust region methods can be more reliable compared to the line search based methods especially when the initial starting point is significantly away from the actual minimizer. Yet, since the local search algorithm (SQP) to be proposed in the later sections will be a line search based method, this investigation will be limited to only line search based local optimization techniques. 4.2 Line Search Based Local Optimization Methods As highlighted earlier, the iterative progress in line search based methods relied on the computed search direction dk and the evaluation of the possible distance along the direction to which the search can progress, i.e. step length αk . The manner in which the search directions are computed is where the gradient based methods principally differ. For any smooth continuously differentiable function f : Rn → R in the neighbourhood of CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 64 iteration point x, and an assumed vector of search direction d ∈ Rn , the necessary and sufficient conditions for optimality requires ∇f (x∗ ) = 0, and ∇2 f (x∗ ) ∈ Rn×n to be a symmetric positive definite matrix for x∗ to be a local minimizer of the function f . The Taylor expansion of f yields: 1 f (x + d) = f (x) + ∇f (x)T d + dT ∇2 f (x)T d + · · · 2 (4.3) Gradient based methods assume that the objective function f is differentiable and it is approximately quadratic (i.e. convex) in the vicinity of the stationary point x. Therefore, the second-order Taylor expansion of equation (4.3) is: f (x + d) ≈ f (x) + ∇f (x)T d. (4.4) Thus, setting the gradient of equation (4.4) to zero at stationary point and solving for d yields: d=− ∇f (x) −1 = − [H(xk )] ∇f (x) ∇2 f (x)T (4.5) where H(x) = ∇2 f (x) is the Hessian of the function f and d is the search direction which is required to be a descent direction. 4.3 Search Directions and Step Length in Gradient Based Algorithms As described previously, any step of the gradient based algorithms involves evaluation of the search direction dk and the step length parameter αk such that the next iteration is defined as in equation (4.2) above. In the following, the nature of the search directions and step length parameters for various gradient based algorithms will be presented. 4.3.1 Methods of Evaluating Descent Search Directions Commonly, gradient based algorithms require the search direction dk at any given iteration k to be a descent direction such that the directional derivative: dTk ∇f (x) < 0 (4.6) will guarantee a reduction in the value of the objective function f along this direction. From equation (4.5), a general form for the search directions dk is: dk = −Bk−1 ∇f (x), (4.7) where Bk ∈ Rn×n is a symmetric non-singular matrix. The most commonly used types of search directions for local optimization algorithms are as follows: i. Steepest Descent Direction: The search direction dk = −∇f (x) is called the steepest descent direction and among all the directions via which the search could move from point CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 65 xk to xk+1 , this is the direction along which f decreases most rapidly. Therefore, steepest descent algorithms are line search methods that move along the steepest direction at every iteration. Notice that the Hessian matrix in equation (4.7) is set to an identity matrix (i.e., Bk = I) for this category of algorithms. Thus, the primary advantage of these algorithms is that they require only the computation of the gradient of the objective function, and hence, they have low computational cost per iteration. ii. Newton Direction: Another important search direction is the Newton direction. Derived from the second-order Taylor expansion of f , the value of Bk = ∇2 f (x) is the true Hessian of the objective function. The Newton direction is quite a reliable descent direction if the Hessian ∇2 f (x) is sufficiently smooth so that the quadratic approximation of the objective function in (4.4) is sufficiently accurate. Thus, Newton methods are the algorithms that use Newton directions at every iteration with the condition that, the Hessian ∇2 f (x) is symmetric and positive definite2 . These methods typically have fastest convergence rate compared to all other line search based local optimization techniques. Moreover, when the search point xk is within the neighbourhood of the minimizer, quite a few steps/iterations are required to converge to the solution point with high accuracy. The main drawback of Newton methods is the need for the evaluation of the true Hessian ∇2 f (x) which is a matrix of second derivatives and can be quite cumbersome, error prone and expensive especially when the dimension of x is large. Furthermore, whenever ∇2 f (x) is not positive definite, the Newton direction may not be defined since the inverse of ∇2 f (x) may be ill-conditioned and consequently yields a search direction dk that violates the descent property in equation (4.6). iii. Quasi-Newton Direction: Yet another search direction is the quasi-Newton direction. In this case, instead of evaluating the true Hessian ∇2 f (xk ), the value of Bk (4.7) is only a mere approximation of it. The initial approximation of the Hessian (Bk ) is usually an identity matrix I, which is then updated iteratively to take into account the additional information derived from subsequent iterations. In essence, the Hessian update methods mainly rely on the fact that delta changes in the gradient of the objective function f from one iteration point to another provide vital information about the nature of its second derivative along the search direction. The algorithms that rely on this principle of Hessian update are called quasi-Newton algorithms and can achieve high rate of convergence (superlinear) without the expensive explicit evaluation of the Hessian matrix. A common drawback of quasi-Newton methods is that their rate of convergence is slower than that of Newton methods as they require running through several iterations. Also, after certain number of steps, the Hessian approximation often tends to yield an ill-conditioned matrix that may cause the entire search process to diverge. This necessitates having the approximate Hessian Bk been reset to its initial value which consequently slows progress even further. Because for the majority of the popular Hessian update techniques such as BFGS, DFP and SR1 [101, 100], the initial approximation of Bk is an identity matrix I, 2 A positive definite matrix must have a positive determinant, i.e., it is always non-singular. Thus, a real and symmetric matrix is positive definite iff all its eigenvalues are positive. It is positive semidefinite, negative semidefinite or negative definite iff all of its eigenvalues are non-negative, non-positive or negative respectively. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 66 the entire search process is always reduced to a simple steepest descent after every reset of the Hessian matrix. iv. Conjugate Gradient Direction: This category of search directions are typically more effective than steepest descent directions and are fairly computationally equivalent. Unlike in the Newton and quasi-Newton directions, this search direction requires no storage of large Hessian matrices. The methods that use this search direction are called conjugate gradient methods. These methods however are only first order and therefore do not achieve fast convergence rate as Newton and quasi-Newton methods. As argued by Powell [102, 103], conjugate gradient methods may fail to converge on non-convex problems and therefore need restart. 4.3.2 Methods of Evaluating the Step Length Parameter The step length parameter α ∈ R : (0 < α ≤ 1) is a positive scalar that is expected to give a substantial reduction in the function value. It is normally the minimizer of the merit function 3 defined by: ϕ(α) = f (xk + αk dk ); α > 0. (4.8) Generally, the ideal value for the step length parameter α is the global minimizer of the merit function (4.8) itself. Determination of this global minimizer requires several evaluations of the objective function f and its gradient ∇f . Therefore, since evaluation of even a local minimizer of equation (4.8) is expensive, a tradeoff is necessary. Thus, at every kth iteration, inexact line search algorithms are used to try out a sequence of candidate values for αk . Based on some pre-defined termination conditions, a suitable value for αk is accepted. A simple condition that ensures αk provides a meaningful reduction in f entails: f (xk + αk dk ) < f (xk ). (4.9) Worth noting is that the step length α need not to lie near the minimizer of the merit function ϕ(α) for it to effectively yield a sufficient reduction in the objective function. Several inexact line search algorithms for estimating a suitable value for the step length parameter exist, and they are usually named after the termination condition used. Thus, they include the method based on Armijos rule, Goldstein condition and the popular Wolf conditions [100]. All these algorithms typically possess two key stages. The first stage is a backtracking procedure that finds an interval containing the desirable step lengths, while the second is an interpolation phase where a good value for α is computed within the obtained interval. The most commonly used termination condition is based on the two Wolf conditions and it has been analytically proven that [105], to every smooth continuous function there exist a value for the step length parameter that satisfies the following two Wolf conditions. 3 Originally used in regression, a merit function is a function that measures the agreement between data and the fitting model for a particular choice of the parameters [104]. Parameters are adjusted based on the value of the merit function until a smallest value is obtained, the resulting parameters are known as the best-fit parameters. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 67 First: The step length α must provide sufficient decrease in f such that: f (xk + αk dk ) ≤ f (xk ) + c1 αk ∇fkT dk , (4.10) where c1 ∈ [0, 1] is a positive constant which is quite small in practice, typically c1 = 10−4 . Thus, the reduction in f should be proportional to both the value of αk and the directional derivative ∇fkT dk . Second: This is called the curvature condition, it ensures that the derivative of the merit function ϕ(αk ) (see equation (4.8)) is greater than a constant c2 times the derivative of ϕ(0), i.e.: ϕ0 (αk ) ≥ c2 ϕ0 (0) (4.11) such that the new directional derivative satisfies: ∇f (xk + αk dk )T dk ≥ c2 ∇fkT dk (4.12) where c2 ∈ [c1 , 1], its typical value for Newton and quasi-Newton methods is 0.9 and 0.1 for nonlinear conjugate gradient methods. For more details on these and other techniques for evaluating the step length parameter, see [105, 106, 107, 108, 109]. 4.4 Convergence Analysis of Gradient Based Algorithms Convergence assessment is critical to evaluating the performance of any optimization algorithm. In this section, a brief investigation on the rate of convergence and global convergence of the gradient based algorithms will be presented and the local search algorithms will be compared on this basis. While a number of measures exist for evaluating the rate of convergence of gradient based algorithms, the commonly used one [100] is the Q−convergence (Q stands for quotient) measure defined in terms of the quotient of successive errors. For a sequence of solution points {xk } : x ∈ R that iteratively converges to a minimizer x∗ , the rate of convergence of gradient based algorithms is classified as follows. Q−Linear: The convergence is Q−linear if there exist a constant r ∈ [0, 1] such that: ||xk+1 − x∗ || ≤ r; ∀ k sufficiently large. ||xk − x∗ || (4.13) Q−Superlinear: An algorithm is said to converge Q−superlinearly if as the number of iterations k tends to infinity, the error between two successive iteration points dies out. ||xk+1 − x∗ || →0 k→∞ ||xk − x∗ || lim (4.14) Q−Quadratic: These are algorithms which for any scalar M ∈ R : M > 0, their rate of CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 68 convergence satisfies: ||xk+1 − x∗ || ≤ M ; ∀ k sufficiently large. ||xk − x∗ ||2 (4.15) It is easy to notice that higher order rate of convergence are also possible and the trend is that a Q−quadratic algorithm will always converge faster than a Q−superlinear or Q−linear algorithm. While all Newton algorithms converge Q−quadratically, quasi-Newton methods converge Q−superlinearly and at the other extreme, all steepest descent algorithms have Q−linear rate of convergence. Conversely, the global convergence of gradient based algorithms requires not only a suitable estimate of the step length parameter, but also a carefully chosen search direction. In order to have good convergence characteristics, the evaluated search direction must not be orthogonal to the gradient ∇f , i.e. at least steepest descent steps must be taken regularly. From the foregoing, we would like to remark that one undesirable behaviour associated with general gradient based algorithms is that while on one hand steepest descent algorithms have guaranteed global convergence, their rate of convergence is quite slow (i.e., converge only Q-linearly). On the other hand, Newton algorithms can converge most rapidly (i.e., Qquadratically) to a minimizer, but global convergence is not guaranteed when the initial search point is not in the vicinity of the minimizer. This is because, when the search point is away from the minimizer, Newton methods tend to produce search directions that cannot lead to any decrease in f as they are nearly orthogonal to the gradient of the objective function ∇f . Thus, so long as the starting point is not guaranteed to be near the minimizer, a tradeoff is necessary to ensure global convergence and at the same time achieve rapid rate of convergence with gradient based algorithms. A summary of the key features for the aforementioned major categories of gradient based algorithms is given in table 4.1. It provides a simple comparison of these methods from which it can be deduced that Newton based optimization algorithm is the most suitable choice for the proposed hybrid algorithm. This is because the initial starting point that will be fed to the local algorithm will almost always lie in the vicinity of a minimizer since it is derived after sufficient convergence of the evolutionary algorithm. Therefore, global convergence of the Newton based algorithm and ultimately that of the proposed SQP algorithm is assured. Table 4.1: Comparison of the three major gradient based algorithms: The nature of their search directions, step length parameter and rate of convergence Algorithms Search Direction Steepest Descent Quasi-Newton −Bk−1 ∇f (xk ) Newton method Hessian Requirement Not needed: Bk = I Approximation: Bk ≈ ∇2 f (xk ) Exact Hessian: Bk = ∇2 f (xk ) Step Length Parameter Degree of Rate of Computation Convergence 0<α<1 1st Order Q−Linear 0<α<1 2nd Order Q−Superlinear 0<α≤1 2nd Order Q−Quadratic CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 4.5 69 Sequential Quadratic Programming Algorithm The standard sequential quadratic programming (SQP) algorithm is a Newton based nonlinear optimization algorithm that can be implemented either in the line search or trust region framework and can successfully handle constrained nonlinear problems. One major feature that is common to all SQP formulations is that the algorithms are divided into an outer linearization and an inner optimization loop. The linearization loop is responsible for approximating the nonlinear objective function f (x) in the original optimization problem (4.1) with a quadratic model, and if it exist, the nonlinear constraints with their approximate linear expressions at the current point xk . The result of this linearization allows representation of the original nonlinear problem (4.1) as a sequence of quadratic programming (QP) subproblems (4.16) which can then be solved using any QP solver. 1 min f (x)T x + xT Hx; H ∈ Rn×n x 2 (4.16) The framework of SQP is essentially based on Newton method, and since Newton methods solve nonlinear problems via a sequence of Newton steps, this method is called sequential quadratic programming. Extensive treatment on SQP algorithm can be found in the books of Fletcher and Nocedal [107, 11]. While the standard SQP algorithm uses active set strategy that is based on the null-space and range-space methods to solve its QP subproblems, the method adopted here is based on the earlier work in [106, 110] where interior point method (see section 4.6) will be deployed to minimize the QP problem. 4.6 Interior Point Method for Solving Quadratic Problems Interior point methods (IPM) have their origin from linear programming (LP) and have become important tools in mathematical programming, operations research and in many other areas of science. The main idea in IPM algorithms is to approach the optimal solution of the LP problem through the interior of the feasible region. This is the opposite strategy of the well known simplex algorithm proposed by Dantzig [111, 112] which moves along the boundary of the feasible region. IPM approach was also proposed by Hoppe [113]. Over the last two decades, a lot of research works have been reported on IPM algorithm and its variants many of which are surveyed and referenced by Mizuno et al. [114] and Wright [115]. Interior point methods can also be extended to handle general convex problems such as quadratic programming problems. Details can be found in the book of Nesterov and Nemirovskii [116] and in Hertog [108]. In this work, IPM algorithm will be employed to minimize the QP subproblems produced as a result of linearization of the original nonlinear optimization problem by the main SQP algorithm. Thus, IPM will form the inner (optimization) loop of the proposed SQP algorithm. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 70 Let a general quadratic programming problem be defined as: 1 min q(x) = cT x + xT Qx; x ∈ Rn , c ∈ Rn , Q ∈ Rn×n x 2 (4.17) then, the function q(x) (4.17) is convex if at least the matrix of quadratic terms Q is symmetric positive semidefinite. If the function to be optimized is subject to some constraints g, say gi (x) ≥ 0 : x ∈ Rn , i = 1, 2, ..., m, ∇g 6= 0 (4.18) then, IPM algorithms use the method of Lagrange multipliers to redefine the optimization problem into a composite function L called Lagrange function (named after its inventor Joseph Louis Lagrange [117]). The Lagrange function combines the objective function (4.17) and all the constraints (4.18) such that: m X 1 T L(x, λ) = c x + x Qx + λT gi (x) 2 i=1 T (4.19) where λ ≥ 0 is a vector of Lagrange multipliers. At every iteration of the SQP algorithm, the matrix of quadratic terms Q is derived from the Hessian of the original nonlinear problem. Q is then used to construct the QP subproblem (4.17) to be solved in the inner loop of the SQP algorithm. The minimum of (4.19) can then be obtained by taking its gradient with respect to all its variables (i.e., ∇x,λ L(x, λ)) and solving for the unknowns. This is done without explicitly inverting g, which according to [117] is the reason why the method of Lagrange multipliers can be quite handy. Hence, minimizing the Lagrange function yields the minimum of the originally constrained function. Details on constrained minimization can be found in [100, 107]. Of particular interest at this juncture is the fact that standard implementations of SQP algorithm only utilize approximate Hessians for the nonlinear problems. The Hessian is initially approximated by an identity matrix I and then updated iteratively via the well known Hessian update procedure proposed by Broyden-Fletcher-Goldfarb-Shanno (BFGS) [11, 101, 109]. The proposal here is to develop an automatic differentiation package that can algorithmically determine the exact values for the gradient and Hessian of any differentiable function at any given search point xk . The cost of evaluating the derivatives will be more or less equivalent to that of evaluating the function values themselves. Ultimately, the computational burden of evaluating derivatives via the conventional symbolic or finite difference methods will be alleviated. This is important for the proposed SQP algorithm in two key ways: i. Having exact Hessians at its disposal, the proposed SQP algorithm has upgraded the standard SQP algorithm from a mere quasi-Newton algorithm that takes steepest descent steps to a Newton algorithm taking full4 Newton steps at every iteration. Hence, the convergence rate is enhanced from superlinear to quadratic. 4 Full step means having the value of the step length parameter α = 1. Quasi-Newton methods barely accept α = 1 and even when they did, they still run at a superlinear rate [101]. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 71 ii. Since exact Hessian matrices will be used, the frequent reset of the search direction due to ill-conditioned approximate Hessians could be avoided or at least minimized5 . This means both global convergence and quadratic rate of convergence are assured. Therefore, the proposed method is hoped to converge to the minimizer in remarkably few steps. Algorithm 4.1 shows a detailed framework for the proposed SQP local optimization algorithm. The while loop at line 5 exits only if one of the three stopping conditions is satisfied. The first two are tolerance parameters Tol1 and Tol2 which are small positive numbers used to check whether the delta changes in the gradient and directional derivative of the problem have sufficiently approach zero. Their typical value is 10−6 to 10−3 . The third parameter MaxIter is the maximum iteration limit which is also user defined. Finally, instead of using approximate Hessians (see line 7), an exact value of the matrix ∇2 f (xk ) will be evaluated with the aid of an automatic differentiation algorithm to be presented in section 4.7. Algorithm 4.1 The SQP local optimization algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: begin k ← 0; xk ← x0 ; % x0 is the starting point returned by the EC algorithm dk ← d0 ; % Initial search direction d0 is a vector of all ones while ∇f (xx ) > Tol1 and ||dk || > Tol2 and k < MaxIter do Linearize (4.1) into a QP subproblem (4.17) H(xk ) ← ∇2 f (xk ) % computed via Automatic Differentiation Evaluate dk by minimizing QP subproblem (4.17) % IPM algorithm will be used if α = 1 satisfies Wolf conditions (4.10) and (4.11) then αk ← 1 else Evaluate αk : αk > 0 that satisfies (4.10) and (4.11) end if xk+1 ← xk + αk dk ; k ← k + 1; end while end In the following, details of the exact Hessian evaluation using automatic differentiation principle will be given. 4.7 Automatic Differentiation for Exact Derivatives Evaluation Also called algorithmic differentiation, automatic differentiation (AD) is built on the notion that the value of any function, simple or complex, is evaluated via a sequence of basic elementary operations involving unary or binary operators and their operands. The key motivation behind the need for AD follows the fact that conventional methods like the method of divided differences are prone to round-off errors when the differencing interval is small, and suffers from truncation 5 Resetting the Hessian to an identity matrix I is common in BFGS and other update procedures. If exact Hessians are available and the starting point is in the neighbourhood of the minimizer, then the problem of resetting search direction is eliminated. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 72 errors when the interval is large. On the other hand, the computational requirements of symbolic method are typically high especially when the function of interest is of higher dimensions. Unlike the finite differencing method which has its origin from Taylors theorem, AD is based on repeated application of the chain rule from elementary calculus. Recall that according to chain rule, if f : Rn → R is a composite function defined in terms of a vector h ∈ Rm which is in turn a function of x ∈ Rn , then, the derivative of f with respect to x is: ∇x f (h(x)) = m X ∂f ∇hi (x). ∂h i i=1 (4.20) Hence, AD techniques apply chain rule on a computational representation (tree-like graphs) of a function to generate analytic values for the function and its derivatives. Historically, the basic ideas of AD have been around for long time [118]. However, it was the early extensive study by Griewank6 et al. [119] that revived the interest in the use of algorithmic methods for evaluation of derivatives. Thereafter, a number of researches have been published7 on AD principles and its applications in mathematics and machine learning by Christianson and colleagues [120, 121, 122] and recently in [123, 124, 125, 126]. 4.7.1 Graphical Representation and Algorithmic Evaluation of Functions Consider the two dimensional function shown in equation (4.21), evaluating the function values at any given point xk = [x1 , x2 ] will entail an orderly execution of the elementary operations that made up the function. f (x1 , x2 ) = (x1 x2 + sin x1 + 4) 3x22 − 6  (4.21) The elementary operations will lead to defining some intermediate variables that link the input variables to the output. Note that all the input, intermediate and the output variables can be represented as vertices of a tree that graphically represents the entire function. The list in table 4.2 gives the detail trace for the evaluation of all the variables from the input to the output side. Consider the tree-like graph shown in figure 4.1, it gives a graphical representation of problem (4.21). The root vertices represent the input variables. The intermediate vertices stand for the intermediate variables and the top vertex is the output variable. According to graph theory, the ordering require that for any vertices a and b linked with an arc from b to a, then a is the parent vertex while b is the child. Therefore, the value of the child vertex b must be evaluated Va a Vb b 6 The analysis in this section is adopted from their work. about AD can be found in this portal: www.autodiff.org 7 More CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 73  Table 4.2: A list of variables definitions for function: f (x1 , x2 ) = (x1 x2 + sin x1 + 4) 3x22 − 6 Variables Input Intermediate Output Vertices Values v−4 v−3 v−2 v−1 v0 v1 v2 v3 v4 v5 v6 v7 v8 v8 4 3 6 x1 x2 v−1 v0 sin v−1 v1 + v2 v3 + v−4 v02 v5 v−3 v6 − v−2 v4 v7 f before the parent vertex a, i.e., the values of all the children vertices must be obtained prior to evaluating that of their parent. Hence, the overall function value can be obtained by evaluating the vertices in the graph from root through the top in an orderly manner. f V8 x V4 + V7 - V3 + V2 sin V-4 4 V6 x V1 x V-1 x1 V0 x2 V5 sqr V-3 3 V-2 6  Figure 4.1: Algorithmic evaluation graph for function: f (x1 , x2 ) = (x1 x2 + sin x1 + 4) 3x22 − 6 It is worth noting that when it comes to implementing the AD tool (see section 4.7.3), the user need not to explicitly break down the function into its elementary components as in the listing of table 4.2, but the identification of the intermediate variables and the graphical structure is usually done by the compiler in the application itself. Moreover, although the expressions in the listing appear symbolic, in the computer it is always the numerical value that is evaluated and stored. Yet another benefit of AD is that many of the elementary evaluations can be executed in parallel as can be seen from the graph in figure 4.1. The level or hierarchy of the evaluations implies parallel execution, e.g. from {v2 , v1 , v5 }, to {v3 , v6 } and then {v4 , v7 }, CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 74 and so on. 4.7.2 Modes of Automatic Differentiation and their Complexities The two basic modes via which AD can algorithmically yield the values and derivatives of any differentiable function are the forward and reverse modes. Although forward mode will be adopted here, the reverse mode will also briefly be presented. Forward mode of AD This is also called forward accumulation, it derives its name from the fact that the derivative evaluation sweeps in the same direction as that of evaluating the function value. First, the computer interprets the function (such as problem (4.21)) as a sequence of elementary operations on the work variables8 mapped as vertices vi such that i ≤ 0 for the input variables and i > 0 for the intermediate and output variables. Then, beginning from the root vertices, both the function value and the directional derivative (i.e., the derivative with respect to any given variable augmented by the AD tool) at every vertex are simultaneously evaluated and carried forward to the top vertex. Every forward sweep will then yield the function value and its derivative with respect to the chosen independent (i.e., input) variable. Therefore, for a function of n−dimensions9 , evaluating its complete gradient will require n forward sweeps; in our example problem (4.21), the function has 2 independent variables and will therefore need 2 forward sweeps to get the derivatives with respect to the 2 variables. It is easy to realize that forward mode will be more suitable for a function having several dependent variables and few independent variables but less suitable otherwise. In other words, forward accumulation is superior to reverse accumulation for functions of the form: f : R → Rm ; m  1 (4.22) The listing in table 4.3 shows the expressions for the forward derivatives of all the vertices propagated from the input, intermediate to the output vertex. At the beginning of every forward sweep, the derivative of one of the input vertices is seeded to 1 and all other inputs to zero. In other words, while differentiating function (4.21) with respect to x1 , we set v̇−1 = 1 and v̇0 = 0 and vice versa. Thereafter, the derivatives of the rest of the intermediate variables are evaluated by applying the chain rule (4.20). Hence at the end of every sweep the exact numerical values for the function and its gradient with respect to one of the variables will be accumulated. The above principle explains the basic forward accumulation method of evaluating derivatives. Notice from the listing in table 4.3 that if the value of v̇−1 is seeded to 1 and v̇0 to 0, then, the value of v̇8 will be the derivative of the function with respect to x1 . Conversely, if v̇0 is seeded to 1 and v̇−1 to 0, then the resulting value of v̇8 will yield the derivative of the function with respect to ẋ2 . Thus, it can easily be seen that up to n−forward sweeps are required to evaluate the complete gradient of an n−dimensional function. 8 For 9 The the example problem (4.21), the work variables are: vi = {x1 , x2 , 4, 3, 6}. dimensionality is determined by the number of independent variables, e.g. x1 , x2 , ..., xn . CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 75 Table 4.3: A list of values and derivatives for the forward mode AD on problem (4.21):  f (x1 , x2 ) = (x1 x2 + sin x1 + 4) 3x22 − 6 Variables Input Intermediate Output Vertices Values Forward Derivatives v−4 v−3 v−2 v−1 v0 v1 v2 v3 v4 v5 v6 v7 v8 v8 4 3 6 x1 x2 v−1 v0 sin v−1 v1 + v2 v3 + v−4 v02 v5 v−3 v6 − v−2 v4 v7 f v̇−4 = 0 v̇−3 = 0 v̇−2 = 0 v̇−1 = ẋ1 v̇0 = ẋ2 v̇1 = v−1 v̇0 + v̇−1 v0 v̇2 = v̇−1 cos v−1 v̇3 = v̇1 + v̇2 v̇4 = v̇3 + v̇−4 v̇5 = 2v̇0 v0 v̇6 = v̇5 v−3 + v5 v̇−3 v̇7 = v̇6 − v̇−2 v̇8 = v̇4 v7 + v4 v̇7 v̇8 = f˙ A more efficient and elegant approach that will be implemented in this work, defines the initial seeds for the vertices of the independent variables as vectors rather than scalars, i.e., the vertices are set to v̇−1 = [1, 0] and v̇0 = [0, 1]. Notice that the two vectors v̇−1 and v̇0 now correspond to the rows of an identity matrix, therefore, for a function of dimension n, a collective way to define the initial seeds for all the input variables is to set them to the rows of an identity matrix In ∈ Rn×n . In this way, it is possible to evaluate the value and accumulate the complete gradient of a multivariate function in a single forward sweep. Details will be presented in section 4.7.4. Reverse mode of AD Also called reverse accumulation, this mode acquired its name from the fact that instead of evaluating the derivative of every intermediate variable (from the root to top of figure 4.1) with respect to a chosen input variable xi , here an output variable is chosen and its derivative is obtained with respect to every intermediate variable from top to the root of the graph. Thus, the derivative is obtained via application of chain rule through the original evaluation trace in a backward manner. Therefore, the sequence for reverse accumulation is such that the function value is first evaluated and stored during a forward sweep. Then, this is followed by accumulation of the function derivative with respect to each of the intermediate and input variables during the reverse sweep. Hence, at the end of a reverse sweep, the overall gradient for the output variable (i.e. the function f in this case) is derived in a single sweep from the accumulation of its partial derivatives ∂f/∂xi with respect to the independent variables xi ∈ Rn . The accumulation process is achieved through an associated scalar variable v̄ (also called adjoint 10 variable [11]) attached to every vertex. The adjoint v̄k for the output vertex k is 10 The bar notation is used to denote a derivative. Its purpose is to differentiate the derivative term used in CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 76 initially set to 1, while that of each of the remaining k − 1 vertices is set to zero. These initial adjoint values for the k − 1 vertices are then updated going from top (i.e. the output), through the intermediate vertices and down to the input vertices during the reverse sweep such that: v̄k = X ∂vi (x) i>k ∂vk · v̄i (4.23) Technically, the reverse mode resembles symbolic differentiation in the sense that one starts with the final result in the form of a formula for the function and then successively applies chain rule down the graph until the independent variables are reached. Recall from the listing for the function values in table 4.2 that the value of the output vertex v8 = v4 v7 , therefore, if the adjoint of v8 is seeded to 1 such that v̄8 = 1, then, based on the definition in equation (4.23), the reverse derivative of any vertex, say v̄7 , is evaluated in the following manner: v̄7 = X ∂vi (x) i>7 ∂v7 · v̄i = ∂v8 (x) ∂v4 v7 · v̄8 = · v̄8 = v4 v̄8 . ∂v7 ∂v7 (4.24) In the same way, the derivative of the input vertex v0 is: v̄0 = X ∂vi (x) i>0 ∂v0 · v̄i = ∂v1 (x) ∂v2 (x) ∂v8 (x) · v̄1 + · v̄2 + · · · + · v̄8 . ∂v0 ∂v0 ∂v0 (4.25) Because all the vertices with the exception of v1 and v5 are independent of v0 (see the listings in table 4.2), their derivative with respect to v0 is zero. Hence, the derivative v̄0 reduces to: v̄0 = v̄0 = ∂v1 (x) ∂v5 (x) · v̄1 + · v̄5 ∂v0 ∂v0 ∂(v−1 v0 ) ∂(v02 ) · v̄1 + · v̄5 = v−1 v̄1 + 2v0 v̄5 . ∂v0 ∂v0 (4.26) The reverse derivatives of all the remaining vertices are accumulated in the above manner and the complete listing is shown in table 4.4. Notice how the sequence is reversed, i.e., while the values were initially obtained in a forward sweep, the derivatives here are evaluated beginning at the output and ending at the input vertices. Notice that seeding the adjoint of the output vertex to 1, (i.e. setting v̄8 = 1) and evaluating downward sets the adjoints of the input variables (v̄−1 and v̄0 ) to be the derivatives of the function with respect to x1 and x2 respectively. This is where reverse accumulation method tends to supersede11 the previously described basic forward accumulation method especially when dealing with n−dimensional scalar functions like: f : Rn → R. (4.27) One special case of the reverse accumulation principle is the backpropagation of errors in multilayer perceptron, a commonly encountered problem in artificial intelligence and neural the reverse mode from that in the forward mode. 11 Not without its set back, an initial forward sweep is required to evaluate and store the function value. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 77 Table 4.4: A list of values and derivatives  definitions for reverse mode AD on problem (4.21): f (x1 , x2 ) = (x1 x2 + sin x1 + 4) 3x22 − 6 Variables Vertices Values Output v8 v7 v6 v5 v4 v3 v2 v1 v0 v−1 v−2 v−3 v−4 v4 v7 v6 − v−2 v5 v−3 v02 v3 + v−4 v1 + v2 sin v−1 v−1 v0 x2 x1 6 3 4 Intermediate Input Reverse Derivatives v̄8 = f¯ = 1 v̄7 = v4 v̄8 v̄6 = v̄7 v̄5 = v−3 v̄6 v̄4 = v7 v̄8 v̄3 = v̄4 v̄2 = v̄3 v̄1 = v̄3 v̄0 = v−1 v̄1 + 2v0 v̄5 v̄−1 = v0 v̄1 + v̄2 cos v−1 v̄−2 = −v̄7 v̄−3 = v5 v̄6 v̄−4 = v̄4 networks in particular. Complexity of AD modes Unlike in the forward mode, an obvious drawback in the use of the reverse mode is the need to store the evaluated computational graph to be used during the reverse sweep for accumulating the gradient. A naive implementation of the reverse mode AD may lead to a hike in the storage that is proportional to the number of operations required to evaluate the function value. A simple workaround to this storage issue is via exploitation of the sparsity in the data structure. A more advanced but rather complicated method called checkpointing [127] favours more computations. It requires partial evaluations and partial storage at the same time. In other words, checkpointing involves re-evaluating the values of the graph vertices rather than storing the entire graph structure. When dealing with functions of type (4.27), theoretical analysis by Bischof et al. [127] revealed that if N operations are needed to evaluate the value of function f , then, the total computational requirement associated with the reverse accumulation of its gradient is not more than 3N +21 operations12 . But, the basic forward accumulation AD will require up to 12N +10 operations to obtain the gradient. Conversely, if the function is of type (4.22), then forward accumulation wins. Similar argument can be found in [11]. Besides, if the multivariate problem under consideration is a vector function of length m such that: f : R n → Rm (4.28) then, the relative cost of using forward or reverse accumulation becomes similar. In fact, in such cases, it is often hard to determine the appropriate balance between the forward and reverse computations that will minimize the cost of evaluating the derivatives. This problem, 12 This is independent of the function’s dimensionality, i.e., size of n. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 78 also called optimal Jacobian accumulation, is described to be NP-complete [128]. Ultimately, a comparison of AD techniques with the method of divided differences in [125] reveals that the divided differences method can only be as fast as the AD methods when the problem size is small. This is however not the case as problem size grows. Furthermore, there is no guarantee that the derivatives obtained via the divided differences approach are in anyway accurate, whereas AD delivers exact derivatives up to machine precision. 4.7.3 Implementation Techniques of Automatic Differentiation As mentioned earlier, the key to successful implementation of AD tool is the simultaneous evaluation of the function value and its derivative at every vertex of the computational graph. There are two approaches for implementing AD tool: source transformation and operator overloading. The source transformation (also called source code transformation or precompiler) method uses a precompiler that accepts and translates the given source code into a subroutine that compute both the function values and its gradients. This approach requires more tedious programming but it is said [119] to yield a very efficient AD implementation as it allows compile time optimization. The operator overloading approach which is the method adopted in this work requires a new user defined data type (AD object) that combines the function value; it’s gradient and Hessian in a single object. The function is decomposed into its elementary components, the value and gradient of which are evaluated by calling a series of subroutines. The operator overloading facilities13 available in languages such as C++, C# or high level tools like Matlab is then used to extend the capability of the built-in operators and functions to handle the user defined AD object. As can be noticed, operator overloading is significantly easier to implement than the precompiler method. It however require overloading all the arithmetic floating point unary and binary operators, and the trigonometric, logarithmic and exponential, etc. functions in order to operate on all differentiable functions. Presently, a number of available AD implementations include the ADOL-C, ADIFOR, Tapenade, ADIC mostly in C, and the ADiMaT and MAD which are Matlab based [125] implementations built on source code transformation and overloaded operators respectively. 4.7.4 The Proposed Matlab Implementation of the AD Algorithm Matlab is a computational tool that has both the object oriented programming capability and operator overloading facility. Therefore, it is a suitable platform for the proposed AD implementation. The method adopted here is based on the vector-mode approach of forward accumulation where for a multivariate function of the form: Y = F (x)X : Y ∈ Rm , X ∈ Rn×n 13 Not all languages or programming tools support operator overloading. (4.29) CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 79 the scalar augmented derivative term14 ẋ is redefined to a matrix Ẋ such that: Ẏ = F 0 (x)Ẋ : Ẋ = In×n×m ; m > 1 (4.30) where for the input variables, the gradient Ẋ with respect to the input variables is what is initialized as m−array of identity matrices In×n . Because the problems to be addressed here are of the form in equation (4.27), i.e. m = 1, the identity matrix above is simply of dimension n, hence, Ẏ = F 0 (x)Ẋ : Ẋ = In ∈ Rn×n . (4.31) The exact gradient value is obtained by updating this initial gradient (Ẋ) as the evaluation propagates from the input variables to the output variable. Similarly, the expression for the second derivative (i.e., the Hessian) is as follows: Ÿ = F 00 (x)Ẍ : Ẍ = 0n ∈ Rn×n×n (4.32) where the Hessian of the input variables is what is initialized as 0n which is an n−dimensional array of zeros. This is also updated as the evaluation propagates from the input variables, through the intermediate and up to the output variable thereby accumulating the exact numerical value for the Hessian. Therefore, defining the AD objects in this way guarantees that evaluation of both the function value and its derivatives is completed in a single forward sweep. The three fundamental steps involved in the development of the AD algorithm via overloading method are: i. Defining a new data type (Class) the instances (objects) of which possess separate fields (properties) for the values and the derivatives and can execute the user-defined overloaded functions (methods). ii. Defining a constructor function that can create an instance of the above class and automatically initialize its properties. iii. Creating overloaded functions for all the arithmetic operators and all functions (trigonometric, logarithmic, exponential etc.) upon which the AD object get its properties evaluated. Thus, for the proposed design, each instance of the AD class will have the following three property fields: (i) A function value field: funcValue (ii) A function derivative field: funcDerivative , and (iii) A function Hessian field: funcHessian. To realize a vector-form implementation for the forward accumulation, when initializing any given function of dimension n at an initial point x0 ∈ Rn , the constructor class for the AD objects will always initialize the object’s properties as follows: 14 The framework of this mode of differentiation has originated from the algebra of dual numbers [129]. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 80 i) funcValue is initialized to the initial point f (x0 ). ii) funcDerivative is initialized to an identity matrix of size n, i.e., In ∈ Rn×n . iii) funcHessian is initialized to an array of zeros i.e., 0n ∈ Rn×n×n . Thus, the AD object F (X) will then be a data type that holds the function value, the derivative and the Hessian right at a spot. This model conforms to the classic extended differentiation arithmetic15 model proposed by Rall [131, 130]. Hence, F (X) = (f (x), ∇f (x), Hf (x)) ≡ (f (x), ẋf 0 (x), ẍf 00 (x)) (4.33) where according to the extended differentiation arithmetic, any independent variable X is defined as a triplet having a component for its own value x, one for its derivative another one for its second derivative or Hessian 2 d x/dx2 dx/dx = 1 and = 0, such that: X = (x, 1, 0) . In the same way, any constant C is a triplet with value c, derivative, derivative d2 c/dx2 dc/dx = 0 and second = 0, such that: C = (c, 0, 0) . Hence, the corresponding values for the intermediate and dependent variables are obtained by operating on the above independent variables (initialized as AD objects) based on the chain rule (4.20). An algorithmic template for the AD class structure is shown in 4.2. It is made up of a method that defines the three property fields for the AD objects (lines 2 − 6) and a constructor function (lines 8 − 13) that construct and initialize the AD objects based on the dimensionality n of the problem (derived at line 9) and other initialization settings described above. This template is based on a typical Matlab syntax. In the following section, some overloaded arithmetic operators and functions will be presented. Using a simple example (section 4.7.6), a demonstration of how this automatic differentiation method can be used to evaluate the value, first and second derivatives of a given function in a single run will also be presented. 4.7.5 Some Overloaded Operators and Functions for AD Objects Having constructed the AD objects with their property fields initialized, it is possible to execute all arithmetic operations on them so long as the built-in operators and functions (i.e., the standard real arithmetic operators and other mathematical functions) are properly overloaded to handle objects of their type. To achieve this, we overloaded several Matlab built-in operators and functions some of which are as presented in the following. • Arithmetic operators–Both the binary and unary versions 15 The well-known concept of differentiation arithmetic [130] that suggest grouping function value and derivative as an ordered pair is one of the early breakthroughs in automatic differentiation. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 81 Algorithm 4.2 A constructor class template for an automatic differentiation object 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: classdef ADClass % Defining the AD object’s properties - Comment properties funcValues funcDerivatives funcHessian end % The Class constructor function - Comment methods function ADObj = ADClass(x) n = length(x) % Initialization of the object’s properties - Comment ADObj.funcValues = x; ADObj.funcDerivatives = eye(n); ADObj.funcHessian = zeros(n, n, n); end end end • Logarithmic and exponential operators • Trigonometric functions • Norm (ABS), etc. The following collection presents the process of overloading some basic operators and func- tions. Remember that for all the arithmetic operators, basic chain rule of differentiation (4.20) will be applied, but for any arbitrary differentiable functions such as trigonometric, logarithmic, exponential etc., a more general formulation (4.33) will be used. Binary Addition/Subtraction: Suppose the function of interest is a 2−dimensional function f , such that: f (x1 , x2 ) = x1 ± x2 (4.34) Then, the simple graph with root vertices corresponding to each of the two independent f V1 + V-1 x1 V 0 x2 (input) variables and a top vertex corresponding to the dependent (output) variable represents the evaluation process graphically. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 82 Let the vertices be: v−1 , v0 and v1 , then, based on equation (4.33), we have:  v−1 = and  v0 = dx1 d2 x1 x1 , , dx1 dx21 dx2 d2 x2 , x2 , dx2 dx22  = (x1 , ẋ1 , ẍ1 )  = (x2 , ẋ2 , ẍ2 ) However, since the proposed implementation seek to vectorize the definition for each of these vertices16 , we initialize their fields based on the dimensionality n of the function under consideration, such that: ẋ1 = h ∂x1 ∂x1 ∂x1 ∂x2 i h = ẋ1 0 i (4.35) and " ẍ1 = ∂x1 ∂x1 ∂x1 ∂x1 ∂x2 ∂x1 ∂x1 ∂x1 ∂x2 ∂x1 ∂x2 ∂x2 " # = ẍ1 # 0 0 0 (4.36) Similarly, ẋ2 = h ∂x2 ∂x1 ∂x2 ∂x2 i h = 0 ẋ2 i (4.37) and " ẍ2 = ∂x2 ∂x1 ∂x2 ∂x2 ∂x2 ∂x2 ∂x2 ∂x1 ∂x1 ∂x2 ∂x2 ∂x1 # " = # 0 0 0 ẍ2 (4.38) Therefore, the input vertices (v−1 and v0 ) can now be redefined as: v−1 = 0 , v0 = h i x2 , 0 i " h x1 , ẋ1 " ẋ2 , ẍ1 #! 0 0 0 0 0 0 ẍ2 (4.39) #! (4.40) Then, the output vertex v1 is: v1 = (v−1 ± v0 ) h x1 , ẋ1 = = " i ẍ 1 0 , 0 h x1 ± x2 , ẋ1 2 = f, ∇f, ∇ f 0 #! 0 " i ẍ 1 ±ẋ2 , 0 ± h x2 , 0 0 i ẋ2 , " 0 0 0 ẍ2 #!! #! ±ẍ2  Notice how a mere addition/subtraction of the two AD objects (i.e., vertices: v−1 and v0 ) leads to evaluation of the value, derivative and Hessian of the function f (4.34) as components of the output AD object v1 . Such single sweep execution demonstrates the power of the vectorized forward accumulation of derivatives. 16 This is the way to ensure evaluation of the complete derivatives in a single sweep of the forward accumulation. CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 83 Multiplication Operator: Let the function of interest be defined as: f (x1 , x2 ) = x1 × x2 (4.41) Then, the AD objects can also be seen as the vertices of the graph and their components can f V1 x V-1 x1 V0 x2 be defined as in equations (4.39) and (4.40). The output vertex v1 is therefore: v1 = (v−1 × v0 ) = " i ẍ 1 0 , 0 h x1 , ẋ1 0 #! h × 0 x2 , 0 i ẋ2 , " 0 0 0 ẍ2 #!! Now, multiplying the two AD objects based on the chain rule (4.20) gives: v1 = = h x1 x2 , ẋ1 x2 h x1 x2 , ẋ1 x2 = f, ∇f, ∇2 f i h 0 + 0 i ẋ2 x1 , " i " ẋ2 x1 , ẍ1 x2 # 0 0 0 #! ẍ1 x2 ẋ1 ẋ2 ẋ2 ẋ1 ẍ2 x1 + " 0 0 0 ẍ2 x1 # + " # ẋ1 h 0 0 i ẋ2 + " 0 ẋ2 # h ẋ1 i 0 !  The Sine Function Now consider the following trigonometric function (sine): f (x) = sin x f V1 sin V0 x1 The root vertex v0 and the top vertex v1 as shown in the graph can be defined as: v0 = (x, ẋ, ẍ) (4.42) CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 84 and therefore, the AD variables will be defined as: v1 = sin v0 = (sin x, ẋ cos x, ẍ cos x − ẋẋ sin x)  = f, ∇f, ∇2 f All other operators and functions are overloaded based on the principles above. In the following, an example is provided to further illustrate the application of the AD method described above by comparing it with the classical symbolic method of differentiation. 4.7.6 Example: Comparing Symbolic and Forward mode AD methods In order to compare the computational approach of symbolic differentiation method with forward mode AD technique, consider the 2−dimensional function (4.43), in the following, the value and derivatives of this function will be evaluated at x = (π, π/2) both via traditional symbolic method and AD approach described above. f (x1 , x2 ) = (x1 x2 + sin x1 + 4) (4.43) Symbolic Differentiation: This entails direct substitution of the solution point xk = (x1 , x2 ) = (π, π/2) after evaluating the formula for the value and the derivatives using chain rule. Value: For the problem under consideration (4.43), f (x1 , x2 ) = (π.π/2 + sin π + 4) = xk π2 + 8 2 Gradient: The gradient is evaluated in two stages: first, the formula is derived by applying chain rule (4.20) on the partial derivatives of problem (4.43). Second, the solution point is substituted into the obtained formula to get the gradient. f 0 (x1 , x2 ) = h ∂f (x1 ,x2 ) ∂x1 ∴ f 0 (x1 , x2 ) = xk ∂f (x1 ,x2 ) ∂x2 h π 2 + cos π i h = x2 + cos x1 i h π = π−2 2 π x1 i i Hessian: In the same way, the Hessian is obtain as follows:  00 f (x1 , x2 ) = ∂ 2 f (x1 ,x2 )  2∂x1 ∂x1 ∂ f (x1 ,x2 ) ∂x2 ∂x1 00 ∴ f (x1 , x2 ) = xk  ∂ 2 f (x1 ,x2 ) ∂x1 ∂x2  ∂ 2 f (x1 ,x2 ) ∂x2 ∂x2 " − sin π 1 # 1 0 = " − sin x1 1 " = 0 # 1 1 0 # 1 0 CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 85 Notice how the above symbolic approach requires the computer to explicitly evaluate and store the formula before substituting the values and solving via the basic real arithmetic. In the following, the AD forward mode will be presented. Forward mode AD: Here we will redefine the problem variables (both dependent and independent) in terms of AD objects. Then, the differentiation arithmetic described above will be used to concurrently evaluate the function value and derivatives algorithmically. It will be interesting to realize how this can be achieved by simply evaluating problem (4.43) with the newly defined AD variables using the previously overloaded operators. Let us break the problem (x1 x2 + sin x1 + 4) into the following three input variables (vertices) such that if v−2 = x1 ; v−1 = x2 ; v0 = 4 then, these vertices can be initialized as AD objects based on the solution point xk = (x1 , x2 ) = (π, π/2), such that: v−2 = h π, 1 i " 0 , 0 #! 0 0 0 ; v−1 = π h , 0 2 i 1 , " 0 #! 0 0 0 ; v0 = h 4, 0 " i 0 0 , 0 0 #! 0 Hence, problem (4.43) is now v1 = v−2 v−1 + sin v−1 + v0 (4.44) Therefore, the value and derivatives of problem (4.43) can now be obtained by evaluating equation (4.44) via the differentiation arithmetic (i.e. the AD approach). " #! " i 0 0 i 0 π h v1 = π, 1 0 , , 0 1 , 2 0 0 0 " #! h i − sin π 0 + sin π, cos π 0 , 0 0 " #! h i 0 0 + 4, 0 0 , 0 0 h #! 0 0 Therefore, v1 = = π2 h π , 2 2 i " π , π 2 + 8 h π2 −2 , 2 2 0 1 #! 1 h 0, −1 + 0 " #! i 0 1 π , 1 0 = (f (xk ), f 0 (xk ), f 00 (xk )) " i 0 0 , 0 #! 0 0 + h 4, 0 " i 0 0 , 0 #! 0 0 CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 86 which is similar to the solution obtained via the traditional symbolic method above. Now, from the solution v1 which is an AD object (i.e., a structure), one can extract the function value, derivative and Hessian respectively as follows: Function Value = v1 .funcValue = π 2 +8 2 Function Derivative = v1 .funcDerivative = Function Hessian = v1 .funcHessian = " 0 1 1 0 h π 2 −2 2 i π , and # The elegance of this approach is in its suitability for algorithmic computation in computer. Notice how the final solution yields the exact results for the function value, gradient and the Hessian. Using such exact Hessians, the proposed SQP local search algorithm could easily derive effective search directions. Hence, the advantage of this vectorized forward AD method is two fold; it is both accurate and computationally inexpensive. 4.8 Contribution The earlier analysis of the characteristics of various gradient based local search algorithms in this chapter has helped us picked the sequential quadratic programming (SQP) algorithm which is a Newton based method. The choice was made based upon the following two findings: First, since in the proposed hybrid setup (details in the next chapter), the SQP algorithm will be invoked after sufficient convergence of the global algorithm, it is quite certain that the local algorithm will be initialized with a solution that is always in the vicinity of the global optimum point. Thus, whenever initialized in this way, its global convergence and quadratic rate of convergence are both assured. Second, to further minimize the number of iterations required by this local search method, an automatic differentiation algorithm based on the proposed vectorized forward accumulation method is used to cheaply evaluate the derivatives. This improves the quality of the evaluated search directions and alleviates the need for reverting to a basic steepest descent method after every few iterations. This ultimately leads to the realization of the proposed local search algorithm that will ensure rapid convergence to the optimum solution by taking long but few steps. 4.9 Remarks This chapter begins with an investigation of various types of gradient based local search algorithms. Then, the advantages and disadvantages of the steepest descent, Newton, quasiNewton and conjugate gradient methods were analyzed. Thereafter, various methods for evaluating search directions and step sizes were investigated. Finally, a brief report on convergence analysis of the gradient based algorithms was given. Because the proposed local search SQP algorithm is designed to utilize exact Hessians during evaluation of its search directions, this CHAPTER 4. LOCAL SEARCH ALGORITHMS FOR OPTIMIZATION 87 chapter concluded with a broad treatment on the automatic differentiation principles for efficient evaluation of exact derivatives. The next chapter will propose and evaluate a new scheme for hybridizing the global EC algorithm presented in chapters 2 and 3 with the SQP algorithm presented herein. Chapter 5 The Proposed Hybrid Evolutionary Algorithm Besides a brief treatment of the motivation behind the need for the development of hybrid optimization methods, this chapter will begin by introducing the current trends in hybridizing evolutionary algorithms. Taxonomies of various categories of hybrid algorithms will be presented. Thereafter, we will propose a novel approach for combining evolutionary algorithm (EC) with the SQP algorithm which is a Newton based local search optimization method. Finally, a series of experiments undertaken to evaluate the proposed hybrid system will be presented and analyzed. 5.1 Why the need for hybrid algorithms In the last few decades, it has become well understood that population based search methods like the evolutionary algorithms (EAs) are effective in exploring search spaces even when faced with problems having high-dimensionality, nonconvexity, multimodality, isolated optima, nonuniformity and/or correlated variables. This can be attributed to the fact that at initialization, these nature-inspired methods generally try to capture a global picture of the search space. Then, during the search process they successively try to focus on the most promising regions of the search space. However, these global search methods are usually not effective in converging to the best solutions in these high quality regions [8, 132]. On the other hand, local search methods are generally more effective when it comes to exploiting specific regions of the search space, i.e., they can easily converge to better solutions in the vicinity of any given solution. Therefore, the notion of hybridizing various categories of algorithms with the aim of establishing a robust optimization method is currently receiving wide acceptance from both the system optimization and operations research communities. In the literature, such hybrid algorithms are also referred to as hybrid metaheuristics [2]. Prior to the development of any hybrid system, it is imperative to address the following issues in order to ascertain whether a hybrid system is needed, and if so, which kind of hybridization approach is suitable for the problem under consideration; the issues are: 88 CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 89 i. Understand the type of problem at hand and based on the optimization goal, one can decide whether to use only approximate, exact or a hybrid of the two algorithms. Typically, when dealing with simple convex problems of lower dimensions, local algorithms like the gradient based methods can suffice. Also, when the quality of the final solution and computational time are not very critical, then approximate algorithms like the evolutionary algorithms are usually sufficient for many of the low to medium sized nonconvex problems. Thus, in most cases, it is only when very good solutions are needed which cannot be obtained by an exact or approximate method in a feasible time frame, the development of hybrid algorithms is advised. ii. Determine what algorithms to combine and which type of combination of these algorithms might work well for the class of problem at hand and why. iii. Ascertain what role enhancing the capabilities of the individual algorithms can play to the success of the proposed hybrid system. iv. Determine how to fine tune the hybridized system to optimality for the category of problems under consideration. Unfortunately, not all of the above questions have direct or simple answers, in fact, the previous chapters in this work have so far concentrated on selection and tuning of the individual algorithms to be used in the hybrid system. The goal of this chapter is to look into the current hybrid methodologies and suggest a new way of combining the selected evolutionary computation algorithm (EC) with the chosen local search algorithm (SQP) presented in the previous chapters. This is hoped to yield an efficient and robust optimization algorithm suitable for medium to large scale continuous global optimization problems. 5.2 Taxonomy of Hybrid Evolutionary Algorithms As noted by [2], it is not possible to exhaustively enumerate the various types of hybrid algorithms in the literature. This is true because the notion of hybridization in itself lacks a precise definition or a specific framework that clearly defines what should constitute the socalled hybrid algorithms. Although this may sound like a drawback, it is actually thought of as the reason behind the breakthroughs achieved with these kinds of systems so far. As pointed by [6], lack of precise boundary in the area of hybrid algorithms is what made the research field very rich and versatile. In other words, raising rigid boundaries between related fields of research often impedes creative thinking and exploration of new research directions. Yet, a noteworthy effort made by Raidl and colleagues [5] categorizes the various aspects of hybrid algorithms. They proposed a classification that attempt to unify the general framework of hybridizing algorithms. A concise schematic for the classification is shown in figure 5.1. The four major features depicted in this figure constitute the nature/type of the algorithms that compose the hybrid system, the switching/control method, execution mode and the extent or degree to which these algorithms are coupled. These features have in principle, virtually covered every aspect of the hybridization paradigm. CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 90 Hybridizing Algorithms Only Approximate Algorithms Only Exact Algorithms Sequential (Batched) Algorithmic Compostion Execution Mode A mix Parallel (Interleaved) Integrative (Shared Functions) Low level coupling Switching Mode Degree of Hybridization Collaborative (Independent Functions) High level coupling Figure 5.1: A concise categorization of hybrid algorithms - Adapted from [5]. Although as earlier highlighted, in recent years, a lot of research works involving hybrid algorithms are reported in the literature. Another view of classifying hybrid approaches entails the following: i. Hybrid metaheuristics: Though this can be seen as a superset of the rest of the hybridization classes, it particularly refers to the combination of two or more approximate algorithms. Thus, it involves combining various nature inspired algorithms like EAs and/or non-nature inspired algorithms like tabu search, iterated local search etc. The motive is to maximize the coverage of the entire problem space during the search with the aim of exploring the promising regions. Under this class, a common way of hybridizing EC is through: a. The development of problem specific representation [23]; b. The development of additional genetic operators [22]; and c. The incorporation of domain specific knowledge or features of classical algorithms [44]. ii. Memetic Algorithms: May be seen as a subset of the above class, but they uniquely consist of combination of approximate algorithms like EAs with exact methods like gradient based local search algorithms. The main focus of this class is to facilitate rapid convergence to the optimum solution (i.e., exploitation of the promising regions) as soon as they are explored. Raidl et al. [8] argue that although this class yields very successful hybrid algorithms, not much work exist in this direction. iii. Algorithms portfolio: This notion is based on the intuition that executing many short runs of one or more algorithms (in a parallel or interleaved manner) over a prescribed solution period can provide improvement in terms of overall performance. Gomes et al. [133] CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 91 formulated the computational cost of a portfolio as a random variable having a probability distribution and evaluated its mean (i.e., the expected evaluation cost) and standard deviation (i.e. the dispersion or the risk involved). They argue that a skilful schedule of multiple copies of a single algorithm can outperform a hybrid made from different algorithms. Conversely, a later work by Matthew et al. [134] highlighted that a portfolio essentially comprises of both scheduling and machine learning aspect. They divided the scheduling aspect into either a restart or task-switching schedules. The former is a schedule for a single randomized heuristic, executed in a restart model. While the latter consist of a set of one or more deterministic heuristics, each executed in a suspend-and-resume model. They argue that the suspend-and-resume model can yield better performance so long as proper scheduling is learned. In essence, each one of the above three classes have its merits and demerits. The first class favours exploration of problem space at the expense of exploiting high quality regions. Although the second class tried to alleviate this problem, a naive design of a memetic algorithm that is overly focused on exploitation may risk premature convergence to sub-optimal solutions. And finally, the last class have largely left the additional parameter (i.e., the scheduling aspect) to be handled in a sort of a trial and error procedure. In table 5.1 we present some recent hybrid algorithms reported in the literature. The table summarizes the methods from different perspectives ranging from the type, class and numbers of the combined algorithms, the adopted control/switching mode, the feature that is optimized, the validation method employed and the intended application area. Note that the summary given here is only an attempt to provide a reflection of the growing number of hybrid algorithms recently reported in the literature. It tries to capture varieties of local search algorithms usually combined with evolutionary algorithms to enhance either the efficiency or accuracy of an optimization method for various application areas or problem domain. 5.3 The Proposed Task-Switching Hybrid Evolutionary Algorithm As a first attempt, we propose combining a global evolutionary algorithm (EC) presented in chapter 2 with the Newton based local search algorithm (SQP) presented in chapter 4 in a collaborative manner. In essence, the two algorithms will run sequentially retaining their individual functionalities such that they complement each other by operating independently on the problem via data/information exchange. Initially, as a population based method, the genetic algorithm will be invoked with a randomly created initial population to provide the driving force for intense exploration of the search space. It is when the high quality regions are found and the genetic algorithm has sufficiently converged to these areas (as can be sensed by the automatic convergence detection mechanism presented in chapter 3), the local algorithm will take over and exploit the highest quality region explored by the evolutionary algorithm. In addition, realizing that there is yet a slight tendency for the final solution returned by the CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 92 Table 5.1: A chronological survey of recent hybrid optimization algorithms in various applications domain s/n Date Global algorithm Local algorithm Category Optimization Validation/ purpose Application 1 1994[7] GA Hill climber Integrative Efficiency 2 1997[135] GA Collaborative Accuracy 3 2004[85] GA Integrative Efficiency 4 2004[44] GA Integrative Efficiency Feature selection 5 2005[136] GA Integrative Accuracy 6 2007[95] GA Collaborative Accuracy 7 2008[72] GA Feasible path method Back propagation Search algorithm for feature selection (SFFS) Derivative free optimizer Simplex algorithm Tabu search Collaborative Accuracy 8 2008[84] GA Collaborative 9 2008[97] NSGA II 10 2009[23] Adaptive GA Accuracy/ Efficiency Accuracy/ Efficiency Accuracy 11 2010[27] GA Interval search Collaborative 12 2010[3] Deterministic hill climber Integrative Numerical Problems Numerical Problems Fuzzy scheduling problem TSP problems Multiobjective optimization Power distribution network problems Interval optimization NK landscape problems Bayesian optimization algorithm Nearest neighbour search Steepest descent Branchexchange procedure Collaborative Integrative Accuracy/ Efficiency Accuracy TSP problems Numerical problems Fuzzy control local search algorithm to be a sub-optimal one1 , a validation loop will be utilized to kick-start an additional round of a global search by the EC algorithm. While in the validation loop, the initial population will also be randomly created and will be seeded with a copy of the best solution returned by the local algorithm and its inverted version. Thus, if the required population size is N , then, N − 2 individuals will be created randomly while the remaining two will be derived from the previous run. Because the proposed evolutionary algorithm uses a binary tournament selection method with adaptive elitist strategy, the optimum solution returned at the end of the validation run will always be of equal or higher fitness than the provided seed (i.e., the solution obtained during the initial run). Algorithm 5.1 demonstrates the working of the proposed hybrid switching procedure. The 1 This could happen when the genetic algorithm has not properly explore the true global optimum region and the local algorithm is therefore not supplied with a good starting solution. CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 93 Algorithm 5.1 The proposed hybrid EC/SQP algorithm begin t ← 0; initialize population P1 (t): size = N get Global optimum solution: xEC ← invoke EC(P1 (t)) % see Algorithm ?? get Local optimum solution: xSQP ← invoke SQP(xEC ) % see Algorithm ?? re-initialize population P2 (t): size = N − 2 7: validate xSQP : x∗ ← invoke EC(P2 (t)∪xSQP ∪ x̄SQP ) % x∗ is the optimum solution 8: end 1: 2: 3: 4: 5: 6: proposal entails designing a memetic algorithm that relies on a task switching procedure to transfer control between the global and local algorithms. It begins with an initial randomly created population P1 (t) of size N from which an initial solution (xEC ) is derived using the EC algorithm (lines: 3-4). After termination of the EC algorithm, the search switches to the SQP algorithm which will be fed with xEC as its initial solution point (line 5). The solution obtained by the SQP algorithm (xSQP ) is then validated by running another instance of the EC algorithm. However, the size of the new randomly created initial population P2 (t) for the validation run is N −2 (line 6). This will be complemented with a copy of xSQP and its mutated version x̄SQP to maintain a uniform population size of N individuals. The search process stops and returns x∗ as the true optimal solution when validation is complete (lines 7). 5.4 Experiments An initial evaluation of the proposed hybrid algorithm is done by applying it on some benchmark numerical optimization problems. Details of the parameter settings of the hybrid algorithm used for the experiments are presented in table 5.2. 5.4.1 Characteristics of Global Optimization Test Problems Before evaluating any global optimization algorithm, it is important to seek a suite of test problems that satisfy some of the following qualities: 1. Nonlinearity: The function should not be linear 2. Scalability: The dimensionality of the test function must be extendible to medium or large sizes 3. Non-separability: A function is separable if it has no nonlinear interaction between its variables 4. Multimodality and Nonconvexity: The function must possess many sub-optimal peaks/valleys 5. Non-symmetricity: The global optimum should not be equidistant from any oppositely located local optima pair CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 94 6. High Dispersion: Dispersion indicates how far from being convex is the global topology of the function. It was argued that [137], a highly dispersed function can be more difficultly to global optimization algorithms than just a multimodal function having convex-like global structure. Detailed analysis and evaluation of the above features and more for test problems can be found in [77]. Table 5.2: Parameter settings of the proposed hybrid algorithm (where f = fitness, t = generations, l = string length, MaxGen = Maximum generations limit) Algorithms Parameters Values/settings Representation Population size Selection method Global (EC) Crossover: Type, Rate Mutation: Type, Rate Replacement scheme Crossover’s contribution to Switching fitness (σqCrossover ) criteria Stalled generations Maximum generations Search direction type Search direction evaluation Local (SQP) Binary encoding with mapping function 100 Binary tournament selection Single point, Pc = 1.0 Bit mutation, Pm = 1/l Adaptive elitist strategy (see section 2.9) when: σqCrossover ≤ 0.01 (see section 3.5.1) Step size Stopping criteria 5.4.2 when: ||fmax (t) − fmax (t − 20)|| ≤ 0.001 when: Number of Generations ≥ MaxGen Newton directions Exact Hessians: Bk = ∇2 f (x), (equation (4.7)) Wolf conditions 0 < α ≤ 1: (see section 4.3.2) when: ||∇f (t)|| − ||∇f (t − 1)|| ≤ 0.001 or ||dk (t)|| − ||dk (t − 1)|| ≤ 0.001 Selected Benchmark Test Problems To evaluate the performance of the proposed hybrid algorithm, a series of tests have been carried out on the Ackley, Rastrigin and Schwefel benchmark functions for global optimization. i. Ackley function: The generalized form of Ackley function is defined as: √ 1 Pn 2 Pn 1 f (x) = 20 + e1 − 20 · e−0.2· n i=1 xi − e n · i=1 cos(2πxi ) (5.1) where −15 ≤ xi ≤ 30 : i = 1, 2, . . . , n and global optimum x∗ = (0, . . . , 0), f (x∗ ) = 0. Ackley function is a multi dimensional nonlinear global optimization problem. Although the function is multimodal having many peaks/valleys forming several sub-optimal solutions, it is has low dispersion with a unimodal global topology2 and it is symmetric such that the global optimum is centrally surrounded by the local optimum points. However, Ackley function is scalable, nonlinear, multimodal and non-separable. These qualities have made 2 i.e. it is pseudo-convex, Ackley function gets more convex as the dimensionality is increased, thus, solving its higher dimensional versions is always easier CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 95 it a difficult problem that can easily deceive global optimization algorithms to get trapped at sub-optimal solutions. ii. Rastrigin function: The generalized form of Rastrigin function is defined as: f (x) = 10 · n + n X x2i − 10 · cos(2πxi )  (5.2) i=1 where: −5.12 ≤ xi ≤ 5.12 : i = 1, 2, . . . , n and global optimum x∗ = (0, . . . , 0), f (x∗ ) = 0. Rastrigin function is a scalable, nonlinear and highly multimodal function with many valleys increasing in depth when approaching the global optimum point. Although it is separable and has a global topology (i.e. pseudo-convexity) it is actually flatter and of higher dispersion compared to Ackley function and therefore more difficult. iii. Schwefel function: The generalized form of the Schwefel function is: f (x) = 418.9829 · n − n X xi · sin p  |xi | (5.3) i=1 where: −500 ≤ xi ≤ 500 : i = 1, 2, . . . , n and global optimum x∗ = (1, . . . , 1), f (x∗ ) = 0. Also nonlinear, separable and multimodal, Schwefel function is highly dispersed and lacks any global topology. Moreover, it is non-symmetric and scalable to higher dimensions. If we sort the complexity of the above problems based on their degree of dispersion, the Ackley function is the least and the Schwefel function is the most difficult. 5.4.3 Results and Discussions Two different sets of experiments were carried out. The first experiment investigates how the proposed hybrid algorithm behaves under increasing problem size. While the second experiment is aimed at evaluating the performance of the hybrid algorithm (EC/SQP) by comparing it with a standard evolutionary computation (EC) algorithm and the well known covariance matrix adaptation algorithm (CMA-ES) on the three benchmark test problems presented above. All experiments are run 100 times and averaged results are reported for statistical significance. Experiment 1: Scalability Test With the aim of testing the robustness of the proposed method under increasing problem size, we seek to optimize the Ackley test problem using the EC/SQP algorithm with the problem size set to 2, 10 and 100 dimensions. The results of this experiment are shown in figure 5.2. The tests are repeated 100 times with each having an entirely new randomly created initial population. The fitness plots for the averages obtained from the 100 independent runs of the 2, 10 and 100 dimensional Ackley function are plotted for comparison purposes. Similar test is carried out on the Rastrigin and Schwefel functions, see figure 5.2. CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 96 Fitness against Function Evaluations with Standard Error bars 1 0.9 Fitness (Normalized) 0.8 0.7 0.6 0.5 0.4 0.3 2−Dimensions 10−Dimensions 100−Dimensions 0.2 0.1 0 0 5 10 15 20 Function Evaluations (x1000) 25 30 (a) Ackley Function (2, 10 and 100-Dimensions) Fitness against Function Evaluations with Standard Error bars 1 0.9 Fitness (Normalized) 0.8 0.7 0.6 0.5 0.4 0.3 2−Dimensions 10−Dimensions 100−Dimensions 0.2 0.1 0 5 10 15 20 Function Evaluations (x1000) 25 30 (b) Rastrigin Function (2, 10 and 100-Dimensions) Fitness against Function Evaluations with Standard Error bars 1 0.9 Fitness (Normalized) 0.8 0.7 0.6 0.5 0.4 0.3 2−Dimensions 10−Dimensions 100−Dimensions 0.2 0.1 0 5 10 15 20 Function Evaluations (x1000) 25 30 (c) Schwefel Function (2, 10 and 100-Dimensions) Figure 5.2: Hybrid EC/SQP hybrid algorithm evaluated under increasing problem sizes (2, 10, 100) of: (a) Ackley, (b) Rastrigin and (c) Schwefel test functions. The error bars (I) represent the standard errors of the mean as all the results in these plots are averages of 100 independent runs. The plots in this figure show that the performance of the EC/SQP algorithm is fairly stable and immune to varying problem sizes. CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 97 Experiment 2: Performance Comparison Test This is a fitness comparison test where the proposed EC/SQP algorithm is compared to a standard evolutionary algorithm EC and the well known evolutionary strategy method called CMA-ES algorithm. The results of this experiment are shown in figure 5.3. Similar to experiment 1, we attempt to optimize the Ackley, Rastrigin and Schwefel benchmark functions with each of the three algorithms allowed to run for up to 30, 000 function evaluations. The parameters of both the EC and the CMA algorithms are tuned to optimality for the test problems. Discussions This study provided additional evidence on the fact that a skilful design of a hybrid system that combines the strengths of population-based and local search methods could yield an efficient and robust optimization system. The proposed hybrid EC/SQP algorithm combines a populationbased global algorithm (EC) with a gradient-based local search method (SQP) in a collaborative manner. Results show that EC/SQP seems to be suitable for small, medium and large scale continuous optimization problems. This may be a manifestation of the well-known no free lunch theorem [4] which may simply be put as: two hands are better than one. Recall that prior to the development of evolutionary methods and their hybrids, the notion of developing widely applicable optimization methods barely exists. Researchers were often focused on optimization methods that are mainly tailored to a specific problem category. But the results from this investigation seem supportive of our earlier suppositions that the performance of hybrid methods scales well to varying problem sizes, categories and/or levels of complexities. A careful look at the results of experiment 1 (see figure 5.2) reveals that for virtually all the varying sizes of the three different test problems, up to 90% of the maximum attainable fitness level was reached within the first 5000 functions evaluations. This is indicative of the speed at which the proposed EC/SQP algorithm approaches the optimal solution point. Notice, however, that with the exception of the Ackley function in plot (a), increase in problem size leads to an increase in the number of function evaluations required to reach the optimum solution. This indicates that to some extent, larger problem sizes might inhibit the performance of the proposed hybrid algorithm. But this is consistent with the fact that increase in problem size widens the search space making it harder for algorithms to explore and narrow down to the region of the true optimum solution. Nevertheless, the decrease in performance is rather minimum considering the 10 times increase in the problem size. A possible explanation of the discrepancy shown in plot 5.2(a) by the Ackley test function might be related to the fact that it is a pseudo-convex function with several local optima induced via its cosine component (see equation (5.1)). These local optimum valleys become shallow and smooth as its dimensionality increases. Thus higher dimensions of Ackley functions (i.e. with variables ranging from 10 to 100) appear easier to optimize than their lower dimensions counterparts (such as the 2 variables case). A similar behaviour exhibited by Griewangk benchmark test function was reported by Whitley et al. [77]. Turning now to the findings from experiment 2, the simulation results for the comparison tests are depicted in the six plots shown in figure 5.3. Notice that for the three test problems under consideration (see left column), in overall, the proposed hybrid EC/SQP algorithm shows CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS Fitness against Functions Evaluations with Standard Error bars 1 1 0.9 0.9 0.8 0.8 Fitness (Normalized) Fitness (Normalized) Fitness against Functions Evaluations with Standard Error bars 0.7 0.6 0.5 0.4 0.3 Hybrid EC/SQP EC Algorithm CMA−ES Algorithm 0.2 0.1 0 5 10 15 20 Function Evaluations (x1000) 25 0.7 0.6 0.5 0.4 0.3 Hybrid EC/SQP EC Algorithm CMA−ES Algorithm 0.2 0.1 30 0 0 (a) Ackley Function (10-Dimensions) 10 15 20 Function Evaluations (x1000) 25 30 Fitness against Functions Evaluations with Standard Error bars 1 0.9 0.9 0.8 0.8 Fitness (Normalized) Fitness (Normalized) Fitness against Functions Evaluations with Standard Error bars 0.7 0.6 0.5 0.7 0.6 0.5 0.4 0.3 0.4 Hybrid EC/SQP EC Algorithm CMA−ES Algorithm 0.3 0 5 10 15 20 Function Evaluations (x1000) 25 Hybrid EC/SQP EC Algorithm CMA−ES Algorithm 0.2 0.1 30 0 (c) Rastrigin Function (10-Dimensions) 5 10 15 20 Function Evaluations (x1000) 25 30 (d) Rastrigin Function (100-Dimensions) Fitness against Functions Evaluations with Standard Error bars Fitness against Functions Evaluations with Standard Error bars 1 1 0.9 0.9 0.8 0.8 0.7 0.6 Hybrid EC/SQP EC Algorithm CMA−ES Algorithm 0.5 0.4 Fitness (Normalized) Fitness (Normalized) 5 (b) Ackley Function (100-Dimensions) 1 0.2 98 0.7 0.6 0.5 0.4 0.3 Hybrid EC/SQP EC Algorithm CMA−ES Algorithm 0.2 0.3 0.1 0.2 0 0 5 10 15 20 Function Evaluations (x1000) 25 (e) Schwefel Function (10-Dimensions) 30 0 5 10 15 20 Function Evaluations (x1000) 25 (f) Schwefel Function (100-Dimensions) Figure 5.3: Comparing fitness plots for Hybrid EC/SQP, standard EC and CMA algorithms Test Problems (row-wise): Top: Ackely, Middle: Rastrigin, Bottom: Schwefel Problem sizes (column-wise): Left: 10-Dimensions, Right: 100-Dimensions The error bars (I) represent the standard errors of the mean as all the results in these plots are obtained by averaging 100 independent runs. The plots in this figure show that for virtually all the test problems, the performance of the proposed EC/SQP algorithm is always as good if not better than any of the other two algorithms. 30 CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 99 quite a significant performance improvement over the standard EC and CMA-ES algorithms. Worth noting is that this remarkable performance seems to generalize over the varying problems’ sizes (see right column). However, for such carefully selected categories of test problems, a critical analysis of the performance of each of the three algorithms requires cautious treatment. This is necessary because although all the three test problems are nonlinear, scalable, and multimodal in nature, they are quite different in complexity when viewed on the basis of their dispersion. In other words, a possible categorization of the plots in figure 5.3 is to place the Rastrigin function (mid row) as a moderately dispersed problem, while the Ackley (top row) and Schwefel (bottom row) test functions are respectively the least and most dispersed problems. Consequently, they stand at the opposite extremes of complexity. Beginning with the Rastrigin function (figure 5.3 mid row), the observed remarkable performance of all the three algorithms on this test problem may be attributed to its moderate level of dispersion. This could be why it seems easy to the three different global optimization approaches. Nonetheless, it can be noticed that the proposed EC/SQP algorithm appears to lead; the CMA-ES follows which is then followed by the standard EC algorithm. With regard to the Ackley function (figure 5.3 top row), one might notice that while the hybrid EC/SQP and CMA-ES algorithms clearly outperform the standard EC algorithm, the excellent efficiency exhibited by the CMA-ES algorithm (figure 5.3(a)) seem to deteriorate following the 10 times increase in the problem size (figure 5.3(b)). This, however, is not the case with the EC/SQP algorithm. Hence, it could conceivably be hypothesised that the hybrid nature of the EC/SQP algorithm might be the reason behind its immunity to the increase in problem size. It is interesting to note that for all the test cases considered in this experiment (figure 5.3), the standard EC algorithm always lags behind the other two algorithms except on the Schwefel function (bottom row). Surprisingly, this is where the CMA-ES algorithm exhibited least performance. This rather difficult to interpret result might have several possible explanations. It could be due to the fact that Schwefel function has the highest level of dispersion among all the three test cases. Therefore, it is a flat multimodal function that lacks any unimodal global topology (i.e., it does not exhibit any pseudo-convexity). It remains unclear, though, why high dispersion problems like Shwefel function seem to be easy for the standard EC algorithm (see figure 5.3 bottom row). But one possible reason for the sudden decline in the performance of the CMA-ES algorithm may be due to its excessive evaluation of infeasible solutions during the early stages of the search process. It is therefore thought that CMA-ES algorithm relies on exploiting global convexity to be successful. Hence, its remarkable performance on the low dispersion Ackley function (top row) deteriorates when faced with high dispersion problems like Schwefel. These results corroborate the findings of some previous studies in this field. An investigation on the CMA-ES algorithm by [137] revealed that the adaptive step-size heuristic, called cumulation, does not function as intended when the best regions of the search space are too spread out (such as in a high dispersion problems like the Schwefel functions). Nonetheless, it was reported elsewhere [138], that although CMA-ES algorithm may need more than 105 CHAPTER 5. HYBRIDIZING EVOLUTIONARY COMPUTATION ALGORITHMS 100 function evaluations for such high dispersion problems, it will at some point converge to the true global solution if sufficient evaluations are granted. Noteworthy, from virtually all the results in these experiments (see figure 5.3), the moment at which the switching from the global algorithm (EC) to the local algorithm (SQP) took place might easily be noticed. Thus, one could appreciate the remarkable contribution of the local algorithm towards the overall success of the hybrid EC/SQP algorithm under various categories of test problems. Ultimately, the results presented herein illustrate that the proposed hybrid EC/SQP optimization method is a robust and efficient novel approach that can effectively complement the traditional global optimization methods. 5.5 Contribution This first attempt to realize the proposed hybrid optimization algorithm was possible following an intuitive amalgamation of the previously presented evolutionary (EC) algorithm and the gradient based (SQP) local search method. Initially, we focus the design of the individual algorithms in such a way that the EC algorithm is optimized for exploration of problem space while the SQP algorithm is optimized for rapid exploitation of the high quality regions of the problem space. Then, by further tuning of the combined parameters of the two algorithms, while in collaboration, the requisite balance in exploration and exploitation for robust optimization has been greatly enhanced. This would not have been possible without: • The new convergence detection method (proposed in chapter 3, section 3.5) that detects convergence of the EC algorithm, and in due course, shifts control from the EC to the SQP algorithm adaptively, and • The incorporation of the novel validation routine (section 5.3) which essentially further substantiates the quality of the solution returned by the local algorithm. But above all, is the fact that the experimental results presented in this chapter have given us a glimpse of what to expect in the future when the proposed method is further refined. 5.6 Remarks This chapter has presented a broad review of various techniques of hybridizing evolutionary algorithms. Particularly, a multidisciplinary survey of their applications in the recent years was presented. At a glance, an investigation of some of the essential qualities of a good global optimization test problem was given. Some well known benchmark test problems were presented and used for the evaluation process. A novel hybridization approach that combines an evolutionary algorithm with a local search method was proposed and evaluated via series of numerical experiments. The performance of the proposed hybrid algorithm was compared to that of the standard evolutionary algorithm and another based on evolutionary strategy. The next chapter will recap, look into detailed plans for further work and finally conclude the report. Chapter 6 Discussion and Conclusions 6.1 Development of Ideas Robust optimization requires systems that can not only widely explore the problem space (such as global algorithms like EAs), but also effectively exploit the high quality regions. However, the struggle to establish optimum balance between exploration and exploitation of the problem search space with a single algorithmic framework remains rather far away from been realistic. Thus, the use of hybrid algorithms has gradually become a widely acceptable practice. Investigations revealed that [8] hybridization of EAs with local search methods popularly known as memetic algorithms often yield systems that are more robust than a mere combination of approximate algorithms. The proposal made in chapter 5 is an attempt to take a step further in this direction. It was noticed that the challenges in designing good and generic hybrid algorithms go much beyond the choice of the individual algorithms. And if given the required attention, improving the methodologies in which these algorithms individually operate and interact could certainly play a major role towards the overall success of the hybrid system. It thus became apparent that there is a great deal of open research in this direction. Any further investigation with the aim of; sorting out the key features of the individual optimization algorithms that could be enhanced or added (as treated in chapter 2); determining how best to improve the individual algorithms for the benefit of the hybrid system (which was the focus of chapters 3 and 4); and, designing an effective hybrid methodology (as investigated at in chapter 5) could lead to significant progress. 6.2 Discussion Several convergence detection methods are available in the literature most of which are based on some distance measures such as the Hamming distance. In a somewhat radical perspective, rather than directly monitoring the similarity among the solutions, the proposed convergence measure is designed to detect convergence by assessing the extent to which evolutionary forces continue to effect changes on the solution set. This novel heuristic for adaptive convergence 101 CHAPTER 6. DISCUSSION AND CONCLUSIONS 102 detection in evolutionary algorithm was developed in chapter 3. It was built based on the principle of Price’s theorem [99] in quantitative genetics. Our investigations reveal that convergence of evolution can effectively be measured via monitoring the effect of genetic operators (specifically, the crossover operator) on fitness progress in a population. Empirical results have shown that the value of the proposed convergence threshold parameter is more sensitive to the settings of the crossover and mutation rates but not population size. Based on the standard EA parameter settings that are empirically and theoretically proven by many researchers [46, 45, 48], our investigation suggests that the new convergence threshold parameter could be bounded in [0.001, 0.01] for crossover and mutation rates of Pc = 0.7 to 1.0 and Pm = 1/l or 0.01 respectively; given the empirical investigation we have undertaken. Further investigations could provide more definitive evidence regarding any possible correlation between other EA parameters and this newly proposed convergence threshold parameter. Turning to the local search method, gradient based local search algorithms are known for their suitability in deriving local optimal solution from virtually any given solution point. However, these algorithms rely on information about the slope of the problem under consideration to estimate their descent directions. Therefore, successful evaluations of search directions usually incur expensive derivative computations. Although 2nd order gradient based algorithms such as Newton methods are among the most efficient local search algorithms, they require evaluation of 2nd derivatives (i.e., Hessians). Various approximation procedures conventionally used to circumvent exact Hessian evaluations usually succeed in reducing computational cost only to the detriment of efficiency and solution quality. The proposed vector form of forward accumulation of derivatives (chapter 4) is an automatic differentiation method that facilitates evaluations of exact derivatives (including Hessians) of any differentiable function at reduced computational cost. Hence, the resulting local search algorithm (SQP) proposed in chapter 4 enjoys two major benefits: first, it remains a true second order method taking Newton search directions and having greater chances of taking full step sizes (i.e. step length α = 1). Second, it escapes the unavoidable restarts encountered when approximate Hessians are used for evaluation of the search directions. Thus, the proposed SQP algorithm remains a full 2nd order globally convergent Newton method that enjoys quadratic rate of convergence. Amongst others, the proposed way of hybridizing evolutionary computation (EC) algorithm with the sequential quadratic programming (SQP) local search method (chapter 5) would lessen the strong dependence of global search methods on a particular parameter setting for each problem category. In other words, the proposed method is designed such that it will operate optimally on wide range of problems without the need for further parameter fine tuning. The evaluation of the results show that compared to other state-of-the-art methods, the proposed system seems to be robust on medium to large scale multimodal, non-separable, non-symmetric, multidimensional problems having low to moderate levels of dispersion. Moreover, the method can yield high quality solutions for small scale problems, albeit the required computational effort could be considerably high. Therefore, a tradeoff is necessary between high solution quality and available computation. CHAPTER 6. DISCUSSION AND CONCLUSIONS 6.3 103 Conclusions This report has investigated the reasons for the recent wide acceptance of hybrid algorithms in the field of global optimization. Particularly, the use of evolutionary algorithms together with gradient based local search method has been thoroughly examined. Then, a hybrid system composing of an evolutionary algorithm and the sequential quadratic programming algorithm has been proposed. Prior to that an investigation on the parameterization aspect of the evolutionary algorithm was conducted and a new convergence threshold parameter was proposed for the EAs. Appropriate bound for the new convergence parameter was determined with regards to standard settings for other important EA parameters like crossover and mutation types and rates. Thereafter, a Newton based local search algorithm (SQP) was modified to use interior point method (IPM) instead of the conventional active set method (ASM)1 for solving its quadratic programming subproblems. Unlike in ASM approach where the search follows the boundary of the feasible region, IPM progresses by searching through the interior of the feasible region. Thus, IPM aids the proposed SQP algorithm to converge to the local optimal solution in remarkably few steps. Moreover, the SQP algorithm is designed to utilize exact Hessians obtained via vectorized forward mode of automatic differentiation to derive its search directions. These upgrades boost the effectiveness of the search directions and step sizes taken by the SQP local algorithm and ultimately improves its overall convergence characteristics. Returning to the hypotheses presented at the beginning of this study, based on the preliminary results obtained so far, it seems justifiable to infer that a skilful hybridization of evolutionary algorithms with a suitable local search method could yield a robust and efficient means of solving wide range of global optimization problems. 6.4 Research Contributions This study provides new understandings of the concepts and challenges behind global optimization approaches. Thus far, the following additions are made to the fast growing literature in the areas of local, global and hybrid optimization. 1. An Adaptive Elitist Strategy: The broad survey conducted on various aspects of evolutionary algorithms gives valuable insight into the key parameterization issues upon which development of successful global optimization methods relied. Most importantly, it leads to the development of new ideas that give birth to the proposed new replacement technique (adaptive elitism, see section 2.9). The adaptive elitist strategy will aid efficient exploitation of the promising areas of the search space without compromising exploration of other potentially viable regions. 2. A Convergence Detection via Monitoring Crossover: Using extended Price’s theorem [99], a critical convergence analysis of evolutionary algorithm that aids understanding 1 Active set methods are convex optimization techniques that solves quadratic programming subproblems by respectively categorizing the equality constraints in the feasible region as active and the inequality constraints as inactive sets. CHAPTER 6. DISCUSSION AND CONCLUSIONS 104 of the interactions among genetic operators in an evolutionary search was conducted. As a result, a visual means for investigating the individual roles of genetic operators on fitness progress was developed. It thus became possible to assess and utilize the effect of crossover operator on fitness progress as a means of automatic convergence detection in evolutionary algorithms (see section 3.5). 3. A Vectorized Forward Accumulation AD: The gradient based local search algorithms, particularly the standard sequential quadratic programming (SQP) algorithm were thoroughly analyzed. Then, the convergence characteristics of the SQP algorithm were upgraded to that of a 2nd order algorithm that searches by taking full Newton steps. The improvement was achieved via an automatic differentiation (AD) tool for evaluation of accurate derivatives. Built based on a vectorized forward accumulation method (section 4.7.4), the AD tool allows evaluation of the entire derivatives and Hessians in a single forward sweep. Consequently, accurate derivatives (to machine precision) for every differentiable function can be obtained at a computational cost comparable to that of evaluating the function itself. 4. A Validation Strategy: As a first attempt, we combine the global and local algorithms in a collaborative manner and the design seems to greatly enhance the balance in exploration and exploitation of search space which is a necessary ingredient for robust optimization. Nonetheless, the novel validation routine, amongst others (see section 5.3), has also contributed to the performance improvement achieved by the hybrid system. 6.5 Further work The results of the investigations undertaken have so far supported the core objective of this work. They have, in essence, opened several avenues for further investigation. Therefore, the other key objectives of this work can in no way be met without broadening the research in the following areas: 1. Sensitivity Analysis: Further sensitivity analysis on the newly proposed automatic convergence detection parameter is necessary to determine all sorts of parameter settings where its application will be suitable in addition to the standard EA parameter settings (i.e. population size, crossover and mutation) explored so far. We will need to investigate if there is any correlation between the measure of the effect of the crossover operator, the population’s fitness progress and the similarity among the candidate solutions. 2. Hamming distance δ: Hamming distance between individual solutions should be estimated and the plots for the delta (δ) changes in the Hamming distance can be compared side-by-side to the Price’s plots so as to validate the current findings. Use of cross correlation measurements could aid verify the hypothesis that fitness progress, delta changes in Hamming distance and the proposed measure of crossover’s effect on the fitness all enable evaluation of convergence in evolution. The cross correlation measurements/graphs may yield useful insights as to the degree to which these measures are correlated to convergence. CHAPTER 6. DISCUSSION AND CONCLUSIONS 105 3. Other Seeding Potentials: Pertaining to the newly introduced validation routine, which is invoked at the end of every run of the local algorithm, the reported improvement is as a result of using single copies of the best solution and its inverted version to seed the creation of a new population which will mainly consist of random individuals. Further empirical experimentation might reveal whether or not changing the proportion of the seed (i.e. using several copies of the best solution and its mutated versions) will have any positive impact on the overall gain derived from the validation procedure. 4. Extension to Algorithmic Portfolio: It would be interesting to assess the possibility of extending the proposed hybridization system to mimic the design of portfolios of algorithms [133]. Thus, instead of forcing a halt at the end of every validation routine, the system might be left to decide whether to embark on a fresh run of the global and local algorithms. Although from the design of the proposed hybrid system the schedule for the portfolios can be self-adapted, the implications of utilizing best so far solutions as seeds and the appropriate proportion of the seeds is subject to further investigations. 5. Representation Sensitivity Considerations: The EC algorithm employed in this investigation utilizes binary representation of candidate solutions. Considering the implications of the role of representation on the overall performance of any evolutionary algorithm [14], a more equitable performance evaluation with other global optimization methods that are based on real valued representation may require restructuring the proposed method to use real-valued representation. This will aid further comparison with other well known hybrid metaheuristics. 6. Accounting for Constraints and Dynamism: Further research needs to be done to enhance the proposed system to handle global optimization problems having not only parameter bounds, but also constraints. This is crucial to facilitate further investigations on its applicability to practical optimization problems that may not only be stochastic but also dynamic in nature (i.e., in dynamic optimization). 7. Mapping to Feedback Control Systems: In the long run and if time permits, the proposed hybrid system could be utilized in online and offline parameter optimization of feedback control systems (such as in parameter tuning of the proportional-integralderivative (PID) controllers) which are widely used in industries. 8. Mapping to ANN Problem Domain: Additionally, we could map the proposed hybrid optimization technique to evolving-then-training ANNs. The EC algorithm could conduct initial search of the weights state-space and then switch to the local algorithm which would then do the final tuning of the weights. The system could then be used for multi-mode learning in ANN. References [1] W. Sun and Y.-X. Yuan, Optimization Theory and Methods: Nonlinear Programming. Springer Optimization and its Applications, New York: Springer Science+Business Media, 2006. [2] C. Blum, M. Aguilera, A. Roli, and M. Sampels, Hybrid Metaheuristics: An Introduction, vol. 114 of Studies in Computational Intelligence, pp. 1–30. Springer Berlin / Heidelberg, 2008. [3] M. Pelikan, “Nk landscapes, problem difficulty, and hybrid evolutionary algorithms,” 2010. [4] D. H. Wolpert and W. G. Macready, “No free lunch theorems for optimization,” Evolutionary Computation, IEEE Transactions on, vol. 1, no. 1, pp. 67–82, 1997. [5] G. Raidl and C. Blum, “A unified view on hybrid metaheuristics,” in Hybrid Metaheuristics, 2006. [6] C. Blum, J. Puchinger, G. R. Raidl, and A. Roli, “A brief survey on hybrid metaheuristics,” in 4th International Conference on Bioinspired Optimization Methods and their Applications (B. Filipic and J. Silc, eds.), pp. 3–16. [7] T. Fogarty, N. Radcliffe, and P. Surry, Formal memetic algorithms, vol. 865 of Lecture Notes in Computer Science, pp. 1–16. Springer Berlin / Heidelberg, 1994. [8] G. R. Raidl, “On the hybridization of evolutionary algorithms,” in EvoHybridNPWorkshop at GECCO, 2003. [9] C. R. Reeves and J. E. Rowe, Genetic Algorithms: Principles and Perspectives, A Guide to GA Theory. New York: Kluwer Academic Publishers, 2004. [10] L. Ximing, A. B. Hassan, and L. Shanchun, “Sequential quadratic programming based on ipm for constrained nonlinear programming,” in Eighth International Conference on Intelligent Systems Design and Applications, ISDA 2008, vol. 1, pp. 266–271, IEEE Computer Society. [11] J. Nocedal and S. Wright, Numerical optimization. Springer Series in Operation Research and Financial Engineering, USA: Springer, 2 ed., 2006. [12] D. B. Fogel, “Evolutionary computation: A new transactions,” Evolutionary Computation, IEEE Transactions on, vol. 1, no. 1, pp. 1–2, 1997. [13] J. Huxley, “The evolutionary process,” Evolution as a Process, pp. 9–33, 1963. [14] W. Atmar, “Notes on the simulation of evolution,” IEEE Transactions on Neural Networks, vol. 5, no. 1, pp. 130–147, 1994. 106 REFERENCES 107 [15] G. R. Raidl, “Evolutionary computation: An overview and recent trends,” OGAI Journal, vol. 24, pp. 2–7, 2005. [16] J. H. Holland, Adaptation in Natural and Artificial Systems. Michigan: The University of Michigan Press, 1975. [17] L. J. Fogel, Biotechnology: Concepts and Applications. Englewood Cliffs, NJ: Prentice Hall, 1963. [18] L. J. Fogel, A. J. Owens, and M. J. Walsh, Artificial Intelligence through Simulated Evolution. John Wiley, 1966. [19] M. Gen and R. Cheng, Genetic Algorithms and Engineering Design. Wiley Series in Engineering Design and Automation, New York: John Wiley & Sons, INC, 1997. [20] D. Fogel, Evolutionary Computation: The Fossil Record. Wiley-IEEE Press, 1998. [21] J. Wan-Rong and J. Yung-Jen Hsu, “Dynamic vehicle routing using hybrid genetic algorithms,” in 1999 IEEE International Conference on Robotics and Automation, 1999. Proceedings, vol. 1, pp. 453–458 vol.1. [22] L. Man and L. T. Yang, “Hybrid genetic algorithms for scheduling partially ordered tasks in a multi-processor environment,” in Sixth International Conference on Real-Time Computing Systems and Applications, 1999. RTCSA ’99, pp. 382–387. [23] L. M. O. Queiroz and C. Lyra, “Adaptive hybrid genetic algorithm for technical loss reduction in distribution networks under variable demands,” Power Systems, IEEE Transactions on, vol. 24, no. 1, pp. 445–453, 2009. [24] J. B. Grimbleby, “Hybrid genetic algorithms for analogue network synthesis,” in Proceedings of the 1999 Congress on Evolutionary Computation, 1999. CEC 99, vol. 3, p. 1787 Vol. 3. [25] M. Bavafa, H. Monsef, and N. Navidi, “A new hybrid approach for unit commitment using lagrangian relaxation combined with evolutionary and quadratic programming,” in Power and Energy Engineering Conference, 2009. APPEEC 2009. Asia-Pacific, pp. 1–6. [26] J. Xingbo, L. Xiaoqing, L. Chengcheng, and L. Monan, “A hybrid algorithm for solving the optimal layout problem of rectangular pieces,” in The 9th International Conference for Young Computer Scientists, 2008. ICYCS 2008, pp. 936–941. [27] G. Pengfei, W. Xuezhi, and H. Yingshi, “The enhanced genetic algorithms for the optimization design,” in 3rd International Conference on Biomedical Engineering and Informatics (BMEI), 2010, vol. 7, pp. 2990–2994, 2010. [28] D. E. Goldberg and J. H. Holland, “Genetic algorithms and machine learning,” Machine Learning, vol. 3, no. 2, pp. 95–99, 1988. [29] D. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Longman Publishing Co., Inc., 1989. [30] R. C. Lewontin, The genetic basis of evolutionary change. New York: Columbia University Press, 1974. [31] O. Boyabaltli and I. Sabuncuoglu, “Parameter selection in genetic algorithms,” Systemics, Cybernatics and Informatics, vol. 2, no. 4, 2007. [32] R. Salomon, “Re-evaluating genetic algorithm performance under coordinate rotation of benchmark functions. a survey of some theoretical and practical aspects of genetic algorithms,” BioSystems, vol. 39, no. 3, pp. 263–278, 1996. REFERENCES 108 [33] L. D. Chambers, Practical Handbook of Genetic Algorithms: New Frontiers, vol. II. Florida: CRC Press, Inc, 1995. [34] D. Greenhalgh and S. Marshall, “Convergence criteria for genetic algorithms,” SIAM J. Comput., vol. 30, no. 1, pp. 269–282, 2000. [35] L. Davis, “Adapting operator probabilities in genetic algorithms,” 1989. [36] J. Rees and G. J. Koehler, “An investigation of ga performance results for different cardinality alphabets,” In Evolutionary Algorithms: IMA Volumes in Mathematics and its Applications, pp. 191–206, 1999. [37] S. McKee and M. B. Reed, “An algorithm for the alignment of gas turbine components in aircraft,” I.M.A. Journal of Mathematics in Management, vol. 1, pp. 133–144, 1987. [38] C. R. Reeves, “A genetic algorithm for flowshop sequencing,” Computers & Operations Research, vol. 22, no. 1, pp. 5–13, 1995. [39] J. Z. Zhu, “Optimal reconfiguration of electrical distribution network using the refined genetic algorithm,” Electric Power Systems Research, vol. 62, no. 1, pp. 37–42, 2002. [40] S. Sivanagaraju, Y. Srikanth, and E. J. Babu, “An efficient genetic algorithm for loss minimum distribution system reconfiguration,” Electric Power Components and Systems, vol. 34, no. 3, pp. 249–258, 2006. [41] J. Mendoza, R. López, D. Morales, E. López, P. Dessante, and R. Moraga, “Minimal loss reconfiguration using genetic algorithms with restricted population and addressed operators: real application,” Power Systems, IEEE Transactions on, vol. 21, no. 2, pp. 948–954, 2006. [42] F. Rothlauf, D. E. Goldberg, and A. Heinzl, “Network random keys: a tree representation scheme for genetic and evolutionary algorithms,” Evol. Comput., vol. 10, no. 1, pp. 75–97, 2002. [43] T. Bäck, U. Hammel, and H. P. Schwefel, “Evolutionary computation: comments on the history and current state,” Evolutionary Computation, IEEE Transactions on, vol. 1, no. 1, pp. 3–17, 1997. [44] O. Il-Seok, L. Jin-Seon, and M. Byung-Ro, “Hybrid genetic algorithms for feature selection,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 26, no. 11, pp. 1424–1437, 2004. [45] D. E. Goldberg, “Genetic algorithms, noise, and the sizing of populations,” Complex Systems, vol. 6, pp. 333–362, 1989. [46] K. De Jong, An analysis of the behavior of a class of genetic adaptive systems. PhD thesis, 1975. [47] J. E. Rowe, The dynamical systems model of the simple genetic algorithm, pp. 31–57. Springer-Verlag, 2001. [48] D. E. Goldberg, Optimal initial population size for binary-coded genetic algorithms. Tuscaloosa, Ala.: Clearinghouse for Genetic Algorithms, Dept. of Engineering Mechanics, University of Alabama, 1985. [49] J. D. Schaffer, R. Caruana, L. J. Eshelman, and R. Das, “A study of control parameters affecting online performance of genetic algorithms for function optimization,” 1989. REFERENCES 109 [50] J. J. Grefenstette, “Optimization of control parameters for genetic algorithms,” Systems, Man and Cybernetics, IEEE Transactions on, vol. 16, no. 1, pp. 122–128, 1986. [51] C. R. Reeves, Modern Heuristic Techniques for Combinatorial Problems. Blackwell Scientific Publishing, Oxford, UK, 1993. [52] P. J. B. Hancock, “An empirical comparison of selection methods in evolutionary algorithms,” 1994. [53] D. Fogel, J. Zurada, G. Yen, and J. Wang, The Burden of Proof: Part II, vol. 5050 of Lecture Notes in Computer Science, pp. 201–231. Springer Berlin / Heidelberg, 2008. [54] D. E. Goldberg and K. Deb, “A comparative analysis of selection schemes used in genetic algorithms,” 1991. [55] J. E. Baker, “Reducing bias and inefficiency in the selection algorithm,” 1987. [56] Q. Hongze, Z. Wanli, and W. Hailong, “A genetic algorithm-based approach to flexible job-shop scheduling problem,” in Fifth International Conference on Natural Computation, 2009. ICNC ’09, vol. 4, pp. 81–85. [57] J. E. Baker, “Adaptive selection methods for genetic algorithms,” 1985. [58] G. Rudolph, “Takeover times and probabilities of non-generational selection rules,” 2000. [59] D. Thierens and D. E. Goldberg, “Convergence models of genetic algorithm selection schemes,” 1994. [60] D. Thierens, “Selection schemes, elitist recombination, and selection intensity,” 1998. [61] G. R. Harik and F. G. Lobo, “A parameter-less genetic algorithm,” IEEE Transactions on Evolutionary Computation, pp. 523–528, 1999. [62] S. J. Louis and G. J. E. Rawlins, “Predicting convergence time for genetic algorithms,” Foundations of Genetic Algorithms 2, 1993. [63] J. K. Bassett, M. A. Potter, and K. A. D. Jong, “Applying price’s equation to survival selection,” 2005. [64] X. Hongfeng and T. Guanzheng, “A novel simplex hybrid genetic algorithm,” in The 9th International Conference for Young Computer Scientists, 2008. ICYCS 2008, pp. 1801– 1806. [65] H. Shi, “An improved hybrid genetic algorithms using simulated annealing,” in Second International Symposium on Electronic Commerce and Security, 2009. ISECS ’09, vol. 1, pp. 462–465. [66] L. D. Merkle, G. B. Lamont, J. Gates, G. H., and R. Pachter, “Hybrid genetic algorithms for minimization of a polypeptide specific energy model,” in Proceedings of IEEE International Conference on Evolutionary Computation, 1996, pp. 396–400. [67] A. Vallejo, A. Zaballos, D. Vernet, D. Cutiller, and J. Dalmau, “Implementation of traffic engineering in ngns using hybrid genetic algorithms,” in 3rd International Conference on Systems and Networks Communications, ICSNC ’08, pp. 262–267, 2008. [68] M. Lozano, F. Herrera, and J. R. Cano, “Replacement strategies to preserve useful diversity in steady-state genetic algorithms,” Inf. Sci., vol. 178, no. 23, pp. 4421–4433, 2008. REFERENCES 110 [69] L. Davis, “Hybrid genetic algorithms for machine learning,” in Machine Learning, IEE Colloquium on, pp. 9/1–9/3. [70] T.-P. Hong, H.-S. Wang, W.-Y. Lin, and W.-Y. Lee, “Evolution of appropriate crossover and mutation operators in a genetic process,” Applied Intelligence, vol. 16, no. 1, pp. 7–17, 2002. [71] L. J. Eshelman, R. A. Caruana, and J. D. Schaffer, “Biases in the crossover landscape,” 1989. [72] Q. Wang, Y.-h. Sun, H. Zhao, and X. Li, “Fuzzy optimization of knowledge worker scheduling based-on hybrid genetic algorithms,” in Chinese Control and Decision Conference, 2008. CCDC 2008, pp. 2615–2620. [73] R. Jeurissen and J. van den Berg, “Optimized index tracking using a hybrid genetic algorithm,” in IEEE Congress on Evolutionary Computation, 2008. CEC 2008. (IEEE World Congress on Computational Intelligence), pp. 2327–2334. [74] L. Wen Tao, S. Xiao Wei, H. Yong Qiang, L. Shu Fang, and Z. Jiang, “A hybrid optimization algorithm and its application for conformal array pattern synthesis,” Antennas and Propagation, IEEE Transactions on, vol. 58, no. 10, pp. 3401–3406, 2010. [75] F. Herrera and M. Lozano, “Two-loop real-coded genetic algorithms with adaptive control of mutation step sizes,” Applied Intelligence, vol. 13, no. 3, pp. 187–204, 2000. [76] M. A. Potter, J. K. Bassett, and K. A. De Jong, “Visualizing evolvability with price’s equation,” in The 2003 Congress on Evolutionary Computation, 2003. CEC ’03, vol. 4, pp. 2785–2790 Vol.4. [77] D. Whitley, S. Rana, J. Dzubera, and K. E. Mathias, “Evaluating evolutionary algorithms,” Artificial Intelligence, vol. 85, no. 1-2 SPEC. ISS., pp. 245–276, 1996. [78] T. Bäck, “Optimal mutation rates in genetic search,” 1993. [79] J. K. Bassett, M. A. Potter, and K. A. De Jong, Looking Under the EA Hood with Prices Equation, vol. 3102 of Lecture Notes in Computer Science, pp. 914–922. Springer Berlin / Heidelberg, 2004. [80] W. Zhufang and C. Donghong, “A hybrid algorithm based on genetic algorithm and simulated annealing for solving portfolio problem,” in International Conference on Business Intelligence and Financial Engineering, 2009. BIFE ’09, pp. 106–109. [81] H. Chang-wook and P. Jung-il, “A study on hybrid genetic algorithms using random signal based learning employing simulated annealing,” in Proceedings of the 2001 American Control Conference, 2001., vol. 1, pp. 198–199 vol.1. [82] T.-P. Hong, H.-S. Wang, and W.-C. Chen, “Simultaneously applying multiple mutation operators in genetic algorithms,” Journal of Heuristics, vol. 6, no. 4, pp. 439–455, 2000. [83] L. D. Whitley, “The genitor algorithm and selection pressure: Why rank-based allocation of reproductive trials is best,” 1989. [84] D. Kaur and M. M. Murugappan, “Performance enhancement in solving traveling salesman problem using hybrid genetic algorithm,” in Fuzzy Information Processing Society, 2008. NAFIPS 2008. Annual Meeting of the North American, pp. 1–6. [85] T. Wen-hua, “Fuzzy neural network control of truck backer-upper using hybrid genetic algorithms,” in International Conference on Information Acquisition, 2004. Proceedings, pp. 9–12. REFERENCES 111 [86] M. Zhao, W. Tan, X. Li, and L. Kang, “Research on multi-project scheduling problem based on hybrid genetic algorithm,” in International Conference on Computer Science and Software Engineering, 2008, vol. 1, pp. 390–394. [87] X. Wu, Y. Song, X. Xiang, and L. He, “Research on negotiation support systems based on hybrid genetic algorithms,” in WRI World Congress on Software Engineering, 2009. WCSE ’09, vol. 2, pp. 429–433. [88] H. Huo, X. Xu, J. Xu, and Z. Bao, “Solving vertex covering problems using hybrid genetic algorithms,” in 5th International Conference on Signal Processing Proceedings, 2000. WCCC-ICSP 2000, vol. 3, pp. 1663–1666 vol.3. [89] Y. Nagata, “The lens design using the cma-es algorithm,” 2004. [90] T. C. Fogarty, “Varying the probability of mutation in the genetic algorithm,” 1989. [91] J. Niehaus and W. Banzhaf, “Adaption of operator probabilities in genetic programming,” 2001. [92] W. M. Spears, “Adapting crossover in evolutionary algorithms,” Proc of the Fourth Annual Conference on Evolutionary Programming, 1995. [93] R. Sharapov and A. Lapshin, “Convergence of genetic algorithms,” Pattern Recognition and Image Analysis, vol. 16, no. 3, pp. 392–397, 2006. [94] A. Miura and M. Tanaka, “A study of array pattern tuning method using hybrid genetic algorithms for figure-8 satellite’s earth station antenna,” in Microwave Conference, 2000 Asia-Pacific, pp. 325–329. [95] A. Isaacs, T. Ray, and W. Smith, “A hybrid evolutionary algorithm with simplex local search,” in IEEE Congress on Evolutionary Computation, pp. 1701–1708, 2007. [96] D. Dawei, Z. Junli, X. Wei, Y. Zheng, and Z. Yan, “Elevator group-control policy with destination registration based on hybrid genetic algorithms,” in 2010 International Conference on Computer Application and System Modeling (ICCASM), vol. 12, pp. V12–535– V12–538. [97] A. G. Hernandez-Diaz, C. A. Coello Coello, F. Perez, R. Caballero, J. Molina, and L. V. Santana-Quintero, “Seeding the initial population of a multi-objective evolutionary algorithm using gradient-based information,” in IEEE Congress on Evolutionary Computation, pp. 1617–1624, 2008. [98] G. R. Price, “Extension of covariance selection mathematics,” Annals of Human Genetics, vol. 35, no. 4, pp. 485–490, 1972. [99] S. Frank, “The price equation, fisher’s fundamental theorem, kin selection, and causal analysis,” Evolution, vol. 51, no. 6, pp. 1712–1729, 1997. [100] A. Bhatti, Practical Optimization Methods: With Mathematica Applications. Rensselaer, New York: Springer-Verlag Inc, 2000. [101] M. J. D. Powell, “How bad are the bfgs and dfp methods when the objective function is quadratic?,” Mathematical Programming, vol. 34, no. 1, pp. 34–47, 1986. [102] M. Powell and D. Griffiths, Nonconvex minimization calculations and the conjugate gradient method Numerical Analysis, vol. 1066 of Lecture Notes in Mathematics, pp. 122–141. Springer Berlin / Heidelberg, 1984. REFERENCES 112 [103] M. J. D. Powell, “Restart procedures for the conjugate gradient method,” Mathematical Programming, vol. 12, no. 1, pp. 241–254, 1977. [104] E. W. Weisstein, “Merit function,” 2011. [105] M. AL-BAALI, “Descent property and global convergence of the fletcher-reeves method with inexact line search,” IMA Journal of Numerical Analysis, vol. 5, no. 1, pp. 121–124, 1985. [106] H. A. Bashir and X. Liang, “Interior point method based sequential quadratic programming algorithm with quadratic search for nonlinear optimization,” IJCISIM, vol. 3, pp. 51–60, 2011. [107] R. Fletcher, Practical Methods of Optimization. New York, NY, USA: John Wiley & Sons, Inc., 2 ed., 1987. [108] D. d. Hertog, Interior point approach to linear, quadratic and convex programming: Algorithms and complexity, vol. 227 of Mathematics and its Applications. Dordrecht: Kluwer Academic Publishers, 1994. [109] J. Betts, Practical Methods for Optimal Control Using Nonlinear Programming. SIAM, 2001. [110] L. Ximing, H. A. Bashir, and L. Shanchun, “Applying infeasible interior point method to sqp for constrained nonlinear programming,” in International Conference on Computer Science and Software Engineering, 2008, vol. 1, pp. 399–402. [111] G. B. Dantzig, Maximization of a linear function of variables subject to linear inequalities. New York: Wiley, 1961. [112] G. Dantzig, Linear Programming and Extensions. Princeton University Press, 1963. [113] R. H. W. Hoppe, S. I. Petrova, and V. Schulz, “Primal-dual newton-type interior-point method for topology optimization,” Optimization Theory and Applications, vol. 114, no. 3, pp. 545–571, 2002. [114] S. Mizuno, M. Kojima, and M. J. Todd, “Infeasible-interior-point primal-dual potentialreduction algorithms for linear programming,” tech. rep., SIAM Journal on Optimization, 1995. [115] S. J. Wright, Primal-dual interior-point methods. SIAM, 1997. [116] Y. E. Nesterov and A. S. Nemirovski, Interior-Point Polynomial Algorithms in Convex Programming (Studies in Applied and Numerical Mathematics). Society for Industrial Mathematics, 1994. [117] G. Arfken and H. Weber, Mathematical Methods for Physicists, Sixth Edition: A Comprehensive Guide. Academic Press, 2005. [118] M. Bücker, G. Corliss, and P. Hovland, Automatic Differentiation - Applications, Theory and Implementations. New York: Springer, 2006. [119] A. Griewank and A. Walther, Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation. Philadelphia: SIAM - Society for Industrial and Applied Mathematics, 2nd ed ed., 2008. [120] B. Christianson, “Automatic hessian by reverse accumulation,” IMA Journal of Numerical Analysis, vol. 12, no. 2, pp. 135–150, 1992. REFERENCES 113 [121] B. Christianson, “Reverse accumulation and accurate rounding error estimates for taylor series coefficient,” Optimization Methods and Software, vol. 1, no. 1, pp. 81 – 94, 1992. [122] B. Christianson, “Cheap newton steps for optimal control problems: automatic differentiation and pantoja’s algorithm,” Optimization Methods and Software, vol. 10, no. 5, pp. 729 – 743, 1999. [123] M. Bartholomew-Biggs, S. Brown, B. Christianson, and L. Dixon, “Automatic differentiation of algorithms,” Journal of Computational and Applied Mathematics, vol. 124, no. 1-2, pp. 171–190, 2000. [124] D. P. Ghate and M. B. Giles, “Efficient hessian calculation using automatic differentiation,” 25-28 June 2007 2007. [125] C. H. Bischof, H. M. Bücker, B. Lang, A. Rasch, and A. Vehreschild, “Combining source transformation and operator overloading techniques to compute derivatives for matlab programs,” 2002. [126] S. A. Forth, “An efficient overloaded implementation of forward mode automatic differentiation in matlab,” ACM Trans. Math. Softw., vol. 32, no. 2, pp. 195–222, 2006. [127] C. Bischof, P. Hovland, and B. Norris, “On the implementation of automatic differentiation tools,” Higher-Order and Symbolic Computation, vol. 21, no. 3, pp. 311–331, 2008. [128] U. Naumann, “Optimal jacobian accumulation is np-complete,” Math. Program., vol. 112, no. 2, pp. 427–441, 2007. [129] H. Berland, “Automatic differentiation,” 2006. [130] L. B. Rall, “The arithmetic of differentiation,” Mathematics Magazine, vol. 59, no. 5, pp. 275–282, 1986. [131] L. Rall, Automatic Differentiation: Techniques and Applications. Springer, 1981. [132] C. Blum, J. Puchinger, G. R. Raidl, and A. Roli, “Hybrid metaheuristics in combinatorial optimization: A survey,” Applied Soft Computing, vol. 11, no. 6, pp. 4135–4151, 2011. [133] C. Gomes and B. Selman, “Algorithm portfolio design: Theory vs. practice,” in Proceedings of the 13th Conference on Uncertainty in Artificial Intelligence, pp. 190–197, 1997. [134] S. Matthew and F. S. Stephen, “New techniques for algorithm portfolio design,” in Proceedings of the 24th Conference in Uncertainty in Artificial Intelligence, UAI 2008 (D. A. McAllester and P. Myllymäki, eds.), pp. 519–527, AUAI Press. [135] H. Wang and J. Zeng, “The hybrid genetic algorithm for solving nonlinear programming,” in IEEE International Conference on Intelligent Processing Systems, 1997. ICIPS ’97, vol. 1, pp. 589–591 vol.1. [136] Y. Tenne and S. W. Armfield, “Efficiently minimizing expensive cost functions with a hybrid evolutionary algorithm using clustering and a derivative-free optimizer: preliminary results,” in The 2005 IEEE Congress on Evolutionary Computation, 2005, vol. 3, pp. 1937–1944 Vol. 3. [137] M. Lunacek and D. Whitley, “The dispersion metric and the cma evolution strategy,” 2006. [138] N. Hansen and S. Kern, Evaluating the CMA Evolution Strategy on Multimodal Test Functions, vol. 3242 of Lecture Notes in Computer Science, pp. 282–291. Springer Berlin / Heidelberg, 2004.
9cs.NE
Towards Automatic Learning of Heuristics for Mechanical Transformations of Procedural Code Guillermo Vigueras Salvador Tamarit Manuel Carro Universidad Politécnica de Madrid Campus de Montegancedo 28660 Boadilla del Monte, Madrid, Spain {salvador.tamarit,julio.marino}@upm.es arXiv:1603.03022v2 [cs.PL] 10 Mar 2016 IMDEA Software Institute Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, Spain {guillermo.vigueras,manuel.carro}@imdea.org Abstract the value increased up to 1.3%. However, the predicted value for 2010 based on the trends in the time period 2000-2005 would have been 2.2% instead of 1.3%, as reported. The study explained that the reduction was mainly a consequence of an increase in the use of energy-efficient computational platforms, showing the economical impact of using greener architectures. However, the integration of different specialized devices increases the degree of heterogeneity of the system. This high degree of heterogeneity makes programmability of such systems only possible for a few experts, and almost prohibits portability of the application onto different resource infrastructures. Classical programming models are all designed for (a) Turing-inspired sequential execution and (b) von Neumann-like memory architecture, whereas a compiler typically optimizes code only for one (homogeneous) destination infrastructure at a time. Heterogeneous destinations typically require all programming tasks for hybrid architectures to be manually done by the developer. In fact, no common current programming model manages to ease the programmability of heterogenous platforms and the portability of applications to this type of platforms while keeping good performance. It is crucial to note in this context, that programming models are only likely to be taken up by the programming communities if they (a) are coherent with classical approaches, (b) are easy and intuitive and (c) show clear performance / usability improvements. Accordingly, development of new programming models that hide low-level details and ease the programmability of the range of architectures available in heterogenous systems is slow, even if some programming models have already been proposed in the past for each individual architecture (e.g. OpenCL (Stone et al. 2010)). Opening the access of heterogeneous platforms to a wider spectrum of users is an important issue to be tackled. In past decades, different scientific areas have shown an enormous advance and development thanks to the use of massive parallel architectures to implement in-silico models. The use of “virtual labs” through computational platforms has allowed to better understand the physical phenomena under study, investigate a much wider range of solutions and drastically reduce the cost with respect to performing real experiments. Since the exascale computing era is pushed and driven by the computational requirements of scientific and industrial applications, new programming models, tools and compilers need to be released in order to open the access of exascale systems to a wider programming community and allow researchers from different communities to apply their findings to the society and improve human welfare. In order to ease the programmability of heterogeneous platforms, we propose in this paper a machine learning -based approach to learn heuristics to guide the code transformation process of a rule-based program transformation system (Tamarit et al. 2015). The current trend in next-generation exascale systems goes towards integrating a wide range of specialized (co-)processors into traditional supercomputers. However, the integration of different specialized devices increases the degree of heterogeneity and the complexity in programming such type of systems. Due to the efficiency of heterogeneous systems in terms of Watt and FLOPS per surface unit, opening the access of heterogeneous platforms to a wider range of users is an important problem to be tackled. In order to bridge the gap between heterogeneous systems and programmers, in this paper we propose a machine learning -based approach to learn heuristics for defining transformation strategies of a program transformation system. Our approach proposes a novel combination of reinforcement learning and Classification methods to efficiently tackle the problems inherent to this type of systems. Preliminary results demonstrate the suitability of the approach for easing the programmability of heterogeneous systems. Categories and Subject Descriptors I.2.6 [Artificial Intelligence]: Learning; C.1.4 [Processor Architectures]: Parallel Architectures General Terms Learning, Parallelism, Optimization Keywords Program Transformation, Machine Learning, Heterogeneous Systems 1. Introduction The introduction of multi-core processors marked the end to an era dominated by a constant increase of clock-rate, following Moore’s law. Today, even the strategy to increase performance through higher core-counts is facing physical obstacles and, more importantly, power consumption issues which are currently one of the main limitations for the transition from petascale systems to next-generation exascale systems. Hence, the metric for measuring performance improvement of computational platforms is no longer absolute FLOPS numbers but rather FLOPS per Watt and FLOPS per surface unit of hardware. Thus, rather than having CPU-based supercomputers a growing trend goes towards integrating a wide range of specialized (co)processors into traditional supercomputers. These specialized architectures can outperform general purpose ones while requiring lower energy consumption values and also less hardware real state. A study of energy consumption in data centers (Koomey 2008), has revealed the impact that efficient computer platforms can have in the worldwide energy consumption. This study analyzed historical energy consumption data for the time period 2000-2005 and 2005-2010. The study results revealed that in 2005 data centers used 0.97% of the worlds total electricity consumption and in 2010 PROHA’16, March 12, 2016, Barcelona, Spain Julio Mariño 1 2018/3/28 3. This type of systems pose different problems like the search-space exploration problem arising from the application of transformation rules in arbitrary orders or the definition of a stop criteria for the transformation system. For the latter we propose the use of classification trees and for the former we propose a novel approach based on reinforcement learning . We have performed a preliminary evaluation of the approach obtaining promising results that demonstrate the suitability of the approach for this type of transformation systems. The rest of the paper is organized as follows. Section 2 reviews previous work in the field of program transformation systems in general and previous approaches using machine learning techniques. Section 3 describes the toolchain where our machine learning -based approach is integrated. Section 4 describes the abstraction of code defined in order to apply machine learning methods. Section 5 describes the methods used to learn program transformation strategies. Later, Section 6 presents some preliminary results and finally Section 7 summarizes the conclusions and proposes future work. 2. In this work we propose the automatic learning of transformation strategies for a rule-based transformation toolchain (Tamarit et al. 2015, 2016). This type of systems offer a higher flexibility over compilation infrastructures where the code transformations and optimizations are embedded in the compilation engine (Stallman and GCC Developer Community 2009). Rule-based systems support the formulation of basic code transformation steps as generic rules and arrange their automatic application. This scheme offers the flexibility of splitting complex code transformations in small steps, admitting efficient implementations that scale to large programs. By adding more rules, the transformation system can also increase its capabilities in a scalable way. Rule-based systems also allow to decouple the definition of transformation steps (i.e. rules) from the strategies followed to apply the rules. This decoupling provides more flexibility to try different transformation strategies and select the best one according to the purpose of the system (Bagge et al. 2003; Schupp et al. 2002). The rule-based transformation toolchain mentioned before (Tamarit et al. 2015, 2016) defines a transformation process consisting of two main stages, as shown in Figure 1. The first one is a transformation phase in which the input C code is transformed into semantically equivalent c Code but which is better suited for a given platform. It basically reshapes the input code taking into account syntactic/semantic restrictions of the compilers/programming models of each target platform (e.g. if the target compiler does not accept general if statements, the input code will be transformed to remove them if possible, without modifying the program semantics). In the first stage, transformation rules are formalized in an internal domain-specific language that takes care of the syntactic and semantic conditions required to apply a given transformation. Transformation rules operate at abstract syntax tree (AST) level transforming an input code that matches a pattern into another code, if rule conditions are met. In this way, this first phase defines a search space exploration problem where the different nodes of the search space would be the different states of the input code obtained as a result of applying code transformations and the transitions among the search space nodes would be the transformation rules applied. Thus, the high number of rules in the transformation system results in a combinatorial explosion of the code states to explore. State of the Art Rule-based program transformation systems support the formulation of basic code transformation steps as generic rules and arrange their automatic application. This scheme offers the flexibility of splitting complex code transformations in small steps, admitting efficient implementations that scale to large programs. By adding more rules, the transformation system can also increase its capabilities in a scalable way. Rule-based systems also allow to decouple the definition of transformation steps (i.e. rule applications) from the strategies followed to apply the rules. This decoupling provides more flexibility to try different transformation strategies and select the best one according to the purpose of the system (Bagge et al. 2003; Schupp et al. 2002). Rule-based transformation has been used before to generate code for different computational platforms. The transformation of C-like programs an its compilation into synchronous architectures, like FPGAs, and asynchronous platforms, like multi-core CPUs, have been addressed before (Brown et al. 2005). However, the input language of the approach (HandelC) is meant to specify synchronous systems, thus limiting its applicability to this type of systems. A completely different approach is to use linear algebra to transform the mathematical specification of concrete scientific algorithms (Franchetti et al. 2006; FabregatTraver and Bientinesi 2013; Di Napoli et al. 2014). Here, the starting point is a mathematical formula and, once the formula is transformed, code is generated for the resulting expression. However, a reasonable acceleration over hand-tuned code happens only for those algorithms, and applying the ideas to other contexts does not seem straightforward. Machine learning techniques have been already used in the field of compilation and program transformation (Mariani et al. 2014; Pekhimenko and Brown 2010; Agakov et al. 2006). All these approaches share the same principles as they obtain an abstract representation of the input programs in order to apply machine learning methods. Nevertheless, previous approaches target some specific architecture limiting the applicability of the approach and making it not suitable for heterogeneous platforms. In our approach, we obtain program abstractions but in order to enable the machine learning -based transformation and compilation of a program written in C for heterogeneous systems. Additionally, none of the previous works have explored the use of reinforcement learning methods (Kaelbling et al. 1996) in the field of program transformation and compilation. PROHA’16, March 12, 2016, Barcelona, Spain Program Transformation Toolchain for Heterogeneous systems Ready code Translated code GPGPU (OpenCL) Initial code OpenMP MPI FPGA (MaxJ) Transformation Structure, S2S, properties Translation Glue code, calls to libraries Figure 1. Stages of the transformation tool The second phase of the toolchain in Figure 1 consists of a translation process which generates code for a given platform taking as 2 2018/3/28 • Number of array writes shifted within for loops: This feature input the code generated in the first phase. Once platform-specific code is generated, it is compiled using a platform-specific compiler. This second phase poses another problem to be tackled: the definition of the starting condition for the translation phase, which is also the stop condition of the transformation process. Since depending on program complexity some platforms might require a long compilation process taking up to tens of hours, like for an FPGA, the toolchain should translate and compile only code that is likely to be successfully compiled on a given target platform rather than trying to compile every single code obtained during the transformation phase. Additionally, when considering the first and second phases together, the transformation sequences obtained in the first phase from the chaining of several rules, might not improve monotonically non-functional metrics associated to an input code (e.g. execution time, energy consumption, etc.), but still produce code with better performance in the second phase. Given the nature of the problems associated with the transformation toolchain, we propose the use of different machine learning techniques to effectively guide the transformation process. On one hand, we have used reinforcement learning methods to learn transformation strategies that take into account the non-monotonic behavior of the transformation sequences. On the other hand, we have used classification methods to learn appropriate states that can be translated for the target platforms. Also machine learning techniques require descriptions of the problem domain. For that reason, we compute an abstract representation of the input programs and the intermediate codes generated during the transformation process. counts the number of array accesses with positive offset for the following pattern: a for loop with writes accesses of multiple positions of the same array within the same loop iteration and some of the write accesses use a positive offset with respect to the loop iteration variable. The following two codes explain the meaning of this feature. For the code on the left, this feature would take a value of 1 since for each iteration there are multiple write accesses, one of them with positive offset (i.e. i+1). However, for the code on the right this feature takes a value 0 since for each iteration only position i+1 is written even if it is done with positive offset. The multiple writes within the same loop iteration is detected by this feature since a code with this pattern will fail to be compiled for a FPGA. for(i=1;i<N;i+=2) { v[i] = v[i-1]; v[i+1] = v[i-1]*i; } for(i=0;i<N-1;i++) { aux = i*i; v[i+1] = aux; } • Irregular loops: This feature takes a binary value and informs whether loops contain (1) or not (0) statements like break or continue that alter the normal flow a program. • Global variables: This feature takes a binary value and states if any global variable is written within the piece of code analysed (1) or not (0). • If statements: This feature counts the number of if statements within the piece of code analysed. 4. Code-Abstraction Mapping • Static limits of for loop: This feature informs if all the for loops in the piece of code analysed do not have static iteration limits, i.e. if they do not change along the iteration space of the loop. The following code shows an example where the upper iteration limit of the inner loop is not static since it might change for each iteration of the outer loop if elements of array v are removed by function clean. As mentioned in previous section, machine learning methods operate on descriptions of the problem domain. In our case, we need to obtain abstractions of procedural code written in C. These abstractions should reflect the code changes performed by the transformation rules which operate at the AST level. At the same time, mapping of code to abstractions must be univocal in order to avoid conflicts and ensure a correct behavior of machine learning methods. For that reason, we represent abstractions as quantitative descriptions that capture changes performed by rules on code. These quantitative descriptions involve features like: AST patterns, control flow, data layout, data dependencies, etc. To obtain these abstractions we have developed a static code analysis (SCA) tool that parses the AST to extract the features mentioned before. The SCA tool has been implemented in Python using the pycparser1 module and can obtain feature information either by directly analysing the code or by parsing code annotations provided by the user or by third-party analysers. The set of code annotations considered in the abstractions coincides with the annotations supported by the transformation toolchain mentioned before (Tamarit et al. 2015). Currently, code abstractions consist of a vector formed out of fifteen features. Some of them capture changes in code performed by transformation rules and also reflect code patterns that match the syntactic/semantic restrictions of target compiler/programming models: for(j=0;j<N;j++) { for(i=0;i<size(v);i++) update(v[i]); clean(v); } • Iteration independent loop: This feature counts the number of for loops in the code analysed without carried dependencies across iterations. This information is obtained from annotations provided by the user or by third-party code analysers. • Any for loop with loop schedule: This feature detects if there is some pattern composed of two nested loops used to iterate over an array split in chunks. This code pattern is detected through an annotation that can be inserted either by the user or by the transformation tool after applying a loop scheduling transformation. The following code shows an example of loop schedule where array v is accessed in chunks of size N: • Maximum nested loop depth: This feature measures the depth #pragma stml loop_schedule for(j=0;j<M;j++) { w[j] = 0; for(i=0;i<N;i++) w[j] += v[j*N+i]; } of nested for loops. A value of 0 for this feature means no nested loops are present, a value of 1 means two nested loops, a value of 2 means three nested loops and so on. • Number of function calls: This feature counts the number of function calls present in the analysed code. 1 https://github.com/eliben/pycparser PROHA’16, March 12, 2016, Barcelona, Spain 3 2018/3/28 • Number of loop invariant var: This feature quantifies the start evaluating the adequacy of classification trees for our problem since it intuitively and implicitly performs feature selection without hard data preparation requirements. A classification tree is a simple representation for classifying examples according to a set of input features. All of the input features have finite discrete domains, and there is a single target variable called the classification feature. Each element of the domain of the target variable is called a class. In a classification tree each internal (non-leaf) node is labeled with an input feature. Each leaf of the tree is labeled with a class or a probability distribution over the classes. Thus, a tree can be learned by splitting the source data set into subsets based on values of input features. This process is repeated on each derived subset in a recursive manner called recursive partitioning. The recursion is completed when the subset at a node has the same value of the target variable, or when splitting no longer improves the predictions. Typically, the source data comes in records of the form: number of variables that are assigned outside a for loop and are not modified within it. • Number of loop hoisted var modifications: This feature is used to count the number of variables that are assigned outside a for loop and are modified within the loop. • Number of non-1D array: This feature counts the number of arrays in the code with a number of dimensions higher than 1. • Number of auxiliary variables to access arrays: This feature counts the number of auxiliary variables used to index an array. If a variable used as array index is not within the set of iteration variables of the for loops that iterates over the array, then it is considered as an auxiliary index variable. The following code shows a simple example where the aux variable is used to index the array v instead of using the iteration variable j of the for loop: aux = 0; for(j=0;j<N;j++) { w[i] = v[aux]; aux++; } (x, Y ) = ([x1 , x2 , x3 , ..., xk ], Y ) The dependent variable, Y , is the target variable that the classification tree generalizes in order to be able to classify new observations. The vector x is composed of the input features xi , used for the classification. In this context, the source input data for our problem is composed of the vectors of the abstractions described in Section 4, i.e., k = 15 in our case. The domain of the target variable can take values among the four different final platforms we currently support: FPGA, GPU, Shared-Memory CPU (SM-CPU) and Distributed-Memory CPU (DM-CPU). Since a given code and its associated abstraction might be well suited for more than one platform, we obtain 15 possible classes for our target variable. This number is computed as the sum all the combinations of four elements taken m at a time, where 1 ≤ m ≤ 4. So the total number of classes N is computed as: • Total number of for loops: This feature counts the total num- ber of for loops independently of the nesting of loops. • Non-normalized for loops: This feature counts the number of non-normalized for loops. Currently, a for loop is considered as normalized if the step of the iteration is 1 and it is considered as non-normalized otherwise. The SCA tool in charge of obtaining the abstractions described above can be seen as a function mapping codes to abstractions, defined in the following way: A : Code → Abstraction Function A is used later in Section 5.2 for explaining the mapping of codes to reinforcement learning states. Currently code abstractions consist of the fifteen features described before since they were sufficient to obtain some preliminary results for the set of use case applications described in Section 6. However, we plan to increase the vector of features as we increase the set of use case applications. 5. N= m=1 Automatic Learning of Transformation Heuristics 5.2 n! m!(n − m)! Reinforcement Learning Reinforcement learning (Marsland 2009) is an area of machine learning concerned with how software agents ought to take actions in an environment so as to maximize some notion of cumulative reward. A reinforcement learning agent interacts with its environment in discrete time steps. At each time t, the agent receives an observation ot , which typically includes the reward rt . It then chooses an action at from the set of available actions, which is subsequently sent to the environment. The environment moves from current state st to a new state st+1 providing the reward rt+1 associated with the transition (st , at , st+1 ). The goal of a reinforcement learning agent is to collect as much reward as possible. According to the previous description, reinforcement learning seems well suited to represent the optimization process of a programmer or a compiler, since it typically consists of iteratively improving an initial program in discrete steps, where code changes correspond to actions and code versions obtained during the op- Classification Trees In machine learning and statistics, classification is the problem of identifying the category to which a new observation belongs among a set of pre-defined categories. The classification is done on the basis of a training set of data containing observations for which it is known to which category they belong (Marsland 2009). Different formalisms can be used to classify. We have decided to PROHA’16, March 12, 2016, Barcelona, Spain C4m = 15, where Cnm = The classes obtained for the target variable allow to define the final states of the transformation stage of the toolchain described in Section 3, which will also serve to define the final states for the reinforcement learning algorithm that is described in the following section. As a final remark, the classification-based learning described in this section have been implemented using the Python library Scikit-learn (Pedregosa et al. 2011). This library implements several machine learning algorithms and is widely adopted in the scientific community providing good support and ample documentation. As mentioned before, the transformation engine that guides the toolchain must tackle some problems associated with rule-based code transformation systems. On one hand, the search space with non-monotonic behavior must be efficiently explored and on the other hand an effective stop criteria for the search procedure must be defined. Our approach uses reinforcement learning to solve the former problem and classification trees to solve the latter. Following subsections describe the details of these machine learning techniques. An example to show how it works in practice is provided later. 5.1 4 X 4 2018/3/28 The final states in Equation 1 are defined based on the classification as described in Section 5.1. Two additional parameters appear in Equation 1: the learning rate α, 0 < α ≤ 1, and the discount factor γ, 0 < γ ≤ 1. The learning rate determines to what extent the newly acquired information will override the old information. A factor of 0 will make the agent not learn anything, while a factor of 1 would make the agent consider only the most recent information. The discount factor implements the concept of delayed reward by determining the importance of future rewards. A factor of 0 will make the agent opportunistic by considering only current rewards, while a factor close to 1 will make it strive for a long-term high reward. If the discount factor reaches or exceeds 1, the values in Q may diverge (Marsland 2009). In order to use the reinforcement learning state-action in our setting, we need to define some mappings. The abstraction of a concrete piece of code is provided by function A (Section 4). Abstractions and transformation rules must be mapped to states and actions, respectively, in order to index the state-action table. This mapping is done through functions SM and AM , defined as: } Actions a1 s0 q0,0 q0,1 s1 q1,0 q1,1 } States a0 sm an ··· ··· q0,n q1,n .. . .. . .. . .. . q0,m q1,m ··· ··· qm,n SM : Abstraction → State Figure 2. State-Action table Q. It will eventually be filled in with values qi,j ∈ R obtained from the learning process. AM : Rule → Action Based on the mapping of abstractions and rules defined, the reinforcement learning state-action table of Equation 1 can also be modeled as a function Q: timization process correspond to states. Moreover, code is typically evaluated after every change, often according to some nonfunctional properties such as execution time, memory consumption speedup factor, . . . The result of these evaluations can be easily translated into rewards and penalties that support the learning process. The result of the learning process of the agent is a state-action table (Figure 2) which will eventually contain values for each combination (s, a) of states and actions. These values are scores for the expected profit to be obtained from applying action a to state s. This table is initially filled in with a default value and is iteratively updated following a learning process which we briefly describe below. The process of reinforcement learning is based on a set of predetermined transformation sequences, which are assumed to be models to learn from. Each sequence S is composed of a set of states S = s0 , s1 , . . . , st−1 , st , st+1 , . . . , sl and the actions which transform one state into the next one. The final state of each transformation sequence has a different reward value related, in our case, with the performance of the final code corresponding to state sl in the sequence (better performance gives higher rewards). The reinforcement learning training phase consists of an iterative, stochastic process in which states (i.e. code abstractions) from the training set are randomly selected. For each state s a learning episode is started by selecting the action a with the highest value in Q for that s and moving to a new state s0 according to transition (s, a, s0 ). From state s0 the same transition process is repeated to advance in the learning episode until a final state is reached or a given number of episode steps is performed. When the episode terminates, the values in Q corresponding to the states and actions of the visited sequence are updated according to Equation 1, where Qinit (st , at ) is the initial value of Q for state st and action at . Note that st (resp. at ) is not the t-th state in some fixed ordering of states, but the t-th state in the temporal ordering of states in the sequence used to learn.  Q(st , at ) + α · (rt+1     + γ · Q(st+1 , at+1 ) − Q(st , at ) ) Q(st , at ) =     Qinit (st , at ) PROHA’16, March 12, 2016, Barcelona, Spain Q : State × Action → R Using functions A, SM , AM and Q, the strategy of the transformation toolchain for selecting rules at each transformation step can be modeled with a function RS: RS : Code → Rule This function takes as input a given code c and selects the transformation rule ru associated to action AM (ru), that maximizes the value provided by Q for the state SM (A(c)) associated to input code c. Thus, the rule selection strategy can be expressed as: RS(c) = arg max Q(SM (A(c)), AM (ru)) ru∈Rule The operator arg max may return, by definition, the empty set, a singleton, or a set containing multiple elements. However, in our problem parameters α and γ as well as the reward values rt+1 appearing in Equation 1 can be tuned to ensure that a single rule is returned, this avoiding a non-deterministic RS function. Section 6 gives further details on how we selected their values. The relationships among the code, its abstraction, the rules, and the contents of the state-action matrix are depicted in Figure 3. Table Q is used as follows: for a concrete code ck we find its abstraction Ci = A(ck ). Let us assume i = 0. From the row i corresponding to Ci in matrix Q we obtain the column j with the highest value qi,j (in our example, q0,1 , in blue and boldface). Column j corresponds to rule Rj , which is expected to give the most promising code when applied to a code state whose abstraction is Ci (in our case it would be R1 ). Rule Rj would be applied to ck to give c0 . If c0 corresponds to a final state, the procedure finishes. Otherwise we repeat the procedure taking c0 as input and finding again a rule to transform c0 . In order to implement the reinforcement learning -based module in charge of learning heuristics for program transformation we have used the Python library PyBrain (Schaul et al. 2010). This library adopts a modular structure separating in classes the different if st not f inal (1) otherwise 5 2018/3/28 c0 c1 c2 Actions = Rules Code abstraction } Concrete code r0 r1 s0 q0,0 q0,1 s1 q1,0 q1,1 A c3 c4 c5 C0 C1 SM SM .. . .. . c6 c7 c8 Cm SM sm rn ··· ··· q0,n q1,n .. . .. . .. . .. . q0,m q1,m ··· ··· qm,n } States ≈ Code Abstractions Figure 3. State-Action table for code, code abstraction, and rules. concepts present in reinforcement learning like the environment, the observations and rewards, the actions, etc. This modularity allowed us to extend the different classes and ease their adaptation to our problem. The PyBrain also provides flexibility to configure the different parameters of the reinforcement learning algorithm. Listing 2 shows the result of applying rule R0 to the code in Listing 1. It can be seen that the array input image is transformed into a one dimensional array and the vector of features associated to code changes accordingly. 5.3 // ABSTR: [3, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 2, 2, 4, 0] Listing 2. Transformation step 1 Simple Example This section uses a 2D convolution kernel as an example to show the resulting state-action table obtained after learning from a simple transformation sequence with five states and two transformation rules. The first rule (R0 ) considered in the example transforms a non-1D array into a 1D array. The second rule (R1 ) performs a collapse of two nested for loops producing a single loop. The initial, intermediate and final codes obtained from the application of these rules is described below. Listing 1 through Listing 5 highlights changes in code using this style for indicating the portion of the code that will be changed after rule application. Highlight code using this style indicates the resulting code after applying some transformation rule. Listing 1 shows the initial code and the associated vector of features, as a code comment , according to the description in Section 4. int dead_rows = K / 2; int dead_cols = K / 2; int normal_factor = K * K; for (r = 0; r < N - K + 1; r++) { for (c = 0; c < N - K + 1; c++) { sum = 0; for (i = 0; i < K; i++) { for (j = 0; j < K; j++) { sum += input_image[(r+i)*(N - K + 1) + (c+j)] * kernel[i][j]; } } output_image[r+dead_rows][c+dead_cols] = (sum / normal_factor); } } Listing 1. Initial Code // ABSTR: [3, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 3, 2, 4, 0] Listing 3 shows the result of applying again rule R0 to the code in Listing 2. It can be seen that now the array kernel is transformed into a one dimensional array and the vector of features associated to code changes accordingly. int dead_rows = K / 2; int dead_cols = K / 2; int normal_factor = K * K; for (r = 0; r < N - K + 1; r++) { for (c = 0; c < N - K + 1; c++) { sum = 0; for (i = 0; i < K; i++) { for (j = 0; j < K; j++) { sum += input_image[r+i][c+j] * kernel[i][j]; } } output_image[r+dead_rows][c+dead_cols] = (sum / normal_factor); } } PROHA’16, March 12, 2016, Barcelona, Spain Listing 3. Transformation step 2 // ABSTR: [3, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 2, 4, 0] int dead_rows = K / 2; int dead_cols = K / 2; int normal_factor = K * K; for (r = 0; r < N - K + 1; r++) { for (c = 0; c < N - K + 1; c++) { sum = 0; 6 2018/3/28 there are as many rows as states obtained from the evaluation of SM (A(Ci )) for each code Ci , where C0 is the initial code and C4 is the final code classified as ready code for FPGA. Table 1 shows the learned sequence composed of four steps: three consecutive applications of rule R0 and one application of rule R1 . The Q values of this sequence are highlighted in blue. It can be seen how Q values decreases from the state SM (A(C3 )), with the highest reward, down to the initial state SM (A(C0 )). This decay behavior in the sequence where Q values decrease as states get further from final states, is caused by the discount factor (γ) introduced in Equation 1. It should be noted that Q values for final states are not updated by the recursive expression in Equation 1. Thus, the final state SM (A(C4 )) keeps the initial value of 1. for (i = 0; i < K; i++) { for (j = 0; j < K; j++) { sum += input_image[(r+i)*(N - K + 1) + (c+j)] * kernel[i*K+j]; } } output_image[r+dead rows][c+dead cols] = (sum / normal_factor); } } Listing 4 shows the result of applying rule R0 to the code in Listing 3. It can be seen that the array output image is transformed into a one dimensional array and the vector of features associated to code changes accordingly. SM (A(C0 )) SM (A(C1 )) SM (A(C2 )) SM (A(C3 )) SM (A(C4 )) Listing 4. Transformation step 3 // ABSTR: [3, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 4, 0] int dead_rows = K / 2; int dead_cols = K / 2; AM (R0 ) 17.03718317 17.25327145 17.51541052 16.72942327 1. AM (R1 ) 16.21544456 16.80486418 16.7189079 17.78007298 1. RS(Ci ) R0 R0 R0 R1 - Table 1. Values learned for Q table int normal_factor = K * K; for(r = 0; r < N - K + 1; r++) { for(c = 0; c < N - K + 1; c++) { sum = 0; for (i = 0; i < K; i++) { for (j = 0; j < K; j++) { sum += input_image[(r+i)*(N - K + 1) + (c+j)] * kernel[i*K+j]; } } output_image[(r+dead rows)*(N-K+1) + (c+dead cols)] = (sum / normal_factor); } } The example used in this section shows the transformation of a piece of C code. However, the fact that the machine learning methods used work on program abstractions makes the approach generic and suitable for other imperative languages like FORTRAN, which is also widely used in scientific computing. The application of the approach to other languages would require changes to the tool described in Section 4 in order to account for some specific syntactical patterns of a particular programming language. Nevertheless, most of the abstraction features identified and described in Section 4 are also applicable to other imperative languages since they account for common aspects like: control flow, data layout, data dependencies, etc. Listing 5 shows the result of applying rule R1 to the code in Listing 4. It can be seen that the two outermost loops are collapsed into one for loop but keeping an iteration space with the same number of iterations. Now the code abstraction reflects the change since the number or loops has decreased by one. 6. Listing 5. Transformation step 4 // ABSTR: [2, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 2, 4, 0] int dead_rows = K / 2; int dead_cols = K / 2; int normal_factor = K * K; for (z = 0; z < (N - K + 1)*(N - K + 1); z++) { sum = 0; for (i = 0; i < K; i++) { for (j = 0; j < K; j++) { sum += input_image[((z / (N - K + 1))+i)*(N - K + 1) + ((z % (N - K + 1))+j)] * kernel[i*K+j]; } } output_image[((z / (N - K + 1))+dead_rows)*(N - K + 1) + ((z % (N - K + 1))+dead_cols)] = (sum / normal_factor); } Table 1 shows the resulting values of the state-action table (Q) for the simple transformation sequence described before. In Table 1 PROHA’16, March 12, 2016, Barcelona, Spain Results This section shows some preliminary results obtained for the machine learning -based transformation strategies. We have performed some measurements to verify our claims in Section 5.2 regarding the non-monotonic behavior of non-functional properties for codes obtained from a transformation sequence and how transformed codes with non-optimal values can produce better performant final codes. In order to show this behavior we have identified four different transformation sequences for a use case application performing image compression using the discrete cosine transform. Each of the identified sequences produces C code which is adequately shaped to be mechanically translated to OpenCL and executed on a GPU. First, we have measured the average execution time of 30 runs for each intermediate code of each sequence. These results are reported in Figure 4 which shows the evolution of the execution times. It can be seen that execution times of sequences do not follow a monotonic behavior and have constant changes. As expected, we also obtain different sequential codes ready to be translated to OpenCL and with different execution times. As a second step, we have measured the performance of the OpenCL version generated from each sequence. Figure 5 shows the execution times of the original sequential program and OpenCL versions. Figure 5 also reports, on top of each bar, the speed up of each OpenCL version with respect to the sequential program, showing that the version obtained from sequence 4 is the fastest one accelerating the computation by a factor of 2.53x. Now, looking at Figures 4 and 5 together it can be seen the absence of correlation between the non-functional property measured (i.e. execution time) of each final sequential code and the performance of the 7 2018/3/28 two parameters that appear in Equation 1, i.e. the learning rate (α) and discount factor (γ). For this purpose, an empirical study was performed in which parameter values leading to transformation sequences providing the fastest OpenCL versions were selected. According to this criteria, a value of 0.5 was used for α and 0.6 for γ. Also, reward values have been chosen in order to give a higher reinforcement to those sequences leading to better performant final codes. In our problem, reward values used for the best sequences of each use case application are substantially higher, with a ratio of 1:100, with respect to the rest of transformation sequences. After training, three different use case applications were used as predict set. The applications in the predict set were mechanically transformed according to the previously learned sequences and finally translated by hand into OpenCL. Independently, OpenCL versions of the initial C code were written. The evaluation of the the reinforcement learning approach was made by comparing the performance of the hand-coded versions with that of the versions mechanically generated from the transformed codes produced by the sequences learnt by reinforcement learning . Figure 4. Execution times for transformation sequences corresponding OpenCL version. In fact, sequence 4 with the second highest execution time produces the fastest GPU implementation. Based on these results it can be concluded that an effective method must be used to discover and learn the uncorrelated relation between final sequential codes and parallel versions for a range of target platforms. We have decided to base our approach on reinforcement learning , since it is driven by final performance measurements rather than on intermediate values which can lead to suboptimal results. Figure 6. Speed up for train and predict sets Figure 6 shows the results obtained for both the train and predict sets in terms of speed up factor of the hand and mechanically generated OpenCL versions over the original sequential program. By comparing the results for both the train and the predict set we can assess the response of the transformation system after the learning phase. Looking at results in Figure 6 we can see that the transformation sequences leads to parallel versions that provide comparable acceleration factors with respect to hand coded versions. Although these preliminary evaluation is based on a small sample, it shows that our approach seems promising to tackle the problem of rule-based program transformation systems. The results discussed in this section show a preliminary evaluation for GPU platforms. However, the same approach can be followed in order to target different platforms which are present in Heterogeneous systems. In this way, a separate state-action table can be used for learning adequate transformation sequences for each target platform and rewards would be assigned based on the performance of the final code generated for each platform. Figure 5. Execution times for OpenCL versions We have also performed a preliminary evaluation of reinforcement learning as a technique to guide a rule-based program transformation tool. In order to do the aforementioned evaluation we have selected four use case applications and identified different transformation sequences leading to codes that can be mechanically translated to OpenCL and executed on a GPU. These four applications and its corresponding transformation sequences have been used as training set. One of the applications of the train set is the image compression program, mentioned before, denoted as compress. Other program of the train set, denoted as rgbFilter, is an image filter that splits the different color channels of a given RGB input image in different images. Two more image processing applications complete the train set: one, denoted as edgeDetect, detects edges in an image using a Sobel filter and another one, denoted as threshold, performs image segmentation over an input image given a threshold value. Once the training set is defined, the transformation engine based on reinforcement learning requires to tune the PROHA’16, March 12, 2016, Barcelona, Spain 7. Conclusions and Future Work In this paper we have proposed a machine learning -based approach to learn heuristics for guiding the code transformation process of a rule-based program transformation system (Tamarit et al. 2015, 2016). This type of systems pose a number of problems such as the search-space exploration problem arising from the application of transformation rules in arbitrary orders or the definition of a stop 8 2018/3/28 criteria of the transformation system. For the latter we propose the use of classification trees and for the former we propose a novel approach based on reinforcement learning . We have also performed a preliminary evaluation of the approach, which provided promising results that demonstrate the suitability of the approach for this type of transformation systems. As a future work we plan to continue expanding the set of use case applications considered for training the different machine learning techniques used. As a consequence, we expect to enrich the code features identified for obtaining program abstractions in order to capture new code patterns. We also expect that the increase in the training set will result in better prediction outcomes, but it will also increase the complexity of efficiently using the learning techniques. In the case of reinforcement learning having more learning cases results in a bigger state space. For that reason we plan to use common methods to reduce the number of states like clustering or principal component analysis techniques. We also plan to explore another features of reinforcement learning like the use of different learning rates for different states or transformation sequences in order to learn and converge faster towards transformed codes providing better performant final versions. We also plan to define multi-objective reinforcement learning rewards based on different non-functional properties like energy consumption, resource usage, etc. and even a combination of multiple of these properties. This future line would permit the definition of transformation strategies that try to optimize different aspects and generate, for example, a final code among the fastest ones that consumes the least amount of energy. Also, the introduction of weights into the multi-objective rewards would offer programmers the flexibility to select which non-functional property or set of properties they want to focus on for generating the final code. J. G. Koomey. Worldwide Electricity Used in Data Centers. Environmental Research Letters, 3(3):034008, 2008. URL http://stacks.iop. org/1748-9326/3/i=3/a=034008. G. Mariani, G. Palermo, R. Meeuws, V. M. Sima, C. Silvano, and K. Bertels. Druid: Designing reconfigurable architectures with decisionmaking support. In 19th Asia and South Pacific Design Automation Conference, ASP-DAC 2014, Singapore, January 20-23, 2014, pages 213–218, 2014. doi: 10.1109/ASPDAC.2014.6742892. URL http: //dx.doi.org/10.1109/ASPDAC.2014.6742892. S. Marsland. Machine Learning: An Algorithmic Perspective. Chapman & Hall/CRC, 1st edition, 2009. ISBN 1420067184, 9781420067187. F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikitlearn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. G. Pekhimenko and A. Brown. Efficient program compilation through machine learning techniques. In K. Naono, K. Teranishi, J. Cavazos, and R. Suda, editors, Software Automatic Tuning, pages 335– 351. Springer New York, 2010. ISBN 978-1-4419-6934-7. doi: 10. 1007/978-1-4419-6935-4 19. URL http://dx.doi.org/10.1007/ 978-1-4419-6935-4_19. T. Schaul, J. Bayer, D. Wierstra, Y. Sun, M. Felder, F. Sehnke, T. Rückstieß, and J. Schmidhuber. PyBrain. Journal of Machine Learning Research, 2010. S. Schupp, D. Gregor, D. Musser, and S.-M. Liu. Semantic and behavioral library transformations. Information and Software Technology, 44(13): 797–810, 2002. R. M. Stallman and GCC Developer Community. Using The Gnu Compiler Collection: A Gnu Manual For Gcc Version 4.3.3. CreateSpace, Paramount, CA, 2009. ISBN 144141276X, 9781441412768. J. E. Stone, D. Gohara, and G. Shi. OpenCL: A Parallel Programming Standard for Heterogeneous Computing Systems. IEEE Des. Test, 12 (3):66–73, May 2010. ISSN 0740-7475. doi: 10.1109/MCSE.2010.69. URL http://dx.doi.org/10.1109/MCSE.2010.69. S. Tamarit, G. Vigueras, M. Carro, and J. Mariño. A Haskell Implementation of a Rule-Based Program Transformation for C Programs. In E. Pontelli and T. C. Son, editors, International Symposium on Practical Aspects of Declarative Languages, number 9131 in LNCS, page TBD. Springer-Verlag, June 2015. S. Tamarit, J. Mariño, G. Vigueras, and M. Carro. Towards a SemanticsAware Code Transformation Toolchain for Heterogeneous Systems. In First Workshop on Program Transformation for Programmability in Heterogeneous Architectures (PROHA’16), March 2016. Acknowledgments Work partially funded by EU FP7-ICT-2013.3.4 project 610686 POLCA, Comunidad de Madrid project S2013/ICE-2731 N-Greens Software, and MINECO Projects TIN2012-39391-C04-03 / TIN201239391-C04-04 (StrongSoft), TIN2013-44742-C4-1-R (CAVI-ROSE), and TIN2015-67522-C3-1-R (TRACES). References F. Agakov, E. Bonilla, J. Cavazos, B. Franke, G. Fursin, M. F. P. O’Boyle, J. Thomson, M. Toussaint, and C. K. I. Williams. Using machine learning to focus iterative optimization. In Proceedings of the International Symposium on Code Generation and Optimization, CGO ’06, pages 295–305, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0-7695-2499-0. doi: 10.1109/CGO.2006.37. URL http: //dx.doi.org/10.1109/CGO.2006.37. O. S. Bagge, K. T. Kalleberg, E. Visser, and M. Haveraaen. Design of the CodeBoost Transformation System for Domain-Specific Optimisation of C++ Programs. In Third International Workshop on Source Code Analysis and Manipulation (SCAM 2003, pages 65–75. IEEE, 2003. A. Brown, W. Luk, and P. Kelly. Optimising Transformations for Hardware Compilation. Technical report, Imperial College London, 2005. E. Di Napoli, D. Fabregat-Traver, G. Quintana-Orti, and P. Bientinesi. Towards an efficient use of the BLAS library for multilinear tensor contractions. Applied Mathematics and Computation, 235:454–468, May 2014. D. Fabregat-Traver and P. Bientinesi. Application-tailored linear algebra algorithms: A search-based approach. International Journal of High Performance Computing Applications (IJHPCA), 27(4):425 – 438, Nov. 2013. F. Franchetti, Y. Voronenko, and M. Püschel. FFT Program Generation for Shared Memory: SMP and Multicore. In Supercomputing (SC), 2006. L. P. Kaelbling, M. L. Littman, and A. P. Moore. Reinforcement learning: A survey. Journal of Artificial Intelligence Research, 4:237–285, 1996. PROHA’16, March 12, 2016, Barcelona, Spain 9 2018/3/28
6cs.PL
Probabilistically Safe Policy Transfer arXiv:1705.05394v1 [cs.RO] 15 May 2017 David Held1 , Zoe McCarthy1 , Michael Zhang1 , Fred Shentu1 , and Pieter Abbeel1,2,3 Abstract— Although learning-based methods have great potential for robotics, one concern is that a robot that updates its parameters might cause large amounts of damage before it learns the optimal policy. We formalize the idea of safe learning in a probabilistic sense by defining an optimization problem: we desire to maximize the expected return while keeping the expected damage below a given safety limit. We study this optimization for the case of a robot manipulator with safetybased torque limits. We would like to ensure that the damage constraint is maintained at every step of the optimization and not just at convergence. To achieve this aim, we introduce a novel method which predicts how modifying the torque limit, as well as how updating the policy parameters, might affect the robot’s safety. We show through a number of experiments that our approach allows the robot to improve its performance while ensuring that the expected damage constraint is not violated during the learning process. Safe Policy Transfer Simula'on Reality Fig. 1. After training a robot to perform a task in simulation, we adapt the learned policies to the real world. However, as the robot is adapting, we enforce damage constraints via safety-based torque limits to prevent the robot from applying high torques (and risk breaking something) when the performance is poor. I. I NTRODUCTION Reinforcement learning has shown to be a powerful technique leading to impressive performance across a number of domains [31]. For example, reinforcement learning methods have been used to train a computer to outperform human performance in 49 Atari games [14], [18]. Recently, a learningbased method was used to train a computer (AlphaGo) to beat a champion Go player [27]. Similar methods have also been used to train robots to perform a number of difficult tasks in simulation [10], [26] and in the real world [8], [22]. However, when applied to robotics tasks in the real world, learning-based methods that adapt their parameters online have the potential to be dangerous. For example, a selfdriving car or quadrotor that performs online learning might suddenly adapt its parameters in such a way that causes it to crash into a pedestrian or another obstacle. Although there are many ways in which a robot can be dangerous, for this work, we focus on the dangers caused by a robot manipulator applying high torques. Such a robot might break the object that it is interacting with, break a nearby object, or damage itself. One approach that is often used in practice is to place the robot in an isolated environment while training, where it cannot break anything of importance. In such an environment, the robot can perform learning with minimal risk. However, if the isolated training environment is different from the test environment, then this difference can lead to unexpected and possibly dangerous behavior. For example, suppose we want a robot to operate around or collaboratively with people; 1 Department of Electrical Engineering and Computer Science, University of California, Berkeley, Berkeley, CA 94720 2 International Computer Science Institute (ICSI), University of California, Berkeley, Berkeley, CA 94704 3 OpenAI, San Francisco, CA 94110 the isolated training environment would likely not contain any people, and thus the training environment would not be representative of the test environment in which the robot must operate. Another solution is to train the robot in simulation. Efforts can be made to make the simulation mimic the test environment as much as possible; however, despite one’s best efforts, there will likely be differences between simulation and reality, leading to policies that do not work correctly when brought into the real world. If the robot must re-learn how to behave in the real world, there is a risk of the robot operating dangerously while it is adapting its behavior. We propose that, when a robot is placed in a new environment, it should initially operate at low torques. Only once the robot has demonstrated sufficient safety in its new environment do we allow it to operate at higher torques. Our approach thus makes the assumption that, if the robot violates a safety constraint (which we will define), less damage will be caused if the robot is operating at lower torques. However, imposing safety-based torque limits during training brings up new questions that have not been sufficiently explored in the robot learning literature: How do we define the safety of the robot? How do we decide whether to increase the torque limits? How do we ensure that the robot always performs at a safe level of operation even while learning to improve its performance? We propose an approach to dealing with these challenges for the case of a robot manipulator (shown in Figure 1). We evaluate our approach quantitatively, and videos of our results are also available online1 . We note that our method is not a complete solution to the robot safety problem, and there 1 https://youtu.be/fprZHyP_50o are still many safety-related challenges that our approach does not address. Still, we believe our work provides a contribution towards confronting these issues surrounding learning and safe robot operation. II. R ELATED W ORK Policy Transfer. A number of recent papers have explored how to transfer policies from one domain to another [5], [6], [7], [11], [20], [24], [28], [29]. The goal of these papers is typically to minimize the number of samples required in each new environment by transferring knowledge from simulation or from previous environments. However, these approaches do not investigate the potential safety issues that can occur when a policy is first run in a new environment, before any adaptation has occurred. AI Safety. Safety has recently become a popular topic within the AI community, as indicated by several recent survey papers on the topic [2], [12], [21]. Amodei, Olah, et al. organize problems of AI safety into five major categories [2]. One of their categories is safe exploration: “how to ensure that exploratory actions in RL agents don’t lead to negative or irrecoverable consequences that outweigh the long-term value of exploration.” A related problem is “robustness to distributional shift . . . how to avoid having ML systems make bad decisions . . . when given inputs that are potentially very different than what was seen during training.” Both of these issues are relevant to the problem discussed in this paper. Safe exploration. A review of past work on safe exploration is given in [2], [12], [21]. Our method falls into the category of “constrained criterion . . . in which we want to maximize the expectation of the return while keeping other types of expected utilities lower than some given bounds” [1], [12]. Typical constraints involve ensuring that either the expectation of the return exceeds a threshold [9], [13], [23], the variance of the return remains below a threshold [4], or that any state is reachable from any other state (ergodicity) [15], [19]. However, these approaches only guarantee that the constraints will hold at the optimal solution; in contrast to our approach, they do not analyze whether the constraints will hold at every step of the optimization. A recent trajectory optimization algorithm (T-CHOMP) can add a cost that keeps the velocity low near obstacles [3]. However, this method does not learn to adapt its parameters based on errors in the model. In contrast, our approach performs online learning while maintaining damage constraints. III. OVERVIEW In order to obtain safe learning, we pose an optimization problem: we want to train a robot to achieve a task as optimally as possible while maintaining an expected safety constraint. In order to maintain the expected safety constraint, we impose safety-based torque limits on the robot. In Section IV, we will define our optimization problem more precisely, and in Section V, we will describe our method for maintaining the expected safety constraint while optimizing the policy. IV. P ROBLEM S ETUP A. Minimizing Expected Damage Suppose that a robot behaves according to some policy π(a | s) which maps from states s to actions a (we will abbreviate the policy as π). At each timestep t, the robot visits a state st and takes action at , leading to a new state st+1 and accrueing a reward, rt = r(st , at , st+1 ). Reinforcement learning problems normally aim to maximize the expected P return, defined as the discounted sum of rewards, R = t γ t rt , for some constant γ. However, operating the robot also has a risk of causing damage to nearby objects or damaging the robot itself. On any timestep, the agent might cause some amount of damage d to occur. Our goal is to maximize the expected return while keeping the expected damage below a given threshold: maximize E[R | π] (1) subject to E[d | π] ≤ Dsafe (2) π where E denotes an expectation that incorporates the stochasticity from the environment, the policy, or any other sources of variation. The variable Dsafe is a constant that specifies how much expected damage we are willing to tolerate. For example, in the autonomous vehicle domain, we might specify that we want the expected number of major accidents per 100 million miles traveled to be less than 0.1. Note that the damage d is assumed to be a non-negative quantity (i.e. ∀π, d ≥ 0), so we can set Dsafe arbitrarily close to 0 to minimize the amount of expected damage that the robot might cause. We refer to equation 2 as the damage constraint. The problem that we wish to deal with is that, when we first operate the robot using our initial policy, the robot might violate the damage constraint. Further, as we optimize the policy, the policy may change in ways that also violate the constraint. Our goal is then to limit the amount of expected damage caused by the robot while the policy is being adapted. B. Task Safety In order to minimize expected damage, the robot must have some notion of what might cause damage. We define a safety constraint: u(s) ≤ ulim (3) where u(s) is some function over states. For example, we can specify that an autonomous vehicle must remain some minimum distance from any pedestrian. We assume that the robot might cause damage only when the constraint is violated (i.e. when u(s) > ulim ). To discourage the robot from violating this constraint, we use a penalty method for optimization, with the reward received at time-step t as rt0 = rt − λ max(0, u(st ) − u0lim )2 (4) where u0lim ≤ ulim . By increasing u0lim over time until u0lim = ulim and by increasing λ over time, we can ensure that our final policy, at convergence, will maximize the expected return without violating the safety constraint. However, the problem is that penalty methods only guarantee that the safety constraint (equation 3) will not be violated at convergence. On the other hand, for robotics, any unsafe action can be dangerous or harmful, including actions taken before convergence. We thus design a method that ensures that, even if the robot violates the safety constraint at intermediate steps of the optimization, the robot will not cause a significant amount of damage. We now define the expected damage in terms of safety violations. We assume that, due to differences between simulation and reality and due to uncertainty in the environment, avoiding violating the safety constraint entirely is impossible. Let U be the event of violating the safety constraint from equation 3 (and possibly causing damage) when acting under policy π, and let pu (π) = p(U ). We refer to pu (π) as the “unsafety rate,” which we abbreviate as pu . Note that no damage can occur unless the event U has occurred. Further, let dmax (π) be the maximum amount of damage that can be caused by policy π if it violates the safety constraint (as explained below, different policies can cause different amounts of damage during constraint violations). Then we can upper-bound the expected damage by Z E[d | π] = p(d(π)) d(π) dd (5) Z = p(U ) p(d(π) | U ) d(π) dd (6) Z ≤ p(U ) p(d(π) | U ) dmax (π) dd (7) Z = p(U ) dmax (π) p(d(π) | U ) dd (8) = p(U ) dmax (π) (9) where equation 6 comes from the total probability theorem combined with the fact that p(d(π) | ¬U ) = 0 because we assume that damage can only occur when the constraint is violated. Thus our damage constraint (equation 2) becomes pu (π)dmax (π) ≤ Dsafe . (10) Our goal is to impose constraints on the policy such that, even if the policy violates the safety constraint (i.e. even if pu (π) > 0), the amount of expected damage will never exceed the threshold Dsafe . C. Torque Limits To concretize our problem, we assume that the actions chosen by the robot are torques that will be applied to its various motors. In order to limit the damage dmax (π) that can be caused by the robot, we introduce torque limits into our robot operation. At each time step, we limit the torque (in absolute value) that the robot can output to some threshold Tlim . Specifically, if our policy π outputs a torque T , then we instead apply a torque T 0 = max(min(T, Tlim ), −Tlim ). (11) We use the same torque limit for all joints. By applying torque limits, we limit the amount of damage that can be caused by the robot acting under any policy. For example, if an autonomous vehicle is driving slowly, then even if it moves unsafely (due to, for example, a slippery road or poor visibility conditions), its slow speed will result in less damage if the vehicle gets into an accident. Similarly, if a robot manipulator bumps into a fragile object, it will have a lower chance of breaking the object if it is moving at lower torques, and if it bumps into a person, then the person will be less likely to become injured. The damage that can be caused by the robot is now a function of both the policy π and the torque limit Tlim , which we write as dmax (π, Tlim ). Analyzing the damage that can be caused at different torque levels is outside of the scope of this paper, so we assume that the maximum amount of damage that can be caused in an unsafe state is linear in the torque limit, i.e. dmax (π, Tlim ) = α Tlim (12) for some constant α > 0. Our method does not depend on the specific form of this function, and other forms can be easily 0 used. We can fold α into the safety limit Dsafe = Dsafe /α, so without loss of generality, we assume that α = 1. Our damage constraint now becomes pu (π, Tlim ) Tlim ≤ Dsafe (13) where the probability of violating the safety constraint pu is now a function of both the policy π as well as the torque limit Tlim , since both affect the robot’s operation. This equation is fairly intuitive: if the robot is operating at a low torque limit which is unlikely to cause much damage, we accept a greater probability of violating the safety constraint; if the robot is operating at a larger (and more dangerous) torque limit, then we insist on a lower probability of violating the safety constraint. Our approach is not restricted to torque limits but can be used with any type of limit that controls the amount of damage that can be caused by an unsafe policy, such as velocity constraints. Our initial policy might be unsafe, so we initially force the robot to operate at a low torque limit. Although a robot operating at a lower torque limit can cause less damage, limiting the torques that the robot can apply also might limit the rewards that can be obtained by the robot. A robot that can only apply low torques will take a longer time to achieve each task, and thus it will typically accrue lower rewards (for many typical reward functions). We define the Probabilistically Safe Policy Transfer problem as that of deciding how to modify the policy and adjust the torque limit Tlim in order to maximize the expected return while maintaining the expected damage constraint. One potential side-effect of this framework is that, in some cases, varying the torque limits can increase the convergence time of the policy: for each new value of the torque limit, the policy might need to adapt its behavior, leading to slower convergence. However, we accept this cost in convergence time due to the benefit of safer robot behavior. V. M ETHOD A. Overall Algorithm Now that we have defined what it means for a robot to operate safely (in a probabilistic sense), we describe a method for safely optimizing a policy. The overall algorithm for Probabilistically Safe Policy Transfer is shown in Algorithm 1. We begin with an initial policy π and an initial torque limit of Tlim = Tmin where Tmin < Dsafe , which ensures that, even if pu = 1, our expected damage pu Tlim will not exceed the damage limit. Using our initial policy and torque limit, we perform a set of rollouts. Based on these rollouts, we update the policy, as is normally done in reinforcement learning. Next, we adjust our torque limit. We would like to increase our torque limit as much as possible, but we need to ensure that the damage constraint will continue to hold for the next iteration with the updated policy. We achieve this as follows: we first emperically compute the current unsafety rate pu from the rollouts. We then anticipate how much the unsafety rate might increase in the next iteration, given by ∆pu . Let ∆pu1 be the amount that the unsafety rate might increase as a result of changing the torque limit (described in Section VB), and let ∆pu2 be the amount that the unsafety rate might increase as a result of changing our policy (described in Section V-C). The probability of the union of these cases is bounded by the sum of the individual probabilities. Using this bound gives us the worst-case estimate of: p0u = pu + ∆pu ≤ pu + ∆pu1 + ∆pu2 . where Fµ,σ (T ) is the cumulative distribution function of the Gaussian with mean µ and variance σ 2 (we have omitted the dependency of the the mean and variance on the state s). Because truncation is applied after sampling, Tlim contains the probability mass of all torques T ≥ Tlim ; similarly, −Tlim contains the probability mass for all torques T ≤ −Tlim . This distribution is shown in Figure 2 (top). 1 - F(Tlim) F(-Tlim) (14) (15) Then, we adjust (increase or decrease) the torque limit Tlim such that, if the unsafety rate increases to p0u , the damage constraint would hold with equality, i.e. we set Tlim = Dsafe /p0u . To ensure that the damage constraint is not violated, we impose safety-based torque limits on our robot. The torque T is sampled from the distribution N (µ, σ 2 ) and then truncated down to a torque T 0 based on the torque limit (see Equation 11). The distribution for the applied torque (i.e. after truncation) can thus be represented by a truncated Gaussian:    −(T 0 −µ)2  √1 exp , if − Tlim < T 0 < Tlim  2 2σ  σ 2π   Fµ,σ (−Tlim ), if T 0 = −Tlim p(T 0 |s) =  1 − Fµ,σ (Tlim ), if T 0 = Tlim     0 otherwise (17) (16) We then perform new rollouts using our updated policy and new torque limit, and we repeat until convergence. Algorithm 1 Probabilistically Safe Policy Transfer Input: Initial policy π, limit Dsafe , initial torque limit Tmin 1: Tlim ← Tmin . Initialize the torque limit 2: while not converged do 3: τ ← Run rollouts of policy π with torque limit Tlim 4: Update the policy π 5: Compute safety-related quantities: 6: Compute unsafety rate pu from rollouts τ 7: p0u ← pu + ∆pu . Predict the next unsafety rate 8: Tlim ← Dsafe /p0u . Update the torque limit B. Changing the Torque Limit We assume that our policy maps states to a Gaussian distribution with mean µ(s) and variance σ 2 (s), and to choose an action, we sample from this distribution. This is a common representation in deep reinforcement learning for continuous control problems [16], [17], [25]. Fig. 2. Top: Probability density function over the old torque limit (after truncation). There is an additional discrete probability mass at the (positive and negative) torque limits. Bottom: Probability density function from the new torque limit (after truncation). The probability density resulting from an increase in the 0 torque limit from Tlim to Tlim is illustrated in Figure 2 (bottom). The probability density remains the same for all torques for which −Tlim < T < Tlim , and the probability density changes for torques in the range TD = (T ≤ −Tlim ) ∪ (T ≥ Tlim ). (18) The probability that a torque would previously have been sampled from this range is given by p(T ∈ TD |s) = 1 − Fµ,σ (Tlim ) + Fµ,σ (−Tlim ). (19) This distribution is conditioned on the state s. In order to compute the unconditional probability over torques, we must integrate over the different states: Z p(T ∈ TD ) = p(s) p(T ∈ TD |s) ds. (20) s The distribution over states p(s) that are visited depends on the actions that are taken; thus, p(s) depends on the policy π as well as the torque limit Tlim . However, estimating p(T ∈ TD ) = Es∼p(s) [p(T ∈ TD |s)] (21) = Es∼p(s) [1 − Fµ,σ (Tlim ) + Fµ,σ (−Tlim )]. (22) This quantity is the probability that a different torque will be sampled due to changing the torque limit. If all such cases lead to an unsafe action by our policy, then by increasing the torque limit, the unsafety rate might increase by ∆pu1 = p(T ∈ TD ). (23) This quantity is used by our algorithm in Equations 15 and 16 to determine the new torque limit. Note that our estimate of ∆pu1 does not depend on the amount by which the torque limit was increased. Our approach is fairly conservative: we assume that if any torque T is sampled that is greater than our previous torque limit, then this new torque might lead to an unsafe action, regardless of how close that torque is to the previous torque limit. Although such an approach might in some cases be conservative, our method errs on the side of ensuring safe robot operation. The above analysis holds only for torque limit increases and not decreases. Nonetheless, in the case of torque limit decreases, we still use the above formula to predict changes to the unsafety rate. Based on the above analysis, such an approach is conservative, because decreasing the torque limit (i.e. making the torque limit tighter) will cause no new torques to be sampled that could not have been sampled on the previous iteration. Thus, using the same formula in both cases results in a method that is both simpler and more conservative than handling each case separately. C. Updating the policy In order to find the optimal policy in the test environment, we must update the policy parameters. However, updating the policy parameters can increase the unsafety rate, possibly leading to a violation of the damage constraint. To examine the effect of changing the policy parameters on the unsafety rate, we compute the amount that the policy distribution can change. An example is shown in Figure 3. The degree to which the policy remains the same is given by the area of intersection, AI , between the new policy and the old policy (shown in green). The amount that the policy distribution has changed is then given by 1 − AI , which is equal to the area of the blue section in Figure 3. This probability mass has shifted to the red area of this figure, which must also have an area of 1 − AI in order for the new policy distribution to integrate to 1. As in the previous section, if we conservatively assume that changes in the policy distribution all lead to unsafe states, then the unsafety rate might increase by ∆pu2 = (1 − AI ). (24) This quantity is used by our algorithm in Equations 15 and 16 to determine the new torque limit. Old policy New policy Intersection 0.45 0.4 0.35 0.3 PDF the effect of the torque limit on p(s) is complex, so we approximate p(s) using the distribution from the previous iteration (a similar approximation is often made for policy gradient methods; see, e.g., [25]). In practice, we replace this integral with the Monte-Carlo estimate, i.e. 0.25 0.2 0.15 0.1 0.05 0 -6 -4 -2 0 2 4 6 8 Torque Fig. 3. Our policy is represented by a Gaussian, shown in blue and green. After updating the policy parameters, the new policy is shown in red and green. The green area is the probability mass that is consistent between the new and old policies, whereas the blue mass from the old policy was shifted to the red mass of the new policy. Both distributions integrate to 1, so the blue and red areas must be equal. (Best viewed in color) If the policy is represented by a complex function such as a neural network, it is typically difficult to predict how updating the parameters will affect the policy distribution. However, if we are using Trust Region Policy Optimization (TRPO) [25] to update the policy parameters, then we will have a good estimate on how the distribution can change between iterations. In TRPO, we update the policy according to the following optimization: h π (a|s) i θ maximize E Aθold (s, a) (25) θ πθold (a|s) subject to E[DKL (πθold (·|s) || πθ (·|s))] ≤ δKL (26) where θold are the old policy parameters, θ are the new policy parameters, DKL is the KL-divergence, δKL is a constant, and Aθold (s, a) is the advantage function, computed as the empirical return minus a baseline [10]. The constant δKL limits the amount by which the KL-divergence of the policy can change on each iteration. Thus, although we do not know exactly how the policy has changed from one iteration to the next, when using TRPO we know that the KL-divergence of the policy cannot change more than δKL . We would like to use this information to estimate (1−AI ). The KL-divergence between two Gaussian distributions is given by KL(p1 ||p2 ) = log 1 σ 2 + (µ1 − µ2 )2 σ2 − + 1 2 σ1 2σ2 2 (27) where p1 = N (µ1 , σ12 ) and p2 = N (µ2 , σ22 ). If we make the simplifying assumption that the variance stays roughly the same between each iteration (i.e. σ1 = σ2 = σ), and we set the KL divergence equal to the constraint δKL , then we get p |µ1 − µ2 | = σ 2 δKL . (28) As illustrated in Figure 4, the area of intersection between the two Gaussians of equal variance would then be given by  µ1 − µ2  AI (µ1 , σ) = 2Fµ1 ,σ µ1 − (29) p2 = 2 Fµ1 ,σ (µ1 − σ δKL /2) (30) where Fµ1 ,σ (·) is the cumulative distribution function for a normal distribution of mean µ1 and variance σ 2 . The mean and variance are conditioned on the state, so as before, we can use an expectation to remove the dependency on the state: p (31) AI = 2 Es∼p(s) [Fµ1 ,σ (µ1 − σ δKL /2)]. We can then use this estimate in Equation 24 to predict how much the unsafety rate might increase as a result of updating our policy. 0.45 0.45 0.4 0.4 0.35 0.35 0.3 PDF PDF 0.3 0.25 0.25 0.2 0.2 0.15 0.15 0.1 0.1 0.05 0.05 0 Old policy Old policy New policy New policy IntersectionIntersection 0 -2 Safe behavior (Our method) Unsafe behavior (baseline) Fig. 5. Safe behavior (our method, left) vs unsafe behavior (baseline, right) for the cup swirl task. The goal is to swirl a full cup of almonds without spilling. -2 0 0 2 2 4 4 6 6 Torque Torque Fig. 4. Our old policy is represented by a Gaussian, shown in blue and green. After updating the policy parameters, the new policy is shown in red and green. The variances of the two distributions are assumed to be approximately equal. (Best viewed in color) VI. R ESULTS A. Experimental Setup We test our method both with a simulated PR2 (Section VI-B) and with a real PR2 (Section VI-C); pictures of each robot can be seen in Figure 1. To illustrate our method, we use as an example task that of swirling a cup in a circle while keeping the cup oriented vertically (so that the contents do not spill). Examples of safe and unsafe behavior for this task can be seen in Figure 5, and videos of our results are available online2 . Our safety limit is defined with respect to the orientation of the end-effector; in our experiments, the end-effector must point straight down and maintain a fixed vertical orientation. If θ is the angle of the end-effector with respect to the downward direction, then our safety constraint is defined as θ ≤ θlim , where θlim is defined as the maximum angle that the robot can hold the cup without a risk of spilling. The unsafety rate pu then measures the fraction of timesteps for which the θ > θlim . We assume that the amount that is spilled (i.e. the damage) will be greater if the constraint is violated at high torques (i.e. if the robot tips the cup and applies a large torque, moving quickly). Additionally, our experiments demonstrate that, at higher torques, the robot will have a harder time recovering from small errors, leading to larger errors and more damage. The reward is designed to encourage the robot to swirl the cup in a horizontal circle. The modified reward used by our 2 https://youtu.be/fprZHyP_50o reinforcement learning algorithm is defined using the penalty method approach of equation 4. In our experiments, we set u0lim = 0 and λ = 0.001. Our state space is defined by the left arm’s joint-angles, the joint velocities, and the vector z which measures the downward orientation of the end-effector; for optimal safety, we should have z = (0, 0, −1). The actions of our policy are the 7 joint torques for the left arm of the PR2. We pre-train the policy in simulation using the Mujoco [30] simulator. Our policy is represented as a neural network with 3 hidden layers of 64 nodes each, with tanh non-linearities after each hidden layer. The policy is optimized using TRPO [25] and Generalized Advantage Estimation [26] with a linear baseline, as implemented by rllab [10]. Each episode consists of 200 timesteps, where each timestep is 50 milliseconds, and we pre-train the policy with 50 episodes per batch. We use a discount factor of γ = 0.95, λ = 0.98 from Generalized Advantage Estimation, and a KL-divergence constraint of δKL = 0.01. During pretraining, we re-initialize the robot arm to a random initial configuration before each episode, so that the policy will be robust to the initial position of the robot. After pre-training, we test our policy on a robot that may have different model parameters from those that were used during pre-training. For example, if we are pre-training in simulation and then transferring our policy to the real world, the real robot may have different values for friction, damping, or other model parameters. Our policy is fine-tuned in the test environment in order to learn a safe policy that will correctly implement the desired behavior. Because we desire for our policy to quickly converge during fine-tuning, we increase our KL-divergence constraint to δKL = 0.05 and we use only 5 episodes per batch. Other parameters are kept the same as during pretraining, except as specified below. In order to ensure that B. Simulation Results Torque Limit (N·m) Our simulated test environment allows us to test the robustness of our algorithm under controlled environmental variations; we will show results on a real PR2 in Section VIC. We test our algorithm for Probabilistically Safe Policy Transfer in a simulated test environment that differs from our training environment in that all masses and damping parameters are reduced by a factor of 10-100 and moments of inertia are reduced by a factor of 10. We initialize the torque limit Tlim to 0.1 N·m and increase it as specified by our method up to a maximum value of 3 N·m. We use Dsafe = 0.5, except where indicated otherwise. For each method that we evaluate below, we run the method with 5 random seeds, in order to test the robustness of each approach. Adaptive vs Fixed Torque Limit. First, we show the benefit of using our adaptive torque limit method compared to a baseline of using a fixed torque limit. Shown in Figure 6, our method starts with a low torque limit (0.1 N·m) and adjusts the torque limit over time. In contrast, the baseline uses a fixed torque limit of 3 N·m. Note that our method does not always increase the torque limit; sometimes it may decrease it based on the unsafety rate. Number of Itera-ons Fig. 6. Our method (shown in blue) adjusts the torque limit over time, based on the safety of the policy. We compare to a baseline (shown in orange) which has a fixed torque limit, as is commonly done. The lines show the mean and variance of the torque limit over 5 runs with different random seeds. (Best viewed in color) Figure 7 shows the expected damage from each of these approaches. During the initial iterations of the policy, both methods perform relatively poorly, leading to a large number of constraint violations and hence a high unsafety rate (pu ). The fixed torque limit approach operates at large torques even during these initial stages, leading to a large expected damage (pu Tlim ), as shown. In contrast, our adaptive torque limit approach initially operates at a low torque limit (0.1 N·m), and thus the initial expected damage is kept low. Our method adapts the torque limit appropriately to keep the expected damage below Dsafe as the policy adapts. Expected Damage the state-visitation distribution stays relatively fixed from one time-step to the next, we ensure that the torque limit Tlim does not increase by more than 5% between each iteration (for our method as well as for the baselines). This is similar to the KL-divergence constraint that is placed on the policy, which prevents the policy from changing too dramatically in each iteration. At test time, we will be varying the torque limit Tlim to enforce the expected damage limit, using our method described in Section V. In order to make the training environment match to the test environment as much as possible, we also vary the torque limit during training. We additionally input the torque limit into the network as an additional input; thus, our policy can learn a range of behaviors for varying torque limits. Although this is not necessary for our method to work (our method will still keep the expected damage below the limit even without this modification), our experiments show that this change is helpful for fast convergence of the policy during test time. Dsafe Number of Itera4ons Fig. 7. By adapting the torque limit based on the performance, our method (shown in blue) is able to keep the expected damage below the safety limit (shown in red). In contrast, using a fixed torque limit leads to a large expected damage, especially during the initial iterations while the policy is still adapting. The plot shows the mean and variance of the expected damage over 5 runs with different random seeds. (Best viewed in color) Ablation Analysis. Next, we perform an ablation analysis to demonstrate the importance of each component of our method. In our full method, we predict that the probability of unsafety pu might increase from its current value due to two factors: • Changing the torque limit might cause pu to increase by ∆pu1 (Section V-B) • Updating the policy might cause pu to increase by ∆pu2 (Section V-C) Thus, our full method predicts that, as a result of both of these factors, the probability of unsafety pu might increase to p0u = pu + ∆pu1 + ∆pu2 (32) We then set the torque limit to a value of Tlim = Dsafe /p0u , ensuring that the expected damage constraint will continue to be satisfied. In this section, we explore the effect of removing different components of our method; specifically, we explore the following variants for the predicted probability of unsafety: v2) Not predicting effect of the torque limit increase: p0u = pu + ∆pu2 v3) Not predicting effect of the policy update: p0u = pu + ∆pu1 v4) Not predicting either effect: p0u = pu In each case, we set the torque limit to a value of Tlim = Dsafe /p0u as before. We run each method with 5 random seeds. The result of our ablation analysis is shown in Figure 8. As can be seen in this figure, removing any part of our method results in a violation of the expected damage limit Dsafe . Thus, in order to observe the expected damage limit, it is Our full method Expected Damage important to predict both how changing the torque limit and how updating the policy parameters will affect the probability of unsafety. Dsafe that of our simulation; to overcome the static friction, we initialized the torque limit Tlim to 1.8 N·m, and we increased all torques output by the policy by 30%. We set Dsafe = 1.3. To avoid unsafe actions due to the stochasticity of the policy, we reduced the policy variance by a factor of two for realworld testing. We run our method three times, with different random seeds. As shown in Figure 10, our method succeeds in keeping the expected damage below the damage limit. Dsafe Expected Damage Number of itera7ons V3: Not predic7ng effect of policy update Dsafe Dsafe Expected Damage Expected Damage Number of itera7ons V2: Not predic7ng effect of torque limit increase V4: Not predic7ng either effect Expected Damage Number of itera7ons Dsafe Number of itera7ons Fig. 8. Ablation analysis: We compare our full method (top) to various modified versions of our method, removing different components of our approach (rows 2 through 4). Our full method is the only version that does not violate the expected damage limit Dsafe . Varying the expected damage limit. In Figure 9, we show the effect on our policy of varying Dsafe , the expected damage limit. We test our method with four different values of Dsafe . In each case, our method adjusts the torque limit accordingly to try to keep the expected damage below Dsafe . In some trials we observed the emperical expected damage exceed the safety threshold due to the stochasticity of our policy in small batch sizes; with larger batch sizes, our method observed the safety limit in all of our experiments. Expected Damage Dsafe Number of Itera5ons Fig. 10. By adapting the torque limit based on the performance, our method is able to keep the expected damage below the limit Dsafe . Each line shows our method with a different random seed. We also tested whether our method can be used to successfully train a robot to swirl a full cup without spilling. In order to verify this, we filled a cup with almonds and tested both our method as well as the baseline (with no torque limits). For each method, we counted the number of almonds that were spilled after 10,000 timesteps of our policy (8.3 minutes). Based on 5 repeated experiments, our method drops an average of 7.8 almonds, compared to 18.2 almonds for the baseline (this result is statistically significant with p < 0.05). Videos of our results are available online3 VII. C ONCLUSION We present a probabilistic framework for defining robot safety in terms of maximizing the expected return while keeping the expected damage below a given limit. As the policy adapts to its new environment, our method adjust the torque limit accordingly to ensure that the robot remains safe. Importantly, our method predicts how changes to the policy or changes to the torque limit might affect the unsafety rate, in order to keep the expected damage below the limit at every iteration. VIII. ACKNOWLEDGMENTS Number of Itera5ons Fig. 9. We show the effect on our algorithm of varying the expected damage limit, Dsafe . Each line represents the expected damage for a different value of Dsafe . The goal of our method is to ensure that, in each case, the expected damage limit stays below Dsafe . (Best viewed in color) C. Real-world Results To test whether our method works in the real world, we also fine-tune our pre-trained policy using the real PR2. Our real robot appeared to have much greater friction than This work was partially supported by an NSF CAREER award (#1351028) and by Berkeley Deep Drive. R EFERENCES [1] Altman, E.: Asymptotic properties of constrained markov decision processes. Zeitschrift für Operations Research 37(2), 151–170 (1993) [2] Amodei, D., Olah, C., Steinhardt, J., Christiano, P., Schulman, J., Mané, D.: Concrete problems in ai safety. arXiv preprint arXiv:1606.06565 (2016) [3] Byravan, A., Boots, B., Srinivasa, S.S., Fox, D.: Space-time functional gradient optimization for motion planning. In: IEEE International Conference on Robotics and Automation (ICRA). IEEE (2014) 3 https://youtu.be/fprZHyP_50o [4] Castro, D.D., Tamar, A., Mannor, S.: Policy gradients with variance related risk criteria. In: ICML (2012) [5] Cutler, M., How, J.P.: Efficient reinforcement learning for robots using informative simulated priors. In: 2015 IEEE International Conference on Robotics and Automation (ICRA). pp. 2605–2612. IEEE (2015) [6] Cutler, M., How, J.P.: Autonomous drifting using simulation-aided reinforcement learning. In: ICRA. IEEE (2016) [7] Cutler, M., Walsh, T.J., How, J.P.: Reinforcement learning with multi-fidelity simulators. In: 2014 IEEE International Conference on Robotics and Automation (ICRA). pp. 3888–3895. IEEE (2014) [8] Deisenroth, M., Rasmussen, C.E.: Pilco: A model-based and dataefficient approach to policy search. In: 28th International Conference on Machine Learning (ICML). pp. 465–472 (2011) [9] Delage, E., Mannor, S.: Percentile optimization for markov decision processes with parameter uncertainty. Operations research (2010) [10] Duan, Y., Chen, X., Houthooft, R., Schulman, J., Abbeel, P.: Benchmarking deep reinforcement learning for continuous control. International Conference on Machine Learning (ICML) (2016) [11] Fu, J., Levine, S., Abbeel, P.: One-shot learning of manipulation skills with online dynamics adaptation and neural network priors. Proceedings of the 29th IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) (2015) [12] Garcıa, J., Fernández, F.: A comprehensive survey on safe reinforcement learning. Journal of Machine Learning Research (2015) [13] Geibel, P.: Reinforcement learning for mdps with constraints. In: European Conference on Machine Learning. Springer (2006) [14] Guo, X., Singh, S., Lewis, R., Lee, H.: Deep learning for reward design to improve monte carlo tree search in atari games. Conference on Uncertainty in Artificial Intelligence (UAI) (2016) [15] Hutter, M.: Self-optimizing and pareto-optimal policies in general environments based on bayes-mixtures. In: International Conference on Computational Learning Theory. pp. 364–379. Springer (2002) [16] Levine, S., Finn, C., Darrell, T., Abbeel, P.: End-to-end training of deep visuomotor policies. Journal of Machine Learning Research (2016) [17] Mnih, V., Badia, A.P., Mirza, M., Graves, A., Lillicrap, T.P., Harley, T., Silver, D., Kavukcuoglu, K.: Asynchronous methods for deep reinforcement learning. ICML (2016) [18] Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A.A., Veness, J., Bellemare, M.G., Graves, A., Riedmiller, M., Fidjeland, A.K., Ostrovski, G., et al.: Human-level control through deep reinforcement learning. Nature 518(7540), 529–533 (2015) [19] Moldovan, T.M., Abbeel, P.: Safe exploration in markov decision processes. In: Proceedings of the 29th International Conference on Machine Learning (ICML). pp. 1711–1718 (2012) [20] Mordatch, I., Mishra, N., Eppner, C., Abbeel, P.: Combining modelbased policy search with online model learning for control of physical humanoids. ICRA (2016) [21] Pecka, M., Svoboda, T.: Safe exploration techniques for reinforcement learning–an overview. In: International Workshop on Modelling and Simulation for Autonomous Systems. pp. 357–375. Springer (2014) [22] Peters, J., Schaal, S.: Reinforcement learning of motor skills with policy gradients. Neural networks 21(4), 682–697 (2008) [23] Ponda, S.S., Johnson, L.B., How, J.P.: Risk allocation strategies for distributed chance-constrained task allocation. In: 2013 American Control Conference. pp. 3230–3236. IEEE (2013) [24] Rusu, A.A., Rabinowitz, N.C., Desjardins, G., Soyer, H., Kirkpatrick, J., Kavukcuoglu, K., Pascanu, R., Hadsell, R.: Progressive neural networks. arXiv preprint arXiv:1606.04671 (2016) [25] Schulman, J., Levine, S., Abbeel, P., Jordan, M., Moritz, P.: Trust region policy optimization. In: Proceedings of The 32nd International Conference on Machine Learning. pp. 1889–1897 (2015) [26] Schulman, J., Moritz, P., Levine, S., Jordan, M., Abbeel, P.: Highdimensional continuous control using generalized advantage estimation. ICLR (2016) [27] Silver, D., Huang, A., Maddison, C.J., Guez, A., Sifre, L., Van Den Driessche, G., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., et al.: Mastering the game of go with deep neural networks and tree search. Nature 529(7587), 484–489 (2016) [28] Taylor, M.E., Stone, P.: An introduction to intertask transfer for reinforcement learning. AI Magazine 32(1), 15 (2011) [29] Tessler, C., Givony, S., Zahavy, T., Mankowitz, D.J., Mannor, S.: A deep hierarchical approach to lifelong learning in minecraft. arXiv preprint arXiv:1604.07255 (2016) [30] Todorov, E., Erez, T., Tassa, Y.: Mujoco: A physics engine for model-based control. In: 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems. pp. 5026–5033. IEEE (2012) [31] Zhong, M., Johnson, M., Tassa, Y., Erez, T., Todorov, E.: Value function approximation and model predictive control. In: IEEE Symposium on Adaptive Dynamic Programming and Reinforcement Learning (ADPRL). pp. 100–107. IEEE (2013)
2cs.AI
arXiv:1609.03000v2 [cs.DS] 22 Mar 2018 Computing longest single-arm-gapped palindromes in a string Shintaro Narisada1 , Diptarama1 , Kazuyuki Narisawa1 , Shunsuke Inenaga2 , and Ayumi Shinohara1 1 Graduate School of Information Sciences, Tohoku University, Japan {shintaro narisada, diptarama}@shino.ecei.tohoku.ac.jp {narisawa, ayumi}@ecei.tohoku.ac.jp 2 Department of Informatics, Kyushu University, Japan [email protected] Abstract In this paper, we introduce new types of approximate palindromes called singlearm-gapped palindromes (shortly SAGPs). A SAGP contains a gap in either its left or right arm, which is in the form of either wgucuR wR or wucuR gwR , where w and u are non-empty strings, wR and uR are respectively the reversed strings of w and u, g is a gap, and c is either a single character or the empty string. We classify SAGPs into two groups: those which have ucuR as a maximal palindrome (type-1), and the others (type-2). We propose several algorithms to compute type-1 SAGPs with longest arms occurring in a given string, based on suffix arrays. Then, we propose a linear-time algorithm to compute all type-1 SAGPs with longest arms, based on suffix trees. Also, we show how to compute type-2 SAGPs with longest arms in linear time. We also perform some preliminary experiments to show practical performances of the proposed methods. 1 Introduction A palindrome is a string that reads the same forward and backward. Discovering palindromic structures in strings is a classical, yet important task in combinatorics on words and string algorithmics (e.g., see [4, 8, 13, 1]). A natural extension to palindromes is to allow for a gap between the left and right arms of palindromes. Namely, a string x is called a gapped palindrome if x = wgwR for some strings w, g with |w| ≥ 1 and |g| ≥ 0. Finding gapped palindromes has applications in bioinformatics, such as finding secondary structures of RNA sequences called hairpins [9]. If we further allow for another gap inside either arm, then such a palindrome can be written as wg2 ug1 uR wR or wug1 uR g2 wR for some strings w, g1 , g2 , u with |u| ≥ 1, |g1 | ≥ 0, |g2 | ≥ 0, and |w| ≥ 1. These types of palindromes characterize hairpins with bulges in RNA sequences, known to occur frequently in the secondary structures of RNA sequences [15]. Notice that the special case where |g1 | ≤ 1 and |g2 | = 0 corresponds to usual palindromes, and the special case where |g1 | ≥ 2 and |g2 | = 0 corresponds to gapped palindromes. 1 In this paper, we consider a new class of generalized palindromes where |g1 | ≤ 1 and |g2 | ≥ 1, i.e., palindromes with gaps inside one of its arms. We call such palindromes as single-arm-gapped palindromes (SAGPs). For instance, string abb|ca|cb|bc|bba is an SAGP of this kind, taking w = abb, g1 = ε (the empty string), g2 = ca, and u = cb. We are interested in occurrences of SAGPs as substrings of a given string T . For simplicity, we will concentrate on SAGPs with |g1 | = 0 containing a gap in their left arms. However, slight modification of all the results proposed in this paper can easily be applied to all the other cases. For any occurrence of an SAGP wguuR wR beginning at position b in T , the position b + |wgu| − 1 is called the pivot of the occurrence of this SAGP. This paper proposes various algorithms to solve the problem of computing longest SAGPs for every pivot in a given string T of length n. We classify longest SAGPs into two groups: those which have uuR as a maximal palindrome (type-1 ), and the others (type-2 ). Firstly, we show a naı̈ve O(n2 )-time algorithm for computing type-1 longest SAGPs. Secondly, we present a simple but practical O(n2 )-time algorithm for computing type-1 longest SAGPs based on simple scans over the suffix array [14]. We also show that the running time of this algorithm can be improved by using a dynamic predecessor/successor data structure. If we employ the van Emde Boas tree [16], we achieve O((n + occ 1 ) log log n)-time solution, where occ 1 is the number of type-1 longest SAGPs to output. Finally, we present an O(n + occ 1 )-time solution based on the suffix tree [17]. For type-2 longest SAGPs, we show an O(n+occ 2 )-time algorithm, where occ 2 is the number of type-2 longest SAGPs to output. Combining the last two results, we obtain an optimal O(n + occ)-time algorithm for computing all longest SAGPs, where occ is the number of outputs. We performed preliminary experiments to compare practical performances of our algorithms for finding type-1 longest SAGPs; the naı̈ve algorithm, the O(n2 )-time suffix array based algorithm, and the improved suffix array based algorithm with several kinds of predecessor/successor data structures. All proofs omitted due to lack of space can be found in Appendix. Related work. For a fixed gap length d, one can find all gapped palindromes wgwR with |g| = d in the input string T of length n in O(n) time [9]. Kolpakov and Kucherov [12] showed an O(n + L)-time algorithm to compute long-armed palindromes in T , which are gapped palindromes wgwR such that |w| ≥ |g|. Here, L denotes the number of outputs. They also showed how to compute, in O(n + L) time, length-constrained palindromes which are gapped palindromes wgwR such that the gap length |g| is in a predefined range. Recently, Fujishige et al. [6] proposed online algorithms to compute long-armed palindromes and length-constrained palindromes from a given string T . A gapped palindrome wgwR is an α-gapped palindrome, if |wg| ≤ α|w| for α ≥ 1. Gawrychowski et al. [7] showed that the maximum number of α-gapped palindromes occurring in a string of length n is at most 28αn + 7n. Since long-armed palindromes are 2-gapped palindromes for α = 2, L = O(n) and thus Kolpakov and Kucherov’s algorithm runs in O(n) time. Gawrychowski et al. [7] also proposed an O(αn)-time algorithm to compute all α-gapped palindromes in a given string for any predefined α ≥ 1. We emphasize that none of the above algorithms can directly be applied to computing SAGPs. 2 2 Preliminaries Let Σ = {1, . . . , σ} be an integer alphabet of size σ. An element of Σ∗ is called a string. For any string w, |w| denotes the length of w. The empty string is denoted by ε. Let Σ+ = Σ∗ − {ε}. For any 1 ≤ i ≤ |w|, w[i] denotes the i-th symbol of w. For a string w = xyz, strings x, y, and z are called a prefix, substring, and suffix of w, respectively. The substring of w that begins at position i and ends at position j is denoted by w[i..j] for 1 ≤ i ≤ j ≤ |w|, i.e., w[i..j] = w[i] · · · w[j]. For j > i, let w[i..j] = ε for convenience. For two strings X and Y , let lcp(X, Y ) denote the length of the longest common prefix of X and Y . For any string x, let xR denote the reversed string of x, i.e. xR = x[|x|] · · · x[1]. A string p is called a palindrome if p = pR . Let T be any string of length n. Let p = T [b..e] be a palindromic substring of T . The position i = ⌊ b+e 2 ⌋ is called the center of this palindromic substring p. The palindromic substring p is said to be the maximal palindrome centered at i iff there are no longer palindromes than p centered at i, namely, T [b − 1] 6= T [e + 1], b = 1, or e = n. A string x is called a single-arm-gapped palindrome (SAGP) if x is in the form of either wgucuR wR or wucuR gwR , with some non-empty strings w, g, u ∈ Σ+ and c ∈ Σ ∪ {ε}. For simplicity and ease of explanations, in what follows we consider only SAGPs whose left arms contain gaps and c = ε, namely, those of form wguuR wR . But our algorithms to follow can easily be modified to compute other forms of SAGPs occurring in a string as well. Let b be the beginning position of an occurrence of a SAGP wguuR wR in T , namely T [b..b + 2|wu| + |g| − 1] = wguuR wR . The position i = b + |wgu| − 1 is called the pivot of this occurrence of the SAGP. This position i is also the center of the palindrome uuR . An SAGP wguuR wR for pivot i in string T is represented by a quadruple (i, |w|, |g|, |u|) of integers. In what follows, we will identify the quadruple (i, |w|, |g|, |u|) with the corresponding SAGP wguuR wR for pivot i. For any SAGP x = wguuR wR , let armlen(x) denote the length of the arm of x, namely, armlen(x) = |wu|. A substring SAGP y = wguuR wR for pivot i in a string T is said to be a longest SAGP for pivot i, if for any SAGP y ′ for pivot i in T , armlen(y) ≥ armlen(y ′ ). Notice that there can be different choices of u and w for the longest SAGPs at the same pivot. For instance, consider string ccabcabbace. Then, (7, 1, 3, 2) = c|abc|ab|ba|c and (7, 2, 3, 1) = ca|bca|b|b|ac are both longest SAGPs (with arm length |wu| = 3) for the same pivot 7, where the underlines represent the gaps. Of all longest SAGPs for each pivot i, we regard those that have longest palindromes uuR centered at i as canonical longest SAGPs for pivot i. In the above example, (7, 1, 3, 2) = c|abc|ab|ba|c is a canonical longest SAGP for pivot 7, while (7, 2, 3, 1) = ca|bca|b|b|ac is not. Let SAGP (T ) be the set of canonical longest SAGPs for all pivots in T . In this paper, we present several algorithms to compute SAGP (T ). For an input string T of length n over an integer alphabet of size σ = nO(1) , we perform standard preprocessing which replaces all characters in T with integers from range [1, n]. Namely, we radix sort the original characters in T , and replace each original character by its rank in the sorted order. Since the original integer alphabet is of size nO(1) , the radix sort can be implemented with O(1) number of bucket sorts, taking 3 O(n) total time. Thus, whenever we speak of a string T over an integer alphabet of size nO(1) , one can regard T as a string over an integer alphabet of size n. Tools: Suppose a string T ends with a unique character that does not appear elsewhere in T . The suffix tree [17] of a string T , denoted by STree(T ), is a path-compressed trie which represents all suffixes of T . Then, STree(T ) can be defined as an edge-labelled rooted tree such that (1) Every internal node is branching; (2) The out-going edges of every internal node begin with mutually distinct characters; (3) Each edge is labelled by a non-empty substring of T ; (4) For each suffix s of T , there is a unique leaf such that the path from the root to the leaf spells out s. It follows from the above definition of STree(T ) that if n = |T | then the number of nodes and edges in STree(T ) is O(n). By representing every edge label X by a pair (i, j) of integers such that X = T [i..j], STree(T ) can be represented with O(n) space. For a given string T of length n over an integer alphabet of size σ = nO(1) , STree(T ) can be constructed in O(n) time [5]. For each node v in STree(T ), let str (v) denote the string spelled out from the root to v. According to Property (4), we sometimes identify each position i in string T with the leaf which represents the corresponding suffix T [i..n]. Suppose the unique character at the end of string T is the lexicographically smallest in Σ. The suffix array [14] of string T of length n, denoted SAT , is an array of size n such that SAT [i] = j iff T [j..n] is the ith lexicographically smallest suffix of T for 1 ≤ i ≤ n. The reversed suffix array of T , denoted SA−1 T , is an array of size n such [SA [i]] = i for 1 ≤ i ≤ n. The longest common prefix array of T , denoted that SA−1 T T LCP T , is an array of size n such that LCP T [1] = −1 and LCP T [i] = lcp(T [SAT [i − 1]..n], T [SAT [i]..n]) for 2 ≤ i ≤ n. The arrays SAT , SA−1 T , and LCP T for a given string O(1) T of length n over an integer alphabet of size σ = n can be constructed in O(n) time [10, 11]. For a rooted tree T , the lowest common ancestor LCAT (u, v) of two nodes u and v in T is the deepest node in T which has u and v as its descendants. It is known that after a linear-time preprocessing on the input tree, querying LCAT (u, v) for any two nodes u, v can be answered in constant time [2]. Consider a rooted tree T where each node is either marked or unmarked. For any node v in T , let NMAT (v) denote the deepest marked ancestor of v. There exists a linear-space algorithm which marks any unmarked node and returns NMAT (v) for any node v in amortized O(1) time [18]. Let A be an integer array of size n. A range minimum query RMQ A (i, j) of a given pair (i, j) of indices (1 ≤ i ≤ j ≤ n) asks an index k in range [i, j] which stores the minimum value in A[i..j]. After O(n)-time preprocessing on A, RMQ A (i, j) can be answered in O(1) time for any given pair (i, j) of indices [2]. Let S be a set of m integers from universe [1, n], where n fits in a single machine word. A predecessor (resp. successor) query for a given integer x to S asks the largest (resp. smallest) value in S that is smaller (resp. larger) than x. Let u(m, n), q(m, n) and s(m, n) denote the time for updates (insertion/deletion) of elements, the time for predecessor/successor queries, and the space of a dynamic predecessor/successor data structure. Using a standard balanced binary search tree, we have u(m, n) = q(m, n) = O(log m) time and s(n, m) = O(m) space. The Y-fast trie [19] achieves u(m, n) = q(m, n) = O(log log m) expected time and s(n, m) = O(m) space, while the van Emde 4 Boas tree [16] does u(m, n) = q(m, n) = O(log log m) worst-case time and s(n, m) = O(n) space. 3 Algorithms for computing canonical longest SAGPs In this section, we present several algorithms to compute the set SAGP (T ) of canonical longest SAGPs for all pivots in a given string T . A position i in string T is said to be of type-1 if there exists a SAGP wguuR wR such that uuR is the maximal palindrome centered at position i, and is said to be of type-2 otherwise. For example, consider T = baaabaabaacbaabaabac of length 20. Position 13 of T is of type-1, since there are canonical longest SAGPs (13, 4, 4, 2) = abaa|baac|ba|ab|aaba and (13, 4, 1, 2) = abaa|c|ba|ab|aaba for pivot 13, where ba|ab is the maximal palindrome centered at position 13. On the other hand, Position 6 of T is of type-2; the maximal palindrome centered at position 6 is aaba|abaa but there are no SAGPs in the form of wgaaba|abaawR for pivot 6. The canonical longest SAGPs for pivot 6 is (6, 1, 1, 3) = a|a|aba|aba|a. Let Pos 1 (T ) and Pos 2 (T ) be the sets of type-1 and type-2 positions in T , respectively. Let SAGP (T, i) be the subset of S SAGP (T ) whose elements are canonical longest SAGPs for pivot i. Let SAGP 1 (T ) = i∈Pos 1 (T ) SAGP(T, i) and SAGP 2 (T ) = S i∈Pos 2 (T ) SAGP (T, i). Clearly SAGP 1 (T ) ∪ SAGP 2 (T ) = SAGP (T ) and SAGP 1 (T ) ∩ SAGP 2 (T ) = ∅. The following lemma gives an useful property to characterize the type-1 positions of T . Lemma 1. Let i be any type-1 position of a string T of length n. Then, a SAGP wguuR wR is a canonical longest SAGP for pivot i iff uuR is the maximal palindrome centered at i and wR is the longest non-empty prefix of T [i + |uR | + 1..n] such that w occurs at least once in T [1..i − |u| − 1]. We define two arrays Pals and LMost as follows: Pals[i] = {r | T [i − r + 1..i + r] is a maximal palindrome in T for pivot i}. LMost[c] = min{i | T [i] = c} for c ∈ Σ. By Lemma 1, a position i in T is of type-1 iff LMost[i + Pals[i] + 1] < i − Pals[i]. Lemma 2. Given a string T of length n over an integer alphabet of size nO(1) , we can determine whether each position i of T is of type-1 or type-2 in a total of O(n) time and space. By Lemma 1 and Lemma 2, we can consider an algorithm to compute SAGP (T ) by computing SAGP 1 (T ) and SAGP 2 (T ) separately, as shown in Algorithm 1. In this algorithm, we also construct an auxiliary array NextPos defined by NextPos[i] = min{j | i < j, T [i] = T [j]} for each 1 ≤ i ≤ n, which will be used in Section 3.2. Lemma 3. Algorithm 1 correctly computes SAGP (T ). In the following subsections, we present algorithms to compute SAGP 1 (T ) and SAGP 2 (T ) respectively, assuming that the arrays Pals, LMost and NextPos have already been computed. 5 Algorithm 1: computing SAGP (T ) Input: string T of length n Output: SAGP (T ) 1 compute Pals; /* Algorithm 3 in Appendix */ 2 for i = n downto 1 do 3 c = T [i]; NextPos[i] = LMost[c]; LMost[c] = i; 4 5 6 7 8 9 10 for i = 1 to n do if LMost[i + Pals[i] + 1] < i − Pals[i] then Pos 1 (T ) = Pos 1 (T ) ∪ {i}; /* position i is of type-1 */ else Pos 2 (T ) = Pos 2 (T ) ∪ {i}; /* position i is of type-2 */ compute SAGP 1 (T ); compute SAGP 2 (T ); 3.1 /* Section 3.1 */ /* Section 3.2 */ Computing SAGP 1 (T ) for type-1 positions In what follows, we present several algorithms corresponding to the line 9 in Algorithm 1. Lemma 1 allows us greedy strategies to compute the longest prefix wR of T [i + Pals[i] + 1..n] such that w occurs in T [1..i − Pals[i] − 1]. Naı̈ve quadratic-time algorithm with RMQs. Let T ′ = T $T R #. We construct the suffix array SAT ′ , the reversed suffix array SA−1 T′ , ′ ′ and the LCP array LCP T for T . For each Pals[i] in T , for each gap size G = 1, . . . , i − Pals[i] − 1, we compute W = lcp(T [1..i − Pals[i] − G]R , T [i + Pals[i] + 1..n]) in O(1) time by an RMQ on the LCP array LCP T ′ . Then, the gap sizes G with largest values of W give all longest SAGPs for pivot i. Since we test O(n) gap sizes for every pivot i, it takes a total of O(n2 ) time to compute SAGP 1 (T ). The working space of this method is O(n). Simple quadratic-time algorithm based on suffix array. ′ R ′ Given a string T , we construct SAT ′ , SA−1 T ′ , and LCP T for string T = T $T # as in the previous subsection. Further, for each position n + 2 ≤ j ≤ 2n + 1 in the reversed part T R of T ′ = T $T R #, let op(j) denote its “original” position in the string T , namely, let op(j) = 2n − j + 2. Let e be any entry of SAT ′ such that SAT ′ [e] ≥ n + 2. We associate each such entry of SAT ′ with op(SAT ′ [e]). Let SAT ′ [k] = i + Pals[i] + 1, namely, the kth entry of SAT ′ corresponds to the suffix T [i + Pals[i] + 1..n] of T . Now, the task is to find the longest prefix wR of T [i + Pals[i] + 1..n] such that w occurs completely inside T [1..i − Pals[i] − 1]. Let b = i − Pals[i] + 1, namely, b is the beginning position of the maximal palindrome uuR centered at i. We can find w for any maximal SAGP wguuR wR for pivot i by traversing SAT ′ from the kth entry forward and backward, until we encounter the nearest entries p < k and q > k on SAT ′ such that op(SAT ′ [p]) < b − 1 and op(SAT ′ [q]) < b − 1, if they 6 exist. The size W of w is equal to max{min{LCP T ′ [p + 1], . . . , LCP T ′ [k]}, min{LCP T ′ [k + 1], . . . , LCP T ′ [q]}}. (1) Assume w.l.o.g. that p gives a larger lcp value with k, i.e. W = min{LCP T ′ [p + 1], . . . , LCP T ′ [k]}. Let s be the largest entry of SAT ′ such that s < p and LCP T ′ [s+1] < W . Then, any entry t of SAT ′ such that s < t ≤ p+1 and op(SAT ′ [t]) < b−1 corresponds to an occurrence of a longest SAGP for pivot i, with gap size b − op(SAT ′ [t]) − 1. We output longest SAGP (i, W, b − op(SAT ′ [t]) − 1, |u|) for each such t. The case where q gives a larger lcp value with k, or p and q give the same lcp values with k can be treated similarly. We find p and s by simply traversing SAT ′ from k. Since the distance from k to s is O(n), the above algorithm takes O(n2 ) time. The working space is O(n). Algorithm based on suffix array and predecessor/successor queries. Let occ 1 = |SAGP 1 (T )|. For any position r in T , we say that the entry j of SAT ′ is active w.r.t. r iff op(SAT ′ [j]) < r − 1. Let Active(r) denote the set of active entries of SAT ′ for position r, namely, Active(r) = {j | op(SAT ′ [j]) < r − 1}. Let t1 = p, and let t2 , . . . , th be the decreasing sequence of entries of SAT ′ which correspond to the occurrences of longest SAGPs for pivot i. Notice that for all 1 ≤ ℓ ≤ h we have op(SAT ′ [tℓ ]) < b − 1 and hence tℓ ∈ Active(b), where b = i − |u| + 1. Then, finding t1 reduces to a predecessor query for k in Active(b). Also, finding tℓ for 2 ≤ ℓ ≤ h reduces to a predecessor query for tℓ−1 in Active(b). To effectively use the above observation, we compute an array U of size n from P als such that U [b] stores a list of all maximal palindromes in T which begin at position b if they exist, and U [b] is nil otherwise. U can be computed in O(n) time e.g., by bucket sort. After computing U , we process b = 1, . . . , n in increasing order. Assume that when we process a certain value of b, we have maintained a dynamic predecessor/successor query data structure for Active(b). The key is that the same set Active(b) can be used to compute the longest SAGPs for every element in U [b], and hence we can use the same predecessor/successor data structure for all of them. After processing all elements in U [b], we insert all elements of Active(b − 1) \ Active(b) to the predecessor/successor data structure. Each element to insert can be easily found in constant time. Since we perform O(n + occ 1 ) predecessor/successor queries and O(n) insertion operations in total, we obtain the following theorem. Theorem 1. Given a string T of size n over an integer alphabet of size σ = nO(1) , we can compute SAGP 1 (T ) in O(n(u(n, n)+q(n, n))+occ 1 ·q(n, n)) time with O(n+s(n, n)) space by using the suffix array and a predecessor/successor data structure, where occ 1 = |SAGP 1 (T )|. Since every element of Active(b) for any b is in range [1, 2n + 2], we can employ the van Emde Boas tree [16] as the dynamic predecessor/successor data structure using O(n) total space. Thus we obtain the following theorem. Theorem 2. Given a string T of size n over an integer alphabet of size σ = nO(1) , we can compute SAGP 1 (T ) in O((n + occ 1 ) log log n) time and O(n) space by using the suffix array and the van Emde Boas tree, where occ 1 = |SAGP 1 (T )|. 7 Optimal-time algorithm based on suffix tree. In this subsection, we show that the problem can be solved in optimal time and space, using the following three suffix trees regarding the input string T . Let T1 = STree(T $T R #) for string T $T R # of length 2n + 2, and T2 = STree(T R #) of length n + 1. These suffix trees T1 and T2 are static, and thus can be constructed offline, in O(n) time for an integer alphabet. We also maintain a growing suffix tree T2′ = STree(T R [k..n])#) for decreasing k = n, . . . , 1. Lemma 4. Given T2 = STree(T R #), we can maintain T2′ = STree(T R [k..n]#) for decreasing k = n, . . . , 1 incrementally, in O(n) total time for an integer alphabet of size nO(1) . Theorem 3. Given a string T of length n over an integer alphabet of size σ = nO(1) , we can compute SAGP 1 (T ) in optimal O(n + occ 1 ) time and O(n) space by using suffix trees, where occ 1 = |SAGP 1 (T )|. Proof. We first compute the array U . Consider an arbitrary fixed b, and let uuR be a maximal palindrome stored in U [b] whose center is i = b+|u|−1. Assume that we have a growing suffix tree T2′ for string T R [n−b+1..n]# which corresponds to the prefix T [1..b] of T of size b. We use a similar strategy as the suffix array based algorithms. For each position 2n − b + 2 ≤ j ≤ 2n + 1 in string T ′ = T $T R #, 1 ≤ op(j) ≤ b − 2. We maintain the NMA data structure over the suffix tree T1 for string T ′ so that all the ancestors of the leaves whose corresponding suffixes start at positions 2n − b + 2 ≤ j ≤ 2n + 1 are marked, and any other nodes in T1 remain unmarked at this step. As in the suffix-array based algorithms, the task is to find the longest prefix wR of T [i + |uR | + 1..n] such that w occurs completely inside T [1..b − 2] = T [1..i − |u| − 1]. In so doing, we perform an NMA query from the leaf i + |uR | + 1 of T1 , and let v be the answer to the NMA query. By the way how we have maintained the NMA data structure, it follows that str (v) = wR . To obtain the occurrences of w in T [1..b − 2], we switch to T2′ , and traverse the subtree rooted at v. Then, for any leaf ℓ in the subtree, (i, |str (v)|, b − op(ℓ), |u|) is a canonical longest SAGP for pivot i (see also Fig. 10 in Appendix). After processing all the maximal palindromes in U [b], we mark all unmarked ancestors of the leaf 2n−b of T1 in a bottom-up manner, until we encounter the lowest ancestor that is already marked. This operation is a preprocessing for the maximal palindromes in U [b + 1], as we will be interested in the positions between 1 and op(2n − b) = b − 1 in T . In this preprocessing, each unmarked node is marked at most once, and each marked node will remain marked. In addition, we update the growing suffix tree T2′ by inserting the new leaf for T R [n − b..n]#. We analyze the time complexity of this algorithm. Since all maximal palindromes in U [b] begin at position b in T , we can use the same set of marked nodes on T1 for all of those in U [b]. Thus, the total cost to update the NMA data structure for all b’s is linear in the number of unmarked nodes that later become marked, which is O(n) overall. The cost for traversing the subtree of T2′ to find the occurrences of w can be charged to the number of canonical longest SAGPs to output for each pivot, thus it takes O(occ 1 ) time for all pivots. Updating the growing suffix tree T2′ takes overall O(n) time by Lemma 4. 8 What remains is how to efficiently link the new internal node introduced in the growing suffix tree T2′ , to its corresponding node in the static suffix tree T1 for string T ′ . This can be done in O(1) time using a similar technique based on LCA queries on T1 , as in the proof of Lemma 4. Summing up all the above costs, we obtain O(n + occ 1 ) optimal running time and O(n) working space. 3.2 Computing SAGP 2 (T ) for type-2 positions In this subsection, we present an algorithm to compute SAGP 2 (T ) in a given string T , corresponding to the line 10 in Algorithm 1. Lemma 5. Every (not necessarily longest) SAGP for pivot i must end at one of the positions between i + 2 and i + Pals[i]. Lemma 6. For any type-2 position i in string T , if wguuR wR is a canonical longest SAGP for pivot i, then |w| = 1. For every type-2 position i in T , let u = T [i..i+ Pals[i]]. By Lemma 6, any canonical longest SAGP is of the form cguuR c for c ∈ Σ. For each 2 ≤ k ≤ Pals[i], let ck = uR [k], R and let uR k be the proper prefix of u of length k − 1. Now, observe that the largest value of k for which LMost[ck ] ≤ i − |uk | − 1 corresponds to a canonical longest SAGP for pivot i, namely, ck gk uk uR k ck is a canonical longest SAGP for pivot i, where gk = T [LMost[ck ]+1..i−|uk |]. In order to efficiently find the largest value of such, we consider a function findR(t, i) defined by findR(t, i) = min{r | t ≤ r < i, T [l] = T [r] for 1 ≤ ∃l < r} ∪ {+∞}. Lemma 7. For any type-2 position i in T , quadruple (i, 1, r − LMost[T [r]], i − r) represents a canonical longest SAGP for pivot i, where r = findR(i − Pals[i] + 1, i) 6= ∞. Moreover, its gap is the longest among all the canonical longest SAGPs for pivot i. By Lemma 7, we can compute a canonical longest SAGP for any type-2 pivot i in O(1) time, assuming that the function findR(t, i) returns a value in O(1) time. We define an array FindR of size n by FindR[t] = min{r | t ≤ r, T [l] = T [r] for 1 ≤ ∃l < r} ∪ {+∞}, (2) for 1 ≤ t ≤ n. If the array FindR has already been computed, then findR(t, i) can be obtained in O(1) time by findR(t, i) = FindR[t] if FindR[t] < i, and +∞ otherwise. Algorithm 2 shows a pseudo-code to compute FindR. Table 2 in Appendix shows an example. Lemma 8. Algorithm 2 correctly computes the array FindR in O(n) time and space. By Lemma 8, we can compute SAGP 2 (T ) for type-2 positions as follows. Theorem 4. Given a string T of length n over an integer alphabet of size nO(1) , we can compute SAGP 2 (T ) in O(n + occ 2 ) time and O(n) space, where occ 2 = |SAGP 2 (T )|. 9 Algorithm 2: constructing the array FindR Input: string T of length n Output: array FindR of size n 1 Let Occ 1 and Occ 2 be arrays of size ΣT initialized by +∞; 2 Let FindR be an arrays of size n, and let Stack be an empty stack; 3 min in = +∞; 4 for i = n downto 1 do 5 c = T [i]; Occ 2 [c] = Occ 1 [c]; Occ 1 [c] = i; 6 min in = min{min in , Occ 2 [c]}; 7 Stack .push(i); 8 while Stack is not empty and LMost[T [Stack .top]] ≥ i do Stack .pop(); 9 min out = Stack .top if Stack is not empty else +∞; 10 FindR[i] = min{min in , min out } Proof. For a given T , we first compute the array FindR by Algorithm 2. By Lemma 7, we can get a canonical longest SAGP x1 = (i, 1, |g1 |, Pals[i] − r) if Pals[i] − r ≥ 1, in O(1) time by referring to LMost and FindR. Note that x1 is the one whose gap |g1 | is the longest. Let b1 = i − Pals[i] + r − |g1 | be the beginning position of x1 in T . Then the next shorter canonical longest SAGP for the same pivot i begins at position b2 = NextPos[b1 ]. By repeating this process bj+1 = NextPos[bj ] while the gap size |gj | = i − Pals[i] + r − bj is positive, we obtain all the canonical longest SAGPs for pivot i. Overall, we can compute all canonical longest SAGPs for all pivots in T in O(n + occ 2 ) time. The space requirement is clearly O(n). We now have the main theorem from Theorem 3, Lemma 2, Lemma 3, and Theorem 4 as follows. Theorem 5. Given a string T of length n over an integer alphabet of size nO(1) , Algorithm 1 can compute SAGP (T ) in optimal O(n + occ) time and O(n) space, where occ = |SAGP (T )|. 4 Experiments In this section, we show some experimental results which compare performance of our algorithms for computing SAGP 1 (T ). We implemented the naı̈ve quadratic-time algorithm (Naı̈ve), the simple quadratic-time algorithm which traverses suffix arrays (Traverse), and three versions of the algorithm based on suffix array and predecessor/successor data structure, each employing red-black trees (RB tree), Y-fast tries (Y-fast trie), and van Emde Boas trees1 (vEB tree), as the predecessor/successor data structure. We implemented all these algorithms with Visual C++ 12.0 (2013), and performed all experiments on a PC (Intel c Xeon CPU W3565 3.2GHz, 12GB of memory) running 1 We modified a van Emde Boas tree implementation https://code.google.com/archive/p/libveb/ so it works with Visual C++. 10 from on Windows 7 Professional. In each problem, we generated a string randomly and got the average time for ten times attempts. Table 1: Running times (in milli-sec.) on randomly generated strings of length 10000, 50000, and 100000 with |Σ| = 10. n 10000 50000 100000 Naı̈ve 247.2 7661.0 32933.2 Traverse 3.8 18.6 38.7 RB tree 6.3 37.2 80.3 vEB tree 85.7 128.9 191.9 Y-fast trie 11.7 62.6 133.7 We tested all programs on strings of lengths 10000, 50000, and 100000, all from an alphabet of size |Σ| = 10. Table 1 shows the results . From Table 1, we can confirm that Traverse is the fastest, while Naı̈ve is by far the slowest. We further tested the algorithms on larger strings with |Σ| = 10. In this comparison, we excluded Naı̈ve as it is too slow. The results are shown in Fig. 1. As one can see, Traverse was the fastest for all lengths. We also conducted the same experiments varying alphabet sizes as 2, 4, and 20, and obtained similar results as the case of alphabet size 10. To verify why Traverse runs fastest, we measured the average numbers of suffix array entries which are traversed, per pivot and output (i.e., canonical longest SAGP). Fig. 2 shows the result. We can observe that although in theory O(n) entries can be traversed per pivot and output for a string of length n, in both cases the actual number is far less than O(n) and grows very slowly as n increases. This seems to be the main reason why Traverse is faster than RB tree, vEB tree, and Y-fast trie which use sophisticated but also complicated predecessor/successor data structures. 300 Traverse RB tree vEB tree Y-fast trie 30000 25000 20000 # of traversed entries Running times [ms] 35000 15000 10000 5000 0 1 2 3 4 5 6 7 8 per pivot per output 250 200 150 100 50 0 9 10 1 6 2 3 4 5 6 7 8 9 10 6 Text length [×10 ] Text length [×10 ] Figure 1: Running times (in milli-sec.) on randomly generated strings of length from 1000000 to 10000000 with |Σ| = 10. Figure 2: Average numbers of traversed entries of suffix array per pivot and per output on randomly generated strings. References [1] A. Apostolico, D. Breslauer, and Z. Galil. Parallel detection of all palindromes in a string. Theor. Comput. Sci., 141(1&2):163–173, 1995. [2] M. A. Bender and M. Farach-Colton. The LCA problem revisited. In LATIN, pages 88–94, 2000. 11 [3] M. Crochemore, L. Ilie, C. S. Iliopoulos, M. Kubica, W. Rytter, and T. Walen. Computing the longest previous factor. Eur. J. Comb., 34(1):15–26, 2013. [4] X. Droubay and G. Pirillo. Palindromes and Sturmian words. Theor. Comput. Sci., 223(1-2):73–85, 1999. [5] M. Farach-Colton, P. Ferragina, and S. Muthukrishnan. On the sorting-complexity of suffix tree construction. J. ACM, 47(6):987–1011, 2000. [6] Y. Fujishige, M. Nakamura, S. Inenaga, H. Bannai, and M. Takeda. Finding gapped palindromes online. In IWOCA 2016, 2016. To appear. [7] P. Gawrychowski, T. I, S. Inenaga, D. Köppl, and F. Manea. Efficiently finding all maximal α-gapped repeats. In STACS 2016, pages 39:1–39:14, 2016. [8] A. Glen, J. Justin, S. Widmer, and L. Q. Zamboni. Palindromic richness. Eur. J. Comb., 30(2):510–531, 2009. [9] D. Gusfield. Algorithms on Strings, Trees, and Sequences. Cambridge University Press, 1997. [10] J. Kärkkäinen, P. Sanders, and S. Burkhardt. Linear work suffix array construction. J. ACM, 53(6):918–936, 2006. [11] T. Kasai, G. Lee, H. Arimura, S. Arikawa, and K. Park. Linear-time longestcommon-prefix computation in suffix arrays and its applications. In CPM 2001, pages 181–192, 2001. [12] R. Kolpakov and G. Kucherov. Searching for gapped palindromes. Theor. Comput. Sci., 410(51):5365–5373, 2009. [13] G. K. Manacher. A new linear-time on-line algorithm for finding the smallest initial palindrome of a string. J. ACM, 22(3):346–351, 1975. [14] U. Manber and E. W. Myers. Suffix arrays: A new method for on-line string searches. SIAM J. Comput., 22(5):935–948, 1993. [15] Y.-Z. Shi, F.-H. Wang, Y.-Y. Wu, and Z.-J. Tan. A coarse-grained model with implicit salt for RNAs: Predicting 3D structure, stability and salt effect. The Journal of Chemical Physics, 141(10), 2014. [16] P. van Emde Boas. Preserving order in a forest in less than logarithmic time. In FOCS, pages 75–84, 1975. [17] P. Weiner. Linear pattern matching algorithms. In 14th Annual Symposium on Switching and Automata Theory, pages 1–11, 1973. [18] J. Westbrook. Fast incremental planarity testing. In ICALP, pages 342–353, 1992. [19] D. E. Willard. Log-logarithmic worst-case range queries are possible in space Θ(N ). Information Processing Letters, 17:81–84, 1983. 12 Appendix A Proofs Here, we present proofs that are omitted due to lack of space. A.1 Proof of Lemma 1 Proof. (⇒) Assume on the contrary that uuR is not the maximal palindrome centered at i, and let xuuR xR be the maximal palindrome centered at position i with |x| ≥ 1. If wR = xR , then since position i is of type-1, there must be a SAGP w′ g′ xuuR xR w′R with |w′ | ≥ 1 for pivot i, but this contradicts that wguuR wR is a longest SAGP for pivot i. Hence xR is a proper prefix of wR . See Fig. 3. Let xR w′′R = wR . Since w′′R is a non-empty suffix of wR , w′′ is a non-empty prefix of w. This implies that there exists a SAGP w′′ g′′ xuuR xR w′′R for pivot i. However, this contradicts that wguuR wR is a canonical longest SAGP for pivot i. Consequently, uuR is the maximal palindrome centered at i, and now it immediately follows that wR is the longest non-empty prefix of T [i + |uR | + 1..n] such that w occurs at least once in T [1..i − |u| − 1]. Figure 3: Illustration for a necessary condition for a canonical longest SAGP (proof of (⇒) for Lemma 1): wguuR wR is a canonical longest SAGP for pivot i. For the same pivot i, there cannot exist a SAGP w′′ g′′ xuuR xR w′′R where xuuR xR is the maximal palindrome centered at i and w′′ is a prefix of w, since it contradicts that wguuR wR is a canonical longest SAGP for i. (⇐) First, we show that wguuR wR is a longest SAGP for pivot i. See Fig. 4. Let be any proper suffix of u, and assume on the contrary that there exists a SAGP w′ g′ u′ u′R w′R for pivot i such that |w′ u′ | > |wu|. Since |u′ | < |u|, the occurrence of wR at position i + |uR | is completely contained in the occurrence of w′R at position i + |u′R |. This implies that any occurrence of w′ to the left of u′ u′R completely contains an occurrence of w, reflected from the occurrence of wR in w′R . However, the character a that immediately precedes the occurrence of w in w′ must be distinct from the character b that immediately follows wR , namely a 6= b. This contradicts that w′ g ′ u′ u′R w′R is a SAGP for pivot i. Hence, wguuR wR is a longest SAGP for pivot i. Since uuR is the maximal palindrome centered at i, we cannot extend u to its left nor uR to its right for the same center i. Thus, wguuR wR is a canonical longest SAGP for pivot i. u′ 13 Figure 4: Illustration for a sufficient condition for a canonical longest SAGP (proof of (⇐) for Lemma 1): uuR is the maximal palindrome centered at i and wR is the longest prefix of T [i + |uR wR | + 1..n] such that w occurs at least once in T [1..i − |u| − 1], and thus c 6= b. Then, there cannot exist a longer SAGP w′ g′ u′ u′R w′R for the same pivot i, since a 6= b. A.2 Proof of Lemma 2 Proof. let uuR be the maximal palindrome centered at i. Observe that, by Lemma 1, i is a type-1 position iff the character a = T [i + |uR | + 1] which immediately follows uR occurs in T [1..i − |u| − 1]. Recall that |uR | = |u| = Pals[i]. Let ΣT be the set of distinct characters occurring in T . We construct an array LMost of size |ΣT | such that for each 1 ≤ j ≤ |ΣT |, LMost[j] stores the leftmost occurrence of the lexicographically jth character in T . Using the above observation and the array LMost, we can determine in O(1) time whether a given position i of T is of type-1 or type-2 by LMost[i+Pals[i]+1] < i − Pals[i]. We can sort the characters in ΣT in O(n) by constructing SAT in O(n) time and space. A.3 Proof of Lemma 3 Proof. In line 1, we firstly compute an array Pals. Pals[i] stores radius r of maximal palindrome centered at i. We can compute Pals in O(n) time and space applying Manacher’s algorithm [13]. We show how to compute Pals in Algorithm 3. In the first for-loop, we construct auxiliary arrays LMost and NextPos. The correctness of the computation of these arrays is obvious. We use NextPos when computing SAGP 2 . In line 6, since we correctly determine which each position of T is of type-1 or type-2 by Lemma 2, we must compute Pos 1 (T ) and Pos 2 (T ) in the second forloop. Therefore, by referring each element of Pos 1 (T ) and Pos 2 (T ) respectively, we can compute SAGP 1 (T ) and SAGP 2 (T ), namely SAGP (T ). A.4 Proof of Lemma 4 Proof. We also use SAT R # and SA−1 in our algorithm, and throughout this proof we abbreviate SAT R # as SA and SA−1 as SA−1 for simplicity. Let PLV and NLV be T R# arrays of size n + 1 each, such that for every 1 ≤ j ≤ n + 1, PLV [j] = max({j ′ | 1 ≤ j ′ < j, SA[j ′ ] > SA[j]} ∪ {−∞}), NLV [j] = min({j ′ | j < j ′ ≤ n + 1, SA[j ′ ] > SA[j]} ∪ {∞}). 14 Algorithm 3: computing Pals /* proposed by Manacher [13] */ Input: string T of length n Output: Pals /*Pals[i] stores the maximal even palindrome for pivot i*/ 1 Pals[0] = 0; 2 i = 2; c = 1; r = 0; 3 while c ≤ n do 4 j = 2 ∗ c − j + 1; 5 while T [i] = T [j] do 6 i + +; j − −; r + +; 7 8 9 10 11 12 13 14 15 16 Pals[c] = r; d = 1; while d ≤ r do rl = Pals[c − d]; if rl = r − d then break; Pals[c + d] = min{r − d, rl }; d + +; if d > r then i + +; r = 0; else r = rl ; c = c + d; Intuitively, PLV [j] and NLV [j] indicate the entries of SA that correspond to the lexicographically closest suffixes to the left and to the right of the suffix T R [SA[j]..n]# which occur positions larger than b, respectively. If such entries do not exist, then let PLV [j] = −∞ and NLV [j] = ∞. See Fig. 5 for concrete examples of PLV and NLV arrays. Suppose we have constructed T2′ = STree(T R [k + 1..n]#) up to position k + 1, and we wish to update it with the new character T R [k] at position k. What is required here is to insert a new leaf corresponding to the suffix T R [k..n]# to the suffix tree. If we use a variant of Weiner’s algorithm [17], we can do this in O(log σ) (amortized) time, but this becomes O(log n) for integer alphabets of size σ = nO(1) , and thus it is not enough for our goal. To achieve O(1) update time per character, we utilize the power of the full suffix tree T2 = STree(T R #) and three arrays SA, SA−1 , PLV , and NLV . In what follows, we focus on the case where PLV [SA−1 [k]] 6= −∞ and NLV [SA−1 [k]] 6= ∞. The case where PLV [SA−1 [k]] = ∞ or NLV [SA−1 [k]] = ∞ is simpler and can be treated similarly. An key observation is that there is a one-to-one correspondence between every leaf of STree(T R [k + 1..n]#) and an entry of SA which stores a position in T R # which is larger than k. Hence, SA[PLV [SA−1 [k]]] and SA[NLV [SA−1 [k]]] will be, respectively, the left and right neighboring leaves of the new leaf k in the updated suffix tree STree(T R [k..n]#). Given the new position k, we access SA[SA−1 [k]] which stores the kth suffix T R [k..n]#. Then we compute the following values L and R: L = lcp((T R #)[SA[PLV [SA−1 [k]]..n + 1]], (T R #)[k..n + 1]), R = lcp((T R #)[k..n + 1], (T R #)[SA[NLV [SA−1 [k]]..n + 1]]). 15 Figure 5: Illustration for the proof of Lemma 4. Consider string T = ccabaabc. Here, we illustrate incremental construction of the growing suffix tree T2′ for its reversed string T R # = cbaabacc#. Assume we have constructed T2′ = STree(T R [5..8]#) = STree(bacc#), and we are to insert a new leaf for the next suffix T R [4..8]# = abacc# starting at position 4 in T R #. SA−1 [4] = 3, hence we focus on the suffixes of T R # starting at positions SA[PLV [3]] = SA[1] = 9 and SA[NLV [3]] = SA[4] = 6. Since lcp(T R [9..8]#, T R [4..8]#) = lcp(#, abacc#) = 0 < lcp(T R [4..8]#, T R [6..8]#) = lcp(abacc#, acc#) = 1, we split the incoming edge of the leaf SA[4] = 6 and insert the new leaf SA[3] = 4 as the left neighbor of the leaf 6. Depending on the values of L and R, we have the following three cases. • If L > R, then leaf SA[PLV [SA−1 [k]]] will be the left neighbor of the new leaf b in the updated suffix tree. Thus, we split the in-coming edge to leaf SA[PLV [SA−1 [k]]] accordingly, and insert the new leaf k. • If L < R, then leaf SA[NLV [SA−1 [k]]] will be the right neighbor of leaf k in the updated suffix tree. Thus, we split the in-coming edge to leaf SA[NLV [SA−1 [k]]] accordingly, and insert the new leaf k. • If L = R, then leaf SA[PLV [SA−1 [k]]] will be the left neighbor of the new leaf k and SA[NLV [SA−1 [k]]] will be the right neighbor of leaf k in the updated suffix tree. Thus, we simply insert the new leaf as a child of the parent of leaves SA[PLV [SA−1 [k]]] and SA[NLV [SA−1 [k]]]. We then associate the new leaf k with the SA−1 [k]-th entry of SA so that later, we can access to this leaf from SA[SA−1 [k]] in O(1) time. See Fig. 5 for a concrete example on how we insert a new leaf to the growing suffix tree. Let us analyze the efficiency of our algorithm. Given SA, PLV [j] and NLV can be constructed in O(n) time [3]. Then, given a position k in string T R #, we can access the 16 leaves SA[PLV [SA−1 [k]]] and SA[NLV [SA−1 [k]]] of the full suffix tree T2 = STree(T R #) in O(1) time using SA, SA−1 , PLV , and NLV arrays. The values of L and R can be computed in O(1) time by two LCA queries on the full suffix tree T2 . In each of the three cases above, it takes O(1) to insert the new leaf (Notice that we do not have to maintain balanced search trees for branching nodes, since the leaves are sorted by being associated with the corresponding entries of SA). Thus, it takes O(1) time to insert a new leaf to the growing suffix tree T2′ . This completes the proof. A.5 Proof of Lemma 5 Figure 6: Illustration for Lemma 5. Proof. See Fig. 6. By definition, it is clear that any SAGP for pivot i must end at position i + 2 or after that. Now, assume on the contrary that there exists a SAGP w′ g′ u′ u′R w′R for pivot i such that i + |u′R w′R | > i + |uR | (it ends after position i + |uR |). Recall that since i is a type-2 position, we have |u′ | < |u|. Let wR be the suffix of w′R of size |u′R w′R | − |uR |. Then, there exists a SAGP wguuR wR for pivot i where |g| = |g′ | and uuR is the maximal palindrome centered at i. However, this contradicts that i is a type-2 position. Hence, any SAGP for pivot i must end at position i + |uR | or before that. A.6 Proof of Lemma 6 Figure 7: Illustration for Lemma 6. R Proof. Let x1 = w1 g1 u1 uR 1 w1 be a canonical longest SAGP for pivot i, and on the contrary, suppose that |w1 | ≥ 2. See also Fig 7. Then we can rewrite w1 = w2 w1′ for two non-empty strings w2 and w1′ . Let uuR be the maximal palindrome centered at i. 17 R R Since the position i is type-2, uR 1 w1 is a prefix of u by Lemma 5, so that w1 u1 is a ′ suffix of u. Moreover, let u2 = w1 u1 and g2 be a string satisfying g2 w1′ = w1′ g1 . Then R R ′ ′ R ′ R ′R R R ′R R x2 = w2 g2 u2 uR 2 w2 = w2 g2 w1 u1 u2 w2 = w2 g2 w1 u1 u1 w1 w2 = w2 w1 g1 u1 u1 w1 w2 = ′R R R R w1 g1 u1 uR 1 w1 w2 = w1 g1 u1 u1 w1 = x1 , that shows x2 is also a SAGP for pivot i. Because armlen(x2 ) = |w2 u2 | = |w1 u1 | = armlen(x1 ), x2 is also a longest SAGP for pivot i. Because u2 = w1′ u1 and w1′ 6= ε, we have |u2 | < |u1 |, which contradicts that x1 is a canonical longest SAGP for pivot i. A.7 Proof of Lemma 7 Figure 8: Illustration for Lemma 7. Proof. See Fig. 8. Let t be the beginning position of u in T , namely, t = i − |u| + 1. Let r = findR(t, i) < ∞, and let c = T [r]. Then by definition of findR(t, i), there exists 1 ≤ l < r satisfying T [l] = c. Therefore, x = (i, 1, r − l, i − r) is a SAGP for pivot i. Moreover, x is canonical longest SAGP because r is minimized, so that |u1 | = i − r is maximized while |w| is always 1. Recall that LMost[c] is the leftmost position l satisfying T [l] = c. Hence, the gap size of the canonical longest SAGP (i, 1, r − LMost[T [r]], i − r) is the longest. A.8 Proof of Lemma 8 Proof. The correctness of the computation of LMost and NextPos is obvious. Let min in [t] (resp. min out [t]) be the value of min in (reps. min out ) when i = t in the second for-loop. We will verify the following loop invariants min out [t] = min{r | t ≤ r, T [l] = T [r] for 1 ≤ ∃l < t} ∪ {+∞}, (3) min in [t] = min{r | t ≤ r, T [l] = T [r] for t ≤ ∃l < r} ∪ {+∞}, (4) which immediately imply Eq. (2), because FindR[t] = min{min out [t], min in [t]} in the last line. Eq. (4) is derived from the loop invariants Occ 1 [c] = min{j | T [j] = c, t ≤ j} ∪ {+∞}, Occ 2 [c] = min{j | T [j] = c, Occ 1 [c] < j} ∪ {+∞}, 18 for any c ∈ ΣT . On the other hand, Eq. (3) can be rewritten as min out [t] = min{r | t ≤ r, c = T [r] for some c ∈ ΣT with LMost[c] < t} ∪ {+∞} = min{r | t ≤ r, LMost [T [r]] < t} ∪ {+∞} = min{r | LMost[T [r]] < t ≤ r} ∪ {+∞}, and the Stack always keeps the values {r | LMost[T [r]] < t ≤ r} in increasing order from top to bottom. Thus, Stack .top returns the minimum value among them. The total running time is O(n), because in the Stack , each element i is pushed at most once. 19 B Examples Here we present several examples for how our algorithms compute SAGP 1 (T ) for a given string. Consider string T = acacabaabca and T ′ = acacabaabca$acbaabacaca#, namely, T = T $T R #. First, we compute Pals and the array U . Assume we are now processing position b = 6 in T , then U [6] = {(6, 9)}, where (6, 9) represents the maximal palindrome T [6..9] = baab. Thus we consider pivot i = b + ⌈(9 − 6 + 1)/2⌉ − 1 = 7. We have determined that the position 7 is of type-1 position in constant time, using Lemma 2. B.1 Example for suffix array based algorithms First, we show an example for the algorithm based on the suffix array, and its improved version with predecessor/successor queries. We construct the suffix array SAT ′ , the reversed suffix array SA−1 T ′ , and the LCP ′ ′ array LCP T for T . In Fig 9, we show these arrays. ′ Figure 9: SAT ′ , LCP T ′ and SA−1 T ′ for string T = acacabaabca$acbaabacaca#. Let k be the integer such that SAT ′ [k] = i + ⌈(9 − 6 + 1)/2⌉ + 1 = 7 + 3 = 10, namely k = 19. This can be obtained from SA−1 [10] = 19 (See also Fig 9). To compute the longest w, we traverse SAT ′ [19] forward and backward, until we encounter the nearest entries p < k and q > k on SAT ′ such that op(SAT ′ [p]) < 5 and op(SAT ′ [q]) < 5. Note that these are equivalent to predecessor/successor queries for 19, respectively. Then, we can find p = 10 and q = 20. Then, the size W of w is computed by W = max{min{LCP T ′ [11], . . . , LCP T ′ [19]}, min{LCP T ′ [20], . . . , LCP T ′ [20]}}, and we obtain W = 2. In this case, q = 20 gives a larger lcp value with k = 19. Thus, we output a canonical longest SAGPs (7, 2, 3, 2) = ac|aca|ba|ab|ca. We further traverse SAT ′ from the 20th entry backward as long as successive entries s fulfill LCP T ′ [s + 1] ≥ W . Then, we find s = 22, thus we output a canonical longest SAGPs (7, 2, 1, 2) = ac|a|ba|ab|ca. We further traverse SAT ′ from the 17th entry backward, finally we reach the 24th entry of SAT ′ , which is the last enty of the suffix array. Therefore, we finish the process for position b = 7. B.2 Example for suffix tree based algorithm Next, we show an example for the linear-time algorithm based on the suffix tree. 20 We first construct the suffix tree T1 = STree(T $T R #). Suppose that we have constructed T2′ = STree(T R [8..11]#) and marked all ancestors of every leaf v such that 19 < v ≤ 24 in T1 . In Fig. 10, we show interesting parts of T1 and T2′ . To compute the longest w, we perform an NMA query from the leaf i + |uR | + 1 = 10 of T1 . As can be seen in Fig. 10, we obtain the nearest marked node v = NMAT1 (10). Thus, we know that wR = ca. Next, we switch from the node v of T1 to its corresponding node v ′ of T2′ using a link between them. Then, we traverse the subtree rooted at v ′ and obtain all occurrences of wR , namely wR = T R [10..11] = T R [8..9] = ca at positions 10 and 8 in the reversed string T R #. Since op(10) = 2 and op(8) = 4, we obtain the canonical longest SAGPs (7, 2, 3, 2) = ac|aca|ba|ab|ca. and (7, 2, 1, 2) = ac|a|ba|ab|ca for pivot 7. Figure 10: Showing interesting parts of T1 = STree(T ′ ) and T2′ = STree(T R [8..11]#), where T = acacabaabca, T R = acbaabacaca and T ′ = acacabaabca$acbaabacaca#. In T1 , we represent the marked internal nodes by black circles, the unmarked internal nodes by white circles, and the leaves by squares in which the numbers denote the beginning positions of the corresponding suffixes in the string. The dotted line represents the link between the node for string c in T1 and that in T2′ . Table 2: Arrays LMost, NextPos, and FindR for a string T = dbbaacbcbad. For the sake of understanding, we also provide the values of min out and min in in the i-th loop of Algorithm 2. These values are computed from right to left. a b c d LMost 4 2 6 1 T NextPos min out min in FindR 1 2 d b 11 3 ∞ 11 3 3 3 3 3 b 7 3 5 3 21 4 a 5 7 5 5 5 a 10 5 8 5 6 c 8 7 8 7 7 b 9 7 9 7 8 9 10 11 c b a d ∞ ∞ ∞ ∞ 8 9 10 11 ∞ ∞ ∞ ∞ 8 9 10 11
8cs.DS
Learning Based on CC1 and CC4 Neural Networks Subhash Kak Oklahoma State University Abstract— We propose that a general learning system should have three kinds of agents corresponding to sensory, short-term, and long-term memory that implicitly will facilitate context-free and context-sensitive aspects of learning. These three agents perform mututally complementary functions that capture aspects of the human cognition system. We investigate the use of CC1 and CC4 networks for use as models of short-term and sensory memory. I. It was proposed that CCNN networks can serve as models for short-term memory [8], however no attempt was made to distinguish between sensory and the more formally called short-term memory, and this distinction will be made for the first time in the present paper. In the CCNN, the basis idea is to take the training sample and associate a δ-neighborhood (consisting of all points within the radius of δ from the training sample) to the same class The training can adapt quickly to the changes in the underlying data stream. But it leaves out the question of the choice of δ to the designer and the nature of the application. INTRODUCTION The human cognition system works at two levels: it analyzes surface structure of an utterance using grammatical rules but makes deductions only within the framework of the underlying context. Similarly, implicit learning and memory of visual context can guide spatial attention towards taskrelevant aspects of the scene [1]. CCNN trained neural networks may be used in two basic modes: (i) where the δ-value adapts to the learning sample (CC1), and (ii) where it is fixed (CC4). Clearly, There is a burden of computation required in CC1 (for the adaptation to come through and this may require many rounds of adjustment), whereas little computation is required in CC4. For the advantage of computation requirements, CC4 networks have become popular and they have been used in many applications ranging from document classification to time-series prediction [9][10][11][12]. The context-independent properties are not affected by context, whereas context-dependent properties are. Contextindependent properties constitute the core meaning, whereas context-dependent properties lead to semantic encoding variability [2]. In discourse analysis one needs to know the context before one can analyze a specific event [3]. Either CC1 or CC4 could be used as a model of short-term ephemeral memory. One might assume that this memory is based originally on CC4 and further refinement is performed by doing a CC1 run on it to reduce error. Such a memory can be used in tandem with deep learning models [13][14][15], where the specific deep learning network is determined by the application at hand. Patterns that might appear distinct at one level of analysis may not look so when analyzed at another level. This idea should be useful in the problem of neural network training. We propose this can be done most easily using corner classification neural networks (CCNN) for dynamic classification of data sets [4][5][6][7] and for modeling of memory. There may be other aspects of learning that are non-classical [16][17][18], which we shall not go into in this paper. These elements might help to improve the performance of deep neural networks which suffer from certain pathologies (such as classifying unrecognizable images as belonging to a familiar category of ordinary images and misclassifying minuscule perturbations of correctly classified images [19],[20],[21]). Memory may be divided into three types, sensory, short-term and long-term memory. The duration for which information can be retained is shortest for sensory memory and longest for greatest for long-term memory, and short-term memory stands in between the sensory and long-term memory. Short-time memory, also called working memory, fades approximately after twenty seconds if it is not renewed through rehearsal. It needs to be protected from overloading by sensory stimulation, two cognitive processes that help in preventing overloading are sensory gating and selective attention. Sensory gating is the process by which certain channels are turned on while others are turned off. The amount of information that short-term memory can hold is limited but it can be extended by “grouping” information. Both of these must use very fast high-level classification that operates on sensory memory. This paper further investigates general properties of corner classification architecture using standard learning. We propose that CC4 and CC1 networks can represent sensory and shortterm memory, a distinction that is being made in relation to artificial neural networks for the first time. This paper does not go into the exact manner in which sensory and short-term memory may be used in an actual cognitive task and that is a problem that needs to be further examined. Here we only say that we expect that both sensory and short-term memory ideas 1 when used in juxtaposition with newer algorithms of deep learning will offer improved performance. II. biological learning also appears to be based on [22][23][24]. CORNER CLASSIFICATION LEARNING The corner classification (CC) network is based on the idea of phonological loop and the visio-spatial sketchpad [8] from the perspective of neuroscience, and separating corners of a hypercube from the perspective of machine learning [4][5]. There are four versions of the CC technique, represented by CC1 through CC4 but only these two are of significance now since CC2 and CC3 were intermediate stages that led to the development of CC4. These networks are a feedforward network architecture consisting of three layers of neurons. The number of input neurons is equal to the length of input patterns or vectors plus one, the additional neuron being the bias neuron, which has a constant input of 1. The number of hidden neurons is equal to the number of training samples, each hidden neuron correspond to one training example. In more advanced versions, the hidden neurons may eventually be pruned down. Figure 1: General CC architecture Each node in the network acts as a filter for the training sample. The filter is realized by making it act as a hyperplane to separate the corner of the n-dimensional cube represented by the training vector and hence the name corner-classification technique. The varying radius generalization architecture of CC1 may be represented by Figure 2. Input Layer The CC1 network optimizes the generalization for each learning sample and is, therefore, an adaptive network that may also be seen from the perspective of a network where the radius of generalization varies with the training sample. x1 w1,1 w1,2 d1 w1,R h1 µ1 h2 µ2 u1 r1 d2 x2 F F u2 Rule Base … … r2 … In the CC4, the last node of the input layer is set to one to act as a bias to the hidden layer. The binary step function is used as the activation function for both the hidden and output neurons. The output of the activation function is 1 if summation is positive and zero otherwise. Output Layer Hidden Layer wS,1 For each training vector presented to the network, if an input neuron receives a 1, its weight to the hidden neuron corresponding to this training vector is set to I. Otherwise, it is set to -1. The bias neuron is treated differently. If s is the number of l's in the training vector, excluding the bias input, and the desired radius of generalization is r, then the weight between the bias neuron and the hidden neuron corresponding to this training vector is r - s + 1. xR wS,R d i = dist ( x, R) F rS hS y S y = ∑ µ i ui uS dS ∑ i =1 µS hi = F ( d i , ri ) Figure 2. CC1 realization The CC1 network of Figure 2 compares the stored vectors of the data to the input data using an appropriate distance metric. The input data is normalized and presented as input vector x. The hidden neuron is represented by the weight vector wi and its elements are represented by wi, j ,i = (1,2,…,S) and j = (1,2,…,R), where R is the number of components of the input vector and S is the number of hidden neurons (the number of training samples). The output is the dot product of the vectors μ and u, where μ is the vector at the output of the Rule Base and u is the vector of weights in the output layer as shown in Figure 2. This network can be trained with just two passes of the samples, the first pass assigns the synaptic weights and the second pass determines the radius of generalization for each The weights in the output layer are equal to 1 if the output value is 1 and –1 if the output value is 0. This amounts to learning both the input class and its complement and thus instantaneous. The radius of generalization, r can be seen by considering the all-zero input vectors for which wn+1 = r + 1. The choice of r will depend on the nature of generalization sought. Since the weights are 1, -1, or 0, it is clear that actual computations are minimal. In the general case, the only weight that can be greater in magnitude than 1 is the one associated with the bias neuron. When real data is represented in binary, that should be done using unary coding which is the coding 2 training sample [7]. of training samples increases. The CC4 training for each number of the X-axis is assumed to use the best possible value of radius of generalization for that set of the training samples. As the size of the training set becomes larger the error using CC4 comes down closer to the CC1 error. The network behaves as a 1NN classifier and a kNN classifier (1- or k- nearest neighbor classifier) according to whether the input vector falls within the radius of generalization of a training vector or not. The radius of generalization acts as a switch between the 1NN classifier and the kNN classifier. This network meets the specifications set by traditional function approximation that every data point is covered in the given training sample. In the practical case, the k values are determined by the sample size and be a fraction of the sample size. If k=S then the FC network operating as a kNN classifier can be viewed as a RBF network provided the membership function is chosen to be a Gaussian distributed. On the other hand, if the weighting function is chosen to be the membership function, the CC1 classifier can be considered as kernel regression. As in the CC networks, this network requires as many hidden neurons as the number of training samples (although the number of hidden neurons could be trimmed to a certain extent). III. ERROR CHANGE WITH TRAINING SET SIZE Figure 4. Comparative error performance of CC1 and CC4 We now compare the error performance of CC1 and CC4 networks. We do this in the context of a pattern classification problem like that of Figure 3, where the shapes belong to a single class which is distinct from the background. The problem is to learn this class and generalize in the process by using a fraction of the elements of the picture. The error in CC4 is a minimum for some intermediate value of r. When it is very small, the generalization is inadequate and there are numerous gaps in the learning. On the other hand, if r is made too large, the generalization is not precise enough to separate regions that are near, which leads to accumulation of error. This relationship of error in generalization with respect to r for a CC4 network is shown in Figure 5. Figure 3. Example classification problem In the CC1 network, one requires a comparison with stored information in one pass, and, therefore, it is not quite instantaneous, but the calculation can be done in time that could be smaller than the time instant at which the next data comes in. The CC4 network training is done using different values of the radius of generalization. Figure 5. CC4 error rate with radius of generalization IV. NUMBER OF CLASSES The number of classes that CC networks can distinguish between depends on the number of neurons in the output layer. Figure 4 presents a comparison between the error for the CC1 and CC4 training. Since the CC1 network adapts the generalization region based on the distances between the training samples, the reduction in error as the number of training samples increases is not very dramatic for the structured shapes of Figure 3. The neurons in the output layer serve as decision agents in each stage of a decision tree. For example, Figure 6, which defines the working of the output layer for 3 neurons is able to separate 8 regions. Effectively, each neuron makes a binary On the other hand, the error values go down as the proportion 3 x(t + 1) = (1 − B)x(t) + Ax(t − D)/[1 + xC(t − D)] decision and taken together, one is able to account for 2k classes if one has k output layer neurons. where A, B, and C are constants, and D is the time delay parameter. Under a suitable choice of these numbers, the resultant time series will exhibit chaotic behavior. The popular case with A = 0.2, B = 0.1, C = 10, and the delay parameter D set to 30 is selected here. In time-series prediction another significant parameter is the number of past values that will be used for determining the next value and we call it k. In other words, the window size is k and prediction is made for one point ahead. The CC1 prediction method was called FC prediction in [7]. The MG equation was used to generate a continuous sequence of data points. The first 3,000 points were discarded to allow initialization transients to decay. The remaining data points were sampled once every six points to obtain the actual time series used for this experiment. A total of 500 samples are used for training. It was found that the error was very small and nearly the same for k = 5 and 6. Figure 7 gives a plot of the time series and its prediction and one can see how close the one-point ahead prediction is to the actual waveform. Figure 6. Decision layers in the output neurons V. TIME-SERIES PREDICTION In the use of CC4 network for prediction, the choice of radius of generalization would depend on the nature of the data and the size of the training set. Basically, prediction is done using a moving window. The network is trained by the data that is already at hand and it is then used to predict the future value. One can see how such a method will be useful in financial time-series prediction where good prediction can be converted into financial advantage. VI. CONCLUSION This paper proposed that a general system should have three kinds of learning agents corresponding to sensory, short-term, and long-term memory. These three agents perform complementary functions that can improve the overall performance in a manner similar to human cognitive agent. This paper investigated the use of CC4 and CC1 networks for use as models of short-term and sensory memory. Mackey-Glass (MG) time series which is based on MackeyGlass differential equation is often used as a test sequence for checking how good the prediction technique is. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] Figure 7. Prediction of chaotic series using CC1 [9] The discrete time representation of the Mackey-Glass (MG) equation is: 4 M.M. Chun and Y. Jiang, Contextual cueing: Implicit learning and memory of visual context guides spatial attention. Cognitive Psychology 36: 28-71, 1998. L.W. Barsalou, Context-independent and context-dependent information in concepts. Memory and Cognition 10: 82-93, 1982. R. Keller, The sociology of knowledge approach to discourse, Human Studies 34 (1), 43-65, 2011. S. Kak, On training feedforward neural networks. Pramana, vol. 40, pp. 35-42, 1993. S. Kak, New algorithms for training feedforward neural networks. Pattern Recognition Letters, 15, 295-298, 1994 S. Kak, Three languages of the brain: quantum, reorganizational, and associative. In Learning as Self-Organization, K. Pribram and J. King, eds., Lawrence Erlbaum, Mahwah, N.J., 185—219, 1996. K.W. Tang, S. Kak, Fast classification networks for signal processing. Circuits, Systems, Signal Processing. 21, 207-224, 2002. S. Kak, Faster web search and prediction using instantaneously trained neural networks. IEEE Intelligent Systems. 14, 79-82, November/December, 1999. Zhang, Z. et al., TextCC: New feedforward neural network for classifying documents instantly. Advances in Neural Networks ISNN 2005. Lecture Notes in Computer Science 3497: 232-237, 2005. [18] S. Kak, Communication languages and agents in biological systems. In Biocommunication: Sign-Mediated Interactions between Cells and Organisms, R. Gordon and J. Seckbach (editors). World Scientific Publishing, London, 2016. pp. 203-226. [19] C. Szegedy, et al. Intriguing properties of neural networks. arXiv:1312.6199 (2013). [20] A. Nguyen et al., Deep Neural Networks are Easily Fooled: High Confidence Predictions for Unrecognizable Images. arXiv:1412.1897 (2014). [21] Schmidhuber, J. Deep Learning in Neural Networks: An Overview, arXiv:1404.7828 (2014) [22] I.R. Fiete, W. Senn, C.Z.H. Wang, R.H.R. Hahnloser, Spike-timedependent plasticity and heterosynaptic competition organize networks to produce long scale-free sequences of neural activity. Neuron 65, 563576, 2010. [23] J.M. Moore et al., Motor pathway convergence predicts syllable repertoire size in oscine birds. Proc. Nat. Acad. Sc. USA 108, 1644016445, 2011. [24] S. Kak, Generalized unary coding. Circuits, Systems and Signal Processing 36: 1419-1426, 2016. [10] Zhang, Z. et al., Document Classification Via TextCC Based on Stereographic Projection and for deep learning, International Conference on Machine Learning and Cybernetics, Dalin, 2006 [11] Zhu, J. and G. Milne, Implementing Kak Neural Networks on a Reconfigurable Computing Platform, Lecture Notes in Computer Science Volume 1896: 260-269, 2000. [12] Shortt, A., J.G. Keating, L. Moulinier, C.N. Pannell, Optical implementation of the Kak neural network, Information Sciences 171: 273-287, 2005. [13] Y. Bengio, Learning deep architectures for AI. Machine Learning. 2 (1): 1–127, 2009. [14] D. C. Ciresan, U. Meier, J. Schmidhuber. Multi-column Deep Neural Networks for Image Classification. IEEE Conf. on Computer Vision and Pattern Recognition CVPR, 2012. [15] Y. Bengio, Y. LeCun, G. Hinton, Deep learning. Nature. 521: 436–444, 2015. [16] S. Kak, The initialization problem in quantum computing. Foundations of Physics, vol. 29, pp. 267-279, 1999. [17] S. Kak, Quantum information and entropy. International Journal of Theoretical Physics, vol. 46, pp. 860-876, 2007. 5
9cs.NE
A NOTE ON THE ENUMERATION OF EUCLIDEAN SELF-DUAL SKEW-CYCLIC CODES OVER FINITE FIELDS arXiv:1705.06049v1 [cs.IT] 17 May 2017 IRWANSYAH, INTAN MUCHTADI-ALAMSYAH, AHMAD MUCHLIS, ALEAMS BARRA, AND DJOKO SUPRIJANTO Abstract. In this paper, we give the enumeration formulas for Euclidean selfdual skew-cyclic codes over finite fields when (n, |θ|) = 1 and for some cases when (n, |θ|) > 1, where n is the length of the code and |θ| is the order of automorphism θ. 1. Introduction Let Fq be the finite field of cardinality q, where q is a prime power. A linear code over Fq with length n is a linear subspace of the Fq -vector space Fnq . The two classes of interesting linear codes are cyclic codes and self-dual codes. The reason is, among other things, because these classes of codes have produced many examples of optimal codes. Therefore, some authors also studied the combination of these two classes of codes, namely self-dual cyclic codes [7] and the generalization of cyclic codes such as quasi-cyclic codes and skew-cyclic codes[8]. Skew-cyclic codes or θ-cyclic codes over finite fields are a generalization of cyclic codes over finite fields. Here, θ is an automorphism in the corresponding finite fields. This class of codes has many interesting properties such as it can be viewed as a left ideal or left submodule over a skew-polynomial ring, etc, see [3]. Moreover, these codes also give [38, 18, 11] code, an Euclidean self-dual code over F4 , which improves the bound for optimal self-dual codes of length 36 with respect to Hamming distance [4]. Recently, the study of special class of skew-codes over finite fields i.e. Euclidean self-dual skew-codes are conducted regarding their existence and enumeration. Boucher [2] showed that, when q ≡ 1 mod 4, there always exists a self-dual θ-code in any dimension and that self-dual θ-codes of a given dimension are either all θ-cyclic or all θ-negacyclic. Also, It is not exists when q ≡ 3 mod 4. However, the enumeration of this class of codes not yet been done completely. So far, the enumeration was done for self-dual skew-codes over F4 with length n = 2s [5] and for self-dual skew-codes over Fp2 [1]. In this paper, we study the enumeration of self-dual skew-cyclic or θ-cyclic codes when (n, |θ|) = 1 and for some cases when (n, |θ|) = d > 1, where |θ| is the order of the automorphism θ. 2. The Enumeration Formulas Let us recall some definition which can be found in [1, 3, 7, 8]. Let T be a shift operator on Fnq and θ is an automorphism in Fq . Definition 1. Let C be a linear code of length n over Fq . 1991 Mathematics Subject Classification. 11T71. Key words and phrases. Skew-cyclic codes, Euclidean self-dual codes, Enumeration. 1 2 IRWANSYAH, I. M. ALAMSYAH, A. MUCHLIS, A. BARRA, AND D. SUPRIJANTO (1) If T l (c) = (cn−l , cn−l+1 , . . . , cn−l−1 ) ∈ C whenever c = (c0 , c1 , . . . , cn−1 ) ∈ C, then C is a quasi-cyclic code with index l. (2) If Tθ (c) = (θ(cn−1 ), θ(c0 ), . . . , θ(cn−2 )) ∈ C whenever c = (c0 , c1 , . . . , cn−1 ) ∈ C, then C is a θ-cyclic code. (3) If θ in (2) above is an identity map, then C is a cyclic code. For any c = (c0 , . . . , cn−1 ) and c′ = (c′0 , . . . , c′n−1 ) in Fq , we define the Euclidean product between c and c′ as [c, c′ ] = n−1 X ci c′i . i=0 Let C be a code of length n over Fq and C ⊥ = {c′ ∈ Fnq : [c, c′ ] = 0, ∀c ∈ C}. Then we can give the following definition. Definition 2. A linear code C is called Euclidean self-dual if C = C ⊥ . Now, before we do the enumeration, we need to proof the following proposition. Proposition 3. If C is a θ-cyclic code over Fq of length n, for some automorphism θ in Fq , then C is either a cyclic code or a quasi-cyclic code. Proof. We consider two cases for |θ|. First, if gcd(|θ|, n) = 1, then there exist p, q ∈ Z, such that pr + qn = 1 or p|θ| = 1 + bn for some b. For any c ∈ C, let c = (c0 , c1 , . . . , cn−1 ), for some c0 , c1 , . . . , cn−1 ∈ Fq . Then we have  p|θ| Tθ (c) = θp|θ| (cn−p|θ| (mod n) ), θp|θ| (cn−p|θ|+1 (mod n) ),  . . . , θp|θ| (cn−p|θ|−1 (mod n) )   = θp|θ| (cn−1 ), θp|θ| (c0 ), . . . , θp|θ| (cn−2 ) = (cn−1 , c0 , . . . , cn−2 ) = T (c), which means, T (c) ∈ C or C is a cyclic code. Second, if gcd(|θ|, n) = s, for some s ∈ N, where s 6= 1, then there exist p1 , p2 ∈ Z, such that p1 |θ| = s + p2 n. Hence, we have  p |θ| Tθ 1 (c) = θp1 |θ| (cn−p1 |θ| (mod n) ), θp1 |θ| (cn−p1 |θ|+1 (mod n) ),  . . . , θp1 |θ| (cn−p1 |θ|−1 (mod n) )   = θp1 |θ| (cn−s ), θp1 |θ| (cn−s+1 ), . . . , θp1 |θ| (cn−s−1 ) = (cn−s , cn−s+1 , . . . , cn−s−1 ) = T s (c) which means, C is a quasi-cyclic code of index s, as we hope.  A NOTE ON THE ENUMERATION OF EUCLIDEAN SELF-DUAL SKEW-CYCLIC CODES 3 2.1. Case 1 : (n, |θ|) = 1. If (n, |θ|) = 1, then θ-cyclic code is a cyclic code. It means, the number of self-dual θ-cyclic codes of length n is less than or equal to the number of self-dual cyclic codes of length n. Recall that, based on the result in [7], Euclidean self-dual cyclic code of length n over Fq exist only when q is a power of 2 and n is an even integer. Now, let n = 2v(n) ñ, where (ñ, 2) = 1, and let φ be the Euler function and ordj (i) be the smallest integer e such that j divides ie − 1. Also, let j be an odd positive integer and m be a positive integer. We say that the pair (j, m) is good if j divides (2m )k + 1 for some integer k ≥ 0 and bad otherwise. We define the function χ as follows. χ(j, m) = ( 0, if (j, m) good, 1, otherwise. Recall that, based on [7], the number of Euclidean self-dual cyclic codes over Fq is (2.1)  1 Pj|ñ χ(j,m)φ(j)/ordj (2m )  v(n) 2 . 1+2 Note that, by Proposition 3, when (n, |θ|) = 1, then the number of Euclidean self-dual θ-cyclic codes over Fq is less than or equal to the one provided by (2.1). Now, we make partitions of the set {0, 1, . . . , ñ} into 2m -cyclotomic cosets denoted by Cs , where s is the smallest element in Cs . Let A be the collection of union of 2m -cyclotomic cosets which represent the generators of the self-dual cyclic r codes over Fq of length n. Also, let θ(β) = β 2 , for all β ∈ F2m and for some r ∈ {1, 2, . . . , m}. Also, let λ be the map as follows λr : {0, 1, . . . , ñ} a −→ {0, 1, . . . , ñ} 7−→ 2r a (mod ñ). Furthermore, we let Λr be the map on A induced by λr and Λr be the number of elements A in A such that Λr (A) 6= A. Then, we have the following result. Theorem 4. If (n, |θ|) = 1, q = 2m , for some m, and n = 2v(n) ñ, for some odd positive integer ñ, then the number of Euclidean self-dual θ-cyclic codes of length n over Fq is  1 Pj|ñ χ(j,m)φ(j)/ordj (2m )  v(n) 2 − Λr . 1+2 Proof. Let C = hg(x)i, where g(x) is a monic polynomial with minimum degree in C Ps and, therefore, g(x) is a divisor of xñ − 1. Now, for any f (x) = i=0 fi xi ∈ F2m [x], let s s X X r fi2 xi . θ(fi )xi = θ(f ) = i=0 i=0 Also, let θ(C) = hθ(g)i. It is easy to see that θ(C) is also a Euclidean self-dual cyclic code. Now, let α be a primitive ñ-th root of unity in some extension of F2m . Then, by [6, Theorem 4.2.1(vii)], we have Y g(x) = Mαs (x), s where Mαs (x) is the minimal polynomial of αs over F2m , and s is the representatives of the 2m -cyclotomic cosets modulo ñ. Now, let xñ − 1 = f1 (x) · · · fs (x)h1 (x)h∗1 (x) · · · ht (x)h∗t (x), 4 IRWANSYAH, I. M. ALAMSYAH, A. MUCHLIS, A. BARRA, AND D. SUPRIJANTO where fi (x) (1 ≤ i ≤ s) are monic irreducible self-reciprocal polynomials over F2m , while hj (x) and its reciprocal polynomial h∗j (x) (1 ≤ j ≤ t) are both monic irreducible polynomials over F2m . Then, by [6, Theorem 3.7.6], we have Y fi (x) = (x − αk ), k∈Csi and hj (x) = Y (x − αk ). k∈Csj Therefore, in order to make θ(C) ⊆ C, we have to choose fi (x)’s and hj (x)’s such r that their representatives in A are fixed by Λr , because θ(x−αl ) = x−α2 l . Since Λr is the number of non-fixed-by-Λr -elements in A, we have the desired formula.  Let us consider the following examples. Example 5. Let q = 4, r = 1, and n = 6. Therefore, ñ = 3. Also, let F4 = F2 [α], where α is the root of the polynomial x2 + x + 1. Note that, α is also a primitive 3th -root of unity. As we can check, we have three 4-cyclotomic cosets modulo 3, i.e. C0 = {0}, C1 = {1}, and C2 = {2}. Moreover, C0 represents a self-reciprocal polynomial, while C1 and C2 represent two polynomials which reciprocal to each other. Since n = 2ñ, we have A = {C0 ∪ C1 ∪ C1 , C0 ∪ C2 ∪ C2 , C0 ∪ C1 ∪ C2 }. We can see that Λ1 (C0 ) = C0 , Λ1 (C1 ) = C2 , and Λ1 (C2 ) = C1 . Therefore, we have Λ1 = 2, and the number of self-dual θ-cyclic codes is |A| − Λ1 = 1. Example 6. Let q = 4, r = 1, and n = 14. Therefore, ñ = 7. Let α ∈ F42 be a primitive 7th -root of unity. We can check that we have three 4-cyclotomic cosets modulo 7. They are C0 = {0}, C1 = {1, 2, 4}, and C3 = {3, 5, 6}. Also, C0 represents a self-reciprocal polynomial, while C1 and C3 represent two polynomials which reciprocal to each other. So, we have that A = {C0 ∪ C1 ∪ C1 , C0 ∪ C3 ∪ C3 , C0 ∪ C1 ∪ C3 }. We also have Λ1 = 0, because Λ1 (Ci ) = Ci for all i = 0, 1, 3. Therefore, the number of self-dual θ-cyclic codes is |A| = 3. We have to note that |A| is the number of self-dual cyclic codes of length n over Fq . Therefore, the two examples above give us another way to count the number of self-dual cyclic codes using q-cyclotomic cosets of modulo ñ. 2.2. Case 2 : (n, |θ|) = d > 1. If (n, |θ|) = d > 1, then θ-cyclic code is a quasicyclic code of index d as stated in Proposition 3. Now, for any C ⊆ Fnq , define Tθ (C) = {Tθ (c) : ∀c ∈ C}. Then, we can easily prove the following lemma. Lemma 7. If C is a Euclidean self-dual quasi-cyclic code of index d, then Tθ (C) is also an Euclidean self-dual quasi-cyclic code of index d. Moreover, Tθ (C) has the same Hamming weight enumerator polynomial as C. The Lemma 7 above shows that the map Tθ preserves Euclidean self-duality and quasi-cyclic property. Moreover, we have to note that, if C is a quasi-cyclic code such that Tθ (C) ⊆ C, then C is also a θ-cyclic code. For any code C ⊆ Fnq , let ρ be the map as follows, ( 0, ifTθ (C) ⊆ C, (2.2) ρ(C) = 1, otherwise. A NOTE ON THE ENUMERATION OF EUCLIDEAN SELF-DUAL SKEW-CYCLIC CODES 5 Let us recall structures of quasi-cyclic code described in [8]. Let n = dm, R = Fq [Y ]/(Y m − 1), and C be a quasi-cyclic code over Fq of length dm with index d. Let c = (c00 , c01 , . . . , c0,l−1 , c10 , . . . , c1,l−1 , . . . , cm−1,0 , . . . , cm−1,l−1 ) ∈ C. Then, the map φ : Fdm −→ Rd defined by q φ(c) = (c0 (Y ), c1 (Y ), . . . , cl−1 (Y )) ∈ Rd , P i where cj (Y ) = m−1 i=0 cij Y ∈ R, is a one-to-one correspondence between quasicyclic codes over Fq of index d and length dm and linear codes over R of length d. Moreover,  !  t s M M  Gdi ⊕  Hj′d ⊕ Hj′′d  , Rd = i=1 j=1 where Gi = Fq [Y ]/(gi ), Hj′ = Fq [Y ]/(hj ), and Hj′′ = Fq [Y ]/(h∗j ), for some selfreciprocal irreducible polynomials gi (1 ≤ i ≤ s) and irreducible reciprocal pairs hj and h∗j (1 ≤ j ≤ t) which satisfy Y m − 1 = δg1 · · · gs h1 h∗1 · · · ht h∗t . The above decomposition gives C= s M Ci i=1 !  ⊕ t M j=1   Cj′ ⊕ Cj′′  , where Ci is a linear code over Gi of length d, Cj′ is a linear code over Hj′ of length d, and Cj′′ is a linear code over Hj′′ of length d. Now, let X ρ(φ−1 (C)), ρG i = C code over Gi X ρHj′ ,Hj′′ = ρ(φ−1 (C ′ ⊕ C ′′ )), C ′ code over H ′ j C ′′ code over H ′′ j and N (d, q) = 1 + d X (q d − 1)(q d − q) · · · (q d − q k−1 ) . (q k − 1)(q k − q) · · · (q k − q k−1 ) k=1 Then, we have the following result for d = 2. Proposition 8. Let θ be an automorphism in Fq such that (n, |θ|) = 2, where q be a prime power satisfying one of the following conditions, (1) q is a power of 2, (2) q = pb , where p is a prime congruent to 1 mod 4, or (3) q = p2 b, where p is a prime congruent to 3 mod 4. Also, let m be an integer relatively prime to q. Suppose that Y m −1 = δg1 · · · gs h1 h∗1 · · · ht h∗t as mentioned above. Suppose further that g1 = Y − 1 and, if m is even, g2 = Y + 1. Let the degree of gi be 2di and the degree of hj (also h∗j ) be ej . Then, the number of distinct Euclidean self-dual θ-cyclic codes of length 2m with index 2 over Fq is 6 IRWANSYAH, I. M. ALAMSYAH, A. MUCHLIS, A. BARRA, AND D. SUPRIJANTO 4 2 s Y (q di + 1 − ρGi ) i=3 s Y (q di + 1 − ρGi ) (q di + 1 − ρGi ) i=2 j=1 t Y (N (2, q ej ) − ρHj′ ,Hj′′ ), if m is even and q is odd (N (2, q ej ) − ρHj′ ,Hj′′ ), if m is odd and q is odd j=1 i=2 s Y t Y t Y (N (2, q ej ) − ρHj′ ,Hj′′ ), if m is odd and q is even j=1 Proof. Apply [8, Proposition 6.2] and use the fact that the map ρ counts the number of codes which are not invariant under the action of Tθ .  Furthermore, using [8, Proposition 6.6, Proposition 6.9, Proposition 6.10, Proposition 6.12, and Proposition 6.13] and the fact about the map ρ as above, we have the following results. Proposition 9. Suppose q ≡ 1 mod 4 and d is even, or q ≡ 3 mod 4 and d ≡ 0 mod 4. Then the number of Euclidean self-dual θ-cyclic codes of length 2d over Fq is d 2 −1 4 Y (q i + 1 − ρGi )2 . i=1 Proposition 10. Suppose that q and d satisfy one of the following conditions, (1) q ≡ 11 mod 12 and d ≡ 0 mod 4, (2) q ≡ 2 mod 3 but q 6≡ 11 mod 12 and d is even. Then the number of distinct Euclidean self-dual θ-cyclic codes over Fq of length 3d is d 2 −1 b(q + 1) Y (q i + 1 − ρGi )(q 2i+1 + 1 − ρHi′ ), i=1 where b = 1 if q is even, 2 if q is odd. Proposition 11. Let q and d satisfy one of the following conditions, (1) q ≡ 7 mod 12 and d ≡ 0 mod 4, (2) q ≡ 1 mod 3 but q 6≡ 7 mod 12 and d is even. Then the number of distinct Euclidean self-dual θ-cyclic codes over Fq of length 3d is  d −1 2 Y (q i + 1 − ρGi ) (N (d, q) − ρH ′ ,H ′′ ), b i=1 where b = 1 if q is even, 2 if q is odd. Proposition 12. Let q be an odd prime power such that −1 is not a square in Fq and let d ≡ 0 mod 4. Then the number of distinct Euclidean self-dual θ-cyclic codes over Fq of length 4d is d 2 −1 4(q + 1) Y i=1 (q i + 1 − ρGi )2 (q 2i+1 + 1 − ρHi′ ). A NOTE ON THE ENUMERATION OF EUCLIDEAN SELF-DUAL SKEW-CYCLIC CODES 7 Proposition 13. Let d be an even integer and q be an odd prime power such that −1 is a square in Fq . Then, the number of distinct Euclidean self-dual θ-cyclic codes of length 4d over Fq is  d −1 2 Y (q i + 1 − ρGi )2  (N (d, q) − ρH ′ ,H ′′ ). 4 i=1 3. Conclusion Enumeration of skew-cyclic or θ-cyclic codes over finite fields has been considered by Boucher and her coauthors in [5], [1]. However, the enumeration of this class of codes has not yet been done completely. In this paper, we study the enumeration of self-dual skew-cyclic or θ-cyclic codes if (n, |θ|) = 1 and for some cases if (n, |θ|) = d > 1, where |θ| is the order of the automorphism θ. 4. Acknowledgment I, I.M-A, and A.B. are supported in part by Riset Unggulan Perguruan Tinggi Dikti 2016. D.S. is supported in part by Riset ITB 2016. References [1] D. Boucher, Construction and number of self-dual skew codes over Fp2 , hal-01090922v2, 2014. [2] D. Boucher, A note on the existence of self-dual skew codes over finite fields, Lecture Notes in Computer Science, Proccedings in Honour of Thierry Berger 9084, pp. 228-239, 2015. [3] D. Boucher, W. Geiselmann, and F. Ulmer, Skew-cyclic codes, Applicable Algebra in Engineering, Communication, and Computing vol. 18 issue 4, pp. 379-389, 2007. [4] D. Boucher and F. Ulmer, Coding with skew polynomial rings, Journal of Symbolic Computation 44, pp. 1644-1656, 2009. [5] D. Boucher and F. Ulmer, Self-dual skew-codes and factorization of skew-polynomials, Journal of Symbolic Computation 60, pp. 47-61, 2013. [6] W. Huffman and V. Pless, Fundamentals of error correcting codes, Cambridge University Press, 2003. [7] Y. Jia, S. Ling, and C. Xing, On self-dual cyclic codes over finite fields, IEEE Transactions on Information Theory Vol. 57 No. 4, pp. 2243-2251, 2011. [8] S. Ling and P. Solé, On the algebraic structure of quasi-cyclic codes I: Finite fields, IEEE Transactions on Information Theory Vol. 47 No. 7, pp. 2751-2760, 2001. Mathematics Department, Faculty of Mathematics and Natural Sciences, Universitas Mataram, Mataram, INDONESIA E-mail address: [email protected] Algebra Research Group, Faculty of Mathematics and Natural Sciences, Institut Teknologi Bandung, Jl. Ganesha 10, Bandung, 40132, INDONESIA E-mail address: ntan,muchlis,[email protected] Combinatorial Mathematics Research Group, Faculty of Mathematics and Natural Sciences, Institut Teknologi Bandung, Jl. Ganesha 10, Bandung, 40132, INDONESIA E-mail address: [email protected]
7cs.IT
BES with FEM: Building Energy Simulation using Finite Element Methods A.W.M. (Jos) van Schijndel Eindhoven University of Technology P.O. Box 513; 5600 MB Eindhoven; Netherlands, [email protected] Abstract: An overall objective of energy efficiency in the built environment is to improve building and systems performances in terms of durability, comfort and economics. In order to predict, improve and meet a certain set of performance requirements related to the indoor climate of buildings and the associated energy demand, building energy simulation (BES) tools are indispensable. Due to the rapid development of FEM software and the Multiphysics approaches, it should possible to build and simulate full 3D models of buildings regarding the energy demand. The paper presents a methodology for performing building energy simulation with Comsol. The method was applied to an international test box experiment. The results showed an almost perfect agreement between the used BES model and Comsol. These preliminary results confirm the great opportunities to use FEM related software for building energy performance simulation. Keywords: BES, FEM, building, energy 1. Introduction An overall objective of energy efficiency in the built environment is to improve building and systems performances in terms of durability, comfort and economics. In order to predict, improve and meet a certain set of performance requirements related to the indoor climate of buildings and the associated energy demand, building energy simulation (BES) tools are indispensable. Due to the rapid development of FEM software and the Multiphysics approaches, it should possible to build and simulate full 3D models of buildings regarding the energy demand. Because BES and FEM have quite different approaches the methodology of this research is very important: Step 1, start with a simple reference case where both BES and FEM tools provide identical results. Step 2, add complexity and simulate the effects with both tools. Step 3, compare and evaluate the results. The paper is organized as follows: Section 2 provides an introduction to BES modeling. Section 3 presents the methodology and preliminary results on BES using Comsol. The paper ends with the conclusions. 2. BES: Building Energy Simulation The website the of U.S. Department of energy (Energy.gov 2012) provides information on about 300 building software tools from over 40 countries for evaluating energy efficiency, renewable energy, and sustainability in buildings. Commonly used within these tools are: Zonal approaches of the volumes, assuming uniform temperatures in each zone and 1D modeling of the walls. The earliest developments of HAMBase originate from 1988, by prof. Martin H. de Wit. Since 1995, this thermal-hygric model, has become available in MatLab. A short summary of the HAMBase model is presented below, further details can be found in (HAMLab 2012). The HAMBase model uses an integrated sphere approach. It reduces the radiant temperatures to only one node. This has the advantage that also complicated geometries can easily be modelled. In figure 1.1 the thermal network is shown. ΣΦxy ΣΦab Tx Ta Lxa -h Φ /h Φcv cv r r Φr+hcvΦr/hr Ca Figure 1 The room model as a thermal network Ta is the air temperature and Tx is a combination of air and radiant temperature. Tx is needed to calculate transmission heat losses with a combined surface coefficient. hr and hcv are the surface weighted mean surface heat transfer coefficients for convection and radiation. Φr and Φcv are respectively the radiant and convective part of the total heat input consisting of heating Excerpt from the Proceedings of the 2012 COMSOL Conference in Milan or cooling, casual gains and solar gains. * For each heat source a convection factor can be given. For air heating the factor is 1 and for radiators 0.5. The factor for solar radiation depends on the window system and the amount of radiation falling on furniture. Ca is the heat capacity of the air. Lxa is a coupling coefficient:  h  Lxa = At hcv 1 + cv  hr   (1) ∑Φab is the heat loss by air entering the zone with an air temperature Tb. At is the total area. In case of ventilation Tb is the outdoor air temperature. ∑ Φxy is transmission heat loss through the envelope part y. For external envelope parts Ty is the sol-air temperature for the particular construction including the effect of atmospheric radiation. The thermal properties of the wall and the surface coefficients are considered as constants, so the system of equations is linear. For this system the heat flow entering the room can be seen as a superposition of two heat flows: one resulting from Ty with Tx=0 and one from Tx with Ty=0. The next equations are valid in the frequency domain: Φx = −Φxx + Φ yx = −YxTx + Yxy (Ty − Tx ) Φ y = Φ yy + Φ yx = YyTy + Yxy (Ty − Tx ) (2) The heat flow at the inside of a heavy construction is steadier than in a lightweight construction. In such case Lyx will be close to zero. In the model Lyx is a conductance (so continuous) and Φyx are discrete values to be calculated from previous time steps. For adiabatic envelope parts Φyx = 0. In the frequency domain, the heat flow Φxx from all the envelope parts of a room can be added: Φxx(tot) = -Tx ∑ Yx (6) The admittance for a particular frequency can be represented by a network of a thermal resistance (1/Lx) and capacitance (Cx) because the phase shift of Yx can never be larger than π/2. To cover the relevant set of frequencies (period 1 to 24 hours) two parallel branches of such a network are used giving the correct admittance's for cyclic variations with a period of 24 hours and of 1 hour. This means that the heat flow Φxx(tot) is modelled with a second order differential equation. For air from outside the room with temperature Tb a loss coefficient Lv is introduced. The model is summarized in figure 2 Ty Τb Lyx ∆Φxy Lv Φp1 Tx Ta Lxa Φp2 The heat flow (Φyx) caused by the temperature difference ΔTyx is modelled with a fixed time step (1 hour) and response factors. For t = tn : Φg1 Φg2 Lx2 L x1 Φyx(tn) = LyxΔTyx(tn) + ΔΦyx(tn) (3) ΔΦyx(tn) = a1ΔTyx(tn-1) + a2 ΔTyx(tn-2) + b1ΔΦyx(tn1) + b2ΔΦyx(tn-2) The next equation for the U-value of the wall is valid: AxyUxy = Lxy+ (a1+ a2)/(1-b1-b2) (4) For glazing, thermal mass is neglected: Lyx= AglazingUglazing * (a1=a2=b1=b2=0) (5) Please note that the model presented in figure 1 is a result of a delta-star transformation. Cx1 Cx2 Ca Figure 2 The thermal model for one zone In a similar way a model for the air humidity is made. Only vapour transport is modelled, the hygroscopic curve is linearized between RH 20% and 80%. The vapour permeability is assumed to be constant. The main differences are: a) there is only one room node (the vapour pressure) and b) the moisture storage in walls and furniture, carpets etc is dependent on the relative humidity and temperature. HAMBase has been validated many times. For the most recent validation study we refer to van Schijndel (2009), where HAMBase was verified using a standard ASHRAE test and validated using the current Excerpt from the Proceedings of the 2012 COMSOL Conference in Milan state-of-the art in the building physics, the IEA Annex 41 test building. 3. BES using FEM 3.1 Methodology The methodology was as follows: Step 1, start with a simple reference case where both BES and FEM tools provide identical results. Step 2, add complexity and simulate the effects with both tools. Step 3, compare and evaluate the results. 3.2 Step 1: Reference case For step 1, a very suitable reference case was found at the current International Energy Agency Annex 58 (2012). It concerns a test box with overall dimension 120x120x120 cm³. Floor, roof and three of the four walls are opaque, one wall contains a window with opening frame. Details of the overall geometry with the exact dimensions can be found in figure 3. Figure 3. The reference case. We started to build a 3D model of the opaque test box, heavy weight, air change rate: ACH=0 using Comsol. In order to compare the Comsol 3D FEM model with the HAMBase (HAMLab 2012) lumped model, an equivalent heat conduction of the air is used in Comsol instead of CFD. The distribution in the test box is simulated using Dutch weather data. Figure 4 shows the 3D dynamics snapshots of the isosurfaces. The main challenge now is how to match the high resolution distributed temperature results of Comsol with the lumped temperature results of the BES model. For this reference case (opaque test box, heavy weight, ACH=0) we were able to get a very good match by using a so-called equivalent heat conduction coefficient for the air inside the box in Comsol. keq = d/R = 1 / 0.34 = 2.9 Figure 4 3D dynamics snapshots of the temperature isosurfaces. (6) Excerpt from the Proceedings of the 2012 COMSOL Conference in Milan Figure 5 shows the comparison of the simulated mean indoor air temperature using Comsol (blue line) and HAMBase (green line) during the first month. The verification result is satisfactory. Step 2. Add complexity The achievements of the first step i.e. the reference case were quite successful. Therefore we started to add more complexity in the form of solar irradiation. A preliminary detailed result is presented in the appendix. This figure shows the 3D temperature distribution in the test box with a window during the day. Currently we are working on the best way to compare these high resolution distributed temperature results of Comsol with the lumped temperature results of the BES model. 4. Conclusions We conclude that for the reference case Comsol produces identical results as a BES model. The latter is very promising for studying the other required steps of methodology. Furthermore, the presented results are a first step towards more complex 3D FEM simulations including CFD, window, ventilation and radiation. In principle all variants can be simulated in 3D using Comsol, with the notification that the CFD modeling could become quite time consuming. The 3D modeling allows to virtually place sensors in the test box that produce simulated ‘measured’ data. This is left over for future research. These preliminary results confirm the great opportunities to use FEM related software for building energy performance simulation. References Energy.gov (2012), http://energy.gov/ HAMLab (2012), http://archbps1.campus.tue.nl/bpswiki/index. php/Hamlab International Energy Agency Annex 58 (2012). http://www.ecbcs.org/annexes/annex58.htm Schijndel, AWM van, (2009) Integrated modeling of dynamic heat, air and moisture processes in buildings and systems using SimuLink and COMSOL, BUILD SIMUL (2009) 2: 143–155 Figure 5. comparison of the simulated mean indoor air temperature using Comsol (blue line) and HAMBase (green line) during the first month. Excerpt from the Proceedings of the 2012 COMSOL Conference in Milan Appendix Preliminary Simulation of the test box with Solar irradiation Excerpt from the Proceedings of the 2012 COMSOL Conference in Milan
5cs.CE
Partially Independent Control Scheme for Spacecraft Rendezvous in Near-Circular Orbits Neng Wan and Weiran Yao Abstract Due to the complexity and inconstancy of the space environment, accurate mathematical models for spacecraft arXiv:1409.2332v4 [cs.SY] 4 Jan 2016 rendezvous are difficult to obtain, which consequently complicates the control tasks. In this paper, a linearized timevariant plant model with external perturbations is adopted to approximate the real circumstance. To realize the robust stability with optimal performance cost, a partially independent control scheme is proposed, which consists of a robust anti-windup controller for the in-plane motion and a H∞ controller for the out-of-plane motion. Finally, a rendezvous simulation is given to corroborate the practicality and advantages of the partially independent control scheme over a coupled control scheme. Keywords: Spacecraft rendezvous; Near-circular orbits; Partially independent control; Robust control; Anti-windup. 1 Introduction Widely applied to crew exchange, large-scale assembly, spacecraft maintenance, docking, interception, formation flying and other astronautic missions involving more than one spacecraft, autonomous spacecraft rendezvous has been regarded as a crucial operational technology in aerospace engineering. As the autonomous control scheme is a cardinal and decisive issue that determines the success of the rendezvous, it has been and continues to be an engaging area of study. Most of the mathematical models employed in investigating spacecraft rendezvous are derived from the two-body problem. Because of their concise and linearized form, Clohessy-Wiltshire equations (Clohessy and Wiltshire, 1960) were favored by many researchers, though this model was initially developed to describe the rendezvous in circular orbits. The models put forward by De Vries (1963) and Tschauner (1967) extended our knowledge to the rendezvous in elliptical orbits; however, nonlinear terms were involved, which circumscribed their broader implementations in control engineering. Considering the fact that most of the rendezvous missions were conducted in near-circular orbits with small eccentricities, researchers began to search for some eclectic models that are linearized and sufficiently precise. A comprehensive survey on these efforts was given by Carter (1998); nevertheless, all the linearization results introduced in this literature are in terms of either the true or eccentric anomaly of one spacecraft and require the solution of the Kepler problem, which is time and computational consuming. A time-explicit dynamical model overcoming this defect was first introduced by Anthony and Sasaki (1965), and a more recent development on time-explicit models was contributed by Melton (2000). Robust guaranteed cost control was first raised by Chang and Peng (1972) to optimize preassigned cost function, and many of the following literatures were carried out based on their works. Petersen and McFarlane (1994) synthesized a state feedback guaranteed cost controller via a Riccati equation approach. Yu and Chu (1999) designed a guaranteed cost controller for linear uncertain time-delay systems via a linear matrix inequality (LMI) method. Esfahani and Petersen (2000) solved the guaranteed cost output feedback control problem in a matrix substitution manner. More recently, Guan and Chen (2004) and Wu et al. (2011a) investigated the guaranteed cost control methods for time-delay systems. Zhang et al. (2008) studied a guaranteed cost control scheme for a class of uncertain stochastic nonlinear systems with multiple time delays. Tanaka et al. (2009) presented a guaranteed cost control for polynomial fuzzy systems via a sum of squares approach. Neng Wan is with Department of Mathematics and Statistics, University of Minnesota Duluth, Duluth 55811, USA (corresponding author). Email: [email protected]. Weiran Yao is with School of Astronautics, Harbin Institute of Technology, Harbin 150001, China. Email: [email protected]. 1 Robust H∞ control technique is frequently used in synthesizing guaranteed cost controllers for systems with external disturbances. This technique was first proposed by Zames (1981). Nonetheless, the focus of the H∞ control problem quickly shifted from its applications to formulating the solvable control problems due to the lack of an efficient tool to solve the H∞ problem. Time domain approach (Barmish, 1983), frequency domain approach (Francis, 1987) and Riccati equation approach (Khargonekar et al., 1990) were the three main methods in solving the H∞ control problems before the LMI approach (Boyd, 1994; Chilali and Gahinet, 1996) became widely used. For more recent papers on robust H∞ control, refer to Liu et al. (2011), Wu et al. (2011b) and references therein. Optimal spacecraft rendezvous problem has attracted numerous researchers. Some previous works on this topic have been introduced in Wan et al. (2013). Based on the sliding mode control theory, Ebrahimi et al. (2008) and Zhao et al. (2013) developed the optimal guidance laws for spacecraft rendezvous. Gao et al. (2009) investigated a multi-object robust H∞ control scheme for rendezvous in circular orbits. Li et al. (2013b) proposed a sample-data control technique for rendezvous via a discontinuous Lyapunov approach. Yang and Gao (2013) synthesized a robust reliable controller for thrust-limited rendezvous in circular orbits. Gao et al. (2012) studied a robust H∞ control approach for rendezvous in elliptical orbits. Yang et al. (2012) considered the spacecraft rendezvous with thrust nonlinearity and sampled-data control. Wan et al. (2013) put forward a robust tracking control method for relative position holding and rendezvous with actuator saturation in near-circular orbits; and in another paper of Wan et al. (2014), they provided an observer-based control scheme for spacecraft rendezvous. More recent works on optimal spacecraft rendezvous can be found in Li et al. (2013a), Li et al. (2013c), Sheng et al. (2014) and Zhou et al. (2014). Nevertheless, to the best of the authors’ knowledge, most of the existing literatures either synthesized a coupled rendezvous controller that regulated the in-plane and out-of-plane motions jointly or neglected the control task of out-of-plane motion. Although the in-plane and out-of-plane motions were treated separately by Gao et al. (2011), an identical control method was applied to two motions. Therefore, up to now, an efficient control scheme which accommodates the different dynamical and engineering features of the in-plane and the out-of-plane motions has not been proposed yet. In this paper, a time-explicit linearized model for rendezvous in near-circular orbits is established in a concise form that facilitates the controller synthesis; non-circularity of the reference orbits and external perturbations are considered to ensure the accuracy of the plant model. In-plane and out-of-plane motion controllers are synthesized respectively in order to meet the dynamical properties and requirements of each motion. For the in-plane motion usually driven by high-thrust propellers with high fuel consumption, a robust anti-windup guaranteed cost controller is synthesized to realize optimal rendezvous under the constraints of orbital non-circularity and actuator saturation. Moreover, it is well known that the out-of-plane maneuver or maneuver that changes the orbital inclination consumes much more energy compared with other kinds of orbital maneuvers (Curtis, 2005); therefore a robust H∞ controller is synthesized to guarantee the robust stability of the out-of-plane motion, which is usually driven by low-thrust propellers thus very sensitive to the external disturbances. Then the partially independent controller is obtained by solving two convex optimization problems subject to LMI constraints. At the end of this paper, a numerical rendezvous simulation is presented to verify the advantages of the partially independent control scheme over a coupled robust controller. The remainder of this paper is organized as follows. Section 2 establishes the dynamical models and formulates the control problems; Section 3 shows the main result of the partially independent control scheme; Section 4 presents a numerical simulation; and Section 5 draws the conclusion. Notation. The notations used throughout this paper are defined in this paragraph. k · k2 refers to the Euclidean vector norm. diag(· · · ) stands for a block-diagonal matrix. In symmetric block matrices or complex matrix expressions, an asterisk (∗) is used to represent a term that is induced by symmetry. For a matrix A, AT stands for the transpose of A; and sym(A) stands for A + AT when A is a square matrix. For a real symmetric matrix B, the notation B > 0 (B < 0) is used to denote its positive- (negative-) definiteness. I and 0 respectively denote the identity matrix and zero matrix with compatible dimension. If the dimensions of matrices are not explicitly stated, they are assumed to be compatible for algebraic operation. 2 2 Dynamical Model and Problem Formulation In this section, dynamical models for the in-plane and out-of-plane motions are established, and the control problems are formulated with the consideration of the different dynamical features and engineering demands of each motion. Suppose that a target vehicle is moving on a near-circular orbit with a chase vehicle nearby. Both of the spacecrafts are only influenced by a central gravitational source, and the target vehicle does not maneuver during the rendezvous. A relative Cartesian coordinate system adopted to describe the relative motion between the spacecrafts is defined in Figure 1. The system’s origin is fixed at the centroid of the target vehicle. The x-axis is parallel to the vector r from the Earth’s centroid to the target’s centroid; rc is the vector from the Earth’s centroid to the chaser’s centroid. The z-axis is aligned with the target orbit’s angular momentum vector, and the y-axis completes a right-handed coordinate system. rc z r x o x y Figure 1: Relative Cartesian coordinate system for spacecraft rendezvous. Some other important assumptions employed in this paper are also presumed here in case of ambiguity. Assumption 1. The propulsions of the chase vehicle are continuous and independent along each axis defined in Figure 1. Assumption 2. The initial out-of-plane distance and velocity between the chase and target spacecrafts are zeros. Assumption 3. Only the disturbance along the z-axis is included in the plant model, i.e., external perturbations along the orbital plane are neglected in this paper. Remark 1. As redundancy is a fundamental technology for spacecraft system, independent propulsions can be realized with a proper actuator allocation; therefore Assumption 1 is frequently taken in the existing literatures, such as Ebrahimi et al. (2008), Gao et al. (2009) and Zhou et al. (2014). Since out-of-plane maneuver that changes orbital inclination is fuel consuming (for example, when both the initial and terminal orbits are circular, the velocity increase ∆v required for an inclination change ∆i is ∆v = 2v sin(∆i/2), where v is the orbital velocity in a large magnitude.), the relative distance and velocity along the z−axis are often eliminated by launch vehicle before the close-range rendezvous, the phase we mainly investigates in this paper; therefore, Assumption 2 is reasonable. As it was mentioned above, for the out-of-plane motion, due to its dynamical and engineering properties, the fuel consumption and stability are more sensitive to the external perturbations compared with the other motions along the orbital plane; therefore, it is reasonable for us to conduct a special investigation in the crucial one while omitting the trivial ones, which is the main propose of Assumption 3. 2.1 Relative Motion Model Define the state vector as x(t) = [x, y, z, ẋ, ẏ, ż]T , which contains the relative distances and velocities along each axis; and define the control input vector as u(t) = [ fx , fy , fz ]T , where fi for i = x, y, z are the control forces acting on the chase 3 vehicle along each axis. Relative motion models for spacecraft rendezvous in all types of conic orbits can be uniformly expressed in a matrix form as ẋ(t) = An x(t) + Bu(t) , (1) where  0   0   0  An =  3 2µ/r + ω 2   −ω̇  0 0 0 1 0 0 0 0 1 0 0 0 0 ω̇ 0 0 2ω −µ/r3 + ω 2 0 −2ω 0 0 −µ/r3 0 0  0  0  1  , 0  0  0  0  0  1 0 B=  m 1  0  0 0 0 0 0 0 1  0  0  0  . 0  0  1 µ is the gravitational parameter; r is the radius of the reference orbit; ω and ω̇ are the angular rate and angular acceleration of the target vehicle; and m is the mass of the chase vehicle. As can be seen in (1), nonlinear terms exist in system matrix An , which makes the controller synthesis difficult. Therefore, a further linearization on (1) is necessary, and a lemma known as generalized Lagrange’s expansion theorem is introduced here before the linearization procedures. Lemma 1 (Battin, 1999). Let y be a function of x in terms of a parameter α by y = x + αφ (y) . (2) Then for sufficiently small α, any function F(y) can be expanded as a power series in α,   ∞ α n dn−1 n dF(x) F(y) = F(x) + ∑ φ (x) . n−1 dx n=1 n! dx (3) With equation r = a(1 − e cos E) , (4) where a and e denote the semimajor axis and the eccentricity of the reference orbit; E denote the eccentric anomaly of the target vehicle; nonlinear terms in system matrix An can be rewritten as the functions in terms of E, such as  a 3 µ = n2 = n2 3 r r  1 1 − e cos E 3 ,  2 h 1 ω = 2 =n , r 1 − e cos E ω2 = ω̇ = − h2 = n2 r4  1 1 − e cos E (5a) (5b) 4 , 2h e sin E ṙ = −2n2 , r3 (1 − e cos E)4 (5c) (5d) where h is the angular momentum of the reference orbit. Moreover, according to Lemma 1 and Kepler’s time equation E = M + e sin E , where M = n(t − t p ) and n = p (6) µ/a3 are the mean anomaly and the mean motion of the target vehicle respectively; t p is the time of periapsis passage; when eccentricity e is sufficiently small, any function F(E) can be expanded as a power series in constant e. Therefore, equations (5a-d) can be expanded as µ = n2 r3 ( " # ) e2 12e2 sin4 M 9e cos M sin2 M − + − +··· , 2 (1 − e cos M)5 (1 − e cos M)3 (1 − e cos M)4 (1 − e cos M)4 1 3e2 sin2 M 4 (7a) ( " # ) e2 6e2 sin4 M 6e cos M sin2 M ω =n − + − +··· , 2 (1 − e cos M)4 (1 − e cos M)2 (1 − e cos M)3 (1 − e cos M)3 # ) ( " 2 2 sin2 M 2 2 sin4 M 4e e 12e cos M sin M 1 20e − + − +··· , ω 2 = n2 2 (1 − e cos M)6 (1 − e cos M)4 (1 − e cos M)5 (1 − e cos M)5 ( " # ) e sin M cos M 4e sin2 M 2 2 ω̇ = −2n + e sin M − +··· . (1 − e cos M)4 (1 − e cos M)4 (1 − e cos M)5 2e2 sin2 M 1 (7b) (7c) (7d) Computing the Taylor series expansions of (7a-d) around point e = 0, we have    e2 µ e3 2 4 = n 1 + 3e cos M + (9 cos 2M + 3) + (53 cos 3M + 27 cos M) + O e , r3 2 8 (8a)    e3 e2 ω = n 1 + 2e cos M + (5 cos 2M + 1) + (13 cos 3M + 3 cos M) + O e4 , 2 4 (8b)    e3 ω 2 = n2 1 + 4e cos M + e2 (7 cos 2M + 3) + (23 cos 3M + 17 cos M) + O e4 , 2 (8c)      23 19 5e2 sin 2M + e3 sin 3M + 4 cos 2M sin M + sin M + O e4 . ω̇ = −2n2 e sin M + 2 8 8 (8d) Truncating the expansions (8a-d) to order e and substituting the results into (1), the linearized relative motion model becomes ẋ(t) = (A + ∆A)x(t) + Bu(t) , (9) where  0   0   0  A= 2 3n   0  0  0 0 0 0 0 0 0 0 0 0 0 −n2 0   0   0  ∆A =  2 10en cos M   2en2 sin M  0  0  0 1 0  0 0 1  , 0 2n 0  −2n 0 0  0 0 0 1 0  0  0  1 0 B=  m 1  0  0 0 0 0 0 1 0  0  0  0  , 0  0  1 0 0 0 0 0 0 0 0 0 0 0 0 −2en2 sin M 0 0 4en cos M en2 cos M 0 −4en cos M 0 0 −3en2 cos M 0 0  0  0  0  . 0  0  0 The time-variant and norm-bounded matrix ∆A is defined as the non-circularity matrix, which contains the shape information of the reference orbit. Hereby, we have finished the linearization procedures. Remark 2. Compared with C-W equations (Clohessy and Wiltshire, 1960), the non-circularity matrix ∆A makes the model (9) more accurate and practical for engineering applications, while compared with the nonlinear model (1), the linearized representation of (9) makes the controller synthesis easier. Remark 3. Although the non-circularity matrix ∆A in model (9) is exactly known, it satisfies the matched condition usually employed to describe the unknown uncertainty, ∆A = DF(t)E (Khargonekar et al., 1990), which brings some convenience to controller synthesis. Therefore, this kind of time-variant matrices are sometimes treated as unknown uncertainty in some literatures, such as Yang and Gao (2013), Wang et al. (2014) and Wan et al. (2014). 5 In order to construct a partially independent control scheme with the in-plane and out-of-plane controllers synthesized separately, we will decompose model (9) and formulate the control problems with regard to each plane respectively in the rest of this section. In-Plane Motion Model The state vector of in-plane motion is defined as p(t) = [x, y, ẋ, ẏ]T , and the control input vector is denoted as u p (t) = [ fx , fy ]T . Then according to (9), the mathematical model of in-plane motion can be extracted as ṗ(t) = (A p + ∆ A p )p(t) + B p u p (t) , (10) where  0   0 Ap =  3n2  0   0 1 0 0 0 0 0 0 −2n  1 , 2n  0 0   0 ∆A p =  10en2 cos M  2en2 sin M  0  0 , 0  1  0   1 0 Bp =  m 1 0 0 0 0 0 0 −2en2 sin M 0 en2 cos M −4en cos M    . 4en cos M   0 0 The norm-bounded matrix ∆A p can be factorized as ∆ A p = E p1 Λ p E p2 , (11) where E p1 , E p2 and Λ p are matrices with proper dimensions and satisfy ΛTp Λ p < I. Out-of-Plane Motion Model The state vector of out-of-plane motion is defined as q(t) = [z, ż]T , and the control input is denoted as uq (t) = fz . According to Assumption 3, external disturbance wq (t) should be involved into the out-of-plane motion model extracted from (9). Then the model can be expressed as q̇(t) = (Aq + ∆ Aq ) q(t) + Bq [uq (t) + wq (t)] , (12) where " Aq = 0 1 −n2 0 # " , ∆Aq = 0 # 0 −3en2 cos M 0 , " # 1 0 Bq = . m 1 The norm-bounded matrix ∆Aq can be factorized as ∆ Aq = Eq1 Λq Eq2 , (13) where Eq1 , Eq2 and Λq are matrices with proper dimensions and satisfy ΛTq Λq < I. Remark 4. From equations (10) and (12), it can be seen that the motions along the orbital plane are coupled, which means a coupled controller should be employed, while the motion along the z-axis can be governed by an independent controller. That is the reason why the authors name this method partially independent control scheme. 6 2.2 Problem Formulation Robust stability, bounded propulsions and optimal cost function are the three main objectives we will consider when designing the partially independent control scheme. With these requirements, the control problems of in-plane and out-ofplane motions will be formulated successively as follows. Control Problem for In-Plane Motion In order to assess the fuel and time consumptions of in-plane motion within a performance index, the quadratic cost function of in-plane motion is defined as Jp = Z ∞ 0  pT (t)Q p p(t) + uTp R p u p (t) dt , (14) where the positive symmetric matrix R p ∈ R2×2 is related to the fuel consumption; and the positive symmetric matrix Q p ∈ R4×4 is related to the state convergence rate and the smoothness of trajectory (Yang and Gao, 2011). With two auxiliary matrices, U px = [1, 0]T [1, 0] and U py = [0, 1]T [0, 1], thrust constraints along the x- and y-axis can be formulated as | fi | = U pi u(t) ≤ u pi,max , (i = x, y) , (15) where u pi,max are the maximum control forces that can be generated by the propellers along i-axis. With the motion model (10) and the requirements presented at the preliminary of Section 2.2, the control task of in-plane motion can be described as: design an anti-windup robust guaranteed cost controller such that (i) In-plane motion system (10) is asymptotically stable at p(t) = 0, i.e., the chase vehicle can eventually rendezvous with the target vehicle; (ii) Quadratic cost function (14) is minimal, i.e., an optimal compromise between the fuel consumption and the state convergence rate shall be reached; (iii) Control forces along the x- and y-axis should satisfy the saturation constraints (15). Control Problem for Out-of-Plane Motion In order to evaluate the fuel and time consumptions of out-of-plane motion within a performance index, the quadratic cost function for out-of-plane motion is defined as Jq = Z ∞  qT (t)Qq q(t) + uTq Rq uq (t) dt , (16) 0 where Qq and Rq are the state weighting matrix and control weighting scale, which have the same functions as matrices Q p and R p introduced in (14). When external perturbation wq (t) is considered in (12), to keep the chase vehicle from deviating from the orbital plane, the capability of actuator uq,max must be greater than the largest perturbation force wq,max . Moreover, to attenuate or to cancel the perturbation, out-of-plane propulsion uq (t) should follow wq (t) exactly; therefore, additional consideration of actuator saturation along the z-axis is unnecessary. With the motion model (12) and the requirements illustrated above, the control task of out-of-plane motion can be summarized as: design a robust H∞ controller such that (iv) Out-of-plane motion system (12) is robustly stable at q(t) = 0, i.e., the chase vehicle can be stabilized on the reference orbital plane in the presence of non-circularity ∆Aq and external perturbation wq (t); (v) Quadratic cost function (16) is minimal, i.e., an optimal compromise between the fuel consumption and the state convergence rate shall be realized subject to the external perturbation wq (t). 7 3 Partially Independent Control Scheme In this section, an anti-windup robust guaranteed cost controller and a robust H∞ controller will be synthesized successively to construct the partially independent control scheme for spacecraft rendezvous. Firstly, a lemma that will be employed in the subsequent derivation is introduced here. Lemma 2 (Khargonekar et al., 1990). Given matrices Y = Y T , D and E of appropriate dimensions, Y + DFE + ET FT DT < 0 , (17) for all F satisfying FT F ≤ I, if and only if there exists a scalar ε > 0 such that Y + ε D DT + ε −1 ET E < 0 . 3.1 (18) In-Plane Motion Controller Consider the following state feedback control law u p (t) = −K p p(t) , (19) where K p ∈ R2×4 is the state feedback gain matrix of in-plane motion controller. Substituting equation (19) into the plant model (10), the closed-loop model for in-plane motion is ṗ(t) = (A p + ∆ A p − B p K p ) p(t) . (20) Sufficient condition for the existence of a thrust-limited robust guaranteed cost controller is described in Theorem 1. Theorem 1. Consider the closed-loop system (20) with the state feedback control law in (19). For a given initial state vector p(0), if there exist a positive symmetric matrix X p ∈ R4×4 , a matrix Y p ∈ R2×4 , positive scalars ε p and ρ satisfying  sym (A p X p − B p Y p ) + ε p E p1 ETp1 X p ETp2 Y Tp   ∗ −ε p I 0   ∗ ∗ −R−1  p ∗ ∗ ∗ " # −ρ −1 ρ −1 pT (0) <0, ∗ −X p " # −ρ −1 I U pi Y p <0, ∗ −u2pi,max X p Xp   0  <0, 0   −Q−1 p (21) (22) (23) then there exists an in-plane motion controller such that requirements (i), (ii) and (iii) are satisfied, and positive scalar ρ is an upper bound of the quadratic cost function (14). Proof. Consider the Lyapunov function Vp (t) = pT (t)P p p(t), where P p ∈ R4×4 is a positive symmetric matrix. Substituting (20) into the derivative of Vp (t), we have   V̇p (t) = sym pT (t)P p (A p + ∆ A p − B p K p ) p(t) . (24) In order to optimize the cost function (14) and guarantee the asymptotic stability of in-plane motion, let inequalities (25) hold   V̇p (t) < − pT (t)Q p p(t) + uTp (t)R p u p (t) < 0 . 8 (25) Integrating (25) from 0 to ∞ and noticing that p(t) → 0 as t → ∞, we get 0 < Jp = Z ∞ 0  pT (t)Q p p(t) + uTp (t)R p u p (t) dt ≤ Vp (0) . (26) From (26), we know that when inequalities (25) hold, Vp (0) = pT (0)P p p(0) will be an upper bound of the quadratic cost function J p . Substituting (11), (19) and (24) into (25) yields Ψ p + P p E p1 Λ p E p2 + ETp2 ΛTp (P p E p1 )T < 0 , (27) where Ψ p = sym [P p (A p − B p K p )] + Q p + K Tp R p K p . Since Ψ p is a symmetric matrix, according to Lemma 2 and (11), there exists a positive scalar ε p ensuring (27) by Ψ p + ε p P p E p1 (P p E p1 )T + ε p−1 ETp2 E p2 < 0 . By Schur complement, inequality (28) can be rewritten in a matrix form as " # Π11 Π12 <0, ∗ Π22 (28) (29) where Π11 = sym [P p (A p − B p K p )] + ε p P p E p1 ETp1 PTp , h i Π12 = ETp2 K Tp I ,  −1 Π22 = diag −ε I, −R−1 . p , −Q p −1 With the variable substitutions, X p = P−1 p and Y p = K p P p , pre- and post-multiply (29) with diag(X p , I), and then (21) in Theorem 1 is obtained. To minimize Vp (0), an upper bound of J p , a positive scalar ρ is introduced and meets Vp (0) = pT (0)P p p(0) ≤ ρ . By Schur complement, inequality (30) is equivalent to " ρ pT (0) ∗ −P−1 p (30) # <0. (31) Pre- and post-multiplying (31) with diag(ρ −1 , I), the LMI constraint (22) in Theorem .1 is obtained. LMIs (21) and (22) have fulfilled the requirements (i) and (ii). In order to meet the requirement (iii), squaring both sides of (15) and dividing each side by u2pi,max , then there is T u−2 pi,max [U pi K p p(t)] U pi K p p(t) ≤ 1 . (32) Dividing both sides of (30) by ρ and considering V̇p (t) < 0, we have ρ −1Vp (t) < ρ −1Vp (0) ≤ 1 . (33) T −1 u−2 Pp . pi,max [U pi K p ] U pi K p < ρ (34) Then we can guarantee the inequality (32) by By Schur complement, inequality (34) can be rewritten as " −ρ −1 I ∗ U pi K p −u2pi,max P p # <0. (35) Pre- and post-multiplying (35) with diag(I, X p ), the LMI constraint (23) in Theorem 1 is obtained. This completes the  proof. 9 It can be inferred from (30) that the quadratic cost function J p will be optimal if the positive scalar ρ is minimized. Therefore, another positive scalar σ is introduced and meets σ > ρ, which is equivalent to " # −σ 1 <0. 1 −ρ −1 (36) Then combining Theorem 1 and (36), the thrust-limited robust guaranteed cost controller for in-plane motion with initial state p(0) can be obtained by solving the following convex optimization problem min ε p , ρ −1 , X p , Y p σ, (37) s.t. (21), (22), (23) and (36). The state feedback gain matrix K p can be solved by K p = Y p X−1 p . Remark 5. Since no preassigned parameter is needed in Theorem 1, the motion controller obtained from (37) is less conservative and therefore more practical than the controllers employed in Gao et al. (2009) and Yang and Gao (2013) when implemented to spacecraft rendezvous, which can be drawn from the minimum feasible upper bounds of actuators. 3.2 Out-of-Plane Motion Controller Consider the following state feedback control law uq (t) = −Kq q(t) , (38) where Kq ∈ R1×2 is the state feedback gain matrix of the out-of-plane motion controller. Substituting (38) into the plant model (12), the closed-loop model for out-of-plane motion is q̇(t) = (Aq + ∆ Aq − Bq Kq ) q(t) + Bq wq (t) . (39) To optimize cost function Jq in the presence of external disturbance wq (t), define a controlled output as 1 1 zq (t) = Qq2 q(t) + Rq2 uq (t) . (40) Then requirement (v) can be fulfilled by minimizing kzq (t)k2 , which is assumed to be bounded by kzq (t)k2 ≤ γkw(t)k2 , (41) where γ is the H∞ performance. Sufficient condition for the existence of a robust H∞ controller is given in Theorem 2. Theorem 2. Consider the closed-loop system (39) with the state feedback control law in (38). If there exist a positive symmetric matrix Xq ∈ R2×2 , a matrix Yq ∈ R1×2 and a positive scalar εq satisfying  sym (Aq Xq − Bq Yq ) + εq Eq1 ETq1 Bq Xq ETq2 0 YqT   ∗ −γ 2 I 0 0 0   ∗ ∗ −εq I 0 0    ∗ ∗ ∗ −ε I 0 q   ∗ ∗ ∗ ∗ −R−1  q I ∗ ∗ ∗ ∗ ∗ Xq  0   0   <0, 0   0   −Q−1 q then there exists an in-plane motion controller such that requirements (iv) and (v) are satisfied. 10  (42) Proof. Consider the Lyapunov function Vq (t) = qT (t)Pq q(t), where Pq ∈ R2×2 is a positive symmetric matrix. Substituting (39) into the derivative of Vq (t), there is " V̇q (t) = q(t) #T " sym [P p (Aq + ∆Aq − Bq Kq )] ∗ wq (t) Pq Bq #" q(t) # wq (t) 0 . (43) Assuming external disturbance wq (t) to be 0, the derivate of Vq (t) becomes   V̇q0 (t) = sym qT (t)Pq (Aq + ∆ Aq − Bq Kq ) q(t) . (44) zTq (t)zq (t) − γ 2 wTq (t)wq (t) ≤ 0 . (45) Squaring both sides of (41), there is Integrating (45) from 0 to ∞, we have Z ∞ 0  zTq (t)zq (t) − γ 2 wTq (t)wq (t) + V̇q (t) dt +Vq (0) −Vq (∞) ≤ 0 . (46) According to Assumption 2 of zero-initial condition and the fact Vq (∞) > 0, inequalities (41), (45) and (46) can be guaranteed by zTq (t)zq (t) − γ 2 wTq (t)wq (t) + V̇q (t) ≤ 0 . Substituting (40) and (43) into (47), we can obtain " sym [P p (Aq + ∆Aq − Bq Kq )] + Qq + KqT Rq Kq Pq Bq −γ 2 I ∗ (47) # <0. (48) By Schur complement, inequality (48) can be rewritten as Θ1 < Θ2 , (49) where Θ1 = sym [Pq (Aq + ∆Aq − Bq Kq )] , Θ2 = −Qq − KqT Rq Kq − γ −2 Pq Bq (Pq Bq )T . From (49), we can learn that Θ2 < 0; thus Θ1 < 0 and V̇q0 < 0, i.e., inequality (48) guarantees the stabilities of the nominal model (without disturbance) as well as the perturbed model (12), which fulfills requirement (iv). Substituting (13) into (48), we have Ψq + ∆q Φq Eq + ETq ΦTq ∆Tq < 0 , (50) where Ψq = " sym [Pq (Aq − Bq Kq )] + Qq + KqT Rq Kq ∆q = Pq Eq1 # 0 0 0 , Φq = " Λq 0 # 0 0 # −γ 2 I " ∗ " Pq Bq , Eq = , # Eq2 0 0 0 . Since Ψq is a symmetric matrix, according to Lemma 2 and (13), there exists a positive scalar εq ensuring (50) by Ψq + εq ∆q ∆Tq + εq−1 ETq Eq < 0 . By Schur complement, inequality (51) is equivalent to " Ω11 ∗ Ω12 Ω22 11 (51) # <0, (52) where Ω11 = " sym [Pq (Aq − Bq Kq )] + εq Pq Eq1 ETq1 PqT Pq Bq −γ 2 I ∗ # " , Ω12 = # ETq2 0 KqT I 0 0 0 0 ,  −1 Ω22 = diag −ε I, ε I, −R−1 . q , −Qq Define the variable substitutions Xq = Pq−1 and Yq = Kq Pq−1 . Pre- and post-multiplying (52) with diag(Xq , I), the LMI  constraint (42) is obtained. This completes the proof. Remark 6. In the proof of Theorem 2, zero-initial condition has been utilized to synthesize the robust H∞ controller, which is a reasonable simplification for the engineering problem described in this paper. However, for the situation when zeroinitial condition is not satisfied, some extended robust H∞ control methods can be adopted, which have been discussed by Khargonekar et al. (1991), Namerikawa et al. (2002), Savkin et al. (2003) and Foo (2006). Nevertheless, due to the implicit expressions of H∞ performance and more rigorous assumptions, extended robust H∞ controllers are not frequently employed in the existing literatures. The robust H∞ controller for out-of-plane motion can be obtained by solving the following convex optimization problem min γ , εq , Xq , Yq (53) s.t. (42) . State feedback gain matrix Kq can be determined by Kq = Yq Xq−1 . With the state feedback gain matrices K p and Kq solved from (37) and (53), a partially independent control scheme for spacecraft rendezvous can be constructed, and we will discuss this procedure detailedly in the next section with an illustrative example. 4 Illustrative Example In this section, a comparison between the partially independent and coupled control schemes will be conducted to illustrate the advantages of the former. All the simulation results were obtained from a two-body model: µ r = 0, r3 (54a) u+w µ rc = , rc3 m (54b) r̈ + r̈c + where the position vectors r and rc have been defined in Figure 1 and satisfy rc − r = x(t); m and u are the mass and control vector of the chase vehicle; and w is the disturbance, which consists of long and short period perturbations along the z−axis. Consider a rendezvous scenario as follows. A target vehicle is in a low earth orbit (LEO) with eccentricity e = 0.05 and semimajor axis a = 7082.253 km; then we can figure out that the mean motion of the target vehicle is n = 1.059 × 10−3 rad/s, i.e., the period of the reference orbit is T = 5931.53 s; the initial state vector is x(0) = [−5000, 5000, 0, 5, −5, 0], and the mass of the chase vehicle is m = 500 kg. When solving the convex problem (37), the minimum feasible upper bound of the in-plane propulsion is 6.8 N; nevertheless, considering the discrepancy between the plant models (10, 12) and simulation model (54a-b), the upper bounds of the in-plane propulsions are set u px,max = u py,max = 15 N to guarantee the robustness of the controllers. In (12), consider an extreme unknown out-of-plane disturbance that may rarely exist in reality  wq (t) = 4.3 sin 1.059 × 10−3t + 0.5 sin (0.1059t) . (55) where the first term represents long period perturbation caused by the nonhomogeneity of central planet and gravitational forces from other celestial bodies, etc; while the second term represents short period perturbation caused by the solar wind, 12 atmospheric drag, etc. Therefore, in this example, the upper bound of the out-of-plane propulsion is set uq,max = 5 N, which is greater than the maximum disturbance wq,max ≈ 4.8 N. All the weighting matrices and scalar, Q p , Qq , R p and Rq , are assigned to be units. With these parameters, a partially independent controller and a coupled controller for comparison are to be solved in the following sections. 4.1 Partially Independent Controller The partially independent control scheme can be synthesized by solving (37) and (53). For in-plane motion controller (37), the initial state vector is p(0) = [−5000, 5000, 5, −5]T , and the matrices E p1 , E p2 and Λ p in (11) are assigned as follows:   0 0  0 E p1 =  0  0  0 , 4e 0   0 4e 2e 2e 0 0  0 0 n2   0 E p2 =  2.5n2  0 0 n2 0 0.25n2  0  0 0 , 0 n  −n 0 0 (56) Λ p = diag (sin M, − sin M, cos M, cos M) , where the mean anomaly M = nt. Then solving (37), the state feedback gain matrix for in-plane motion controller is obtained h K p = K p,11 i K p,12 = " 0.0024 −0.0013 0.7535 # 0.0593 0.0015 0.0010 0.2952 1.3332 . (57) where K p,11 and K p,12 ∈ R2×2 . For the out-of-plane motion controller (53), the initial state vector is q(0) = [0, 0]T , and the matrices Eq1 , Eq2 and Λq in (13) are assigned as follows: " # " # " # 0 0 n2 0 −0.5 cos M 0 Eq1 = , Eq2 = , Λq = . (58) 6e 0 0 0 0 0 Solving (53), the optimal H∞ performance is γ = 1.000778383, and the state feedback gain matrix for out-of-plane motion controller is h Kq = Kq,11 i h Kq,12 = 196.8030 i 5.8353 × 104 . Combing (57) and (59) together, the state feedback gain matrix for partially independent controller is " # K p,11 02×1 K p,12 02×1 K pic = . 01×2 Kq,11 01×2 Kq,12 (59) (60) where K pic ∈ R3×6 , and the control vector in (54b) is generated by u pic (t) = −K pic x(t). 4.2 Coupled Controller In Section 3, the in-plane motion controllers for x− and y−axis were synthesized jointly, while the out-of-plane motion controller was designed independently. To verify the advantages of this scheme in robustness, we will introduce a coupled rendezvous controller in this section for comparison. The coupled control scheme synthesizes x−, y− and z−axis controllers together and meets the requirements similar as (i), (ii) and (iii); therefore, the coupled controller can be attained by solving a convex optimization problem similar as Theorem 1. For brevity, the result of coupled control scheme will be given directly, while the detailed derivations of it will not be included in this paper. However, some similar procedures for synthesizing a coupled controller can be found in Yang and Gao (2013), Sheng et al. (2014) and Wan et al. (2013, 2014). With the same 13 parameters assigned in previous sections, the control vector in (54b) for coupled control scheme is generated by ucc (t) = −Kcc x(t), where the state feedback gain matrix Kcc is 4.3  0.0024 −0.0014 2.1542 × 10−4 0.8445 0.0467 0.1198  Kcc =  0.0017 7.487 × 10−4 −4.3822 × 10−4 0.5689 1.3525 3.5306 × 10−4 −2.0446 × 10−4 5.2548 × 10−4  0.1901 , 0.1792 0.0234 0.7065  (61) Simulation Results All the simulation data are collected from the two-body model (4.1a-b), which is more adjacent to the practical circumstance than plant models (9), (10) and (12). The simulation results of in-plane and out-of-plane motions will be shown successively as follows. In-Plane Motion The relative in-plane trajectories of the chase vehicles with different control schemes are depicted in Figure 2. The in-plane distances and control propulsions of the chase vehicle with partially independent control scheme are illustrated in Figure 3 and Figure 4 respectively. 5000 Chaser upic ucc 4000 y/m 3000 2000 Trajectories 1000 Target 0 -1000 -5000 -4000 -3000 -2000 -1000 0 1000 x/m Figure 2: In-plane rendezvous trajectories in first 5000 s. Relative distances along x-axis and y-axis (m) 5000 x-axis y-axis 4000 3000 2000 1000 0 -1000 -2000 -3000 -4000 -5000 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Time (s) Figure 3: In-plane relative distances between two spacecraft in the first 5000 s. 14 Control thrusts along x-axis and y-axis (N) 16 x-axis y-axis 14 12 10 8 6 4 2 0 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Time (s) Figure 4: In-plane control propulsions of chase vehicle in the first 5000 s. Remark 7. Figure 2 and Figure 3 show that the partially independent controller u pic (t) fulfilled the requirement (i), asymptotic stability at p(t) = 0, while the coupled controller ucc (t) failed in finishing the rendezvous, which is one of the advantages of u pic (t) over ucc (t). Figure 4 shows that the in-plane control propulsions of the chase vehicle with u pic (t) are restricted below the upper bounds u px,max = u py,max = 15 N, which fulfilled the requirement (iii). Out-of-Plane Motion The out-of-plane distances and control propulsions of the chase vehicles with different control schemes are illustrated in Figure 5 and Figure 6. Figure 7 depicts the overall performance costs of the rendezvouses with different schemes. (a) (b) 0.025 5000 Relative distance along z-axis (m) Relative distance along z-axis (m) 0.02 0.015 0.01 0.005 0 -0.005 -0.01 -0.015 -0.02 -0.025 4000 3000 2000 1000 0 -1000 -2000 -3000 -4000 0 1000 2000 3000 4000 5000 6000 7000 8000 -5000 9000 10000 0 1000 2000 3000 Time (s) 4000 5000 6000 7000 8000 9000 10000 Time (s) Figure 5: Relative out-of-plane distance between two spacecrafts in the first 10000 s. (a) Out-of-plane distance with partially independent controller u pic (t). (b) Out-of-plane distance with coupled controller ucc (t). Remark 8. From Figure 5, we can conclude that the partially independent controller u pic (t) fulfilled the requirement (iv), robust stability at q(t) = 0, while the coupled controller ucc (t) failed again. From Figure 6, we can find that u pic (t) tracked and suppressed the disturbance w(t) well, while the disturbance rejection ability of ucc (t) was very poor; moreover, the magnitude of the out-of-plane propulsion was bounded and proportional to the magnitude of wq (t), which made our control method practical for engineering applications. From Figure 7, we can find that although the coupled control scheme optimize the overall cost function jointly, when out-of-plane disturbance exists, the overall cost function of the partially independent control scheme is much lower, which is another advantage of u pic (t) over ucc (t). 15 (b) 5 5 4 4 Control propulsion along z-axis (N) Control propulsion along z-axis (N) (a) 3 2 1 0 -1 -2 -3 3 2 1 0 -1 -2 -3 -4 -5 -4 0 1000 2000 3000 4000 5000 6000 7000 8000 -5 9000 10000 0 1000 2000 3000 4000 Time (s) 5000 6000 7000 8000 9000 10000 Time (s) Figure 6: Out-of-plane control propulsion of chase vehicle in the first 10000 s. (a) Out-of-plane control propulsion with partially independent controller u pic (t). (b) Out-of-plane control propulsion with coupled controller ucc (t). 11 Overall cost function Jp + Jq 10 10 10 9 10 upic ucc 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Time (s) Figure 7: Overall cost function in the first 5000 s. 5 Conclusions In sum, this paper has proposed a partially independent control scheme for thrust-limited rendezvous in near-circular orbits. Based on the two-body problem, a linearized dynamical model for near-circular rendezvous has been established. An anti-windup robust guaranteed controller for in-plane motion and a robust H∞ controller have been synthesized to construct the partially independent control scheme. Finally, a comparative simulation has been employed to verify the advantages of the partially independent scheme over the coupled one. Due to its robust stability, optimal performance cost and bounded control propulsion, the partially independent control scheme has a wide range of application in spacecraft rendezvous. 6 Acknowledgment The authors specially acknowledge the staff and the readers from arXiv.org. References Anthony, M. L. and Sasaki, F. T. (1965). “Rendezvous problem for nearly circular orbits.” AIAA J., 3(9), 1666–1673. Barmish, B. R. (1983). “Stabilization of uncertain systems via linear control.” IEEE T. Automat. Contr., 28(8), 848–850. 16 Battin, R. H. (1999). An introduction to the mathematics and methods of astrodynamics. AIAA, Ohio. Boyd, S. P. (1994). Linear matrix inequalities in system and control theory, Vol. 15. SIAM, Philadelphia. Carter, T. E. (1998). “State transition matrices for terminal rendezvous studies: brief survey and new example.” J. Guid. Control Dyn., 21(1), 148–155. Chang, S. S. L. and Peng, T. K. C. (1972). “Adaptive guaranteed cost control of systems with uncertain parameters.” IEEE T. Automat. Contr., 17(4), 474–483. Chilali, M. and Gahinet, P. (1996). “H∞ design with pole placement constraints: an LMI approach.” IEEE T. Automat. Contr., 41(3), 358–367. Clohessy, W. H. and Wiltshire, R. S. (1960). “Terminal guidance system for satellite rendezvous.” J. Aerosp. Sci., 29, 653–658. Curtis, H. (2005). Orbital mechanics for engineering students. Butterworth-Heinemann. De Vries, J. P. (1963). “Elliptic elements in terms of small increments of position and velocity components.” J. Aerosp. Sci., 1(11), 2626–2629. Ebrahimi, B., Bahrami, M., and Roshanian, J. (2008). “Optimal sliding-mode guidance with terminal velocity constraint for fixed-interval propulsive maneuvers.” Acta Astronaut., 62(10), 556–562. Esfahani, S. H. and Petersen, I. R. (2000). “An LMI approach to the output-feedback guaranteed cost control for uncertain time-delay systems.” Int. J. Robust Nonlin., 10(3), 157–174. Foo, Y. K. (2006). “H∞ control with initial conditions.” IEEE T. Circuits Syst., 53(9), 867–871. Francis, B. A. (1987). A course in H∞ control theory. Springer, Berlin. Gao, H., Yang, X., and Shi, P. (2009). “Multi-objective robust H∞ control of spacecraft rendezvous.” IEEE T. Contr. Syst. T., 17(4), 794–802. Gao, X., Teo, K. L., and Duan, G. R. (2011). “Non-fragile guaranteed cost control for robust spacecraft orbit transfer with small thrust.” IMA J. Math. Control I., 28(4), 507–524. Gao, X., Teo, K. L., and Duan, G. R. (2012). “Robust H∞ control of spacecraft rendezvous on elliptical orbit.” J. Franklin I., 349(8), 2515–2529. Guan, X. P. and Chen, C. L. (2004). “Delay-dependent guaranteed cost control for t-s fuzzy systems with time delays.” IEEE T. Fuzzy Syst., 12(2), 236–249. Khargonekar, P. P., Nagpal, K. M., and Poolla, K. R. (1991). “H∞ control with transients.” SIAM J. Control Optim., 29(6), 1373–1393. Khargonekar, P. P., Petersen, I. R., and Zhou, K. (1990). “Robust stabilization of uncertain linear system: quadratic stability and H∞ control theory.” IEEE T. Automat. Contr., 35(3), 356–361. Li, Z., Liu, M., Karimi, H. R., and Cao, X. (2013a). “Observer-based stabilization of spacecraft rendezvous with variable sampling and sensor nonlinearity.” Math. Probl. Eng., Article ID 902452, 11 pages. Li, Z., Liu, M., Karimi, H. R., and Cao, X. (2013b). “Sampled-data control of spacecraft rendezvous with discontinuous lyapunov approach.” Math. Probl. Eng., Article ID 814271, 10 pages. Li, Z., Yang, X., and Gao, H. (2013c). “Autonomous impulsive rendezvous for spacecraft under orbital uncertainty and thruster faults.” J. Franklin I., 350(9), 2455–2473. Liu, M., You, J., and Ma, X. (2011). “H∞ filtering for sampled-data stochastic systems with limited capacity channel.” Signal Process., 91(8), 1826–1837. Melton, R. G. (2000). “Time-explicit representation of relative motion between elliptical orbits.” J. Guid. Control Dyn., 23(4), 604–610. Namerikawa, T., Fujita, M., and Smith, R. S. (2002). “A generalized H∞ control system design attenuating initial state uncertainties.” Proceedings of the American Control Conference, 2204–2209. Petersen, I. R. and McFarlane, D. C. (1994). “Optimal guaranteed cost control and filtering for uncertain linear systems.” IEEE T. Automat. Contr., 39(3), 1971–1977. Savkin, A. V., Pathirana, P. N., and Faruqi, F. A. (2003). “Problem of precision missile guidance: LQR and H∞ control 17 frameworks.” IEEE T. Aero. Elec. Sys, 39(3), 901–910. Sheng, D., Yang, X., and Karimi, H. R. (2014). “Robust control for autonomous spacecraft evacuation with model uncertainty and upper bound of performance with constraints.” Math. Probl. Eng., Article ID 589381, 16 pages. Tanaka, K., Ohtake, H., and Wang, H. O. (2009). “Guaranteed cost control of polynomial fuzzy systems via a sum of squares approach.” IEEE T. Syst. Man Cy. B, 38(2), 561–567. Tschauner, J. (1967). “Elliptic orbit rendezvous.” AIAA J., 5(6), 1110–1113. Wan, N., Liu, M., and Karimi, H. R. (2013). “Robust tracking control for rendezvous in near-circular orbits.” Math. Probl. Eng., Article ID 726945, 11 pages. Wan, N., Liu, M., and Karimi, H. R. (2014). “Observer-based robust control for spacecraft rendezvous with thrust saturation.” Abstr. Appl. Anal., Article ID 710850, 10 pages. Wang, Q., Zhou, B., and Duan, G. (2014). “Robust gain scheduled control of spacecraft rendezvous system subject to input saturation.” Proceedings of the Chinese Control Conference, 4204–4209. Wu, L., Lam, J., and Xiong, J. (2011a). “Robust guaranteed cost control of discrete-time networked control systems.” Math. Probl. Eng., 32(1), 95–112. Wu, L., Su, X., and Shi, P. (2011b). “Mixed H2 /H∞ approach to fault detection of discrete linear repetitive processes.” J. Franklin I., 348(2), 393–414. Yang, X., Cao, X., and Gao, H. (2012). “Sampled-data control for relative position holding of spacecraft rendezvous with thrust nonlinearity.” IEEE T. Ind. Electron., 59(2), 1146–1153. Yang, X. and Gao, H. (2011). “Guaranteed cost output tracking control for autonomous homing phase of spacecraft rendezvous.” J. Aerospace Eng., 24(4), 478–487. Yang, X. and Gao, H. (2013). “Robust reliable control for autonomous spacecraft rendezvous with limited-thrust.” Aerosp. Sci. Technol., 24(1), 161–168. Yu, L. and Chu, J. (1999). “An LMI approach to guaranteed cost control of linear uncertain time-delay systems.” Automatica, 35(6), 1155–1159. Zames, G. (1981). “Feedback and optimal sensitivity: model reference transformation multiplicative seminorms, and approximate inverse.” IEEE T. Automat. Contr., 26(2), 301–320. Zhang, H., Wang, Y., and Liu, D. (2008). “Delay-dependent guaranteed cost control for uncertain stochastic fuzzy systems with multiple time delays.” IEEE T. Syst. Man Cy. B, 38(1), 126–140. Zhao, L., Jia, Y., and Matsuno, F. (2013). “Adaptive time-varying sliding mode control for autonomous spacecraft rendezvous.” Proceedings of Decision and Control, 5504–5509. Zhou, B., Wang, Q., Lin, Z., and Duan, G. (2014). “Gain scheduled control of linear systems subject to actuator saturation with application to spacecraft rendezvous.” IEEE T. Contr. Syst. T., 22(5), 2031–2038. 18
3cs.SY
Space-Efficient Construction of Compressed Indexes in Deterministic Linear Time arXiv:1607.04346v2 [cs.DS] 14 Nov 2016 J. Ian Munro∗ Gonzalo Navarro† Yakov Nekrich‡ Abstract We show that the compressed suffix array and the compressed suffix tree of a string T can be built in O(n) deterministic time using O(n log σ) bits of space, where n is the string length and σ is the alphabet size. Previously described deterministic algorithms either run in time that depends on the alphabet size or need ω(n log σ) bits of working space. Our result has immediate applications to other problems, such as yielding the first deterministic linear-time LZ77 and LZ78 parsing algorithms that use O(n log σ) bits. ∗ Cheriton School of Computer Science, University of Waterloo. Email [email protected]. CeBiB — Center of Biotechnology and Bioengineering, Department of Computer Science, University of Chile. Email [email protected]. Funded with Basal Funds FB0001, Conicyt, Chile. ‡ Cheriton School of Computer Science, University of Waterloo. Email: [email protected]. † 1 Introduction In the string indexing problem we pre-process a string T , so that for any query string P all occurrences of P in T can be found efficiently. Suffix trees and suffix arrays are two most popular solutions of this fundamental problem. A suffix tree is a compressed trie on suffixes of T ; it enables us to find all occurrences of a string P in T in time O(|P | + occ) where occ is the number of times P occurs in T and |P | denotes the length of P . In addition to indexing, suffix trees also support a number of other, more sophisticated, queries. The suffix array of a string T is the lexicographically sorted array of its suffixes. Although suffix arrays do not support all queries that can be answered by the suffix tree, they use less space and are more popular in practical implementations. While the suffix tree occupies O(n log n) bits of space, the suffix array can be stored in n log n bits. During the last twenty years there has been a significant increase in interest in compressed indexes, i.e., data structures that keep T in compressed form and support string matching queries. The compressed suffix array (CSA) [21, 14, 39] and the compressed suffix tree (CST) [40] are compressed counterparts of the suffix array and the suffix tree respectively. A significant part of compressed indexes relies on these two data structures or their variants. Both CSA and CST can be stored in O(n log σ) bits or less; we refer to e.g. [7] or [33] for an overview of compressed indexes. It is well known that both the suffix array and the suffix tree can be constructed in O(n) time [30, 43, 44, 25]. The first algorithm that constructs the suffix tree in linear time independently of the alphabet size was presented by Farach [13]. There are also algorithms that directly construct the suffix array of T in O(n) time [24, 26]. If the (uncompressed) suffix tree is available, we can obtain CST and CSA in O(n) time. However this approach requires O(n log n) bits of working space. The situation is different if we want to construct compressed variants of these data structures using only O(n log σ) bits of space. Within this space the algorithm of Hon et al. [23] constructs the CST in O(n logε n) time for an arbitrarily small constant ε > 0. In the same paper the authors also showed that CSA can be constructed in O(n log log σ) time. The algorithm of Okanohara and Sadakane constructs the CSA in linear time, but needs O(n log σ log log n) bits of space [37]. Belazzougui [2] described randomized algorithms that build both CSA and CST in O(n) time and O(n log σ) bits of space. His approach also provides deterministic algorithms with runtime O(n log log σ) [3]. In this paper we show that randomization is not necessary in order to construct CSA and CST in linear time. Our algorithms run in O(n) deterministic time and require O(n log σ) bits of space. Suffix trees, in addition to being an important part of many compressed indexes, also play an important role in many string algorithms. One prominent example is Lempel-Ziv parsing of a string using O(n log σ) bits. The best previous solutions for this problem either take O(n log log σ) deterministic time or O(n) randomized time [27, 10]. For instance Köppl and Sadakane [27] showed how we can obtain LZ77- and LZ78-parsing for a string T in O(n) deterministic time and O(n log σ) bits, provided that the CST of T is constructed. Thus our algorithm, combined with their results, leads to the first linear-time deterministic LZ-parsing algorithm that needs O(n log σ) bits of space. Overview. The main idea of our approach is the use of batch processing. Certain operations, such as rank and select queries on sequences, are a bottleneck of previous deterministic solutions. Our algorithms are divided into a large number of small tasks that can be executed independently. Hence, we can collect large batches of queries and answer all queries in a batch. This approach speeds up the computation because, as will be shown later, answering all queries in a batch takes less time than answering the same set of queries one-by-one. For example, our algorithm for generating the Burrows-Wheeler Transform of a text T works as follows. We cut the original text into slices 1 of ∆ = logσ n symbols. The BWT sequence is constructed by scanning all slices in the right-to-left order. All slices are processed at the same time. That is, the algorithm works in ∆ steps and during the j-th step, for 0 ≤ j ≤ ∆ − 1, we process all suffixes that start at position i∆ − j − 1 for all 1 ≤ i ≤ n/∆. Our algorithm maintains the sorted list of suffixes and keeps information about those suffixes in a symbol sequence B. For every suffix Si = T [i∆ − j − 1..] processed during the step j, we must find its position in the sorted list of suffixes. Then the symbol T [i∆ − j − 2] is inserted at the position that corresponds to Si in B. Essentially we can find the position of every new suffix Si by answering a rank query on the sequence B. Details are given in Section 2. Next we must update the sequence by inserting the new symbols into B. Unfortunately we need Ω(log n/ log log n) time in general to answer rank queries on a dynamic sequence [17]. Even if we do not have to update the sequence, we need Ω(log log σ) time to answer a rank query [8]. In our case, however, the scenario is different: There is no need to answer queries one-by-one. We must provide answers to a large batch of n/∆ rank queries with one procedure. In this paper we show that the lower bounds for rank queries can be circumvented in the batched scenario: we can answer the batch of queries in O(n/∆) time, i.e., in constant time per query. We also demonstrate that a batch of n/∆ insertions can be processed in O(n/∆) time. This result is of independent interest. Data structures that answer batches of rank queries and support batched updates are described in Sections 3, A.2, and A.3. This is the most technically involved aspect of our result. In Section 3 we show how answers to a large batch of queries can be provided. In Section A.2 we describe a special labeling scheme that assigns monotonously increasing labels to elements of a list. We conclude this portion in Section A.3 where we show how the static data structure can be dynamized. Next we turn to the problem of constructing the compressed suffix tree. First we describe a data structure that answers partial rank queries in constant time and uses O(n log log σ) additional bits in Section A.4; unlike previous solutions, our data structure can be constructed in O(n) deterministic time. This result is plugged into the algorithm of Belazzougui [2] to obtain the suffix tree topology in O(n) deterministic time. Finally we show how the permuted LCP array (PLCP) can be constructed in O(n) time, provided we already built the suffix array and the suffix tree topology; the algorithm is described in Section 5. Our algorithm for constructing PLCP is also based on batch processing of rank queries. To make this paper self-contained we provide some background on compressed data structures and indexes in Section A.1. We denote by T [i..] the suffix of T starting at position i and we denote by T [i..j] the substring of T that begins with T [i] and ends with T [j], T [i..] = T [i]T [i + 1] . . . T [n − 1] and T [i..j] = T [i]T [i + 1] . . . T [j − 1]T [j]. We assume that the text T ends with a special symbol $ and $ lexicographically precedes all other symbols in T . The alphabet size is σ and symbols are integers in [0..σ − 1] (so $ corresponds to 0). In this paper, as in the previous papers on this topic, we use the word RAM model of computation. A machine word consists of log n bits and we can execute standard bit operations, addition and subtraction in constant time. We will assume for simplicity that the alphabet size σ ≤ n1/4 . This assumption is not restrictive because for σ > n1/4 linear-time algorithms that use O(n log σ) = O(n log n) bits are already known. 2 Linear Time Construction of the Burrows-Wheeler Transform In this section we show how the Burrows-Wheeler transform (BWT) of a text T can be constructed in O(n) time using O(n log σ) bits of space. Let ∆ = logσ n. We can assume w.l.o.g. that the text length is divisible by ∆ (if this is not the case we can pad the text T with dn/∆e∆ − n $-symbols). The BWT of T is a sequence B defined as follows: if T [k..] is the (i+1)-th lexicographically smallest 2 suffix, then B[i] = T [k − 1]1 . Thus the symbols of B are the symbols that precede the suffixes of T , sorted in lexicographic order. We will say that T [k − 1] represents the suffix T [k..] in B. Our algorithm divides the suffixes of T into ∆ classes and constructs B in ∆ steps. We say that a suffix S is a j-suffix for 0 ≤ j < ∆ if S = T [i∆ − j − 1..] for some i, and denote by Sj the set of all j-suffixes, Sj = { T [i∆ − j − 1..] | 1 ≤ i ≤ n/∆ }. During the j-th step we process all j-suffixes and insert symbols representing j-suffixes at appropriate positions of the sequence B. Steps 0 − 1. We sort suffixes in S0 and S1 by constructing a new text and representing it as a sequence of n/∆ meta-symbols. Let T1 = T [n − 1]T [0]T [1] . . . T [n − 2] be the text T rotated by one symbol to the right and let T2 = T [n − 2]T [n − 1]T [0] . . . T [n − 3] be the text obtained by rotating T1 one symbol to the right. We represent T1 and T2 as sequences of length n/∆ over meta-alphabet σ ∆ (each meta-symbol corresponds to a string of length ∆). Thus we view T1 and T2 as T1 = T [n − 1] . . . T [∆ − 2] T [∆ − 1] . . . T [2∆ − 2] T [2∆ − 1] . . . T [3∆ − 2] T [3∆ − 1] . . . . . . T2 = T [n − 2] . . . T [∆ − 3] T [∆ − 2] . . . T [2∆ − 3] T [2∆ − 2] . . . T [3∆ − 3] T [3∆ − 2] . . . . . . Let T3 = T1 ◦ T2 denote the concatenation of T1 and T2 . To sort the suffixes of T3 , we sort the meta-symbols of T3 and rename them with their ranks. Since meta-symbols correspond to (log n)-bit integers, we can sort them in time O(n) using radix sort. Then we apply a linear-time and linear-space suffix array construction algorithm [24] to T3 . We thus obtain a sorted list of suffixes L for the meta-symbol sequence T3 . Suffixes of T3 correspond to the suffixes from S0 ∪ S1 in the original text T : the suffix T [i∆ − 1..] corresponds to the suffix of S0 starting with metasymbol T [i∆ − 1]T [i∆] . . . in T3 and the suffix T [i∆−2 . . .] corresponds to the suffix of S1 starting with T [i∆ − 2]T [i∆ − 1] . . . . Since we assume that the special symbol $ is smaller than all other symbols, this correspondence is order-preserving. Hence by sorting the suffixes of T3 we obtain the sorted list L0 of suffixes in S0 ∪ S1 . Now we are ready to insert symbols representing j-suffixes into B: Initially B is empty. Then the list L0 is traversed and for every suffix T [k..] that appears in L0 we add the symbol T [k − 1] at the end of B. When suffixes in S0 and S1 are processed, we need to record some information for the next step of our algorithm. For every suffix S ∈ S1 we keep its position in the sorted list of suffixes. The position of suffix T [i∆ − 2..] is stored in the entry W [i] of an auxiliary array W , which at the end of the j-th step will contain the positions of the suffixes T [i∆ − j − 1..]. We also keep an auxiliary array Acc of size σ: Acc[a] is equal to the number of occurrences of symbols i ≤ a − 1 in the current sequence B. Step j for j ≥ 2. Suppose that suffixes from S0 , . . ., Sj−1 are already processed. The symbols that precede suffixes from these sets are stored in the sequence B; the k-th symbol B[k] in B is the symbol that precedes the k-th lexicographically smallest suffix from ∪j−1 t=0 St . For every suffix T [i∆ − j..], we know its position W [i] in B. Every suffix Si = T [i∆ − j − 1..] ∈ Sj can be represented as Si = aSi0 for some symbol a and the suffix Si0 = T [i∆ − j..] ∈ Sj−1 . We look up the position ti = W [i] of Si0 and answer rank query ri = ranka (ti , B). We need Ω(log logloglogσ n ) time to answer a single rank query on a static sequence [8]. If updates are to be supported, then we need Ω(log n/ log log n) time to answer such a query [17]. However in our case the scenario is different: 1 So B[0] has the lexicographically smallest suffix (i+1 = 1) and so on. The exact formula is B[i] = T [(k−1)mod n]. We will write B[i] = T [k − 1] to avoid tedious details. 3 we perform a batch of n/∆ queries to sequence B, i.e., we have to find ri for all ti . During Step 2 the number of queries is equal to |B|/2 where |B| denotes the number of symbols in B. During step j the number of queries is |B|/j ≥ |B|/∆. We will show in Section 3 that such a large batch of rank queries can be answered in O(1) time per query. Now we can find the rank pi of Si among ∪jt=1 St : there are exactly pi suffixes in ∪jt=1 St that are smaller than Si , where pi = Acc[a] + ri . Correctness of this computation can be proved as follows. Proposition 1 Let Si = aSi0 be an arbitrary suffix from the set Sj . For every occurrence of a symbol a0 < a in the sequence B, there is exactly one suffix Sp < Si in ∪jt=1 St , such that Sp starts with a0 . Further, there are exactly ri suffixes Sv in ∪jt=1 St such that Sv ≤ Si and Sv starts with a. Proof : Suppose that a suffix Sp from St , such that j ≥ t ≥ 1, starts with a0 < a. Then Sp = a0 Sp0 for some Sp0 ∈ St−1 . By definition of the sequence B, there is exactly one occurrence of a0 in B for every such Sp0 . Now suppose that a suffix Sv ∈ St , such that j ≥ t ≥ 1, starts with a and Sv ≤ Si . Then Sv = aSv0 for Sv0 ∈ St−1 and Sv0 ≤ Si0 . For every such Sv0 there is exactly one occurrence of the symbol a in B[1..ti ], where ti is the position of Si0 in B.  The above calculation did not take into account the suffixes from S0 . We compute the number of suffixes Sk ∈ S0 such that Sk < Si using the approach of Step 0 − 1. Let T1 be the text obtained by rotating T one symbol to the right. Let T 0 be the text obtained by rotating T j + 1 symbols to the right. We can sort suffixes of S0 and Sj by concatenating T1 and T 0 , viewing the resulting text T 00 as a sequence of 2n/∆ meta-symbols and constructing the suffix array for T 00 . When suffixes in S0 ∪ Sj are sorted, we traverse the sorted list of suffixes; for every suffix Si ∈ Sj we know the number qi of lexicographically smaller suffixes from S0 . We then modify the sequence B: We sort new suffixes Si by oi = pi + qi . Next we insert the symbol T [i∆ − j − 1] at position oi − 1 in B (assuming the first index of B is B[0]); insertions are performed in increasing order of oi . We will show that this procedure also takes O(1) time per update for a large batch of insertions. Finally we record the position of every new suffix from Sj in the sequence B. Since the positions of suffixes from Sj−1 are not needed any more, we use the entry W [i] of W to store the position of T [i∆ − j − 1..]. The array Acc is also updated. When Step ∆ − 1 is completed, the sequence B contains n symbols and B[i] is the symbol that precedes the (i+1)-th smallest suffix of T . Thus we obtained the BWT of T . Step 0 of our algorithm uses O((n/∆) log n) = O(n log σ) bits. For all the following steps we need to maintain the sequence B and the array W . B uses O(log σ) bits per symbol and W needs O((n/∆) log n) = O(n log σ) bits. Hence our algorithm uses O(n log σ) bits of workspace. Procedures for querying and updating B are described in the following section. Our result can be summed up as follows. Theorem 1 Given a string T [0..n − 1] over an alphabet of size σ, we can construct the BWT of T in O(n) deterministic time using O(n log σ) bits. 3 Batched Rank Queries on a Sequence In this section we show how a batch of m rank queries for logn2 n ≤ m ≤ n can be answered in O(m) time on a sequence B of length n. We start by describing a static data structure. A data structure that supports batches of queries and batches of insertions will be described later. We will assume σ ≥ log4 n; if this is not the case, the data structure from [15] can be used to answer rank queries in time O(1). 4 Following previous work [19], we divide B into chunks of size σ (except for the last chunk that contains at most σ symbols). For every symbol a we keep a binary sequence Ma = 1d1 01d2 0 . . . 1df where f is the total number of chunks and di is the number of occurrences of a in the chunk. We keep the following information for every chunk C. Symbols in a chunk C are represented as pairs (a, i): we store a pair (a, i) if and only if C[i] = a. These pairs are sorted by symbols and pairs representing the same symbol a are sorted by their positions in C; all sorted pairs from a chunk are kept in a sequence R. The array F consists of σ entries; F [a] contains a pointer to the first occurrence of a symbol a in R (or null if a does not occur in C). Let Ra denote the subsequence of R that contains all pairs (a, ·) for some symbol a. If Ra contains at least log2 n pairs, we split Ra into groups Ha,r of size Θ(log2 n). For every group, we keep its first pair in the sequence R0 . Thus R0 is also a subsequence of R. For each pair (a0 , i0 ) in R0 we also store the partial rank of C[i0 ] in C, rankC[i0 ] (i0 , C). All pairs in Ha,r are kept in a data structure Da,r that contains the second components of pairs (a, i) ∈ Ha,r . Thus Da,r contains positions of Θ(log2 n) consecutive symbols a. If Ra contains less than log2 n pairs, then we keep all pairs starting with symbol a in one group Ha,0 . Every Da,r contains O(log2 n) elements. Hence we can implement Da,r so that predecessor queries are answered in constant time: for any integer q, we can find the largest x ∈ Ha,r satisfying x ≤ q in O(1) time [18]. We can also find the number of elements x ∈ Ha,r satisfying x ≤ q in O(1) time. This operation on Ha,r can be implemented using bit techniques similar to those suggested in [35]; details are to be given in the full version of this paper. Queries on a Chunk. Now we are ready to answer a batch of queries in O(1) time per query. First we describe how queries on a chunk can be answered. Answering a query ranka (i, C) on a chunk C is equivalent to counting the number of pairs (a, j) in R such that j ≤ i. Our method works in three steps. We start by sorting the sequence of all queries on C. Then we “merge” the sorted query sequence with R0 . That is, we find for every ranka (i, C) the rightmost pair (a, j 0 ) in R0 , such that j 0 ≤ i. Pair (a, j 0 ) provides us with an approximate answer to ranka (i, C) (up to an additive O(log2 n) term). Then we obtain the exact answer to each query by searching in some data structure Da,j . Since Da,j contains only O(log2 n) elements, the search can be completed in O(1) time. A more detailed description follows. Suppose that we must answer v queries ranka1 (i1 , C), ranka2 (i2 , C), . . ., rankav (iv , C) on a chunk C. We sort the sequence of queries by pairs (aj , ij ) in increasing order. This sorting step takes O(σ/ log2 n + v) time, where v is the number of queries: if v < σ/ log3 n, we sort in O(v log n) = O(σ/ log2 n) time; if v ≥ σ/ log3 n, we sort in O(v) time using radix sort (e.g., with √ radix σ). Then we simultaneously traverse the sorted sequence of queries and R0 ; for each query pair (aj , ij ) we identify the pair (at , pt ) in R0 such that either (i) pt ≤ ij ≤ pt+1 and aj = at = at+1 or (ii) pt ≤ ij , aj = at , and at 6= at+1 . That is, we find the largest pt ≤ ij such that (aj , pt ) ∈ R0 for every query pair (aj , ij ). If (at , pt ) is found, we search in the group Hat ,pt that starts with the pair (at , pt ). If the symbol aj does not occur in R0 , then we search in the leftmost group Haj ,0 . Using Dat ,pt (resp. Dat ,0 ), we find the largest position xt ∈ Hat ,pt such that xt ≤ ij . Thus xt is the largest position in C satisfying xt ≤ ij and C[xt ] = aj . We can then compute rankat (xt , C) as follows: Let n1 be the partial rank of C[pt ], n1 = rankC[pt ] (pt , C). Recall that we explicitly store this information for every position in R0 . Let n2 be the number of positions i ∈ Hat ,pt satisfying i ≤ xt . We can compute n2 in O(1) time using Dat ,pt . Then rankaj (xt , C) = n1 + n2 . Since C[xt ] is the rightmost occurrence of aj up to C[ij ], rankaj (ij , C) = rankaj (xt , C). The time needed to traverse the sequence R0 is O(σ/ log2 n) for all the queries. Other computations take O(1) time per 5 query. Hence the sequence of v queries on a chunk is answered in O(v + σ/ log2 n) time. Global Sequence. Now we consider the global sequence of queries ranka1 (i1 , B), . . ., rankam (im , B). First we assign queries to chunks (e.g., by sorting all queries by (bi/σc + 1) using radix sort). We 2 answer the batch of queries on the number of Pj-th chunk in O(mj + σ/ log n) time where mj is the queries on the j-th chunk. Since mj = m, all m queries are answered in O(m+n/ log2 n) = O(m) time. Now we know the rank nj,2 = rankaj (i0j , C), where i0j = ij − bi/σcσ is the relative position of B[ij ] in its chunk C. The binary sequences Ma allows us reduce rank queries on B to rank queries on a chunk C. All sequences Ma contain n + bn/σcσ bits; hence they use O(n) bits of space. We can compute the number of occurrences of a in the first j chunks in O(1) time by answering one select query. Consider a rank query rankaj (ij , B) and suppose that nj,2 is already known. We compute nj,1 , where nj,1 = select0 (bij /σc, Maj ) − bij /σc is the number of times aj occurs in the first bij /σc chunks. Then we compute rankaj (ij , B) = nj,1 + nj,2 . Theorem 2 We can keep a sequence B[0..n − 1] over an alphabet of size σ in O(n log σ) bits of space so that a batch of m rank queries can be answered in O(m) time, where logn2 n ≤ m ≤ n. The static data structure of Theorem 2 can be dynamized so that batched queries and batched insertions are supported. Our dynamic data structures supports a batch of m queries in time O(m) and a batch of m insertions in amortized time O(m) for any m that satisfies logn n ≤ m ≤ n. We σ describe the dynamic data structure in Sections A.2 and A.3. 4 Building the Suffix Tree Belazzougui proved the following result [2]: if we are given the BWT B of a text T and if we can report all the distinct symbols in a range of B in optimal time, then in O(n) time we can: (i) enumerate all the suffix array intervals corresponding to internal nodes of the suffix tree and (ii) for every internal node list the labels of its children and their intervals. Further he showed that, if we can enumerate all the suffix tree intervals in O(n) time, then we can build the suffix tree topology [40] in O(n) time. The algorithms need only O(n) additional bits of space. We refer to Lemmas 4 and 1 and their proofs in [2] for details. In Section A.4 we show that a partial rank data structure can be built in O(n) deterministic time. This can be used to build the desired structure that reports the distinct symbols in a range, in O(n) time and using O(n log log σ) bits. The details are given in Section A.5. Therefore, we obtain the following result. Lemma 1 If we already constructed the BWT of a text T , then we can build the suffix tree topology in O(n) time using O(n log log σ) additional bits. In Section 5 we show that the permuted LCP array of T can be constructed in O(n) time using O(n log σ) bits of space. Thus we obtain our main result on building compressed suffix trees. Theorem 3 Given a string T [0..n − 1] over an alphabet of size σ, we can construct the compressed suffix tree of T in O(n) deterministic time using O(n log σ) additional bits. 6 5 Constructing the Permuted LCP Array The permuted LCP array is defined as P LCP [i] = j if and only if SA[r] = i and the longest common prefix of T [SA[r]..] and T [SA[r − 1]..] is of length j. In other words P LCP [i] is the length of the longest common prefix of T [i..] and the suffix that precedes it in the lexicographic ordering. In this section we show how the permuted LCP array P LCP [0..n − 1] can be built in linear time. Preliminaries. For i = 0, 1, . . . , n let `i = P LCP [i]. It is easy to observe that `i ≤ `i+1 + 1: if the longest common prefix of T [i..] and T [j..] is q, then the longest common prefix of T [i + 1..] and T [j + 1..] is at least q − 1. Let ∆0 = ∆ log log σ for ∆ = logσ n. By the same argument `i ≤ `i+∆0 +P ∆0 . To simplify the description we will further assume that `−1 = 0. It can also be shown that n−1 i=0 (`i − `i−1 ) = O(n). We will denote by B the BWT sequence of T ; B denotes the BWT of the reversed text T = T [n − 1]T [n − 2] . . . T [1]T [0]. Let p be a factor (substring) of T and let c be a character. The operation extendright(p, c) computes the suffix interval of pc in B and the suffix interval of pc in B provided that the intervals of p and p are known. The operation contractleft(cp) computes the suffix intervals of p and p provided that the suffix intervals of factors cp and cp are known2 . It was demonstrated [42, 5] that both operations can be supported by answering O(1) rank queries on B and B. Belazzougui [2] proposed the following algorithm for consecutive computing of `0 , `1 , . . ., `n . Suppose that `i−1 is already known. We already know the rank ri−1 of T [i − 1..], the interval of T [i − 1..i + `i−1 − 1] in B, and the interval of T [i − 1..i + `i−1 − 1] in B. We compute the rank ri of T [i..]. If ri−1 is known, we can compute ri in O(1) time by answering one select query on B; see Section A.1. Then we find the interval [rs , re ] of T [i..i + `i−1 − 1] in B and the interval [rs0 , re0 ] of T [i..i + `i−1 − 1] in B. These two intervals can be computed by contractleft. In the special case when i = 0 or `i−1 = 0, we set [rs , re ] = [rs0 , re0 ] = [0, n − 1]. Then for j = 1, 2, . . . we find the intervals for T [i..i + (`i−1 − 1) + j] and T [i..i + (`i−1 − 1) + j]. Every following pair of intervals is found by operation extendright. We stop when the interval of T [i..i + `i−1 − 1 + j] is [rs,j , re,j ] such that rs,j = ri . For all j 0 , such that 0 ≤ j 0 < j, we have rs,j 0 < ri . It can be shown that `i = `i−1 + j − 1; see the proof of [2, Lemma 2]. Once `i is computed, we increment i and find the next `i in the same way. All `i are computed by O(n) contractleft and extendright operations. Implementing contractleft and extendright. We create the succinct representation of the suffix tree topology both for T and T ; they will be denoted by T and T respectively. We keep both B and B in the data structure that supports access in O(1) time. We also store B in the data structure that answers select queries in O(1) time. The array Acc keeps information about accumulated frequencies of symbols: Acc[i] is the number of occurrences of all symbols a ≤ i − 1 in B. Operation contractleft is implemented as follows. Suppose that we know the interval [i, j] for a factor cp and the interval [i0 , j 0 ] for the factor cp. We can compute the interval [i1 , j1 ] of p by finding l = selectc (i − Acc[c], B) and r = selectc (j − Acc[c], B). Then we find the lowest common ancestor x of leaves l and r in the suffix tree T . We set i1 = leftmost leaf(x) and j1 = rightmost leaf(x). Then we consider the number of distinct symbols in B[i1 ..j1 ]. If c is the only symbol that occurs in B[i1 ..j1 ], then all factors p in T are preceded by c. Hence all factors p in T are followed by c and [i01 , j10 ] = [i0 , j 0 ]. Otherwise we find the lowest common ancestor y of leaves i0 and j 0 in T . Then we identify y 0 = parent(y) in T and let i01 = leftmost leaf(y 0 ) and j10 = rightmost leaf(y 0 ). Thus contractleft can be supported in O(1) time. 2 Throughout this paper reverse strings are overscored. Thus p and pc are reverse strings of p and pc respectively. 7 Now we consider the operation extendright. Suppose that [i, j] and [i0 , j 0 ] are intervals of p and p in B and B respectively. We compute the interval of pc by using the standard BWT machinery. Let i01 = rankc (i0 − 1, B) + Acc[c] and j10 = rankc (j 0 , B) + Acc[c] − 1. We check whether c is the only symbol in B[i0 ..j 0 ]. If this is the case, then all occurrences of p in T are preceded by c and all occurrences of p in T are followed by c. Hence the interval of pc in B is [i1 , j1 ] = [i, j]. Otherwise there is at least one other symbol besides c that can follow p. Let x denote the lowest common ancestor of leaves i and j. If y is the child of x that is labeled with c, then the interval of pc is [i1 , j1 ] where i1 = leftmost leaf(y) and j1 = rightmost leaf(y). We can find the child y of x that is labeled with c by answering rank and select queries on two additional sequences, L and D. The sequence L contains labels of children for all nodes of T ; labels are ordered by nodes and labels of the same node are ordered lexicographically. We encode the degrees of all nodes in a sequence D = 1d1 01d2 0 . . . 1dn , where di is the degree of the i-th node. We compute v = select0 (x, D) − x, p1 = rankc (v, L), p2 = selectc (p1 + 1, L), and j = p2 − v. Then y is the j-th child of x. The bottleneck of extendright are the computations of p1 , i01 , and j10 because we need Ω(log logloglogσ n ) time to answer a rank query on L (resp. on B); all other calculations can be executed in O(1) time. Our Approach. Our algorithm follows the technique of [2] that relies on operations extendright and contractleft for building the PLCP. We implement these two operations as described above; hence we will have to perform Θ(n) rank queries on sequences L and B. Our method creates large batches of queries; each query in a batch is answered in O(1) time using Theorem 2. During the pre-processing stage we create the machinery for supporting operations extendright and contractleft. We compute the BWT B of T and the BWT B for the reverse text T . We also construct the suffix tree topologies T and T . When B is constructed, we record the positions in B that correspond to suffixes T [i · ∆0 ..] for i = 0, . . . , bn/∆0 c. PLCP construction is divided into three stages: first we compute the values of `i for selected evenly spaced indices i, i = j · ∆0 and j = 0, 1,. . .,bn/∆0 c. We use a slow algorithm for computing lengths that takes O(∆0 ) extra time for every `i . During the second stage we compute all remaining values of `i . We use the method from [2] during Stage 2. The key to a fast implementation is “parallel” computation. We divide all lengths into groups and assign each group of lengths to a job. At any time we process a list containing at least 2n/ log2 n jobs. We answer rank queries in batches: when a job Ji must answer a slow rank query on L or B, we pause Ji and add the rank query to the corresponding pool of queries. When a pool of queries on L or the pool of queries on B contains n/ log2 n items, we answer the batch of queries in O(n/ log2 n) time. The third stage starts when the number of jobs becomes smaller than 2n/ log2 n. All lengths that were not computed earlier are computed during Stage 3 using the slow algorithm. Stage 2 can be executed in O(n) time because rank queries are answered in O(1) time per query. Since the number of lengths that we compute during the first and the third stages is small, Stage 1 and Stage 3 also take time O(n). A more detailed description follows. Stage 1. Our algorithm starts by computing `i for i = j · ∆0 and j = 0, 1, . . . , bn/∆0 c. Let j = 0 and f = j∆0 . We already know the rank rf of Sf = T [j∆0 ..] in B (rf was computed and recorded when B was constructed). We can also find the starting position f 0 of the suffix S 0 of rank rf − 1, S 0 = T [f 0 ..]. Since f 0 can be found by employing the function LF at most ∆0 times, we can compute f 0 in O(∆0 ) time; see Section A.13 . When f and f 0 are known, we scan T [f..] and T [f 0 ..] until the 3 A faster computation is possible, but we do not need it here. 8 ∆0 ∆0 ∆0 `0 `1 . . . `∆0 −1 J0 J1 Ji Ql J1 : rank(j1, a1) Qb Ji : rank(ji, ai) Figure 1: Computing lengths during Stage 2. Groups corresponding to paused jobs are shown shaded by slanted lines. Only selected groups are shown. The i-th job Ji is paused because we have to answer a rank query on B; the job J1 is paused because we have to answer a rank query on L. When Ql or Qb contains n/ log2 n queries, we answer a batch of rank queries contained in Ql or Qb . first symbol T [f + pf ] 6= T [f 0 + pf ] is found. By definition of `j , `0 = pf − 1. Suppose that `s∆0 for s = 0, . . ., j − 1 are already computed and we have to compute `f for f = j∆0 and some j ≥ 1. We already know the rank rf of suffix T [f..]. We find f 0 such that the suffix T [f 0 ..] is of rank rf − 1 in time O(∆0 ). We showed above that `f ≥ `(j−1)∆0 − ∆0 . Hence the first of symbols in T [f..] and T [f 0 ..] are equal, where of = max(0, `(j−1)∆0 − ∆0 ). We scan T [f + of ..] and T [f 0 + of ..] until the first symbol T [f +of +pf ] 6= T [f 0 +of +pf ] is found. By definition, `f = of +pf . Hence P we compute `f in O(∆0 + pf ) time for f = j∆0 and j = 1, . . ., bn/∆0 c. It can be shown that f pf = O(n). P 0 0 Hence the total time needed to compute all selected `f is O((n/∆ )∆ + f pf ) = O(n). For every f = j∆0 we also compute the interval of T [j∆0 ..j∆0 + `f ] in B and the interval of T [j∆0 ..j∆0 + `f ] in B. We show in Section A.6 that all needed intervals can be computed in O(n) time. Stage 2. We divide `i into groups of size ∆0 − 1 and compute the values of `k in every group using a job. The i-th group contains lengths `k+1 , `k+2 , . . ., `k+∆0 −1 for k = i∆0 and i = 0, 1, . . .. All `k in the i-th group will be computed by the i-th job Ji . Every Ji is either active or paused. Thus originally we start with a list of n/∆0 jobs and all of them are active. All active jobs are executed at the same time. That is, we scan the list of active jobs, spend O(1) time on every active job, and then move on to the next job. When a job must answer a rank query, we pause it and insert the query into a query list. There are two query lists: Ql contain rank queries on sequence L and Qb contains rank queries on B. When Ql or Qb contains n/ log2 n queries, we answer all queries in Ql (resp. in Qb ). The batch of queries is answered using Theorem 2, so that every query is answered in O(1) time. Answers to queries are returned to jobs, corresponding jobs are re-activated, and we continue scanning the list of active jobs. When all `k for i∆0 ≤ k < (i + 1)∆0 are computed, the i-th job is finished; we remove this job from the pool of jobs and decrement by 1 the number of jobs. See Fig. 1. Every job Ji computes `k+1 , `k+2 , . . ., `k+∆0 −1 for k = i∆0 using the algorithm of Belazzougui [2]. When the interval of T [i + `k ..] in B and the interval of T [i + `k ..] in B are known, we compute `k+1 . The procedure for computing `k+1 must execute one operation contractleft and `k+1 − 9 `k + 1 operations extendright. Operations contractleft and extendright are implemented as described above. We must answer two rank queries on B and one rank query on L for every extendright. Ignoring the time for these three rank queries, extendright takes constant time. Rank queries on B and L are answered in batches, so that each rank query takes O(1) time. Hence every operation extendright needs O(1) time. The job Ji needs O(`i∆0 +j − `i∆0 + j) time to compute `i∆0 +1 , `i∆0 +1 , . . ., `i∆0 +j . All Ji are executed in O(n) time. Stage 3. “Parallel processing” of jobs terminates when the number of jobs in the pool becomes smaller than 2n/ log2 n. Since every job computes ∆0 values of `i , there are at most 2n(log log σ/(log n log σ)) < 2n/ log n unknown values of `i at this point. We then switch to the method of Stage 1 to compute the values of unknown `i . All remaining `i are sorted by i and processed in order of increasing i. For every unknown `i we compute the rank r of T [i..] in B. For the suffix S 0 of rank r−1 we find its starting position f 0 in T , S 0 = T [f 0 ..]. Then we scan T [f 0 +`i−1 −1..] and T [i + `i−1 − 1..] until the first symbol T [f 0 + `i−1 + j − 1] 6= T [f + `i−1 + j − 1] is found. We set `i = `i−1 + j − 2 and continue with the next unknown `i . We spend O(∆0 + `i ) additional time for every remaining `i ; hence the total time needed to compute all `i is O(n + (n/ log n)∆0 ) = O(n). Every job during Stage 2 uses O(log n) bits of workspace. The total number of jobs in the job list does not exceed n/∆0 . The total number of queries stored at any time in lists Ql and Qb does not exceed n/ log2 n. Hence our algorithm uses O(n log σ) bits of workspace. Lemma 2 If the BWT of a string T and the suffix tree topology for T are already known, then we can compute the permuted LCP array in O(n) time and O(n log σ) bits. 6 Conclusions We have shown that the Burrows-Wheeler Transform (BWT), the Compressed Suffix Array (CSA), and the Compressed Suffix Tree (CST) can be built in deterministic O(n) time by an algorithm that requires O(n log σ) bits of working space. Belazzougui independently developed an alternative solution, which also builds within the same time and space the simpler part of our structures, that is, the BWT and the CSA, but not the CST. His solution, that uses different techniques, is described in the updated version of his ArXiV report [3] that extends his conference paper [2]. Our results have many interesting applications. For example, we can now construct an FMindex [14, 15] in O(n) deterministic time using O(n log σ) bits. Previous results need O(n log log σ) time or rely on randomization [23, 2]. Furthermore Theorem 5 enables us to support the function LF in O(1) time on an FM-index. In Section A.7 we describe a new index based on these ideas. Another application is that we can now compute the Lempel-Ziv 77 and 78 parsings [29, 46, 47] of a string T [0..n − 1] in deterministic linear time using O(n log σ) bits: Köppl and Sadakane [27] recently showed that, if one has a compressed suffix tree on T , then they need only O(n) additional (deterministic) time and O(z log n) bits to produce the parsing, where z is the resulting number of phrases. Since z ≤ n/ logσ n, the space is O(n log σ) bits. With the suffix tree, they need to compute in constant time any Ψ(i) and to move in constant time from a suffix tree node to its i-th child. The former is easily supported as the inverse of the LF function using constant-time select queries on B [19]; the latter is also easily obtained with current topology representations using parentheses [36]. Yet another immediate application of our algorithm are index data structures for dynamic document collections. If we use our compressed index, described in Section A.7, and apply Transformation 2 from [32], then we obtain an index data structure for a dynamic collection of documents that uses nHk + o(n log σ) + O(n logs n ) bits where Hk is the k-th order entropy and s is 10 a parameter. This index can count how many times a query pattern P occurs in a collection in O(|P | log log n + log log σ log log n) time; every occurrence can be then reported in time O(s). An insertion or a deletion of some document Tu is supported in O(|Tu | logε n) and O(|Tu |(logε n + s)) deterministic time respectively. We believe that our technique can also improve upon some of the recently presented results on bidirectional FM-indices [42, 5] and other scenarios where compressed suffix trees are used [6]. Acknowledgment. The authors wish to thank an anonymous reviewer of this paper for careful reading and helpful comments. 11 References [1] J. Barbay, F. Claude, T. Gagie, G. Navarro, and Y. Nekrich. Efficient fully-compressed sequence representations. Algorithmica, 69(1):232–268, 2014. [2] D. Belazzougui. Linear time construction of compressed text indices in compact space. In Proc. Symposium on Theory of Computing (STOC), pages 148–193, 2014. [3] D. Belazzougui. Linear time construction of compressed text indices in compact space. CoRR, abs/1401.0936, 2014. [4] D. Belazzougui, P. Boldi, R. Pagh, and S. Vigna. Monotone minimal perfect hashing: searching a sorted table with o(1) accesses. In Proc. 20th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 785–794, 2009. [5] D. Belazzougui, F. Cunial, J. Kärkkäinen, and V. Mäkinen. Versatile succinct representations of the bidirectional Burrows-Wheeler transform. In Proc. 21st Annual European Symposium on Algorithms (ESA), pages 133–144, 2013. [6] D. Belazzougui, F. Cunial, J. Kärkkäinen, and V. Mäkinen. Linear-time string indexing and analysis in small space. CoRR, abs/1609.06378, 2016. [7] D. Belazzougui and G. Navarro. Alphabet-independent compressed text indexing. ACM Transactions on Algorithms, 10(4):23:1–23:19, 2014. [8] D. Belazzougui and G. Navarro. Optimal lower and upper bounds for representing sequences. ACM Transactions on Algorithms, 11(4):31:1–31:21, Apr. 2015. [9] D. Belazzougui, G. Navarro, and D. Valenzuela. Improved compressed indexes for full-text document retrieval. Journal of Discrete Algorithms, 18:3–13, 2013. [10] D. Belazzougui and S. J. Puglisi. Range predecessor and Lempel-Ziv parsing. In Proc. 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2053–2071, 2016. [11] M. Bender, R. Cole, E. Demaine, M. Farach-Colton, and J. Zito. Two simplified algorithms for maintaining order in a list. In Proc. 10th Annual European Symposium on Algorithms (ESA), LNCS 2461, pages 152–164, 2002. [12] P. Dietz and D. Sleator. Two algorithms for maintaining order in a list. In Proc. 19th Annual ACM Symposium on Theory of Computing (STOC), pages 365–372, 1987. [13] M. Farach. Optimal suffix tree construction with large alphabets. In Proc. 38th Annual Symposium on Foundations of Computer Science (FOCS), pages 137–143, 1997. [14] P. Ferragina and G. Manzini. Indexing compressed text. Journal of the ACM, 52(4):552–581, 2005. [15] P. Ferragina, G. Manzini, V. Mäkinen, and G. Navarro. Compressed representations of sequences and full-text indexes. ACM Transactions on Algorithms, 3(2):article 20, 2007. 12 [16] J. Fischer and P. Gawrychowski. Alphabet-dependent string searching with wexponential search trees. In Proc. 26th Annual Symposium on Combinatorial Pattern Matching (CPM), LNCS 9133, pages 160–171, 2015. [17] M. Fredman and M. Saks. The cell probe complexity of dynamic data structures. In Proc. 21st Annual ACM Symposium on Theory of Computing (STOC), pages 345–354, 1989. [18] M. L. Fredman and D. E. Willard. Trans-dichotomous algorithms for minimum spanning trees and shortest paths. Journal of Computing and System Sciences, 48(3):533–551, 1994. [19] A. Golynski, J. I. Munro, and S. S. Rao. Rank/select operations on large alphabets: a tool for text indexing. In Proc. 17th Annual ACM-SIAM Symposium on Discrete Algorithms, (SODA), pages 368–373, 2006. [20] R. Grossi, A. Orlandi, R. Raman, and S. S. Rao. More haste, less waste: Lowering the redundancy in fully indexable dictionaries. In Proc. 26th International Symposium on Theoretical Aspects of Computer Science (STACS), pages 517–528, 2009. [21] R. Grossi and J. S. Vitter. Compressed suffix arrays and suffix trees with applications to text indexing and string matching. SIAM Journal on Computing, 35(2):378–407, 2005. [22] T. Hagerup, P. B. Miltersen, and R. Pagh. Deterministic dictionaries. Journal of Algorithms, 41(1):69 – 85, 2001. [23] W. Hon, K. Sadakane, and W. Sung. Breaking a time-and-space barrier in constructing fulltext indices. SIAM Journal on Computing, 38(6):2162–2178, 2009. [24] J. Kärkkäinen, P. Sanders, and S. Burkhardt. Linear work suffix array construction. Journal of the ACM, 53(6):918–936, 2006. [25] D. K. Kim, J. S. Sim, H. Park, and K. Park. Constructing suffix arrays in linear time. Journal of Discrete Algorithms, 3(2-4):126–142, 2005. [26] P. Ko and S. Aluru. Space efficient linear time construction of suffix arrays. Journal of Discrete Algorithms, 3(2-4):143–156, 2005. [27] D. Köppl and K. Sadakane. Lempel-Ziv computation in compressed space (LZ-CICS). In Proc. 26th Data Compression Conference (DCC), pages 3–12, 2016. [28] S. Lee and K. Park. Dynamic rank-select structures with applications to run-length encoded texts. In Proc. 18th Annual Symposium on Combinatorial Pattern Matching ( CPM), pages 95–106, 2007. [29] A. Lempel and J. Ziv. On the complexity of finite sequences. IEEE Transactions on Information Theory, 22(1):75–81, 1976. [30] E. M. McCreight. A space-economical suffix tree construction algorithm. Journal of the ACM, 23(2):262–272, 1976. [31] J. I. Munro, Y. Nekrich, and J. S. Vitter. Fast construction of wavelet trees. In Proc. 21st International Symposium on String Processing and Information Retrieval (SPIRE), pages 101– 110, 2014. 13 [32] J. I. Munro, Y. Nekrich, and J. S. Vitter. Dynamic data structures for document collections and graphs. In Proc. 34th ACM Symposium on Principles of Database Systems (PODS), pages 277–289, 2015. [33] G. Navarro and V. Mäkinen. Compressed full-text indexes. ACM Computing Surveys, 39(1):article 2, 2007. [34] G. Navarro and Y. Nekrich. Top-k document retrieval in optimal time and linear space. In Proc. 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1066–1077, 2012. [35] G. Navarro and Y. Nekrich. Optimal dynamic sequence representations. In Proc. 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 865–876. SIAM, 2013. [36] G. Navarro and K. Sadakane. Fully-functional static and dynamic succinct trees. ACM Transactions on Algorithms, 10(3):article 16, 2014. [37] D. Okanohara and K. Sadakane. A linear-time burrows-wheeler transform using induced sorting. In Proc. 16th International Symposium String Processing and Information Retrieval (SPIRE), pages 90–101, 2009. [38] M. Ružić. Constructing efficient dictionaries in close to sorting time. In Proc. 35th International Colloquium on Automata, Languages and Programming (ICALP), pages 84–95, 2008. [39] K. Sadakane. New text indexing functionalities of the compressed suffix arrays. Journal of Algorithms, 48(2):294–313, 2003. [40] K. Sadakane. Compressed suffix trees with full functionality. Theory of Computing Systems, 41(4):589–607, 2007. [41] K. Sadakane. Succinct data structures for flexible text retrieval systems. Journal of Discrete Algorithms, 5(1):12–22, 2007. [42] T. Schnattinger, E. Ohlebusch, and S. Gog. Bidirectional search in a string with wavelet trees and bidirectional matching statistics. Inf. Comput., 213:13–22, 2012. [43] E. Ukkonen. On-line construction of suffix trees. Algorithmica, 14(3):249–260, 1995. [44] P. Weiner. Linear pattern matching algorithms. In Proc. 14th Annual Symposium on Switching and Automata Theory (FOCS), pages 1–11, 1973. [45] D. E. Willard. A density control algorithm for doing insertions and deletions in a sequentially ordered file in good worst-case time. Information and Computation, 97(2):150–204, 1992. [46] J. Ziv and A. Lempel. A universal algorithm for sequential data compression. IEEE Transactions on Information Theory, 23(3):337–343, 1977. [47] J. Ziv and A. Lempel. Compression of individual sequences via variable length coding. IEEE Transactions on Information Theory, 24(5):530–536, 1978. 14 A.1 Preliminaries Rank and Select Queries The following two kinds of queries play a crucial role in compressed indexes and other succinct data structures. Consider a sequence B[0..n − 1] of symbols over an alphabet of size σ. The rank query ranka (i, B) counts how many times a occurs among the first i+1 symbols in B, ranka (i, B) = |{ j | B[j] = a and 0 ≤ j < i }|. The select query selecta (i, B) finds the position in B where a occurs for the i-th time, selecta (i, B) = j where j is such that B[j] = a and ranka (j, B) = i. The third kind of query is the access query, access(i, B), which returns the (i + 1)-th symbol in B, B[i]. If insertions and deletions of symbols in B must be supported, then both kinds of queries require Ω(log n/ log log n) time [17]. If the sequence B is static, then we can answer select queries in O(1) time and the cost of rank queries is reduced to Θ(log logloglogσ n ) [8].4 One important special case of rank queries is the partial rank query, rankB[i] (i, B). Thus a partial rank query asks how many times B[i] occurred in B[0..i]. Unlike general rank queries, partial rank queries can be answered in O(1) time [8]. In Section A.4 we describe a data structure for partial rank queries that can be constructed in O(n) deterministic time. Better results can be achieved in the special case when the alphabet size is σ = logO(1) n; in this case we can represent B so that rank, select, and access queries are answered in O(1) time [15]. Suffix Tree and Suffix Array. A suffix tree for a string T [0..n − 1] is a compacted tree on the suffixes of T . The suffix array is an array SA[0..n − 1] such that SA[i] = j if and only if T [j..] is the (i + 1)-th lexicographically smallest suffix of T . All occurrences of a substring p in T correspond to suffixes of T that start with p; these suffixes occupy a contiguous interval in the suffix array SA. Compressed Suffix Array. A compressed suffix array (CSA) is a compact data structure that provides the same functionality as the suffix array. The main component of CSA is the function Ψ, defined by the equality SA[Ψ(i + 1)] = (SA[i] + 1) mod n. It is possible to regenerate the suffix array from Ψ. We refer to [33] and references therein for a detailed description of CSA and for trade-offs between space usage and access time. Burrows-Wheeler Transform and FM-index. The Burrows-Wheeler Transform (BWT) of a string T is obtained by sorting all possible rotations of T and writing the last symbol of every rotation (in sorted order). The BWT is related to the suffix array as follows: BW T [i] = T [(SA[i]−1) mod n]. Hence, we can build the BWT by sorting the suffixes and writing the symbols that precede the suffixes in lexicographical order. This method is used in Section 2. The FM-index uses the BWT for efficient searching in T . It consists of the following three main components: • The BWT of T . • The array Acc[0..σ − 1] where Acc[i] holds the total number of symbols a ≤ i − 1 in T (or equivalently, the total number of symbols a ≤ i − 1 in B). • A sampled array SAMb for a sampling factor b: SAMb contains values of SA[i] if and only if SA[i] mod b = 0 or SA[i] = n − 1. The search for a substring P of length m is performed backwards: for i = m − 1, m − 2, . . ., we identify the interval of p[i..m] in the BWT. Let B denote the BWT of T . Suppose that we know the 4 If we aim to use n log σ + o(n log σ) bits, then either select or access must cost ω(1). If, however, (1 + )n log σ bits are available, for any constant  > 0, then we can support both queries in O(1) time. 15 interval B[i1 ..j1 ] that corresponds to p[i + 1..m − 1]. Then the interval B[i2 ..j2 ] that corresponds to p[i..m − 1] is computed as i2 = rankc (i1 − 1, B) + Acc[c] and j2 = rankc (i2 , B) + Acc[c] − 1, where c = P [i]. Thus the interval of p is found by answering 2m rank queries. We observe that the interval of p in B is exactly the same as the interval of p in the suffix array SA. Another important component of an FM-index is the function LF , defined as follows: if SA[j] = i + 1, then SA[LF (j)] = i. LF can be computed by answering rank queries on B. Using LF we can find the starting position of the r-th smallest suffix, SA[r], in O(b) applications of LF , where b is the sampling factor; we refer to [33] for details. It is also possible to compute the function Ψ by using select queries the BWT [28]. Therefore the BWT can be viewed as a variant of the CSA. Using Ψ we can consecutively obtain positions of suffixes T [i..] in the suffix array: Let ri denote the position of T [i..] in SA. Since T [n − 1..] = $ is the smallest suffix, r0 = Ψ(0). For i ≥ 1, ri = Ψ(ri−1 ) by definition of Ψ. Hence we can consecutively compute each ri in O(1) time if we have constant-time select queries on the BWT. Compressed Suffix Tree. A compressed suffix tree consists of the following components: • The compressed suffix array of T . We can use the FM-index as an implementation. • The suffix tree topology. This component can be stored in 4n + o(n) bits [40]. • The permuted LCP array, or PLCP. The longest common prefix array LCP is defined as follows: LCP [r] = j if and only if the longest common prefix between the suffixes of rank r and r − 1 is of length j. The permuted LCP array is defined as follows: P LCP [i] = j if and only if the rank of T [i..] is r and LCP [r] = j. A careful implementation of P LCP occupies 2n + o(n) bits [40]. A.2 Monotone List Labelling with Batched Updates A direct attempt to dynamize the data structure of Section 3 encounters one significant difficulty. An insertion of a new symbol a into a chunk C changes the positions of all the symbols that follow it. Since symbols are stored in pairs (aj , i) grouped by symbol, even a single insertion into C can lead to a linear number of updates. Thus it appears that we cannot support the batch of updates on C in less than Θ(|C|) time. In order to overcome this difficulty we employ a monotone labeling method and assign labels to positions of symbols. Every position i in the chunk is assigned an integer label lab(i) satisfying 0 ≤ lab(i) ≤ σ · nO(1) and lab(i1 ) < lab(i2 ) if and only if i1 < i2 . Instead of pairs (a, i) the sequence R will contain pairs (a, lab(i)). When a new element is inserted, we have to change the labels of some other elements in order to maintain the monotonicity of the labeling. Existing labeling schemes [45, 11, 12] require O(log2 n) or O(log n) changes of labels after every insertion. In our case, however, we have to process large batches of insertions. We can also assume that at most log n batches need to be processed. In our scenario O(1) amortized modifications per insertion can be achieved, as shown below. In this section we denote by C an ordered set that contains between σ and 2σ elements. Let x1 ≤ x2 ≤ . . . ≤ xt denote the elements of C. Initially we assign the label lab(xi ) = i · d to the i-th smallest element xi , where d = 4n. We associate an interval [lab(xi ), lab(xi+1 ) − 1] with xi . Thus initially the interval of xi is [id, (i + 1)d − 1]. We assume that C also contains a dummy element x0 = −∞ and lab(−∞) = 0. Thus all labels are non-negative integers bounded by O(σ · n). Suppose that the k-th batch of insertions consists of m new elements y1 ≤ y2 ≤ . . . ≤ ym . Since at most log n batches of insertions must be supported, 1 ≤ k ≤ log n. We say that an element yj is 16 in an interval I = [lab(xs ), lab(xe )] if xs < yj < xe . We denote by new(I) the number of inserted elements in I. The parameter ρ(I) for an interval I is defined as the ratio of old and new elements e−s+1 in I = [lab(xs ), lab(xe )], ρ(I) = new(I) . We identify the set of non-overlapping intervals I1 , . . ., Ir such that every new element yt is in some interval Ij , and 1 ≤ ρ(Ij ) ≤ 2 for all j, 1 ≤ j ≤ r. (This is always possible if m ≤ |C|; otherwise we simply merge the insertions with C in O(|C| + m) = O(m) time and restart all the labels.) We can find I1 , . . ., Ir in O(m) time. For every Ij , 1 ≤ j ≤ r, we evenly distribute the labels of old and new elements in the interval Ij0 ⊆ Ij . Suppose that f new elements yp , . . ., yp+f −1 are inserted into interval Ij = [lab(xs ), lab(xe )] so that now there are v = f + (e − s) + 1 elements in this interval. We assign the label lab(xs ) + dj · (i − 1) to the i-th )−lab(xs ) smallest element in Ij where dj = lab(xev−1 . By our choice of Ij , f ≤ e−s+1 and the number of elements in Ij increased at most by twofold. Hence the minimal distance between two consecutive labels does not decrease by more than a factor of 2 after insertion of new elements into Ij . We inserted f new elements into Ij and changed the labels of at most 2f old elements. Hence the amortized number of labels that we must change after every insertion is O(1). The initial distance between labels is d = 4n and this distance becomes at most two times smaller after every batch of insertions. Hence the distance between consecutive labels is an integer larger than 2 during the first log n batches. One remaining problem with our scheme is the large range of the labels. Since labels are integers bounded by 4|C|n, we need Θ(log σ + log n) bits per label. To solve this problem, we will split the chunk C into blocks and assign the same label to all the symbols in a block. A label assigned to the symbols in a block will be stored only once. Details are provided in Section A.3. A.3 Batched Rank Queries and Insertions on a Sequence In this section we describe a dynamic data structure that supports both batches of rank queries and batches of insertions. First we describe how queries and updates on a chunk C are supported. The linked list L contains all the symbols of C in the same order as they appear in C. Each node of L stores a block of Θ(logσ n) symbols, containing at most (1/4) logσ n of them. We will identify list nodes with the blocks they contain; however, the node storing block b also stores the total number of symbols in all preceding blocks and a label lab(b) for the block. Labels are assigned to blocks with the method described in Section A.2. The pointer to (the list node containing) block b will be called pb ; these pointers use O(log σ) bits. We also maintain a data structure that can answer rank queries on any block. The data structure for a block supports queries and insertions in O(1) time using a look-up table: Since σ ≤ n1/4 and the block size is (1/4) logσ n, we can keep pre-computed answers to all rank queries for all possible blocks in a table T bl[0..n1/4 − 1][0..n1/4 − 1][0.. logσ n − 1]. The entry T bl[b][a][i] contains the answer to the query ranka (i, b) on a block b. T bl contains O(n1/2 logσ n) = o(n) entries and can be constructed in o(n) time. Updates can be supported by a similar look-up table or by bit operations on the block b. We also use sequences R and R0 , defined in Section 3, but we make the following modifications. For every occurrence C[i] = a of a symbol a in C, the sequence R contains pair (a, pb ), where pb is a pointer to the block b of L that contains C[i]. Pairs are sorted by symbol in increasing order, and pairs with the same symbol are sorted by their position in C. Unlike in Section 3, the chunk C can be updated and we cannot maintain the exact position i of C[i] for all symbols in C; we only maintain the pointers pb in the pairs (a, pb ) ∈ R. Note that we cannot use block pointers for searching in L (or in C). Instead, block labels are 17 monotonously increasing and lab(b1 ) < lab(b2 ) if the block b2 follows b1 in L. Hence block labels will be used for searching and answering rank queries. Block labels lab(b) use Θ(log n) bits of space, so we store them only once with the list nodes b and access them via the pointers pb . Groups Ha,j are defined as in Section 3; each Ha,j contains all the pairs of R that are between two consecutive elements of Ra0 for some a. The data structure Da,j that permits searching in Ha,j is defined as follows. Suppose that Ha,j contains pairs (a, pb1 ), . . ., (a, pbf ). We then keep a Succinct SB-tree data structure [20] on lab(b1 ), . . ., lab(bf ). This data structure requires O(log log n) additional bits per label. For any integer q, it can find the largest block label lab(bi ) < q in O(1) time or count the number of blocks bi such that lab(bi ) < q in O(1) time (because our sets Ha,r contain a logarithmic number of elements). The search procedure needs to access one block label, which we read from the corresponding block pointer. Queries. Suppose that we want to answer queries ranka1 (i1 , C), ranka2 (i2 , C), . . ., rankat (it , C) on a chunk C. We traverse all the blocks of L and find for every ij the label lj of the block bj that contains the ij -th symbol, lj = lab(bj ). We also compute rj,1 = rankaj (i0j , bj ) using T bl, where i0j is the relative position of the ij -th symbol in bj . Since we know the total number of symbols in all the blocks that precede bj , we can compute i0j in O(1) time. We then represent the queries by pairs (aj , lj ) and sort these pairs stably in increasing order of aj . Then we traverse the list of query pairs (aj , lj ) and the sequence R0 . For every query (aj , lj ) we find the rightmost pair (aj , pj ) ∈ R0 satisfying lab(pj ) ≤ lj . Let rj,2 denote the rank of (aj , pj ) in Raj , i.e., the number of pairs (aj , i) ∈ R preceding (aj , pj ). We keep this information for every pair in R0 using O(log σ) additional bits. Then we use the succinct SB-tree Daj ,pj , which contains information about the pairs in Haj ,pj (i.e., the pairs in the group starting with (aj , pj )). The structure finds in constant time the largest lab(bg ) ∈ Daj ,pj such that lab(bg ) < lj , as well as the number rj,3 of pairs from the beginning of Haj ,pj up to the pair with label lab(bg ). The answer to the j-th rank query is then rankaj (ij , C) = rj,1 + rj,2 + rj,3 . The total query time is then O(σ/ logσ n + t). Insertions. Suppose that symbols a1 , . . ., at are to be inserted at positions i1 , . . ., it , respectively. We traverse the list L and identify the nodes where new symbols must be inserted. We simultaneously update the information about the number of preceding elements, for all nodes. All this is done in time O(σ/ logσ n + t). We also perform the insertions into the blocks. If, as a result, some block contains more than (1/4) logσ n symbols, we split it into an appropriate number of blocks, so that each block contains Θ(logσ n) but at most (1/4) logσ n symbols. Nodes for the new blocks are allocated5 , linked to the list L, and assigned appropriate labels using the method described in Section A.2. After t insertions, we create at most O(t/ logσ n) new blocks (in the amortized sense, i.e., if we consider the insertions from the beginning). Each such new block b0 , coming from splitting an existing block b, requires that we change all the corresponding pointers pb from the pairs (az , pb ) in R (and R0 ), so that they become (az , pb0 ). To find those pairs efficiently, the list node holding b also contains the O(logσ n) pointers to those pairs (using O(log σ) bits each); we can then update the required pointers in O(t) total time. The new blocks also require creating their labels. Those O(t/ logσ n) label insertions also trigger O(t/ logσ n) changes of other labels, with the technique of Section A.2. If the label of a block b was changed, we visit all pairs (az , pb ) in R that point to b. Each such (az , pb ) is kept in some 5 Constant-time allocation is possible because we use fixed-size nodes, leaving the maximum possible space, (1/4) log n bits, for the block contents. 18 group Haz ,k and in some succinct SB-tree Daz ,k . We then delete the old label of b from Daz ,k and insert the new modified label. The total number of updates is thus bounded by O(t). While not mntioned in the original paper [20], one can easily perform constant-time insertions and deletions √ of labels in a succinct SB-tree: The structure is a two-level B-tree of arity log n holding encoded Patricia trees on the bits of the keys, and storing at the leaves the positions of the keys in Ha,r using O(log log n) bits each. To insert or delete a label we follow the usual B-tree procedures. The insertion or deletion of a key in a B-tree node is done in constant time with a precomputed table that, in the same spirit of T bl, yields the resulting Patricia tree if we delete or insert a certain node; √ this is possible because internal nodes store only O( log n log log n) = o(log n) bits. Similarly, we can delete or insert a key at the leaves of the tree. Apart from handling the block overflows, we must insert in R the pairs corresponding to the new t symbols we are actually inserting. We perform t rank queries ranka1 (i1 , C), . . ., rankat (it , C), just as described above, and sort the symbols to insert by those ranks using radix sort. We then traverse R0 and identify the groups Ha1 ,j1 , . . ., Hat ,jt where new symbols must be inserted; the counters of preceding pairs for the pairs in R0 is easily updated in the way. We allocate the pairs (ak , pbk ) that will belong to Hai ,ji and insert the labels lab(bk ) in the corresponding data structures Dak ,jk , for all 1 ≤ k ≤ t. If some groups Hat ,jt become larger than permitted, we split them as necessary and insert the corresponding pairs in R0 . We can answer the rank queries, traverse R, and update the groups Hak ,jk all in O(σ/ logσ n + t) time. Global Sequence. In addition to chunk data structures, we keep a static bitvector Ma = 1d1 0 . . . 1ds for every symbol a; di denotes the number of times a occurs in the i-th chunk. Given a global sequence of m ≥ n/ logσ n queries, ranka1 (i1 , B), . . ., rankam (im , B) on B, we can assign them to chunks in O(m) time. Then we answer queries on chunks as shown above. If mj queries are asked on chunk Cj , then these queries are processed in O(mj + σ/ logσ n) time. Hence all queries on all chunks are answered in O(m + n/ logσ n) = O(m) time. We can answer a query rankak (ik , B) by answering a rank query on the chunk that contains B[ik ] and O(1) queries on the sequence Mak [19]. Queries on Mak are supported in O(1) time because the bitvector is static. Hence the total time to answer m queries on B is O(m). When a batch of symbols is inserted, we update the corresponding chunks as described above. If some chunk contains more than 4σ symbols, we split it into several chunks of size Θ(σ) using standard techniques. Finally we update the global sequences Ma , both because of the insertions and due to the possible chunk splits. We simply rebuild the bitvectors Ma from scratch; this is easily done in O(na / log n) time, where na is the number of bits in Ma ; see e.g. [31]. This adds up to O(m/ log n) time. Hence the total amortized cost for a batch of m ≥ n/∆ insertions is O(m). Theorem 4 We can keep a sequence B[0..n − 1] over an alphabet of size σ in O(n log σ) bits of space so that a batch of m rank queries can be answered in O(m) time and a batch of m insertions is supported in O(m) amortized time, for logn n ≤ m ≤ n. σ A.4 Sequences with Partial Rank Operation If σ = logO(1) n, then we can keep a sequence S in O(n log σ) bits so that select and rank queries (including partial rank queries) are answered in constant time [15]. In the remaining part of this section we will assume that σ ≥ log3 n. 19 Lemma 3 Let σ ≤ m ≤ n. We can support partial rank queries on a sequence C[0..m − 1] over an alphabet of size σ in time O(1). The data structure needs O(m log log m) additional bits and can be constructed in O(m) deterministic time. Proof : Our method employs the idea of buckets introduced in [4]. Our structure does not use monotone perfect hashing, however. Let Ia denote the set of positions where a symbol a occurs in C, i.e., Ia contains all integers i satisfying C[i] = a. If Ia contains more than 2 log2 m integers, we divide Ia into buckets Ba,s of size log2 m. Let pa,s denote the longest common prefix of all integers (seen as bit strings) in the bucket Ba,s and let la,s denote the length of pa,s . For every element C[i] in the sequence we keep the value of lC[i],t where BC[i],t is the bucket containing i. If IC[i] was not divided into buckets, we assume lC[i],t = null, a dummy value. We will show below how the index t of BC[i],t can be identified if lC[i],t is known. For every symbol C[i] we also keep the rank r of i in its bucket BC[i],t . That is, for every C[i] we store the value of r such that i is the r-th smallest element in its bucket BC[i],t . Both lC[i],t and r can be stored in O(log log m) bits. The partial rank of C[i] in C can be computed from t and r, rankC[i] (i, C) = t log2 m + r. It remains to describe how the index t of the bucket containing C[i] can be found. Our method uses o(m) additional bits. First we observe that pa,i 6= pa,j for any fixed a and i 6= j; see [4] for a proof. Let Tw denote the full binary trie on the interval [0..m − 1]. Nodes of Tw correspond to all possible bit prefixes of integers 0, . . . , m − 1. We say that a bucket Ba,j is assigned to a node u ∈ Tw if pa,j corresponds to the node u. Thus many different buckets can be assigned to the same node u. But for any symbol a at most one bucket Ba,k is assigned to u. If a bucket is assigned to a node u, then there are at least log2 m leaves below u. Hence buckets can be assigned to nodes of height at least 2 log log m; such nodes will be further called bucket nodes. We store all buckets assigned to bucket nodes of Tw using the structure described below. We order the nodes u level-by-level starting at the top of the tree. Let mj denote the number of buckets assigned to uj . The data structure Gj contains all symbols a such that some bucket Ba,ka is assigned to uj . For every symbol a in Gj we can find in O(1) time the index ka of the bucket Ba,ka that is assigned to uj . We implement Gj as deterministic dictionaries of Hagerup et al. [22]. Gj uses O(mj log σ) bits and can be constructed in O(mj log σ) time. We store Gj only for bucket nodes uj such that mj > 0. We also keep an array W [1.. logm2 m ] whose entries correspond to bucket nodes of Tw : W [j] contains a pointer to Gj or null if Gj does not exist. Using W and Gj we can answer a partial rank query rankC[i] (i, C). Let C[i] = a. Although the bucket Ba,t containing i is not known, we know the length la,t of the prefix pa,t . Hence pa,t can be computed by extracting the first la,t bits of i. We can then find the index j of the node uj that corresponds to pa,t , j = (2la,t − 1) + pa,t . We lookup the address of the data structure Gj in W [j]. Finally the index t of the bucket Ba,t is computed as t = GP j [a]. A data structure Gj consumes O(mj log m) bits. Since j mj ≤ logm2 m , all Gj use O(m/ log m) bits of space. The array W also uses O(m/ log m) bits. Hence our data structure uses O(log log m) additional bits per symbol.  Theorem 5 We can support partial rank queries on a sequence B using O(n log log σ) additional bits. The underlying data structure can be constructed in O(n) deterministic time. Proof : We divide the sequence B into chunks of size σ (except for the last chunk that contains n − (bn/σcσ) symbols). Global sequences Ma are defined in the same way as in Section 3. A partial rank query on B can be answered by a partial rank query on a chunk and two queries on Ma .  20 A.5 Reporting All Symbols in a Range We prove the following lemma in this section. Lemma 4 Given a sequence B[0..n − 1] over an alphabet σ, we can build in O(n) time a data structure that uses O(n log log σ) additional bits and answers the following queries: for any range [i..j], report occ distinct symbols that occur in B[i..j] in O(occ) time, and for every reported symbol a, give its frequency in B[i..j] and its frequency in B[0..i − 1]. The proof is the same as that of Lemma 3 in [2], but we use the result of Theorem 5 to answer partial rank queries. This allows us to construct the data structure in O(n) deterministic time (while the data structure in [2] achieves the same query time, but the construction algorithm requires randomization). For completeness we sketch the proof below. Augmenting B with O(n) additional bits, we can report all distinct symbols occurring in B[i..j] in O(occ) time using the idea originally introduced by Sadakane [41]. For every reported symbol we can find in O(1) time its leftmost and its rightmost occurrences in B[i..j]. Suppose ia and ja are the leftmost and rightmost occurrences of a in B[i..j]. Then the frequencies of a in B[i..j] and B[0..i−1] can be computed as ranka (ja , B)−ranka (ia , B)+1 and ranka (ia , B)−1 respectively. Since ranka (ia , B) and ranka (ja , B) are partial rank queries, they are answered in O(1) time. The data structure that reports the leftmost and the rightmost occurrences can be constructed in O(n) time. Details and references can be found in [9]. Partial rank queries are answered by the data structure of Theorem 5. Hence the data structure of Lemma 4 can be built in O(n) deterministic time. We can also use the data structure of Lemma 5 to determine whether the range B[i..j] contains only one distinct symbol in O(1) time by using the following observation. If B[i..j] contains only one symbol, then B[i] = B[j] and rankB[i] (j, B) − rankB[i] (i, B) = j − i + 1. Hence we can find out whether B[i..j] contains exactly one symbol in O(1) time by answering two partial rank queries. This observation will be helpful in Section 5. A.6 Computing the Intervals The algorithm for constructing PLCP, described in Section 5, requires that we compute the intervals of T [j∆0 ..j∆0 + `i ] and T [j∆0 ..j∆0 + `i ] for i = j∆0 and j = 0, 1, . . . , n/∆0 . We will show in this section how all necessary intervals can be computed in linear time when `i for i = j∆0 are known. Our algorithm uses the suffix tree topology. We construct some additional data structures and pointers for selected nodes of the suffix tree T . First, we will describe auxiliary data structures on T . Then we show how these structures can be used to find all needed intervals in linear time. Marking Nodes in a Tree. We use the marking scheme described in [34]. Let d = log n. A node u of T is heavy if it has at least d leaf descendants and light otherwise. We say that a heavy node u is a special or marked node if u has at least two heavy children. If a non-special heavy node u has more than d children and among them is one heavy child, then we keep the index of the heavy child in u. We keep all children of a node u in the data structure Fu , so that the child of u that is labeled by a symbol a can be found efficiently. If u has at most d + 1 children, then Fu is implemented as a fusion tree [18]; we can find the child of u labeled by any symbol a in O(1) time. If u has more than d + 1 children, then Fu is implemented as the van Emde Boas data structure and we can find the child labeled by a in O(log log σ) time. If the node u is special, we keep labels of its heavy children in the data structure Du . Du is implemented as a dictionary data structure [22] so that 21 we can find any heavy child of a special node in O(1) time. We will say that a node u is difficult if u is light but the parent of u is heavy. We can quickly navigate from a node u ∈ T to its child ui unless the node ui is difficult. Proposition 2 We can find the child ui of u that is labeled with a symbol a in O(1) time unless the node ui is difficult. If ui is difficult, we can find ui in O(log log σ) time. Proof : Suppose that ui is heavy. If u is special, we can find ui in O(1) time using Du . If u is not special and it has at most d + 1 children, then we find ui in O(1) time using Fu . If u is not special and it has more than d + 1 children, then ui is the only heavy child of u and its index i is stored with the node u. Suppose that ui is light and u is also light. Then u has at most d children and we can find ui in O(1) time using Fu . If u is heavy and ui is light, then ui is a difficult node. In this case we can find the index i of ui in O(log log σ) time using Fu .  Proposition 3 Any path from a node u to its descendant v contains at most one difficult node. Proof : Suppose that a node u is a heavy node and its descendant v is a light node. Let u0 denote the first light node on the path from u to v. Then all descendants of u0 are light nodes and u0 is the only difficult node on the path from u to v. If u is light or v is heavy, then there are apparently no difficult nodes between u and v.  Weiner Links. A Weiner link (or w-link) wlink(v, c) connects a node v of the suffix tree T labeled by the path p to the node u, such that u is the locus of cp. If wlink(v, c) = u we will say that u is the target node and v is the source of wlink(v, c) and c is the label of wlink(v, c). If the target node u is labeled by cp, we say that the w-link is explicit. If u is labeled by some path cp0 , such that cp is a proper prefix of cp0 , then the Weiner link is implicit. We classify Weiner links using the same technique that was applied to nodes of the suffix tree above. Weiner links that share the same source node are called sibling links. A Weiner link from v to u is heavy if the node u has at least d leaf descendants and light otherwise. A node v is w-special iff there are at least two heavy w-links connecting v and some other nodes. For every special node v the dictionary Dv0 contains the labels c of all heavy w-links wlink(v, c). For every c such that wlink(v, c) is heavy, we also keep the target node u = wlink(v, c). Dv0 is implemented as in [22] so that queries are answered in O(1) time. Suppose that v is the source node of at least d + 1 w-links, but u = wlink(v, c) is the only heavy link that starts at v. In this case we say that wlink(v, c) is unique and we store the index of u and the symbol c in v. Summing up, we store only heavy w-links that start in a w-special node or unique w-links. All other w-links are not stored explicitly; if they are needed, we compute them using additional data structures that will be described below. Let B denote the BWT of T . We split B into intervals Gj of size 4d2 . For every Gj we keep the dictionary Aj of symbols that occur in Gj . For each symbol a that occurs in Gj , the data structure Gj,a contains all positions of a in Gj . Using Aj , we can find out whether a symbol a occurs in Gj . Using Gj,a , we can find for any position i the smallest i0 ≥ i such that B[i0 ] = a and B[i0 ] is in Gj (or the largest i00 ≤ i such that B[i00 ] = a and B[i00 ] is in Gj ). We implement both Aj and Gj,a as fusion trees [18] so that queries are answered in O(1) time. Data structures Aj and Gj,a for a fixed j need O(d2 log σ) bits. We also keep (1) the data structure from [19] that supports select queries on B in O(1) time and rank queries on B in O(log log σ) time and (2) the data structure from Theorem 5 that supports partial rank queries in O(1) time. All additional data structures on the sequence B need O(n log σ) bits. 22 Proposition 4 The total number of heavy w-links that start in w-special nodes is O(n/d). Proof : Suppose that u is a w-special node and let p be the label of u. Let c1 , . . ., cs denote the labels of heavy w-links with source node u. This means that each c1 p, c2 p, . . ., cs p occurs at least d times in T . Consider the suffix tree T of the reverse text T . T contains the node u that is labeled with p. The node u has (at least) s children u1 , . . ., us . The edge connecting u and ui is a string that starts with ci . In other words each ui is the locus of pci . Since ci p occurs at least d times in T , pci occurs at least d times in T . Hence each ui has at least d descendants. Thus every w-special node in T correspond to a special node in T and every heavy w-link outgoing from a w-special node corresponds to some heavy child of a special node in T . Since the number of heavy children of special nodes in a suffix tree is O(n/d), the number of heavy w-links starting in a w-special node is also O(n/d).  Proposition 5 The total number of unique w-links is O(n/d). Proof : A Weiner link wlink(v, a) is unique only if wlink(v, a) is heavy, all other w-links outgoing from v are light, and there are at least d light outgoing w-links from v. Hence there are at least d w-links for every explicitly stored target node of a unique Weiner link.  We say that wlink(v, a) is difficult if its target node u = wlink(v, a) is light and its source node v is heavy. Proposition 6 We can compute u = wlink(v, a) of u in O(1) time unless wlink(v, a) is difficult. If the wlink(v, a) is difficult, we can compute u = wlink(v, a) in O(log log σ) time. Proof : Suppose that u is heavy. If v is w-special, we can find u in O(1) time using Du . If v is not w-special and it has at most d + 1 w-children, then we find ui in O(1) time using data structures on B. Let [lv , rv ] denote the suffix range of v. The suffix range of u is [lu , ru ] where lu = Acc[a] + ranka (lv − 1, B) + 1 and ru = Acc[a] + ranka (rv , B). We can find ranka (rv , B) as follows. Since v has at most d light w-children, the rightmost occurrence of a in B[lv , rv ] is within the distance d2 from rv . Hence we can find the rightmost ia ≤ rv such that B[ia ] = a by searching in the interval Gj that contains rv or the preceding interval Gj−1 . When ia is found, ranka (rv , B) = ranka (ia , B) can be computed in O(1) time because partial rank queries on B are supported in time O(1). We can compute ranka (lv − 1, B) in the same way. When rank queries are answered, we can find lu and ru in constant time. Then we can identify the node u by computing the lowest common ancestor of lu -th and ru -th leaves in T . If v is not special and it has more than d + 1 outgoing w-links, then u is the only heavy target node of a w-link starting at v; hence, its index i is stored in the node v. Suppose that u is light and v is also light. Then the suffix range [lv , rv ] of v has length at most d. B[lv , rv ] intersects at most two intervals Gj . Hence we can find ranka (lv − 1, B) and ranka (rv , B) in constant time. Then we can find the range [lu , ru ] of the node u and identify u in time O(1) as described above. If v is heavy and u is light, then wlink(v, a) is a difficult w-link. In this case we need O(log log σ) time to compute ranka (lv − 1, B) and ranka (rv , B). Then we find the range [lu , ru ] and the node u is found as described above.  Proposition 7 Any sequence of nodes u1 , . . ., ut where ui = wlink(ui−1 , ai−1 ) for some symbol ai−1 contains at most one difficult w-link. 23 Proof : Let π denote the path of w-links that contains nodes u1 , . . ., ut . Suppose that a node u1 is a heavy node and ut is a light node. Let ul denote the first light node on the path π. Then all nodes on the path from ul to ut are light nodes and wlink(ul−1 , al−1 ) is the only difficult w-link on the path from u1 to ut . If u1 is light or ut is heavy, then all nodes on π are light nodes (resp. all nodes on π are heavy nodes). In this case there are apparently no difficult w-links between u1 and ut .  Pre-processing. Now we show how we can construct above described auxiliary data structures in linear time. We start by generating the suffix tree topology and creating data structures Fu and Du for all nodes u. For every node u in the suffix tree we create the list of its children ui and their labels in O(n) time. For every tree node u we can find the number of its leaf descendants using standard operations on the suffix tree topology. Hence, we can determine whether u is a heavy or a light node and whether u is a special node. When this information is available, we generate the data structures Fu and Du . We can create data structures necessary for navigating along w-links in a similar way. We visit all nodes u of T . Let lu and ru denote the indexes of leftmost and rightmost leaves in the subtree of u. Let B denote the BWT of T . Using the method of Lemma 4, we can generate the list of distinct symbols in B[lu ..ru ] and count how many times every symbol occurred in B[lu ..ru ] in O(1) time per symbol. If a symbol a occurred more than d times, then wlink(u, a) is heavy. Using this information, we can identify w-special nodes and create data structures Du0 . Using the method of [38], we can construct Du0 in O(nu log log nu ) time. By Lemma 4 the total number of target nodes in all Du0 is O(n/d); hence we can construct all Du0 in o(n) time. We can also find all nodes u with a unique w-link. All dictionaries Du0 and all unique w-links need O((n/d) log n) = O(n) bits of space. Supporting a Sequence of extendright Operations. Lemma 5 If we know the suffix interval of a right-maximal factor T [i..i + j] in B and the suffix interval of T [i..i + j] in B, the we can find the intervals of T [i..i + j + t] and T [i..i + j + t] in O(t + log log σ) time. Proof : Let T and T denote the suffix tree for the text T and let T denote the suffix tree of the reverse text T . We keep the data structure for navigating the suffix tree T , described in Proposition 2 and the data structure for computing Weiner links described in Proposition 6. We also keep the same data structures for T . Let [`0,s , `0,e ] denote the suffix interval of T [i..i + j]; let [`00,s , `00,e ] denote the suffix interval of T [i..i + j]. We navigate down the tree following the symbols T [i + j + 1], . . ., T [i + j + t]. Let a = T [i + j + k] for some k such that 1 ≤ k ≤ t and suppose that the suffix interval [`k−1,s , `k−1,e ] of T [i..i + j + k − 1] and the suffix interval [`0k−1,s , `0k−1,e ] of T [i..i + j + k − 1] are already known. First, we check whether our current location is a node of T . If B[`0k−1,s , `0k−1,e ] contains only one symbol T [i + j + k], then the range of T [i..i + j + k] is identical with the range of T [i..i + j + k − 1]. We can calculate the range of T [i..i + j + k] in a standard way by answering two rank queries on B and O(1) arithmetic operations; see Section A.1. Since B[`0k−1,s , `0k−1,e ] contains only one symbol, rank queries that we need to answer are partial rank queries. Hence we can find the range of T [i..i + j + k] in time O(1). If B[`0k−1,s , `0k−1,e ] contains more than one symbol, then there is a node u ∈ T that is labeled with T [i..i + j + k − 1]; u = lca(`k−1,s , `k−1,e ) where lca(f, g) denotes the lowest common ancestor of the f -th and the g-th leaves. We find the child u0 of the node u in T that is labeled with a = T [i + j + k]. We also compute the Weiner 24 link u0 = wlink(u, a) for a node u0 = lca(`0k−1,s , `0k−1,e ) in T . Then `0k,s = leftmost leaf(u0 ) and `0k,e = rightmost leaf(u0 ). We need to visit at most t nodes of T and at most t nodes of T in order to find the desired interval. By Proposition 2 and Proposition 3, the total time needed to move down in T is O(t + log log σ). By Proposition 6 and Proposition 7, the total time to compute all necessary w-links in T is also O(t + log log σ).  Finding the Intervals. The algorithm for computing PLCP, described in Section 5, assumes that we know the intervals of T [j∆0 ..j∆0 +`i ] and T [j∆0 ..j∆0 + `i ] for i = j∆0 and j = 0, 1, . . . , n/∆0 . These values can be found as follows. We start by computing the intervals of T [0..`0 ] and T [0..`0 ]. Suppose that the intervals of T [j∆0 ..j∆0 + `i ] and T [j∆0 ..j∆0 + `i ] are known. We can compute `(j+1)∆0 as shown in Section 5. We find the intervals of T [(j+1)∆0 ..j∆0 +`i ] and T [(j + 1)∆0 ..j∆0 + `i ] in time O(∆0 ) by executing ∆0 operations contractleft. Each operation contractleft takes con0 0 stant time. Then we calculate the intervals of T [(j+1)∆0 ..(j+1)∆0 +`i+1 ] and T [(j + 1)∆ P ..(j + 1)∆ + `i+1 ] 0 in O(log log σ + (`i+1 − `i + ∆ )) time using Lemma 5. We know from Section 5 that (`i+1 − `i ) = O(n). Hence we compute all necessary intervals in time O(n + (n/∆0 ) log log σ) = O(n). A.7 Compressed Index In this section we show how our algorithms can be used to construct a compact index in deterministic linear time. We prove the following result. Theorem 6 We can construct an index for a text T [0..n − 1] over an alphabet of size σ in O(n) deterministic time using O(n log σ) bits of working space. This index occupies nHk + o(n log σ) + O(n logd n ) bits of space for a parameter d > 0. All occurrences of a query substring P can be counted in O(|P | + log log σ) time; all occ occurrences of P can be reported in O(|P | + log log σ + occ · d) time. An arbitrary substring P of T can be extracted in O(|P | + d) time. An uncompressed index by Fischer and Gawrychowski [16] also supports counting queries in O(|P | + log log σ) time; however their data structure uses Θ(n log n) bits. We refer to [7] for the latest results on compressed indexes. Interval Rank Queries. We start by showing how a compressed data structure that supports select queries can be extended to support a new kind of queries that we dub small interval rank queries. An interval rank query ranka (i, j, B) asks for ranka (i0 , B) and ranka (j 0 , B), where i0 and j 0 are the leftmost and rightmost occurrences of the symbol a in B[i..j]; if a does not occur in B[i..j], we return null. An interval query ranka (i, j, B) is a small interval query if j − i ≤ 2 log2 σ. Our compressed index relies on the following result. Lemma 6 Suppose that we are given a data structure that supports access queries on a sequence C[0..m] in time tselect . Then, using O(m log log σ) additional bits, we can support small interval rank queries on C in O(tselect ) time. Proof : We split C into groups Gi so that every group contains log2 σ consecutive symbols of S, Gi = C[i log2 σ..(i + 1) log2 σ − 1]. Let Ai denote the set of symbols that occur in Gi . We would need log σ bits per symbol to store Ai . Therefore we keep only a dictionary A0i implemented as a succinct SB-tree [20]. A succinct SB-tree needs O(log log m) bits per symbol; using SB-tree, we can determine whether a query symbol a is in Ai in constant time if we can access elements of Ai . We can identify every a ∈ Ai by its leftmost position in Gi . Since Gi consists of log2 σ consecutive symbols, a position within Gi can be specified using O(log log σ) bits. Hence we can access any 25 symbol of Ai in O(1) time. For each a ∈ Ai we also keep a data structure Ia,i that stores all positions where a occurs in Gi . Positions are stored as differences with the left border of Gi : if C[j] = a, we store the difference j − i log2 σ. Hence elements of Ia,i can be stored in O(log log σ) bits per symbol. Ia,i is also implemented as an SB-tree. Using data structures A0i and Ia,i , we can answer small interval rank queries. Consider a group Gt = C[t log2 σ..(t + 1) log2 σ − 1], an index i such that t log2 σ ≤ i ≤ (t + 1) log2 σ, and a symbol a. We can find the largest j ≤ i such that C[j] = a and C[j] ∈ Gt : first we look for the symbol a in A0t ; if a ∈ A0t , we find the predecessor of j in Ia,t . An interval C[i..j] of size d ≤ log2 σ intersects at most two groups Gt and Gt−1 . We can find the rightmost occurrence of a symbol a in [i, j] as follows. First we look for the rightmost occurrence j 0 ≤ j of a in Gt ; if a does not occur in C[t log2 σ..j], we look for the rightmost occurrence j 0 ≤ t log2 σ − 1 of a in Gt−1 . We can find the leftmost occurrence i0 of a in C[i..j] using a symmetric procedure. When i0 and j 0 are found, we can compute ranka (i0 , C) and ranka (j 0 , C) in O(1) time by answering partial rank queries. Using the result of Theorem 5 we can support partial rank queries in O(1) time and O(m log log σ) bits. Our data structure takes O(m log log m) additional bits: Dictionaries A0i need O(log log m) bits per symbol. Data structures Ia,t and the structure for partial rank queries need O(m log log σ) bits. We can reduce the space usage from O(m log log m) to O(m log log σ) using the same method as in Theorem 5.  Compressed Index. We mark nodes of the suffix tree T using the method of Section A.6, but we set d = log σ. Nodes of T are classified into heavy, light, and special as defined in Section A.6. For every special node u, we construct a dictionary data structure Du that contains the labels of all heavy children of u. If there is child uj of u, such that the first symbol on the edge from to u to uj is aj , then we keep a in Du . For every aj ∈ Du we store the index j of the child uj . If a heavy node u has only one heavy child uj and more than d light children, then we also store data structure Du for such a node u. If a heavy node has less d children and one heavy child, then we keep the index of the heavy child using O(log d) = O(log log σ) bits. The second component of our index is the Burrows-Wheeler Transform B of the reverse text T . We keep the data structure that supports partial rank, select, and access queries on B. Using e.g., the result from [1], we can support access queries in O(1) time while rank and select queries are answered in O(log log σ) time. Moreover we construct a data structure, described in Lemma 6, that supports rank queries on a small interval in O(1) time. We also keep the data structure of Lemma 4 on B; using this data structure, we can find in O(1) time whether an arbitrary interval B[l..r] contains exactly one symbol. Finally we explicitly store answers to selected rank queries. Let B[lu ..ru ] denote the range of P u , where Pu is the string that corresponds to a node u and P u is the reverse of Pu . For all data structures Du and for every symbol a ∈ Du we store the values of ranka (lu − 1, B) and ranka (ru , B). We will show later in this section that each rank value can be stored in O(log σ) bits. Thus Du needs O(log σ) bits per element. The total number of elements in all Du is equal to the number of special nodes plus the number of heavy nodes with one heavy child and at least d light children. Hence all Du contain O(n/d) symbols and use O((n/d) log σ) = O(n) bits of space. Indexes of heavy children for nodes with only one heavy child and at most d light children can be kept in O(log log σ) bits. Data structure that supports select, rank, and access queries on B uses nHk (T ) + o(n log σ) bits. Auxiliary data structures on B need O(n) + O(n log log σ) bits. Finally we need O(n logd n ) bits to retrieve the position of a suffix in T in O(d) time. Hence the space usage of our data structure is nHk (T ) + o(n log σ) + O(n) + O(n logd n ). 26 Queries. Given a query string P , we will find in time O(|P | + log log σ) the range of the reversed string P in B. We will show below how to find the range of P [0..i] if the range of P [0..i − 1] is known. Let [lj ..rj ] denote the range of P [0..j], i.e., P [0..j] is the longest common prefix of all suffixes in B[lj ..rj ]. We can compute lj and rj from lj−1 and rj−1 as lj = Acc[a] + ranka (lj−1 − 1, B) + 1 and rj = Acc[a] + ranka (rj−1 , B) for a = P [j] and j = 0, . . . , |P |. Here Acc[f ] is the accumulated frequency of the first f − 1 symbols. Using our auxiliary data structures on B and additional information stored in nodes of the suffix tree T , we can answer necessary rank queries in constant time (with one exception). At the same time we traverse a path in the suffix tree T until the locus of P is found or a light node is reached. Additional information stored in selected tree nodes will help us answer rank queries in constant time. A more detailed description is given below. Our procedure starts at the root node of T and we set l−1 = 0, r−1 = n − 1, and i = 0. We compute the ranges B[li ..ri ] that correspond to P [0..i] for i = 0, . . . , |P |. Simultaneously we move down in the suffix tree until we reach a light node. Let u denote the last visited node of T and let a = P [i]. We denote by ua the next node that we must visit in the suffix tree, i.e., ua is the locus of P [0..i]. We can compute li and ri in O(1) time if ranka (ri−1 , B) and ranka (li−1 − 1, B) are known. We will show below that these queries can be answered in constant time because either (a) the answers to rank queries are explicitly stored in Du or (b) the rank query that must be answered is a small interval rank query. The only exception is the situation when we move from a heavy node to a light node in the suffix tree; in this situation the rank query takes O(log log σ) time. For ease of description we distinguish between the following four cases. (i) Node u is a heavy node and a ∈ Du . In this case we identify the heavy child uj of u that is labeled with a. We can also find li and ri in time O(1) because ranka (li−1 , B) and ranka (ri−1 , B) are stored in Du . (ii) Node u is a heavy node and a 6∈ Du or we do not keep the dictionary Du for the node u. In this case u has at most one heavy child and at most d light children. If ua is a heavy node (case iia), then the leftmost occurrence of a in B[li−1 ..ri−1 ] is within d2 symbols of li−1 and the rightmost occurrence of a in B[li−1 ..ri−1 ] is within d2 symbols of ri−1 . Hence we can find li and ri by answering small interval rank queries ranka (li−1 , li−1 +d2 ) and ranka (ri−1 −d2 , ri−1 ) respectively. If ua is a light node (case iib), we answer two standard rank queries on B in order to compute li and ri . (iii) If u is a light node, then P [0..i − 1] occurs at most d times. Hence P [0..i − 1] also occurs at most d times and ri−1 − li−1 ≤ d. Therefore we can compute ri and li in O(1) time by answering small interval rank queries. (iv) We are on an edge of the suffix tree between a node u and some child uj of u. In this case all occurrences of P [0..i − 1] are followed by the same symbol a = P [i]. Hence all occurrences of P [0..i − 1] are preceded by P [i] in the reverse text. Therefore B[li−1 ..ri−1 ] contains only one symbol a = P [i]. In this case ranka (ri−1 , B) and ranka (li−1 − 1, B) are partial rank queries; hence li and ri can be computed in O(1) time. In all cases, except for the case (iia), we can answer rank queries and compute li and ri in O(1) time. In case (iia) we need O(log log σ) time answer rank queries. However case (iia) only takes place when the node u is heavy and its child ua is light. Since all descendants of a light node are light, case (iia) occurs only once when the pattern P is processed. Hence the total time to find the range of P in B is O(|P | + log log σ) time. When the range is known, we can count and report all occurrences of P in standard way. 27 Construction Algorithm. We can construct the suffix tree T and the BWT B in O(n) deterministic time. Then we can visit all nodes of T and identify all nodes u for which the data structure Du must be constructed. We keep information about nodes for which Du will be constructed in a bit vector. For every such node we also store the list of its heavy children with their labels. To compute additional information for Du , we traverse the nodes of T one more time using a variant of depth-first search. When a node u ∈ T is reached, we know the interval [lu , ru ] of su in B, where su is the string that labels the path from the root to a node u ∈ T . We generate the list of all children ui of u and their respective labels ai . If we store a data structure Du for the node u, we identify labels ah of heavy children uh of u. For every ah we compute rankah (lu − 1, B) and rankah (ru , B) and add this information to Du . Then we generate the intervals that correspond to all strings su ai in B and keep them in a list List(u). Since intervals in List(u) are disjoint, we can store List(u) in O(σ log n) bits. We can organize our traversal in such way that only O(log n) lists List(u) need to be stored. Let num(u) denote the number of leaves in the subtree of a node u. We say that a node is small if num(ui ) ≤ num(u)/2 and big otherwise. Every node can have at most one big child. When a node u processed and List(u) is generated, we visit small children ui of u in arbitrary order. When all small children ui are visited and processed, we discard the list L(u). Finally if u has a big child ub , we visit ub . If a node u is not the root node and we keep List(u), then num(u) ≤ num(parent(u))/2. Therefore we keep List(u) for at most O(log n) nodes u. Thus the space we need to store all List(u) is O(σ log2 n) = o(n) for σ ≤ n1/2 . Hence the total workspace used of our algorithm is O(n log σ). The total number of rank queries that we need to answer is O(n/d) because all Du contain O(n/d) elements. We need O((n/d) log log σ) time to construct all Du and to answer all rank queries. The total time needed to traverse T and collect necessary data about heavy nodes and special nodes is O(n). Therefore our index can be constructed in O(n) time. It remains to show how we can store selected precomputed answers to rank queries in O(log σ) bits per query. We divide the sequence B into chunks of size σ 2 . For each chunk and for every symbol a we encode the number of a’s occurrences per chunk in a binary sequence Aa , Aa = 1d1 01d2 0 . . . 1di 0 . . . where di is equal to the number of times a occurs in the i-th chunk. If a symbol B[i] is in the chunk Ch, then we can answer ranka (i, B) by O(1) queries on Aa and a rank query on Ch; see e.g., [19]. Suppose that we need to store a pre-computed answer to a query ranka (i, B); we store the answer to ranka (i0 , Ch) where Ch is the chunk that contains i and i0 is the relative position of B[i] in Ch. Since a chunk contain σ 2 symbols, ranka (i0 , Ch) ≤ σ 2 and we can store the answer to ranka (i0 , Ch) in O(log σ) bits. When the answer to the rank query on Ch is known, we can compute the answer to ranka (i, B) in O(1) time. 28
8cs.DS
Knowledge Representation Concepts for Automated SLA Management Adrian Paschke and Martin Bichler1 Abstract— Outsourcing of complex IT infrastructure to IT service providers has increased substantially during the past years. IT service providers must be able to fulfil their service-quality commitments based upon predefined Service Level Agreements (SLAs) with the service customer. They need to manage, execute and maintain thousands of SLAs for different customers and different types of services, which needs new levels of flexibility and automation not available with the current technology. The complexity of contractual logic in SLAs requires new forms of knowledge representation to automatically draw inferences and execute contractual agreements. A logic-based approach provides several advantages including automated rule chaining allowing for compact knowledge representation as well as flexibility to adapt to rapidly changing business requirements. We suggest adequate logical formalisms for representation and enforcement of SLA rules and describe a proof-ofconcept implementation. The article describes selected formalisms of the ContractLog KR and their adequacy for automated SLA management and presents results of experiments to demonstrate flexibility and scalability of the approach. Index Terms— Service Level Agreements (SLA), Service Level Management (SLM), Logic Programming (LP), Rule-based Knowledge Representation (KR), Business Rules 1. Introduction Outsourcing of complex IT infrastructure to IT service providers has become increasingly popular and led to much recent development [1]. To ensure Quality of Service (QoS) between the service customer and the provider, they jointly define a Service Level Agreement (SLA) as a part of a service contract that can be monitored by one, both or third parties. An SLA provides metrics for measuring the performance of the agreed upon Service Level Objective (SLOs). SLA rules are used to monitor service execution and detect violations of SLOs. SLAs are fundamental not only for outsourcing relationships, but for any kind of service supply chain and assume a central position in popular IT service management standards such as ITIL (www.itil.co.uk) or BS15000 (www.bs15000.org.uk). As a consequence, IT service providers need to manage, execute and maintain thousands of SLAs for different customers and different types of services in the upcoming service-oriented computing landscape. Commercial service level management tools such as IBM Tivoli, HP OpenView, CA Unicenter, BMC Patrol, and Microsoft Application Center store se- 1 A. Paschke and M. Bichler are with the Internet-based Information Systems, Department of Informatics, TU München, Boltzmannstr. 3, D-85748 Garching. E-mail: {Paschke|Bichler}@in.tum.de. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. lected QoS parameters such as availability or response time as parameters in the application code or database tiers. This approach is restricted to simple, static rules with only a limited set of parameters. We have analyzed a large number of text-only real-world SLAs [2] and found various types of complex rules which need to be enforced by IT service providers such as graduate rules, dependent rules, normative rules, default rules, exception rules. In most cases these SLA rules are part of a hierarchical set of contracts, consisting of a basic agreement with general terms and conditions, a group-level service agreement, one or more SLAs and internal operation level agreements (OLAs) or underpinning contracts [2]. These types of interlinked, unitized rule sets with multiple conditions which are possibly scattered among business partners, organizations or departments demand for a more sophisticated knowledge representation (KR), which allows an IT service provider to analyze, interchange, manage and enforce large amounts of (decentralized) rules and adapt them during runtime. Moreover, traceability and verifiability of drawn conclusions (e.g. derived penalties) and triggered reactions during contract monitoring and enforcement is a requirement in order to fulfil legal regulations and compliance rules. In this article we propose a declarative rule-based approach to SLA representation and management. Whereas, existing approaches to standardize SLAs are based on imperative procedural or simple propositional logic (see section 6), we draw on logic programming (LP) and related knowledge representation concepts. LP allows for a compact knowledge representation of SLA rules and for automated rule chaining by resolution and variable unification, which alleviates the burden of having to implement extensive control flows as in imperative programming languages and allows for easy extensibility. However, further logical formalisms are needed for automated SLA management. We propose an expressive framework of adequate knowledge representation (KR) concepts, called ContractLog, which combines a labelled, typed and prioritized logic, reactive rules and complex event processing, temporal event logics (event calculus), defeasible logic, deontic logic, description logic and verification and validation techniques for the domain of SLA management. In particular, the integration of reactive and derivation rules with complex event/action processing, KR based event logics, deontic norms and procedural attachments enables an adequate representation of contractual rules as they can be found in SLAs nowadays. We describe an implementation of the ContractLog framework and show how the different types of KR concepts can be transformed into general LPs and LP based meta programs. ContractLog enables a clean separation of Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. concerns by specifying contractual logic in a formal, declarative machine-readable and executable fashion and enables calls to imperative object-oriented code (Java) or existing system monitoring tools. In this article, we describe adequate knowledge representation concepts for SLA Management and provide an experimental evaluation of the approach focusing on scalability and flexibility based on real-world use cases. Our research follows the design science research in IS approach as described in Hevner et al. [3] The article is organised as follows: We first provide an overview of SLAs in section 2, define relevant terms and introduce a use case based on real-world industrial SLAs. In section 3 we describe the ContractLog KR and the selected logical formalisms for the adequate representation of SLAs. In section 4 we introduce superimposed rule-based service level management tools (RBSLM) which serves as a proof-ofconcept implementation. Section 5 presents experimental evaluations and illustrates the rule-based formalization of SLA rules in the ContractLog KR based on the use case example defined in section 3. Section 6 discusses related work. Finally, section 7 concludes with a short summary of key findings. 2. Service Level Agreements An SLA is a document that describes the performance criteria a provider promises to meet while delivering a service. It typically sets out the remedial actions and penalties that will take effect if performance falls below the agreed service levels. It is an essential component of the legal contract between a service consumer and the provider. In the following, we will describe relevant terms, before we introduce a use case that we will use later for the evaluation. 2.1 Terminology SLA rules represent guarantees with respect to graduated high/low ranges of metrics (e.g., average availability range [low: 95% , high: 99%, median: 97%]) so that it can be seen whether the measured metrics exceed, meet or fall below the defined service levels during a certain time interval. They can be informally represented as rules which might be chained in order to form graduations, complex policies and conditional guarantees, e.g., “if the average service availability during one month is below 95% then the service provider is obliged to pay a penalty of 20% of the monthly service fee”. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. According to their intended purpose, their scope of application or their versatility SLAs can be grouped into different categories. In this paper, we will use the following terms described in Table 1. TABLE 1: SLA CATEGORIZATION Purpose of the Contract Basic Agreement Group-level Service Agreement Service Level Agreement Operation Level Agreement (OLA) Underpinning Contract (UC) Defines the general framework for the contractual relationship and is the basis for all subsequent SLAs. Subsumes all components which apply to several subordinated SLAs. Main contract between service provider and service customer. A contract with internal operational partners, needed to fulfil an SLA. A contract with an external operational partner, needed to fulfil an SLA. Service Level Agreements come in several varieties and comprise different technical, organizational or legal components. Table 2 lists some typical contents. TABLE 2: CATEGORIZATION OF SLA CONTENTS Technical Components - Service description - QoS metrics - Actions - … Organizational Components - Liability / liability limitations - Level of escalation - Maintenance periods - Monitoring and reporting - Change management - … Legal Components - Obligations to co-operate - Legal responsibilities - Proprietary rights - Modes of invoicing and payment - … Although the characteristics and clauses may differ considerably among different contracts, they all include more or less static parts such as the involved parties, the contract validity period, the service definitions but also dynamic parts which are more likely to change, such as the QoS definitions stated as SLA rules specifying service level guarantees and appropriated actions to be taken if a contract violation has been detected according to measured performance values via SLA metrics. The representation of the static part of an SLA is straightforward. From the point of view of a rule-based decision/contract logic they can be simply represented as facts managed e.g. in the knowledge base or a external database or Semantic Web ontology (A-Box). In this article we focus on the dynamic part of an SLA – the SLA rules. 2.2 SLA Use Case In order to better illustrate the requirements of SLA management we will briefly describe a use case derived from real-world SLA examples from and industry partner The SLA defines three monitoring schedules, “Prime”, “Standard” and “Maintenance”: Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. TABLE 3: MONITORING SCHEDULES Schedule Time Availability Response Time Prime 8 a.m. -18 p.m. 98%[99%]100% ; pinged every 10s 4 sec.; pinged every 10s Standard 18 p.m. -8 a.m. 95%[97%]99%; pinged every min. 10[14]16 sec.; pinged every min. Maintenance 0 a.m.- 4 a.m.* 20%[50%]80%;pinged every 10 min No monitoring During prime time the average availability has a low value of 98%, a median of 99% and a high value of 100% and a response time which must be below 4s. The service metrics are calculated via a ping every 10 seconds. During standard time the average availability is {high:99%;low:95%;median:97%} and response time {high:10sec.;low:16sec.;median:14sec.} monitored via a ping every minute. Maintenance is permitted to take place between midnight and 4a.m. During this period the average availability is {high:80%; low:20%; median:50%} monitored every 10 minutes. Response time will not be monitored in this case. Further the SLA defines a “bonus-malus” policy: TABLE 4: “BONUS MALUS” PRICE POLICY Price Prime Standard Maintenance Incident Penalty Base pprime pstandard pmaintenance - pincidentn Bonus pprime + (xhigh-xmedian) *pbonus % pstandard + (xhigh-xmedian) *pbonus % pmaintenance+ (xhigh-xmedian) *pbonus % Malus pprime - (xmedian-xlow) *pmalus % pstandard - (xmedian-xlow) *pmalus % pmaintenance - (xmedian-xlow) *pmalus % According to the monitoring schedules a differentiated base price is defined if the service levels are met. If the service levels are exceeded (median to high) a dependent bonus is added and if they fall below the agreed upon service levels (median to low) a discount is deducted. The bonus and malus are defined as a percentage value of the base price. If a service level is missed, i.e. the actual value falls below the low service level (<low) an additional penalty has to be paid which increases exponentially with the number of incidents during the accounting period. In case of outages/incidents the SLA defines two escalation levels: TABLE 5: ESCALATION LEVELS WITH ROLE MODELS AND ASSOCIATED RIGHTS AND OBLIGATIONS Level Role Time-to-Repair (TTR) Rights / Obligations 1 Process Manager 10 Min. Start / Stop Service 2 Quality Manager Max. Time-to-Repair (MTTR) Change Service Levels Each escalation level defines clear responsibilities in terms of associated roles which have certain rights and are obliged to do certain remedial actions in case of incidents which initiate the respective escalation level. In the SLAs’ escalation level 1 the process manager is obliged to restart an unavailable service within 10 minutes. Accordingly, she has the right (permission) to start and stop the service. If she fails to Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. do so, escalation level 2 is triggered and the quality manager is informed. The quality manager has more rights, e.g. the right (permission) to adapt/change the SLA management systems respectively the service levels. The quality manager might discuss the time needed to repair with the process manager and extend it up to a maximum time to repair level (change request). In case of very critical incidents the system might directly proceed to escalation level 2 and skip level 1. 3. ContractLog ContractLog [4] is an expressive and computationally feasible KR framework consisting of adequate KR concepts used to describe contracts and SLAs resp. It combines selected logical formalisms which are all implemented on the basis of logic programming (mainly a meta programming approach based on derivation rules). It provides a typed, labelled, unitized and prioritized logic with extended Java-based procedural attachments which enable reuse of external (procedural) functionalities, tools and data directly into declarative LPs execution. In the following, we describe the core syntax and semantics of ContractLog LPs in the context of logic programming. We then elaborate on advanced (non-monotonic) KR concepts, which are required to adequately formalize typical SLA rules. 3.1 Notation and Semantics of ContractLog In this article we use the standard LP notation and extended logic programs with default negation and explicit negation for the knowledge base. We assume that the reader is familiar with basic Horn theory and logic programming. For more information on the major theoretical results and implementations w.r.t. Prolog we refer the reader to e.g. [5] and [6]. Core Syntax of ContractLog A ContractLog LP is an extended LP (ELP). An ELP is a set of clauses (rules) of the from HÅ B, where H is a literal over L called the head of the derivation rule, and B is a set of literals over L called the body of the rule. A literal is either an atom or the negation “~” resp. “¬” of an atom, where “~” is denoted as default negation and “¬” as explicit negation. Roughly, default negation means, everything that can not be proven as true is assumed to be false. Its implementation is given in the usual way by a negation-as-finitefailure rule. A rule is called a fact if it only consists of the rule head H Å. An atom is a n-ary formula Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. containing terms p(a, X, f(...)), where p is the predicate name. A term is either a constant a, a (possibly free) variable X or a n-ary complex term/function f(...). A goal/query G? is a headless clause defining a conjunction of literals (positive or negative atoms) Å L1 ٨ .. ٨ Li where each Li is called a subgoal. The ContractLog KR uses an extended ISO Prolog related scripting syntax (ISO Prolog ISO/IEC 132111:1995) called Prova (http://www.prova.ws/ [7]) to write ContractLog LPs as scripts, where a variable starts with a upper-case letter, e.g. X,Y,Z, a constant/individual with a lower-case letter, e.g. a,b,c and a query is written as a function :-sovle(…) or :-eval(...), Å is denoted by “:-“ and ٨ by “;”. Default negation is written as not(…), e.g. not(p()), and explicit negation as neg(…), e.g. neg(p()). Configurable and Selectable Semantics of ContractLog The inference engine coming with ContractLog is a configurable engine with different selectable semantics and test suites to verify and validate correctness of execution of arbitrary (possibly distributed and interchanged) LPs. The ContractLog/Prova engine has been developed based on the Mandarax derivation rule engine [8] and the Prova inference and language extensions [7] and has been integrated into the Prova 2.0 distribution [8]. It supports different inference features and several semantics which can be selected and configured. The particular advantage of this approach is, that according to the respective logic class of a ContractLog LP which should be executed, e.g. definite LP without negation or generalized LPs with negation-as-failure (but without explicit negation), a less expressive and hence more efficient semantics in terms of performance for query answering might be chosen and properties such as memory consumption w.r.t. goal memoization or weakening vs. safeguarding of decidability w.r.t. safety conditions (e.g., Datalog) can be configured. For example, the basic 2-valued SLDNF resolution with the negation-as-finitefailure rule which is the weakest “semantics” supported by ContractLog does not support memoization and suffers from well-known problems such as endless loops or floundering. It is not complete for LPs with negation or infinite functions. Moreover, it can not answer free variables in negative subgoals since the negation as finite failure rules is only a simple test. For more information on SLDNF-resolution we refer to [9, 10]. For typical unsolvable problems related to SLDNF see e.g. [11]. In contrast, (extended) 3valued well-founded semantics (WFS) which is the strongest semantics supported by ContractLog is fully declarative, decidable and has polynomial worst-case complexity for several logic classes. The wellfounded semantics (WFS) of Van Gelder et. al. [12] is a 3-valued semantics with three possible truth valPaschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. ues: true (t), false (f) and unkown (u). We refer to [12-15] for a definition. The procedural semantics, called SLE resolution (Linear resolution with Selection function for Extended WFS), implemented in ContractLog to compute WFS extends linear SLDNF with goal memoization and loop prevention. The major difference to tabling-based approaches such as SLG-resolution [16, 17] is that it preserves the linearity property of the resolution algorithm with sequential tree-based formulations like in SLDNF and hence still enables efficient stack-based memory structures and expressive sequential operators. Representation of Contract Rules / Business Rules Before we elaborate on further (non-monotonic) logical formalisms and rule types which are needed for adequately formalising SLAs, we will briefly demonstrate the general applicability of derivation rules (as described above) for the representation of contract rules and in particular for the representation of SLA rules and higher-level policy rules. SLA rules typically have the form “if … then …(else)”. Such informal rules can be formalized as a set of prerequisites (conditions) which form the body of a derivation rule and a conclusion (consequent) which forms the head of the rule. The rules are relatively easy to write since the user only needs to express what (decision logic) they want. The responsibility to interpret this and to decide on how to do it is delegated to an interpreter (an inference engine). Table 6 gives an example of the translation of an informal business rule set, which might occur in a SLA, to a formal representation using the Prolog related syntax introduced previously. TABLE 6: EXAMPLE OF A BUSINESS RULE SET (r1) “If customer has spend more than 1000$ in the last year then customer is a bronze customer. (r2) “If the customer is a bronze customer he will get a discount of 5%.” (r1) discount(Customer, 5%) :- bronze(Customer). (r2) bronze(Customer) :- spending(Customer, Value, last year) , Value >1000. Fact: spending(Peter Miller, 1200, last year). Negation can be formalized with either default or explicit negation, depending on the intention. For example, rules with epistemic character such as “if X is not believed to be a valuable customer, then X is assigned standard level” might be formalized with default negation as follows: standard(Customer) :not(spending(Customer, >1000$, last year), i.e. the rule expresses a default rule which holds in case there is no information about the spending or the spending of the customer is below 1000$ in the last year. The else part of an informal rule can be represented in ContractLog either using the sequential operator cut “!”, e.g. “h(X) :- b(X), !. h(X):-c(X).” or using negation-as-failure, e.g. “h(X) :- b(X). h(X):-not(b(X)), c(X).”. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. The former approach in many cases results in efficient computations, but imposes a procedural character with partially ordered rules on the LP. The later approach is more declarative, but might need redundant goal computations if the used semantics does not support goal memoization. In general, derivation rules can be executed using forward reasoning or using goal-driven backward-reasoning. There exist efficient forward-reasoning production rule engines (ConditionÆAction rules) such as Jess or Drools which are based on the Rete algorithm. However, these systems typically have a rather restricted expressiveness and only an operational semantics, but no clear logical semantics which is crucial in the context of verifiable, traceable and highly reliable derived results which should count even in the legal sense of an SLA. Moreover, due to the used algorithms in forward chaining systems lots of rules would be eligible to fire in any cycle and a lot of irrelevant conclusions are drawn. In backward-reasoning the knowledge base can be temporarily populated with the needed extensional facts (e.g., from external systems such as relational databases) to answer a particular goal at query time and the extensional fact base can be discarded from the memory afterwards. Overall, backward-reasoning and in particular logic programming provides a number of advantages the SLA domain. In the following we will introduce several logical extensions to the core concept of extended ContractLog LPs and derivation rules, which are needed to adequately formalize SLA rules. 3.2. Typed Logic and Procedural Attachments Standard LP reasoning algorithms are derived from predicate calculus with pure formal syntactical reasoning and common rule systems and LP languages such as Prolog derivates use flat un-typed logical objects (terms) in their rule descriptions. However, SLA rules are typically defined over external business objects and business/contract vocabularies, which map to internal logical object representations in order to give SLA rules a domain-specific meaning. Moreover, service level management tools do not operate on a static internal fact base, but access a great variety of external systems such as system and network management tools. From a software engineering (SE) point of view the lack of types can been seen as a serious restriction for implementing larger rule based systems and SLA decision logics which are engineered and maintained by different people, because typical SE principles such as data abstraction and modularization are not directly supported. Therefore, rule based SLA engineering can benefit from a type concept Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. which enables static and dynamic type checking, in order to capture the developer’s intended meaning of a logic program, increase the expressiveness and the readability of the formalized SLAs, detect type errors and increase robustness and reduce the search space of goals and accordingly optimize the efficiency. Types in ContractLog are defined by a type relation “t:r”, denoting that term t has a type r . ContractLog, supports two different external type systems: Object-oriented Java class hierarchies [8] and Description Logic Semantic Web ontologies [18]. The typed unification in ContractLog follows a hybrid approach and uses an external reasoner for dynamic type checking and type conversion during unification of typed or untyped terms; hence leading to a hybrid, typed logic language[18]. Before we further elaborate on the typed unification we first briefly describe both typing approaches: Java Types The object-oriented type system of Java is essentially a static type system in the sense that is does not allow parametric polymorphic type parameterization (except for generics available since Java 1.5). It supports inheritance (subclassing) and ad-hoc polymorphism with overloading and coercion (casting) as a kind of automatic type conversion between classes. In the ContractLog language the fully qualified name of the class to which a typed term/variable should belong must be used. During unification of terms ContractLog then uses the declared types, assuming the root Java type “Object” if no information is given (= untyped variable) and tries to unify the terms using the Java instanceof operator to compute subclass relations, i.e. it uses Java to do dynamic type checking. For example, a typed variable java.lang.Integer.X unifies with a variable java.lang.Number.Y since the class Number is a super class of Integer. Semantic Web DL Types Semantic Web ontology languages such as RDFS (http://www.w3.org/TR/rdf-schema/), OWL Lite or OWL DL (http://www.w3.org/2004/OWL) are syntactic XML resp. RDF mark-up counterparts of expressive, decidable description logics (DL) such as SHIQ(D) or SHOIN(D). Description Logics are a family of KR languages that is optimized for representing the knowledge of a domain, modelling rich hierarchies of conceptual objects and instances and reasoning with these models. [19] Powerful reasoning tools such as Racer (www.sts.tu-harburg.de/~r.f.moeller/racer/), Pellet (www. mindswap.org/ 2003/ pellet/), Jena (jena. sourceforge.net/) have been developed to inference and query the DL ontologies resp. their Semantic Web counterparts. In ContractLog external RDFS or OWL ontologies describing types Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. (concept classes) and constant objects (individuals) can be imported to the knowledge base. Different external DL reasoners for e.g. RDFS, OWL Lite, OWL DL reasoning can be configured by the function reasoner(<DL reasoner>) and the defined types can be used for term typing, e.g. X:vin_Wine denotes that the variable X is of type Wine with vin being its namespace. During unification type checking is outsourced to an external reasoner (the Jena API in combination with the DL reasoner Pellet) which performs the necessary subsumption reasoning and instance inferences. The major advantage of this hybrid DLtyped approach is that existing optimized DL systems with efficient algorithms can be used for type computations. Operational Semantics: Typed Unification The operational semantics of the typed logic in ContractLog is given by a polymorphic typed unification which extends the standard untyped unification with dynamic type checking. The typed unification supports ad-hoc polymorphism where variables dynamically change their types during unification. Informally, the unification rules are defined as follows (for a formal definitions see [18]): Untyped Unification: Ordinary untyped unification without type Untyped-Typed Unification: The untyped query variable assumes the type of the typed target Variable-Variable Unification: • If the query variable is of the same type as the target variable or belongs to a subtype of the target variable, the query variable retains its type, i.e. the target variable is replaced by the query variable. • If the query variable belongs to a super-type of the target variable, the query variable assumes the type of the target variable, i.e. the query variable is replaced by the target variable. • If the query and the target variable are not assignable the unification fails Variable-Constant Term Unification: • If a variable is unified with a constant of its super-type, the unification fails • If the type of the constant is the same or a sub-type of the variable, it succeeds and the variable becomes instantiated. Constant-Constant Term Unification: Both constants are equal and the type of the query constant is equal to the type of the target constant. Complex terms such as lists are untyped by default and hence are only allowed to be unified with other untyped variables resp. variables of the highest type, i.e. "Resource" for DL types resp. “Object” for Java types. For a formal definition and a more detailed description of the typed logic in ContractLog see [18]. Java-based Procedural Attachments Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. Another extension to logic programming is procedural attachments which are used to dynamically call external Java-based procedural functions/methods during resolution (see [7, 8]). They enable the reuse of procedural code and facilitate the dynamic integration of facts from external data sources such as relational databases via calling their APIs using query languages such as SQL via JDBC. Java object instantiations of particular types (classes) can be bound to variables having appropriate types. During resolution the methods and attributes of the bound Java object can be used as procedural attachments within rule bodies. Static and instance methods (including calls to constructors of Java classes / objects) can be dynamically invoked (via Java reflection) taking arguments and returning a result which can possibly alter the state of the knowledge base (KB). A method that does not take arguments and does not change the KB is called an attribute. Basically, three types of procedural attachments can be used: Boolean valued attachments which can be used on the level of atoms in the rule body and object valued attachments which are treated as functions that take arguments and are executed in the context of a particular object or class in case of static method calls. Example 1 add(java.lang.Integer.In1, java.lang.Integer.In2,Result):- … Result = In1 + In2 add(In1, In2, Result):- I1 = java.lang.Integer(In1), I2 = java.lang.Integer(In2), X = I1+I2, Result = X.toString(). 3.3. Reactive Rules: Event-Condition-Action Rules (ECA rules) In SLA execution event-driven reactive functionalities are an obvious necessity. Typical SLA rules describe reactive decision logics following the Event-Condition-Action paradigm, e.g. “if service is unavailable (event) and it is not maintenance time (condition) then send notification (action)”. In ContractLog we have implemented a tight integration of ECA rules into logic programming in order to represent ECA rules in a homogenous knowledge base in combination with derivation rules and facts and use the backward-reasoning rule engine as execution environment for reactive rules. Syntax of ECA rules in ContractLog The Event-Condition-Action logic programming language (ECA-LP) [20, 21] represents an extended ECA rule as a 6-ary function eca(T,E,C,A,P,EL), where T (time), E (event), C (condition), A (action), P (post condition), EL(se) are complex terms which are interpreted as queries/goals on derivation rules. The Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. derivation rules are used to implement the respective functionality of each of the ECA rules’ parts. A complex term is a logical function of the form c(C1,..,Cn) with a bound number of arguments (terms) which might be constant, variable or again complex. Boolean-valued procedural attachments, as defined in section 3.2, are supported in ECA rules and can be directly used instead of a complex term. While the E,C, A parts of an ECA rule comply with the typical definitions of standard ECA rules (omitted here), the T, P and EL part are special extensions to ECA rules: • The time part (T) of an ECA rule defines a pre-condition (an explicitly stated temporal event) which specifies a specific point in time at which the ECA rule should be processed by the ECA processor, either absolutely (e.g., “at 1 o’clock on the 1st of May 2006), relatively (e.g., 1 minute after event X was detected) or periodically (“e.g., “every 10 seconds”). • The post-condition (P) is evaluated after the action. It might be used to prevent backtracking from different variable bindings carrying the context information from the event or condition part via setting a cut. Or, it might be used to apply verification and validation tests using integrity constraints or test cases which must hold after the action execution, which e.g. makes an update/change of the intensional rules in the KB. If the update violates the integrity test of the post condition it is automatically rolled back. • The else part (EL) defines an alternative action which is execute alternatively in case the ECA rule can not be applied, e.g. to specify a default action or trigger some failure handling (re-)action. ECA parts might be left out (i.e. always true) stated with “_”, e.g., eca(time(), event(…), _, action(…),_,_) or completely omitted, e.g. eca(e(…),c(…),a(…)). This leads to specific types of reactive rules, e.g. production rules (CA: eca(condition() ,action()) ) or extended ECA rules with post condition (ECAP: eca(event(),condition(),action(), postcondition()) ). During interpretation the smaller rule variants are extended to the full ECA rule syntax, where the omitted parts are stated as true “_”. Operational Semantics of ECA rules in ContractLog In order to integrate the (re)active behavior of ECA rules into goal-driven backward-reasoning the goals defined by the complex terms in the ECA rules need to be actively used to query the knowledgebase and evaluate the derivation rules which implemented the functionality of the ECA rules’ parts. Hence, an ECA rule is interpreted as a conjunction of goals (the complex terms) which must be processed in a left-to-right sequence starting with the goal denoting the time part, in order to capture the forward-directed operational semantics of ECA rules: ECA? = T ٨ E ٨ ((C ٨ A ٨ P) ٧ EL), where ECA? is the top goal and T,E,C,A,P, EL Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. are the subgoals. An ECA rule succeeds, if all subgoals succeed. Note, that the “else action” EL is an alternative to the normal action, which is a disjunction (C ٨ A ٨ P) ٧ EL. The task of interpreting ECA rules and executing the defined goals is solved by an active ECA processor with a daemon process which is build on top of the rule engine. The ECA processor implements a general wrapper interface in order to be applicable to arbitrary backward-reasoning rule engines. The daemon frequently queries the KB for new or updated ECA rules via the query eca(T,E,C,A,P,EL)? and adds the found ECA rules to its active KB, which is a kind of volatile storage for reactive rules. It then evaluates the ECA rules one after another via using the complex terms defined in the ECA rule as queries on the KB. The forward-directed operational semantics of ECA rules is given by the strictly positional order of the terms in the ECA rules, i.e. first the time part is queried/evaluated by the ECA processor (daemon), when it succeeds then the event part is evaluated, then the condition and so on. Figure 1 illustrates this process. Figure 1: Forward-directed operational execution model of ECA rules In order to enable parallel processing of ECA rules the ECA processor implements a thread pool where each ECA rule is executed in a thread, if its time part succeeds. Variables and negation in ECA rules are supported as described in section 3.1. For example, the ECA processor enables variable binding to ground knowledge derived by the queried derivation rules and facts in the KB, knowledge transfer from one ECA part to another via variable unification and backtracking to different variable bindings. This is in particular useful to interchange context information, e.g. between the event and the action or the condition and the action and build reactive behaviour on top of expressive knowledge bases and sophisticated derivation rule sets. Declarative Semantics of ECA Rules in ContractLog Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. The declarative semantics of ECA rules in ContractLog LPs is directly derived from the semantics of the underlying rule/inference system. ECA rules are defined globally and unordered in the KB; homogeneously in combination with other rule types. Model-theoretically the semantics is a subset of the 3valued (Herbrand) models of the underlying rule language: SEM (ContractLog ) ⊆ MOD3Herb −val (ContractLog ) with a skeptical entailment relation ╞ , where SEM skept (ContractLog ) := I{M |= L : literal is the set of M ∈SEM (ContractLog ) all atoms that are true in all models of SEM (ContractLog ) w.r.t. to updates of the KB (see later). Note that this general definition also covers 2-valued semantics such as Clark’s completion semantics, as a declarative counterpart of the procedural “Finite-Failure SLDNF”, because from a classical viewpoint the 2-valued models are special 3-valued ones, i.e. any semantics based on a two-valued theory Σ can be considered as a three-valued interpretation I=(T;F) with T={A: a ground atom with Σ ╞ A} and F={A: a ground atom with Σ ╞ neg A}. Since in ContractLog the default semantics of choice is the wellfounded semantics (WFS) resp. extended WFS (for extended LPs with default and explicit negation) by definition SEM(ContractLog) only contains a single model for the actual knowledge state of the KB: SEM WFS (ContractLo g ) = {M } . Unlike other 3-valued semantics such as Fitting’s semantics which are based on Kleene’s strong 3-valued logic, WFS [12] is an extension of the perfect model semantics2. It is worth noting that WFS can be considered as an approximation of stable models for a program P in the sense that it coincides for a broad class of weakly stratified LPs with STABLE and classifies the same atoms as true or false as STABLE. Hence, roughly speaking, an ECA rule eca in an ContractLog LP P (or more precisely in the actual knowledge state Pi) is satisfied in a finite interpretation IWFS , iff there exists at least one model for the sentence formed by the ECA top goal: Pi ╞ eca and consequently Pi ├ eca Ù Pi ╞ eca. While this definition of soundness and completeness for ContractLog LPs is sufficient in one particular knowledge state, ECA rules typically deal with knowledge updates (see also section 3.6) which can not only be used to change the extensional knowledge (facts) but also the intensional derivation and behavioural ECA rules, hence leading to a new knowledge state. Such update actions can then be used as input events in further ECA rules leading to update sequences defined in terms of active rules. Obvi2 hence, e.g. assigns false to a tautology such as p Å p Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. ously, updates of the intensional KB (a.k.a. dynamic LPs) might lead to confluence and logical conflicts (e.g. conflicting positive vs. negative conclusions), which are not resolved by the standard semantics of normal reps. extended LPs. Hence, this amounts for expressive update primitives with a declarative semantics for dynamically changed LPs, so called dynamic update logic programs. We first define semantics for expressive ID-based updates and unitized KB structures, where clauses are labelled by an ID (identifier or rule name) and bundled to clause sets (modules) having a module ID. A detailed description of the labelled logic in ContractLog will follow in section 3.6. The core procedural functionalities for clause sets with labels (properties) have been outlined by the original Mandarax system3 and further extended by Prova [7] which supports dynamic imports of external LP scripts via their URL, with the URL being the module ID of the fresh module (clause set) in the KB. In the ContractLog KR we have further extended this approach with dynamic, transactional ID-based meta functions to add and remove arbitrary knowledge as modules to the KB using the module ID for partial/scoped reasoning on the clause sets, remove modules from the KB via their ID, rollback transactional updates or prioritize conflicting rules an modules (e.g., overrides(module id1,module id2)) (see. Section 3.6). Formally, we define a positive (add) resp. negative (remove) ID-based update to a program P as a finite set pos / neg U oid := {rule N : H ← B, fact M : A ←} , where N=0,..,n, M=0,..,m and oid denotes the label of the update, i.e. pos pos resp. U oid to P leads to the unique object id with which it is managed in the unitized KB. Applying U oid pos neg resp. reduced state P − = P \ U oid . Applying arbitrary sethe extended knowledge state P + = P ∪ U oid quences of positive and negative updates leads to a sequence of program states P0 ,.., Pk where each state pos neg or Pi = Pi −1 \ U oid . In other words, a program Pi, i.e. the set of all clauses in the Pi is either Pi = Pi −1 ∪ U oid i i KB at a particular knowledge state i, is decomposable in the previous knowledge state plus/minus an update, whereas the previous state consists of the state i-2 plus/minus an update and so on. Hence, each particular knowledge state can be decomposed in the initial state P0 and a sequence of updates. We define P0 = Ø ∪ U 0pos and U1pos = {P : the set of rules and facts defined in the initial LP P}, i.e. loading the initial LP from an external ContractLog/Prova script denotes the first update. 3 http://sourceforge.net/projects/mandarax Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. Based on the semantics of updates we define the semantics of ECA rules in ContractLog with (self)update actions which have an effect on the knowledge state as a sequence of transitions < P, E,U >→< P' ,U ,U ' >→< P' ' ,U ' ,U ' ' >→.. →< P n+1 ,U n , A > , where E is an initiating event which triggers the update action U of an ECA rule (in case the ECA condition is satisfied) and transits the initial knowledge state P into P’. The update action U might be a further sub-event in another ECA rule(s) (active rule) which triggers another update, leading to a sequence of transitions which ends with a terminating action A. A might be e.g. an update action which is not an input event for further updates or an action without an internal effect on the knowledge state, e.g. an external notification action. To overcome arising conflicts, preserve integrity of the KB in each state and ensure a unique declarative outcome of update sequences (active rules) or complex updates (see complex events/actions in next section) we extend the semantics of updates to transactional updates which are safeguarded by integrity constraints (ICs) or test cases (TCs) (see section 3.6 and [22]). ICs and TCs are used to verify and validate the actual or any hypothetically future knowledge state. [22, 23] A transactional update is an update, possibly consisting of several atomic updates, i.e. a sequence of transitions, which must be executed completely or not at all. In case a transactional update fails, i.e. it is only partially executed or violates integrity, it will be rolled back otherwise it will be committed. We define a transactional update pos / neg pos / neg trans as U oid = U oid ,..,U oid & C1 ,..C m , where Ci is the set of Ics (or TCs) which are used to test integrity 1 n and verify and validate the intended models of the updated clauses/modules. In short, ICs are defined as constraints on the set of possible models and describe the model(s) which should be considered as strictly conflicting. Model-theoretically the truth of an IC in a finite interpretation I is determined by running the constraint definition as a goal GIC (proof-theoretically, by meta interpretation, as a test query) on the clauses in P or more precisely on the actual state Pi. If the GIC is satisfied, i.e. there exists at least one model for GIC: Pi ╞ GIC, the IC is violated and Pi is proven to be in an inconsistent state: IC is violated resp. Pi violates integrity iff for any interpretation I: I ╞ Pi Î I ╞ GIC. For more information on the different types of ICs and the meta implementations in the ContractLog KR see section 3.6 and trans [4, 22, 24]. The ICs are used to test the hypothetically updated program state Pihypo +1 = Pi ∪ U oid trans Pihypo +1 = Pi \ U oid neg pos resp. and rollback the (possibly partial executed) transactional update to the state Pi +1 = Pi Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. or commit the update Pi +1 = Pihypo +1 in case the update preserves integrity w.r.t. to the defined ICs. Hence, if there exists a satisfied IC in the hypothetical/pending state Pihypo +1 the transactional update is rolled back: trans Pi +1 = Pi ∪ U oid trans Pi +1 = Pi \ U oid trans ⇒ Pihypo +1 \ U oid pos iff exists Pi+1╞ICj,j=1,..,n trans ⇒ Pihypo +1 ∪ U oid neg iff exists Pi+1╞ICj,j=1,..,n pos neg A commit is defined as Pihypo +1 ⇒ Pi +1 . Note, that the procedural semantics for transactional updates is based on the labelled logic implemented in ContractLog/Prova (see section 3.6 and [7, 8, 22]), where rules and rule sets (modules) are managed in the KB as labelled clause sets having an unique oid (object identifier). Updates are new modules (or changes in existing modules) which are added to the KB, e.g. by importing new rule sets from external scripts. The modules are managed and removed from the KB by their IDs. Additional local ICs resp. TCs can be explicitly specified in the ECA post condition part and the ContractLog KR provides special functions to hypothetically tests the update literals (rule heads) against the constraints. Representation of Reactive Rules To illustrate the usage and formalization of ECA rules in ContractLog consider an ECA rule which states that: “every 10 seconds it is checked (time) whether there is a service request by a customer (event). If there is a service request a list of all currently unloaded servers is created (condition) and the service is loaded to the first server (action). In case this action fails, the system will backtrack and try to load the service to the next server in the list. Otherwise it succeeds and further backtracking is prevented (postcondition cut) .” This is formalized as an ECA-LP as follows: eca( every10Sec(), detect(request(Customer, Service),T), find(Server, Service), load(Server, Service), ! ). % time derivation rule every10Sec() :- sysTime(T), interval( timespan(0,0,0,10),T). % event derivation rule detect(request(Customer, Service),T):- occurs(request(Customer,Service),T), consume(request(Customer,Service)). % condition derivation rule find(Server,Service) :- sysTime(T), holdsAt(status(Service, unloaded),T). % action derivation rule load(Server, Service) :- sysTime(T), Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. rbsla.utils.WebService.load(Server,Service), % procedural attachment update(key(Server), “happens(loading(_0),_1).”, [Server, T]). % update KB with “loading” event The state of each server might be managed via a KR event logics formalism such as the Event Calculus: terminates(loading(Server),status(Server,unloaded),T). initiates(unloading(Server),status(Server,unloaded),T). 3.4. Event/Action Logics: Event Calculus and interval-based Event/Action Algebra Pure ECA rule processing, as described in the last section, is concerned with detecting real-time event occurrences (volatile situations) and triggering immediate reactions. But, in SLA representation there is also a need for an event/action algebra and an temporal event/action logic which is used to define complex events / actions and reason over the effects of events/actions on the knowledge state. Typical examples found in SLAs are e.g, “After four outages then …”, “If the service is unavailable it must be repaired within 10 minutes. If it is still unavailable afterwards then…” or “If average availability is below 99% and maximum responstime is more than 4 seconds then …”. Event Calculus Kowalski and Sergot´s Event Calculus (EC) [25] is a formalism for temporal reasoning about events/actions and their effects on LP system as a computation of earlier events (long-term “historical” perspective). It defines a model of change in which events happen at time-points and initiate and/or terminate time-intervals over which some properties (time-varying fluents) of the world hold. The basic idea is to state that fluents are true at particular time-points if they have been initiated by an event at some earlier time-point and not terminated by another event in the meantime. The EC embodies a notion of default persistence according to which fluents are assumed to persist until an event occurs which terminates them. In ContractLog we have implemented an optimized meta program formalization of the classical EC and extended it with a novel interval-based EC variant [20] and several other expressive features e.g. for planning, delayed effects, counters or deadlines [26, 27]. The core EC axioms describe when events/actions occur (transient view) / happen (non-transient view) / are planned (planning view) and which properties (fluents) are initiated and/or terminated by these events/actions: occurs(E,T) event/action E occurs at time interval T:=[T1,T2] happens(E,T) event/action E happens at time T planned(E,T) event/action E is planned at time T initiates(E,F,T) event/action E initiates fluent F for all time>T Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. terminates(E,F,T) event/action E terminates fluent F for all time>T holdsAt(F,T) fluent F holds at time point T holdsInterval([E1,E2],[T1,T2]) event/action with initiator E1 and terminator E2 holds between time T1 and T2 holdsInterval([E1,E2],[T1,T2],[<Terminators>]) with list of terminator events which terminate the event interval [E1,E2] Example 2 e1 e2 initiates(e1,f,T). terminates(e2,f,T). happens(e1,t1).happens(e2,t5). holdsAt(f,t3)? Î true holdsAt(f,t7)? Î false t1 t3 ? t5 t7 ? The example states that an event e1 initiates a fluent f while an event e2 terminates it. An event e1 happens at timepoint t1 and e2 happens at timepoint t5. Accordingly a query on the fluent f at timepoint t3 will succeed while it fails at timepoint t7. Note, that in ContractLog there is no restriction on the terms used within the EC axioms, i.e. a term can be a constant/(Java) object, a variable or even a complex term which is unified with other rules and it can be assigned a certain type dynamically at runtime (see section 3.2). Complex Event / Action Algebra based on the interval-based Event Calculus Based on the interval-based EC formalization we have implemented a logic-based event/action algebra [20] which provides typical operators for defining and computing complex events and actions, e.g. sequence, conjunction, disjunction, negation. As we have pointed out in [20] typical event algebras in the active database domain, such as Snoop [28], which considered events to be instantaneous, have unintended semantics and anomalies for several of their operators and the interval-based treatment of complex events/actions in ContractLog helps to overcome these inconsistencies and irregularities. Moreover, the formal logical basis of the used KR event logics (event calculus) in ContractLog facilitates reliable and traceable results. Using the holdsInterval axiom typical event algebra operators can be formalized in terms of the interval-based EC. For example the sequence operator “;”, which defines that the specified events/actions have to occur in the specified order, can be formalized as follows: Sequence operator (;), e.g. (a;b;c) ≡ detect(e,[T1,T3]) :- holdsInterval([a,b],[T1,T2],[a,b,c]), holdsInterval([b,c],[T2,T3],[a,b,c]), [T1,T2]<=[T2,T3]. The example defines the detection conditions (detection rules) of a complex event e which is defined by the two sub-event intervals [a,b] and [b,c], where the first interval must occur before the second [T1,T2]<=[T2,T3]. For both sub-event intervals a list of terminator events [a,b,c] is provided which ter- Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. minate the event intervals, in order to ensure the correct sequence of events. In order to make definitions of complex events more comfortable and remove the burden of defining all interval conditions for a particular complex event type as described above, we have implemented a meta program which implements an interval-based EC event algebra with the following axioms: Sequence: Disjunction: Mutual exclusive: Conjunction: Simultaneous: Negation: Quantification: Aperiodic: sequence(E1,E2, .., En) or(E1,E2, .. , En) xor(E1,E2,..,En) and(E1,E2,..,En) concurrent(E1,E2,..,En) neg([ET1,..,ETn],[E1,E2]) any(n,E) aperiodic(E,[E1,E2]) Note that, the EC makes no distinction between events and actions. Hence, the described event operators also apply for complex action definitions, e.g. a sequence of actions (e.g. sequence of knowledge updates) which must be processed in the defined order. Integration of Event Calculus and Complex Event/Action Algebra into ECA Rules The Event Calculus and the EC based event algebra can be easily integrated into ECA rules via querying the EC axioms or the complex event or action definitions. For example a SLA rule might define that (the state) escalation level 1 is triggered (action) in case a service “s” is detected to be unavailable via a minutely (time) ping on the service (event), except we are currently in a maintenance state (condition). This can be formalized as an ECA rule: eca(everyMinute(), detect(unavailable(s),T), not(holdsAt( maintenance(s),T)), update(“”,happens( unavailable(s),T)))., i.e., in the condition part it is evaluated whether the state maintenance for the service s holds at the time of detection of the unavailable event or not. In case it does not hold, i.e. the condition succeeds, the detected transient event unavailable is added to the KB as a non-transient event in terms of a EC “happens” fact, in order to initiate the escalation level 1: initiates(unavailable(s), escl(1),T). Additionally, we might define that the unavailable event can not be detected again as long as the state escl(1) has not been terminated and accordingly the ECA rule will not fire again in this state: detect(e,T) :- not(holdsAt(escl(1),T)), … . . This exactly captures the intended behaviour for this reactive rule. The detection conditions detect(e,T) for an unavailable service might be extended by a complex event, which is detected e.g. if three consecutive pings on the service fail. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. In short, the EC can be effectively used to model the effects of events on the knowledge states and describe sophisticated state transitions akin to state machines. In contrast to the original use of ECA rules in active database management systems to trigger timely response when situations of interest occur which are detected by volatile vanishing events, the integration of event logics KR formalisms adds temporal reasoning on the effects of non-transient, happened (or planned) events on the knowledge system, i.e. enable traceable “state tracking”. They allow building complex decision logics upon, based on a logical semantics as opposed to the database implementations which only have an operational semantics. As a result, the derived conclusions and triggered actions become verifiable and traceable, which is a crucial necessity in SLA monitoring. 3.5. Deontic Logic with Norm Violations and Exceptions One of the main objectives of a SLA is to define and reason with the normative relationships relating to permissions, obligations and prohibitions between contract partners, i.e. to define the rights and obligations each role has in particular state of the contract. Deontic Logic (DL) studies the logic of normative concepts such as obligation (O), permission (P) and prohibition (F). Adding deontic logic is therefore a useful concept for SLM tools, in particular with respect to traceability and verifiability of derived contract norms (rights and obligations). Unfortunately, standard deontic logic (SDL) offers only very a static picture of the relationships between co-existing norms and does not take into account the effects of events on the given norms, temporal notions and dependencies between norms, e.g. violations of norms or exceptions. Another limitation is the inability to express personalized norms, i.e. explicitly define the subject and object a norm pertains to. Therefore, we extended the general concepts of SDL and integrated it into the event calculus implementation in order to model the effects of events/actions on personalized deontic norms. A deontic norm in ContractLog consists of the normative concept (norm), the subject (S) to which the norm pertains, the object (O) on which the action is performed and the action (A) itself. We represent a deontic norm as an EC fluent of the form: norm(S, O, A). Example 3 initiates(unavailable(Server), escl(1),T). terminates(available(Server), escl(1),T). initiates(maintaining(Server),status(Server,maintenance),T). terminates(maintaining(Server),escl(1),T). Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. derived(oblige(processManager, Service, restart(Service))). holdsAt(oblige(processManager, Service, restart(Service)),T):- holdsAt(escl(1),T). In the example escalation level 1 is initiated resp. terminated, when a service becomes unavailable resp. available, e.g. happens(unavailable(s1), t1) The deontic obligation for the process manager to restart the service is defined as a derived fluent, i.e. it holds whenever the state escl(1) holds. If the process manager is permitted to start maintenance (e.g. between 0 a.m. and 4 a.m. - not shown here) the second and third rule state that the event maintaining(Server) will initiate maintenance and terminate the escalation level 1. The integration of deontic logic concepts into the EC enables the definition of sophisticated dependencies between events and contract norms relating to state machines. A norm can be initiated resp. terminated by an event and the EC allows inferring all actual contract state, i.e. the rights and obligations (deontic norms stated as fluents) which hold at a specific point in time according to the happened events (contract norm / state tracking). We have implemented typical SDL inference axioms in ContractLog such as OA Æ PA or FA Æ WA etc., i.e. an action “A” is permitted (P) if it is also obliged (O), it is waived (W) if it is forbidden. Moreover, the EC formalization of deontic logic avoids or overcomes typical deontic conflicts and paradoxes, i.e. sets of sentences that derive sentences with a counterintuitive reading, e.g.: • PA ٨ FA Æ FA, i.e. if an action A is permitted and forbidden, then only the prohibition holds. • Exceptions, e.g. OA and E Æ O¬A, i.e. A is obliged but in an exceptional situation not A is obliged • Violations of deontic norms, e.g. OA and ¬A, i.e. A is obliged but not A happens which is a violation • Contrary-to-duty (CTD) obligations which hold in case of violations V of primary obligations V Æ OA2 For example a process manager is obliged to restart an unavailable service within time t (primary obligation). However, she fails to do so and violates the primary obligation (violation). In that case a secondary obligation (CTD) must hold, e.g. she is obliged to report this to the SLA quality manager to comply with certain compliance rules. Due to temporal framework of the EC such conflicting situation where a violated obligation and a CTD obligation of the violated obligation are true at the same time can be efficiently avoided by terminating the violated obligation so that only the consequences of the violation (CTD obligation) are in effect. [29, 30] Another way to solve such problems is to use defeasible conflict handling [4, 30] . Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. 3.6. Integrity Constraints, ID-based Updates and Defeasible Reasoning Rules in SLAs might overlap and contradict each other, in particular if contracts grow larger and more complex and are authored, maintained and updated by different people. Example 4 (r1) discount(Customer, 10) :- spending(Customer, Value, last year), Value > 1000. (r2) discount(Customer, 5) :- spending(Customer, Value, last year), Value > 500. In the example a customer might apply for a discount of “10%” as well as a discount of “5%”. From an applications point of view only the higher discount should be drawn. Nute’s defeasible logic (DefL) [31] is a non-monotonic reasoning approach which allows defeasible reasoning, where the conclusion of a rule might be overturned by the effect of another rule with higher priority, i.e. it seeks to resolve conflicts by “defeating” and explicitly expressed superiority relations between rules. Defeasible logic differs between strict rules and defeasible rules (we omit defeaters here): • Strict rules: Normal monotonic rules (derivation rules) with rule label: r: head Å body • Defeasible rules are rules that can be defeated by contrary rules: r: head <= body • Priority relations are used to define priorities among rules to represent that one rule may override the conclusion of another (defeasible) rule: r1 > r2 Different variants have been proposed, reaching from simple defeasible implementations which deal with conflicts between positive and negative conclusions [32] to Generalized Courteous Logic Programs (GCLP) [33] which use an additional “Mutex” (mutual exclusive) to define and handle arbitrary mutual exclusive literals. Several meta programming approaches have been proposed [34] to execute a defeasible theory in a logic program. In ContractLog we have generalized the basic concept of defeasible reasoning and combined it with the concept of integrity constraints and labelled modules (rules sets with IDs) using a meta program approach. An integrity constraint expresses a condition which must always hold. In ContractLog we support four basic types of integrity constraints: [4, 22] 1. Not-constraints: express that none of the stated conclusions should be drawn: integrity( not( p1(…), .. , pn(…))). 2. Xor-constraints: express that the stated conclusions are mutual exclusive, i.e. should not be drawn at the same time: integrity(xor(p1(…),..,pn(…))). 3. Or-constraints: express that at least one of the stated conclusions should be drawn: integrity(or(p1(…),..,pn(…))). 4. And-constraints: express that all of the stated conclusion should be drawn: integrity (and(p1(…), .. , pn(…))). Integrity constraints might be conditional, i.e. stated as integrity rules of the form: integrity(…):b1(…)..bm(…). where the integrity constraint is valid, if all prerequisites defined in the rules body hold. We Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. have implemented a meta programming approach in ContractLog [4, 22] which is used to test the integrity constraints specified within an ContractLog LP. The core axioms are: 1. testIntegrity() enumerates all integrity constraints and tests them based on the actual facts and rules in the knowledge base 2. testIntegrity(Literal) tests the integrity of the LP extended with the literal, i.e. it makes a test of the hypothetically added/removed literal, which might be a fact or the head of a rule. Example 5 integrity(xor(discount(C,5), discount(C,10)). testIntegrity(discount(“Adrian”,X))? %query test integrity The example defines an integrity constraint, which states that a discount of 5% and a discount of 10% for the customer are mutually exclusive, i.e. are not allowed to occur at the same time. Integrity constraints might be used for example to hypothetically test knowledge updates before they are applied/committed. In ContractLog we have implemented support for expressive (transactional) ID based updates [20, 22] which facilitate bundling of rule sets to modules including imports of external rule modules/scripts. Each module (rule set) has a unique ID with which it can be added or removed from the KB. Example 6 update("./examples/test/test.prova"). % add an external script update(id1,"r(1):-f(1). f(1)."). % add rule "r(1):-f(1)." and fact "f(1)." with ID "id1" update(id2,"r(X):-f(X)."). % add rule "r(X):-f(X)." with ID "id2" p(X,Y) :- update(id3, "r(_0):-f(_0), g(_0). f(_0). g(_1).", [X,Y]). %Object place holders _N: _0=X ; _1=Y. remove(id1). % remove update/module with ID "id1" remove("./examples/test/test.prova"). % remove external update Transactional updates transaction(update(…)) make an additional test on all integrity constraints defined in the KB or an explicitly stated integrity constraint. If the tests fail the update is rolled back. For a definition of the semantics of integrity constraints, labelled rules and ID-based updates see [22]. Based on the integrity constraints we have generalized the concept of defeasible reasoning, i.e. a conflict might not be just between positive and negative conclusions as in standard defeasible theories but also between arbitrary opposing conclusions, which are formalized as integrity constraints. Priorities might be defined between single rules but also between complete rule sets (modules) enabling rule set alternatives and hierarchical module structures (contract modules). We translate this generalized defeasible theory D into a logic program P(D) as follows: Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. (1) We define that strict knowledge is also defeasibe provable with a general rule in our meta program: defeasible([P|Args]):-bound(P), derive([P|Args]). The second-order “derive” predicate allows calling a predicate dynamically with the predicate symbol unknown until run-time, i.e. whenever [P|Args] which is translated into predicate notation P(Args1,..,ArgsN) can be evaluated this predicate is also defeasible provable. (2) Each priority relation r1>r2 where rl are the rule names (rule object identifiers) is stated as: overrides(r1,r2). Priorities might be also defined between rule modules: overrides(moduleOID1, moduleOID2). (3) Each defeasible rule r: p <= q1,..,qn is translated into the following set of meta rules: oid(m,p). % relation between rule head and module oid(r,p). % relation between rule head and rule label neg(blocked(defeasible(p))):- testIntegrity(p), defeasible(qi). % used in meta program for reasoning body(defeasible(p)) :- defeasible(qi ). % used in meta program for reasoning defeasible(p) :- % defeasible rule testIntegrity(p), % strictly overtuned ? defeasible(qi ), % body holds defeasible? not(defeated(r,p)). % not defeasible defeated? - The defeasible rule name r is related to the rule head p (where p is p(x1,..,xk)) and related to the module (set of rules) m via the predicate oid. - The defeasible rule p is not blocked (neg(blocked()) if the defeasible rule does not violate the integrity of any strict knowledge (normal strict rule or fact) in the knowledge base and all prerequistes qi for all i ∈ {1,..n} are defeasible provable. - The defeasible rule defeasbile(p) is provable if it does not violate the integrity of strict knowledge and all prerequisites qi defeasibly hold, and it is not defeated by any other defeasible rule. The defeasible meta program implemented in ContractLog tests whether the defeasible rule r with the head p is defeated by testing if the rule defeasibly violates the integrity of the logic program according to the defined integrity constraints. For each integrity constraint where p is a member the defeasible integrity test meta program does the following: 1. Test whether all conflicting literals of p are blocked, i.e. can not be derived using the neg(blocked(…)) rules: neg(blocked(defeasible(Opposer))) 2. If a conflicting literal is not blocked, test whether it is overridden by the defeasible rule p or by the module p belongs to, i.e. has higher priority than the opposer: overrides(Rule,Opposer). and overrides(RuleModuleOID,OpposerModuleOID). If a conflicting defeasible rule, i.e. a rule which is defined in an integrity constraint to be conflicting, is not blocked and is of higher priority than the defeasible rule p, p is defeated and will be not concluded. Supperiority relations between defeasible rules can be either defined based on the rule names (rule oids) such as Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. overrides(r1,r2) or based on head literals such as overrides(p1(X),p2(X)), i.e. a rule (or fact) with head p1(X) overrides a rule with head p2(X). This is very useful to define general superiority rules such as “prefer positive knowledge over negative knowledge”: overrides([P|Args], neg([P|Args])) :- bound(P). 3.8. Summary Contractual logic in SLAs requires several logic formalisms in order to adequately represent respective rules. Such a KR needs to be expressive, but at the same time computationally efficient. Several expressive logical extensions to the basic theories have been presented and we have illustrated how these extended KR concepts can be represented effectively as (meta) logic programs which can be executed in generic LP rule engines. Table 8 provides a short summary of the ContractLog KR framework. Table 7: Main logic concepts integrated in ContractLog Logic Extended Logic (section 3.1) Typed Logic Formalism Derivation Rules and extended LPs Object-oriented Typed Logic and Procedural Attachments (section 3.2) Description Logic (section 3.2) (Re)active Logic (section 3.3) Temporal Event/Action Logic (section 3.4) Hybrid Description Logic Types and Semantic Web Ontology Languages Extended Event-ConditionAction Rules (ECA) Event Calculus Deontic Logic (section 3.5) Deontic Logic with norm violations and exceptions Integrity Preserving, Preferenced, Defeasible Logic (section 3.6) Test Logic [22] Defeasible Logic and Integrity Constraints Test-driven Verification and Validation for Rule Bases Usage Deductive reasoning on SLA rules extended with negation-as-finite-failure and explicit negation. Typed terms restrict the search space and enable object-oriented software engineering principles. Procedural attachments integrate object oriented programming into declarative rules. Æ integration of external systems Semantic domain descriptions (e.g., contract ontologies) in order to describe rules domain-independent. Æ external contract/domain vocabularies Active event detection/event processing and eventtriggered actions. Æ reactive rules. Temporal reasoning about dynamic systems, e.g. interval-based complex event definitions (event algebra) or effects of events on the contract state Æ contract state tracking Æ reasoning about events/actions and their effects Rights and obligations formalized as deontic contract norms with norm violations (contrary-to-duty obligations) and exceptions (conditional. defeasible obligations). Æ normative deontic rules. Default rules and priority relations of rules. Facilitates conflict detection and resolution as well as revision/updating and modularity of rules. Æ default rules and rule priorities Validation and Verification of SLA specifications against predefined SLA requirements Æ safeguards the engineering, dynamic adaption and interchange process of SLAs Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. 4. Implementation: Rule Based SLA-Management Based on the ContractLog concepts described above, we have implemented the RBSLM tool as a proof of concept implementation. Figure 2 shows the general architecture of the rule based service level management tool (RBSLM). Fig. 2: Architecture of Rule Based Service Level Management Tool The open-source, backward-reasoning rule engine Mandarax (1) (http://mandarax.sourceforge.net/) with the Prova scripting language extension (http://comas.soi.city.ac.uk /prova/), which we further extended with goal memoization, efficient data structures and different resolution algorithms and semantics (see section 3.1) serves as inference engine for the logical contract rules. The rules are represented on the basis of the ContractLog framework (2) and are imported using the Prova scripting language [7] into the internal knowledgebase of the rule engine. A high-level declarative mark-up language called the rule based SLA (RBSLA) language [35, 36] is provided to facilitate rule interchange, serialisation, tool based editing and verification of rules. A XSLT based mapping is defined which transforms RBSLA into executable ContractLog rules. The graphical user interface - the Contract Manager (4) - is used to write, edit and maintain the SLAs which are persistently stored in the contract base (3). The repository (5) contains typical rule templates and predefined SLA domain specific objects, built-in metrics and contract vocabularies (ontologies) which can be reused in the SLA specifications. During the enforcement and monitoring of the Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. SLAs external system management tools and business objects can be integrated (6) (via procedural attachments). Finally, the Service Dash Board (7) visualizes the monitoring results and supports further SLM processes, e.g. reports on violated services, metering and accounting functions, notification services. 5. Evaluation ContractLog provides compact, declarative knowledge representation for contractual agreements based on logic programming. On the one hand, this enables high levels of flexibility and easy maintenance as compared to traditional SLA approaches. On the other hand, generic rule engines allow for an efficient execution of SLAs. In the following, we evaluate our KR approach by means of experiments and on an example derived from common industry use cases. For a formal analysis of the average and worst case complexity of LPs see [37]. 5.1 Experimental Performance Evaluation To experimentally benchmark performance of the ContractLogs’ formalisms w.r.t. query answering in different logic classes (e.g. propositional, Datalog, normal) we adapt a benchmark test suite for defeasible theories [34] to the ContractLog KR and extend it to evaluate different inference properties, rule types and logic program classes. The experiments are designed to test different performance/scalability aspects of the inference engine and the logical formalisms. We ran the performance tests on an Intel Pentium 1,2 GHz PC with 512 MB RAM running Windows XP. We use different benchmark tests to measure the time required for proofs, i.e. we test performance (time in CPU seconds to answer a query) and scalability (size of test in number of literals). Various metrics such as number of facts, number of rules, overall size of literal indicating the size of complexity of a particular benchmark test might be used to estimate the time for query answering and memory consumption. The first group of benchmarks evaluates different inference aspects of the ContractLog KR such as rule chaining, recursion, and unification. In the chains test a chain of n rules and one fact at its end is queried. In the dag test a directed-acyclic tree of depth n is spanned by the rules in which every literal occurs recursively k times. In the tree test a fact is at the root of a k-branching tree of depth n in which every literal occurs once. Each test class is performed for propositional LPs without variables and Datalog LPs with one variable. The tests further distinguish strict LPs, i.e. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. normal LPs with only strict (normal) derivation rules and defeasible LPs with defeasible derivation rules and compare inference for both classes with goal memoization and without goal memoization. We use as a measure of problem size the total number of literals, which is accordingly much larger for the defeasible theories due to the meta program transformations, as described in section 3.6. The second and third group of experiments test the ECA processor for (re)active rule processing and complex event processing based on Event Calculus formulations. Table 8 shows an extract of important performance results in CPU seconds. [37] TABELLE 8: PERFORMANCE EVALUATION Test chains(n) dag(n,k) n=3 k=3 n=4 k=4 n=10k=10 tree(n,k) n=3 k=3 n=4 k=3 n=8 k=3 ecaplain(n) echoldsAt(n) Size Strict Defeasible 2001 5001 10001 20001 11001 27501 55001 110001 Time (in seconds) No Memoization Memoization Strict Defeasible (Proposi- Strict Defeasible (Propos. (Propos. / Datalog) tional / Datalog) (Propositional / / Datalog) Datalog) 0.01 / 0.07 4 / 7.6 0.05 / 0.17 5,7 / 7,8 0.03 / 0.17 12.8 / 25 0,15 / 0.47 18 / 24,3 0.07 / 0.3 40 / 70 0,4 / 1.05 59 / 75 0.15 / 0.62 127 / 250 1,25 / 2,62 170 / 200 39 84 1110 156 324 3810 0.01 / 0.06 2.2 / 7.7 -/- 0.54 / 0.89 81 / 120 -/- 0.005/ 0.01 0.01 / 0.03 0.05 / 0.16 0.05/ 0.05 0.06/ 0.07 0.2 / 0.32 79 281 19681 248 761 62321 0.01 / 0.02 0.015/ 0.03 0.17 / 0.5 Update Time 0.4 1.1 2.5 4.3 3.3 6.8 14.6 28.7 0.04/0.04 0.09/0.1 -/- 0.001/0.001 0.005/0.006 0.02/0.04 Execution Time 0.005 0.01 0.015 0.02 0.04/ 0.05 0.08/ 0.11 0.09/ 0.14 1000 2500 5000 10000 1002 2502 5002 10002 “-“ denotes that the experiment was exhausted due to excessive runtime or memory requirements Each experiment was performed several times (10 experiments per benchmark test) and table 8 shows the average results. The table shows the computation time to find an answer for a query. Due to the needed variable unifications and variable substitutions in the derivation trees the datalog tests are in general a little bit more expensive than the propositional tests and goal memoization adds small extra costs to rule derivations. In the chains test where subgoals are never reused the experiments with memoization are slower than without memoization due to the caching overhead. However, the advantages of goal memoization can be seen in the tree and dag tests which (recursively) reuse subgoals. Here goal memozation leads to Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. much higher performance and scalability (large problem sizes can be solved). As expected the defeasible experiments run slower, due to the much larger problem sizes and the meta program interpretation which need several KB subgoal queries. Goal memoization reduces duplication of work, e.g. to test strict integrity of defeasible rules. The ECA rule experiments distinguish between update time for querying the KB for ECA rules and processing time for executing the ECA rules. The experiments reveal an increase in time linear in the problem size. The event calculus test also show linear time increase in the problem size, which here is the number of occurred events stated as happens facts which initiate resp. terminate a fluent. In summary, the experiments reveal high performance of the ContractLog formalisms even for larger problem sizes with thousands of rules and more than 10000 literals, which qualifies the approach also for industrial applications. We have formalized typical real-world SLAs from different industries in ContractLog within several dozens up to hundreds rules and much smaller literal sizes (see e.g. RIF / RuleML use cases4) which can be efficiently executed and monitored within milliseconds. Moreover, the hybrid approach in ContractLog allows outsourcing lower-level computations and operational functionalities to procedural code and specialized external systems (e.g. DL reasoner [18]). 5.2. Use Case Revisited – Adequacy / Expressiveness In this section we illustrate adequacy of the rule-based SLA representation approach, in particular with respect to expressiveness of the ContractLog KR, by means of a use case example derived from common industry SLAs. We revive the example SLA described in section 2.2 and present a formalization of a selected subset in ContractLog, namely the monitoring schedules, the escalation levels and the associated roles, as well as the following SLA rules: Example 7: ContractLog formalization of SLA “The service availability will be measured every tschedule according to the actual schedule by a ping on the service. If the service is unavailable and it is not maintenance then escalation level 1 is triggered and the process manager is informed. Between 0-4 a.m. the process manager is permitted to start servicing which terminates any escalation level. The process manager is obliged to restart the service within time-torepair, if the service is unavailable. If the process manager fails to restore the service in time-to-repair (violation of obligation), escalation level 2 is triggered and the chief quality manager is informed. The chief quality manager is permitted to extend the time-to-repair interval up to a defined maximum value in order to enable the process manager to restart the service within this new time-to-repair. If the process manager fails to restart the service within a maximum time-to-repair escalation level 3 is triggered and 4 http://www.w3.org/2005/rules/wg/wiki/Rule_Based_Service_Level_Management_and_SLAs_for_Service_Oriented_Computing Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. the control committee is informed. In escalation level 3 the service consumer is permitted to cancel the contract.” The formalization in ContractLog is as follows: % service definition service(http://ibis.in.tum.de/staff/paschke/rbsla/index.htm). % role model and escalation levels initially(escl_lvl(0)). % initially escalation level 0 role(process_manager) :- holdsAt(escl_lvl(1),T). % if escalation level 1 then process_manager role(chief_quality_manager) :- holdsAt(escl_lvl(2),T). % if escalation level 2 then chief quality manager role(control_committee) :- holdsAt(escl_lvl(3),T). % if escalation level 3 then control committee % time schedules standard, prime, maintenance and monitoring intervals % before 8 and after 18 every minute schedule(standard, Service):systime(datetime(Y,M,D,H,Min,S)), less(datetime(Y,M,D,H,Min,S), datetime(Y,M,D,8,0,0)), interval(timespan(0,0,1,0), datetime(Y,M,D,H,Min,S)), service(Service), not(maintenance(Service)). % not maintenance schedule(standard, Service):systime(datetime(Y,M,D,H,Min,S)), more(datetime(Y,M,D,H,Min,S), datetime(Y,M,D,18,0,0)), interval(timespan(0,0,1,0), datetime(Y,M,D,H,Min,S)), service(Service), not(maintenance(Service)). % not maintenance % between 8 and 18 every 10 seconds schedule(prime, Service):sysTime(datetime(Y,M,D,H,Min,S)), lessequ(datetime(Y,M,D,H,Min,S),datetime(Y,M,D,18,0,0)), moreequ(datetime(Y,M,D,H,Min,S),datetime(Y,M,D,8,0,0)), interval(timespan(0,0,0,10), datetime(Y,M,D,H,Min,S)) , service(Service). % between 0 and 4 if maintenance every 10 minutes schedule(maintenance, Service) :sysTime(datetime(Y,M,D,H,Min,S)), lessequ(datetime(Y,M,D,H,Min,S),datetime(Y,M,D,4,0,0)), interval(timespan(0,0,10,0), datetime(Y,M,D,H,Min,S)) , service(Service), maintenance(Service). % servicing initiates(startServicing(S),maintenance(S),T). % initiate maintenance if permitted terminates(stopServicing(S), maintenance(S),T). % terminate maintenance happens(startServicing(Service),T):happens(requestServicing(Role,Service),T), holdsAt(permit(Role,Service, startServicing(Service)),T). % ECA rule: “If the ping on the service fails and not maintenance then trigger escalation level 1 and notify process manager, else if ping succeeds and service is down then update with restart information and inform responsible role about restart". eca(schedule(T,S), not(available(S)), not(maintenance(S)), escalate(S),_, restart(S)). % ECA rule available(S) :- WebService.ping(S). % ping service maintenance(S) :- sysTime(T), holdsAt(maintenance(S),T). escalate(S) :sysTime(T), not(holdsAt(unavailable(S),T)), % escalate only once update(“outages”,”happens(outage(_0),_1).”,[S,T]),% add event role(R), notify (R, unavailable(S)). % notify restart(S) :- sysTime(T), holdsAt(unavailable(S),T), update(“outages”,”happens(restart(_0),_1).”,[S,T]),% add event role(R), notify(R,restart(S)). % update + notify % initiate unavailable state if outage event happens initiates(outage(S),unavailable(S),T). terminates(restart(S),unavailable(S),T). % initiate escalation level 1 if outage event happens terminates(outage(S),escl_lvl(0),T). initiates(outage(S),escl_lvl(1),T). % terminate escalation level 1/2/3 if restart event happens initiates(restart(S),escl_lvl(0),T). terminates(restart(S),escl_lvl(1),T). terminates(restart(S),escl_lvl(2),T). terminates(restart(S), escl_lvl(3), T). % terminate escalation level 1/2/3 if servicing is started Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. initiates(startServicing(S),escl_lvl(0),T). terminates(startServicing(S), escl_lvl(1),T). terminates(startServicing(S), escl_lvl(2),T). terminates(startServicing(S),escl_lvl(3),T). % permit process manager to start servicing between 0-4 a.m. holdsAt(permit(process_manager,Service, startServicing(Service)), datetime(Y,M,D,H,Min,S)):lessequ(datetime(Y,M,D,H,Min,S),datetime(Y,M,D,4,0,0)). % else forbid process manager to start servicing. holdsAt(forbid(process_manager,Service, startServicing(Service)), datetime(Y,M,D,H,Min,S)):more(datetime(Y,M,D,H,Min,S),datetime(Y,M,D,4,0,0)).. % derive obligation to start the service if service unavailable derived(oblige(process_manager, Service , restart(Service))). % oblige process manager holdsAt(oblige(process_manager, Service , restart(Service)), T) :- holdsAt(unavailable(Service),T). % define time-to-repair deadline and trigger escalation level 2 if deadline is elapsed time_to_repair(tdeadline). % relative time to repair value trajectory(escl_lvl(1),T1,deadline,T2,(T2 - T1)) . % deadline function derivedEvent(elapsed). happens(elapsed,T) :- time_to_repair(TTR), valueAt(deadline,T, TTR). terminates(elapsed, escl_lvl(1),T).% terminate escalation level 1 initiates(elapsed, escl_lvl(2),T). % initiate escalation level 2 % trigger escalation level 3 if (updated) time-to-repair is > max time-to-repair happens(exceeded,T) :- happens(elapsed,T1), T=T1+ ttrmax. terminates(exceeded,escl_lvl(2),T). initiates(exceeded, escl_lvl(3),T). % service consumer is permitted to cancel the contract in escl_lvl3 derived(permit(service_consumer, contract , cancel)). holdsAt(permit(service_consumer, contract , cancel), T) :- holdsAt(escl_lvl(3),T). Via simple queries the actual escalation level and the rights and obligations each role has in a particular state can be derived from the rule base and the maximum validity interval (MVI) for each contract state, e.g. the maximum outage time, can be computed. These MVIs can be used to compute the service levels such as average availability. The ECA processor of the ContractLog framework actively monitors the escalation level 0 escalation level 1 ping fails escalation level 2 time-to-repair escalation level 3 max. time-to-repair ECA rules. Every tcheck according to the actual schedule it pings the service via a procedural attachment, triggers the next escalation level if the service is unavailable and informs the corresponding role. t0 t1 t2 critical state t3 t4 t5 To illustrate this process, we assume that the service contract violated Fig. 3: Contract tracking becomes unavailable at time t1. Accordingly, escala- tion level 1 is triggered and the process manager has time-to-repair t2. After t2 escalation level 2 is triggered and the chief quality manager adapts the time-to-repair to t3 and then to t4 until the maximum threshold max. time-to-repair is reached at time point t4. After t4 the SLA is violated and escalation level 3 is initiated which permits the service consumer to terminate the contract. Via querying the rule engine these status information can be dynamically derived at each point in time and used to feed periodical re- Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. ports, enforce rights and obligations or visualize monitoring results on quality aspects in the Service Dashboard (see figure 3). As can be seen from this use case example, the declarative rule based approach allows a very compact representation of globally defined SLA rules, which would not be possible in standard imperative programming languages. To encapsulate this QoS monitoring and decision making logic in Java an enormous object oriented infrastructure with several Java classes and multiple methods to model all subtle nuances would be needed. The entire control flow must be specified, i.e. the exact order and number of steps and decisions would be implicitly encoded into the procedural code. Obviously, this does not always scale and maintenance and management of the knowledge structures becomes increasingly difficult, especially when the SLA logic is likely to change frequently. In contrast to if-then structures in Java which form a hierarchical tree, logical rules assemble something more like a complex net, with dozens or even thousands of interconnected global rule nodes. Hence, the declarative approach naturally supports reuse of rules by global visibility. While in Java the if-then statements need to be processed from the beginning to the end exactly in the predefined order, in the declarative approach the derivation net can be queried at any node and the inference engine solves the task of finding all specific knowledge out of the general rules which assert general information about a SLA decision making problem. This global, declarative approach provides much flexibility when adapting SLA rules to changing needs, for example, when exceptional discounting policies are added.. This ability to dynamically and quickly alter the SLA logic at runtime without any extensions to the generic inference engine is a key advantage, which would require reimplementation of the application code resp. database schemas and perhaps larger service execution outages for redeployment. Hence, by representing the SLA monitoring and enforcement logic on a more abstract rule-based level and separating it form the low-level procedural aspects of service runtime environment, much more powerful SLA specifications can be written and maintenance and management of large numbers of complex individualized SLAs becomes much easier. The clear mathematical basis of the selected logical formalisms ensures correctness and traceability of derived results, which is crucial in the SLA domain in order to provide reliable and provable reactions and results, e.g. computed penalties used in accounting. Furthermore, it enables easier validation and verification of the SLA specifications and therefore ensures Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. consistency (due to sound and complete logical semantics) and integrity (integrity constraints / test cases) as well automated conflict resolution (via defeasible refutation). This section should provide some evidence that the proposed ContractLog framework provides KR adequacy criteria such as epistomological adequacy (“are we able to represent all relevant facts and rules?”), and heuristical / algorithmic / logic-formal adequacy (“are we able to execute all inferences with the limited resources?” and “Is the logical system sound, complete and decidable?” ). 6. Related Work The tendency in common commercial SLA/SLM tools such as IBM Tivoli SLA, HP OpenView, CA Unicenter, BMC Remedy Service Management is to allow specification of QoS parameters (e.g. availability, response time) with high/low bounds. Typically, these parameters are directly encoded in the application code or database tier, which makes it complicated to dynamically extend the SLA logic and describe more complex specifications than simple bounds. Hence, this approach is restricted to simple, static rules with only a limited set of parameters. More complex conditionals where one parameter depends upon some other parameters / conditions are not expressible. For instance a certain response time level may be necessary during prime time, a lower availability might be necessary under higher server loads or at least response time must be high when availability falls below a certain value. Due to the implicit procedural encoding of the SLA logic into the application code the SLAs are hard to manage, maintain and in particular adapt to new requirements, which would require heavy time and cost intensive refactorings of the application code and database schemas. There are several XML based mark-up approaches towards specification and management languages for SLAs such as the IBM Web Service Level Agreements (WSLA) [38], the HP Web Service Management Language (WSML) [39] or the Web Service Offering Language (WSOL) [40]. These languages include definitions of the involved parties (signatory and supporting parties), references to the operational service descriptions (e.g. WSDL) of the service(s) covered by the SLA, the SLA parameters to be monitored and the metrics and algorithms used to compute SLA parameters from raw metrics collected by measurement directives from external sources. They allow the specification of QoS guarantees, constraints imposed on SLA parameters and compensating activities in case these constraints are violated, in terms of implicaPaschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. tional clauses with simple Boolean evaluation functions and explicit Boolean connectives. Accordingly, these rules only have a very limited expressiveness restricted to truth/false implications without variables, quantifications, rule chaining and (non-monotonic) reasoning inferences. Hence these languages can not express more than simple conditional clauses and the interpreted must be adapted each time new functionalities are introduced into the serialization language. There have been some proposals on using Petri-nets [41] or Finite State Machines [42] to describe contracts as process flows. However, those approaches are best suited for contracts which follow a predefined protocol sequence. Recently, in the area of policy specifications there are several proposals which address the definition of policies such as WS-Policy [43] or WS-Agreement, or policy languages such as KAos, Rei or Ponder . However, the former are only general frameworks, where the details of special policy aspects still need to be defined in specialized sublanguages, and the later mainly focus on typical operational policies such as access control or security issues and only require/consider a very limited set of logical formalisms. In particular they are missing expressive rules (reactive rules, defeasible rules, normative rules). To our knowledge the only work which deals with contractual agreements in a declarative logical context is the work of Grosof et al. [44] The Semantic Web Enabling Technology (SWEET) toolkit comprises the CommonRules syntax and also enables business rules to be represented in RuleML. Whilst their approach deals with contracts in a broader range namely e-commerce contracts and mainly supports rule priorities via Generalized Courteous Logic Programs (GCLP) [33] and to some extend procedural attachments, our approach is focused on the specifics of Service Level Management. In contrast to SWEET, ContractLog incorporates additional logical concepts which are needed for adequate SLA representation such as contract states, explicit rights and obligations (deontic norms) supplemented with violations and exceptions of norms, integrity constraints, event processing facilities with active sensing, monitoring and triggering of actions, full support for different type systems (e.g. Java, Semantic Web) and procedural attachments in order to integrate existing business object implementations, and SLA-specific contract vocabularies. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. 7. Conclusions Logic programming has been a very popular paradigm in the late 1980’s and one of the most successful representatives of declarative programming in general. Although, logic programming is based on solid and well-understood theoretical concepts and has been proven to be very useful for rapid prototyping and describing problems on a high abstraction level, its application in commercial software has been limited throughout the past years. Service level management and more generally contract management appear to be particularly suitable to logic programming. IT service providers need to manage large amounts of SLAs with complex contractual rules describing various decision and business logic, reaching from deeply nested conditional clauses, reactive or even proactive behaviour to normative statements and integrity definitions. These rules are typically not of static nature and need to be continuously adapted to changing needs. Furthermore, the derived conclusions and results need to be highly reliable and traceable to count even in the legal sense of a contract. This demands for a declarative knowledge representation language which is computationally efficient even for larger SLA specifications, reliable and traceable even in case of incomplete or contradicting knowledge, flexible in a way that allows to quickly alter the behaviour of the SLA system and supports programming of arbitrary functionalities and decision procedures. Extended logic programs and derivation rules have several advantages over imperative languages such as Java, or database solutions. However, general logic programs need to be extended by multiple knowledge representation concepts and integrated with commercial system management tools to allow formalising the inherent complexity of SLAs and provide the necessary basis for service level management. In this article we have described ContractLog, a framework of integrated knowledge representation concepts to define and automatically enforce large amounts of SLAs based on generic derivation rule engines. In contrast to a conventional procedural implementation or pure formal specification approaches the declarative, rule-based (programming) approach in ContractLog provides high levels of extensibility and allows for a greater degree of flexibility in defining contractual agreements. We have evaluated the approach with respect to complexity and expressiveness by means of experimental tests. In summary, com- Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. pared to traditional systems, The RBSLM tool5 serves as a proof-of-concept implementation and illustrates that this particular combination of techniques allows for an efficient and scalable implementation of service level management tools. 5 RBSLA/ ContractLog project site: http://ibis.in.tum.de/research/projects/rbsla/index.htm. The RBSLA distribution with the ContractLog framework and the RBSLA language can be downloaded from Sourceforge at: https://sourceforge.net/projects/rbsla Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. References 1. Davison, D., On-Demand Outsourcing - Outsourcing & Service Provider Strategies, Service Management Strategies. 2003, Meta Group Delta. 2. Paschke, A. and E. Schnappinger-Gerull. A Categorization Scheme for SLA Metrics. in Multi-Conference Information Systems (MKWI06). 2006. Passau, Germany. 3. Hevner, A., et al., Design Science in Information Systems Research. MIS Quarterly, 2004. 28(1): p. 75-101. 4. Paschke, A., ContractLog - A Logic Framework for SLA Representation, Management and Enforcement. 2004, IBIS, TUM, Technical Report. 5. Emden, M.H. and R.A. Kowalski, The semantics of predicate logic as a programming language. Journal of the ACM, 1976. 23(4): p. 733-742. 6. Clocksin, W.F. and C.S. Mellish, Programming in Prolog. 2003, Berlin: Springer. 7. Kozlenkov, A. and M. Schroeder. PROVA: Rule-based Java-scripting for a bioinformatics semantic web. in International Workshop on Data Integration in the Life Sciences. 2004. 8. Kozlenkov, A., A. Paschke, and M. Schroeder, Prova. 2006, http://prova.ws. 9. Lloyd, J.W., Foundations of Logic Programming. 1987, Berlin: Springer. 10. Apt, K. and H. Blair, Logic Programming and Negation: A Survey J. of Logic Programming, 1994. 19(20): p. 9-71. 11. Shepherdson, J.C., Unsolvable problems for SLDNF resolution. J. of Logic Programming, 1991: p. 19-22. 12. Van Gelder, A., K. Ross, and J. Schlipf, The Well-Founded Semantics for General Logic Programs. JACM, 1991. 38(3): p. 620-650. 13. Przymusinski, T.C. Every logic program has a natural stratification and an iterated fixed point model. in ACM Symp. on Principles of Database Systems. 1989. 14. Przymusinski, T.C., The well-founded semantics coincides with the three-valued stable semantics. Fundamenta Informaticae, 1990. 13: p. 445-463. 15. Pereira, L.M. and J.J. Alferes. Well founded semantics for logic programs with explicit negation. in ECAI'92. 1992: John Wiley & Sons. 16. Chen, W., T. Swift, and D.S. Warren, Efficient top-down computation of queries under the well-founded semantics. J. of Logic Programming, 1995. 24(3): p. 161-199. 17. Chen, W. and D.S. Warren. Query evaluation under the well-founded semantics. in Symp. on the Principles of Database Systems. 1993. 18. Paschke, A., Typed Hybrid Description Logic Programs with Order-Sorted Semantic Web Type Systems based on OWL and RDFS. 2005, Internet Based Information Systems, Technical University Munich, Technical Report, 12/2005. 19. Nardi, D., et al., The Description Logic Handbook: Theory, Implementation and Applications, ed. F. Baader, et al. 2002: Cambridge University Press. 20. Paschke, A., ECA-RuleML: An Approach combining ECA Rules with interval-based Event Logics. 2005, IBIS, TUM, Technical Report. 21. Paschke, A., ECA-LP: A Homogeneous Event-Condition-Action Logic Programming Language. 2005, IBIS, TUM, Technical Report. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. 22. Paschke, A., The ContractLog Approach Towards Test-driven Verification and Validation of Rule Bases - A Homogeneous Integration of Test Cases and Integrity Constraints into Evolving Logic Programs and Rule Markup Languages (RuleML). 2005, IBIS, TUM, Technical Report. 23. Dietrich, J. and A. Paschke. On the Test-Driven Development and Validation of Business Rules. in ISTA05. 2005. Massey, New Zealand. 24. Paschke, A. Verification, Validation and Integrity of Distributed and Interchanged Rule Based Policies and Contracts in the Semantic Web. in Int. Semantic Web Policy Workshop (SWPW'06). 2006. Athens, GA, USA: Springer, LNCS. 25. Kowalski, R.A. and M.J. Sergot, A logic-based calculus of events. New Generation Computing, 1986. 4: p. 67-95. 26. Paschke, A. and M. Bichler. SLA Representation, Management and Enforcement - Combining Event Calculus, Deontic Logic, Horn Logic and Event Condition Action Rules. in EEE05. 2005. Hong Kong, China. 27. Paschke, A. ContractLog - A Logic Framework for SLA Representation, Management and Enforcement. in IBIS, TUM, Technical Report, 07/2004. 2004. 28. Chakravarthy, S., et al. Composite Events for Active Databases: Semantics Contexts and Detection. in VLDB 94. 1994. 29. Paschke, A., M. Bichler, and J. Dietrich. ContractLog: An Approach to Rule Based Monitoring and Execution of Service Level Agreements. in RuleML 2005. 2005. Galway, Ireland: Spring. 30. Paschke, A., J. Dietrich, and K. Kuhla. A Logic Based SLA Management Framework. in Semantic Web and Policy Workshop (SWPW) at 4th Semantic Web Conference (ISWC 2005). 2005. Galway, Ireland. 31. Nute, D., Defeasible Logic, in Handbook of Logic in Artificial Intelligence and Logic Programming Vol. 3, D.M. Gabbay, C.J. Hogger, and J.A. Robinson, Editors. 1994, Oxford University Press. 32. Antoniou, G., et al., Representation results for defeasible logic. ACM Transactions on Computational Logic, 2001. 2: p. 255-287. 33. Grosof, B.N., A Courteous Compiler From Generalized Courteous Logic Programs To Ordinary Logic Progams. 1999, IBM T.J. Watson Research Center. 34. Antoniou, G., et al. Efficient Defeasible Reasoning Systems. in Australian Workshop on Computational Logic. 2000. 35. Paschke, A., RBSLA: A Rule Based Service Level Agreements Language. 2004, IBIS, TUM, Technical Report. 36. Paschke, A. RBSLA - A declarative Rule-based Service Level Agreement Language based on RuleML. in International Conference on Intelligent Agents, Web Technology and Internet Commerce (IAWTIC 2005). 2005. Vienna, Austria. 37. Paschke, A., Evaluation of the ContractLog KR: Worst Case Complexity and Experimental Results. 2006, IBIS, TUM, Technical Report. 38. Dan, A., et al., Web Services on demand: WSLA-driven Automated Management. IBM Systems Journal, Special Issue on Utility Computing, 2004. 43(1): p. 136-158. 39. Sahai, A., D. A., and V. Machiraju, Towards Automated SLA Management for Web Services. 2001, HP Labs Palo Alto. 40. Tosic, V., et al. Management Applications of the Web Service Offerings Language (WSOL). in 15th Int. Conf. on Advanced Information Systems Engineering (CaiSE03). 2003. Velden, Austria. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006. 41. Molina-Jimenez, C., et al. Contract Representation for Run-time Monitoring and Enforcement. in IEEE Int. Conf. on E-Commerce (CEC),. 2003. Newport Beach, USA. 42. Daskalopulu, A. Modelling Legal Contracts as Processes. in 11th Int. Conf. and Work. on Databases and Expert Systems Applications. 2000. 43. Hondo, M. and C. Kaler, Web Services Policy Framework (WSPolicy), ftp://www6.software.ibm.com/software/developer/library/ws-policy.pdf. 2003. 44. Grosof, B.N., Y. Labrou, and H.Y. Chan. A Declarative Approach to Business Rules in Contracts: Courteous Logic Programms in XML. in EC-99. 1999. Denver UK: ACM Press. Paschke, A. and Bichler, M.: Knowledge Representation Concepts for Automated SLA Management, Int. Journal of Decision Support Systems (DSS), submitted 19th March 2006.
6cs.PL
On classes of finite groups with simple non-abelian chief factors arXiv:1711.01686v1 [math.GR] 6 Nov 2017 V. I. Murashka {[email protected]} Francisk Skorina Gomel State University, Gomel, Belarus Abstract. Let J be a class of non-abelian simple groups and X be a class of groups. A chief factor H/K of a group G is called X-central in G provided (H/K) ⋊ G/CG (H/K) ∈ X. We say that G is a Jcs-X-group if every chief X-factor of G is X-central and other chief factors of G are simple J-groups. We use XJcs to denote the class of all Jcs-X-groups. A subgroup U of a group G is called X-maximal in G provided that (a) U ∈ X, and (b) if U ≤ V ≤ G and V ∈ X, then U = V . In this paper we described the structure of Jcs-H-groups for a solubly saturated formation H and all hereditary saturated formations F containing all nilpotent groups such that the FJcs -hypercenter of G coincides with the intersection of all FJcs -maximal subgroups of G for every group G. Keywords. Finite groups; c-supersoluble groups; Jcs-F-groups; hereditary saturated formation; solubly saturated formation; F-hypercenter of a group. AMS(2010). 20D25, 20F17, 20F19. Introduction All groups considered here will be finite. Through G, p, X and J we always denote here respectively a finite group, a prime, a class of groups and a class of non-abelian simple groups. Recall that a subgroup U of G is called X-maximal in G provided that (a) U ∈ X, and (b) if U ≤ V ≤ G and V ∈ X, then U = V [1, p. 288]. The symbol IntX (G) denotes the intersection of all X-maximal subgroups of G. Recall that a chief factor H/K of G is called X-central in G provided (H/K) ⋊ G/CG (H/K) ∈ X (see [2, p. 127–128]) and the symbol ZX (G) denotes the X-hypercenter of G, that is, the largest normal subgroup of G such that every chief factor H/K of G below it is X-central. If X = N is the class of all nilpotent groups, then ZN (G) is the hypercenter of G. Note that the intersection of maximal abelian subgroups of G is the center of G. According to R. Baer [3], the intersection of maximal nilpotent subgroups of G coincides with the hypercenter of G. In [4, Example 5.17] it was shown that the intersection of maximal supersoluble subgroups of G does not necessary coincide with the supersoluble hypercenter of G. L. A. Shemetkov possed the following question on Gomel Algebraic seminar in 1995: Question 1. For what non-empty normally hereditary solubly saturated formations X do the equality IntX (G) = ZX (G) hold for every group G? The solution to this question for hereditary saturated formations was obtained by A. N. Skiba in [4, 5] (for the soluble case, see also J. C. Beidleman and H. Heineken [6]) and for the class of all quasi-F-groups, where F is a hereditary saturated formation, was given in [7]. In particular, the intersection of maximal quasinilpotent subgroups is the quasinilpotent hypercenter. The aim of this paper is to give the answer on this question for another wide class of solubly saturated formations. 1 Results Recall that a group is called supersoluble if every its chief factor is a simple abelian group. V. A. Vedernikov [8] introduced the concept of c-supersoluble group (SC-group in the terminology of 1 D. J. S. Robinson [9]). Recall that a group is called c-supersoluble if every its chief factor is a simple group. The products of c-supersoluble groups were studied in [10, 11, 12, 13, 14]. According to [15], a group G is called Jc-supersoluble if every chief J-factor of G is a simple group, where J is a class of simple groups. The products and properties of such groups were studied in [15, 16]. Another generalization of the concept of c-supersoluble group was suggested in [17]. A group G is called ca-X-group [17] if every abelian chief factor of G is X-central and every non-abelian is a simple group. The class Fca of all ca-F-groups, where F is a saturated formation, was studied in [17, 18]. Note that there exists formations F 6⊆ Fca . Example 1. Let F be a class of groups all whose composition factors are either soluble or isomorphic to the alternating group A5 of degree 5. It is clear that F is a saturated formation. Let G be the regular wreath product of A5 and the cyclic group of order 7. It is easy to see that G ∈ F and G 6∈ Fca . Definition 1. We say that G is a Jcs-X-group if every chief X-factor of G is X-central and other chief factors of G are simple J-groups. We use XJcs to denote the class of all Jcs-X-groups. It is clear that if F is a solubly saturated formation such that F contains every composition factor of every F-group, then F ⊆ FJcs . Note that if J is the class of all simple non-abelian groups and F ⊆ S, where S is the class of all soluble groups, then FJcs = Fca . Theorem 1. Let F be a solubly saturated (normally hereditary, Fitting) formation containing all nilpotent groups. Then FJcs is a solubly saturated (normally hereditary, Fitting) formation. The main result of this paper is Theorem 2. Let F be a hereditary saturated formation containing all nilpotent groups. Then the following statements are equivalent: (1) ZF (G) = IntF (G) holds for every group G and (Out(G) | G ∈ J) ⊆ F. (2) ZFJcs (G) = IntFJcs (G) holds for every group G. Recall that EF is the class of groups all whose composition factors are F-groups. The structural description of Jcs-F-group is given in: Theorem 3. Let F be a solubly saturated formation such that F contains every composition factor of every F-group. Then the following statements are equivalent: (1) G is a Jcs-F-group. (2) S/ZF (G) = Soc(G/ZF (G)) is a direct product of G-invariant simple J-groups and G/S is a soluble F-group. (3) GF = GEF , Z(GF ) ≤ ZF (G) and GF /Z(GF ) is a direct product of G-invariant simple J-groups. Corollary 1 ([9, Proposition 2.4]). A group G is a c-supersoluble if and only if there is a perfect normal subgroup D such that G/D is supersoluble, D/Z(D) is a direct product of G-invariant simple groups, and Z(D) is supersolubly embedded in G. Corollary 2 ([14, Theorem B]). A group G is widely c-supersoluble if and only if GwU = GS , Z(GwU ) ≤ ZF (G) and GwU /Z(GwU) is a direct product of G-invariant simple non-abelian groups. Corollary 3 ([18, Theorem A]). Let F be a saturated formation of soluble groups. Then G ∈ Fca if and only if GF = GS , Z(GF ) ≤ ZF (G) and GF /Z(GF ) is a direct product of G-invariant simple non-abelian groups. 2 2 Preliminaries The notation and terminology agree with the books [1, 19]. We refer the reader to these books for the results on formations. Recall that GF is the F-residual of G for a formation F, GS is the soluble radical of G, F̃(G) is defined by F̃(G)/Φ(G) = Soc(G/Φ(G)); π(G) is the set of all prime divisors of G, π(X) = ∪ π(G), Np F = (G | G/Op(G) ∈ F) is a formation for a formation G∈X F, G is called s-critical for X if all proper subgroups of G are X-groups and G 6∈ X, AutG, InnG and OutG are respectively groups of all, inner and outer automorphisms of G. A formation is a class X of groups with the following properties: (a) every homomorphic image of an X-group is an X-group, and (b) if G/M and G/N are X-groups, then also G/(M ∩ N) ∈ X. A formation X is said to be: saturated (resp. solubly saturated ) if G ∈ X whenever G/Φ(N) ∈ X for some normal (resp. for some soluble normal) subgroup N of G; hereditary (resp. normally hereditary) if H ∈ X whenever H ≤ G ∈ X (resp. whenever H ⊳ G ∈ X); Fitting if it is normally hereditary and G ∈ X wherever G = AB, A, B E G and A, B ∈ X. Recall that C p (G) is the intersection of the centralizers of all abelian p-chief factors of G p (C (G) = G if G has no such chief factors). Let f be a function of the form f : P ∪ {0} → {f ormations}. Recall [19, p. 4] that CLF (f ) = (G | G/GS ∈ f (0) and G/C p (G) ∈ f (p) for all p ∈ π(G) such that G has an abelian p-chief factor). If a formation F = CLF (f ) for some f , then F is called composition or Baer-local. A formation is solubly saturated if and only if it is composition (Baer-local) [1, IV, 4.17]. Any nonempty solubly saturated formation F has an unique composition definition F such that F (p) = Np F (p) ⊆ F for all primes p and F (0) = F (see [19, 1, 1.6]). In this case F is called the canonical composition definition of F. Lemma 1 ([19, 1, 2.6]). Let F be a solubly saturated formation. Then G ∈ F if and only if G = ZF (G). Lemma 2 ([20, Theorem 1]). Let F be a normally hereditary (resp. Fitting) composition formation and F be its canonical local definition. If F (p) 6= ∅, then F (p) is normally hereditary (resp. Fitting) formation. Lemma 3 ([21, X, 13.16(a)]). Suppose that G = G1 × · · · × Gn , where each Gi is a simple non-Abelian normal subgroup of G and Gi 6= Gj for i 6= j. Then any subnormal subgroup H of G is the direct product of certain Gi . The following lemma directly follows from previous lemma Lemma 4. Let a normal subgroup N of G be a direct product of isomorphic simple non-abelian groups. Then N is a direct product of minimal normal subgroups of G. A function of the form f : P → {f ormations} is called a formation function. Recall [1, IV, 3.1] that a formation F is called local if F = (G | G/CG (H/K) ∈ f (p) for every p ∈ π(H/K) and every chief factor H/K of G) for some formation function f . In this case f is called a local definition of F. By the Gaschütz-Lubeseder-Schmid theorem, a formation is local if and only if it is non-empty and saturated. Recall [1, IV, 3.8] that if F is a local formation, there exists a unique formation function F , defining F, such that F (p) = Np F (p) ⊆ F for every p ∈ P. In this case F is called the canonical local definition of F. Lemma 5 ([19, 1, 1.15]). Let H/K be a chief factor of G. Then (1) If F is a composition formation and F is its canonical composition definition, then H/K is F-central if and only if G/CG (H/K) ∈ F (p) for all p ∈ π(H/K) in the case when H/K is abelian, and G/CG (H/K) ∈ F when H/K is non-anelian. (2) If F is a local formation and F is its canonical local definition, then H/K is F-central if and only if G/CG (H/K) ∈ F (p) for all p ∈ π(H/K). 3 Lemma 6 ([1, IV, 3.16]). Let F be the canonical local definition of a local formation F. Then F is hereditary if and only if F (p) is hereditary for all p ∈ P. Recall [22, 3.4.5] that every solubly saturated formation F contains the greatest saturated subformation Fl with respect to set inclusion. Theorem 4 ([22, 3.4.5]). Let F be the canonical composition definition of a non-empty solubly saturated formation F. Then f is a local definition of Fl , where f (p) = F (p) for all p ∈ P. 3 3.1 On the class of Jcs-F-groups Properties of Jcs-F-groups Proposition 1. For any class of groups X, the class XJcs is a formation. Proof. Let A and B be a G-isomorphic G-groups. Note that if A is simple, then B is simple. Also note that A⋊G/CG (A) ≃ B ⋊G/CG (B). Now Proposition 1 follows from the Isomorphism Theorems [1, 2.1A]. Proposition 2. Let N ⊆ F be a composition formation with the canonical composition definition F . Then FJcs is a composition formation and has the canonical composition definition FJcs such that FJcs (0) = FJcs and FJcs (p) = F (p) for all p ∈ P. Proof. By Proposition 1, FJcs is a formation. Let H = CLF (FJcs ). Assume H \ FJcs 6= ∅. Let chose a minimal order group G from H \ FJcs . Since FJcs is a formation, G has an unique minimal normal subgroup N and G/N ∈ FJcs . Suppose that N is abelian. Then it is a p-group. Since N is H-central in G by Lemma 1, G/CG (N) ∈ FJcs (p) by Lemma 5. From FJcs (p) = F (p) and Lemma 5 it follows that N is F-central chief factor of G. Hence G ∈ FJcs , a contradiction. So N is non-abelian. Note that GS ≤ CG (N) by [19, 1, 1.5]. So G ≃ G/CG (N) ∈ FJcs (0) = FJcs , the contradiction. Thus H ⊆ FJcs . Assume FJcs \ H 6= ∅. Let chose a minimal order group G from FJcs \ H. Since H is a formation, G has an unique minimal normal subgroup N and G/N ∈ H. If N is abelian, then G/CG (N) ∈ F (p) for some p by Lemmas 1 and 5. From FJcs (p) = F (p) and Lemma 5 it follows that N is H-central in G. So G ∈ H, a contradiction. Hence N is non-abelian. It means that GS = 1. Therefore G/GS ≃ G ∈ FJcs = FJcs (0). Note that N ≤ C p (G) for all primes p. So C p (G)/N = C p (G/N). From G/N ∈ H it follows that G/C p (G) ≃ (G/N)/C p (G/N) ∈ FJcs (p) for any p such that G has an abelian chief p-factor. Therefore G ∈ H, the contradiction. So FJcs ⊆ H. Thus FJcs = H. Proposition 3. Let N ⊆ F be a normally hereditary composition formation. Then FJcs is normally hereditary. Proof. Let F be the canonical composition definition of F, G be an F-group and 1 = N0 E N1 E · · · E Nn = N E G be the part of chief series of G below N. Let H/K be a chief factor of N such that Ni−1 ≤ K ≤ H ≤ Ni for some i. If Ni /Ni−1 6∈ F, then it is a simple J-group. So Ni−1 = K, Ni = H and H/K is a simple J-group. If Ni /Ni−1 ∈ F, then it is F-central in G. Note that H/K ∈ F. Assume that Ni /Ni−1 is abelian. Then G/CG (Ni /Ni−1 ) ∈ F (p) for some p by Lemma 5. Note that F (p) is a normally hereditary formation by Lemma 2. Since NCG (Ni /Ni−1 )/CG (Ni /Ni−1 ) E G/CG (Ni /Ni−1 ), 4 we see that NCG (Ni /Ni−1 )/CG (Ni /Ni−1 ) ≃ N/CN (Ni /Ni−1 ) ∈ F (p). From CN (Ni /Ni−1 ) ≤ CN (H/K) it follows that N/CN (H/K) is a quotient group of N/CN (Ni /Ni−1 ). Thus N/CN (H/K) ∈ F (p). Now H/K is an F-central chief factor of N by Lemma 5. Assume that Ni /Ni−1 is non-abelian. Then G/CG (Ni /Ni−1) ∈ F by Lemma 5. Hence NCG (Ni /Ni−1 )/CG (Ni /Ni−1 ) ∈ F. By analogy N/CN (H/K) ∈ F. So H/K is an F-central chief factor of N by Lemma 5. Thus every chief F-factor of N is F-central and other chief factors of N are simple J-groups by Jordan-Hölder theorem. Thus N ∈ FJcs . Proposition 4. Let N ⊆ F be a composition Fitting formation. Then FJcs is a Fitting formation. Proof. Let F be the canonical composition definition of F. By Proposition 3, FJcs is normally hereditary. Let show that FJcs contains every group G = AB, where A and B are normal FJcs -subgroups of G. Assume the contrary. Let G be a minimal order counterexample. Note that F (p) is a Fitting formation for all p ∈ P by Lemma 2. If N is a minimal normal subgroup of G, then G/N = (AN/N)(BN/N) is the product of two normal FJcs -subgroups. Hence G/N ∈ FJcs by our assumption. Since FJcs is a formation, we see that N is an unique minimal normal subgroup of G. (a) If N ∈ F and abelian, then A/CA (N) ∈ F (p) and B/CB (N) ∈ F (p). Note that N is a p-group and N ∈ F. Let 1 = N0 E N1 E · · · E Nn = H be a part of a chief series of A. Note that Ni /Ni−1 is an F-central chief factor of A for all i = 1, . . . , n. So A/CA (Ni /Ni−1 ) ∈ F (p) by Lemma 5 for all i = 1, . . . , n. Therefore A/CA (N) ∈ Np F (p) = F (p) by [10, Lemma 1]. By analogy B/CB (N) ∈ F (p). (b) If N ∈ F and non-abelian, then A/CA (N) ∈ F and B/CB (N) ∈ F for all p ∈ π(N). Assume that N ∈ F is non-abelian. Then it is a direct product of minimal normal Fsubgroups Ni of A by Lemma 4. Hence Ni is F-central in A for all i = 1, . . . , n by Lemma 1. So A/CA (Ni ) ∈ F by Lemma 5. Note that CA (N) = ∩ni=1 CA (Ni ). Since F is a formation, A/ ∩ni=1 CA (Ni ) = A/CA (N) ∈ F. By analogy B/CB (N) ∈ F. (c) N 6∈ F. Assume that N ∈ F. Note that ACG (N)/CG (N) ≃ A/CA (N), BCG (N)/CG (N) ≃ B/CB (N) and G/CG (N) = (ACG (N)/CG (N))(BCG (N)/CG (N)). Since F (p) and F are Fitting formations, we see that if N is abelian, then G/CG (N) ∈ F (p), and if N is non-abelian, then G/CG (N) ∈ F. Thus N is F-central chief factor of G by Lemma 5. From G/N ∈ FJcs it follows that G ∈ FJcs , a contradiction. (d) The final contradiction. Since N 6∈ F and A ∈ FJcs , N is a direct product of minimal normal subgroups of A and these subgroups are simple J-groups. Hence every subnormal subgroup of N is normal in A by Lemma 3. By analogy every subnormal subgroup of N is normal in B. Since N is a minimal normal subgroup of G = AB, we see that N is a simple J-group. From G/N ∈ FJcs it follows that G ∈ FJcs, the final contradiction. Proposition 5. Let N ⊆ F be a composition formation. Then FJcs is saturated if and only if F is saturated and J ⊆ F. 5 Proof. It is clear that if F is saturated and J ⊆ F, then FJcs = F is saturated. Assume that FJcs 6= F, then there is a simple J-group G 6∈ F. Note that G ∈ FJcs . Let p ∈ π(G). According to [23], there is a Frattini Fp G-module A which is faithful for G. By known Gaschütz theorem G [24], there exists a Frattini extension A ֌ R ։ G such that A ≃ Φ(R) and R/Φ(R) ≃ G. If FJcs is saturated, then R ∈ FJcs . Hence R/Op′ ,p (R) ≃ G ∈ F (p) ⊆ F, the contradiction. Proposition 6. Let N ⊆ F be a composition formation. Then (FJcs )l = Fl . Proof. By Theorem 4, (FJcs )l is defined by f (p) = FJcs (p) for all p ∈ P and Fl is defined by h(p) = F (p) for all p ∈ P. Since FJcs (p) = F (p) for all p ∈ P by Proposition 2, (FJcs )l = Fl . 3.2 Proves of Theorems 1 and 3 Proof of Theorem 1. Recall that a formation is solubly saturated if and only if it is composition. Now Theorem 1 directly follows from Propositions 2, 3 and 4. Proof of Theorem 3. (1) ⇒ (2) Let G ∈ FJcs , Z = ZF (G) and S/Z = Soc(G/Z). Note that G/Z does not have minimal normal F-subgroups. Hence every minimal normal subgroup Si /Z of G/Z (i = 1, . . . , n) is a simple J-group. Now S/Z = S1 /Z × · · · × Sn /Z. Since all groups in J are non-abelian, Φ(G/Z) ≃ 1. Hence S/Z = F̃(G/Z). Note that every element xZ induces an automorphism αx,i on Si /Z for i = 1, . . . , n. Let ϕ : xZ → (αx,1 , . . . , αx,n ) It is clear that ϕ(xZ)ϕ(yZ) = ϕ(xyZ). Also note that if ϕ(xZ) = ϕ(yZ), then y −1 xZ acts trivially on every Si /Z. So y −1 xZ ∈ ∩ni=1 CG/Z (Si /Z) = CG/Z (S/Z) = CG/Z (F̃(G/Z)) ⊆ F̃(G/Z). Hence y −1 xZ = 1Z. Now yZ = xZ and ϕ is injective. Hence ϕ is the monomorphism from G/Z to Aut(S1 /Z) × · · · × Aut(Sn /Z). Note that ϕ(S/Z) = Inn(S1 /Z) × · · · × Inn(Sn /Z). It is straightforward to check that (Aut(S1 /Z) × · · · × Aut(Sn /Z))/(Inn(S1 /Z) × · · · × Inn(Sn /Z)) ≃ Out(S1 /Z) × · · · × Out(Sn /Z) Now G/S ≃ (G/Z)/(S/Z) ≃ ϕ(G/Z)/ϕ(S/Z) can be viewed as subgroup of Out(S1 /Z) × · · · × Out(Sn /Z). By Schreier conjecture all Out(Si /Z) are soluble. Hence every chief factor of G above S is soluble and, hence, F-central in G. (2), (3) ⇒ (1) Assume that GF = GEF , Z(GF ) ≤ ZF (G) and GF /Z(GF ) is a direct product of G-invariant simple J-groups or S/ZF (G) = Soc(G/ZF (G)) is a direct product of G-invariant simple J-groups and G/S is a soluble F-group. Now it is clear that a group G has a chief series such that its every chief F-factor is F-central in G and other its chief factors a simple J-groups. Thus G ∈ FJcs by Jordan-Hölder theorem. (1) ⇒ (3) Assume now that G ∈ FJcs . Note that every chief factor of G above GEF is an F-group and hence F-central in G by the definition of FJcs . So ZF (G/GEF ) = G/GEF . Therefore G/GEF ∈ F and GF ≤ GEF . From F ⊆ EF it follows that GEF ≤ GF . Thus GF = GEF . By [25, Corollary 2.3.1], GF ≤ CG (ZF (G)). Hence GF ∩ ZF (G) = Z(GF ). So Z(GF ) ≤ ZF (G). According to (2), (G/ZF (G))F = Soc(G/ZF (G)) is a direct product of simple J-groups. Note that GF /Z(GF ) ≃ GF ZF (G)/ZF (G) = (G/ZF (G))F . Now GF /Z(GF ) is a direct product of G-invariant simple J-groups by Lemma 4 and Definition 1. 6 4 4.1 On the intersection of FJcs-maximal subgroups Basic results It is natural to ask if the solution of Question 1 can be reduced to the case, when X is a saturated formation? That is why A. F. Vasil’ev suggested the following question on Gomel Algebraic seminar in 2015: Question 2. (1) Let H be a normally hereditary saturated formation. Assume that IntH (G) = ZH (G) holds for every group G. Describe all normally hereditary solubly saturated formations F with Fl = H such that IntF (G) = ZF (G) holds for every group G. (2) Let F be a normally hereditary solubly saturated formation. Assume that IntF (G) = ZF (G) holds for every group G. Does IntFl (G) = ZFl (G) hold for every group G? Recall that D0 X be the class of groups which are the direct products X-groups. Partial answer on this question is given in Theorem 5. Let F be the canonical composition definition of a non-empty solubly saturated formation F. Assume that F (p) ⊆ Fl for all p ∈ P and Fl is hereditary. (1) Assume that IntFl (G) = ZFl (G) holds for every group G. Let H = (S is a simple group | if H/K is F-central chief D0 (S)-factor of G, then H/K is Fl -central). Then every chief D0 H-factor of G below IntF (G) is Fl -central in G. (2) If IntF (G) = ZF (G) holds for every group G, then IntFl (G) = ZFl (G) holds for every group G. Proof. From F (p) = Np F (p) ⊆ Fl and Theorem 4 it follows that if we restrict F to P, then we obtain the canonical local definition of Fl . (1) Let H/K be a chief D0 H-factor of G below IntF (G). (a) If H/K is abelian, then MCG (H/K)/CG (H/K) ∈ F (p) for every F-maximal subgroup M of G. If H/K is abelian, then it is an elementary abelian p-group for some p and H/K ∈ F. Let M be an F-maximal subgroup of G and K = H0 E H1 E · · · E Hn = H be a part of a chief series of M. Note that Hi /Hi−1 is an F-central chief factor of M for all i = 1, . . . , n. So M/CM (Hi /Hi−1 ) ∈ F (p) by Lemma 5 for all i = 1, . . . , n. Therefore M/CM (H/K) ∈ Np F (p) = F (p) by [10, Lemma 1]. Now MCG (H/K)/CG (H/K) ≃ M/CM (H/K) ∈ F (p) for every F-maximal subgroup M of G. (b) If H/K is non-abelian, then MCG (H/K)/CG (H/K) ∈ F (p) for every F-maximal subgroup M of G. If H/K is non-abelian, then it is a direct product of isomorphic non-abelian simple groups. Let M be an F-maximal subgroup of G. By Lemma 4, H/K = H1 /K × · · · × Hn /K is a direct product of minimal normal subgroups Hi /K of M/K. Now Hi /K is F-central in M/K for all i = 1, . . . , n. Hence Hi /K is Fl -central in M/K for all i = 1, . . . , n by the definition of H. Therefore M/CM (Hi /K) ∈ F (p) for all p ∈ π(Hi /K) by Lemma 5. Note that CM (H/K) = ∩ni=1 CM (Hi /K). Since F (p) is a formation, M/ ∩ni=1 CM (Hi /K) = M/CM (H/K) ∈ F (p) for all p ∈ π(H/K). It means that MCG (H/K)/CG (H/K) ≃ M/CM (H/K) ∈ F (p) for every p ∈ π(H/K) and every F-maximal subgroup M of G. (c) All Fl -subgroups of G/CG (H/K) are F (p)-groups for all p ∈ π(H/K). 7 Let Q/CG (H/K) be an Fl -maximal subgroup of G/CG (H/K). Then there exists an Fl maximal subgroup N of G with NCG (H/K)/CG (H/K) = Q/CG (H/K) by [19, 1, 5.7]. From Fl ⊆ F it follows that there exists an F-maximal subgroup L of G with N ≤ L. So Q/CG (H/K) ≤ LCG (H/K)/CG (H/K) ∈ F (p) for all p ∈ π(H/K) by (a) and (b). Since F (p) is hereditary by Lemma 6, Q/CG (H/K) ∈ F (p). It means that all Fl -maximal subgroups of G/CG (H/K) are F (p)-groups. Hence all Fl -subgroups of G/CG (H/K) are F (p)-groups. (d) H/K is Fl -central in G. Assume now that H/K is not Fl -central in G. So G/CG (H/K) 6∈ F (p) for some p ∈ π(H/K) by Lemma 5. It means that G/CG (H/K) contains an s-critical for F (p) subgroup S/CG (H/K). Since IntFl (G) = ZFl (G) holds for every group G, S/CG (H/K) ∈ Fl by [4, Theorem A]. Therefore S/CG (H/K) ∈ F (p) by (c), a contradiction. Thus H/K is Fl -central in G. (2) Let show that IntFl (G) = ZFl (G) holds for every group G. Assume the contrary. Then there exists an s-critical for f (p) group G 6∈ Fl for some p ∈ P by [4, Theorem A]. We may assume that G is a minimal group with this property. Then Op (G) = Φ(G) = 1 and G has an unique minimal normal subgroup by [4, Lemma 2.10]. Note that G is also s-critical for Fl . Assume that G 6∈ F. Then there exists a simple Fp G-module V which is faithful for G by [1, 10.3B]. Let T = V ⋊ G. Note that T 6∈ F. Let M be a maximal subgroup of T . If V ≤ M, then M = M ∩ V G = V (M ∩ G), where M ∩ G is a maximal subgroup of G. From M ∩ G ∈ f (p) and f (p) = Np f (p) it follows that V (M ∩ G) = M ∈ f (p) ⊆ Fl ⊆ F. Hence M is an F-maximal subgroup of G. If V 6≤ M, then M ≃ T /V ≃ G 6∈ Fl . Now it is clear that the sets of all maximal Fl -subgroups and all F-maximal subgroups of T coincide. Therefore V is the intersection of all F-maximal subgroups of T . From T ≃ V ⋊ T /CT (V ) 6∈ F it follows that V 6≤ ZF (T ), a contradiction. Assume that G ∈ F. Let N be a minimal normal subgroup of G. If N is abelian, then N is a p-group. Hence G/CG (N) ∈ F (p) = f (p). So N is an Fl -central chief factor of G by Lemma 5. Therefore N ≤ ZFl (G). Since N is an unique minimal normal subgroup of s-critical for Fl -group G and Φ(G) = 1, we see that G/N ∈ Fl . Hence G ∈ Fl , a contradiction. Thus N is non-abelian. Let p ∈ π(N). According to [23], there is a Frattini Fp G-module A which is faithful for G. By known Gaschütz theorem [24], there exists a Frattini extension A ֌ R ։ G such that G A ≃ Φ(R) and R/Φ(R) ≃ G. Assume that R ∈ F. Note that C p (R) ≤ CR (Φ(R)). So R/Φ(R) = R/CR (Φ(R)) ≃ G ∈ F (p) = f (p) ⊆ Fl , a contradiction. Hence R 6∈ F. Let M be a maximal subgroup of R. Then M/Φ(R) is isomorphic to a maximal subgroup of G. So M/Φ(R) ∈ f (p). From Np f (p) = f (p) it follows that M ∈ f (p) ⊆ Fl ⊆ F. Hence the sets of maximal and F-maximal subgroups of R coincide. Thus Φ(R) = ZF (R). From R/ZF (R) ≃ G ∈ F it follows that R ∈ F, the final contradiction. Proposition 7. Let N ⊆ F be a hereditary saturated formation. If H/K 6∈ F is a chief factor of G below IntFJcs (G), then it is a simple group. Proof. Note that H/K = H1 /K × · · · × Hn /K is a direct product of isomorphic simple nonabelian groups. Let M be a FJcs-maximal subgroup of G. Then H/K is a direct product of minimal normal subgroups of M/K by Lemma 4. From M/K ∈ FJcs it follows that all these 8 minimal normal subgroups are simple J-groups. According to Lemma 3, all these minimal normal subgroups are H1 /K, . . . , Hn /K. Thus H1 /K, . . . , Hn /K are normal in M/K for every FJcs -maximal subgroup M of G. From N ⊆ F it follows that for every x ∈ G there is a FJcs -maximal subgroup M of G with x ∈ M. It means that H1 /K, . . . , Hn /K are normal in G/K. Since H/K is a chief factor of G, H/K = H1 /K is a simple group. Proposition 8. Let F be a hereditary saturated formation. Then ZFJcs (G) ≤ IntFJcs (G). Proof. Let F be a hereditary saturated formation with the canonical local definition F , M be a FJcs -maximal subgroup of G and N = MZFJcs (G). Let show that N ∈ FJcs . It is sufficient to show that for every chief factor H/K of N below ZFJcs (G) either H/K ∈ F and H/K is F-central in N or H/K 6∈ F is a simple J-group. Let 1 = Z0 E Z1 E · · · E Zn = ZFJcs (G) be a chief series of G below ZFJcs (G). Then we may assume that Zi−1 ≤ K ≤ H ≤ Zi for some i by the Jordan-Hölder theorem. Note that (Zi /Zi−1) ⋊ G/CG (Zi /Zi−1) ∈ FJcs . Hence if Zi /Zi−1 6∈ F, then Zi /Zi−1 is a simple J-group. So H/K = Zi /Zi−1 is a simple J-group. If Zi /Zi−1 ∈ F, then it is an F-central chief factor of (Zi /Zi−1) ⋊ G/CG (Zi /Zi−1). In this case G/CG (Zi /Zi−1) ∈ F (p) for all p ∈ π(Zi /Zi−1 ) by Lemma 5. Since F (p) is hereditary by Lemma 6, NCG (Zi /Zi−1)/CG (Zi /Zi−1) ≃ N/CN (Zi /Zi−1 ) ∈ F (p) for all p ∈ π(Zi /Zi−1 ). Note that N/CN (H/K) is a quotient group of N/CN (Zi /Zi−1 ). Thus H/K is an F-central chief factor of N by Lemma 5. Thus N ∈ FJcs . So N = MZFJcs (G) = M. Therefore ZFJcs (G) ≤ M for every FJcs -maximal subgroup M of G. Proposition 9. Let N ⊆ F be a hereditary saturated formation. If H is a normal J-subgroup of G then H ≤ IntFJcs (G). Proof. Let M be a FJcs -maximal subgroup of G. Since MH/H ≃ M/M ∩ H ∈ FJcs , every chief factor of MH above H is either F-central or simple J-group. Since H is a simple J-group, MH ∈ FJcs by the definition of FJcs . 4.2 Proof of Theorem 2 (1) ⇒ (2). Suppose that ZF (G) = IntF (G) holds for every group G and (OutG | G ∈ J) ⊆ F. Let show that IntFJcs (G) = ZFJcs (G) also holds for every group G. Let H/K be a chief factor of G below IntFJcs (G). (a) If H/K ∈ F, then it is FJcs-central in G. Directly follows from Theorem 5, Definition 1 and F ⊆ FJcs . (b) If H/K 6∈ F, then it is FJcs -central in G. By Proposition 7, H/K is a simple J-group. Now G/CG (H/K) ≃ T and H/K ≃ Inn(H/K) ≤ T ≤ Aut(H/K). Since Out(H/K) ∈ F and F is hereditary, we see that T /Inn(H/K) ∈ F. Thus Soc(H/K ⋊ G/CG (H/K)) = (H/K ⋊ G/CG (H/K))F ≃ H/K × H/K is a direct product of two simple normal J-subgroups of H/K ⋊ G/CG (H/K). Thus H/K ⋊ G/CG (H/K) ∈ FJcs by Theorem 3. Now H/K is FJcs -cental in G by Lemma 5. (c) ZFJcs (G) = IntFJcs (G). From (a) and (b) it follows that IntFJcs (G) ≤ ZFJcs (G). By Proposition 8, ZFJcs (G) ≤ IntFJcs (G). Thus ZFJcs (G) = IntFJcs (G). 9 (2) ⇒ (1). Assume that ZFJcs (G) = IntFJcs (G) holds for every group G. Since F is saturated, we see that (FJcs )l = Fl = F by Proposition 6. Let F be a composition definition of FJcs . Then F (p) ⊆ F by Proposition 2 and Theorem 4. Now ZF (G) = IntF (G) holds for every group G by (2) of Theorem 5. Let show that (Out(G) | G ∈ J) ⊆ F. Assume the contrary. Then there is a J-group G such that Out(G) 6∈ F. By Proposition 9, G ≃ Inn(G) ≤ IntFJcs (Aut(G)). Hence H = Inn(G) ⋊ Aut(G)/CAut(G) (Inn(G)) ≃ G ⋊ Aut(G) ∈ FJcs . So Out(G) ∈ FJcs . By Schreier conjecture, Out(G) is soluble. Thus Out(G) ∈ F, the contradiction. Acknowledgments I am grateful to A. F. Vasil’ev for helpful discussions. References [1] K. Doerk and T. Hawkes. Finite soluble groups (Walter de Gruyter, 1992). [2] L. A. Shemetkov and A. N. Skiba. Formations of algebraic systems (Nauka, Moscow, 1989). (In Russian) [3] R. Baer. Group Elements of Prime Power Index. Trans. Amer. Math Soc. 75(1) (1953), 20–47. [4] A. N. Skiba. On the F-hypercenter and the intersection of all F-maximal subgroups of a finite group. Journal of Pure and Aplied Algebra 216(4) (2012), 789–799. [5] A. N. Skiba. On the intersection of all maximal F-subgroups of a finite group. J. Algebra 343 (2011), 173-182. [6] J. C. Beidleman and H. Heineken. A note of intersections of maximal F-subgroups. J. Algebra 333 (2010), 120–127. [7] V. I. Murashka. On the quasi-F-hypercenter of a finite group. ArXiv.org, e-Print archive, arXiv:1611.045707v1, 14 Nov 2016. [8] V. A. Vedernikov. On some classes of finite groups. Dokl. Akad. Nauk BSSR 32(10) (1988), 872-875. (In Russian) [9] D. J. S. Robinson. The structure offinite groups in whitcpermutability is a transitive relation. J. Austral. Math. Soc. 70 (2001), 143–159. [10] A. F. Vasil’ev, T. I. Vasilyeva, On finite groups whose principal factors are simple groups. Russian Math. (Iz. VUZ) 41(11) (1997), 8–12. [11] A. Ballester-Bolinches, J. Cossey, M. C. Pedraza-Aguilera. On mutually permutable products of finite groups. J. Algebra 294 (2005), 127–135. [12] J. Beidleman, P. Hauck and H. Heineken. Totally permutable products of certain classes of finite groups. J. Algebra 276 (2004), 826–835. [13] A. Ballester-Bolinches and J. Cossey. Totally Permutable Products of Finite Groups Satisfying SC or PST. Monatsh. Math. 145 (2005), 89–94 [14] A. F. Vasil’ev, T. I. Vasil’eva, E. N. Myslovets, Finite widely c-supersoluble groups and their mutually permutable products, Siberian Math. J. 57(3) (2016), 476–485. [15] A. F. Vasil’ev, T. I. Vasil’eva, E. N. Myslovets. On finite groups with a given normal structure. Sib. Elektron. Mat. Izv. 13 (2016), 897–910. (In Russian) [16] E. N. Myslovets, J-construction of composition formations and products of finite groups PFMT 29 (2016), 68–73. [17] E. N. Myslovets. On finite ca-F-groups. PFMT 19 (2014), 64–68. (In Russian) 10 [18] E. N. Myslovets, A. F. Vasil’ev, Finite generalized c-supersoluble groups and their mutually permutable products. PFMT 27 (2016), 45–53. (In Russian) [19] W. Guo. Structure theory for canonical classes of finite groups (Springer, 2015). [20] L. A. Shemetkov. Composition formations and radicals of finite groups. Ukrainian Mathematical Journal. 40(3) (1988), 318-322. [21] B. Huppert and N. Blackburn. Finite groups, vol. 3 (Springer-Verlag, 1982). [22] A. Ballester-Bolinches and L. M. Ezquerro. Classes of Finite Groups (Springer, 2006). [23] P. Schmid and R. L. Griess. The Frattini module. Arch. Math. 30 (1978), 256–266. [24] W. Gashütz. Über modulare Darstellungen endlicher Gruppen, die von freien Gruppen induziert werden. Math. Z. 60 (1954), 274–286. [25] L. A. Shemetkov. Graduated formations of groups. Math. USSR-Sb. 23(4) (1974), 593–611. 11
4math.GR
Proceedings of the ASME 2017 Dynamic Systems and Control Conference DSCC2017 October 11-13, 2017 Tysons Corner, Virginia, USA DSCC2017-**** REAL-TIME BRAIN MACHINE INTERACTION VIA SOCIAL ROBOT GESTURE CONTROL Reza Abiri Department of Mechanical, Aerospace, and Biomedical Engineering University of Tennessee, Knoxville Knoxville, TN 37996, USA [email protected] Soheil Borhani Department of Mechanical, Aerospace, and Biomedical Engineering University of Tennessee, Knoxville Knoxville, TN 37996, USA [email protected] Xiaopeng Zhao Department of Mechanical, Aerospace, and Biomedical Engineering University of Tennessee, Knoxville Knoxville, TN 37996, USA [email protected] Yang Jiang Department of Behavioral Science Sanders-Brown Center on Aging University of Kentucky, College of Medicine Lexington, KY 40356, USA [email protected] ABSTRACT Brain-Machine Interaction (BMI) system motivates interesting and promising results in forward/feedback control consistent with human intention. It holds great promise for advancements in patient care and applications to neurorehabilitation. Here, we propose a novel neurofeedbackbased BCI robotic platform using a personalized social robot in order to assist patients having cognitive deficits through bilateral rehabilitation and mental training. For initial testing of the platform, electroencephalography (EEG) brainwaves of a human user were collected in real time during tasks of imaginary movements. First, the brainwaves associated with imagined body kinematics parameters were decoded to control a cursor on a computer screen in training protocol. Then, the experienced subject was able to interact with a social robot via our real-time BMI robotic platform. Corresponding to subject’s imagery performance, he/she received specific gesture movements and eye color changes as neural-based feedback from the robot. This hands-free neurofeedback interaction not only can be used for mind control of a social robot’s movements, but also sets the stage for application to enhancing and recovering mental abilities such as attention via training in humans by providing real-time neurofeedback from a social robot. Keywords: Human-robot interaction; Brain Computer Interface; Neurofeedback; Social robot; Robot control; Motor imagery INTRODUCTION Interest in neural-based human-robot platforms has dramatically increased during the past decades in the field of neurorehabilitation and Brain Computer Interface (BCI) [1]. By using invasive approaches in primates [2-9] and humans [10-15], some interesting BMI robotic platforms were developed. During invasive BCI, the human had electrodes surgically implanted inside or on the surface of his/her brain [6, 11]. However, due to invasiveness, this method is not a suitable solution for short-term rehabilitation programs in humans. Recent advances in noninvasive approaches and BMI development confirmed the potential for rehabilitation using direct neural modulation related to the patient’s intention in a neural-based rehabilitation robotic platform [16-22]. Currently there is a renaissance of interest in using noninvasive electroencephalography (EEG) brainwaves as a common, popular, affordable and portable method, which has been applied by many researchers to control various external devices in different paradigms [1]. EEG records synchronized neural activity of the brain within milliseconds. The recorded electrical signals from the scalp of the brain differ during resting or during different tasks, e.g. whether subjects are imaging moving the left arm or the right leg, or memorizing an image. Importantly, EEG signals, reflecting synaptic functions, differ amongst people of 1 different ages and mental health status, e.g. between a healthy, cognitively normal (NC) person and a patient who has mild cognitive impairment (MCI) or Alzheimer’s Disease (AD), when performing the same task [23, 24]. The high discriminative and noninvasive nature of the EEG signal makes it a promising candidate for brain training via BCI in persons with cognitive deficit in a neurofeedback rehabilitation platform. However, this line of research is still in its infancy. Using noninvasive EEG monitoring, two major motor imagery paradigms have been developed in previous studies including “sensorimotor rhythms” and “imagined body kinematics.” In the sensorimotor rhythms paradigm, the EEG signals are typically collected by imaginary movement of large body parts [25] and are employed to control a cursor [26-29] or various external robotic devices [30-37]. For example, Bouyarmane et al. [38] controlled the position of the moving foot in an autonomous humanoid robot with 36-degree-of-freedom based on motor imagery of arm movements. However, BCI or BMI systems based on sensorimotor rhythms require lengthy training time (some weeks to several months) to gain satisfactory performance. Recently, Bradberry et al. [39] proposed a new EEG-based BCI paradigm (natural imaginary movement) in time-domain, which can significantly reduce the training time in BCI. Using this “imagined body kinematics” paradigm, they reported positive performance in a cursor control problem after only about 40 minutes of training and practice. It is worth pointing out that previous work on invasive devices show that the subjects with implanted electrodes in brain could quickly gain high success rate in target acquisition based on continuous imagined kinematics of just one body part [6, 11]. In the current study, we aim to develop and test the feasibility of a novel BMI platform using brain signalscontrolled gestures of a social robot to provide neurofeedback to a human subject. The present work is novel in providing specific neurofeedback to the subject in the context of brain training. In contrast, previously developed humanoid robot-based BMI platforms [38, 40-44] mostly investigated the direct control of robots in manipulation tasks. We hypothesized that neural-based feedback from a social robot may be more engaging and effective in maintaining user interest in specific mental tasks in the targeted rehabilitation program. An initial test of the developed platform is conducted using imagined body kinematics. The neurofeedback-based BMI platform developed here will set the foundations for the next stage of application to rehabilitation via brain training such as enhancing cognitive abilities, e.g., attention and memory, by providing real-time neurofeedback from a social robot. Materials and methods This section discusses the subject training protocol (2.1) and the brain-robot interaction platform (2.2). The Institutional Review Board at the University of Tennessee approved the experimental procedure. Five subjects participated in the experiments with written consent. None of the subjects had previously participated in BCI research studies. During the experiments, EEG signals were acquired using a wireless headset (Emotiv EPOC [45] device with 14 channels and through BCI2000 software [46](with 128Hz sampling frequency, high pass filter at 0.16Hz, and low pass filter at 30Hz). Subject training protocol Four healthy male subjects and one healthy female subject (right-handed, averaged age 24) participated in the training protocol after giving informed consent. Before direct interaction with the social robot, the naive subjects became familiar with the BCI systems via training tasks. Training Tasks The computerized task was provided by a PC with dual monitors. One monitor was viewed by the experimenter and the other by the subject. The protocol had three phases. Phase 1 was the training phase of the hands-free cursor task. The subject was asked to sit comfortably in a chair with hands resting on the laps. The subject’s face was kept at an arm’s length from the monitor. The subject was instructed to track the movement (right-left/updown) of a computer cursor, whose movements were controlled by an experimenter in a random manner. Meanwhile, the subject was taught to imagine the same matching movement velocity with their right index fingers. The training phase consisted of 5 trials for right-left and 5 trials for up-down; each trial lasted 60 seconds. Phase 2 was the calibration phase, during which a decoder model was constructed to model the velocity of the cursor as a function of the EEG waves of the subject. Based on a previous study [39], for more accurate reconstruction and prediction of the imagined kinematics at each point, 5 previous points (time lag) of EEG data (for a subject) were also included in the decoding procedure. Then, the developed decoder was fed into BCI2000 software to test the performance of the subject in phase 3 (test phase). In the test phase, the subject was asked to move the cursor using their imagination to the specific targets that randomly appeared on the center or at the edges of the monitor. Decoding brain signals Many decoding methods for EEG data have been investigated by researchers in frequency and time domains. Most 2 of sensorimotor-rhythms-based studies were developed in the frequency domain [26-32, 34, 35, 47]. Meanwhile, in the time domain, researchers employed regression models as a common method for decoding EEG data for offline decoding [48-52] and real-time implementation [39]. Kalman filter [53] and particle filter models [54] were applied in decoding EEG signals for offline analysis, as well. Many previous works confirmed that among kinematics parameters (position, velocity), velocity encoding/decoding showed the most promising and satisfactory validation in prediction [48, 49, 51]. Hence, we were motivated to decode and map the acquired EEG data to the observed cursor velocities in x and y directions. In other words, the aim was to reconstruct the subject’s imagined trajectories from EEG data and obtain a calibrated decoder. For this purpose, all the collected data were transferred to MATLAB software [55] for analyzing and developing a decoder. Here, based on a regression model for output velocities at time ‫ ݐ‬in x direction (‫ݑ‬ሾ‫ݐ‬ሿ) and y direction (‫ݒ‬ሾ‫ݐ‬ሿ), the equations are presented as follows: ே BMI robotic platform This subsection discusses details of the hardware and software employed in our brain-robot interaction platform. Figure 2 shows the completed and developed BMI robotic platform with different components and the overall schematics of data flow from the brain to the social robot. By programing in BCI2000 software and MATLAB (Simulink) software [55], imaginary movement tasks (from the subject) were mapped to specific real movements and change of eyes color in a social robot and the subject could see the result of his/her imaginary performance as neurofeedback in real time and from the robot. For example, as a simple scenario, right imaginary movement was mapped to right hand movement of robot and changing eyes color to green; left imaginary movement was mapped to left hand movement of the robot and changing eyes color to blue. The proposed platform as a total system operated as a closed-loop system with bilateral interaction. A brief description for each part of the platform is presented below. ௄ ‫ݑ‬ሾ‫ݐ‬ሿ = ܽ଴௫ + ෍ ෍ ܾ௡௞௫ ݁௡ ሾ‫ ݐ‬− ݇ሿ (1) ௡ୀଵ ௞ୀ଴ ே ௄ ‫ݒ‬ሾ‫ݐ‬ሿ = ܽ଴௬ + ෍ ෍ ܾ௡௞௬ ݁௡ [‫ ݐ‬− ݇] (2) ௡ୀଵ ௞ୀ଴ where ݁௡ [‫ ݐ‬− ݇] is the measured voltage for EEG channel ݊ at time t-k. The total number of EEG channels is ܰ = 14 and the total lag number is chosen to be ‫ = ܭ‬5. The choice of 5 lag points is the tradeoff between accuracy and computational efficiency. Meanwhile, ܽ and ܾ were the parameters that could be calculated by feeding the data to the equations 1 & 2 and by MATLAB coding. The data collected in training sessions were fed to equations 1 and 2 without any further filtering and the final developed decoder was employed to test and control the cursor on the monitor. Figure 1 shows a simple schematic of our experimental setup during the training protocol. Fig. 1: A schematic of our EEG-based BCI platform for brain training and cursor control task Fig. 2: The different components of the developed realtime neurofeedback-based BMI system Interface software All collected EEG signals were transferred wirelessly to BCI2000 where the EEG signals were used in the decoding algorithm to compute intended velocities. The generated velocity signals were sent in real time to the cursor control application module and to Raspberry Pi Simulink via User Datagram Protocol (UDP) [56]. As shown in Figure 2, the hardware part of the platform (Raspberry Pi board, LED board, Arduino board) was modified and designed in a way that the control signals (in Simulink) could be encoded to activate specific corresponding gesture and eyes color in the social robot. Raspberry Pi Simulink was developed to communicate with the Raspberry Pi board which could control the social robot based on received signals and sent through an Arduino board. The 3 Arduino Simulink, responsible for performing different types of gestures and eyes color, was deployed on the Arduino board in advance. Meanwhile, the Raspberry Pi Simulink was working in a real-time manner for controlling and switching among the predefined gestures and eyes color on the Arduino board. Social robot A low-cost social robot called “Rapiro” was chosen to provide neurofeedback for the subject [57]. The Rapiro robot is a humanoid robot kit with 12 servo motors and an Arduinocompatible controller board. Its capabilities for performing and controlling multiple tasks can be extended by employing a Raspberry Pi board assembled in the head of the robot. For this, the Arduino board in Rapiro could be modified and connected to the Raspberry Pi board. Using a Raspberry Pi board as the brain of robot enabled us to communicate with the robot and send the command signals from the PC to the social robot in real time. Rapiro was selected to provide neurofeedback to the subject by executing movements, playing sounds, and flickering lights in response to specific control commands received via Raspberry Pi Simulink. Rapiro was programmed such that the right target control on monitor (right imaginary movement) would activate the right hand movement of the robot and change its eye color to green; the left target control on monitor (left imaginary movement) would activate the left hand movement of the robot and change the eye color to blue; the top target control (top imaginary movement) led to both hand movements in robot with a mixture of green and blue eye color; and finally the bottom target control (bottom imaginary movement) activated head shaking and altered the eye color to red. movement and 6 trials of horizontal movement. One subject conducted 6 trials of vertical movement and did not conduct horizontal movements. The total success rate in hitting the targets shows more accuracy in horizontal movement compared to vertical movement. The subjects reported that it was easier to hit the targets in horizontal direction. These results are in consistent with previous noninvasive studies [39, 53, 58, 59]. Tab. 1: Results of cursor control experiments. Vertical Direction Horizontal Direction Number of Trials 30 24 Success Rate (standard deviation) 83.3% (+/- 11.7%) 100% (+/- 0%) Fig. 3: Comparison between observed cursor velocity and decoded cursor velocity in horizontal direction (for subject N2). Results For each subject, the EEG data collected during the training protocol were analyzed. As a test example, one subject was randomly selected to perform the brain-robot interaction experiments, during which the EEG data were recorded and reported. Training and cursor control task For more accurate prediction of imagined body kinematics, we employed a time window of five points (samples) in EEG memory data in our algorithms. Figures 3 and 4 show two sample plots of estimated velocities for one random subject (N2) during horizontal training and vertical training, respectively. These figures illustrate the observed cursor velocities (horizontal and vertical) versus decoded velocities for subject (N2) by using a regression model. Table 1 reports the results for all 5 subjects during the test phase for 1D cursor control tasks. Four subjects each conducted 6 trials of vertical Fig. 4: Comparison between observed cursor velocity and decoded cursor velocity in vertical direction (for subject N2). 4 Robot control and neurofeedback Offline control After performing the test phase in cursor control task by subjects, the data (controlled cursor position) of this phase were collected and applied to control the movements of the social robot in offline mode. Figures 5 and 6 show the series of controlled cursor position data corresponding to the performance of subject (N2) whose training EEG data were shown in Figures 3 and 4, respectively. These position data were sent in offline mode to the Simulink to control the different body parts of social robot (e.g. right hand & green eyes/left hand & blue eyes/two hands & mixture of green and blue eye colors/head shaking & red eyes). Figure 5 illustrates the cursor position mentally controlled by the subject (N2) during horizontal trials. The center of the screen, where the cursor started to move, is considered as reference point (0, 0). Positive values show the controlled cursor is on the right side of the center and negative values show the cursor is on the left side of the center. After a pre-run time, the trials began and RT (Right Target) or LT (Left Target) showed where the target appeared on screen. The subject had a limited time (15s) to hit the targets or the next trial would begin. In this run, the subject hit all the targets and as it is shown in Figure 5, in all 6 trials the subject moved the cursor to the right side (positive values) for RT and left side (negative values) for LT. The subject hit all the targets in all trials although he struggled a little at the start of trials to guide the cursor in correct direction corresponding to the presented target. The achieved cursor position data were fed to Simulink to control the movements of our social robot. As a simple experiment, it was programmed such that the social robot showed right hand movement & changing eye color to green for positive values (related to RT) and left hand movement & changing eyes color to blue for negative values (related to LT). The robot performed continuous movement of right hand movement & changing the eyes color to green (for RT and compatible with right imaginary movement) or left hand movement & changing the eyes color to blue (for LT compatible with left imaginary movement). In similar procedure, we fed the data from Figure 6 to Simulink to control some other gestures of the social robot. Figure 6 illustrates the cursor position controlled by the subject (N2) during vertical trials. The center of the screen was again considered as the reference point (0, 0). Positive values show the controlled cursor is above the center and negative values show the cursor is below the center. After a pre-run time, the trials began and TT (Top Target) or BT (Bottom Target) showed where the target appeared on screen. The subject had a limited time (15s) to hit the targets. In this run, the subject hit all the targets by moving the cursor to the top side (positive values) for TT and bottom side (negative values) for BT. But, as it is shown in Figure 6, there are more fluctuations in controlling the cursor to the correct direction compared to horizontal control task in Figure 5. For example, for the first and third trials in Figure 6, the subject guided the cursor to the wrong direction and after some seconds, the subject learned to mentally control it to move in the correct targeted direction. As it is presented in Table 1, controlling the vertical direction (compared to horizontal direction) was more challenging for the subjects. The achieved cursor position data for vertical direction, were fed to Simulink for the movement control of social robot. Here, it was programmed such that the social robot performed two-hands movement & changing eye color to mixture of green & blue for positive values (related to TT) and head shaking & changing eye color to red for negative values (related to BT). The robot executed continuous movement of both hands & changing eye color to mixture of green & blue (for TT and compatible with top imaginary movement) or head shaking & changing eyes color to red (for BT compatible with bottom imaginary movement). Fig. 5: Recorded values of mind-controlled cursor position during one run (6 trials) of cursor control in horizontal direction by a subject (N2). RT: Right Target appeared. LT: Left Target appeared. Fig. 6: Recorded values of mind-controlled cursor position during one run (6 trials) of cursor control in vertical direction by a subject (N2). TT: Top Target appeared. BT: Bottom Target appeared. Online control After offline tests, a subject randomly picked from the previously-trained subjects performed online tests and controlled the gestures of robot and eye color in real-time interaction with BMI platform and simultaneously received the corresponding 5 neurofeedback from the robot. As shown in Figure 2, the controlled signals were sent to Simulink through UDP protocol and Simulink controlled the robot based on desired commands. Here, for online testing, we switched to employ another kinematic parameter (velocity) to control the robot in real time. In other words, the mentally- controlled cursor velocities were sent to Simulink and were analyzed to control the robot’s movements based on the controlled cursor direction response to the presented target. If the cursor direction were in the correct direction (to the direction of presented target), the predefined movement was activated. Otherwise, no movement occurred. Figure 7 shows the results of online performance of the subject during horizontal direction control of cursor (1D) and simultaneous control of the robot movements in real time. It illustrates the results of 10 trials of showing targets on right and left sides of screen. The targets were presented to the subject in random manner and the subject could control the social robot by performing right imaginary movement and left imaginary movement. It was programmed such that right imaginary movement and left imaginary movement were mapped to right hand movement & green eyes and left hand movement & blue eyes for the robot, respectively. Figure 7 shows that the subject could activate the robot movements corresponding to the cursor control task. In some trials, for example, the first and second trials, the subject achieved hitting the target in less time (thinner bar width) compared to the other trials. Also, in some trials there are discontinuities in the bar plots as the result of guiding the cursor in wrong directions by the subject. In a similar way, the vertical control of cursor task (1D) was mapped to control two hands (right & left) movement and head shaking of the robot. Figure 8 shows the results of real-time performance of the subject during vertical direction control of cursor and simultaneously control the robot movements in online mode. Similarly, it illustrates the results of 10 trials of showing targets on top and bottom portions of the screen. The targets were presented to the subject in random manner. By performing top imaginary movement and bottom imaginary movement, the robot was controlled by the subject. It was programmed so that top imaginary movement and bottom imaginary movement were mapped to two-hands movement & mixture of green and blue colors for eyes and head shaking & red eyes for the robot, respectively. As shown in Figure 8, the subject hit the targets on top and bottom and simultaneously activated the corresponding movements in the social robot. As it was discussed based on Table 1, the subject found it harder to control the vertical direction of cursor, particularly for the bottom targets. Figure 8 confirms that the movements are more in activation status compared to horizontal task since it took more time to hit the targets. As it can be seen in most of these trials, the duration of movements (bar width) are longer than those trials seen in Figure 7 and also the similar discontinuities in activation are caused by guiding the cursor in wrong direction. Fig. 7: Real-time mind control of robot (right hand movement & green eyes/left hand movement & blue eyes) based on cursor control task performance in horizontal direction during 10 trials for the trained subject. It was programmed such that mental control of the right target control caused right hand movement & green eyes for the robot and left target control caused left hand movement and blue eyes for the robot, which served as simultaneous neurofeedback to the human subject. Fig. 8: Real-time mental control of robot (two-hand movement & mixture of green and blue colors for eyes / head shaking & red eyes) based on cursor-controlled task performance in vertical directions during 10 trials for the trained subject. The robot movement was programmed to respond to mind-intended directions, i.e., the top target control led to two-hand movement and mixture of green and blue eyes colors; bottom target control led to head shaking & red eyes. The robot’s movements and eye-color changes served as simultaneous neurofeedback to human subject. To make the task more complicated and involved with more neurofeedback from the social robot, the decoder was activated to control the cursor in all areas of the screen by the subject’s mind. The subject was asked to control the cursor in 2D space by the same imaginary movements defined for horizontal and vertical tasks and hit the targets which randomly appeared on right, left, top and bottom sides of screen. Meanwhile, it was programmed such that if the subject guided the cursor in correct 6 direction toward the shown target, the robot would show the predefined gesture for that specific target. Figure 9 illustrates the results of cursor task control and activation of four different gestures and eyes colors for the robot as they were defined and explained in horizontal and vertical control tasks in Figures 7 and 8. This task was more challenging for the subject as it is shown in Figure 9. For example, it was hard for the subject to guide the cursor toward the bottom targets and the movement time is longer for this target in comparison to other movement time for the other targets. Also, due to directional errors in the guidance of the cursor by the subject in some inter-trial times, discontinuities were seen in the activation of robot movements. Fig. 9: Real-time mind control of robot (right hand movement & green eyes/left hand movement & blue eyes/two hands movement & mixture of green and blue colors for eyes / head shaking & red eyes) based on cursor control task performance in horizontal and vertical directions during 12 trials for the trained subject. The generated neurofeedback movements for specific target is similar to those movements defined in Figures 7 and 8. The robot’s movements and eye-color changes served as simultaneous neurofeedback to human subject. The right target control would activate the right hand movement & green eyes; the left target control would activate the left hand movement & blue eyes; the top target control lead to both-hand movement & mixture of green and blue colors for eyes; and the bottom target control activated head shaking & red eyes. Discussion and conclusions The current study explored a new neuro-based BCI robotic platform using a personalized social robot to give neurofeedback during brain training. Recently, fMRI-based neurofeedback systems have been investigated for cognitive rehabilitation [60]. EEG signals have much higher temporal resolution compared to fMRI methods that are also expensive with poor portability. In contrast, real-time EEG-based neurofeedback systems are much more cost effective and highly portable [61]. In early neurofeedback systems, the human subjects directly interacted with a computer and a screen to receive real-time sensory neurofeedback corresponding to their performances. The advance in the human-robot interaction field in the past decade has shown great promise in rehabilitation programs for patients with brain disorders. In contrast to traditional computer-based feedback system, the interaction with a social robot can provide a more interactive type of communication which encourages active user participation more effectively in cognitive rehabilitation. Several BMI robotic platforms have been developed for patients with motor disorders for restoring cortical plasticity underlying different movements of human body. Here, as a pilot study, we demonstrate a novel neurofeedback-based BCI platform as a testbed for cognitive training in patients with cognitive deficits. A real-time and EEG-based BMI system was integrated with a social robot to provide neurofeedback to the subject. For initial testing of platform, a new EEG paradigm based on continuous decoding of imagined body kinematics was used. First, the subjects were instructed through a brief training protocol to control a computer cursor on a monitor. Then, the trained subjects were allowed to interact with a BMI platform to control the different gestures and eyes color of a social robot and received neurofeedback from the robot. The online results verified the good performance of the subject in controlling and receiving neurofeedback from the robot’s movements and eye color changes; it also confirmed that control with vertical imaginary movements was less accurate just as it was shown during the cursor control task. The work here serves as a feasibility study for the application of the platform for possible development and testing with cognitive algorithms of patients [24, 62-64]. As the next step, we will integrate the current platform with neurofeedback during actual cognitive tasks to improve effectiveness of brain training in patients having cognitive disorders. Acknowledgements This work was in part supported by a NeuroNET seed grant to XZ; and in part by the NIH under grants NIH P30 AG028383 to the UK Sanders-Brown Center on Aging, and NIH NCRR UL1TR000117 to the UK Center for Clinical and Translational Science. The authors are grateful for useful discussions of Dr. Nancy Munro. REFERENCES 1. 2. 7 Nicolas-Alonso, L.F. and J. Gomez-Gil, Brain computer interfaces, a review. Sensors, 2012. 12(2): p. 1211-1279. Moran, D.W. and A.B. Schwartz, Motor cortical representation of speed and direction during reaching. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Journal of Neurophysiology, 1999. 82(5): p. 26762692. Schwartz, A.B., et al., Brain-controlled interfaces: movement restoration with neural prosthetics. Neuron, 2006. 52(1): p. 205-220. Wessberg, J., et al., Real-time prediction of hand trajectory by ensembles of cortical neurons in primates. Nature, 2000. 408(6810): p. 361-365. Serruya, M.D., et al., Brain-machine interface: Instant neural control of a movement signal. Nature, 2002. 416(6877): p. 141-142. Taylor, D.M., S.I.H. Tillery, and A.B. Schwartz, Direct cortical control of 3D neuroprosthetic devices. Science, 2002. 296(5574): p. 1829-1832. Mulliken, G.H., S. Musallam, and R.A. Andersen, Decoding trajectories from posterior parietal cortex ensembles. the Journal of Neuroscience, 2008. 28(48): p. 12913-12926. Hauschild, M., et al., Cognitive signals for brain– machine interfaces in posterior parietal cortex include continuous 3D trajectory commands. Proceedings of the National Academy of Sciences, 2012. 109(42): p. 17075-17080. Velliste, M., et al., Cortical control of a prosthetic arm for self-feeding. Nature, 2008. 453(7198): p. 10981101. Hochberg, L.R., et al., Neuronal ensemble control of prosthetic devices by a human with tetraplegia. Nature, 2006. 442(7099): p. 164-171. Kim, S.-P., et al., Neural control of computer cursor velocity by decoding motor cortical spiking activity in humans with tetraplegia. Journal of neural engineering, 2008. 5(4): p. 455. Collinger, J.L., et al., High-performance neuroprosthetic control by an individual with tetraplegia. The Lancet, 2013. 381(9866): p. 557-564. McMullen, D.P., et al., Demonstration of a SemiAutonomous Hybrid Brain–Machine Interface Using Human Intracranial EEG, Eye Tracking, and Computer Vision to Control a Robotic Upper Limb Prosthetic. Neural Systems and Rehabilitation Engineering, IEEE Transactions on, 2014. 22(4): p. 784-796. Hochberg, L.R., et al., Reach and grasp by people with tetraplegia using a neurally controlled robotic arm. Nature, 2012. 485(7398): p. 372-375. Vogel, J., et al., An assistive decision-and-control architecture for force-sensitive hand–arm systems driven by human–machine interfaces. The International Journal of Robotics Research, 2015. 34(6): p. 763-780. Kiguchi, K. and Y. Hayashi. Motion Estimation Based on EMG and EEG Signals to Control Wearable Robots. in Systems, Man, and Cybernetics (SMC), 2013 IEEE International Conference on. 2013. IEEE. Luth, T., et al. Low level control in a semi-autonomous rehabilitation robotic system via a brain-computer interface. in Rehabilitation Robotics, 2007. ICORR 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 8 2007. IEEE 10th International Conference on. 2007. IEEE. Contreras-Vidal, J.L. and R.G. Grossman. NeuroRex: A clinical neural interface roadmap for EEG-based brain machine interfaces to a lower body robotic exoskeleton. in Engineering in Medicine and Biology Society (EMBC), 2013 35th Annual International Conference of the IEEE. 2013. IEEE. Frisoli, A., et al., A New Gaze-BCI-Driven Control of an Upper Limb Exoskeleton for Rehabilitation in RealWorld Tasks. Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE Transactions on, 2012. 42(6): p. 1169-1179. Blank, A., et al. A pre-clinical framework for neural control of a therapeutic upper-limb exoskeleton. in Neural Engineering (NER), 2013 6th International IEEE/EMBS Conference on. 2013. Agashe, H.A., et al., Global cortical activity predicts shape of hand during grasping. Frontiers in neuroscience, 2015. 9. Agashe, H. and J.L. Contreras-Vidal. Observationbased training for neuroprosthetic control of grasping by amputees. in Engineering in Medicine and Biology Society (EMBC), 2014 36th Annual International Conference of the IEEE. 2014. IEEE. Olichney, J.M., et al., Cognitive event-related potentials: biomarkers of synaptic dysfunction across the stages of Alzheimer’s disease. Journal of Alzheimer's disease: JAD, 2011. 26(0 3): p. 215. McBride, J.C., et al., Sugihara causality analysis of scalp EEG for detection of early Alzheimer's disease. NeuroImage: Clinical, 2015. 7: p. 258-265. Morash, V., et al., Classifying EEG signals preceding right hand, left hand, tongue, and right foot movements and motor imageries. Clinical neurophysiology, 2008. 119(11): p. 2570-2578. Wolpaw, J.R., et al., An EEG-based brain-computer interface for cursor control. Electroencephalography and Clinical Neurophysiology, 1991. 78(3): p. 252-259. Wolpaw, J.R. and D.J. McFarland, Control of a twodimensional movement signal by a noninvasive braincomputer interface in humans. Proceedings of the National Academy of Sciences of the United States of America, 2004. 101(51): p. 17849-17854. Xia, B., et al., A combination strategy based brain– computer interface for two-dimensional movement control. Journal of neural engineering, 2015. 12(4): p. 046021. McFarland, D.J., W.A. Sarnacki, and J.R. Wolpaw, Electroencephalographic (EEG) control of threedimensional movement. J Neural Eng, 2010. 7(3): p. 036007. Royer, A.S., et al., EEG control of a virtual helicopter in 3-dimensional space using intelligent control strategies. Neural Systems and Rehabilitation 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. Engineering, IEEE Transactions on, 2010. 18(6): p. 581-589. Doud, A.J., et al., Continuous three-dimensional control of a virtual helicopter using a motor imagery based brain-computer interface. PloS one, 2011. 6(10): p. e26322. LaFleur, K., et al., Quadcopter control in threedimensional space using a noninvasive motor imagerybased brain–computer interface. Journal of neural engineering, 2013. 10(4): p. 046003. Aiqin, S., F. Binghui, and J. Chaochuan. Motor imagery EEG-based online control system for upper artificial limb. in Transportation, Mechanical, and Electrical Engineering (TMEE), 2011 International Conference on. 2011. Baxter, B.S., A. Decker, and B. He. Noninvasive control of a robotic arm in multiple dimensions using scalp electroencephalogram. in Neural Engineering (NER), 2013 6th International IEEE/EMBS Conference on. 2013. IEEE. Li, T., et al., Brain–machine interface control of a manipulator using small-world neural network and shared control strategy. Journal of neuroscience methods, 2014. 224: p. 26-38. Bi, L., X.-A. Fan, and Y. Liu, EEG-based braincontrolled mobile robots: a survey. Human-Machine Systems, IEEE Transactions on, 2013. 43(2): p. 161176. Chakraborti, T., et al. Implementation of EEG based control of remote robotic systems. in Recent Trends in Information Systems (ReTIS), 2011 International Conference on. 2011. IEEE. Bouyarmane, K., et al., Brain-machine interfacing control of whole-body humanoid motion. Frontiers in systems neuroscience, 2014. 8. Bradberry, T.J., R.J. Gentili, and J.L. Contreras-Vidal, Fast attainment of computer cursor control with noninvasively acquired brain signals. Journal of neural engineering, 2011. 8(3): p. 036010. Li, W., C. Jaramillo, and Y. Li. Development of mind control system for humanoid robot through a brain computer interface. in Intelligent System Design and Engineering Application (ISDEA), 2012 Second International Conference on. 2012. IEEE. Bell, C.J., et al., Control of a humanoid robot by a noninvasive brain–computer interface in humans. Journal of neural engineering, 2008. 5(2): p. 214. Bryan, M., et al. An adaptive brain-computer interface for humanoid robot control. in Humanoid Robots (Humanoids), 2011 11th IEEE-RAS International Conference on. 2011. IEEE. Choi, B. and S. Jo, A low-cost EEG system-based hybrid brain-computer interface for humanoid robot navigation and recognition. PloS one, 2013. 8(9): p. e74583. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 9 Li, M., et al. An adaptive P300 model for controlling a humanoid robot with mind. in Robotics and Biomimetics (ROBIO), 2013 IEEE International Conference on. 2013. IEEE. Emotiv. Available from: http://emotiv.com/. Schalk, G., et al., BCI2000: a general-purpose braincomputer interface (BCI) system. Biomedical Engineering, IEEE Transactions on, 2004. 51(6): p. 1034-1043. Hazrati, M.K. and U.G. Hofmann. Avatar navigation in Second Life using brain signals. in Intelligent Signal Processing (WISP), 2013 IEEE 8th International Symposium on. 2013. IEEE. Bradberry, T.J., R.J. Gentili, and J.L. Contreras-Vidal, Decoding three-dimensional hand kinematics from electroencephalographic signals. Conf Proc IEEE Eng Med Biol Soc, 2009. 2009: p. 5010-3. Bradberry, T.J., R.J. Gentili, and J.L. Contreras-Vidal, Reconstructing Three-Dimensional Hand Movements from Noninvasive Electroencephalographic Signals. The Journal of Neuroscience, 2010. 30(9): p. 34323437. Antelis, J.M., et al., On the usage of linear regression models to reconstruct limb kinematics from low frequency EEG signals. PloS one, 2013. 8(4): p. e61976. Ofner, P. and G.R. Muller-Putz, Decoding of velocities and positions of 3D arm movement from EEG. Conf Proc IEEE Eng Med Biol Soc, 2012. 2012: p. 6406-9. Ubeda, A., et al. Linear decoding of 2D hand movements for target selection tasks using a noninvasive BCI system. in Systems Conference (SysCon), 2013 IEEE International. 2013. Lv, J., Y. Li, and Z. Gu, Decoding hand movement velocity from electroencephalogram signals during a drawing task. Biomed Eng Online, 2010. 9: p. 64. Zhang, J., et al., Nonlinear EEG Decoding Based on a Particle Filter Model. BioMed Research International, 2014. 2014. MathWorks. Available from: http://www.mathworks.com/. Schalk, G. and J. Mellinger, A Practical Guide to Brain–Computer Interfacing with BCI2000: GeneralPurpose Software for Brain-Computer Interface Research, Data Acquisition, Stimulus Presentation, and Brain Monitoring. 2010: Springer Science & Business Media. RAPIRO. Available from: http://www.rapiro.com/. Abiri, R., et al. EEG-Based Control of a Unidimensional Computer Cursor Using Imagined Body Kinematics. in BMES 2015 Annual Meeting. 2015. Tampa, Florida. Abiri, R., et al. A Real-Time Brainwave Based NeuroFeedback System for Cognitive Enhancement. in ASME 2015 Dynamic Systems and Control Conference. 2015. American Society of Mechanical Engineers. 60. 61. 62. 63. 64. Scharnowski, F. and N. Weiskopf, Cognitive enhancement through real-time fMRI neurofeedback. Current Opinion in Behavioral Sciences, 2015. 4: p. 122-127. Thibault, R.T., M. Lifshitz, and A. Raz, The selfregulating brain and neurofeedback: Experimental science and clinical promise. Cortex, 2016. 74: p. 247261. McBride, J., et al., Resting EEG discrimination of early stage Alzheimer’s disease from normal aging using inter-channel coherence network graphs. Annals of biomedical engineering, 2013. 41(6): p. 1233-1242. McBride, J., et al., Scalp EEG-based discrimination of cognitive deficits after traumatic brain injury using event-related Tsallis entropy analysis. Biomedical Engineering, IEEE Transactions on, 2013. 60(1): p. 9096. McBride, J.C., et al., Spectral and complexity analysis of scalp EEG characteristics for mild cognitive impairment and early Alzheimer's disease. Computer methods and programs in biomedicine, 2014. 114(2): p. 153-163. 10
3cs.SY
1 The Dirty MIMO Multiple-Access Channel arXiv:1510.08018v4 [cs.IT] 17 Jun 2017 Anatoly Khina, Yuval Kochman, and Uri Erez Abstract—In the scalar dirty multiple-access channel, in addition to Gaussian noise, two additive interference signals are present, each known non-causally to a single transmitter. It was shown by Philosof et al. that for strong interferences, an i.i.d. ensemble of codes does not achieve the capacity region. Rather, a structured-codes approach was presented, that was shown to be optimal in the limit of high signal-to-noise ratios, where the sumcapacity is dictated by the minimal (“bottleneck”) channel gain. In this paper, we consider the multiple-input multiple-output (MIMO) variant of this setting. In order to incorporate structured codes in this case, one can utilize matrix decompositions that transform the channel into effective parallel scalar dirty multipleaccess channels. This approach however suffers from a “bottleneck” effect for each effective scalar channel and therefore the achievable rates strongly depend on the chosen decomposition. It is shown that a recently proposed decomposition, where the diagonals of the effective channel matrices are equal up to a scaling factor, is optimal at high signal-to-noise ratios, under an equal rank assumption. This approach is then extended to any number of transmitters. Finally, an application to physicallayer network coding for the MIMO two-way relay channel is presented. Index Terms—Multiple-access channel, dirty-paper coding, multiple-input multiple-output channel, matrix decomposition, physical-layer network coding, two-way relay channel. Costa [1] showed that the capacity of this channel, when the interference is i.i.d. and Gaussian, is equal to that of an interference-free channel 21 log(1 + P ), i.e., as if s ≡ 0. This result was subsequently extended to ergodic interference in [2] and to arbitrary interference in [3], where to achieve the latter, a structured lattice-based coding scheme was used. This model serves as an information-theoretic basis for the study of interference cancellation techniques, and was applied to different network communication scenarios; see, e.g., [4]. Its multiple-input multiple-output (MIMO) variant as well as its extension to MIMO broadcast with private messages can be easily treated either directly or via scalar dirty-paper coding (DPC) and an adequate orthogonal matrix decomposition, the most prominent being the singular-value decomposition (SVD) and the QR decomposition (QRD); see, e.g., [5]–[9]. Philosof et al. [10] extended the dirty-paper channel to the case of K multiple (distributed) transmitters, each transmitter, corresponding to a different user, knowing a different part of the interference: y= K X (xk + sk ) + z, (2) k=1 I. I NTRODUCTION The dirty-paper channel, first introduced by Costa [1], is given by y = x + s + z, (1) where y is the channel output, x is the channel input subject to an average power constraint P , z is an additive white Gaussian noise (AWGN) of unit power, and s is an interference which is known non-causally to the transmitter but not to the receiver. The material in this paper was presented in part at the 2011 IEEE International Symposium of Information Theory, St. Petersburg, Russia, and at the 2016 IEEE International Symposium of Information Theory, Barcelona, Spain. A. Khina was with the Department of Electrical Engineering-Systems, Tel Aviv University, Tel Aviv 69978, Israel. He is now with the Department of Electrical Engineering, California Institute of Technology, Pasadena, CA 91125, USA (e-mail: [email protected]). Y. Kochman is with the the Rachel and Selim Benin School of Computer Science and Engineering, Hebrew University of Jerusalem, Jerusalem 91904, Israel (e-mail: [email protected]). U. Erez is with the Department of Electrical Engineering-Systems, Tel Aviv University, Tel Aviv 69978, Israel. (e-mail: [email protected]). The work of A. Khina was supported by the Feder Family Award, by the Trotsky Foundation at Tel Aviv University, by the Yitzhak and Chaya Weinstein Research Institute for Signal Processing, and by the Clore Israel Foundation. The work of Y. Kochman was supported by the Israeli Science Foundation (ISF) under grant #956/12, by the German–Israeli Foundation for Scientific Research and Development (GIF), and by the HUJI Cyber Security Research Center in conjunction with the Israel National Cyber Bureau in the Prime Minister’s Office. The work of U. Erez was supported, in part, by the ISF under Grant No. 1956/15. where y and z are as before, xk (k = 1, . . . , K) is the input of transmitter k and is subject to an average power constraint Pk , and sk is an arbitrary interference sequence which is known non-causally to transmitter k but not to the other transmitters nor to the receiver. This scenario is encountered in practice in cases where, for instance, non-cooperative base stations transmit data (over a multiple-access link) to a common receiver as well as to separate distinct receivers, which serve as interferences known at the transmitters for the communication to the common receiver. This scenario is described in Fig. 1 for K = 2 receivers. The capacity region of this scenario, termed the dirty multiple-access channel (DMAC) in [10], was shown to be contained (“outer bound”) in the region of all rate tuples (R1 , . . . , RK ) satisfying K X k=1   1 Rk ≤ log 1 + min Pk , k=1,...,K 2 (3) and to contain (“achievable region”) all rate tuples (R1 , . . . , RK ) satisfying1 K X k=1 Rk ≤   + 1 1 log , + min Pk 2 K k=1,...,K (4) 1 In addition to (4), other inner bounds which are tighter in certain cases are derived in [10]. 2 In the high-SNR limit (where all powers satisfy Pk ≫ 1), the individual capacity of the k-th user is given by:3   N Pk log . 2 N Thus, similarly to the scalar case (5), one can expect the highSNR capacity region to be given by   min Pk K X N k=1,...,K . log  (7) Rk ≤ 2 N k=1 Fig. 1. A wireless dirty-paper channel scenario. The base stations communicate with the common receiver over a multiple-access channel as well as with receiver 1 and receiver 2 that serve as interferences for the communication to the common receiver. where [x]+ , max{0, x}. These two regions coincide in the limit of high signal-to-noise ratios (SNRs) — P1 , . . . , PK ≫ 1 — thus establishing the capacity region in this limit to be equal to the region of all rate tuples (R1 , . . . , RK ) satisfying   K X 1 Rk ≤ log (5) min Pk . k=1,...,K 2 k=1 That is, the sum-capacity suffers from a bottleneck problem and reduces to the minimum of the individual capacities in this limit, where by the individual capacity of user k, we mean the capacity from transmitter k to the receiver where all other transmitters are silent. Interestingly, Costa’s random binning technique does not achieve the rate region (4) or the high-SNR region (5), and structured lattice-based techniques need to be used [10], [11]. The MIMO counterpart of the problem is given by y= K X (Hk xk + sk ) + z. (6) k=1 For simplicity, we assume for now that all vectors are of equal length N .2 We further assume, without loss of generality, that the square channel matrices {Hk } all have unit determinant, since any other value can be absorbed in Pk . The AWGN vector z has i.i.d. unit-variance elements, while the interference vectors {sk } are arbitrary as in the scalar case. The transmitters are subject to average power constraints {Pk }. 2 We shall depart from this assumption later and treat the more general case of full-rank channel matrices where the number of receive antennas is larger or equal to that of the transmit antennas of each of the transmitters. However, in contrast to the single-user setting (1), the extension of the scalar DMAC to the MIMO case is not straightforward. As structure is required even in the scalar case (2), one cannot use a vector random codebook. To overcome this, we suggest to employ Nr parallel scalar schemes, each using the lattice coding technique of [10]. This is in the spirit of the capacity-achieving SVD [12] or QRD [13]– [16] based schemes, that were proposed for MIMO communications (motivated by implementation considerations). The total rate is split between multiple scalar codebooks, each one enjoying a channel gain according to the respective diagonal value of the equivalent channel matrix obtained by the channel decomposition. Unfortunately, for the MIMO DMAC problem, neither the SVD nor the QRD is suitable, i.e., their corresponding achievable rates cannot approach (7). Applying the SVD is not possible in the MIMO DMAC setting as joint diagonalization with the same orthogonal matrix on one side does not exist in general. Applying the QRD to each of the orthogonal matrices, in contrast, is possible as it requires an orthogonal operation only at the transmitter.4 However, the resulting matrices will have non-equal diagonals in general, corresponding to nonequal SNRs. Specifically, denoting the i-th diagonal element of the k-th matrix by dk;i , the resulting high-SNR sum-rate would be limited to    2 P d min N K r k k;i X X1   k=1,...,K (8) log  Rk ≤  2 N r i=1 k=1 in this case. As this represents a per-element bottleneck, the rate is in general much lower than (7). In this work we make use of a recently proposed joint orthogonal triangularization [17] to remedy the problem, i.e., to transform the per-element bottleneck (8) into a global one as in (7). Specifically, the decomposition allows to transform two matrices (with equal determinants) into triangular ones with equal diagonals, using the same orthogonal matrix on the left — corresponding to a common operation carried at the receiver — and different orthogonal matrices on the right — corresponding to different operations applied by each of the transmitters. The equal-diagonals property implies that the minimum in (8) is not active and hence the per-element 3 The optimal covariance matrix in the limit of high SNR is white; see Lemma 1 in the sequel. 4 More precisely, RQ decompositions need to be applied to the channel matrices in this case. 3 bottleneck problem, incurred in the QRD-based scheme, is replaced by the more favorable vector bottleneck (7). The rest of the paper is organized as follows. We start by introducing the channel model in Section II. We then present the ingredients we use: the matrix decomposition is presented in Section III, and a structured coding scheme for the singleuser “dirty” MIMO channel is presented in Section IV. Our main result, the high-SNR capacity of the two-user MIMO DMAC (6) is given in Section V, using a structured scheme. We extend this result to the K-user case in Section VI. We then demonstrate the usefulness of the proposed technique for MIMO physical-layer network coding in Section VII, by constructing a scheme that achieves capacity in the limit of high SNR for the MIMO two-way relay channel. We conclude the paper in Section VIII. II. P ROBLEM S TATEMENT The K-user MIMO DMAC is given by: y= K X (Hk xk + sk ) + z, where y is the channel output vector of length Nr ,5 xk (k = 1, . . . , K) is the input vector of transmitter k of length Nt;k and is subject to an average power constraint Pk defined formally in the sequal, z is an AWGN vector with an identity covariance matrix, and sk is an interference vector of length Nr which is known non-causally to transmitter k but not to the other transmitters nor to the receiver. The interference vector signals {sk } are assumed to be arbitrary sequences. We consider a closed-loop scenario, meaning that the Nr × Nt;k channel matrix Hk is known everywhere and that it satisfies the following properties. Definition 1 (Proper). A matrix H of dimensions Nr × Nt is said to be proper if it has no fewer columns than rows, i.e., Nr ≤ Nt , is full rank (namely of rank Nr ) and satisfies  (10) det HHT = 1. Remark 1. Similarly to the special case of full-rank matrices discussed in the introduction, a full-rank Nr × Nt matrix H with Nr ≤ Nt and det HHT = a 6= 1 may always be normalized to satisfy (10) by absorbing a in the associated power constraint. Transmission is carried out in blocks of length n. The input signal transmitted by transmitter k is given by xnk = fk (wk , snk ) , where we denote by an blocks of a at time instants 1, 2, . . . , n, i.e., an = a[1], . . . , a[n], wk is the conveyed message   by this user which is chosen uniformly from 1, . . . , 2nRk , Rk is its transmission rate, and fk is the encoding function. The input signal xk is subject to an average power constraint n ℓ=1 5 All vectors in this paper are assumed column vectors. (ŵ1 , . . . , ŵK ) = g (y n ) . A rate tuple (R1 , . . . , RK ) is said to be achievable if for any ǫ > 0, however small, there exist n, f and g, such that the error probability is bounded from the above by ǫ: Pr (ŵ1 6= w1 , . . . , ŵK 6= wK ) ≤ ǫ. The capacity region is defined as the closure of all achievable rate tuples. III. BACKGROUND : O RTHOGONAL M ATRIX T RIANGULARIZATION In this section we briefly recall some important matrix decompositions that will be used in the sequel. In Section III-A we recall the generalized triangular decomposition (GTD) and some of its important special cases. Joint orthogonal triangularizations of two matrices are discussed in Section III-B. (9) k=1 1X 2 xk [ℓ] ≤ Pk . n The receiver reconstructs the messages ŵ1 , . . . ŵK from the channel output, using a decoding function g: A. Single Matrix Triangularization Let A be a proper matrix (recall Definition 1) of dimensions M × N . A generalized triangular decomposition (GTD) of A is given by: A = UTVT , (11) where U and V are orthogonal matrices of dimensions M × M and N × N , respectively, and T is a generalized lower-triangular matrix: Ti,j = 0 , ∀i < j . Namely, it has the following structure: N  z T1,1      T2,1  T=M  .   ..    TM,1 0 T2,2 .. . 0 0 .. . TM,2 ··· }| ··· ··· TM,M 0 ··· 0 ··· .. . . . . 0 ··· 0 0 .. . 0 {   .  The diagonal entries of T always have a unit product.6 Necessary and sufficient conditions for the existence of a GTD for a prescribed diagonal {Ti,i } are known, along with explicit constructions of such a decomposition [18]–[22]. The following three important special cases of the GTD are well known; all of them are guaranteed to exist for a proper matrix A.7 1) SVD (see, e.g., [24]): Here, the resulting matrix T in (11) is a diagonal matrix, and its diagonal elements are equal to the singular values of the decomposed matrix A. 2) QR Decomposition (see, e.g., [24]): In this decomposition, the matrix V in (11) equals the identity matrix and hence does not depend on the matrix A. This decomposition can be constructed by performing Gram–Schmidt orthonormalization on the (ordered) columns of the matrix A. 6 Since A is a proper matrix it is full rank by definition; thus, all the diagonal values of T, {Ti,i }, are non-zero. 7 See [23] for a geometrical interpretation of these decompositions. 4 3) GMD (see [22], [25], [26]): The diagonal elements of T in this decomposition are all equal to the geometric mean of its singular values σ(A), which is real and positive. B. Joint Matrix Triangularization Let A1 and A2 be two proper matrices of dimensions M1 × N and M2 × N , respectively. A joint triangularization of these two matrices is given by: A1 = U1 T1 VT , T A2 = U2 T2 V , (12a) (12b) where U1 , U2 and V are orthogonal matrices of dimensions M1 × M1 , M2 × M2 and N × N , respectively, and T1 and T2 are generalized lower-triangular matrices of dimensions M1 × N and M2 × N , respectively. It turns out that the existence of such a decomposition depends on the diagonal ratios {T1;ii /T2;ii }. Necessary and sufficient conditions were given in [17]. Specifically, it was shown that there always exists a decomposition with unit ratios, i.e., T1;ii = T2;ii , i = 1, . . . , N . Such a decomposition is coined the joint equi-diagonal triangularization (JET).8 Technically, the existence of JET is an extension of the existence of the (single-matrix) GMD. Unfortunately, JET of more than two matrices is in general not possible [23]. Nonetheless, in Section VI we present a way to overcome this obstacle. The Costa-style scheme for the MIMO dirty-paper channel suffers from two major drawbacks. First, it requires vector codebooks of dimension Nt , which depend on the specific channel H. And second, it does not admit an arbitrary interference. Both can be resolved by using the orthogonal matrix decompositions of Section III to reduce the coding task to that of coding for the scalar dirty-paper channel (1). For each scalar channel, the interference consists of two parts: a linear combination of the elements of the “physical interference” s and a linear combination of the off-diagonal elements of the triangular matrix which also serves as “self interference”. When using the lattice-based scheme of [3], the capacity (14) is achieved even for an arbitrary interference sequence s. Scheme (Single-user zero-forcing MIMO DPC). Offline: • Apply any orthogonal matrix triangularization (11) to the channel matrix H, to obtain the orthogonal matrices U and V, of dimensions Nr and Nt , respectively, and the Nr × Nt generalized lower-triangular matrix T. • Denote the vector of the diagonal entries of T by d , diag (T). • Construct Nr good unit-power scalar dirty-paper codes  with respect to SNRs d2i P/Nr . Transmitter: At each time instant: • Generates {x̃i } in a successive manner from first (i = 1) to last (i = Nr ), where x̃i is the corresponding entry of the codeword of sub-channel i, the interference over this sub-channel is equal to i−1 X IV. BACKGROUND : S INGLE -U SER MIMO D IRTY-PAPER C HANNEL In this section we review the (single-user) MIMO dirtypaper channel, corresponding to setting K = 1 in (9): y = Hx + s + z. (13) We suppress the user index of x, s, H and Nt in this case. For an i.i.d. Gaussian interference vector, a straightforward extension of Costa’s random binning scheme achieves the capacity of this channel, 1 log INr + HKHT , (14) C (H, P ) , max K: trace(K)≤P 2 which is, as in the scalar case, equal to the interference-free capacity. In the high-SNR limit, we have the following. Lemma 1 (See, e.g., [27]). The capacity of the single-user MIMO dirty-paper channel (13) satisfies lim [C − RHSNR ] = 0, P →∞ where Nr P . (15) log 2 Nr Furthermore, this rate can be achieved by the input covariance matrix P IN . K= Nt t RHSNR , 8 See [23] for a geometrical interpretation of the JET. ℓ=1 • • Ti,ℓ x̃ℓ + Nr X Vi,ℓ sℓ , ℓ=1 and Ti,ℓ and Vi,ℓ denote the (i, ℓ) entries of T and V, respectively. Forms x̃ with its first Nr entries being {x̃i } followed by (Nt − Nr ) zeros. Transmits x which is formed by multiplying x̃ by V: x = Vx̃. Receiver: T • At each time instant forms ỹ = U y. • Decodes the codebooks using dirty-paper decoders, where x̃i is decoded from ỹi . As is well known, the zero-forcing (ZF) DPC scheme approaches capacity for proper channel matrices in the limit of high SNR. This is formally stated as a corollary of Lemma 1. Corollary 1. For any proper channel matrix H, the ZF MIMO DPC scheme achieves RHSNR (15). Thus, it approaches the capacity of the MIMO dirty-paper channel (13) in the limit P → ∞. Proof. The ZF MIMO DPC scheme achieves a rate of   Nr X P 2 1 d log 1 + RZF = 2 Nr i i=1   Nr X 1 P 2 ≥ di log 2 Nr i=1 5 !   Nr Y 1 1 P 2 = Nr · log di + log 2 Nr 2 i=1   P Nr , log = 2 Nr • Generates {x̃k;i } in a successive manner from first (i = 1) to last (i = Nr ), where x̃k;i is the corresponding entry of the codeword of user k over sub-channel i, the interference over this sub-channel is equal to i−1 X where the last equality follows from (10). Remark 2. A minimum mean square error (MMSE) variant of the scheme achieves capacity for any SNR and any channel matrix (not necessarily proper); see, e.g., [9]. Unfortunately, extending the MMSE variant of the scheme to the DMAC setting is not straightforward, and therefore we shall concentrate on the ZF variant of the scheme. ℓ=1 • • Proposition 1 (Two-user sum-capacity outer bound). The sumcapacity of the two-user MIMO DMAC (9) is bounded from above by the minimum of the individual capacities: max Kk : trace(Kk )≤Pk Vk;i,ℓ sk;ℓ , ℓ=1 xk = Vk x̃k . In this section we derive outer and inner bounds on the capacity region of the two-user MIMO DMAC (9). We show that the two coincide for proper channel matrices in the limit of high SNRs. The following is a straightforward adaptation of the outer bound of [10] for the scalar case (3) to the two-user MIMO setting (9). It is formally proved in the Appendix. 1 log min k=1,2 2 Nr X Tk;i,ℓ and Vk;i,ℓ are the (i, ℓ) entries of Tk and VK , respectively, and sk;ℓ is the ℓ-th entry of sk . Forms x̃k with its first Nr entries being {x̃k;i } followed by (Nt;k − Nr ) zeros. Transmits xk which is formed by multiplying x̃ by Vk : V. T WO -U SER MIMO DMAC R1 + R2 ≤ Tk;i,ℓ x̃k;ℓ + I + H k Kk H T k . (16) We next introduce an inner bound that approaches the upper bound (16) in the limit of high SNRs. Theorem 1. For the two-user MIMO DMAC (9) with any proper channel matrices H1 and H2 , the region of all nonnegative rate pairs (R1 , R2 ) satisfying   + Nr min{P1 , P2 } R1 + R2 ≤ log (17) 2 Nr is achievable. We give a constructive proof, employing a scheme that uses the JET of Section III-B to translate the two-user MIMO DMAC (9) into parallel SISO DMACs with equal channel gains (corresponding to equal diagonals). As explained in the introduction, this specific choice of decomposition is essential. Scheme (Two-user MIMO DMAC). Offline: • Apply the JET of Section III-B to the channel matrices H1 and H2 , to obtain the orthogonal matrices U, V1 , and V2 , of dimensions Nr , Nt;1 and Nt;2 , respectively, and the generalized lower-triangular matrices T1 and T2 of dimensions Nr × Nt;1 and Nr × Nt;2 , respectively. • Denote the Nr diagonal elements of T1 and T2 by {di } (which are equal for both matrices). • Construct Nr good unit-power scalar DMAC codes with respect to SNR pairs {(d2i P1 /Nr , d2i P2 /Nr )}. Transmitter k (k = 1, 2): At each time instant: Receiver: • At each time instant, forms ỹ according to: ỹ = ŨT y. • Decodes the codebooks using the decoders of the scalar DMAC codes, where x̃1,i and x̃2;i are decoded from ỹi . We use this scheme for the proof of the theorem. Proof of Theorem 1. The proposed scheme achieves any rate pair (R1 , R2 ) N whose sum-rate is bounded from below by r X R1 + R2 = (r1;i + r2;i ) (18a) i=1 Nr X   + 1 1 2 min{P1 , P2 } log + di · (18b) ≥ 2 2 Nr i=1   Nr X min{P1 , P2 } 1 (18c) log d2i · ≥ 2 Nr i=1   Nr Nr X X 1 1 min{P1 , P2 } 2 (18d) log di + log = 2 2 Nr i=1 i=1   Nr min{P1 , P2 } = , (18e) log 2 Nr where rk;i is the achievable rate of transmitter k (k = 1, 2) over sub-channel i (i = 1, . . . , Nr ), (18b) follows from (4), and (18e) holds true due to (10). By comparing Proposition 1 with Theorem 1 in the limit of high SNR, (recall Lemma 1), the following corollary follows. Corollary 2. The capacity region of the two-user MIMO DMAC (9) with any proper channel matrices H1 and H2 is given by CHSNR + o(1), where CHSNR is given by all rate pairs satisfying:   Nr min{P1 , P2 } R1 + R2 ≤ log 2 Nr and o(1) vanishes as min{P1 , P2 } → ∞. Remark 3. At any finite SNR, the scheme can achieve rates outside CHSNR . Specifically, the inequality (18c) is strict, unless the achievable sum-rate is zero. However, in that case the calculation depends upon the exact diagonal values {di }; we do not pursue this direction. 6 VI. K -U SER MIMO DMAC In this section we extend the results obtained in Section V to MIMO DMACs with K > 2 users. The outer bound is a straightforward extension of the twouser case of Proposition 1. Proposition 2 (K-user sum-capacity outer bound). The sumcapacity of the K-user MIMO DMAC (9) is bounded from the above by the minimum of the individual capacities: K X k=1 Rk ≤ 1 log min k=1,...,K 2 max Kk : trace(Kk )≤Pk I + H k Kk H T k . For an inner bound, we would have liked to use a JET of K > 2 matrices. As such a decomposition does not exist in general, we present a “workaround”, following [23]. We process jointly N channel uses and consider them as one time-extended channel use. The corresponding time-extended channel is ”y = K X (Hk ”xk + ¯sk ) + ˚z , where ”y, ”xk , ¯sk , ˚z are the time-extended vectors composed of N “physical” (concatenated) output, input, interference and noise vectors, respectively. The corresponding time-extended matrix Hk is a block-diagonal matrix whose N blocks are all equal to Hk : (19) where ⊗ denotes the Kronecker product operation (see, e.g., [28, Ch. 4]). As the following result shows, for such blockdiagonal matrices we can achieve equal diagonals, up to edge effects that can be made arbitrarily small by utilizing a sufficient number of time extensions N . Theorem 2 (K-JET with edge effects [23]). Let H1 , . . . , HK be K proper matrices of dimensions Nr × Nt;1 , . . . , Nr × Nt;K , respectively, and construct their time-extended matrices with N blocks, H1 , . . . , HK , respectively, according to (19). Denote Ñ = N − NrK−2 + 1. (20) Then, there exist matrices U, V1 , . . . , VK with orthonormal columns of dimensions Nr N × Nr Ñ , Nt;1 N × Nr Ñ , . . . , Nt;K N × Nr Ñ , respectively, such that Tk = UT Hk Vk , k = 1, . . . , K , where T1 , . . . , TK are lower-triangular matrices of dimensions Nr Ñ × Nr Ñ with equal diagonals of unit product. The value of Ñ in (20) stems from a matrix truncation operation where we omit rows for which triangularization is not guaranteed; see, e.g., [23, Section VII-B] for an example of the case K = 3, Nr = Nt;1 = Nt;2 = Nt;3 = 2 and general N. Since the ratio between Ñ and N approaches 1 when N goes to infinity: lim N →∞ Ñ = 1, N Theorem 3. For the K-user MIMO DMAC (9), the region of all non-negative rate tuples (R1 , . . . , RK ) satisfying " !#+ K min Pk X Nr k log Rk ≤ 2 Nr k=1 is achievable. Proof. Fix some large enough N . Construct the channel matrices H1 , . . . , HK as in (19), and set U, V1 , . . . , VK and T1 , . . . , TK according to Theorem 2. Now, over nN consecutive channel uses, apply the natural extension of the scheme of Section V to K users, replacing {Uk }, V, {Tk } with the obtained matrices. As in the proof of Theorem 1, we can attain any rate approaching K X Rk ≤ k=1 k=1 Hk = IN ⊗ Hk , the loss in rate due to the disparity between them goes to zero. This is stated formally in the following theorem. (21) min Pk Nr Ñ k=1,...,K . log 2 Nr As we used the channel nN times, we need to divide these rates by N ; by (21) the proof is complete. By comparing Proposition 2 with Theorem 3 in the limit of high SNR, we can extend Corollary 2 as follows. Corollary 3. The capacity region of the K-user MIMO DMAC (9) with any proper channel matrices H1 , . . . , HK is given by CHSNR + o(1), where CHSNR is given by all rate pairs satisfying:   min Pk K X Nr k=1,...,K  log  Rk ≤ 2 Nr k=1 and o(1) vanishes as min k=1,...,K PK → ∞. Remark 4. To approach the rate of Theorem 3 for K > 2 users, the number of time extensions N needs to be taken to infinity, in general. Using a finite number of time extensions entails a loss in performance, which decays when this number is increased. On the other hand, a large number of time extensions requires using a longer block, or alternatively, if the blocklength is limited, this corresponds to shortening the effective blocklength of the scalar codes used, which in turn translates to a loss in performance. Hence in practice, striking a balance between these two losses is required, by selecting an appropriate number of time extensions N . For further discussion and details, see [23]. VII. A PPLICATION TO THE MIMO T WO -WAY R ELAY C HANNEL In this section we apply the MIMO DMAC scheme of Section V to the MIMO two-way relay channel (TWRC). For Gaussian scalar channels, the similarity between these two settings was previously observed; see, e.g., [4]. As in the scalar DMAC setting (2), structured schemes based on lattice coding are known to be optimal in the limit of high SNR for the scalar TWRC [29], [30]. This suggests 7 in turn that, like in the MIMO DMAC setting, using the JET in conjunction with scalar lattice codes can achieve a similar result in the MIMO TWRC setting. We start by introducing the MIMO TWRC model. A. Channel Model H1 H2 Relay Terminal 1 The TWRC consists of two terminals and a relay. We define the channel model as follows. Transmission takes place in two phases, each one, without loss of generality, consisting of n channel uses. At each time instant i in the first phase, terminal k (k = 1, 2) transmits a signal xk;i and the relay receives yi according to some memoryless multiple-access channel (MAC) WMAC (y|x1 , x2 ). At each time instant i in the second phase, the relay transmits a signal xi and terminal k (k = 1, 2) receives yk;i according to some memoryless broadcast (BC) channel WBC (y1 , y2 |x). Before transmission begins, terminal k possesses an independent message of rate Rk , unknown to the other nodes; at the end of the two transmission phases, each terminal should be able to decode, with arbitrarily low error probability, the message of the other terminal. The closure of all achievable rate pairs (R1 , R2 ) is the capacity region of the network. In the Gaussian MIMO setting, terminal k (k = 1, 2) has Nt;k transmit antennas and the relay has Nr receive antennas, during the MAC phase (see also Fig. 2a): y = H1 x1 + H2 x2 + z, where the channel matrices Hk and the vectors z are defined as in (9). We assume that the channel matrices are proper.9 We denote by Kk (k = 1, 2) the input covariance matrix used by terminal k during transmission. We shall concentrate on the symmetric setting: R1 = R2 , R, P1 = P2 , P. The exact nature of the BC channel is not material in the context of this work. We characterize it by its commonmessage capacity Ccommon . Before treating the MIMO setting, we start by reviewing the structured physical network coding (PNC) approach for the scalar setting, in which H1 and H2 are replaced with scalar channel gains h1 and h2 . Terminal 2 (a) The MIMO MAC phase. G1 G2 Relay Terminal 1 Terminal 2 (b) The BC phase for the special case where it is a MIMO BC channel. Fig. 2. The MIMO two-way relay channel. The second (BC) phase may be different in general. In the (structured) PNC approach [29], both terminals transmit codewords generated from the same lattice code. Due to the linearity property of the lattice code, the sum of the two codewords is a valid lattice codeword. This sum is decoded at the relay and sent to the terminals. Each terminal then recovers the sum codeword and subtracts from it its own lattice codeword, to obtain the codeword transmitted by the other terminal. The rate achievable using this scheme is given by [29], [30]: ) (  + 1 1 RPNC = min log +P , Ccommon . (24) 2 2 As is shown in [30], the PNC rate (24) is within half a bit from the cut-set bound (23) and approaches the cut-set bound in the limit of high SNR. We next extend the asymptotic optimality of the PNC scheme to the MIMO setting. We note that, in the scalar case, other strategies can also be used rather than PNC, yielding better performance at different parameter regimes. We address these strategies in Section VII-D along with their extension to the MIMO setting. C. PNC for the Gaussian MIMO TWRC B. PNC for the Scalar Gaussian TWRC The cut-set bound, in this case, is given by In the scalar case, (10) reduces to h1 = h2 = 1. In this case, the min-cut max-flow theorem [32], [33] reduces to the minimum between the individual capacities over the MAC link and the common-message capacity of the BC link (see, e.g., [30, Section III], [34, Section II-A]):   1 (23) log (1 + P ) , Ccommon . RCS = min 2 9 For a treatment of the case of non-proper channel matrices, see [31]. RCS = min {C1 , C2 , Ccommon } , where Ck , max Kk 1 log I + Hk Kk HT k , 2 k = 1, 2 , are the individual capacities of the MIMO links, and the maximization is carried over all Kk subject to the input power constraint P . The PNC approach can be extended to work for the MIMO case by applying the JET of Section III-A to the channel matrices H1 and H2 . The off-diagonal elements of the resulting 8 triangular matrices are treated as interferences known at the transmitters. Specifically, the following rate is achievable:10 R = min  Nr log 2  P Nr   , Ccommon . (25) To see this, use the scheme for MIMO DMAC of Section V with the DMAC codes replaced with PNC ones: over each sub-channel, each of the users transmits a codeword from the (same) lattice, and the relay (who takes the role of the receiver in the scheme for the MIMO DMAC) recovers the sum codeword (modulo the coarse lattice) as in scalar PNC and continues as in the standard scalar PNC scheme. The achievable symmetric-rate is equal to the sum-rate achievable by the MIMO DMAC scheme (17), which is equal, in turn, to (25). The achievability of (25) implies that when the channel is “MAC-limited” (the bottleneck being the first phase), the capacity in the high SNR regime is achieved by applying the JET to the channel matrices and using PNC over the resulting scalar channels. Remark 5 (MIMO BC phase). The only assumption we used regarding the BC section is that it has a common-message capacity Ccommon . However, it seems likely that the links to the terminal will be wireless MIMO ones as well. In that case, depicted also in Fig. 2b, the complexity may be considerably reduced by using a scheme that is based upon the JET, for that section as well; see [17]. D. Extensions and Comparisons A different approach to the MIMO TWRC was proposed by Yang et al. [35]. In this approach, parallel scalar TWRCs are obtained via a joint matrix decomposition, but instead of the JET, the generalized singular value decomposition (GSVD) [24], [36] is used, which may be seen as a different choice of joint matrix triangularization (12); also, rather than DPC, successive interference cancellation (SIC) is used. We next compare the approaches, followed by a numerical example; the reader is referred to [34] for further details. 1) High-SNR optimality. In the symmetric case (22), both approaches achieve the high-SNR optimal rate (25). 2) Finite-SNR improvements. At finite SNR, one can easily improve upon (25) to get a slightly better rate, see Remark 3. As we show in [34, Thm. 1] using the technique of [37], the finite-SNR rate of the GSVD-based scheme can also be slightly improved.11 Analytically comparing the finite-SNR performance of the schemes after the improvement is difficult, although numerical evidence suggests that the JET-based scheme has better finite-SNR performance in many cases (e.g., Example 1). 3) Use of any strategy. For the scalar case, we note the following approaches, as an alternative to physical PNC. In the decode-and-forward (DF) approach, the relay 10 Indeed, the same was proven using a different approach [35], see Section VII-D in the sequel for a comparison. 11 [38] also introduces an improvement to the GSVD-based scheme for certain special cases, but it is subsumed by the improvement in [34]. decodes both messages with sum-rate 2R. Instead of forwarding both messages, it can use a network-coding approach [39] and sum them bitwise modulo-2 (“XOR them”). Then, each terminal can XOR out its own message to obtain the desired one. In the compress-and-forward (CF) approach, the noisy sum of the signals transmitted by the sources is quantized at the relay, using remote Wyner–Ziv coding [40], with each terminal using its transmitted signal as decoder side-information. The CF and DF strategies both have an advantage over physical PNC for some parameters. Further, [41] presents various layered combinations of the CF and DF approaches, which yield some improvement over the two. Constructing an optimized scheme via time-sharing between these approaches is pursued in [34]. Turning our attention to the MIMO setting, since the JET approach uses DPC, any strategy can be used over the subchannels; the decoder for each subchannel will receive an input signal as if this were the only channel. In contrast, the GSVD approach uses SIC, where the task of canceling inter-channel interference is left to the relay. In order to cancel out interference, the relay thus needs to decode; this prohibits the use of CF. 4) Asymmetric case. The GSVD-based approach is suitable for any ratio of rates and powers between the users, and in fact it is optimal in the high-SNR limit for any such ratio. Since the JET-based PNC scheme uses the MIMO DMAC scheme of Section V for transmission during the MAC phase, it is limited by the minimum of the powers of the two terminals and cannot leverage excess power in case the transmit powers are different.12 To take advantage of the excess power in case of unequal transmit powers for this scheme, one can superimpose a DF strategy for the stronger user on top of the symmetric JET-based PNC scheme, as was proposed in [43]. Example 1. Consider a Gaussian MIMO TWRC with a MAC phase comprising two parallel asymmetric channels H1 =  1/4 0 0 4  , H2 =  4 0 0 1/4  , and a common-message BC capacity of Ccommon = 20 bits, where the terminals are subject to a per-antenna individual power constraint P . Fig. 3 depicts the different achievable rates mentioned in this section as a function of P . In contrast to the case of general channel matrices, in the case of parallel channels (corresponding to diagonal channel matrices), all the scalar asymmetric techniques can be used. Nonetheless, when considering high enough SNR, where PNC is advantageous, one observes that such asymmetric techniques are inferior to their symmetric counterparts (resulting after applying the JET). This gap is especially pronounced, if we compare the optimum asymmetric strategy with the optimal JET-based hybrid strategy. 12 This statement is precise when the SNRs are high and the interferences are strong. Otherwise, some improvements are possible [10], [42]. 9 20 18 CS Upper bound JET-Hybrid JET-PNC GSVD-PNC DF JET-CF Scalar 2-Layer CF (26b) = I (w; y n ) + nǫn , (26c) where ǫn → 0 as the error probability goes to zero and n → ∞. By retracing (120)–(125) of [10] we attain I (w; y n ) ≤ h (y n ) − h (z n ) − h (sn1 ) + h (H1 xn1 + z n ) . (27) 16 By recalling that s1 ∼ N (0, INr ) and using the Cauchy– Schwarz inequality, we have n (28a) h (H1 xn1 + z n ) ≤ log INr + H1 K1 HT 1 , 2 nNr log (Q1 ) · (1 + o(1)) , (28b) h (y n ) ≤ 2 14 R [bits] = H(w|y n ) + I (w; y n ) 12 where o(1) → 0 for Q1 → ∞. By substituting (28) in (27) and the outcome in (26c), and taking Q1 → ∞, we attain 10 8 1 log INr + H1 K1 HT 1 + ǫn . 2 By switching roles between the users, the following upper bound holds 1 R ≤ log INr + H2 K2 HT 2 + ǫn , 2 and the desired result follows.  R≤ 6 10 15 20 25 30 P [dB] Fig. 3. Performance of the proposed strategies for H1 = diag(1/4, 4), H2 = diag(4, 1/4) and Ccommon = 20bits. VIII. D ISCUSSION : G ENERAL C HANNEL M ATRICES In this paper we restricted attention to full rank channel matrices having more columns than rows. In this case, the column spaces of both matrices are equal. Indeed, the scheme and inner bound of Sections V and VI can be extended to work for the general case as well; this requires, however, introducing an output projection at the receiver, which transforms the channel matrices to effective proper ones. Since all interferences need to be canceled out for the recovery of the transmitted messages, it seems that such a scheme would be optimal in the limit of large transmit powers P1 , . . . , PK → ∞. Unfortunately, the upper bound of Proposition 1, which is equal to the maximal individual capacity, is not tight in the non-proper matrix case, which calls for further research. P ROOF A PPENDIX OF C OROLLARY 2 The proof of Corollary 2 is a simple adaptation of the proof of the outer bound for the scalar case (3) of [10]. Take s2 ≡ 0 and s1 to be i.i.d. Gaussian with zero mean and scaled-identity covariance matrix Q1 INr . Further assume that both users wish to transmit the same common message w, and denote the rate of this message by R. Clearly, the supremum over all achievable rates R bounds from the above the sum-capacity of the two-user MIMO DMAC. By applying Fano’s inequality, we have nR ≤ H(w) (26a) R EFERENCES [1] M. H. M. Costa, “Writing on dirty paper,” IEEE Trans. Inf. Theory, vol. 29, no. 3, pp. 439–441, May 1983. [2] A. S. Cohen and A. Lapidoth, “The Gaussian watermarking game,” IEEE Trans. Inf. Theory, vol. 48, no. 6, pp. 1639–1667, Jun. 2002. [3] U. Erez, S. Shamai, and R. Zamir, “Capacity and lattice strategies for canceling known interference,” IEEE Trans. Inf. Theory, vol. 51, no. 11, pp. 3820–3833, Nov. 2005. [4] B. Nazer and R. Zamir, “Gaussian networks,” in R. Zamir, Lattice coding for signals and networks. Cambridge: Cambridge University Press, 2014. [5] J. M. Cioffi and G. Ginis, “A multi-user precoding scheme achieving crosstalk cancellation with application to DSL systems,” in Proc. Asilomar Conf. Sig., Sys and Comp., vol. 2, Pacific Grove, CA, USA, Oct./Nov. 2000, pp. 1627–1631. [6] G. Caire and S. Shamai, “On the achievable throughput of a multiantenna Gaussian broadcast channel,” IEEE Trans. Inf. Theory, vol. 49, no. 7, pp. 1649–1706, July 2003. [7] W. Yu and J. M. Cioffi, “Sum capacity of Gaussian vector broadcast channels,” IEEE Trans. Inf. Theory, vol. 50, no. 9, pp. 1875–1892, Sep. 2004. [8] H. Weingarten, Y. Steinberg, and S. Shamai, “The capacity region of the Gaussian multiple-input multiple-output broadcast channel,” IEEE Trans. Inf. Theory, vol. 52, no. 9, pp. 3936–3964, Sep. 2006. [9] Y. Jiang, W. Hager, and J. Li, “Uniform channel decomposition for MIMO communications,” IEEE Trans. Sig. Proc., vol. 53, no. 11, pp. 4283–4294, Nov. 2005. [10] T. Philosof, R. Zamir, U. Erez, and A. Khisti, “Lattice strategies for the dirty multiple access channel,” IEEE Trans. Inf. Theory, vol. 57, no. 8, pp. 5006–5035, Aug. 2011. [11] T. Philosof and R. Zamir, “On the loss of single-letter characterization: The dirty multiple access channel,” IEEE Trans. Inf. Theory, vol. 55, no. 6, pp. 2442–2454, June 2009. [12] I. E. Telatar, “Capacity of the multiple antenna Gaussian channel,” Europ. Trans. Telecommun., vol. 10, no. 6, pp. 585–595, Nov. 1999. [13] G. Foschini, “Layered space–time architecture for wireless communication in a fading environment when using multi-element antennas,” Bell Sys. Tech. Jour., vol. 1, no. 2, pp. 41–59, 1996. [14] J. M. Cioffi and G. D. Forney Jr., “Generalized decision-feedback equalization for packet transmission with ISI and Gaussian noise,” in Comm., Comp., Cont. and Sig. Proc. US: Springer, 1997, pp. 79–127. 10 [15] P. W. Wolniansky, G. J. Foschini, G. D. Golden, and R. A. Valenzuela, “V-BLAST: An architecture for realizing very high data rates over the rich-scattering wireless channel,” in Proc. URSI Int. Symp. Sig., Sys., Elect. (ISSSE), Sep./Oct. 1998, pp. 295–300. [16] B. Hassibi, “An efficient square-root algorithm for BLAST,” in Proc. IEEE Int. Conf. Acoust. Speech and Sig. Proc. (ICASSP), vol. 2, Istanbul, Turkey, June 2000, pp. 737–740. [17] A. Khina, Y. Kochman, and U. Erez, “Joint unitary triangularization for MIMO networks,” IEEE Trans. Sig. Proc., vol. 60, no. 1, pp. 326–336, Jan. 2012. [18] H. Weyl, “Inequalities between two kinds of eigenvalues of a linear transformation,” in Proc. Nat. Acad. Sci. USA, 35, no. 7, May 1949, pp. 408–411. [19] A. Horn, “On the eigenvalues of a matrix with prescribed singular values,” in Proc. Amer. Math. Soc., vol. 5, no. 1, Feb. 1954, pp. 4–7. [20] Y. Jiang, W. Hager, and J. Li, “The generalized triangular decompostion,” Math. of Comput., vol. 77, no. 262, pp. 1037–1056, Oct. 2008. [21] J.-K. Zhang and K. M. Wong, “Fast QRS decomposition of matrix and its applications to numerical optimization,” Dpt. of Elect. and Comp. Engineering, McMaster University, Tech. Rep. [Online]. Available: http://www.ece.mcmaster.ca/~jkzhang/papers/sam_qrs.pdf [22] P. Kosowski and A. Smoktunowicz, “On constructing unit triangular matrices with prescribed singular values,” Computing, vol. 64, no. 3, pp. 279–285, May 2000. [23] A. Khina, I. Livni, A. Hitron, and U. Erez, “Joint unitary triangularization for Gaussian multi-user MIMO networks,” IEEE Trans. Inf. Theory, vol. 61, no. 5, pp. 2662–2692, May 2015. [24] G. H. Golub and C. F. Van Loan, Matrix Computations, 3rd ed. Baltimore: Johns Hopkins University Press, 1996. [25] J.-K. Zhang, A. Kavčić, and K. M. Wong, “Equal-diagonal QR decomposition and its application to precoder design for successive-cancellation detection,” IEEE Trans. Inf. Theory, vol. 51, no. 1, pp. 154–172, Jan. 2005. [26] Y. Jiang, W. Hager, and J. Li, “The geometric mean decompostion,” Lin. Algebra and Its Apps., vol. 396, pp. 373–384, Feb. 2005. [27] E. Martinian, “Waterfilling gains at most O(1/SNR) at high SNR,” Feb. 2004. [Online]. Available: http://www.rle.mit.edu/sia/wp-content/ uploads/2015/04/2004-martinian-unpublished.pdf [28] R. A. Horn and C. R. Johnson, Topics in Matrix Analysis. Cambridge: Cambridge University Press, 1991. [29] M. P. Wilson, K. Narayanan, H. Pfister, and A. Sprintson, “Joint physical layer coding and network coding for bidirectional relaying,” IEEE Trans. Inf. Theory, vol. 56, pp. 5641–5654, Nov. 2010. [30] W. Nam, S.-Y. Chung, and Y. H. Lee, “Capacity of the Gaussian twoway relay channel to within 1/2 bit,” IEEE Trans. Inf. Theory, vol. 56, no. 11, pp. 5488–5494, Nov. 2010. [31] X. Yuan, T. Yang, and I. B. Collings, “Multiple-input multiple-output two-way relaying: a space–division approach,” IEEE Trans. Inf. Theory, vol. 59, no. 10, pp. 6421–6440, Oct. 2013. [32] P. Elias, A. Feinstein, and C. E. Shannon, “A note on the maximum flow through a network,” Proc. IRE, vol. 2, no. 4, pp. 117–119, 1956. [33] L. R. Ford Jr. and D. R. Fulkerson, “Maximal flow through a network,” Canad. J. Math., vol. 8, no. 3, pp. 399–404, 1956. [34] A. Khina, Y. Kochman, and U. Erez, “Improved rates and coding for the MIMO two-way relay channel,” in Proc. IEEE Int. Symp. Info. Theory and Its Apps. (ISITA), Melbourne, Vic, Australia, Oct. 2014, pp. 658– 662. [35] H. J. Yang, C. Joohwan, and A. Paulraj, “Asymptotic capacity of the separated MIMO two-way relay channel,” IEEE Trans. Inf. Theory, vol. 57, no. 11, pp. 7542–7554, Nov. 2011. [36] C. F. Van Loan, “Generalizing the singular value decomposition,” SIAM J. Numer., vol. 13, no. 1, pp. 76–83, Mar. 1976. [37] B. Nazer, “Successive compute-and-forward,” in Proc. Biennial Int. Zurich Seminar on Comm., Zurich, Switzerland, March 2012, pp. 103– 106. [38] Y.-C. Huang, K. Narayanan, and T. Liu, “Coding for parallel Gaussian bi-directional relay channels: A deterministic approach,” in Proc. Annual Allerton Conf. on Comm., Control, and Comput., Monticello, IL, USA, Sep.2011, pp. 400–407. [39] R. Ahlsewede, N. Cai, S.-Y. Li, and R. Yeung, “Network information flow,” IEEE Trans. Inf. Theory, vol. 46, no. 4, pp. 1204–1216, July 2000. [40] H. Yamamoto and K. Itoh, “Source coding theory for multiterminal communication systems with a remote source,” Tran. IECE of Japan, vol. E 63, no. 10, pp. 700–706, 1980. [41] D. Gündüz, E. Tuncel, and J. Nayak, “Rate regions for the separated twoway relay channel,” in Proc. Annual Allerton Conf. on Comm., Control, and Comput., Monticello, IL, USA, Sep. 2010, pp. 1333–1340. [42] J. Zhu and M. Gastpar, “Gaussian (dirty) multiple access channels: a compute-and-forward prespective,” in Proc. IEEE Int. Symp. on Inf. Theory (ISIT), Honolulu, HI, USA, June/July 2014, pp. 2949–2953. [43] I.-J. Baik and S.-Y. Chung, “Network coding for two-way relay channels using lattices,” in Proc. IEEE Int. Conf. on Comm. (ICC), Beijing, China, May 2008, pp. 3898–3902. Anatoly Khina (S’08) was born in Moscow, USSR, on September 10, 1984. He received the B.Sc. (summa cum laude), M.Sc. (summa cum laude) and Ph.D. degrees from Tel Aviv University, Tel-Aviv, Israel in 2006, 2010 and 2016, respectively, all in electrical engineering. He is currently a Postdoctoral Scholar in the Department of Electrical Engineering at the California Institute of Technology, Pasadena, CA, USA. His research interests include information theory, control theory, signal processing and matrix analysis. In parallel to his studies, Dr. Khina had been working as an engineer in various algorithms, software and hardware R&D positions. He is a recipient of the Fulbright, Rothschild and Marie Skłodowska-Curie Postdoctoral Fellowships, Clore Scholarship, Trotsky Award, Weinstein Prize in signal processing, Intel award for Ph.D. research, and the first prize for outstanding research work in the field of communication technologies of the Advanced Communication Center (ACC) Feder Family Award. Yuval Kochman (S’06–M’09) received his B.Sc. (cum laude), M.Sc. (cum laude) and Ph.D. degrees from Tel Aviv University in 1993, 2003 and 2010, respectively, all in electrical engineering. During 2009–2011, he was a Postdoctoral Associate at the Signals, Informtion and Algorithms Laboratory at the Massachusetts Institute of Technology (MIT), Cambridge, MA, USA. Since 2012, he has been with the School of Computer Science and Engineering at the Hebrew University of Jerusalem. Outside academia, he has worked in the areas of radar and digital communications. His research interests include information theory, communications and signal processing. Uri Erez (M’09) was born in Tel-Aviv, Israel, on October 27, 1971. He received the B.Sc. degree in mathematics and physics and the M.Sc. and Ph.D. degrees in electrical engineering from Tel-Aviv University in 1996, 1999, and 2003, respectively. During 2003–2004, he was a Postdoctoral Associate at the Signals, Information and Algorithms Laboratory at the Massachusetts Institute of Technology (MIT), Cambridge, MA, USA. Since 2005, he has been with the Department of Electrical Engineering–Systems at Tel-Aviv University. His research interests are in the general areas of information theory and digital communications. He served in the years 2009–2011 as Associate Editor for Coding Techniques for the IEEE T RANSACTIONS ON I NFORMATION T HEORY.
7cs.IT
Optimal Lower Bounds for Sketching Graph Cuts Charles Carlson∗ Alexandra Kolla † Nikhil Srivastava‡ Luca Trevisan§ arXiv:1712.10261v1 [cs.DS] 29 Dec 2017 January 1, 2018 Abstract We study the space complexity of sketching cuts and Laplacian quadratic forms of graphs. We show that any data structure which approximately stores the sizes of all cuts in an undirected graph on n vertices up to a 1 + ǫ error must use Ω(n log n/ǫ2 ) bits of space in the worst case, improving the Ω(n/ǫ2 ) bound of [ACK+ 16] and matching the best known upper bound achieved by spectral sparsifiers [BSS12]. Our proof is based on a rigidity phenomenon for cut (and spectral) approximation which may be of independent interest: any two d−regular graphs which approximate each other’s cuts significantly better than a random graph approximates the complete graph must overlap in a constant fraction of their edges. 1 Introduction An ǫ−spectral sparsifier [ST04] of a weighted graph G is a weighted graph H such that for every x ∈ Rn we have the multiplicative guarantee: (1 − ǫ)xT LG x ≤ xT LH x ≤ (1 + ǫ)xT LG x. (1) An ǫ−cut sparsifier [BK96] is a graph such that (1) holds for all x ∈ {−1, 1}n ; the former condition clearly implies the latter, and it is not hard to see that the converse is not true. There have been many papers on efficiently constructing sparsifiers with few edges (e.g. [SS11, FHHP11, AZLO15, LS17]). The best known sparsity-approximation tradeoff is achieved in [BSS12], who showed that every graph on n vertices has an ǫ-spectral sparsifier with O(n/ǫ2 ) edges (and this is also the best known upper bound for ǫ-cut sparsification). Since every weighted edge can be stored using O(log n) bits1 , storing such a sparsifier requires O(n log n/ǫ2 ) bits. The recent work [ACK+ 16] studied the question of whether it is possible to use substantially fewer bits if one simply wants a data structure (not necessarily a graph) which answers cut and quadratic form queries. We will use the following definition, which is inspired by the one in [JS17]. Definition 1.1. An ǫ−spectral sketch of a graph G is a function f : Rn → R such that for every x ∈ Rn : (1 − ǫ)xT LG x ≤ f (x) ≤ (1 + ǫ)xT LG x. (2) ∗ [email protected]. U.I.U.C. [email protected]. U.I.U.C. Supported by NSF Grant 1423452. ‡ [email protected]. U.C. Berkeley. Supported by NSF grant CCF-1553751 and a Sloan research fellowship. § [email protected]. U.C. Berkeley. Supported by the National Science Foundation under Grants No. 1540685 and No. 1655215. 1 After discretizing the weights to, say, 1/n4 precision, which introduces negligible error. † 1 An ǫ−cut sketch is a function f : {−1, 1}n → R such that (2) holds for all x ∈ {−1, 1}n . A sketching scheme is a deterministic map sk from graphs on n vertices to (ǫ-spectral or ǫ-cut) sketches f : Rn → R, along with specified procedures for storing the functions as bit strings and for evaluating any given f on a query x 2 . The number of bits required to store f is called its size. In [ACK+ 16] it was shown that any ǫ-cut sketch must use Ω(n/ǫ2 ) bits in the worst case, leaving a logarithmic gap between the best known upper and lower bounds. In this paper, we close this gap by showing that any ǫ-cut sketching scheme must in fact use Ω(n log n/ǫ2 ) bits whenever ǫ = ω(n−1/4 ) (Theorem 3.2), which means that it is not in general possible to obtain any asymptotic savings by considering sketches which are not graphs. We also give a lowerbound for ǫ-spectral sketching with a simpler proof and slightly better constants (Theorem 2.1). 1.1 Related Work The paper [ACK+ 16] also studied the problem of producing a “for each” sketching algorithm, which has the property that for any particular query x, f (x) approximates xT Lx with constant probability. They showed that in this weaker model it is possible to obtain ǫ−cut sketches of size O(npolylog(n)/ǫ) and ǫ-spectral sketches of size O(npolylog(n)/ǫ1.6 ). The latter bound was recently improved to O(npolylog(n)/ǫ) and generalized to include queries to the pseudoinverse in [JS17]. In contrast, in this paper we study only the “for all” model, in which the sketch is required to work for all queries simultaneously. 1.2 Techniques Our proof is based on √ the following rigidity phenomenon: there is a constant c such that if two d−regular graphs c/ d-cut approximate each other then they must overlap in a constant fraction of edges (Lemmas 2.2 and 3.1). This allows us to argue that below this approximation threshold any sketch encodes a constant fraction of the information in the graph, and so any sketch must use Ω(dn log n) = Ω(n log n/ǫ2 ) bits. Interestingly, this phenomenon is very sensitive to the value of the constant c — in particular, a well-known theorem of Friedman [Fri03] says that √ of the Laplacian of a random √ the eigenvalues d−regular graph are contained in the range [d−2 d − 1−o(1), d+2 d+o(1)] with high probability, √ which implies that almost every d−regular graph has a 3/ d-spectral sketch of constant size, namely the complete graph. Note that according to the Alon-Boppana √ bound [Nil91] it is not possible to approximate Kn by a d−regular graph with error less than 2/ d. Thus, our result can be interpreted as saying that a d−regular graph can only be approximated by nearby graphs when the error is substantially below the Alon-Boppana bound. We remark that the proof of [ACK+ 16] was based on showing a Ω(1/ǫ2 ) bit lower bound for a constant sized graph by reducing to the Gap-Hamming problem in communication complexity, and then concatenating O(n) instances of this problem to obtain an instance of size n. This method is thereby inherently incapable of recovering the logarithmic factor that we obtain (in contrast, we work with random regular graphs). 2 We will not be concerned with the details of these procedures since we are only interested in the space used by the sketches and not computational parameters such as query time / success probability of randomized schemes. 2 1.3 Notation and Organization We will denote ǫ-spectral approximation as (1 − ǫ)LG  LH  (1 + ǫ)LG and ǫ−cut approximation as (1 − ǫ)LG  LH  (1 + ǫ)LG . We will use lg and ln to denote binary and natural logarithms. We prove our lower bound for spectral sketching in Section 2, and the lower bound for cut sketching in Section 3. Although the latter is logically stronger than the former, we have chosen to present the spectral case first because it is extremely simple and introduces the conceptual ideas of the proof. Acknowledgments We would like to thank MSRI and the Simons Institute for the Theory of Computing, where this work was carried out during the “Bridging Discrete and Continuous Optimization” program. 2 Lower Bound for Spectral Sketches In this section, we prove the following theorem. Theorem 2.1. For any ǫ = ω(n−1/4 ), any ǫ-spectral sketching scheme sk for graphs with n vertices n lg n must use at least 500ǫ 2 · (1 − on (1)) bits in the worst case. The main ingredient is the following lemma. Lemma 2.2 (Rigidity of Spectral Approximation). Suppose G and H are simple d−regular graphs such that (1 − ǫ)LG  LH  (1 + ǫ)LG . Then G and H must have at least dn 2 (1 − ǫ2 d/2) edges in common. Proof. Since G and H are d−regular, we have LH − LG = (dI − AH ) − (dI − AG ) = AG − AH and kLG k ≤ 2d. Thus the hypothesis implies that: −2dǫI  −ǫ · LG  LH − LG = AG − AH  ǫ · LG  2dǫI, which means kAG − AH k ≤ 2ǫd. Passing to the Frobenius norm, we find that X (AG (i, j) − AH (i, j))2 = kAG − AH k2F ≤ nkAG − AH k2 ≤ 4ǫ2 d2 n. ij The matrix AG − AH has entries in {−1, 0, 1}, with exactly two nonzero entries for every edge in E(G)∆E(H), so the left hand side is equal to 2|E(G)∆E(H)| = 2(|E(G)| + |E(H)| − 2|E(G) ∩ E(H)|) = 2(dn − 2|E(G) ∩ E(H)|), since |E(G)| = |E(H)| = dn/2. Rearranging yields the desired claim. 3 Note that the above lemma is vacuous for ǫ ≥ fraction of their edges for ǫ below this threshold. p 2/d but indicates that G and H must share a Lemma 2.3. For any function f : Rn → R and ǫ < 1/2: lg |{G ∈ Gn,d : G is ǫ−spectrally approximated by f }| ≤ dn/2 + 5ǫ2 d2 n lg n, where Gn,d denotes the set of all d−regular graphs on n vertices. Proof. If f does not ǫ−approximate any d−regular graph then we are done. Otherwise, let H be the lexicographically (in some pre-determined ordering on d−regular graphs) first graph which f ǫ-approximates. Suppose G is another graph that f ǫ−approximates. Notice that by applying (2) twice, we have that for every x ∈ Rn : xT L H x f (x) xT L H x 1+ǫ 1−ǫ ≤ T = T · ≤ , 1+ǫ x LG x x LG x f (x) 1−ǫ so G 3ǫ-spectrally approximates H. By Lemma 2.2, H and G must share dn (1 − 9ǫ2 d/2) 2 edges. Thus, G can be encoded by specifying: k := 1. Which edges of H occur in G. This is a subset of the edges of H, which requires at most dn/2 bits. 2. The remaining dn/2 − k = 9ǫ2 d2 n/4 edges of G. Each edge requires at most 2 lg(n) bits to specify, so the number of bits needed is at most 18ǫ2 d2 n lg n/4. Thus, the total number of bits required is at most dn/2 + 18ǫ2 d2 n lg n/4, as desired. √ Theorem 2.4. ([Wor99]Cor. 2.4) For d = o( n), the number of d−regular graphs on n vertices is:  2   (dn)! d d3 1 − d2 − +O ≥ exp(dn ln(n/d)/2 · (1 − on (1))). exp dn/2 n 4 12n n (dn/2)!2 (d!) 1 Proof of Theorem 2.1. Let N be the number of distinct sketches produced by sk and let d = ⌈ 25ǫ 2 ⌉. By Lemma 2.3, the binary logarithm of the number of d−regular graphs ǫ-spectrally approximated by any single sketch f ∈ range(sk) is at most dn/2 + dn lg n/5 ≤ dn lg n/5 · (1 + o(1)). √ On the other hand by Theorem 2.4, since d = o( n) we have lg |Gn,d | ≥ dn lg(n/d)/2 · (1 − o(1)) ≥ dn lg n/4 · (1 − o(1)). Since every d−regular graph receives a sketch, we must have (1 + o(1)) lg N ≥ dn lg n/4 − dn lg n/5 = dn lg n/20 = n lg n/500ǫ2 , as desired. 4 (3) √ Remark 1. The proof above actually shows that any 1/5 d-spectral sketching scheme for d−regular graphs on n vertices must use at least Ω(dn lg n) bits on average, since the same proof goes through if we only insist that the sketches work for most graphs. Remark 2. The result of [BSS12] produces ǫ-spectral sparsifiers with 16n/ǫ2 edges, which yield ǫ-spectral sketches with 64n lg n/ǫ2 bits by discretizing the edge weights up to 1/n2 error, so the bound above is tight up to a factor of 64 · 500. We have not made any attempt to optimize the constants. 3 Lower Bound for Cut Sketches In this section we prove Theorem 3.2. The new ingredient is a rigidity lemma for cuts, which may be seen as a discrete analogue of Lemma 2.2. The lemma holds for bipartite graphs and is proven using a Goemans-Williamson [GW95] style rounding argument. Lemma 3.1 (Rigidity of Cut Approximation). Suppose G and H are simple d−regular bipartite graphs with the same bipartition L ∪ R, such that (1 − ǫ)LG  LH  (1 + ǫ)LG . √ Then G and H must have at least dn 2 (1 − 3 dǫ) edges in common. (4) Proof. We will show the contrapositive. Assume |E(G) \ E(H)| = |E(H) \ E(G)| = δdn/2 √ for some δ ≥ 3 dǫ. To show that (4) does not hold, it is sufficient to exhibit a vector x ∈ {−1, 1}n such that xT M x := xT (LG − LH )x > 2ǫdn ≥ ǫ · xT LG x, where M = LG − LH = AH − AG , since both graphs are d−regular and the latter inequality follows from kLG k ≤ 2d. To find such an x we will first construct n vectors y1 , . . . , yn ∈ Rn such that n X i,j=1 Mij hyi , yj i > πǫdn (5) and then use hyperplane rounding to find scalars x1 , . . . , xn ∈ {−1, 1} which satisfy: n X Mij xi xj > 2ǫdn. (6) i,j=1 Let z1 , . . . , zn ∈ Rn be the columns of M I+√ , d 2 2 and note that kzi k ∈ [1, 3] since zi (i) = 1 and every vertex is incident with at most d edges in each of E(H) \ E(G) and E(G) \ E(H). The relevant inner products of the zi are easy to understand:   if Mij = 0 0  1 1 2 if ij ∈ E(H) \ E(G) Mij hzi , zj i = √d = 1 · (1 · √d + 1 · √d )   −1 −1  √2 = (−1) · (1 · √ +1· √ ) if ij ∈ E(G) \ E(H), d d 5 d where in the latter two cases we have used the fact that i and j cannot have any common neighbors because they lie on different sides of the bipartition. Letting yi = zi /kzi k, we therefore have n X 2 Mij hyi , yj i ≥ 2 · δdn · √ > πǫdn 3 d i,j=1 (7) by our choice of δ. Let w be a random unit vector and let ( +1 if hyi , wi ≥ 0 xi = −1 if hyi , wi < 0. We denote the angle between vectors yi , yj ∈ Y as θij . We recall that θij = cos−1 hyi , yj i since θ yi and yj have unit length. It follows that the probability that xi 6= xj is equal to πij and the θ probability of xi = xj is equal to (1 − πij ). Thus,   n n X X E Mij xi xj  = Mij E[xi xj ] i,j=1 i,j=1 n X  θij θij Mij (−1) + (1 − )(1) = π π i,j=1   n X 2θij Mij 1 − = π = = = ≥  i,j=1 n X Mij π − θij 2 π Mij π  − cos−1 hyi , yj i 2 π 2 π 2 π i,j=1 n X i,j=1 n X i,j=1 n X i,j=1 2 2  Mij sin−1 hyi , yj i Mij hyi , yj i since sin−1 (x) ≥ x > 2ǫdn, by (7), as desired. Remark 3. The analysis of the rounding scheme above can be improved from 2/π to the GoemansWilliamson constant 0.868 . . ., but we have chosen not to do so for simplicity. Theorem 3.2. For any ǫ = ω(n−1/4 ), any ǫ-cut sketching scheme sk for graphs with n vertices n lg n must use at least 2304ǫ 2 · (1 − on (1)) bits in the worst case. 6 1 Proof. Assume n is divisible by 4 (add a constant if this is not the case). Let d = 16·9ǫ 2 and let Bn,d be the set of bipartite graphs on n vertices with respect to a fixed bipartition. We proceed as in the proof of Theorem 2.1. Let f : {−1, 1}n → R be any function which is an ǫ−cut sketch for some graph H. Arguing as in Lemma 2.3, any other graph G ∈ Bn,d which has √ the same sketch must 3ǫ-cut approximate H, so by Lemma 3.1, any such G must have at most 9 dǫ · dn/2 edges which are not present in H. Thus, the encoding length of such H is at most ℓ := dn/2 + 9d3/2 nǫ lg n = dn lg n/16 · (1 + o(1)) bits, by our choice of d, so any particular f can only be an ǫ-cut sketch for 2ℓ graphs in Bn,d On the other hand, Bn,d is quite large. Recall that the bipartite double cover of a graph F on n vertices is the graph on 2n vertices obtained by taking its tensor product with K2 , and two distinct graphs must have distinct double covers. Thus, by (3) we have lg |Bn,d | ≥ lg |Gn/2,d | ≥ dn lg n/8 · (1 − o(1)). Thus, if N is the number of distinct sketches produced by sk, we must have (1 + o(1)) lg N ≥ dn lg n/8 − dn lg n/16 = dn lg n/16 = n lg n/(16)2 · 9ǫ2 , as desired. References [ACK+ 16] Alexandr Andoni, Jiecao Chen, Robert Krauthgamer, Bo Qin, David P Woodruff, and Qin Zhang. On sketching quadratic forms. In Proceedings of the 2016 ACM Conference on Innovations in Theoretical Computer Science, pages 311–319. ACM, 2016. [AZLO15] Zeyuan Allen-Zhu, Zhenyu Liao, and Lorenzo Orecchia. Spectral sparsification and regret minimization beyond matrix multiplicative updates. In Proceedings of the fortyseventh annual ACM symposium on Theory of computing, pages 237–245. ACM, 2015. [BK96] András A Benczúr and David R Karger. Approximating st minimum cuts in õ (n 2) time. In Proceedings of the twenty-eighth annual ACM symposium on Theory of computing, pages 47–55. ACM, 1996. [BSS12] Joshua Batson, Daniel A Spielman, and Nikhil Srivastava. Twice-ramanujan sparsifiers. SIAM Journal on Computing, 41(6):1704–1721, 2012. [FHHP11] Wai Shing Fung, Ramesh Hariharan, Nicholas JA Harvey, and Debmalya Panigrahi. A general framework for graph sparsification. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 71–80. ACM, 2011. [Fri03] Joel Friedman. A proof of alon’s second eigenvalue conjecture. In Proceedings of the thirty-fifth annual ACM symposium on Theory of computing, pages 720–724. ACM, 2003. [GW95] Michel X Goemans and David P Williamson. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. Journal of the ACM (JACM), 42(6):1115–1145, 1995. 7 [JS17] Arun Jambulapati and Aaron Sidford. Efficient o(n/ǫ) spectral sketches for the laplacian and its pseudoinverse. arXiv preprint arXiv:1711.00571, 2017. [LS17] Yin Tat Lee and He Sun. An sdp-based algorithm for linear-sized spectral sparsification. arXiv preprint arXiv:1702.08415, 2017. [Nil91] Alon Nilli. On the second eigenvalue of a graph. Discrete Mathematics, 91(2):207–210, 1991. [SS11] Daniel A Spielman and Nikhil Srivastava. Graph sparsification by effective resistances. SIAM Journal on Computing, 40(6):1913–1926, 2011. [ST04] Daniel A Spielman and Shang-Hua Teng. Nearly-linear time algorithms for graph partitioning, graph sparsification, and solving linear systems. In Proceedings of the thirtysixth annual ACM symposium on Theory of computing, pages 81–90. ACM, 2004. [Wor99] Nicholas C Wormald. Models of random regular graphs. London Mathematical Society Lecture Note Series, pages 239–298, 1999. 8
8cs.DS
Detecting Anomalous Faces with ‘No Peeking’ Autoencoders Anand Bhattad 1 Jason Rock 1 David Forsyth 1 arXiv:1802.05798v1 [cs.CV] 15 Feb 2018 Abstract Detecting anomalous faces has important applications. For example, a system might tell when a train driver is incapacitated by a medical event, and assist in adopting a safe recovery strategy. These applications are demanding, because they require accurate detection of rare anomalies that may be seen only at runtime. Such a setting causes supervised methods to perform poorly. We describe a method for detecting an anomalous face image that meets these requirements. We construct a feature vector that reliably has large entries for anomalous images, then use various simple unsupervised methods to score the image based on the feature. Obvious constructions (autoencoder codes; autoencoder residuals) are defeated by a ‘peeking’ behavior in autoencoders. Our feature construction removes rectangular patches from the image, predicts the likely content of the patch conditioned on the rest of the image using a specially trained autoencoder, then compares the result to the image. High scores suggest that the patch was difficult for an autoencoder to predict, and so is likely anomalous. We demonstrate that our method can identify real anomalous face images in pools of typical images, taken from celeb-A, that is much larger than usual in state-of-the-art experiments. A control experiment based on our method with another set of normal celebrity images - a ‘typical set’, but nonceleb-A are not identified as anomalous; confirms this is not due to special properties of celeb-A. 1. Introduction We describe a method for detecting anomalous faces in images. Our method uses a novel representation of appearance (auto-encoder residuals), and does not require any example anomaly in training. We demonstrate that our method significantly improves over a number of natural baselines. 1 University of Illinois, Urbana-Champaign. Correspondence to: Anand Bhattad <[email protected]>. Detecting anomalous faces has important applications. For instance, a machine operator might fall asleep or have a heart attack. Ideally, a monitoring system would identify this kind of problem by watching the operator’s face and trigger some form of intervention. The crucial difficulty in building such a system is that there aren’t datasets showing (say) people having heart attacks. Moreover, a reliable anomaly detection system must be built without seeing actual anomalies to generalize well. This example presents serious difficulties for current methods for anomaly detection (briefly reviewed below), because previous anomaly detection systems tend to be evaluated on datasets where anomalies are very different from typical examples. But anomalous faces look quite similar to typical faces. Our method requires a representation of face appearance which exaggerates the relatively small changes that make a face image anomalous, without actually being shown. Worse, because face images are relatively high dimensional, there is no practical prospect of simply applying a density estimator to the example images. Our strategy is to learn a compression procedure that reconstructs faces well, but not other similar unseen images, and then look at the residuals. This is not a routine application because one must be sure that (a) training images reconstruct well (routine) but (b) other similar images do not (tricky, and unusual). We show that a carefully designed residual of a specially trained autoencoder has these two properties and therefore provides a strong feature for identifying facial anomalies. Contributions: We augment the Celeb-A dataset (Liu et al., 2015) for evaluating image anomaly detection. We present a novel feature learning approach for anomaly detection using inpainting auto-encoders. We build a dataset of real anomalous faces and real typical faces to evaluate the proposed framework. We demonstrate that our feature works well in both supervised and unsupervised applications. 2. Background Anomaly detection has widespread applications, including: image matting (Hasler et al., 2003); identifying cancerous tissue (Alpert & Kisilev, 2014); finding problems in textiles (Serdaroglu et al., 2006; Mak et al., 2005); and preventing face spoofing (Arashloo et al., 2017). There is a recent survey in (Chandola et al., 2009). There are two distinct types Detecting Anomalous Faces with ‘No Peeking’ Autoencoders of approach in the literature. In one approach, examples of both inliers and outliers are available, and discriminative procedures can be used to build representations and identify and select features. In the other, one can model only inliers, and anomalies are available only at test time. Face anomaly detection is a good example problem because (a) data resources of typical faces are abundant and (b) anomalous faces look a lot like typical faces; trivial methods perform poorly. We do not assume that anomalous faces are available at training time, because doing so creates two problems. First, anomalous face images are rare (which is why they’re anomalous) and highly variable in appearance, so a dataset of reasonable size is difficult to build. Second, the estimate of the decision boundary produced by any particular set of anomalous face images is likely to be inaccurate. The location of the decision boundary is determined by both the anomalies and the typical images; but the anomalies must be severely undersampled, and so contribute significant variance to the estimate of the decision boundary. Instead, we assume that only typical faces are available at training time. We must now build some form of distribution model for true faces and exploit it to tell how uncommon the current image is. We focus on building a feature construction that allows simple mechanisms to compute an anomaly score. An alternative is to use a kernel method to build a distribution model (the one-class SVM of (Schölkopf et al., 2000)). We use this method as a baseline. Our feature construction uses an autoencoder (Hinton & Salakhutdinov, 2006). Auto encoders use an encoder to compress a signal to a code, which can then be decompressed. The code is a low dimensional representation of content which has been shown to be useul for tasks such as: appearance editing (Yan et al., 2016; Lample et al., 2017); inpainting (Pathak et al., 2016); and colorization (Deshpande et al., 2017). Generative adversarial networks (GAN) (Goodfellow et al., 2014) have been used for anomaly detection in (Schlegl et al., 2017), but one must build a distribution for the code. (Schlegl et al., 2017) do explore using residuals in combination with the code likelihood. However, because their model is built on a GAN, their inference procedure is quite expensive, requiring many backprop and gradient steps, while our method is simply a forward run through an autoencoder. Our model also introduces a novel inpainting conditioning strategy for feature construction. Evaluating anomaly detectors is tricky, because anomalies are rare. One strategy is to regard one class of image as typical, and another as anomalous. This strategy is popular (Zhai et al., 2016; Kliger & Fleishman, 2018; Deecke et al., 2018; Jindong Gu & Tresp, 2018) but may mislead. The danger is that one may unknowingly work with two very different classes, meaning that the quality of the distribution model for the typical class is not tested. In contrast, face anomaly detection has the advantage of being (a) intrinsically useful and (b) clearly difficult. The set building method of (Zaheer et al., 2017) could be applied to face anomaly detection. This approach has been shown to be accurate at identifying the one special face in a set of 16. A direct comparison is not possible, because their method relies on identifying the one different face in a set (i.e. given 15 smiling faces and one frowning face, it should mark the frowning face). However, we adopt their evaluation methodology and use analogous scoring methods. 3. Anomaly Features We view anomaly detection as feature construction followed by a simple unsupervised method. Natural choices of feature constructions are autoencoder codes, pretrained discriminative models (eg (Cao et al., 2017)), or autoencoder residual features. An anomalous face image will look mostly like a typical face image, but will display some crucial differences. The problem is we don’t know where those differences are or what they look like. A natural strategy is based on a generative models of typical face images. Write Q for a test image, and M(Q; θ) for a learned model that produces the typical face image that is ‘closest’ to the query image. We could then use the difference M(Q; θ) − Q to compute a score of anomaly. In practice, “peeking” by the learned model (details below) means that this approach fails. The learning procedure results in a model that is biased to produce a M(Q; θ) that is closer to Q than it should be. A simple variant of this approach is extremely effective. Rather than requiring M(.; θ) to make the closest typical image, we conceal part of Q from M(.; θ) and require it to extrapolate. We then compare the extrapolated region to Q to produce the anomaly signal. 3.1. Autoencoder Residuals as Anomaly Signals We will build M using an autoencoder. Autoencoders construct low dimensional latent variable models from high dimensional signals. An encoder E estimates the latent variable (code; z) for a given input Q; a decoder D recovers the signal from that code. The two are trained together, using criteria like the accuracy of the signal recovery (ie |D(E(Q)) − Q|2 ; (Bengio et al., 2009)). Variational versions which use Bayes priors on the code have been explored as well (Kingma & Welling, 2014). As we show in table 1, the code produced by the encoder is a poor guide to anomaly, likely because it is still fairly high in dimension, and an appropriate distribution model is obscure (Schlegl et al., 2017). The autoencoder image reconstruction residual, D(E(Q)) − Q, is an alternative. Straightforward experiments establish that the residual is Detecting Anomalous Faces with ‘No Peeking’ Autoencoders Figure 1. Forcing an autoencoder to inpaint at test time has important effects on the reconstruction. Top two rows: anomalous face images; bottom two rows typical face images. In the first column, the three images are actual input images, autoencoder’s reconstructed images and the autoencoder residuals respectively. In the second and third column, the first image is the masked input, second is the autoencoder’s reconstructed images and third is the residual difference between inpainted reconstruction residual from the residuals in the the first column. Notice how, for anomalous faces, not showing the autoencoder the content of the box affects the reconstruction. In the top row, attend to the dark bar at the left side of the model’s mouth, significantly reduced when the autoencoder reconstructs without seeing Q (i.e. no peeking). Similarly, concealing the whole mouth results in a much more conventional reconstruction of the mouth. As a result, the residual error emphasizes where the image is anomalous. For the second row, note how eye size and gaze are affected; and the significant change in reconstructed mouth shape when the mouth is concealed. This effect is minor for typical faces. As a result, residuals against autoencoder inpainting are strong cues to anomaly. a poor anomaly signal (Figure 1). The reason is interesting. An autoencoder is trained to reproduce signals from its training set, but this regime does not necessarily discourage reproducing other images as well. An autoencoder that is trained to reproduce face images accurately has not been trained not to reproduce (say) cat images accurately, too. This means the autoencoder could reduce the training loss by adopting a compression strategy that works for many kinds of images. Therefore, a compression procedure that is good at compressing face images is not necessarily bad at compressing other images. This problem is not confined to neural networks. For example, choice of principal components that represents face images well (Sirovich & Kirby, 1987) may represent (say) cat images. Denoising in current implementations (Vincent et al., 2010) does not cure this problem. For example, a good denoising strategy is to construct a large dictionary of patches, then report the closest patch to the input. While a dictionary built on faces may reproduce some classes of image poorly, there is no guar- antee in the training loss. Requiring a ‘small’ code (Hinton & Zemel, 1994) or adding code regularization (Kingma & Welling, 2014) does not cure this problem either, because it is not known how to account for the information content of the code. As a result, the model M built by the autoencoder is not guaranteed to report the typical face image that is ‘closest’ to the query image; instead, it may pass through some of the query image as well (‘peeking’ at the query image), so resulting in a small residual and a poor anomaly signal. Experimental experience suggests that neural networks quite reliably adopt unexpected strategies for minimizing loss (‘cheating’ during training), meaning that we expect peeking to occur, and figure 1 confirms that it does. Peeking can be overcome by forcing the autoencoder to fill in large holes in the query image. Detecting Anomalous Faces with ‘No Peeking’ Autoencoders Feature Accu L1 Regularized Logistic Regressor Resnet50 AE Code Res Patch 99.4 85.6 93.5 Feature AUC Resnet50 52.3 Feature AUC Mahalanobis Distance Resnet50 AE Code Res Patches 52.8 50.8 92.5 Feature AUC Resnet50 NA 4. Beating Peeking with Inpainting Write Πb for an operator that takes an image and overwrites a box b with zeros; write Πb for an operator that overwrites all but the box b with zeros. These boxes will be quite large in practice. We will train an autoencoder (E, D) as below. We build an anomaly feature vector by constructing |Πb [D(E(Πb (Q))) − Q] | for a variety of boxes (as below). We will then apply simple decision procedures to this feature. This feature works because the autoencoder cannot peek into Q within the box. Instead, it must extrapolate into b, and that extrapolation is difficult to produce for multiple classes. In turn, the extrapolate is a much better estimate of what a typical face image would look like within b, conditioned on the rest of Q. For example, if b spans a mouth, then the auto encoder constructs a typical mouth conditioned on the face and compares it with the observed mouth, and if the mouth is anomalous the residual will be large (Figure 1). This is similar to the inpainting problem explored in (Pathak et al., 2016), though we do not use an adversarial loss. The autoencoder is trained to inpaint randomly selected boxes. We use |(D(E(Πb (Q)))−Q)|1 as a training loss, thus requiring the autoencoder to inpaint. The only difference between this and a denoising regime is the size of the boxes, which is large compared to gaussian noise. Our encoder and decoder use standard convolutional architectures with a fully connected layer for code construction. Average pooling is used for downsampling, and bilinear interpolation is used for upsampling. Following (Berthelot et al., 2017), we use a higher capacity network for the encoder than the decoder which seems to help with reconstructing higher frequency information. We use the elu non-linearity and batch normalization after each conv layer, and a tanh non-linearity on the output from the decoder. We use the L1 norm for our training loss. 5. Eyeglass Experiment Poor feature performance on a supervised task suggests that unsupervised methods will perform poorly too. Therefore in evaluating feature constructions, it can be useful to compare to an oracle. To do so, we construct a proxy anomaly experiment, where anomalous faces are those wearing eyeglasses, so allowing discriminative training of the oracle. Our oracle takes the form of a supervised L1 -regularized linear regressor (we use glmnet (Friedman et al., 2010)) trained on data. While poor performance on the oracle suggests that unsupervised methods will perform poorly too, good performance on the oracle is not necessarily indicative of good unsupervised performance. We therefore also explore natural choices for unsupervised methods including one-class SVM (Schölkopf et al., 2000), one-class density estimates 1-Class SVM AE Code Res Patches 51.8 53.8 L∞ norm AE Code Res Patches NA 81.5 Table 1. Supervised and unsupervised glasses detection with our features. We compare our inpainting residual features, Res patch to codes from the autoencoder and state of the art Resnet features trained on face detection. We note that Resnet features work extremely well for supervised tasks, in fact in our simple dataset, Resnet features combined with an L1 regularized logistic regression performs nearly perfectly. However Resnet features do not perform well for either of the unsupervised classifiers. On the other hand, the inpainting residual features perform better than the autoencoder code regardless of the classifier type, and perform far better than Resnet for unsupervised classifiers. such as Mahalanobis Distance (Mahalanobis, 1936), and heuristic methods such as the L∞ norm which are meaningful for our residual based feature. We use the Celeb-A dataset (Liu et al., 2015), which is a collection of thousands of labeled faces. As in (Berthelot et al., 2017), we filter and crop with the Viola-Jones face detector (Viola & Jones, 2001), resulting in frontal faces in tightly cropped 128x128 boxes. For this experiment, we use 7700 images of people wearing eyeglasses as anomalies and 7000 images without eyeglasses as our unsupervised training set. We train our inpainting autoencoder with random Πb for each sample on 90% of the non-eyeglass data. During test we use the same model to construct autoencoder codes as well as the inpainting features. For inpainting features, we use 32x32 boxes in a regular grid. We exclude the boxes that would lie directly on the image boundary. For Resnet features we use a pretrained resnet trained on face recognition from (Cao et al., 2017), we remove the final softmax layer, and use the resulting network as a feature constructor. Our results shown in table 1 suggest that inpainting autoencoder residuals contain sufficient information for attribute classification. One class SVM’s are not a strong baseline for this problem. Mahoanobis distance is a decent baseline for our features. Inpainting autoencoder residual images are informative, even with the simplest heuristic classifier L∞ . Detecting Anomalous Faces with ‘No Peeking’ Autoencoders We also show that autoencoder codes are less adept than inpainting residuals. It is not surprising that the L∞ classifier works so well. Each inpainting feature is a local anomaly detector for the content under the box. Since the inpainting autoencoder was trained on images without glasses, when the box covers the eyeglasses, the inpanted content will not have eyeglasses. Consequently, the residual will be large. Taking the L∞ norm reports the score from the most violated box. Note that this experiment is not a true anomaly experiment, but it is similar to previous work (Zhai et al., 2016; Kliger & Fleishman, 2018; Deecke et al., 2018; Jindong Gu & Tresp, 2018) which uses attributes or class labels as proxies for anomalies. 6. Anomaly Experiment We wish to determine whether we can detect true anomalies in a realistic setting. We use the Celeb-A dataset as our training data, filtering and cropping for frontal faces using Viola-Jones as in section 5. However rather than considering any specific attribute, we consider the entire Celeb-A dataset as typical data. We set aside 30,000 images for use in test, leaving us with 125,253 images for training. For our anomaly images, we collect a 100 image anomaly dataset. This set, which we call the anomaly set is comprised of strange or “weird” faces (Figure 2c). It includes extreme makeup, masks, photoshops, and people making extreme faces. We pass the images through the same Viola-Jones detector and cropper. This rejects many of the anomaly images, and in fact we only have about a 3% yield on anomaly images, meaning that we had to find roughly 3000 anomaly images in order to get 100. However, this construction is sensible: if Viola-Jones does not believe the images have a face, then they are too obviously anomalous. For example, a photograph of a cat would have a high anomaly score under our method, but a cat is also not likely to be identified as a face by a competent detector, so determining it is an anomaly is not particularly important or difficult. We also wish to determine if anomaly detection is caused by special features of the Celeb-A dataset. An anomaly detector which identifies any image not from Celeb-A would not be particularly useful. We therefore collect a typical set of 100 images we do not believe to be anomalous images. It is comprised of pictures of celebrities that were taken after Celeb-A was created so there are no overlaps in pictures (Figure 2b). We also tried to find new celebrities, so that the people would be less likely to have appeared in the original Celeb-A dataset. This dataset is used to validate that a method is not memorizing images in Celeb-A or finding a particular feature of Celeb-A and rejecting any new images. We show samples from Celeb-A, the typical set and the anomaly set in figure 2. By example it is reasonable to ask (a) Celeb A (b) Typical Set (c) Anomaly Set Figure 2. Images from celeb A 2a, from the typical set 2b and from the anomaly set 2c. It is very clear when an image is an anomaly and when it is not. Our typical set is similar to celeb-A with recent new images collected after celeb-A was created, ensuring no overlaps with celeb-A images. However, there are some slight features of Celeb-A images that are noticeably different from our typical set. For example, the resolution of the images seems to be slightly different. an anomaly detection method to identify images from the anomaly set without identifying images from the typical set. Our experiments are modeled on the set experiment presented in (Zaheer et al., 2017). They form a set of 16 images from Celeb-A where 15 images share at two attributes, and one image differs. The goal is to identify the image with different attributes. We adjust this slightly. Large sets are more indicative of performance for real world anomaly detection, where the goal is to identify one image in thousands rather than one image in ten. However, using large sets is significantly more difficult so we report recall at 1, 5, and 10 rather than just reporting recall at 1. Note that at no point does any method have access to labels, which are revealed only to evaluate the experiment. We believe this is a better model for detecting rare anomalies. Evaluating anomaly detection: We select one image from the anomaly set, and between 15 and 299 images from the 30,000 celeb-A held out images (without consideration of attributes, in contrast to (Zaheer et al., 2017)). We then score each image using our feature and a variety of scoring methods (section 6.1) to evaluate recall for the anomaly image, averaged over 10,000 sets. As figure 4 shows, recall is strong even from large sets, and the choice of score appears not to matter. Detecting Anomalous Faces with ‘No Peeking’ Autoencoders Control: Strong results could be caused by some special feature of celeb-A images. To control for this possibility, we repeat the anomaly detection experiment, but replacing the image from the anomaly set with an image from the typical set (100 typical images not from celeb-A). If celeb-A were wholly representative, then this experiment should produce recalls at chance. As figure 4 shows, the results are not at chance (there is something interesting lurking in celeb-A), but recall is very much weaker than for anomalies. The performance of the anomaly detector cannot be explained by quirks of celeb-A 6.1. Unsupervised Feature Learning We use our regular grid of residual features for 32x32 patches with a 32 pixel edge exclusion and explore a variety of methods for turning the residual features into an anomaly score. The L∞ norm over the feature vector makes up our main method due to its simplicity and good performance. It is not obvious that this is a good choice, and for a general feature, this norm would be largely meaningless. However, as demonstrated in the attribute classification task our features are designed to be well suited to this norm. For our feature, the L∞ norm finds the most violated residual from the set of patches, which is obviously useful for anomalies that tend to occur locally. The Local False Discovery Rate (lfdr) is a construction that identifies the probability that an item comes from a null distribution, without knowing what the null is (Efron, 2007). The method originates in multiple hypothesis testing, assuming that most observations come from the null. Assume the null distribution is fo (z), the non-null is f1 (z), and the prior an item comes from the null is πo . Then the lfdr is p(null|z) = πo fo (z) πo fo (z) + (1 − πo )f1 (z) (3) Small values suggest an item is worth investigating (i.e., anomalous). Estimation is complicated by the fact that neither fo (z) nor f1 (z) are known; but the assumption that πo is large, and fo (z) is ‘close’ to a standard normal distribution allows fairly accurate estimation. We used the R program locfdr. We estimated local false discovery rates using all 30200 test data items (doing so does not involve knowing which item is anomalous, so does not violate testtrain protocols). We estimate using a standardized version of the L-infinity score, and a standardized version of the log of the L-infinity score. 6.2. Results (2) As seen in figure 4, our feature performs well regardless of feature transformation applied. We report performance from (Zaheer et al., 2017) on the graph, even though their experiment is on different data. While they outperform our method for 16 image sets, using our auto-encoder residual features, we identify anomalies at rates significantly greater than chance even as the size of the set increases. Resnet-50 features (Cao et al., 2017) with a Mahalanobis Distance represents a strong baseline, however, we outperform it. There does seem to be some bias in the Celeb-A dataset being used to identify anomalies but our features and the Resnet50 features do not identify typical images at anywhere near the same rate as anomalies. The gap between performance on typical images and anomalous images is apparent and clearly significant (eg. 40 vs 20 percent for recall at 1 in a 16 image set). Let Σ−1 be the inverse covariance of X, then γ = −Σ−1/2 /N and λ = Σ−1/2 compute a transformation which under the L2 is the Mahalanobis Distance. This transformation is sensible and can be applied to the data prior to applying the L∞ norm to reweight the feature dimensions and take into account that some dimensions might be highly varying while others are not. For our autoencoder residual feature, we assume that our features are IID, so we can estimate a diagonal covariance, and we compute a robust mean and covariance by eliminating the largest and smallest values on each feature. Note that this is done without knowing which item is anomalous and thus does not violate train-test splits. For qualitative comparison, we show the median image from each decile ranked by their L∞ anomalous score in figure 3. We also show a plot of how frequently they are ranked in the top images in a set of increasing size. Anomaly images are frequently identified as the most anomalous image in a 16 image set and as a top 10 anomalous image in 128 image sets. Typical images are almost never identified as the most anomalous image in any set, and almost never identified as the top 10 in any set larger than 16. The median least anomalous image is roughly as anomalous as the median typical image. These findings are consistent with our quantitative results, which show that images from the anomalous set are identified frequently and images from the typical set are identified more often than chance, but frequently less The Mahalanobis Distance (mahal) estimates a mean and covariance from a set and then measures distance with respect to the mean and covariance. It is typical to estimate the mean and covariance on training data.The Equivariant Transform (equivariant) introduced in (Zaheer et al., 2017) can be applied in an unsupervised manner on a set of images. A sensible version looks like the Mahalanobis Distance. Recall the equivariant transform in matrix form:   X = λI + γ(11T ) X (1) Which for an element xi is equivalent to X xi x̂i = λxi + γ i Detecting Anomalous Faces with ‘No Peeking’ Autoencoders L­inf (ours) L­inf+Equivariant L_inf+lfdr L_inf+log(lfdr) Resnet(Mahal) AECode(Mahal) random_guess Deep Sets (supervised) 75 50 25 0 0 100 200 Set Size 100 100 75 75 50 25 0 300 Recall@10 Recall@1 100 Recall@5 Figure 3. Top row: images from the anomaly set sorted by their L∞ anomaly scores. The median image from each decile. Bottom row: images from the ordinary set sorted by their L∞ anomaly scores. The median image from each decile is shown. Bar charts below show how frequently the image was identified @1 (red), @5 (blue), and @10 (gray) for (top to bottom) 16, 64, 128, and 256 image sets. For anomaly images (top row), being identified frequently is better, for ordinary images (bottom row) being identified less is better. 0 100 200 Set Size 50 25 0 300 0 100 200 300 0 100 200 300 Set Size L­inf (ours) L­inf+Equivariant L_inf+lfdr L_inf+log(lfdr) Resnet(Mahal) AECode(Mahal) random_guess 75 50 25 0 0 100 200 Set Size 300 100 100 75 75 Recall@10 Recall@1 100 Recall@5 (a) Recall of images from the anomaly set 50 25 0 0 100 200 Set Size 300 50 25 0 Set Size (b) Recall of images from the typical set Figure 4. Top row: Recall at 1, 5, and 10 for various scores using our anomaly feature plotted against the size of the set from which the anomaly must be picked. We show the performance on our new data set for L∞ on the autoencoders’ inpainted features, adding equivariant transformation to our features, local false discovery rate (lfdr and log(lfdr)), and Mahalanobis distance on features drawn from Resnet50 and autoencoder’s code as our baseline. Recalls are averaged over 10000 trials, and so have very low variance. Note there is very little visible difference between the performance of the scores, all of which beat chance very strongly. The equivariant transformations does not have any major effect to the performance and our feature construction method in itself encodes a strong representation of anomaly. The star in the Recall@1 figure is reproduced from the work of Deep Sets (Zaheer et al., 2017). Though, there is no direct comparison of our method to Deep Sets, the difference in performance is an indicator of the gap between supervised and unsupervised methods. Note also the test is demanding compared to the literature; a single anomalous face must be picked from up to 300 others. However, these results might depend on some signal property of the celeb-A dataset. Bottom row shows results from our control experiment, where the image used as an anomalous image is a typical face image that doesn’t appear in celeb-A (details in section 6). Performance is not at chance (suggesting that celeb-A images have some hitherto not noted special properties) but is close. In particular, the performance of the anomaly detector on anomalous images very strongly exceeds its performance on control images, and so cannot be explained by the special properties of celeb-A (whatever they are). Detecting Anomalous Faces with ‘No Peeking’ Autoencoders often than true anomalies. 7. Conclusion We introduce the inpainting autoencoder residual as a feature for combating the overgeneralization of compression losses. This allows us to train our method solely on nonanomalous data, mimicking how a real anomaly detector must be trained. We demonstrate that our inpainting residual features are useful and work well in supervised and unsupervised settings. Though we did not see improvement in performance, it is easy to use inpainting autoencoder features with various feature transformation techniques. We also describe a standard anomaly detection experiment for evaluating future anomaly work on image sets, enabled through the collect two small datasets to augment Celeb-A. References Alpert, Sharon and Kisilev, Pavel. Unsupervised detection of abnormalities in medical images using salient features. In Ourselin, Sebastien and Styner, Martin A (eds.), SPIE Medical Imaging, pp. 903416–7. SPIE, March 2014. Arashloo, Shervin Rahimzadeh, Kittler, Josef, and Christmas, William. An Anomaly Detection Approach to Face Spoofing Detection: A New Formulation and Evaluation Protocol. IEEE Access, 5:13868–13882, 2017. Bengio, Yoshua et al. Learning deep architectures for ai. Foundations and trends R in Machine Learning, 2(1): 1–127, 2009. Berthelot, David, Schumm, Tom, and Metz, Luke. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017. Cao, Qiong, Shen, Li, Xie, Weidi, Parkhi, Omkar M, and Zisserman, Andrew. Vggface2: A dataset for recognising faces across pose and age. arXiv preprint arXiv:1710.08092, 2017. Chandola, Varun, Banerjee, Arindam, and Kumar, Vipin. Anomaly Detection: A Survey. Acm Computing Surveys, 41(3), 2009. Deecke, Lucas, Vandermeulen, Robert, Ruff, Lukas, Mandt, Stephan, and Kloft, Marius. Anomaly detection with generative adversarial networks, 2018. URL https: //openreview.net/forum?id=S1EfylZ0Z. Deshpande, Aditya, Lu, Jiajun, Yeh, Mao-Chuang, Chong, Min Jin, and Forsyth, David. Learning Diverse Image Colorization. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2877–2885. IEEE, 2017. Efron, Bradley. Size, power and false discovery rates. Ann. Statist., 35(4):1351–1377, 08 2007. doi: 10.1214/ 009053606000001460. URL https://doi.org/10. 1214/009053606000001460. Friedman, Jerome, Hastie, Trevor, and Tibshirani, Robert. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1): 1–22, 2010. URL http://www.jstatsoft.org/ v33/i01/. Goodfellow, Ian J, Pouget-Abadie, Jean, Mehdi, Mirza, Xu, Bing, Warde-Farley, David, Ozair, Sherjil, Courville, Aaron, and Bengio, Yoshua. Generative Adversarial Networks. In NIPS, June 2014. Hasler, D, Sbaiz, L, Susstrunk, S, and Vetterli, M. Outlier modeling in image matching. IEEE TPAMI, 25(3):301– 315, March 2003. Hinton, Geoffrey E and Salakhutdinov, Ruslan R. Reducing the dimensionality of data with neural networks. science, 313(5786):504–507, 2006. Hinton, Geoffrey E and Zemel, Richard S. Autoencoders, minimum description length and helmholtz free energy. In Advances in neural information processing systems, pp. 3–10, 1994. Jindong Gu, Matthias Schubert and Tresp, Volker. Semisupervised outlier detection using generative and adversary framework, 2018. URL https://openreview. net/forum?id=BkS3fnl0W. Kingma, Diederik P and Welling, Max. Auto-Encoding Variational Bayes. In ICLR, 2014. Kliger, Mark and Fleishman, Shachar. Novelty detection with GAN, 2018. URL https://openreview. net/forum?id=Hy7EPh10W. Lample, Guillaume, Zeghidour, Neil, Usunier, Nicolas, Bordes, Antoine, Denoyer, Ludovic, and Ronzato, MarcAurelio. Fader Networks: Manipulating Images by Sliding Attributes. arXiv.org, pp. 1–10, June 2017. Liu, Ziwei, Luo, Ping, Wang, Xiaogang, and Tang, Xiaoou. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015. Mahalanobis, Prasanta Chandra. On the generalized distance in statistics. National Institute of Science of India, 1936. Mak, K L, Peng, P, and Lau, H Y K. A real-time computer vision system for detecting defects in textile fabrics. In 2005 IEEE International Conference on Industrial Technology, pp. 469–474. IEEE, 2005. Detecting Anomalous Faces with ‘No Peeking’ Autoencoders Pathak, Deepak, Krähenbühl, Philipp, Donahue, Jeff, Darrell, Trevor, and Efros, Alexei A. Context Encoders: Feature Learning by Inpainting. In Computer Vision and Pattern Recognition, April 2016. Schlegl, Thomas, Seeböck, Philipp, Waldstein, Sebastian M, Schmidt-Erfurth, Ursula, and Langs, Georg. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In International Conference on Information Processing in Medical Imaging, pp. 146–157. Springer, 2017. Schölkopf, Bernhard, Williamson, Robert C, Smola, Alex J, Shawe-Taylor, John, and Platt, John C. Support vector method for novelty detection. In Advances in neural information processing systems, pp. 582–588, 2000. Serdaroglu, A, Ertuzun, A, and Ercil, A. Defect detection in textile fabric images using wavelet transforms and independent component analysis. Pattern Recognition and Image Analysis, 16(1):61–64, 2006. Sirovich, Lawrence and Kirby, Michael. Low-dimensional procedure for the characterization of human faces. Josa a, 4(3):519–524, 1987. Vincent, Pascal, Larochelle, Hugo, Lajoie, Isabelle, Bengio, Yoshua, and Manzagol, Pierre-Antoine. Stacked Denoising Autoencoders: Learning Useful Representations in a Deep Network with a Local Denoising Criterion. The Journal of Machine Learning Research, 11:3371–3408, December 2010. Viola, Paul and Jones, Michael. Rapid object detection using a boosted cascade of simple features. In Computer Vision and Pattern Recognition, volume 1. IEEE, 2001. Yan, Xinchen, Yang, Jimei, Sohn, Kihyuk, and Lee, Honglak. Attribute2Image: Conditional Image Generation from Visual Attributes. In European Conference on Computer Vision, 2016. Zaheer, Manzil, Kottur, Satwik, Ravanbakhsh, Siamak, Poczos, Barnabas, Salakhutdinov, Ruslan R, and Smola, Alexander J. Deep Sets. In NIPS, pp. 3394–3404, 2017. Zhai, Shuangfei, Cheng, Yu, Lu, Weining, and Zhang, Zhongfei. Deep structured energy based models for anomaly detection. In International Conference on Machine Learning, pp. 1100–1109, 2016.
1cs.CV
A constant-ratio approximation algorithm for a class of hub-and-spoke network design problems and metric labeling problems: star metric case Yuko Kuroki and Tomomi Matsui Department of Industrial Engineering and Economics, Tokyo Institute of Technology arXiv:1803.06114v1 [cs.DM] 16 Mar 2018 [email protected], [email protected] Abstract Transportation networks frequently employ hub-and-spoke network architectures to route flows between many origin and destination pairs. In this paper, we deal with a problem, called the single allocation hub-and-spoke network design problem. In the single allocation hub-andspoke network design problem, the goal is to allocate each non-hub node to exactly one of given hub nodes so as to minimize the total transportation cost. The problem is essentially equivalent to another combinatorial optimization problem, called the metric labeling problem. The metric labeling problem was first introduced by Kleinberg and Tardos [29] in 2002, motivated by application to segmentation problems in computer vision and energy minimization problems in related areas. In this paper, we deal with the case where the set of hubs forms a star, which is called the star-star hub-and-spoke network design problem, and the star-metric labeling problem. This model arises especially in telecommunication networks in the case where set-up costs of hub links are considerably large or full interconnection is not required. We propose a polynomialtime randomized approximation algorithm for these problems, whose approximation ratio is less than 5.281. Our algorithms solve a linear relaxation problem and apply dependent rounding procedures. 1 Introduction Design of efficient networks is desired in transportation systems, such as telecommunications, delivery services, and airline operations, and is one of the extensively studied topics in operations research field. Transportation networks frequently employ hub-and-spoke network architectures to route flows between many origin and destination pairs. A transportation network with many origins and destinations requires a huge cost, and hub-and-spoke networks play an important role in reducing transportation costs and set-up costs. Hub facilities work as switching points for flows in a large network. Each non-hub node is allocated to exactly one of the hubs instead of assigning every origin-destination pair directly. Using hub-and-spoke architecture, we can construct large transportation networks with fewer links, which leads to smart operating systems (see Figure 1). 1 Non-Hub Hub Hub-and-Spoke Point-to-Point Figure 1: Point-to-Point vs. Hub-and-Spoke 1.1 Single Allocation Hub-and-Spoke Network Desing Problem In real transportation systems, the location of hub facilities is often fixed because of costs for moving equipment on hubs. In that case, the decision of allocating non-hubs to hubs is much important for an efficient transportation. In this study, we discuss the situation where the location of the hubs is given, and deal with a problem, called a single allocation hub-and-spoke network design problem, which aims to minimize the total transportation cost. Formally, the input consists of an h-set H of hubs, an n-set N of non-hubs, non-negative cost per unit flow c(i, j) = c(j, i) for each pair {i, j} ∈ H 2 , and c(p, i) for each ordered pair (p, i) ∈ N × H. Additionally, we are given w(p, q) which denotes a non-negative amount of flow from non-hub p to another non-hub q. The task is to find an assignment f : N → H, that maps non-hubs to hubs minimizing the total transportation cost Q(f ) defined below. The transportation cost corresponding to a flow from non-hub p to non-hub q is defined by wpq (c(p, f (p)) + c(f (p), f (q)) + c(f (q), q)). Thus Q(f ) = X w(p, q) (c(p, f (p)) + c(q, f (q)) + c(f (p), f (q))) , (p,q)∈N 2 and the goal is to find an assignment that minimizes the total transportation cost. When the number of hubs is equal to two, there exist polynomial time exact algorithm [25, 39]. Sohn and Park [40] proved NP-completeness of the problem even if the number of hubs is equal to three. In the case where the given matrix of costs between hubs is a Monge matrix, there exists a polynomial-time exact algorithm [16]. Iwasa et al. [27] proposed a simple deterministic 3-approximation algorithm and a randomized 2-approximation algorithm under the assumptions that cij ≤ cpi + cpj (∀(i, j, p) ∈ H 2 × N ) and cij ≤ cik + ckj (∀(i, j, k) ∈ H 3 ). They also proposed a (5/4)-approximation algorithm for the special case where the number of hubs is three. Ando and Matsui [2] deal with the case in which all the nodes are embedded in a 2-dimensional plane and the transportation cost of an edge per unit flow is proportional to the Euclidean distance between the 2 end nodes of the edge. They proposed a randomized (1 + 2/π)-approximation algorithm. In the previous our work [33], we proposed 2(1 + h1 )-approximation algorithm for the case where the set of hubs forms a cycle. 1.2 Metric Labeling Problem In 2002, Kleinberg and Tardos [29] introduced the metric labeling problem, motivated by applications to segmentation problems in computer vision and energy minimization problems in related areas. A variety of heuristics that use classical combinatorial optimization techniques have developed in these fields ([7, 8, 32, 35] for example). A single allocation hub-and-spoke network design problem includes a class of the metric labeling problem. The metric labeling problem captures a broad range of classification problems and has connections to Markov random field. In such classification problems, the goal is to assign labels to some given set of objects minimizing the total cost of labeling. Formally, the metric labeling problem takes as input an n-vertex undirected graph G(V, E) with a nonnegative weight function w on the edges, a set L of labels with metric distance function d : L × L → R associated with them, and an assignment cost c(v, a) for each vertex v ∈ V and label a ∈ L. The output is an assignment for every object v ∈ V to a label a ∈ L. Given a solution f : V → L to the metric labeling, the quality of labeling Q(f ) is based on the contribution of two sets of terms. Vertex labeling cost: For each object v ∈ V , this cost is denoted by c(v, f (v)). A vertex labeling cost c(v, a) express an estimate of its likelihood of having each label a ∈ L. These likelihoods are observed from some heuristic preprocessing of the data. For example, suppose the observed color of pixel (i.e., object) v is white; then the cost c(v, black) should be high while c(v, white) should be low. Edge separation cost: For each edge e = {u, v} ∈ E, the cost is denoted by w({u, v}) · d(f (u), f (v)). The weights of the edges express a prior estimate on relationships among objects; if u and v are deemed to be related, then we would like them to be assigned close or identical labels. A distance d(a, b) for a, b ∈ L represents how similar label a and b are. For example, d(white, black) would be large while d(orange, yellow) would be small. If we assign label a to object u and label b to object v, then we pay w({u, v})d(a, b) as the edge separation cost. Thus, X X Q(f ) = c(u, f (u)) + w({u, v})d(f (u), f (v)), u∈V {u,v}∈E and the goal is to find a labeling f : V → L minimizing Q(f ). Due to the simple structure and variety of applications, the metric labeling has received much attention since its introduction by Kleinberg and Tardos [29]. In case the number of labels is two, the problem can be solved precisely in polynomial-time. The first approximation algorithm for the metric labeling problem was shown by Kleinberg and Tar3 dos [29], and its approximation ratio is O(log k log log k), where k denotes the number of labels. This algorithm uses the probabilistic tree embedding tequnique [5]. Using the improved representation of metrics as combination of tree metrics by Fakcharoenphol, Rao, and Talwar [24], its approximation ratio was improved to O(log k), which is the best general result to date. Constant-ratio approximations are known for some special cases [4, 11, 16, 29]. 1.3 Contributions We deal with the a single assignment hub-and-spoke network design problem where the given set of hubs forms a star, and corresponding problem is called the star-star hub-and-spoke network design problems and star-metric labeling problems. In this case, each hub is only connected to a unique depot. When all the transportation cost per unit flow between the depot and each hub are same, this problem is equivalent to the uniform labeling problem (all distances of labels are equal to 1) introduced in [29] which is still NP-hard. For star-metric case, using the result of [31] for planer graphs, there exists O(1)-approximation algorithm [29]. The previous O(1)-approximation ratio is at least 6. We proposed an  improved approximation algorithm for star-metric case, and the 2 r−1 |r > 1}(≈ 5.2809 at r ≈ 1.91065). Our results give an approximation ratio is min{ log r 2 + rr2 +1 −1 important class of the metric labeling problem and hub-and-spoke network design problems, which has a polynomial time approximation algorithm with a constant approximation ratio. In case where set-up costs of hub links are considerably large, incomplete networks can be used instead of full interconnection among hub facilities. The star structures, that we discuss in this paper, frequently arise in especially telecommunication networks [34]. 1.4 Related Work Approximation Results for Metric Labeling Problems. Gupta and Tardos [26] considered an important case of the metric labeling problem, in which the metric is the truncated linear metric where the distance between i and j is given by d(i, j) = min{M, |i−j|}. Chekuri et al. [16] proposed √ (2 + 2)-approximation algorithm for the truncated linear metric, which is best known result. In the case where the metric d on a set of labels L is a planar metric, there exists O(log diam G0 )approximation to the problem from the result [31] and [29], where G0 = (L, E, w) denote the weighted connected graph. Konjevod et al. [31] showed that for any positive integer s, the metric of G without a Ks,s minor can be probabilistically approximated by a special case of tree metric, called r-hierarchically well separated tree (r-HST) with distortion O(log diam G). Kleinberg and Tardos [29] gave a constant ratio approximation algorithm to the metric labeling for the case where the metric d on a set of labels is the r-HST metric. Then O(log diam G0 )-approximation was guaranteed by combining these results for this case. Inapproximability Results. Chuzhoy and Naor [17] showed that there is no polynomial time 4 Table 1: Existing approximation algorithms for metric labeling problems Metric general planar graph truncked linear uniform App. Ratio O(log k) [24, 29] 0 O(log diam √ G ) [29, 31] 2 + 2 [16] 2 [29] approximation algorithm with a constant ratio for the metric labeling problem unless P = NP. Moreover, they proved that the problem is Ω((log |V |)1/2−δ )-hard to approximate for any constant δsatisf ying0 < δ < 1/2, unless NP⊆DTIME(npoly(log n) ) (i.e. unless NP has quasi-polynomial time algorithms). In 2011, Andrew et al. [3] introduced capacitated metric labeling, in which there are additional restrictions that each label i receives at most li nodes. They proposed a polynomial-time, O(log |V |)approximation algorithm when the number of labels is fixed and proved that it is impossible to approximate the value of an instance of capacitated metric labeling to within any finite ratio, unless P = NP. Hub Location Problems. Hub location problems (HLPs) consist of locating hubs and designing hub networks so as to minimize the sum of set-up costs and transportation costs. HLPs are formulated as a quadratic integer programming problem by O’Kelly [36] in 1987. Since O’Kelly proposed HLPs, hub location has been studied by researchers in different areas such as location science, geography, operations research, regional science, network optimization, transportation, telecommunications, and computer science. Many researches on HLPs have been done in various applications and there exists several reviews and surveys (see [1,12,15,18,30,37] for example). In case where the location of the hubs is given, the remaining subproblem is essentially equal to the single allocation hub-and-spoke network design problem mentioned in previous subsections. Fundamental HLPs assume a full interconnection between hubs. Recently, several researches consider incomplete hub networks which arise especially in telecommunication systems (see [1, 10, 13, 14] for example). These models are useful when set-up costs of hub links are considerably large or full interconnection is not required. That motivated us to consider a single allocation hub-andspoke network design problem where the given set of hubs forms a star (see Figure 2). There are researches which assume that hub networks constitute a particular structure such as a line [22], a cycle [21], tree [19, 20, 23, 28, 38, 41], a star [34, 42, 43]. 5 (a) (b) (c) (d) Figure 2: Structure of (a) line-star, (b) cycle-star, (c) tree-star, and (d) star-star 1.5 Paper Organization This paper is structured as follows In Section 2, we provide a problem formulation. In Section 3, we describe an approximation algorithm. In Section 4, we analyze the approximation ratio of our algorithm. 2 Problem Formulation Let H = {1, 2, . . . , h} be a h (≥ 3)-set of hub nodes and let N = {p1 , p2 , . . . , pn } be a n-set of non-hub nodes. This paper deals with a single assignment hub network design problem which assigns each non-hub node to exactly one hub node. We discuss the case in which the set of hubs forms a star, and the corresponding problem is called the star-star hub-and-spoke network design problem and/or star-metric labeling problem. More precisely, we are given a unique depot, denoted by 0, which lies at the center of hubs. Each hub i ∈ H connects to the depot and doesn’t connect to other hubs. Let `i be the transportation cost per unit flow between the depot and a hub i. In our setting, we assume that 0 ≤ `1 ≤ `2 ≤ · · · ≤ `h and `i ∈ Z for all i ∈ H. Then for each pair of hub nodes (i, j) ∈ H, cij denotes the transportation cost per unit flow between hub i and hub j and it satisfies that cij = `i + `j . We assume cii = 0 for all i ∈ H. For each ordered pair (p, i) ∈ N × H, cpi denotes a non-negative cost per unit flow on an undirected edge {p, i}. We denote a given non-negative amount of flow from a non-hub p to another non-hub q by wpq (≥ 0). Throughout this paper, we assume that wpp = 0 (∀p ∈ N ). We discuss the problem for finding an assignment of non-hubs to hubs which minimizes the total transportation cost defined below. When non-hub p and non-hub q (p 6= q) are assigned to hub i and hub j, respectively, an amount 6 ℓ1 𝑐𝑝1 0 1 0 ℓ3 3 𝑐𝑝1 𝑐𝑞3 𝑤𝑝𝑞 𝑝∈𝑁 1 3 𝑤𝑝𝑞 𝑝∈𝑁 𝑞∈𝑁 𝑐𝑞1 𝑞∈𝑁 Figure 3: Examples of transportation of flow wpq is sent along a path ((p, i), (i, 0), (0, j), (j, q)). In the rest of this paper, a matrix C = (cij ) defined above is called the cost matrix and/or the star-metric matrix. The transportation cost corresponding to a flow from the origin p ∈ N to destination q ∈ N is defined by wpq (cpi + cij + cqj ). In case where h = 3 and `1 = `2 = `3 = 1, the corresponding problem is equivalent to the problem where a 3-set of hubs forms a complete graph and C satisfies that c12 = c23 = c31 = 2. Thus the star-star hub network design problem is NP-hard [40]. Now we formulate our problem as 0-1 integer programming. First, we introduce a 0-1 variable xpi for each pair {p, i} ∈ N × H as follows: ( xpi = 1 (p ∈ N is assigned to i ∈ H), 0 (otherwise). P Since each non-hub is connected to exactly one hub, we have a constraint i∈H xpi = 1 for each p ∈ N . Then, the star-star hub network design problem (star-metric labeling problem) can be formulated as follows:  X X X X SHP: min. wpq cpi xpi + cqj xqj + `k |xpk − xqk | (p,q)∈N 2 , p6=q s. t. X i∈H j∈H k∈H (∀p ∈ N ), xpi = 1 i∈H xpi ∈ {0, 1} (∀{p, i} ∈ N × H). Next we describe a linear relaxation problem. By substituting non-negativity constraints of the variables xpi (∀{p, i} ∈ N × H) for 0-1 constraints in SHP and replace |xpk − xqk | with Zpqk , we 7 obtain the following a linear relaxation problem denoted by LRP.  LRP: X min. (p,q)∈N 2 , s. t. X wpq X cpi xpi + i∈H p6=q X cqj xqj + j∈H X `k Zpqk  k∈H (∀p ∈ N ), xpi = 1 i∈H 0 ≤ xpi (∀{p, i} ∈ N × H), − Zpqk ≤ xpk − xqk ≤ Zpqk (∀(p, q) ∈ N 2 , ∀k ∈ H). We can solve LRP in polynomial time by employing an interior point algorithm. 3 Algorithm We now design an approximation algorithm. The approach is proceeded as follows: Step 1. Choose λ ∈ [0, 1) uniformly at random and classify the hubs under κmax + 1 classes according to Definition 1. Step 2. Solve the linear relaxation problem LRP and obtain an optimal solution x∗ . Step 3. Find a partition of non-hubs by Algorithm 1. Step 4. Assign each non-hub to a hub by Algorithm 2. Now, we describe our algorithm precisely. In Step 1, we classify the set of hubs according to the distance between each hub and the depot (see Figure 4). We assign each hub to a class. This classification is based on the following definition. Definition 1. For any λ ∈ [0, 1), we say that hub i belongs to class κ if and only if `i (≥ 1) satisfies the inequality rmax{(κ−2)+λ,0} ≤ `i < r(κ−1)+λ and hub i belongs to class 0 if and only if `i = 0, where κ is a non-negative integer. 0 𝐻2 𝐻1 𝐻0 Class 0 ℓ1 Class 1 𝑟0 𝐻3 Class 2 𝑟𝜆 Class 3 𝑟1+𝜆 𝑟 2+𝜆 Figure 4: Classification of Hubs Before we describe the details of later steps, we introduce some notations. Let α(λ, i) be the class of hub i ∈ H. We denote a subset of integers {0, 1, 2, ..., κmax } by [κmax ] where κmax = 8 Algorithm 1: Classify each non-hub into a class Require: An optimal solution x∗ of LRP and a total order π of the hubs. Ensure: A partition of non-hubs N0 , N1 , · · · , Nκmax . 1: Set Ni = ∅ (∀i ∈ [0, 1, . . . , κmax ]) 2: Generate a random variable U which follows a uniform distribution defined on [0, 1). 3: for p ∈ N do 4: Insert non-hub p into a subset Nα(λ,π(i)) , where i ∈ {1, 2, . . . , |H|} is the minimum number that satisfies U < xpπ(1) + xpπ(2) + · · · + xpπ(i) . 5: end for 6: return N0 , N1 , · · · , Nκmax . maxi∈H α(λ, i). Let Hκ be a subset of hubs that belongs to class k ∈ [κmax ] i.e. Hκ = {i ∈ H | α(λ, i) = κ}. Let β(p) be the class that non-hub p ∈ N belongs to. We denote a subset of non-hubs that belong to class κ ∈ [κmax ] by Nκ i.e. Nκ = {p ∈ N | β(p) = κ}. In Step 2, we solve the linear relaxation problem LRP formulated in the previous subsection. We use an optimal solution x∗ in Algorithm 1 and Algorithm 2. In Step 3, we assign each non-hubs to a class of hubs defined by Definition 3. For example, if non-hub p1 belongs to the subset N3 obtained by Algorithm 1, p1 will be assigned to one of hubs in H3 defined by Definition 3. Given an optimal solution of LRP and a total order of the hubs, Algorithm 1 outputs a partition of non-hubs, N0 , N1 , · · · , Nκmax . Here, a total order of hubs depends on labels of classes. For example, the total order of hubs in Figure 5 is (5, 4, 1, 3, 2). The order of class labels π 0 is (κmax , , . . . , 4, 2, 0, 1, 3, . . . , κmax − 1) when κmax is an even number, and (κmax − 1, . . . , 4, 2, 0, 1, 3, . . . , κmax ) when κmax is an odd number. The order of class labels in Figure 5 is (2, 0, 1, 3) for example. For each non-hub p, we place xpi for i ∈ Hκ in the order of class labels. Then, the total order of hubs π is defined as  any order of hubs in Hπ0 (1) , any order of hubs in Hπ0 (2) , . . . , any order of hubs in Hπ0 (κmax +1 ) in our rounding scheme, where π 0 (i) denotes the i-th element of π 0 . In Step 4, we decide an assignment from non-hubs to hubs using rounding technique. In Algorithm 2, we perform a rounding procedure for each subset of non-hubs. For a subset Nκ ⊆ N , we first choose hub i ∈ Hκ and U ∈ [0, 1) uniformly at random. Then, if U ≤ x∗pi , we assign non-hub p to hub i (see Figure 6). Until all the non-hubs are assigned to one of hubs, we continue this procedure. Note that in each phase we can set the upper bound of U to the maximum value of xpi of remained non-hubs. 4 Analysis of Approximation Ratio  r−1 In this subsection, we show that our algorithm obtains a min{ log r 2+ approximate solution for any instance. 9 r2 +1 r2 −1  |r > 1} ≈ 5.2809- 1 𝑈 𝑥𝑝∗1 2 𝑥𝑝∗1 3 𝑥𝑝∗∗1 1 𝑥𝑝1 𝑥𝑝∗1 4 0 𝑥𝑝∗1 5 Non-hub 𝑝1 𝑝2 𝑝3 ・・・ Figure 5: Dependent rounding procedure to classify each non-hub into a class 1 𝑈 𝑥𝑝∗4 4 𝑥𝑝∗1 4 𝑥𝑝∗2 4 𝑥𝑝∗5 4 𝑥𝑝∗3 4 0 Non-hub 𝑝1 𝑝2 𝑝3 𝑝4 𝑝5 Figure 6: Non-hub p1 and p4 are assigned to hub 4 by this phase, where Hκ = {4, 5} and Nκ = {p1 , p2 , p3 , p4 , p5 } 10 Algorithm 2: Assign each non-hub to a hub Require: An optimal solution x∗ of LRP and κmax + 1 subsets of non-hubs N0 , . . . , Nκmax . Ensure: An assignment from non-hubs to hubs X. 1: for κ = 0, 1, . . . , κmax do 2: Initialize S ← Nκ 3: while |S| > 0 do 4: Choose hub i ∈ Hκ uniformly at random. 5: Choose U ∈ [0, 1) uniformly at random. 6: for p ∈ S do 7: if U ≤ x∗pi then Xpi = 1, Xpj = 0 (∀j ∈ Hκ \ {i}) 8: S ← S \ {p}. 9: end for 10: end while 11: end for 12: return X. Notation. We introduce some notations that we use throughout this subsection. Let α(λ, i) be the class of hub i ∈ H. For any i ∈ H, let define u(λ, i) = r(α(λ,i)−1)+λ if `i ≥ 1, u(λ, i) = 0 if `i = 0, where r is a real number satisfying r > 1, i.e., ( u(λ, i) = rα(λ,i)+λ−1 (`i ≥ 1), 0 (`i = 0). Let define a cost ĉij for each pair {i, j} ∈ H 2 as follows: ( ĉij = |u(λ, i) − u(λ, j)| (α(λ, i) = α(λ, j) (mod 2)), u(λ, i) + u(λ, j) (otherwise). Remark. A metric defined by Ĉ = ĉij becomes a line metric (see Figure 7). Thus the matrix Ĉ is a Monge matrix. Class 3 5 4 Class 2 Class 1 1 0 3 2 𝑢(𝜆, 1) Figure 7: A metric defined by Ĉ Now we start with the following lemma. Lemma 1. Let x∗ be an optimal solution of LRP. A vector of random variables X obtained by the proposed algorithm satisfies that Pr[Xpi = 1] = x∗pi (∀p ∈ N, ∀i ∈ H). 11 Proof. Pr[Xpi = 1] = Pr[p ∈ N is classified into Nα(λ,i) ] Pr[p ∈ N is assigned to i(∈ H)]   X x∗pi /|H α(λ,i) | ∗   = = x∗pi . xpj P ∗ α(λ,i) | j:α(λ,j)=α(λ,i) xpj /|H j:α(λ,j)=α(λ,i) Lemma 2. For any pair of hubs {i, j} ∈ Hκ × Hκ0 , any real number r > 1, and any real number 2 +1 λ ∈ [0, 1), we have the inequality u(λ, i) + u(λ, j) ≤ rr2 −1 ĉij , where κ, κ0 ∈ [κmax ] and κ 6= κ0 . Proof. (Case i) κ − κ0 ≡ 0 ( mod 2) In this case, it is obvious that u(λ, i) + u(λ, j) u(λ, i) + u(λ, j) max{u(λ, i), u(λ, j)} − min{u(λ, i), u(λ, j)} max{u(λ, i), u(λ, j)} − min{u(λ, i), u(λ, j)} max{u(λ, i), u(λ, j)} + min{u(λ, i), u(λ, j)} = ĉij max{u(λ, i), u(λ, j)} − min{u(λ, i), u(λ, j)} r2 max{u(λ, i), u(λ, j)} + r2 min{u(λ, i), u(λ, j)} = 2 ĉij . r max{u(λ, i), u(λ, j)} − r2 min{u(λ, i), u(λ, j)} = Recall that k 6= κ0 and k − κ0 ≡ 0 ( mod 2), and thus it holds that r2 min{u(λ, i), u(λ, j)} ≤ max{u(λ, i), u(λ, j)} for any pair of hubs {i, j} ∈ Hκ × Hκ0 . Then we get r2 max{u(λ, i), u(λ, j)} + r2 min{u(λ, i), u(λ, j)} ĉij r2 max{u(λ, i), u(λ, j)} − r2 min{u(λ, i), u(λ, j)} r2 max{u(λ, i), u(λ, j)} + max{u(λ, i), u(λ, j)} r2 + 1 ≤ 2 ĉij = 2 ĉij . r max{u(λ, i), u(λ, j)} − max{u(λ, i), u(λ, j)} r −1 (Case ii) κ − κ0 ≡ 1 ( mod 2) From the definition, we have that u(λ, i) + u(λ, j) = ĉij ≤ r2 + 1 ĉij . r2 − 1 Lemma 3. Let X be a vector of random variables obtained by the proposed algorithm and let x∗ be an optimal solution of LRP. For any pair of non-hubs (p, q) ∈ N 2 and any real number λ ∈ [0, 1), 12 we have the following inequality   X E X (`i + `j )Xpi Xqj  ≤ 2 κ∈[κmax ] (i,j)∈Hκ2 :i6=j X u(λ, i)|x∗pi − x∗qi |. i∈H Proof. First, for any integer κ ∈ [κmax ], we show that   X E (`i + `j )Xpi Xqj  ≤ 2 (i,j)∈Hκ2 :i6=j X u(λ, i)|x∗pi − x∗qi |. (4.1) i∈Hκ (Case i) κ = 0 hP i P We can see that E (` + ` )X X = 0 (∵ ∀(i, j) ∈ H02 , `i = `j = 0) and i∈Hκ u(λ, i)|x∗pi − 2 i j pi qj (i,j)∈H0 :i6=j x∗qi | = 0 (∵ ∀i ∈ H 0 , u(λ, i) = 0). Then we obtain the inequality (4.1) for this case. (Case ii) κ ∈ {1, 2, . . . , κmax } In this case, it is easy to see that  E  X (`i + `j )Xpi Xqj  = (i,j)∈Hκ2 :i6=j ≤ X X ((`i + `j )Pr[Xpi = Xqj = 1]) (i,j)∈Hκ2 :i6=j 2rκ+λ−1 Pr[Xpi = Xqj = 1] (∵ ∀i ∈ Hκ , `i ≤ 2rκ+λ−1 ) (i,j)∈Hκ2 :i6=j = 2rκ+λ−1 X Pr[Xpi = Xqj = 1]. (4.2) (i,j)∈Hκ2 :i6=j We say that non-hub p and non-hub q are separated by a single phase in Algorithm 2 if both p and q are unassigned before the phase and exactly one of p and q is assigned in this phase (See Figure 8). Note that even if p and q are separated by some phase, they may be assigned to a mutual hub later. 1 𝑈 ∗ 𝑥𝑝𝑘 ∗ 𝑥𝑞𝑘 0 𝑥𝑝∗1 𝑘 𝑥𝑝∗2 𝑘 𝑥𝑝∗3 𝑘 Figure 8: Non-hub p and non-hub q are separated in this phase. 13 P The probability (i,j)∈Hκ2 :i6=j Pr[Xpi = Xqj = 1] in the right-hand side of inequality (4.2) is the probability that both non-hub p and q are classified into Nκ by Algorithm 1 and non-hub p and q are assigned to different hubs by Algorithm 2. This probability can be bounded by the probability that both non-hub p and q are classified into Nκ by Algorithm 1 and non-hub p or q are separated by some phase in Algorithm 2. Then for any κ ∈ {1, 2, . . . , κmax }, we have that X X Pr[Xpi = Xqj = 1] = Pr[β(p) = β(q) = κ]Pr[Xpi = Xqj = 1 β(p) = β(q) = κ] (i,j)∈Hκ2 :i6=j (i,j)∈Hκ ,i6=j ≤ Pr[β(p) = β(q) = κ] X |x∗pk − x∗qk |/|Hκ | k∈Hκ max{x∗pk , x∗qk }/|Hκ | . Thus, we obtain that X 2rκ+λ−1 Pr[Xpi = Xqj = 1] (i,j)∈Hκ2 :i6=j P ∗ ∗ i∈Hκ |xpi − xqi |/|Hκ | ≤ 2r Pr[β(p) = β(q) = κ] P ∗ ∗ i∈Hκ max{xpi , xqi }/|Hκ | P ∗ ∗ i∈Hκ |xpi − xqi | P ≤ 2rκ+λ−1 Pr[β(p) = k] ∗ i∈Hκ xpi X X x∗pi ) = 2rκ+λ−1 |x∗pi − x∗qi | (∵ Pr[β(p) = κ] = κ+λ−1 i∈Hκ =2 X i∈Hκ rκ+λ−1 |x∗pi − x∗qi | = 2 i∈Hκ X u(λ, i)|x∗pi − x∗qi |. i∈Hκ Then we have inequality (4.1) for this case. From inequality (4.1), we have the desired result:  E  X X (`i + `j )Xpi Xqj  ≤ 2 κ∈[κmax ] (i,j)∈Hκ2 :i6=j X u(λ, i)|x∗pi − x∗qi |. i∈H Next, to show Lemma 6, we first describe Lemma 4 and Theorem 1. Lemma 4 implies that the probability that non-hub p is classified into Nκ and non-hub q is classified into Nκ0 by Algorithm 1 P P N W where y N W is a north-west corner rule solution of the subproblem is bounded by i∈Hκ j∈H 0 ypiqj κ that is equivalent to a Hitchcock transportation problem (HTP). The detail is omitted here (see Appendix). Lemma 4. Let X be a vector of random variables obtained by the proposed algorithm, let (x, y) be a feasible solution of LRP and let y N W be a solution of HTP (defined in Appendix). obtained by north-west corner rule. For any pair of {κ, κ0 } ∈ [κmax ], κ 6= κ0 and any pair of (p, q) ∈ N 2 (p 6= q), 14 Algorithm 3: Construct y ∗ from x∗ Require: An optimal solution x∗ of LRP. Ensure: Vectors y ∗ 1: for (p, q) ∈ N 2 , p 6= q do ∗ 2: Initialize ypiqj = 0 (∀(i, j) ∈ H 2 ) ∗ 3: Set ypiqj to min{x∗pi , x∗qi } (∀i ∈ H) 4: for i = 1, 2, 3, . . . , h do 5: j←1 P ∗ 6: while k∈H ypiqk < x∗pi do P P ∗ ∗ ∗ } 7: Set ypiqj to min{x∗qj − k∈H ypkqj , x∗pi − k∈H ypiqk 8: j ←j+1 9: end while 10: end for 11: end for 12: return y ∗ we have the following inequality: X X E[Xpi Xqj ] ≤ i∈Hκ j∈Hκ0 X X NW ypiqj . i∈Hκ j∈Hκ0 The proof is omitted here (see Appendix). Next we describe well-known relation between a north-west corner rule solution of a Hitchcock transportation problem and the Monge property. Theorem 1. If a given cost matrix C = (cij ) is a Monge matrix, then the north-west corner rule solution y N W gives an optimal solution of all the Hitchcock transportation problems. Proof is omitted here (see for example [6, 9]). Next we consider that we construct a vector y ∗ from the optimal solution x∗ by Algorithm 3. A vector y ∗ is optimal to our subproblem HTP. Note that we need Algorithm 3 only for approximation analysis and we don’t use it to obtain an approximate solution. Then we have the following lemma. Lemma 5. Let x∗ be an optimal solution of LRP and let y ∗ be a vector obtained by Algorithm 3. For any pair of (p, q) ∈ N 2 (p 6= q) , we have the following inequality: X ∗ (`i + `j )ypiqj = (i,j)∈H 2 :i6=j X i∈H Proof is omitted here (see Appendix). Now we are ready to prove the following lemma. 15 `i |x∗pi − x∗qi |. Lemma 6. Let X be a vector of random variables obtained by the proposed algorithm. Let x∗ be an optimal solution of LRP, and let y ∗ be vectors obtained from the optimal solution x∗ of LRP by Algorithm 3. For any distinct pair of non-hubs (p, q) ∈ N 2 (p 6= q), any real number r > 1, and any real number λ ∈ [0, 1), we have the following inequality :   X E X X (`i + `j )Xpi Xqj  ≤ {κ,κ0 }∈[κmax ]:κ6=κ0 i∈Hκ j∈Hκ0 r2 + 1 X u(λ, i)|x∗pi − x∗qi |. r2 − 1 i∈H Proof. First, we prove the following inequality for any pair of integers {κ, κ0 } ∈ [κmax ] (κ 6= κ0 ) and any pair of non-hubs (p, q) ∈ N 2 (p 6= q) :  E  X X (`i + `j )Xpi Xqj  ≤ r2 + 1 X X ∗ (u(λ, i) + u(λ, j))ypiqj . r2 − 1 i∈Hκ j∈Hκ0 i∈Hκ j∈Hκ0 (Case i) κ, κ0 ∈ {1, 2, . . . , κmax } (κ 6= κ0 ) In this case, we have the following inequalities from the definition of u(λ, i) (i ∈ H).  E  X X (`i + `j )Xpi Xqj  i∈Hκ j∈Hκ0 ≤ X X (u(λ, i) + u(λ, j))E[Xpi Xqj ] i∈Hκ j∈Hκ0 = X X 0 (rκ+λ−1 + rκ +λ−1 )E[Xpi Xqj ] i∈Hκ j∈Hκ0 0 X X = (rκ+λ−1 + rκ +λ−1 ) i∈Hκ j∈Hκ0 16 E[Xpi Xqj ]. (5.1) Using Lemma 4, Lemma 2, and Theorem 1, we have the following inequalities. 0 X X (rκ+λ−1 + rκ +λ−1 ) E[Xpi Xqj ] (1) i∈Hκ j∈Hκ0 0 ≤ (rκ+λ−1 + rκ +λ−1 ) X X NW ypiqj (∵ Lemma 4) i∈Hκ j∈Hκ0 = X X NW (u(λ, i) + u(λ, j))ypiqj i∈Hκ j∈Hκ0 ≤ r2 + 1 X X NW ĉij ypiqj (∵ Lemma 2) r2 − 1 i∈Hκ j∈Hκ0 ≤ r2 + 1 X X ∗ ĉij ypiqj (∵ Ĉ is a Monge matrix and Theorem 1.) r2 − 1 i∈Hκ j∈Hκ0 ≤ r2 +1 X X ∗ (u(λ, i) + u(λ, j))ypiqj r2 − 1 i∈Hκ j∈Hκ0 Then we obtained inequality (5.1) for this case. (Case ii) κ = 0 or κ0 = 0 0 We can show inequality (5.1) for this case by substituting rκ+λ−1 + rκ +λ−1 in (Case i) by either 0 rκ+λ−1 or rκ +λ−1 . Then we obtain that   X X X (`i + `j )Xpi Xqj  E {κ,κ0 }∈[κmax ]:κ6=κ0 i∈Hκ j∈Hκ0 ≤ ≤ = r2 + 1 r2 − 1 r2 + 1 r2 − 1 X X X ∗ (u(λ, i) + u(λ, j))ypiqj (∵ inequality (5.1)) {κ,κ0 }∈[κmax ]:κ6=κ0 i∈Hκ j∈Hκ0 X ∗ (u(λ, i) + u(λ, j))ypiqj . (i,j)∈H 2 :i6=j r2 + 1 X u(λ, i)|x∗pi − x∗qj |. (∵ Lemma 5 for u(λ, i) instead of `i ) r2 − 1 i∈H Now, we are ready to show our main theorem.   r2 +1 r−1 2 + Theorem 2. The proposed algorithm is min{ log |r > 1}(≈ 5.2809 at r ≈ 1.91065)– 2 r r −1 approximation algorithm for star-star hub-and-spoke network design problems and star-metric labeling problems. Proof. Let X be a vector of random variables obtained by the proposed algorithm and let (x∗ , y ∗ ) 17 be an optimal solution of LRP. For any real number λ ∈ [0, 1), we have that E[Z] = E     X wpq  (p,q)∈N 2 :p6=q X cpi Xpi + i∈H X cqj Xqj + = (p,q)∈N 2 :p6=q wpq  (`i + `j )Xpi Xqj  (i,j)∈H 2 :i6=j j∈H  X X   X cpi x∗pi + i∈H X cqj x∗qj + E  X X (`i + `j )Xpi Xqj  κ∈[κmax ] (i,j)∈Hκ2 :i6=j j∈H   X +E  X X (`i + `j )Xpi Xqj  (∵ Lemma 1) {κ,κ0 }∈[κmax ]:κ6=κ0 i∈Hκ j∈Hκ0 ≤ X (p,q)∈N 2 :p6=q = X (p,q)∈N 2 :p6=q  X X X wpq  cpi x∗pi + cqj x∗qj + 2 u(λ, i)|x∗pi − x∗qi | i∈h j∈H i∈H ! r2 + 1 X + 2 u(λ, k)|x∗pk − x∗qk | (∵ Lemma 3 and Lemma 6) r −1 k∈H    X 2+1 X X r wpq  cpi x∗pi + cqj x∗qj + 2 + 2 u(λ, k)|x∗pk − x∗qk | r −1 i∈H j∈H (6.1) k∈H where Z denotes the objective value of a solution obtained by the proposed algorithm. Let Λ ∈ [0, 1) be a uniform random variable. The expected value of u(Λ, k) for all k ∈ H and for all r > 1 is R1 r−1 E[u(Λ, k)] = 0 rΛ `k dΛ = log r `k . Thus, from the above discussion and inequality (6.1) which holds for any Λ ∈ [0, 1), we have that    X 2 X X X r +1 E[Z] ≤ wpq  cpi x∗pi + cqj x∗qj + 2 + 2 E[u(Λ, k)]|x∗pk − x∗qk |. r − 1 j∈H i∈h k∈H (p,q)∈N 2 :p6=q    X 2+1 X X X r − 1 r = wpq  cpi x∗pi + cqj x∗qj + 2+ 2 `k |x∗pk − x∗qk |. log r r − 1 j∈H i∈h k∈H (p,q)∈N 2 :p6=q     2 r−1 r +1 = min 2+ 2 |r > 1 (optimal value of LRP) log r r −1     r−1 r2 + 1 ≤ min 2+ 2 |r > 1 (optimal value of the original problem SHP). log r r −1   r−1 r2 +1 Note that when r > 1, f (r) = log 2 + is minimized at r∗ ≈ 1.91065 and we get f (r∗ ) ≈ 2 r r −1 5.2809. Then we obtain the desired result. 18 5 Conclusion In this paper, we have studied hub-and-spoke network design problems, motivated by the application to achieve efficient transportation systems. we considered the case where the set of hubs forms a star, and introduced a star-star hub-and-spoke network design problem and star-metric labeling problem. The star-metric labeling includesothe uniform labeling problem which is still n problem  r−1 r2 +1 NP-hard. We proposed min log r 2 + r2 −1 |r > 1 (≈ 5.2809 at r ≈ 1.91065)–approximation algorithm for star-star hub-and-spoke network design problems and star-metric labeling problems. Our algorithms solve a linear relaxation problem and apply dependent rounding procedures. Appendix Hitchcock Transportation Problems and North-West Corner Rule A Hitchcock transportation problem is defined on a complete bipartite graph consists of a set of supply points A = {1, 2, . . . , I} and a set of demand points B = {1, 2, . . . , J}. Given a pair of nonP P negative vectors (a, b) ∈ RI × RJ satisfying Ii=1 ai = Jj=1 bj and an I × J cost matrix C = (cij ), a Hitchcock transportation problem is formulated as follows: HTP(a, b, C) : min. I X J X cij yij i=1 j=1 s. t. J X yij = ai (i ∈ {1, 2, . . . , I}), yij = bj (j ∈ {1, 2, . . . , J}), j=1 I X i=1 yij ≥ 0 (∀(i, j) ∈ {1, 2, . . . , I} × {1, 2, . . . , J}), where yij denotes the amount of flow from a supply point i ∈ A to a demand point j ∈ B. We describe north-west corner rule in Algorithm NWCR, which finds a feasible solution of Hitchcock transportation problem HTP(a, b, C). It is easy to see that the north-west corner rule solution Y = (yij ) satisfies the equalities that 0 0 j i X X i=1 j=1 yij = min  i0 X  i=1  j0  X ai , bj (∀(i0 , j 0 ) ∈ {1, 2, . . . , I} × {1, 2, . . . , J}).  j=1 Since the coefficient matrix of the above equality system is nonsingular, the north-west corner rule solution is a unique solution of the above equality system. Thus, the above system of equalities has a unique solution which is feasible to HTP(a, b, C). 19 1 Algorithm NWCR Step 1: Set all the elements of matrix Y to 0 and set the target element yij to y11 (top-left corner). Step 2: Allocate a maximum possible amount of transshipment to the target element without making the row or column total of the matrix Y exceed the supply or demand respectively. Step 3: If the target element is yIJ (the south-east corner element), then stop. Step 4: Denote the target element by yij . If the sum total of jth column of Y is equal to bj , set the target element to yij+1 . Else (the sum total of Y of ith row is equal to ai ), set the target element to yi+1j . Go to Step 2. Next we show that the subproblem of our original problem can be written as a Hitchcock transportation problem. Let (x, y) be a feasible solution of linear relaxation problem. For any p ∈ N , xp denotes a subvector of x defined by (xp1 , xp2 , . . . , xph ). When we fix variables x in LRP to x and given a pair of (p, q) ∈ N 2 (p 6= q), we can decompose the obtained problem into Hitchcock transportation problems {HTP(xp , xq , Ĉ(= ĉij )) : (p, q) ∈ N 2 } where HTP(xp , xq , Ĉ): min. XX ĉij ypiqj i∈H j∈H s. t. X ypiqj = xpi (∀i ∈ H), ypiqj = xqj (∀j ∈ H), j∈H X i∈H ypiqj ≥ 0 (∀(i, j) ∈ H 2 ). Monge Property We give the definition of a Monge matrix. A comprehensive research on the Monge property appears in a recent survey [9]. Matrices with this property arise quite often in practical applications, especially in geometric settings. Definition 2. An m × n matrix C is a Monge matrix if and only if C satisfies the so-called Monge property cij + ci0 j 0 ≤ cij 0 + ci0 j for all 1 ≤ i < i0 ≤ m, 1 ≤ j < j 0 ≤ n. Note that the north-west corner rule produces an optimal solution of Hitchcock transportation problems if the cost matrix is a Monge matrix, so we can obtain an optimal solution of HTP(xp , xq , Ĉ) by north-west corner rule [6]. 20 Proof of Lemma 4 Let X be a vector of random variables obtained by the proposed algorithm, and let (x, y) be a feasible solution of LRP. For any pair of {κ, κ0 } ∈ [κmax ] (κ 6= κ0 ) and any pair of (p, q) ∈ N 2 (p 6= q), then we have  ! X X X X E[Xpi Xqj ] ≤ xpi  xqj  i∈Hκ k∈Hκ0 i∈Hκ X = max{ xpi , i∈Hκ ≤ min{ X X ˙ xpj }min{ j∈Hκ0 X xpi , i∈Hκ j∈Hκ0 X xpi , i∈Hκ xpj }(∵ X X xpj } j∈Hκ0 xpi = 1). (6.21) i∈H j∈Hκ0 For any pair of {κ, κ0 } ∈ [κmax ] (κ 6= κ0 ) and any pair of (p, q) ∈ N 2 (p 6= q), we have the following Hitchcock transportation problems : HTP(xp , xq , Ĉ): X X min. ĉij ypiqj i∈Hκ j∈Hκ0 X s. t. ypiqj = xpi (∀i ∈ Hκ ), j∈Hκ0 X ypiqj = xqj (∀j ∈ Hκ0 ), i∈Hκ ypiqj ≥ 0 (∀(i, j) ∈ Hκ × Hκ0 ). N W ) satisfies the equalities that We see that the north-west corner rule solution y N W = (ypiqj X X NW = min ypiqj  X  i∈Hκ j∈Hκ0 i∈Hκ xpi , X j∈Hκ0 xqj   (∀{κ, κ0 } ∈ [κmax ], κ 6= κ0 ).  From the equalities and inequality (6.21), we have X X E[Xpi Xqj ] ≤ i∈Hκ k∈Hκ0 X X i∈Hκ j∈Hκ0 Thus, we have the desired result. 21 NW ypiqj . Proof of Lemma 5 Let y ∗ be the vector obtained from an optimal solution of LRP x∗ by Algorithm 3. Given any distinct pair of non-hubs (p, q) ∈ N 2 (p 6= q), we can see that X ∗ ypiqj = x∗pi (∀i ∈ H), j∈H X ∗ ypiqj = x∗qj (∀j ∈ H), i∈H X ypiqj = min{0, xpi − xqi } (∀i ∈ H), j∈H:j6=i X ypiqj = min{0, xqj − xpj } (∀j ∈ H). i∈H:i6=j Thus we have X (i,j)∈H 2 :i6=j = = X `i X ∗ (`i + `j )ypiqj = (i,j)∈H 2 :i6=j X ∗ ypiqj + i∈H j∈H:j6=i X `i min{0, x∗pi X `j j∈H − x∗qi } − x∗qi } + i∈H = X = X X ∗ `j ypiqj (i,j)∈H 2 :i6=j ∗ ypiqj i∈H:j6=i X `j min{0, x∗qj − x∗pj } j∈H `i min{0, x∗pi i∈H X ∗ `i ypiqj + + X `i min{0, x∗qi − x∗pi } i∈H `i |x∗pi − x∗qi |. i∈H Then we have the desired result. References [1] S. A. Alumur and B. Y. Kara. “Network hub location problems: The state of the art”. European Journal of Operational Research, 190:1–21, 2008. [2] R. Ando and T. Matsui. “Algorithm for single allocation problem on hub-and-spoke networks in 2-dimensional plane”. Lecture Notes in Computer Science, 7074:474–483, 2011. 22 𝒙∗𝑞 𝒙∗𝑝 0.2 1 0.2 1 0.3 0.1 0.3 0.3 0.3 2 2 𝑝 0.4 3 0.1 4 0.1 0.3 0.1 0 3 0.1 𝑞 4 0.3 0.2 Figure 9: Hitchcock transportation problems with a depot 0 [3] M. Andrews, M. T. Hajiaghayi, H. Karloff, and A. Moitra. “Capacitated metric labeling”. In Proceedings of the Twenty-Second Annual ACM-SIAM symposium on Discrete Algorithms, 976–995, 2011. [4] A. Archer, J. charoenphol, C. Harrelson, R. Krauthgamer, K. Talwar, and É. Tardos. “Approximate classification via earthmover metrics”. In Proceedings of the Fifteenth Annual ACM-SIAM symposium on Discrete algorithms, 1079–1087, 2004. [5] Y. Bartal. “On approximating arbitrary metrices by tree metrics”. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, 161–168, 1998. [6] W. Bein, P. Brucker, K. Park, and K. Pathak. “A Monge property for the d-dimensional transportation problem”. Discrete Applied Mathematics, 58:97–109, 1995. [7] Y. Boykov, O. Veksler, and R. Zabih. “Markov random fields with efficient approximations”. In Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 648–655, 1998. [8] Y. Boykov, O. Veksler, and R. Zabih. “Fast approximate energy minimization via graph cuts”. IEEE Transactions on Pattern Analysis and Machine Intelligence, 23:1222–1239, 2001. [9] R. E. Burkard, B. Klinz, and R. Rudolf. “Perspectives of Monge properties in optimization”. Discrete Applied Mathematics, 70:95–161, 1996. 23 [10] H. Calik, S. A. Alumur, B. Y. Kara, and O. E. Karasan. “A tabu-search based heuristic for the hub covering problem over incomplete hubnetworks”. Computers and Operations Research, 36:3088–3096, 2009. [11] G. Călinescu, H. Karloff, and Y. Rabani. “Approximation algorithms for the 0-extension problem”. SIAM Journal on Computing, 34:358–372, 2005. [12] J. F. Campbell. “A survey of network hub location”. Studies in Locational Analysis, 6:31–47, 1994. [13] J. F. Campbell, A. T. Ernst, and M. Krishnamoorthy. “Hub arc location problems: Part I: Introduction and results”. Management Science, 51:1540–1555, 2005. [14] J. F. Campbell, A. T. Ernst, and M. Krishnamoorthy. “Hub arc location problems: Part II: Formulations and optimal algorithms”. Management Science, 51:1556–1571, 2005. [15] J. F. Campbell and M. E. O’Kelly. “Twenty-five years of hub location research”. Transportation Science, 46:153–169, 2012. [16] C. Chekuri, S. Khanna, J. Naor, and L. Zosin. “A linear programming formulation and approximation algorithms for the metric labeling problem”. SIAM Journal on Discrete Mathematics, 18:608–625, 2004. [17] J. Chuzhoy and J. Naor. “The hardness of metric labeling”. SIAM Journal on Computing, 36:1376–1386, 2007. [18] I. Contreras. “Hub location problems”. In G. Laporte, S. Nickel, and F. S. da Gama, (eds), Location Science, 311–344. Springer, Cham, 2015. [19] I. Contreras, E. Fernández, and A. Marı́n. “Tight bounds from a path based formulation for the tree of hub location problem”. Computers and Operations Research, 36:3117–3127, 2009. [20] I. Contreras, E. Fernández, and A. Marı́n. “The tree of hubs location problem”. European Journal of Operational Research, 202:390–400, 2010. [21] T. Contreras, M. Tanash, and N. Vidyarthi. “Exact and heuristic approaches for the cycle hub location problem”. Annals of Operations Research, 258:655–677, 2017. 24 [22] E. M. de Sá, I. Contreras, J. F. Cordeau, R.S. de Camargo, and G. de Miranda. “The hub line location problem”. Transportation Science, 49:500–518, 2015. [23] E. M. de Sá, R. S. de Camargo, and G. de Miranda. “An improved Benders decomposition algorithm for the tree of hubs location problem”. European Journal of Operational Research, 226:185–202, 2013. [24] J. Fakcharoenphol, S. Rao, and K. Talwar. “A tight bound on approximating arbitrary metrics by tree metrics”. Journal of Computer and System Sciences, 60:485–497, 2004. [25] D. M. Greigand, B. T. Porteous, and A. H. Seheult. “Exact maximum a posteriori estimation for binary images”. Journal of the Royal Statistical Society. Series B, 51:271–279, 1989. [26] A. Gupta and É. Tardos. “A constant factor approximation algorithm for a class of classification problems”. In Proceedings of the Thirty-Second Annual ACM Symposium on Theory of Computing, 652–658, 2000. [27] M. Iwasa, H. Saito, and T. Matsui. “Approximation algorithms for the single allocation problem in hub-and-spoke networks and related metric labeling problems”. Discrete Applied Mathematics, 157:2078–2088, 2009. [28] J. G. Kim and D. W. Tcha. “Optimal design of a two-level hierarchical network with tree-star configuration”. Computers and Industrial Engineering, 22:273–281, 1992. [29] J. Kleinberg and E. Tardos. “Approximation algorithms for classification problems with pairwise relationships”. Journal of ACM, 49:616–639, 2002. [30] J. G. Klincewicz. “Hub location in backbone/tributary network design: a review”. Location Science, 6:307–335, 1998. [31] G. Konjevod, R. Ravi, and F. S. Salman. “On approximating planar metrics by tree metrics”. Information Processing Letters, 80:213–219, 2001. [32] M. P. Kumar. “Rounding-based moves for metric labeling”. In Advances in Neural Information Processing Systems, 109–117, 2014. [33] Y. Kuroki and T. Matsui. “Approximation algorithm for cycle-star hub network design problems and cycle-metric labeling problems”. In Proceedings of the 11th International Conference and Workshops on Algorithms and Computation, 397–408, 2017. 25 [34] M. Labbé and H. Yaman. “Solving the hub location problem in a star-star network”. Networks, 51:19–33, 2008. [35] M. Li, A. Shekhovtsov, and D. Huber. “Complexity of discrete energy minimization problems”. In Proceedings of Computer Vision – ECCV 2016, 834–852, 2016. [36] M. E. O’Kelly. “A quadratic integer program for the location of interacting hub facilities”. European Journal of Operational Research, 32:393–404, 1987. [37] M. E. O’Kelly and H. J. Miller. “The hub network design problem: A review and synthesis”. Journal of Transport Geography, 2:31–40, 1994. [38] S. Sedehzadeh, R. Tavakkoli-Moghaddam, A. Baboli, and M. Mohammadi. “Optimization of a multi-modal tree hub location network with transportation energy consumption: A fuzzy approach”. Journal of Intelligent & Fuzzy Systems, 30:43–60, 2016. [39] J. Sohn and S. Park. “A linear program for the two-hub location problem”. European Journal of Operational Research, 100:617–622, 1997. [40] J. Sohn and S. Park. “The single allocation problem in the interacting three-hub network”. Networks, 35:17–25, 2000. [41] R. Tavakkoli-Moghaddam and S. Sedehzadeh. “A multi-objective imperialist competitive algorithm to solve a new multi-modal tree hub location problem”. In Proceedings of Sixth World Congress on Nature and Biologically Inspired Computing, 202–207, 2014. [42] H. Yaman. “Star p-hub median problem with modular arc capacities”. Computers and Operations Research, 35:3009–3019, 2008. [43] H. Yaman and S. Elloumi. “Star p-hub center problem and star p-hub median problem with bounded path lengths”. Computers and Operations Research, 39:2725–2732, 2012. 26
8cs.DS
Gaussian Process Model Predictive Control of Unknown Nonlinear Systems Gang Cao1,* , Edmund M-K Lai2 , Fakhrul Alam1 arXiv:1612.01211v1 [cs.SY] 5 Dec 2016 1 School of Engineering and Advanced Technology, Massey University, Auckland, New Zealand. Department of Information Technology and Software Engineering, Auckland University of Technology, Auckland, New Zealand. * [email protected] 2 Abstract: MPC of an unknown system that is modelled by GP techniques is studied in this paper. Using GP, the variances computed during the modelling and inference processes allow us to take model uncertainty into account. The main issue in using MPC to control systems modelled by GP is the propagation of such uncertainties within the control horizon. In this paper, two approaches to solve this problem, called GPMPC1 and GPMPC2, are proposed. With GPMPC1, the original SMPC problem is relaxed to a deterministic nonlinear MPC based on a basic linearized GP local model. The resulting optimization problem, though non-convex, can be solved by the SQP. By incorporating the model variance into the state vector, an extended local model is derived. This model allows us to relax the non-convex MPC problem to a convex one which can be solved by an active-set method efficiently. The performance of both approaches is demonstrated by applying them to two trajectory tracking problems. Results show that both GPMPC1 and GPMPC2 produce effective controls but GPMPC2 is much more efficient computationally. 1. Introduction MPC, also known as receding horizon control, is a class of computer control algorithms that predicts future responses of a plant based on its system model, and computes optimized control inputs by repeatedly solving a finite horizon optimization problem [1]. The advantages of MPC mainly lie in its conceptual simplicity for multiple variable problems, and its ability to handle input and output “hard-constraints” that are commonly encountered in practice but are not well addressed by other control methods. It has been applied to many different types of control problems [2, 3]. The performance of MPC is highly dependent on the accuracy of the system model that describes its dynamics. Traditionally, these models are derived mathematically. More recently, datadriven modelling approaches based on computational intelligence and machine learning techniques are becoming popular [4, 5]. This approach is especially suitable for complex and highly nonlinear systems where complete knowledge of the system dynamics is seldom available, giving rise to unmodelled dynamics or model uncertainty. From the MPC perspective, attempts to address the issue of model uncertainty has been made through RMPC schemes such as open-loop “minmax” MPC [6], closed-loop “min-max” MPC [7] and tube-based MPC [8]. “Min-max” MPC is conceptually simple. However, its control laws are computed based on worst-case scenarios and are therefore considered too conservative. Tube-based MPC overcomes this problem by combining a conventional MPC for the nominal system and a local feedback control law that steers the states of the unknown system to the inside of a “tube” centered on the nominal trajectory [9]. This “tube”, which relates to the uncertainty bounds, must be carefully defined. Otherwise, there may not be a feasible solution. The major problem with RMPC is that model uncertainties are assumed to be deterministic even though they are typically stochastic. SMPC is an alternative where model uncertainties are assumed to be stochastic with an underlying probability distribution [10, 11, 12, 13]. Control laws are computed by solving a stochastic optimization problem. Furthermore, since the state or output constraints are also probabilistic, they can be satisfied with a predefined level of confidence. This effectively alleviates the conservatism of “min-max” MPC. Furthermore, it is possible to trade-off control performance with robustness against model uncertainties by adjusting these probabilistic constraints. A key problem with SMPC is the propagation of uncertainties over a finite prediction horizon. The most common solution is to use sampling-based MC simulation techniques. However, they are computationally demanding. More recently, a technique known as polynomial chaos expansions has been proposed to lighten the computation burden [14, 13]. A model known as GP has become very useful in statistical modelling [15]. The GP variances which are computed as part of the modelling process provide a useful indication of the accuracy of the model. These variances can also be propagated in multiple-step ahead predictions. The hyperparameters of these models are learnt from data by maximizing the log-likelihood function. This optimization problem is unconstrained, nonlinear and non-convex optimization. It is typically solved by CG [15] or by PSO techniques [16, 17, 18]. A GP based MPC scheme was first introduced in [19]. Subsequently, an SMPC scheme using GP was proposed in [20]. Even though GP is a probabilistic model, the cost functions used in these papers are deterministic. Consequently, the variances could only be treated as slack variables of the state constraints. This indirect way of handling GP variances leads to a nonlinear optimization problem that is very computationally demanding to solve. More recently, in [21, 22, 23], variances are included in the cost function and can be directly handled in the optimization process. However, only unconstrained MPC have been considered. In this paper, two new GP based MPC approaches, referred to as GPMPC1 and GPMPC2, are proposed for the control of unknown nonlinear dynamical systems with input and state constraints. The GPMPC1 approach is similar to those in [19, 20] in the sense that the GP variances are considered as a slack variable in the state constraints. The main difference is that the resulting non-convex optimization problem is solved by using a SQP based method together with a linearized GP model which is called the basic GP based local model in this paper. The constrained stochastic problem is then relaxed to a deterministic one by specifying the confidence level. With GPMPC2, the nonlinear MPC problem is reformulated to a convex optimization problem. In contrast with earlier methods, GP variances are directly included in the cost function of the optimization. The solution method makes use of a modified version of the basic local model which includes the variance in the modified state variable of the system. The resulting MPC problem is efficiently solved by using an active-set method. The effectiveness of these approaches are demonstrated by applying them to two trajectory tracking problems. The rest of this paper is organized as follows. Section 2 introduces the modelling of the unknown nonlinear system by using GP models. The basic and extended GP based local dynamical models are presented in the Section 3. In Section 4, the proposed GPMPC1 and GPMPC2 are presented for the general trajectory tracking problem of the unknown nonlinear system. In addition, the feasibility and stability of the proposed algorithms are also discussed. The simulation results are next reported to demonstrate the performance of the proposed algorithms in Section 5. Finally, Section 6 draws the conclusions. 2. Unknown system modelling using GP Consider a discrete-time nonlinear dynamical system described by the following general form: xk+1 = f (xk , uk ) + wk (1) where f : Rn × Rm → Rn is a nonlinear function, w ∈ Rn represents additive external disturbances, x ∈ Rn denotes the state vector, and u ∈ Rm are control signals. In this paper, we assume that f is totally unknown but can be represented by a GP model. The uncertainty of a GP model can be measured by the GP variances. Therefore, a disturbance observer will not be required. The hyperparameters of a GP model is learnt from a set of training data consisting of inputs to the system and the system’s response as target. To model a system given by (1), a natural choice of the model inputs and their targets are the state-control tuple x̃k = (xk , uk ) ∈ Rn+m and the next state xk+1 respectively. Let ∆xk = xk+1 − xk ∈ Rn . In practice, the variation between ∆xk+1 and ∆xk is much less the variation between xk+1 and xk , for all k. Therefore it is more advantageous to use ∆xk as the model target instead [24]. This will be assumed in the rest of this paper. 2.1. GP Modelling A GP model is completely specified by its mean and covariance function [15]. Assuming that the mean of the model input x̃k is zero, the squared exponential covariance is given by K(x̃i , x̃j ) = 1 σs2 exp(− (x̃i − x̃j )T Λ(x̃i − x̃j )) + σn2 . The parameters σs2 , σn2 and the entries of matrix Λ are 2 referred to as the hyperparameters θ of a GP model. Given D training inputs X̃ = [x̃1 , · · · , x̃D ] and their corresponding training targets y = [∆x1 , · · · , ∆xD ]T , the joint distribution between y and a test target ∆x∗k for training input x̃∗k is assumed to follow a Gaussian distribution. That is, ! ! y K(X̃, X̃) + σn I K(X̃, x̃∗k ) p ∼ N 0, (2) ∆x∗k K(x̃∗k , X̃) K(x̃∗k , x̃∗k ) In addition, the posterior distribution over the observations can be obtained by restricting the joint distribution to only contain those targets that agree with the observations [15]. This is achieved by conditioning the joint distribution on the observations, and results in the predictive mean and variance function as follows: m(x̃∗k ) = Ef [∆x∗k ] = K(x̃∗k , X̃)K−1 σ y σ 2 (x̃∗k ) = Varf [∆x∗k ] = K(x̃∗k , x̃∗k ) ∗ − K(x̃∗k , X̃)K−1 σ K(X̃, x̃k ) (3a) (3b) where Kσ = K(X̃, X̃) + σn I. The state at the next sampling time also follows a Gaussian distribution. Thus, p(xk+1) ∼ N (µk+1, Σk+1) (4) where µk+1 = xk + m(x̃∗k ) (5a) 2 (5b) Σk+1 = σ (x̃∗k ) Typically, the hyperparameters of the GP model are learned by maximizing the log-likelihood function given by 1 D 1 log K−1 − log(2π) log p(y|X̃, θ) = − yT K−1 σ y− σ 2 2 2 (6) This results in a nonlinear non-convex optimization problem that is traditionally solved by using CG or BFGS algorithms. Recently, PSO based algorithms that minimizes the model error instead of the log-likelihood function have been shown in [18] to be more efficient and effective. 2.2. Uncertainty propagation With the GP model obtained, one-step-ahead predictions can be made by using (3) and (5). When multiple-step predictions are required, the conventional way is to iteratively perform multiple onestep-ahead predictions using the estimated mean values. However, this process does not take into account the uncertainties introduced by each successive prediction. This issue has been shown to be important in time-series predictions [25]. The uncertainty propagation problem can be dealt with by assuming that the joint distribution of the training inputs is uncertain and follows a Gaussian distribution. That is,  p(x̃k ) = p xk , uk ∼ N (µ̃k , Σ̃k ) (7) with mean and variance given by µ̃k = [µk , E [uk ]]T   Σk Cov [xk , uk ] Σ̃k = Cov [uk , xk ] Var [uk ] (8a) (8b) where Cov [xk , uk ] = E [xk uk ] − µk E [uk ]. Here, E [uk ] and Var [uk ] are the mean and variance of the system controls. The exact predictive distribution of the training target could then be obtained by integrating over the training input distribution: Z ∗ p(∆xk ) = p(f (x̃∗k )|x̃∗k )p(x̃∗k )dx̃∗k (9) However, this integral is analytically intractable. Numerical solutions can be obtained using Monte-Carlo simulation techniques. In [26], a moment-matching based approach is proposed to obtain an analytical Gaussian approximation. The mean and variance at an uncertain input can be obtained through the laws of iterated expectations and conditional variances respectively [24]. They are given by h  i (10a) m(x̃∗k ) = Ex̃∗k Ef ∆x∗k h i h i     (10b) σ 2 (x̃∗k ) = Ex̃∗k Varf ∆x∗k + Varx̃∗k Ef ∆x∗k Equation (5) then becomes µk+1 =µk + m(x̃∗k ) 2 (x̃∗k ) Σk+1 =Σk + σ     + Cov xk , ∆xk + Cov ∆xk , xk (11a) (11b) The computational complexity of GP inference using (10) is O(D 2 n2 (n + m)) which is quite high. Hence, GP is normally only suitable for problems with limited dimensions (under 12 as suggested by most publications) and limited size of training data. For problems with higher dimensions, sparse GP approaches [27] are often used. 3. GP Based Local Dynamical Models When dealing with the control of nonlinear systems, it is common practice to obtain local linearized models of the system around operating points. The main purpose is to reduce the computation involved in the nonlinear control problem. The same technique is used here for the GP based MPC optimization problem. The main difference here is that the model of the system is probabilistic rather than deterministic. Thus there is more than one way by which the GP model could be linearized. In [28], a GP based local dynamical model allows standard robust control methods to be used on the partially unknown system directly. Another GP based local dynamical model is proposed in [29] to integrate GP model with dynamic programming. In these two cases, the nonlinear optimization problems considered are unconstrained. In this section, we shall present two different GP based local models. They will be applied to the constrained nonlinear problems presented in Section 4. 3.1. Basic GP-based Local Model Linearization can be done based on the mean values in the GP model. In this case we replace the state vector xk by its mean µk . Then (1) becomes µk+1 = F (µk , uk ) (12) Let (µ∗k , u∗k ) be the operating point at which the linearized model is to be obtained. Given that ∆µk = µk − µ∗k and ∆uk = uk − u∗k are small, from (12), we have ∂F ∂F ∆µk + ∆uk ∂µk ∂uk ∂µk+1 ∂µk+1 ∆µk + ∆uk = ∂µk ∂uk ∆µk+1 = (13a) (13b) ∂µk+1 ∂µk+1 and are the Jacobian state and input matrices respectively. Using the chain ∂µk ∂uk rule, we get where ∂µk+1 ∂ µ̃k ∂µk+1 ∂ Σ̃k ∂µk+1 = + ∂µk ∂ µ̃k ∂µk ∂ Σ̃k ∂µk ∂µk+1 ∂µk+1 ∂ µ̃k ∂µk+1 ∂ Σ̃k = + ∂uk ∂ µ̃k ∂uk ∂ Σ̃k ∂uk (14a) (14b) where ∂ µ̃k ∂ Σ̃k ∂ µ̃k ∂ Σ̃k ∂µk+1 , , , can be easily obtained based on (8). Elaborations of and ∂µk ∂µk ∂uk ∂uk ∂ µ̃k ∂µk+1 can be found in [24]. ∂ Σ̃k 3.2. Extended GP-based Local Model Model uncertainties are characterized by the variances. However, the basic local model derived above only involves the mean values. The extended local model aims to take into account model uncertainties. Similar to what p we have done2to derive the basic model, we replace the state vector xk in (1) by sk = [µk , vec( Σk )]T ∈ Rn+n which shall be known as the “extended state”. Here, vec(·) denotes the vectorization of a matrix 1 . Hence (1) becomes sk+1 = F ′ (sk , uk ) Linearizing at the operating point (s∗k , u∗k ) where s∗k = [µ∗k , vec( ∆sk+1 (15) p Σ∗k )]T , we have ∂F ′ ∂F ′ ∆sk + ∆uk = ∂sk ∂uk Here, ∆sk = sk − s∗k and ∆uk = uk − u∗k .  ∂µk+1 ∂F ′  √∂µk =  ∂ Σk+1 ∂sk ∂µk  ∂µ k+1 ∂F ′  √∂uk = ∂ Σk+1 ∂uk ∂uk The Jacobian matrices are  ∂µk+1 √ ∂√ Σk   ∈ R(n+n2 )×(n+n2 ) ∂ Σk+1  √ ∂ Σk   (n+n2 )×m ∈R (16) (17a) (17b) with the entries given by ∂µk+1 √ ∂ Σk √ ∂ Σk+1 ∂µ √ k ∂ Σk+1 √ ∂ Σk √ ∂ Σk+1 ∂uk ∂µk+1 ∂Σk √ ∂Σk ∂ Σk √ ∂ Σk+1 ∂Σk+1 = ∂Σk+1 ∂µk √ ∂ Σk+1 ∂Σk+1 ∂Σk √ = ∂Σk+1 ∂Σk ∂ Σk √ ∂ Σk+1 ∂Σk+1 = ∂Σk+1 ∂uk = (18a) (18b) (18c) (18d) 1 Σk is a real symmetric matrix therefore can be diagonalized. The square root of a diagonal matrix can simply be obtained by computing the square roots of diagonal entries. √ √ 1 ∂ Σk+1 1 ∂ Σk , they can be expressed as = √ and = √ Since ∂Σk ∂Σk+1 2 Σk+1 2 Σk ∂µk+1 ∂µk+1 ∂ µ̃k ∂µk+1 ∂ Σ̃k = + ∂Σk ∂ µ̃k ∂Σk ∂ Σ̃k ∂Σk ∂Σk+1 ∂ µ̃k ∂Σk+1 ∂ Σ̃k ∂Σk+1 = + ∂µk ∂ µ̃k ∂µk ∂ Σ̃k ∂µk (19a) (19b) ∂Σk+1 ∂Σk+1 ∂ µ̃k ∂Σk+1 ∂ Σ̃k = + ∂Σk ∂ µ̃k ∂Σk ∂ Σ̃k ∂Σk ∂Σk+1 ∂ µ̃k ∂Σk+1 ∂ Σ̃k ∂Σk+1 = + ∂uk ∂ µ̃k ∂uk ∂ Σ̃k ∂uk (19c) (19d) ∂ µ̃k ∂ Σ̃k ∂Σk+1 ∂Σk+1 and can be easily obtained based on (8). Elaborations of and can be ∂Σk ∂Σk ∂ µ̃k ∂ Σ̃k found in [24]. 4. Model Predictive Control based on GP A discrete-time nonlinear dynamical system defined by (1) is required to track a trajectory given by {rk } for k = 1, 2, · · · . Using MPC with a prediction horizon H ≥ 1, the optimal control sequence can be obtained by solving the following problem: Vk∗ = min J (xk , uk−1 , rk ) (20a) s.t. xk+i|k = f (xk+i−1|k , uk+i−1 ) xmin ≤ xk+i|k ≤ xmax umin ≤ uk+i−1 ≤ umax i = 1, · · · , H (20b) (20c) (20d) u(·) where only the first control action uk of the resulting control sequence u(·) = [uk , · · · , uk+H−1 ]T is applied to the system at time k. xmin ≤ xmax and umin ≤ umax are the upper and lower bounds of the system states and control inputs, respectively. In the rest of this paper, the cost function J (xk , uk−1 , rk ) shall be rewritten as J (xk , uk−1) for brevity. The quadratic cost function given by J (xk , uk−1) = H n X i=1 xk+i − rk+i 2 Q + uk+i−1 2 R o (21) will be used. Here, · Q and · R denote the two 2-norms weighted by positive definite matrices Q ∈ Rn×n and R ∈ Rm×m respectively. The control horizon will be assumed to be equal to the prediction horizon. 4.1. GPMPC1 4.1.1. Problem Reformulation: We assume that the system function f (·) is unknown and it is replaced by a GP model. Consequently, problem (20) becomes a stochastic one [30]:   Vk∗ = min E J (xk , uk−1 ) (22a) u(·) s.t. p(xk+1 |xk ) ∼ N (µk+1, Σk+1 ) umin ≤ uk+i−1 ≤ umax  p xk+i|k ≥ xmin ≥ η  p xk+i|k ≤ xmax ≥ η (22d) µk+i − 2Σk+i ≥ xmin µk+i + 2Σk+i ≤ xmax (23a) (23b) (22b) (22c) (22e) where η denotes a confidence level. For η = 0.95, the chance constraints (22d) and (22e) are equivalent to Using (21) as the cost function, we get   E J (xk , uk−1 ) H n hX =E xk+i − rk+i 2 Q + uk+i−1 i=1 H h X = E xk+i − rk+i = i=1 H  X E i=1 h xk+i − 2 Q + uk+i−1 2 rk+i Q i +E h 2 R 2 } R i i 2 uk+i−1 R (24) i   In practice, the controls are deterministic. Hence, E u2k = u2k and (24) becomes   E J (xk , uk−1 )  H n  o X 2 2 E xk+i − rk+i Q + uk+i−1 R = i=1 = H n X i=1 µk+i − rk+i =h (µk , uk−1 ) 2 Q + uk+i−1 2 R + trace QΣk+i (25) o Now we have a deterministic cost function which involve the model variance Σ that allows model uncertainties to be explicitly included in the computation of the optimized controls. Note that for multiple-step predictions with uncertainty propagation, the computational complexity of problem (22) will not increase even though the GP model becomes more complicated. This is because the modelling and the control processes are independent of each other. 4.1.2. Nonlinear Optimization Solution: With the cost function (25) and the state constraints (23), the original stochastic optimization problem (22) has been relaxed to a deterministic constrained nonlinear optimization problem. But it is typically non-convex. This is usually solved by derivative-based approaches, such as Lagrange multipliers [31] based on first-order derivatives (gradient), or by SQP and interior-point algorithms based on second-order derivatives (Hessians matrix) [32]. When the derivative of the cost function is unavailable or is too difficult to compute, it could be approximated iteratively by a sampling method [33, 34]. Alternatively, evolutionary algorithms, such as PSO [35] and GA [36], could be used to solve the problem. This approach is able to handle general constrained optimization problems. However, there is no guarantee that the solutions obtained are near optimum. A review of nonlinear optimization techniques for the MPC problem can be found in [32]. A suitable technique for solving our MPC problem is the FP-SQP algorithm proposed in [37]. It can be explained using the following general form of a constrained nonlinear optimization problem: min h(z) z z ∈ Rn+m s.t. c(z) = 0 d(z) ≤ 0 (26a) (26b) (26c) where h : Rn+m → R is the objective function, c : Rn+m → Rn and d : Rn+m → Rn+m represents the corresponding equality and inequality constraints, respectively. FP-SQP generates a sequence of feasible solutions {zj }j=0,1,2,··· by splitting the original problem into several QP sub-problems. In particular, a step ∆zj from current iterate zj to the next one zj+1 can be obtained by solving the following QP subproblem: 1 T min▽h(zj )T ∆zj + ∆zj Hj ∆zj ∆zj 2 j j T s.t. c(z ) + ▽c(z ) ∆zj = 0 d(zj ) + ▽d(zj )T ∆zj ≤ 0 (27a) (27b) (27c) under the trust-region constraint ∆zj ≤ γ j (28) where ▽h(·) denotes the first-order derivative of the objective function at zj , ▽c(·) and ▽d(·) are two linearised Jacobian matrices at the zj . The matrix Hj ∈ R(n+m)×(n+m) is an exact or approximated Lagrangian Hessian matrix and γ j represents the trust-region radius. To guarantee the feasibility of ∆zj , its corresponding perturbation ∆z̃j which satisfies the following conditions need to be computed: zj + ∆z̃j ∈ Π 1 ˜ k∆zk2 ≤ ∆z 2 (29a) 2 ≤ 3 k∆zk2 2 (29b) where Π denotes the feasible points set of problem (26). A method to obtain such a perturbation is proposed in [38]. An acceptability value of ∆zj defined by: ρj = h(zj+1) − h(zj ) −▽h(zj )T ∆zj − 12 ∆zj T Hj ∆zj (30) 1 Initialization feasible point z0 ∈ Π, Hessian matrix H0 , trust region upper bound γmax > 0, initial trust region radius γ 0 = k▽h(z0 )k τ = 0, 0 < τ1 < τ2 < 1 2 for j = 0, 1, 2, · · · , J < ∞ do Obtain step ∆zj by solving the problem (27); 1 T if ▽h(zj )T ∆zj + ∆zj Hj ∆zj = 0 then 2 Stop; else Update ρj by using (30); Update zj+1 , τ : n j z + ∆zj , ρj ≥ τ1 zj+1 = zj , otherwise 3 4 5 6 7 8 k∆zj k , ρj ≥ τ1 τ = { k▽h(zj+1) − h(zj )k τ /4, otherwise 9 Update trust region radius: γ j+1  min τ k▽h(zj+1 )k, γmax , ρj ≥ τ2 ={ τ k▽h(zj+1 )k, otherwise Update Hessian matrix Hj+1 by using (35); 11 j = j + 1; 12 end 13 end Algorithm 1: The Feasibility-Perturbed Sequential Quadratic Programming used in the GPMPC1 algorithm 10 If this value is not acceptable, then the trust-region radius γ j will need to be adjusted. An adaptive method to adjust γ j can be found in [39]. The complete FP-SQP algorithm is described in Algorithm 1. 4.1.3. Application to GPMPC1: Applying FP-SQP to the GPMPC1 problem (22), it should be noted that the constraints (23) are linear. Therefore it is possible to simply use ∆z̃j = ∆zj . The next iterate then can be obtained by zj+1 = zj + ∆zj (31) Expressing the cost function (25) as (26a), define zk = [µTk , uTk−1 ]T ∈ Rn+m . Hence, h(zk ) = H n X i=1 zTk+i  Q 0 0 R  o  zk+i + trace QΣk+i (32) One key issue in using FP-SQP is the local linearisation at ∆zj . The basic GP based local model derived Section 3.1 shall be used to derive the QP subproblem as: H n X ∂h 1 min ∆zk+i + ∆zTk+i Hk ∆zk+i ∆zk ,∆Σk ∂zk+i 2 i=1 o  + trace Q(Σk+i + ∆Σk+i ) s.t. ∆µk+i+1 = Ak+i ∆µk+i + Bk+i ∆uk+i umin ≤ uk+i + ∆uk+i ≤ umax µk+i + ∆µk+i − 2(Σk+i + ∆Σk+i ) ≥ xmin µk+i + ∆µk+i + 2(Σk+i + ∆Σk+i ) ≤ xmax k∆zk+i k ≤ γ (33a) (33b) (33c) (33d) (33e) (33f) (33g) ∂µk+i+1 ∂µk+i+1 and Bk+i = are the two Jacobian matrices of the basic GP ∂µk+i ∂uk+i based local model (12). The computation of the Hessian matrix Hk of the Lagrangian in (27) is another key issue when using the FP-SQP algorithm. The exact Hessian matrix is usually obtained by Note that Ak+i = 2 Hk = ▽ h(zk ) + n X 2 αi ▽ c(zk ) + i=1 n+m X βi ▽2 d(zk ) (34) i=1 where α and β are two Lagrange multipliers applied to the equality and the inequality constraints respectively. This allows rapid local convergence but requires the second-order derivatives ▽2 c(zk ) which are generally not available. When the system is represented by a GP model, these derivatives are mathematically computable 2 but are computationally expensive to obtain. In addition, the exact Hessian matrix may be not positive definite. To address these issues, approximation approaches have been proposed in [40]. In our work, Hk is approximately updated by using a Quasi-Newton method based on the BFGS. The update equation is given by Hk+1 = Hk − Hk ∆zk ∆zTk Hk yk ykT + ∆zTk Hk ∆zk ykT ∆zk (35) where ∆zk = zk+1 − zk and yk = µk+1 − µk . 4.2. GPMPC2 With GPMPC1, model uncertainty was introduced through the variance term into the objective function in (25). But this is an indirect way to handle model uncertainties. A more direct approach is to introduce the variance into that state variable. This can be done through the use of the extended GP based local model (16). In this way, the variances are directly handled in the optimization process. Another disadvantage of GPMPC1 is that the MPC optimization problem (22) is non-convex. Due to the recursive nature of SQP optimizations, the process could be time consuming. With 2 As shown in [24], the first-order derivatives are functions of µ̃ and Σ̃, the second-order derivatives therefore can be obtained by using the chain-rule. GPMPC2, the non-convex problem is relaxed to a convex one, making it much easier to solve. Sensitivity to initial conditions is reduced and in most cases exact solutions can be obtained [32]. This convex optimization problem can be solved offline by using mp-QP [41] where the explicit solutions are computed as a lookup table of nonlinear controllers. An example can be found in [20]. However, the size of the table grows exponentially with the number of states. Hence it is only suitable for problems with less than 5 states [42]. Using the extended GP based local model (16), the problem can be solved efficiently by an online active-set algorithm. 4.2.1. Problem Reformulation: state variable as Based on the extended local model in Section 3.2, define the  T 2 sk+1|k , · · · , sk+H|k ∈ RH(n+n ) p p = [µk+1 , Σk+1 , · · · , µk+H , Σk+H ]T Zk+1 = Also, let Uk = [uk , · · · , uk+H−1]T ∈ RHm r∗k+1 T = [rk+1, 0, · · · , rk+H , 0] ∈ R (36) (37) H(n+n2 ) (38) Problem (22) then becomes min U n Zk+1 − r∗k+1 2 Q̃ + kUk+1 k2R̃ s.t. IHn xmin ≤ Mz Zk+1 ≤ IHn xmax IHm umin ≤ Uk+1 ≤ IHm umax o (39a) (39b) (39c) where Q̃ =diag{[Q, diag{vec(Q)}, · · · , Q, diag{vec(Q)}]} ∈ RH(n+n a R̃ =diag{[R, · · · , R]} ∈ R Hm×Hm 2 )×H(n+n2 ) , Ia ∈ R is the identity vector, and  T 0 ··· 0 In 2ITn2 0 T  0 0 In 2ITn2 · · · 0  Mz =  .. .. .. .. .. ..  . . . . . . T 0 0 0 · · · In 2ITn2   2   ∈ RH×H(n+n )  , (40a) (40b) (41) Let Tu ∈ RHm×Hm be a lower triangular matrices with unit entries. Then, Uk = IHm uk−1 + Tu ∆Uk (42) ∆Zk+1 can be expressed as ∆Zk+1 = Ã∆sk + B̃∆Uk based on the extended local model, with the state and control matrices given by  T 2 à = A, A2, · · · , AH ∈ RH(n+n )   B 0 ··· 0 B ··· 0   AB 2 ∈ RH(n+n )×Hm B̃ =  . . .. ..    .. .. . . AH−1 B AH−2 B · · · B (43) (44a) (44b) where A and B are the two Jacobian matrices (17) and (18) respectively. The corresponding state variable Zk+1 is therefore given by   Zk+1 = sk + Tz Ã∆sk + B̃∆Uk (45) 2 2 where Tz ∈ RH(n+n )×H(n+n ) denotes a lower triangular matrix with unit entries. Based on (42) and (45), problem (39) can be expressed in a more compact form as 1 min k∆Uk k2Φ + ψ T ∆Uk + C ∆U 2   Tu s.t. ∆Umin ≤ ∆Uk ≤ ∆Umax Tz B̃ (46a) (46b) where Φ =B̃T TTz Q̃Tz B̃ + TTu R̃Tu ∈ RHm×Hm T ψ =2(sk Q̃Tz B̃ + ∆sk à Q̃B̃ C − r∗k+1 Q̃Tz B̃ + uk−1 R̃Tu ) ∈ RHm =(s2k + r∗k+1 )Q̃ + 2sk ∆sk Q̃Tz à + u2k−1 R̃ + ∆s2k ÃT Q̃à − 2r∗k+1 (sk Q̃ − ∆sk Q̃Tz Ã)  IHm (umin − uk−1 ) IH(n+n2 ) (xmin − sk − Tz Ã∆sk )   IHm (umax − uk−1 ) = IH(n+n2 ) (xmax − sk − Tz Ã∆sk ) ∆Umin = ∆Umax  (47a) (47b) (47c) (47d) (47e) (47f) (47g) (47h) Since Q̃, R̃, Tz and Tu are positive definite, Φ is also positive definite. Hence (46) is a constrained QP problem and is strictly convex. The solution will therefore be unique and satisfies the KKT conditions. 4.2.2. Quadratic Programming Solution: The optimization problem (46) can be solved by an active-set method [43]. It iteratively seeks an active (or working) set of constraints and solve an equality constrained QP problem until the optimal solution is found. The advantage of this method is that accurate solutions can still be obtained even when they are ill-conditioned or degenerated. In addition, it is conceptually simple and easy to implement. A warm-start technique could also be used to accelerate the optimization process substantially. Let G = [Tu , Tz B̃]T , the constraint (46b) can be written as     G ∆Umax ∆U ≤ (48) −G −∆Umin Ignoring the constant term C, problem (46) becomes 1 min k∆Uk k2Φ + ψ T ∆Uk ∆U 2 ˜U s.t. G̃∆Uk ≤ ∆ (49a) (49b) ˜ U = [∆Umax , −∆Umin ]T ∈ R2H(m+n+n ) . where G̃ = [G, −G]T ∈ R2H(m+n+n )×Hm and ∆ Let Π∆U be the set of feasible points, and I = {1, · · · , 2H(m + n + n2 )} be the constraint index set. For a feasible point ∆U∗k ∈ Π∆U , the index set for the active set of constraints is defined as ˜ U,i } A(∆U∗k ) = {i ⊆ I|G̃i ∆U∗k = ∆ (50) ˜ U,i is the ith row of the ∆ ˜ U . The inactive set is therefore given where G̃i is the ith row of G̃ and ∆ by B(∆U∗k ) = I \ A(∆U∗k ) (51) ˜ U,i } = {i ⊆ I|G̃i ∆U∗k < ∆ 2 2 Given any iteration j, the working set Wkj contains all the equality constraints plus the inequality constraints in the active set. The following QP problem subject to the equality constraints w.r.t. Wkj is considered given the feasible points ∆Ujk ∈ Π∆U : 1 2 ∆Ujk + δ j Φ + ψ T (∆Ujk + δ j ) δj 2 1 j 2 δ Φ + (ψ + Φ∆Ujk )T δ j = min j 2 δ 1 2 ∆Ujk Φ + ψ T ∆Ujk + |2 {z } min s.t. constant G̃i (∆Ujk + δ j ) (52a) (52b) ˜ U,i , i ∈ W j =∆ k (52c) This problem can be simplified by ignoring the constant term to: 1 j 2 δ Φ + (ψ + Φ∆Ujk )T δ j 2 1 jT δ Φδ j + (ψ + Φ∆Ujk )T δ j = min δj 2 ˜ U,i − G̃i ∆Uj , i ∈ W j s.t. G̃i δ j = ∆ k k min (53a) δj (53b) (53c) By applying the KKT conditions to problem (53), we can obtain the following linear equations:   j    Φ G̃TA −ψ − Φ∆Ujk δ (54) = ˜ λ∗k G̃A 0 ∆U,A − G̃A ∆Ujk | {z } Lagrangian Matrix 2 ˜ U,A ⊂ ∆ ˜U where λ∗k ∈ R2H(m+n+n ) denotes the vector of Lagrangian multipliers, G̃A ⊆ G̃ and ∆ j are the weighting matrix and the upper bounds of the constraints w.r.t. Wk . Let the inverse of Lagrangian matrix be denoted by   −1  Φ G̃TA L1 LT2 (55) = L2 L3 G̃A 0 If this inverse exists, then the solution is given by ˜ U,A − G̃A ∆Uj ) δ j = −L1 (ψ + Φ∆Ujk ) + LT2 (∆ k j j ∗ ˜ U,A − G̃A ∆U ) λ = −L2 (ψ + Φ∆U ) + L3 (∆ k k k (56a) (56b) where L1 = Φ−1 − Φ−1 G̃TA (G̃A Φ−1 G̃TA )−1 G̃A Φ−1 (57a) L2 = Φ−1 G̃TA (G̃A Φ−1 (57b) L3 = −(G̃A Φ−1 G̃TA )−1 (57c) If δ j = 6 0, then the set of feasible points ∆Ujk fails to minimize problem (49). In this case, the next set of feasible point is computed for the next iteration by ∆Uj+1 = ∆Ujk + κj δ j with step k size ( ) ˜ U,i − G̃i ∆Uj ∆ k κj = min 1, min (58) G̃i δ j i∈B(∆Ujk ) ˜ U,i − G̃i ∆Uj ∆ k should be “activated”, j j G̃i δ i∈B(∆Uk ) If κj < 1, the inequality constraint with index q = argmin giving the working set Wkj+1 = Wkj ∪ q. Otherwise, we have Wkj+1 = Wkj . Alternatively, if the solution gives δ j = 0, then the current feasible points ∆Ujk could be the optimal solution. This can be verified by checking the Lagrangian multiplier λ∗k = min λ∗k,i . If i∈Wkj ∩I λ∗k ≥ 0, the optimal solution of the (49) at sampling time k is found. Otherwise, this inequality constraint indexed by p = argmin λ∗k,i should be removed from the current working set, giving us i∈Wkj ∩I Wkj+1 = Wkj \ p. Algorithm 2 summarizes the active set algorithm used in the GPMPC2. 4.2.3. Implementation Issues: The key to solving the linear equations (54) is the inverse of the Lagrangian matrix. However, G̃A is not always full ranked. Thus the Lagrangian matrix is not always invertible. This problem can be solved by decomposing G̃A using QR factorization technique, giving us GTA = Q [R 0]T where R ∈ Rm1 ×m1 is an upper triangular matrix with m1 = rank(G̃A ). Q ∈ RHm×Hm is an orthogonal matrix that can be further decomposed to Q = [Q1 Q2 ] where Q1 ∈ RHm×m1 and Q2 ∈ RHm×(Hm−m1 ) . Thus, GTA = Q = Q1 R and L1 = Q2 (QT2 ΦQ2 )−1 QT2 T L2 = Q1 R−1 − L1 ΦQ1 R−1 L3 = R−1 QT1 ΦL2 (59a) T (59b) (59c) The second issue relates to using the appropriate warm-start technique to improve the convergence rate of the active-set method. For GPMPC2, since the changes in the state between two successive sampling instants are usually quite small, we simply use the previous ∆U∗k as the starting point ∆U0k+1 for the next sampling time k + 1. This warm-start technique is usually employed in MPC optimizations because of its proven effectiveness [42]. 4.3. Stability The stability of the closed-loop controller is not guaranteed because the MPC problem is openloop. This can be demonstrated by the stability analysis of the proposed algorithms. 1 2 3 4 5 Initialization the feasible point ∆U0k ∈ Π∆U ; the working set W 0 = A(∆U0k ); for j = 0, 1, 2, · · · do Compute the δ j and λ∗k by solving the linear equations (54); if δ j = 0 then λ∗k = min λ∗k,i , i∈Wkj ∩I 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 p = argmin λ∗k,i λ∗k i∈Wkj ∩I ≥ 0 then ∆U∗k = ∆Ujk ; Stop. else Wkj+1 = Wkj \ p; ∆Uj+1 = ∆Ujk ; k end else Compute the step length κj by (58), ˜ U,i − G̃i ∆Uj ∆ k q = argmin j G̃i δ i∈B(∆Ujk ) j if κ < 1 then ∆Uj+1 = ∆Ujk + κj δ j ; k j A(∆Uj+1 k ) = A(∆Uk ) ∪ q; else ∆Uj+1 = ∆Ujk + δ j ; k j A(∆Uj+1 k ) = A(∆Uk ); end end end Algorithm 2: Active set method for solving the GPMPC2 problem if In particular, for the MPC problem (22) in the GPMPC1 algorithm, the objective (25) can be directly used as the Lyapunov function. Therefore, it can be known that ∗ V (k) = H n X i=1 ∆µ∗k+i 2 Q + u∗k+i−1 2 R + trace(QΣ∗k+i ) o (60) where ∆µ∗k+i = µ∗k+i − rk+i , u∗ is the optimal control inputs, and µ∗k+i and Σ∗k+i represent the corresponding optimal means and variances of the GP model at time k. The Lyapunov function at time k + 1 is subsequently obtained by, V(k + 1) H n o X = k∆µk+1+i k2Q + kuk+i k2R + trace(QΣk+1+i ) (61a) (61b) i=1 = V ∗ (k) − ∆µ∗k+1 2 Q − ku∗k k2R − trace(QΣ∗k+1 ) (61c) + k∆µk+1+H k2Q + kuk+H k2R + trace(QΣk+1+H ) It is easy to know that V ∗ (k + 1) ≤ V(k + 1) due to the nature of the optimization. Furthermore, the following inequality can be obtained, V ∗ (k + 1) ≤V(k + 1) ≤V (k) + k∆µk+1+H k2Q + kuk+H k2R + trace(QΣk+1+H ) ∗ (62a) (62b) 2 because of ∆µ∗k+1 Q ≥ 0, ku∗k k2R ≥ 0 and trace(QΣ∗k+1) ≥ 0. The stability result of the problem (46) in the GPMPC2 algorithm can be obtained in the same way. The result in (62) shows that, to guarantee the stability, additional terminal constraints on the means and variances of the GP model, as well as the control inputs are required such that, µk+H+1|k − rk+H+1 = 0 Σk+H+1|k = 0 uk+H|k = 0 (63a) (63b) (63c) However, it should be noted that, these newly added constraints altered the optimization problem. Hence its feasibility will need to be analysed. Another approach to provide the guaranteed stability is by introducing a terminal cost into the objective function [1]. 5. Numerical Simulations GPMPC1 and GPMPC2 are applied to two trajectory tracking problems of a MIMO nonlinear system with time-varying parameters. For each problem, 50 independent simulations are performed on a computer with a 3.40GHz Intelr CoreTM 2 Duo CPU with 16 GB RAM, using Matlabr version 8.1. The average simulation results of these 50 trials are presented here. −3 8 x 10 0.15 0.1 1 Y (k) 4 1 Y (k) 6 2 0 0 −2 0.05 0 20 40 60 80 100 120 140 160 −0.05 180 0 20 40 60 80 100 120 140 160 180 0 20 40 60 80 100 120 sample time k 140 160 180 −3 5 x 10 0.1 0.05 2 2 Y (k) Y (k) 0 −5 −10 0 −0.05 0 20 40 60 80 100 120 sample time k 140 160 180 −0.1 (a) “Step” trajectory (b) “Lorenz” trajectory Fig. 1. Training errors of the system outputs for the two trajectory tracking problems. The MIMO nonlinear system in [44] is used for our simulations. It is described by: x1 (k)2 + 0.3x2 (k) 1 + x1 (k)2 x1 (k)2 x2 (k + 1) = 1 + x2 (k)2 + x3 (k)2 + x4 (k)2 + a(k)u1 (k) x3 (k)2 x3 (k + 1) = + 0.2x4 (k) 1 + x3 (k)2 x3 (k)2 x4 (k + 1) = 1 + x1 (k)2 + x2 (k)2 + x4 (k)2 + b(k)u2 (k) y1 (k + 1) = x1 (k + 1) + ω1 y2 (k + 1) = x3 (k + 1) + ω2 x1 (k + 1) = (64) where x1 , x2 , x3 and x4 are system states, u1 , u2 and y1 , y2 denote system inputs and outputs, respectively. ω1 , ω2 ∼ N (0, 0.01) are independent Gaussian white noise. In addition, the timevarying parameters a(k) and b(k) are given by a(k) = 10 + 0.5 sin(k) 10 b(k) = 1 + exp(−0.05k) 5.1. (65a) (65b) “Step” Trajectory Tracking The objective of the first experiment is to steer the nonlinear system to follow a step trajectory shown as the reference in Figure 2a. The system inputs are subjected to the following constraints: 0 ≤ u1 (k) ≤ 5, 0 ≤ u2 (k) ≤ 5 0.4 Reference GPMPC1 GPMPC2 0.2 0 0 20 40 60 80 100 120 140 160 1 GPMPC1 GPMPC2 1 1.5 IAE on Y 2 0.6 u1(k) Y1(k) 0.8 1 0.5 0 180 1 20 40 60 80 100 120 140 160 0.2 180 3 1 0 20 40 60 80 100 120 sample time k 140 160 0 180 80 100 120 140 160 180 1 0.8 0 20 40 60 80 100 120 sample time k 140 160 0.4 180 GPMPC1 GPMPC2 40 60 80 100 120 140 160 −4 180 10 10 5 u (k) 20 2 0 −5 −20 −10 0 20 40 60 80 100 120 sample time k 140 160 180 (d) Controlled Outputs – “Lorenz” 80 100 120 sample time k 140 160 180 IAE on Y1 60 40 GPMPC1 GPMPC2 20 0 20 40 60 80 100 120 140 160 0 180 0 20 40 60 80 100 120 140 160 180 0 20 40 60 80 100 120 sample time k 140 160 180 150 0 −10 60 80 0 −2 20 40 100 IAE on Y2 −10 0 20 (c) IAE – “Step” GPMPC1 GPMPC2 2 u1(k) 0 0 (b) Control Inputs – “Step” 4 Reference GPMPC1 GPMPC2 10 1 60 0.6 20 Y (k) 40 2 IAE on Y u2(k) Y2(k) 0.4 (a) Controlled Outputs – “Step” 2 20 1.2 0.2 Y (k) 0 1.4 2 0.6 −20 0.6 0.4 0 0.8 0 0.8 0 20 40 60 80 100 120 sample time k 140 160 180 100 50 0 (e) Control Inputs – “Lorenz” (f) IAE – “Lorenz” Fig. 2. Simulation results of the two trajectory tracking problems. To generate the observations for GP modelling, this problem is first solved by using the NMPC strategy proposed in [45]. 189 observations are collected and are used to train the GP models. The learning process took approximately 2.1 seconds, with a training MSE of 9.9114 × 10−5. Figure 1a shows the training errors for the 189 samples. These results show that the system is accurately learnt by using the GP models. The MPC parameters in this simulation are: initial states x0 = [0, 0, 0, 0]T and initial control inputs u0 = [0, 0]T , weighting matrix Q = I4×4 and R = I2×2 . In addition, the prediction horizon H is 10. Theoretically, a long enough H is necessary to guarantee the stability of MPC controllers. However, the complexity of MPC problem increases exponentially with increasing H. This value of H is chosen as a trade-off between the control performance and computational complexity. The resultant controlled outputs and control inputs by using GPMPC1 and GPMPC2 are shown in Figures 2a and 2b, respectively. They show that both algorithms exhibit equally good control performances in this task since they both produced outputs close to the target. The IAE values can be found in Figure 2c. GPMPC1 takes on average 34.1 seconds to compute the 189 optimized control inputs. However, GPMPC2 only requires 4.51 seconds which is more than 8 times more efficient than GPMPC1. This shows the advantage in our formulation of the problem as convex optimization. 5.2. “Lorenz” Trajectory Tracking The second problem is to track a “Lorenz” trajectory as shown in Figure 2d. In this case, the constraints on the control inputs are: − 4 ≤ u1 (k) ≤ 4, −7 ≤ u2 (k) ≤ 7 Similar to the previous experiment, the NMPC method is used to generate 189 observations for training the GP model. Training time is approximately 2.4 seconds with a training MSE of 0.0196. 15 20 Reference Nonlinear GPMPC GPMPC1 GPMPC2 10 Reference Nonlinear GPMPC GPMPC1 GPMPC2 15 10 5 Y (k) 2 1 Y (k) 5 0 0 −5 −5 −10 −15 −10 0 20 40 60 80 100 120 sample time k 140 160 180 −15 0 (a) Y1 – “Lorenz” 20 40 60 80 100 120 sample time k 140 160 180 (b) Y2 – “Lorenz” Fig. 3. Comparison of tracking performance of GPMPC1, GPMPC2 and nonlinear GPMPC in [46] for the Lorenz trajectory. Table 1 MSE values for Lorenz trajectory tracking problem with GPMPC1 and GPMPC2 using GP models with different amount of training data. Training Data Y1 Y2 Model for GPMPC1 60% 80% 100% 4.7831 1.36 0.0528 10.7518 1.0960 0.2995 Model for GPMPC2 60% 80% 100% 4.6493 0.6879 0.0539 6.6748 2.1522 0.3085 Figure 1b shows the training error. The MPC parameters are: initial states x0 = [0, 0, 0, 0]T , initial control inputs u0 = [0, 0]T , prediction horizon H = 10, weighting matrix Q = I4×4 and R = diag{[21000, 27000]}. The tracking results can be found in Figures 2d, 2e and 2f. They demonstrate again that the control performance GPMPC1 and GPMPC2 are virtually the same. In this case, on average GPMPC2 is about 5 times more efficient than GPMPC1 (5.38 seconds versus 24.72 seconds). The performance of the two proposed algorithms is compared with the nonlinear GPMPC proposed in [46]. Even though problem (22) with cost function (25) is more complicated than the one considered in [46], they are essentially similar. Tracking results for H = 1 are shown in Figure 5.2. show that the both two proposed algorithms outperform than the nonlinear GPMPC in the “Lorenz” trajectory tracking problem. In addition, the GPMPC1 and GPMPC2 only require approximately 5 and 7 seconds to compute all 189 control actions, compared to 150 seconds used in nonlinear GPMPC. 5.3. Sensitivity to Training Data Since the closed-loop stability of proposed GPMPC1 and GPMPC2 are not guaranteed as discussed in Section 4.3, it is necessary to test them with different models. Here, both GPMPC1 and GPMPC2 are each tested with three separate GP models for the Lorenz trajectory tracking problem. These models are trained by using 60%, 80% and 100% of all of 179 observations respectively. Figure 4 shows how well each model track the reference outputs. Table 1 shows the tracking MSE values. These results indicate that while the models trained with 100% and 80% observations perform quite well, the ones trained with 60% data are inadequate. 15 20 Reference GPMPC1−60% GPMPC1−80% GPMPC1−100% GPMPC2−60% GPMPC2−80% GPMPC2−100% 10 5 Reference GPMPC1−60% GPMPC1−80% GPMPC1−100% GPMPC2−60% GPMPC2−80% GPMPC2−100% 15 10 Y2(k) 1 Y (k) 5 0 0 −5 −5 −10 −15 −10 0 20 40 60 80 100 sample time k (a) Y1 – “Lorenz” 120 140 160 180 −15 0 20 40 60 80 100 sample time k 120 140 160 180 (b) Y2 – “Lorenz” Fig. 4. Comparisons between proposed approaches with different learnt GP models in the “Lorenz” trajectory tracking problem. 6. Conclusions Two GP based MPC approaches (GPMPC1 and GPMPC2) have been presented for the trajectory tracking problem of an unknown nonlinear dynamical system. The system is modelled using GP techniques offline. These two approaches handle the model uncertainties in the form of GP variances in different ways. GPMPC1 formulated the MPC optimization problem in such a way that model uncertainties are treated as the slack variables of GP mean constraints and are included in the objective function as the penalty term. The resulting SMPC problem is relaxed to a deterministic non-convex nonlinear optimization problem. The solution of the resultant problem is obtained using the FP-SQP method based on a linearized GP local model. With GPMPC2, the variance forms part of the state vector. This allows model uncertainties to be directly included in the computation of the optimized controls. By using the extended linearized GP local model, the non-convex optimization problem is relaxed to a convex one which is solved using an activeset method. Simulation results on two different trajectories show that both approaches perform equally well. However, GPMPC2 is several times more efficient computationally compared with GPMPC1, especially for a longer horizon. A brief discussion on how closed-loop stability could be guaranteed reveals that the resulting optimization problem will be different from the one considered in this paper. This issue will be addressed in future work. 7. References [1] D. Q. Mayne, J. B. Rawlings, C. V. Rao, and P. O. Scokaert, “Constrained model predictive control: Stability and optimality,” Automatica, vol. 36, no. 6, pp. 789–814, 2000. [2] S. J. Qin and T. A. Badgwell, “A survey of industrial model predictive control technology,” Control Engineering Practice, vol. 11, no. 7, pp. 733–764, 2003. [3] D. Q. Mayne, “Model predictive control: Recent developments and future promise,” Automatica, vol. 50, no. 12, pp. 2967–2986, 2014. [4] D. P. Solomatine and A. Ostfeld, “Data-driven modelling: some past experiences and new approaches,” Journal of hydroinformatics, vol. 10, no. 1, pp. 3–22, 2008. [5] O. Nelles, Nonlinear system identification: from classical approaches to neural networks and fuzzy models. Springer Science & Business Media, 2013. [6] T. Alamo, D. M. de La Peña, D. Limón, and E. F. Camacho, “Constrained min-max predictive control: Modifications of the objective function leading to polynomial complexity,” IEEE Transactions on Automatic Control, vol. 50, no. 5, pp. 710–714, 2005. [7] D. Limón, T. Alamo, F. Salas, and E. F. Camacho, “Input to state stability of min–max MPC controllers for nonlinear systems with bounded uncertainties,” Automatica, vol. 42, no. 5, pp. 797–803, 2006. [8] W. Langson, I. Chryssochoos, S. Raković, and D. Q. Mayne, “Robust model predictive control using tubes,” Automatica, vol. 40, no. 1, pp. 125–133, 2004. [9] L. Zhang, S. Zhuang, and R. D. Braatz, “Switched model predictive control of switched linear systems: Feasibility, stability and robustness,” Automatica, vol. 67, pp. 8–21, 2016. [10] A. T. Schwarm and M. Nikolaou, “Chance-constrained model predictive control,” American Institute of Chemical Engineers, vol. 45, no. 8, pp. 1743–1752, 1999. [11] D. Bernardini and A. Bemporad, “Scenario-based model predictive control of stochastic constrained linear systems,” in IEEE Proceedings of International Conference on Decision and Control. IEEE, 2009, pp. 6333–6338. [12] M. Cannon, B. Kouvaritakis, S. V. Raković, and Q. Cheng, “Stochastic tubes in model predictive control with probabilistic constraints,” IEEE Transactions on Automatic Control, vol. 56, no. 1, pp. 194–200, 2011. [13] A. Mesbah, S. Streif, R. Findeisen, and R. Braatz, “Stochastic nonlinear model predictive control with probabilistic constraints,” in American Control Conference. IEEE, 2014, pp. 2413–2419. [14] L. Fagiano and M. Khammash, “Nonlinear stochastic model predictive control via regularized polynomial chaos expansions,” in IEEE Proceedings of International Conference on Decision and Control. IEEE, 2012, pp. 142–147. [15] C. Rasmussen and C. Williams, Gaussian Processes for Machine Learning. MA, USA: MIT Press, 1 2006. Cambridge, [16] F. Zhu, C. Xu, and G. Dui, “Particle swarm hybridize with Gaussian process regression for displacement prediction,” in IEEE Proceedings of International Conference on Bio-Inspired Computing: Theories and Applications. IEEE, 2010, pp. 522–525. [17] D. Petelin and J. Kocijan, “Control system with evolving Gaussian process models,” in IEEE Workshop on Evolving and Adaptive Intelligent Systems (EAIS). IEEE, 2011, pp. 178–184. [18] G. Cao, E. M.-K. Lai, and F. Alam, “Particle swarm optimization for convolved Gaussian process models,” in International Joint Conference on Neural Networks (IJCNN). IEEE, 6-11 July 2014, pp. 1573–1578. [19] J. Kocijan, R. Murray-Smith, C. E. Rasmussen, and A. Girard, “Gaussian process model based predictive control,” in American Control Conference, vol. 3. IEEE, 2004, pp. 2214– 2219. [20] A. Grancharova, J. Kocijan, and T. A. Johansen, “Explicit stochastic nonlinear predictive control based on Gaussian process models,” in European Control Conference, 2007, pp. 2340– 2347. [21] E. D. Klenske, M. N. Zeilinger, B. Scholkopf, and P. Hennig, “Gaussian process-based predictive control for periodic error correction,” IEEE Transactions on Control Systems Technology, 2015. [22] G. Cao, E. M.-K. Lai, and F. Alam, “Gaussian process based model predictive control for linear time varying systems,” in International Workshop on Advanced Motion Control (AMC Workshop). IEEE, 22-24 April 2016. [23] ——, “Gaussian process model predictive control of Unmanned Quadrotors,” in International Conference on Control, Automation and Robotics (ICCAR). IEEE, 28-30 April 2016. [24] M. P. Deisenroth, “Efficient reinforcement learning using Gaussian processes,” Ph.D. dissertation, Karlsruhe Institute of Technology, 2010. [25] A. Girard, C. E. Rasmussen, J. Q. Candela, and R. Murray-Smith, “Gaussian process priors with uncertain input – Application to multiple-step ahead time series forecasting,” in Advances in Neural Information Processing Systems. MIT, 2003, pp. 545–552. [26] J. Q. Candela, A. Girard, J. Larsen, and C. E. Rasmussen, “Propagation of uncertainty in bayesian kernel models-application to multiple-step ahead forecasting,” in IEEE Proceedings of International Conference on Acoustics, Speech, and Signal Processing (ICASSP), vol. 2. IEEE, 2003, pp. II–701. [27] J. Quiñonero-Candela and C. E. Rasmussen, “A unifying view of sparse approximate Gaussian process regression,” Journal of Machine Learning Research, vol. 6, pp. 1939–1959, 2005. [28] F. Berkenkamp and A. P. Schoellig, “Learning-based robust control: Guaranteeing stability while improving performance,” in IEEE/RSJ Proceedings of International Conference on Intelligent Robots and Systems (IROS), 2014. [29] Y. Pan and E. Theodorou, “Probabilistic differential dynamic programming,” in Advances in Neural Information Processing Systems, 2014, pp. 1907–1915. [30] A. Grancharova, J. Kocijan, and T. A. Johansen, “Explicit stochastic predictive control of combustion plants based on Gaussian process models,” Automatica, vol. 44, no. 6, pp. 1621– 1631, 2008. [31] F. Tröltzsch, “Regular Lagrange multipliers for control problems with mixed pointwise control-state constraints,” SIAM Journal on Optimization, vol. 15, no. 2, pp. 616–634, 2005. [32] M. Diehl, H. J. Ferreau, and N. Haverbeke, “Efficient numerical methods for nonlinear MPC and moving horizon estimation,” in International Workshop on assessment and future directions on Nonlinear Model Predictive Control. Pavia, Italy: Springer, 2008, pp. 391–417. [33] S. Lucidi, M. Sciandrone, and P. Tseng, “Objective-derivative-free methods for constrained optimization,” Mathematical Programming, vol. 92, no. 1, pp. 37–59, 2002. [34] G. Liuzzi, S. Lucidi, and M. Sciandrone, “Sequential penalty derivative-free methods for nonlinear constrained optimization,” SIAM Journal on Optimization, vol. 20, no. 5, pp. 2614– 2635, 2010. [35] L. Yiqing, Y. Xigang, and L. Yongjian, “An improved PSO algorithm for solving non-convex NLP/MINLP problems with equality constraints,” Computers & chemical engineering, vol. 31, no. 3, pp. 153–162, 2007. [36] O. Yeniay, “Penalty function methods for constrained optimization with genetic algorithms,” Mathematical and Computational Applications, vol. 10, no. 1, pp. 45–56, 2005. [37] S. J. Wright and M. J. Tenny, “A feasible trust-region sequential quadratic programming algorithm,” SIAM journal on optimization, vol. 14, no. 4, pp. 1074–1105, 2004. [38] Y.-h. Peng and S. Yao, “A feasible trust-region algorithm for inequality constrained optimization,” Applied mathematics and computation, vol. 173, no. 1, pp. 513–522, 2006. [39] X. Zhang, J. Zhang, and L. Liao, “An adaptive trust region method and its convergence,” Science in China Series A: Mathematics, vol. 45, no. 5, pp. 620–631, 2002. [40] M. J. Tenny, S. J. Wright, and J. B. Rawlings, “Nonlinear model predictive control via feasibility-perturbed sequential quadratic programming,” Computational Optimization and Applications, vol. 28, no. 1, pp. 87–121, 2004. [41] A. Bemporad, M. Morari, V. Dua, and E. N. Pistikopoulos, “The explicit linear quadratic regulator for constrained systems,” Automatica, vol. 38, no. 1, pp. 3–20, 2002. [42] Y. Wang and S. Boyd, “Fast model predictive control using online optimization,” IEEE Transactions on Control Systems Technology, vol. 18, no. 2, pp. 267–278, 2010. [43] R. Fletcher, Practical methods of optimization, 2nd ed. 1987. Wiley-Interscience Publication, [44] Y. Pan and J. Wang, “Model predictive control of unknown nonlinear dynamical systems based on recurrent neural networks,” IEEE Transactions on Industrial Electronics, vol. 59, no. 8, pp. 3089–3101, 2012. [45] L. Grüne and J. Pannek, Nonlinear model predictive control–Theory and Algorithms. don, U.K: Springer-Verlag, 2011. Lon- [46] J. Kocijan and R. Murray-Smith, “Nonlinear predictive control with a Gaussian process model,” in In R. Murray-Smith and R. Shorten (eds.), Switching and Learning in Feedback Systems. Springer, 2005, pp. 185–200.
3cs.SY
Storage Capacity as an Information-Theoretic Analogue of Vertex Cover* arXiv:1706.09197v1 [cs.IT] 28 Jun 2017 Arya Mazumdar Andrew McGregor Sofya Vorotnikova Abstract Motivated by applications in distributed storage, the storage capacity of a graph was recently defined to be the maximum amount of information that can be stored across the vertices of a graph such that the information at any vertex can be recovered from the information stored at the neighboring vertices. Computing the storage capacity is a fundamental problem in network coding and is related, or equivalent, to some well-studied problems such as index coding with side information and generalized guessing games. In this paper, we consider storage capacity as a natural information-theoretic analogue of the minimum vertex cover of a graph. Indeed, while it was known that storage capacity is upper bounded by minimum vertex cover, we show that by treating it as such we can get a 3/2 approximation for planar graphs, and a 4/3 approximation for triangle-free planar graphs. Since the storage capacity is intimately related to the index coding rate, we get a 2 approximation of index coding rate for planar graphs1 and 3/2 approximation for triangle-free planar graphs. Previously only a trivial 4 approximation of the index coding rate was known for planar graphs. We then develop a general method of “gadget covering” to upper bound the storage capacity in terms of the average of a set of vertex covers. This method is intuitive and leads to the exact characterization of storage capacity for various families of graphs. As an illustrative example, we use this approach to derive the exact storage capacity of cycles-with-chords, a family of graphs related to outerplanar graphs. Finally, we generalize the storage capacity notion to include recovery from partial failures in distributed storage. We show tight upper and lower bounds on this partial recovery capacity that scales nicely with the fraction of failure in a vertex. 1 Introduction The Shannon capacity of a graph [18] is a well studied parameter that quantifies the zero-error capacity of a noisy communication channel. There are also several other notions of graph capacities or graph entropies that model different communication/compression scenarios (for example, see [1]). In this paper, we are interested in a very recent definition of graph capacity, called the storage capacity, that we consider to be a natural information-theoretic analogue of the minimum vertex cover of a graph. * University of Massachusetts, Amherst. {arya,mcgregor,svorotni}@cs.umass.edu. This work was supported by NSF Awards CCF-0953754, IIS-1251110, CCF-1320719, CCF-1642658, CCF-BSF-1618512, and a Google Research Award. 1 A shorter version of this paper in the proceedings of the IEEE International Symposium on Information Theory, 2017 contains an error. The approximation factor for index coding rate for planar graphs was wrongly claimed to be 1.923. The correct approximation factor of our method is 2, and we have corrected Theorem 3 in this version. 1 Suppose, every vertex of a graph can store a symbol (from any alphabet) with the criterion that the content of any vertex can be uniquely recovered from the contents of its neighborhood in the graph. Then the maximum amount of information that can be stored in the graph is called the storage capacity of that graph [17]. This formulation is mainly motivated by applications in distributed storage, and generalizes the popular definition of locally repairable codes [13]. In a distributed storage system, each symbol (or coordinate) of a codeword vector is stored at a different server or storage vertex. In the case of a single server failure, it is desirable to be able to recover the data of that server by accessing a small number of other servers. Given the topology of the storage network as a graph, it is quite natural to model the local repair problem as a neighborhood repair problem as above. Formally, suppose we are given an n-vertex graph G(V, E), where V = [n] ≡ {1, 2, . . . , n}. Also, given a positive integer q ≥ 2, let H(X) be the Shannon entropy of the random variable X in q-ary units (for example, when q = 2, the entropy is in bits). Let {Xi }i∈V , be random variables each with a finite sample space of size q. For any I ⊆ [n], let XI ≡ {Xi : i ∈ I}. Consider the solution of the following optimization problem: max H(X1 , . . . , Xn ) (1) such that H(Xi |XN (i) ) = 0, for all i ∈ V where N (i) = {j ∈ V : (i, j) ∈ E} is the set of neighbors of vertex i. This is the storage capacity of the graph G and we denote it by Capq (G). Note that, although we hide the unit of entropy in the notation H(·), the unit should be clear from context, and the storage capacity should depend on it, as reflected in the subscript in the notation Capq (G). The absolute storage capacity is defined to be, Cap(G) = lim Capq (G). q→∞ (2) In [17], it was observed that the storage capacity is upper bounded by the size of the minimum vertex cover VC(G) of the graph G. Cap(G) ≤ | VC(G)|. (3) The proof of this fact is quite simple. Since all the neighbors of V \ VC belong to VC, H(XV ) = H(XVC , XV \VC(G) ) = H(XVC(G) ) + H(XV \VC(G) |H(XVC(G) )) = H(XVC(G) ) ≤ | VC(G)|. Indeed, this proof shows that H(XV ) = H(XVC(G) ). Because of this, we think it is natural to view storage capacity as an information theoretic analogue of vertex cover. It was also shown in [17] that the storage capacity is at least equal to the size MM(G) of the maximum matching of the graph G: MM(G) ≤ Cap2 (G) ≤ Cap(G). (4) Since maximum matching and minimum vertex cover are two quantities within a factor of two of each other and maximum matching can be found in polynomial time, this fact gives a 2-approximation of the storage capacity2 . Improvement of this approximation factor is unlikely to be achieved by simple means, since that would imply a better-than-2 approximation ratio for the minimum vertex cover problem violating the unique games conjecture [15]. 2 Indeed, finding a maximal matching is sufficient for this purpose. 2 This motivates us to look for natural families of graphs where minimum vertex cover has a better approximation. For example, for bipartite graphs maximum matching is equal to minimum vertex cover and hence storage capacity is exactly equal to the minimum vertex cover. Other obvious class, and our focus in Section 3, is the family of planar graphs for which a PTAS is known [4, 5]. Another motivation for studying storage capacity on planar graphs is that they represent common network topologies for distributed systems. For example, see [10] to note how a surprising number of data networks are actually planar. To minimize interference, it is natural for a distributed storage system to be arranged as a planar network. Moreover it is useful to have wireless networks, video-on-demand networks etc. that are planar or almost planar. Video-on-demand also motivates a related broadcast problem called index coding [6] for which planar topologies are of interest, and outerplanar topologies have already been studied [7]. It was shown in [17] that storage capacity is, in a coding-theoretic sense, dual to index coding and is equivalent to the guessing game problem of [12]. The index coding rate for a graph G is defined to be the optimum value of the following minimization problem: min H(Y ) (5) where Y is such that H(Xi |Y, XN (i) ) = 0, for all i ∈ V . This is called the optimum index coding rate for the graph G, and we denote it as Indq (G). We can also define, Ind(G) = lim Indq (G). q→∞ (6) The index coding problem is the hardest of all network coding problems and has been the subject of much recent attention, see, e.g., [16]. In particular it can be shown that any network coding problem can be reduced to an index coding problem [11]. It has been shown [17] that, Cap(G) = n − Ind(G). (7) and hence exact computation of Ind(G) and Cap(G) is equivalent although the approximation hardness could obviously differ. Note that, Ind(G) ≥ α(G), where α(G) is the independence number of G. Since, for planar graphs α(G) ≥ n/4, taking Y to be X[n] already gives a 4-approximation for index coding rate for planar graphs (since H(Y ) ≤ n). In this paper, we give a significantly better approximation algorithm for index coding rate of planar graphs. Not only that, due to the relation between index coding rate and storage capacity, we can obtain an approximation factor significantly better than 2 for storage capacity. Note that, even to approximate the optimal index coding rate within a factor of n1− seems to be a challenge [9]. To go beyond the realm of planar graphs, and to obtain better approximation ratios, we then develop several upper bounding tools for storage capacities. In particular by using these tools, we are able to exactly characterize storage capacities of various families of graphs. Our approach revisits a linear program proposed by Blasiak, Kleinberg, and Lubetzky [8] that can be used to lower bound the optimum index coding rate or upper bound the storage capacity. We transform the problem of bounding this LP into the problem of constructing a family of vertex covers for the input graph. This in turn allows us to upper bound the storage capacity of any graph that admits a specific type of vertex partition. We then identify various graphs for which this upper bound is tight. 3 Since, the storage capacity, or the vertex cover, act as absolute upper bounds on the rate of information storage in the graph, a natural question to ask is, if we store above the limit of minimum vertex cover in the graph, will any of the repair property be left? This is similar in philosophy to the rate-distortion theory of data compression, where one compresses beyond entropy limit and still can recover the data with some distortion. This question gives rise to the notion of recovery from partial failure, as defined below. We define the partial repair capacity also keeping the application of distributed storage in mind. This is a direct generalization in the context of distributed storage application to handle partial failure of vertices. In particular, suppose we lose 0 ≤ δ ≤ 1 proportion of the bits stored in a vertex. We still want to recover these bits by accessing the remaining (1 − δ)-fraction of the bits in the vertex plus the contents of the neighborhood. What is the maximum amount of information that can be stored in the network with such restriction? Intuitively, the storage capacity should increase. We characterize the trade-off between δ and this increase in storage capacity from both sides (i.e., upper and lower bounds on the capacity). A surprising fact that we observe is that, if we want to recover from more than half of the bits being lost, then there is no increase in storage capacity. In summary, we made progress on the study of storage capacity on three fronts: • Planar graphs. We prove a 3/2 approximation of storage capacity and 2 approximation for index coding rate for planar graphs. We provide an approximation guarantee that depends on the number of triangle in the graph and, in the special case of for triangle-free graphs, we get a 4/3 approximation for storage capacity, and 3/2 approximation for index coding rate. • Tools for finding storage capacity upper bounds. We develop an approach for bounding storage capacity in terms of a small number of vertex covers. We first illustrate this approach by finding the exact storage capacity of some simple graphs. We then use the approach to show a bound on any graph that admits a specific type of vertex partition. With this we prove exact bounds on a family of Cartesian product graphs and a family closely related to outerplanar graphs. • Partial failure recovery. We show that if recovery from neighbors is possible for up to δ-proportion failure of the bits stored in a server, then the capacity is upper bounded by the optimum value of a linear program; in particular this implies when δ ≥ 12 , then the partial recovery capacity is same as the storage capacity. For an odd cycle, the upper bound on partial recovery capacity is given by n2 (1 + R2 (δ)), where R2 (δ) is the maximum achievable rate of a binary error-correcting code with relative minimum Hamming distance at least δn. On the other hand, we also obtain general lower bounds on the partial recovery capacity of a graph. For an odd cycle, our results imply that a partial failure recovery capacity of n2 (2 − h2 (δ)) is polynomial time achievable, where h2 (δ) denotes the binary entropy function. Our bounds are very tight, since it is a widely believed conjecture that R2 (δ) = 1 − h2 (δ). 2 Preliminaries Let CP(G) denote the fractional clique packing of a graph defined as follows: Let C be the set of all cliques in G. For every C ∈ C define a variable 0 ≤ xC ≤ 1. Then CP(G) is the maximum values of P C∈C xC (|C| − 1) subject to the constraint that X xC ≤ 1 ∀u ∈ V C∈C:u∈C Note that CP(G) can be computed in polynomial time in graphs, such as planar graphs, where all cliques have constant size. Furthermore, CP(G) is at least the size of the maximum fractional matching and they are obviously equal in triangle-free graphs since the only cliques are edges. 4 The following preliminary lemma shows that Capq (G) ≥ CP(G) for sufficiently large q. An equivalent result is known in the context of index coding but we include a proof here for completeness. The basic idea is that we can store k − 1 information on a clique of size k by assigning k − 1 independent uniform random variables to k − 1 of the vertices and setting the final random variable to the sum (modulo q) of the first k − 1 random variables. Lemma 1. Capq (G) ≥ CP(G) for sufficiently large q. Proof. Let {xC }C∈C achieve CP(G). Let q be sufficiently large such that q xC is integral for every C. For each clique C = {u1 , . . . , u|C| } in the graph, define a family of random variables XuC1 , XuC2 , . . . , XuC|C| where XuC1 , XuC2 , . . . , XuC|C|−1 are independent and uniform over {0, 1, . . . , q xC − 1} and |C|−1 XuC|C| = X XuCi mod q xC . i=1 Note that each XuCi can be deduced from {XuCj }j6=i and the entropy of {XuCj }j6=i is xC (|C| − 1). Finally, C let Xu be an encoding P of {Xu }C∈C:u∈C as a symbol from a q-ary alphabet; the fact that this is possible followings because C∈C:u∈C xC ≤ 1. Then the entropy of XV is CP(G) as required. Notation. Let G[S] denote the subgraph induced by S ⊆ V . Let α(G) be the size of the largest independent set and let VC(G) be the size of minimum vertex cover. Let MM(G) be the size of the largest matching and let FM(G) be the weight of the maximum fractional matching. 3 Approximation Algorithms for Planar Graphs via Vertex Cover In this section, we present approximation results for the storage capacity and optimal index coding rate of planar graphs. Specifically we show that CP(G) can be used to achieve a 3/2 approximation of the storage capacity and a 2 approximation of the optimal index coding rate. In our storage capacity result we use ideas introduced by Bar-Yehuda and Even [5] for the purpose of 5/3-approximating the vertex cover in planar graphs. Specifically, they first considered a maximal set of vertex-disjoint triangles, reasoned about the vertex cover amongst these triangles, and then reasoned about the triangle-free induced subgraph on the remaining vertices. We consider a similar decomposition and reason about the integrality gap of vertex cover in each component. We parameterize our result in terms of the number of triangles; this will be essential in the subsequent result on optimal index coding rate. Theorem 2. Assume G is planar and let T be a set of 3t vertices corresponding to maximal set of t vertex disjoint triangles. Then, Cap(G) 3t + k 1≤ ≤ CP(G) 2t + 3k/4 where k is the size of the minimum vertex cover of G[V \ T ]. Hence CP(G) is a 3/2 approximation for Cap(G) and 4/3 approximation if G is triangle-free. Proof. Let G0 = G[V \ T ]. Partition the set of vertices into T ∪ C ∪ I where C is the minimum vertex cover of G0 and I ⊂ V \ T is therefore an independent set. Let XV be the set of variables that achieve storage capacity. Therefore, Cap(G) = H(XV ) = H(XT ) + H(XC |XT ) + H(XI |XC , XT ) ≤ H(XT ) + H(XC |XT ) ≤ 3t + k 5 since for each v ∈ I, H(Xv |XC , XT ) = 0 since N (v) ⊂ C ∪ T . Consider the fractional clique packing in which each of the t vertex-disjoint triangles in T receive weight 1. Then, CP(G) ≥ 2t + CP(G0 ). Then it remains to show that CP(G0 ) ≥ 3k/4. Note that since G0 is triangle-free planar graph, it is 3-colorable by Grötzsch’s theorem [14]. Furthermore, CP(G0 ) is the maximum fractional matching which, by duality, is the minimum fractional vertex cover. Hence it suffices to show that the size of the minimum fractional vertex cover of 3-colorable graph is at least 3/4 of the size of the minimum (integral) vertex cover, i.e., 3k/4. This can be shown as follows. Let x1 , . . . , xn be an optimal fractional vertex cover, i.e., for all edges uv ∈ G0 , xu + xv ≥ 1. Since fractional vertex cover is 1/2-integral, we may assume each xu ∈ {0, 1/2, 1}. Let I1 , I2 , I3 be a partitioning of {u ∈ [n] : xu = 1/2} corresponding to a 3-coloring where X X X xv ≥ xv ≥ xv . v∈I1 v∈I2 v∈I3 Then consider y1 , . . . , yn where yu = 1 iff u ∈ I2 ∪ I3 or xu = 1. Then X X X X X yu ≤ yu + yu ≤ 2/3 · 2 · xu + xu ≤ 4/3 · CP(G0 ) , u∈[n] u∈I2 ∪I3 u∈[n]:xu =1 u:xu =1/2 u:xu =1 and y1 , . . . , yn is a vertex cover because for every edge uv, at least one endpoint one of {xu , xv } is 1 or at least one of u and v is in I2 ∪ I3 . We next use the result of the previous theorem, together with the chromatic number of planar and triangle-free planar graphs to achieve a 2 approximation for Ind(G). Theorem 3. Assume G is planar and let T be a set of 3t vertices corresponding to t vertex disjoint triangles. Then,  n  3n+3t + 34 for t ≤ 12 n − CP(G)  4n−12t n 1≤ ≤ nt + 74 for 12 ≤ t ≤ n4 .  Ind(G)  for t ≥ n4 4 − 8t n Maximizing over t implies that n − CP(G) is a 2 approximation for Ind(G) and a 3/2 approximation if G is triangle-free. Proof. From Theorem 2, we know that CP(G) ≥ 2t + 3/4 VC(G0 ) where G0 = G[V \ T ]. Therefore, we can bound n − CP(G) as follows: n − CP(G) ≤ n − (2t + 3/4 VC(G0 )) = n − (2t + 3/4(n − 3t − α(G0 ))) = (n + t)/4 + 3/4 α(G0 ) On the other hand, Ind(G) ≥ α(G) ≥ α(G0 ) where α denotes the size of the maximum independent set of the graph. Note that α(G) ≥ n/4 since G is planar and thus 4-colorable [2, 3]. Since G0 has n − 3t vertices and is triangle-free and planar and thus 6 3-colorable [14], n − 3t ≥ α(G0 ) ≥ (n − 3t)/3. By combining inequalities above we get   n − CP(G) (n + t)/4 + 3/4 α(G0 ) (n + t)/4 + 3/4 α(G0 ) (n + t)/4 + 3/4 α(G) ≤ min , , Ind(G) α(G) α(G0 ) α(G)   (n + t)/4 + 3/4(n − 3t) (n + t)/4 (n + t)/4 ≤ min , + 3/4, + 3/4 n/4 (n − 3t)/3 n/4   7 8t 3n + 3t 3 t . + , + = min 4 − , n 4n − 3t 4 n 4 4 Upper Bounds on Storage Capacity via Multiple Vertex Covers In this section, we start by considering a linear program proposed by Blasiak, Kleinberg, and Lubetzky [8] that can be used to lower bound the optimum index coding rate or upper bound the storage capacity.3 Unfortunately there are Ω(2n ) constraints but by carefully selecting a subset of constraints we can prove upper bounds on the storage capacity for a specific graph without solving the LP. Our main goal in this section is to relate this linear program to a finding a suitable family of vertex covers of the graph. In doing so, we propose a most combinatorial “gadget” based approach to constructing good upper bounds that we think makes the process of proving strong upper bounds more intuitive. This allows us to prove a more general theorem that gives an upper bound on the storage capacity for a relatively large family of graphs. As an application of this theorem we show that a class of graphs closely related to the family of outerplanar graphs and another family of cartesian product graphs have capacity exactly n/2. 4.1 Upper Bound via the “Information Theoretic” LP We first rewrite the index coding LP proposed by Blasiak, Kleinberg, and Lubetzky [8] for the purposes of upper-bounding storage capacity. We define a variable zS for every S ⊆ V that will correspond to an upper bound for H(XS ). Let cl(S) = S ∪ {v : N (v) ⊆ S} denote the closure of the set S consisting of vertices in S and vertices with all neighbors in S. maximize zV s.t. z∅ = 0 zT − zS ≤ |T \ cl(S)| zS + zT ≥ zS∩T + zS∪T ∀S ⊆ T ∀S, T The second constraint corresponds to H(XT ) − H(XS ) = H(XT |XS ) = H(XT |Xcl(S) ) ≤ H(XT \cl(S) ) ≤ |T \ cl(S)| , whereas the last constraint follows from the sub-modularity of entropy. Hence, the optimal solution to the above LP is an upper bound on Cap(G). We henceforth refer to the above linear program as the information theoretic LP. 3 Blasiak et al. only consider index coding but it is straightforward to adapt the LP in a natural way for storage capacity; see below. 7 4.2 Upper Bound via Gadgets k-cover by gadgets is a technique for proving upper bounds on the storage capacity of graph. The core idea is to construct a set of k vertex covers for the graph via the construction of various gadgets which we now define. A gadget g(A, B) is created the following way: take two sets of vertices A and B, take their closures cl(A) and cl(B), find S = cl(A) ∪ cl(B) and T = cl(A) ∩ cl(B). Then S and T form a gadget. Call S the outside of the gadget and T the inside. We note that by taking A = {v} and B = ∅ we obtain a gadget with the outside {v} and empty inside (assuming v has no neighbors of degree one); call such gadget trivial. Define the weight of a gadget to be |A| + |B|. If we color every inside and outside gadget set with one of k colors such that the union of all sets of the same color forms a vertex cover, the total weight of gadgets in such coloring provides an upper bound on k Cap(G). Note that for k = 1 using gadgets with non-empty inside can only increase the total weight, so the only gadgets we need to consider are the trivial ones corresponding to individual vertices, and thus the construction is just a single vertex cover. We can formulate the k-cover by gadgets (for fixed k) as the following linear program: Let xS,c be a variable where S is a set that is an outside or an inside of a gadget and c is one of k colors. Each variable has a corresponding weight wS,c = (|A| + |B|)/2 where A and B are the 2 sets used to form the gadget that S is a part of. xS,c = 1 if set S is colored with color c and 0 otherwise. minimize s.t. 1X wS,c xS,c k S,c X X xS,c + xS,c ≥ 1 S:u∈S X c ∀(u, v) ∈ E, ∀c S:v∈S xH,c = X xH 0 ,c c for all gadgets, where H is the outside of the gadget and H 0 the inside of the same gadget The first condition states that every collection of sets of a certain color is a vertex cover and the second one states that the outside and inside of every gadget are used the same number of times. Theorem 4. Any feasible integral solution to the above k-cover by gadgets LP is an upper bound on Cap(G). Proof. We prove this by showing that k-cover by gadgets follows from the fact that the optimum solution of the information theoretic LP is an upper bound. First, note which constraints correspond to the steps of forming a gadget: zA ≤ |A| take set A zB ≤ |B| take set B zcl(A) − zA ≤ 0 find closure of A zcl(B) − zB ≤ 0 find closure of B zS + zT ≤ zcl(A) + zcl(B) find S = cl(A) ∪ cl(B) and T = cl(A) ∩ cl(B) If we sum all the constraints, we obtain zS + zT ≤ |A| + |B|. Assume, that we used g gadgets in the cover. Then by summing all corresponding constraints, we get zS1 + zT1 + zS2 + zT2 + · · · + zSg + zTg ≤ |A1 | + |B1 | + · · · + |Ag | + |Bg | 8 4 5 3 6 1 9 2 8 3 7 9 2 7 1 8 4 6 5 (a) An Odd Cycle. (b) An Outerplanar Graph. Figure 1: Two examples of k-cover upper bounds. See text for details. Group the sets into color classes C1 , C2 , . . . , Ck . Let Ui = S S. The corresponding constraints are then S∈Ci zUi − X zS ≤ 0 ∀i ∈ {1, 2, . . . , k} S∈Ci zcl(Ui ) − zUi ≤ 0 ∀i ∈ {1, 2, . . . , k} Note that zV = zcl(Ui ) since Ui is a vertex cover. By summing these 2k constraints and the one obtained from building gadgets, we get kzV ≤ |A1 | + |B1 | + · · · + |Ag | + |Bg |. 4.2.1 Examples We next illustrate the use of the k-cover via gadgets approach with a couple of examples. First, we re-prove a result of Blasiak et al. [9] via a 2-cover by gadgets. Then we give an example of an outerplanar graph where it is necessary to consider a 3-cover by gadgets in order to establish a tight bound. Odd Cycles. We prove that the storage capacity of an odd cycle of length n is n/2; see Figure 1(a) for an example where n = 9. FM(Cn ) = n/2, thus Cap(Cn ) ≥ n/2. For the upper bound we form a gadget g(A, B) by taking A = {v1 , v3 }, B = {v2 , v4 } and obtaining outer set S = {v1 , v2 , v3 , v4 } and inner set T = {v2 , v3 }. On the rest of the vertices we place trivial gadgets. Color S and trivial gadgets on v6 , v8 , . . . , vn−1 green, color T and trivial gadgets on v5 , v7 , . . . , vn red. Green and red sets are then vertex covers and the total weight of all gadgets is n. Thus, Cap(Cn ) ≤ n/2. An Outerplanar Graph. We prove that the storage capacity of the graph in Figure 1(b) is 14/3. This capacity is achieved by the fractional clique cover. Create a gadget g1 (A1 , B1 ) from A1 = {v1 , v3 } and B1 = {v2 , v4 } and another gadget g2 (A2 , B2 ) from A2 = {v5 , v7 } and B2 = {v6 , v8 }. Place 1 trivial gadget on each of the vertices v2 , v4 , v5 , v7 and 2 trivial gadgets on v9 . Color the sets as follows: • Red: v5 , v7 , v9 and the inside of gadget g1 • Blue: v2 , v4 , v9 and the inside of gadget g2 • Green: the outside sets of both gadgets Note that vertices of every color class form a vertex cover and the total weight of gadgets is 14. 9 (a) Graph G. Shaded vertices are X = SX . (b) Graph G[Y ]. Shaded vertices are SY . Figure 2: Example of storage capacity proof for a cartesian product graph G formed from a 5-cycle and a length 3 path. See text for details. 4.3 n/2 Upper Bound via Vertex Partition The next theorem uses a 2-cover by gadgets to prove that a certain family of graphs have capacity at most n/2. Subsequently, we will use this theorem to exactly characterize the capacity of various graph families of interest. Theorem 5. Suppose that the vertices of a graph G can be partitioned into sets X and Y such that: 1. G[X] and G[Y ] are both bipartite. 2. SX is an independent set in G[X] and SY is an independent set in G[Y ] where SX ⊆ X consists of all vertices in X with a neighbor in Y and SY ⊆ Y consists of all vertices in Y with a neighbor in X. Then Cap(G) ≤ n/2. Proof. We prove this theorem by showing that G has a 2-cover by gadgets of total weight n. First, form a gadget gX (A, B) by letting (A, B) be a bipartition of the vertices of G[X]. Note that the vertices in X that are in the outside set of the gadget but not in the inside set, are exactly the vertices in SX . This follows because for v ∈ X, v ∈ cl(A) ∩ cl(B) iff all of v’s neighbors are in X. Similarly, form gY . Color the inside of gX and the outside of gY red. Color the outside of gX and the inside of gY blue. Observe that both color classes are vertex covers and the total weight of the 2 gadgets is |X| + |Y | = n. 4.3.1 Cartesian Product of a Cycle and a Bipartite Graph The Cartesian product of graphs G1 = (V1 , E1 ) and G2 = (V2 , E2 ) is denoted by G1 G2 and defined as follows: • The vertex set is the Cartesian set product V1 × V2 • (u, u0 )(v, v 0 ) is an edge iff u = v and u0 v 0 ∈ E2 or u0 = v 0 and uv ∈ E1 We next use Theorem 5 to show that any Cartesian Product of a cycle and a bipartite graph has storage capacity exactly n/2. Theorem 6. Let Ck be a cycle with k > 3, B a bipartite graph, and G = Ck B. Then Cap(G) = n/2, where n is the number of vertices in G. 10 Proof. If k is even, G is a bipartite graph with MM(G) = VC(G) = n/2 and hence Cap(G) = n/2. Assume for the rest of the proof that k is odd. To show that Cap(G) ≥ n/2, consider the fractional matching where we assign weight 1/2 to all edges of the form (u, a)(v, a), i.e., edges that come from the cycle. Hence Cap(G) ≥ n/2. To show that Cap(G) ≤ n/2 we proceed as follows. Consider the subgraph induced by vertices (ui , v1 ), (ui , v2 ), (ui , v3 ), etc., which is isomorphic to B. Color it using 2 colors and call the vertices of each color Ri and Qi respectively. We now show that X = R1 ∪ Q2 and Y = V \ X satisfy the conditions of theorem 5. G[X] has no edges and therefore is bipartite. G[Y ] is bipartite because it consists of Pk−3 B which is bipartite (where Pk−3 is a path of length k − 3 obtained by deleting edges uk u1 , u1 u2 , and u2 u3 from the cycle), edges between Rk and R1 , and edges between Q2 and Q3 which do not complete any cycles. SX = X is an independent set. SY = Rk ∪ Q1 ∪ R2 ∪ Q3 is also an independent set. 4.3.2 Cycles With Chords That Are Not Too Close Together We next apply Theorem 5 to prove that a family of graphs related to outerplanar graphs also has storage capacity n/2. Recall that any (connected) outerplanar graph without cut vertices is a cycle with nonoverlapping chords. The family of graphs we consider is more general in the sense that we permit the chords to overlap but more restrictive in the sense that we require the endpoints of these chords to be at least a distance 4 apart on the cycle. A natural open question is to characterize Cap(G) for all outerplanar graphs. All that was previously known is that if we assume each Xi is a linear combination of {Xj }j∈N (i) , then Cap(G) equals integral clique packing [7]. Theorem 7. Let G be a cycle with a number of chords such that endpoints of chords are at least distance 4 apart on the cycle. Then Cap(G) = n/2. Proof. To show that Cap(G) ≥ n/2, consider the fractional matching where we place weight 1/2 on every edge of the cycle. To show that Cap(G) ≤ n/2 we proceed as follows. Label the vertices that are endpoints of chords c1 , c2 , . . . , ck in the order they appear on the cycle. For every path between ci and ci+1 (and between ck and c1 ) pick the middle vertex of the path to be included in X. If the path is of odd length, pick any of the 2 middle vertices. We now show that X and Y = V \ X satisfy the conditions of theorem 5. X = SX is an independent set. G[Y ] is a forest and SY is an independent set due to the assumption on the distance between chord endpoints. 5 Partial Recovery In this section, we extend the notion of storage capacity to cover for partial failures. This is a new generalization, that, as far as we understand, does not have a counterpart in index coding. As before, suppose we have a graph G(V = [n], E) on n vertices. We assume here that vertex i ∈ [n] stores Xi ∈ Fm q , a q-ary random vector of length m. We want the following repair criterion to be satisfied: if up to any δ, 0 ≤ δ ≤ 1, proportion of the m coordinates of Xi , i ∈ [n] are erased, they can be recovered by using the remaining content of the vertex i and XN (i) , the contents in the neighbors of the vertex. We call the normalized asymptotic maximum total amount of information (in terms of q-ary unit) lim m→∞ H(X1 , X2 , . . . , Xn ) , m that can be stored in the graph G, to be the partial recovery capacity of G. This is denoted by Capq (G, δ). 11 (a) Graph G. Shaded vertices are X = SX . (b) Graph G[Y ]. Shaded vertices are SY . Figure 3: Example of a storage capacity proof for cycles with chords. See text for details. We have the following simple facts. Proposition 8. For a graph G, Capq (G, 0) = n and Capq (G, 1) = Cap(G). Proof. The first statement is quite evident. For the second, note that, Capq (G, 1) = lim Capqm (G) = sup Capqm (G) = Cap(G), m→∞ m where we could use the lim and the sup interchangeably since Capqm (G) is a nondecreasing and bounded sequence in m. In the remaining parts of this section, we will provide tight upper and lower bound on the quantity Capq (G, δ). 5.1 Impossibility bound Note that, the partial recovery capacity can be defined in terms of an entropy maximization problem, generalizing the storage capacity. Theorem 9. Let H(X) be the entropy of X measured in q-ary units. Suppose, Xi ∈ Fm q , i ∈ [n]. For a graph G([n], E), Capq (G, δ) is upper bounded by the solution of the following optimization problem. max lim m→∞ H(X1 , . . . , Xn ) , m (8) such that, H(Xi | XN (i) ) ≤ logq Aq (m, δm + 1), where Aq (m, d) is the maximum possible size of a q-ary m-length error-correcting code with minimum distance d. 12 Proof. Let Xi ∈ Fm q , i ∈ [n] be the random variables that can be stored in the vertices of G satisfying the repair condition. Suppose we are given the values of XN (i) . In this situation let M ⊆ Fm q be the set of possible values of Xi (P (Xi = a) > 0, ∀a ∈ M ). Let Xi1 , Xi2 be any two different elements of M . We claim that, the Hamming distance between Xi1 , Xi2 is at least δm + 1, or d(Xi1 , Xi2 ) ≥ δm + 1. Suppose this is not true. Then there exist Xi1 , Xi2 ∈ M such that d(Xi1 , Xi2 ) ≤ δm. Let J ⊂ {1, . . . , m} be the coordinates where Xi1 and Xi2 differ. Therefore, |J| ≤ δm. Suppose Xi1 was stored in vertex i and the coordinates in J are erased. Now, there will not be any way to uniquely identify Xi : it can be either of Xi1 or Xi2 . Hence the repair condition will not be satisfied which is a contradiction. Therefore, M ⊆ Fm q is a set of vectors such that any two elements of M is Hamming distance at least δm + 1 apart. Hence M is an error-correcting code with minimum distance δm + 1. And therefore, |M | ≤ Aq (m, d). This implies, H(Xi | XN (i) ) ≤ logq Aq (m, δm + 1), which proves the theorem. Let us define Rq (δ) ≡ lim m→∞ Aq (m, δm + 1) , m assuming the limit exists. Corollary 10. We must have, for any graph G, Capq (G, δ) = Cap(G) for δ ≥ 1 − 1q . In particular, Cap2 (G, δ) = Cap(G) for δ ≥ 12 . The proof of this fact follows since Rq (δ) = 0 for δ ≥ 1 − 1q . Generalizing the technique of upper bounding the storage capacity via an information theoretic linear program, we can obtain an upper bound on Capq (G, δ). We define a variable zS for every S ⊆ V and let bo(S, T ) = (cl(S) \ S) ∩ T denote the boundary of the set S consisting of vertices in T with all neighbors in S. Our main upper bound is the following. Theorem 11. Consider the LP below. maximize zV s.t. z∅ = 0 zT − zS ≤ |T \ S| − (1 − Rq (δ)) bo(S, T ) ∀S ⊆ T zS + zT ≥ zS∩T + zS∪T ∀S, T The optimal solution to the above LP is an upper bound on Capq (G, δ). We omit the proof here since it is exactly same as the proof of the bound via information theoretic LP of Sec. 4.1. 5.1.1 Odd cycle Consider an odd cycle with n vertices (n is odd). Below we show an example to illustrate the above bound on partial recovery capacity. 13 Consider the following subset of constraints: 2 ≥ z{1,3} − z∅ 2 ≥ z{2,4} − z∅ 1 ≥ z{i} ∀i ∈ {5, 6, . . . , n} Rq (δ) ≥ z{1,2,3} − z{1,3} Rq (δ) ≥ z{2,3,4} − z{2,4} z{1,2,3} + z{2,3,4} ≥ z{2,3} + z{1,2,3,4} n−3 z z{2,3} + z{5} + z{7} + · · · + z{n} ≥ z{2,3,5,7,...,n} + 2 ∅ n−5 z z{1,2,3,4} + z{6} + z{8} + . . . z{n−1} ≥ z{1,2,3,4,6,8,...,n−1} + 2 ∅ n+1 n−1 (n − ) − (1 − Rq (δ)) ≥ zV − z{2,3,5,7,...,n} 2 2 n−3 n+3 ) − (1 − Rq (δ)) ≥ zV − z{1,2,3,4,6,8,...,n−1} (n − 2 2 (a) (b) Equations (a) and (b) above are repeated applications of the inequality: zS + zT ≥ zS∪T + z∅ if S ∩ T = ∅. By summing up those constraints we get n + 2Rq (δ) + Rq (δ)(n − 2) ≥ 2zV − 2z∅ and thus Capq (G, δ) ≤ zV ≤ n (1 + Rq (δ)), 2 whenever G is an odd cycle. 5.2 Achievability bound A naive achievability bound on Capq (G, δ) is given by, Capq (G, δ) ≥ n(1 − hq (δ)), 1 δ≤ , 2 where hq (x) ≡ x logq (q − 1) − x logq x − (1 − x) logq (1 − x). This amount of storage can be achieved by just using an error-correcting code of length m, distance δm + 1, and rate 1 − hq (δ) in each of the vertices. Such codes exist, by the Gilbert-Varshamov bound. Also, Capq (G, δ) ≥ 0, for 0 ≤ δ ≤ 1 − 1q . This simple bound can be improved by more carefully designing a code. Our main result of this section is the following. Theorem 12. Given a graph G, let C be the set of all cliques of G. The generalized clique packing number CPδ (G) is defined to be the optimum of the following linear program. For 0 ≤ xC ≤ 1, ∀C ∈ C, X max xC (|C| − hq (δ)), C∈C 14 such that, X xC ≤ 1. C∈C:u∈C Then, Capq (G, δ) ≥ CPδ (G), 1 δ ≤1− , q Capq (G, δ) ≥ CP(G), 1 δ >1− . q and, Proof. We illustrate the proof of this theorem by constructing a sequence of error-correcting codes that serves our purpose. Let us first find a maximum matching M ⊆ E of the graph. Now for each edge (u, v) ∈ M use a q-ary error-correcting code of length 2m that can correct any δm erasures in the first m coordinates and any δm erasures in the second m coordinates. We claim that such error-correcting code of length 2m and dimension 2m − mhq (δ) exists. Randomly and uniformly choose a q-ary parity check matrix of size (2m − k) × 2m (that is, each coordinate of the matrix is chosen from {0, 1, . . . , q − 1} with uniform probability). The probability that a vector of weight δm is a codeword is q −(2m−k) . Now the probability that there exists such a codeword that is an uncorrectable erasure pattern of the above type is   m 1 ≤2 (q − 1)δm q −(2m−k) ∼ q −(2m−k−mhq (δ)) , δ ≤ 1 − . δm q Hence there exists such a code with dimension = 2m − mhq (δ). Therefore the total number of q-ary numbers that can be stored is |M | · (2m − mhq (δ)) = m · MM(G)(2 − hq (δ)), where MM(G) is a maximum matching in G. Hence, Capq (G, δ) ≥ MM(G)(2 − hq (δ)), 1 δ ≤1− . q For δ ≥ 1 − 1q , Capq (G, δ) ≥ MM(G). Following an argument similar to Lemma 1, it is possible to improve the maximum matching argument here to the fractional maximum matching. Therefore, we must have, Capq (G, δ) ≥ FM(G)(2 − hq (δ)), 1 δ ≤1− , q and, or δ ≥ 1 − 1q , Capq (G, δ) ≥ FM(G), where FM(G) denote the size of the maximum fractional matching of G. The above argument can easily be extended towards clique packing instead of maximum matching. If we have a clique of size L, then we need to choose a code of length Lm. We again, randomly and uniformly choose a q-ary parity check matrix of size (Lm − k) × Lm. The probability that a vector of weight δm is a codeword is q −(Lm−k) . Now the probability that there exists such a codeword that is an uncorrectable erasure pattern of the above type is   m 1 ≤L (q − 1)δm q −(Lm−k) ∼ q −(Lm−k−mhq (δ)) , δ ≤ 1 − . δm q 15 Therefore there exists a good code of dimension Lm − mhq (δ). Using this code, total number of q-ary integers that can be stored is m CPδ (G), by following the argument of Lemma 1. This proves the claim. Example - Odd Cycle: Let us consider the example of n-cycle again where n is an odd number. Since the size of a fractional matching is n2 , we have Capq (G, δ) ≥ and Capq (G, δ) ≥ n 2 n (2 − hq (δ)), 2 1 δ ≤1− , q when δ > 1 − 1q . Compare this with the impossibility bound that we have, Capq (G, δ) ≤ n (1 + Rq (δ)). 2 It is widely conjectured that the optimal rate of an error-correcting code is given by Rq (δ) = 1 − hq (δ), for small q, which is also known as the Gilbert-Varshamov conjecture. If this conjecture is true, then our upper and lower bounds match exactly. In particular, for large q (i.e., q → ∞), we have hq (δ) → δ and Rq (δ) → 1 − δ. Hence, our bounds match definitively in the regime of large q. References [1] N. Alon and A. Orlitsky. Source coding and graph entropies. IEEE Transactions on Information Theory, 42(5):1329–1339, 1996. [2] K. Appel and W. Haken. Every planar map is four colorable. part i: Discharging. Illinois J. Math., 21(3):429–490, 09 1977. [3] K. Appel, W. Haken, and J. Koch. Every planar map is four colorable. part ii: Reducibility. Illinois J. Math., 21(3):491–567, 09 1977. [4] B. S. Baker. Approximation algorithms for np-complete problems on planar graphs. J. ACM, 41(1):153–180, 1994. [5] R. Bar-Yehuda and S. Even. On approximating a vertex cover for planar graphs. In Proceedings of the 14th Annual ACM Symposium on Theory of Computing, May 5-7, 1982, San Francisco, California, USA, pages 303–309, 1982. [6] Z. Bar-Yossef, Y. Birk, T. Jayram, and T. Kol. Index coding with side information. IEEE Transactions on Information Theory, 57(3):1479–1494, 2011. [7] Y. Berliner and M. Langberg. Index coding with outerplanar side information. In Information Theory Proceedings (ISIT), 2011 IEEE International Symposium on, pages 806–810. IEEE, 2011. [8] A. Blasiak, R. Kleinberg, and E. Lubetzky. Lexicographic products and the power of non-linear network coding. In IEEE 52nd Annual Symposium on Foundations of Computer Science, FOCS 2011, Palm Springs, CA, USA, October 22-25, 2011, pages 609–618, 2011. [9] A. Blasiak, R. D. Kleinberg, and E. Lubetzky. Index coding via linear programming. CoRR, abs/1004.1379, 2010. [10] R. Bowden, H. X. Nguyen, N. Falkner, S. Knight, and M. Roughan. Planarity of data networks. In Teletraffic Congress (ITC), 2011 23rd International, pages 254–261. IEEE, 2011. 16 [11] M. Effros, S. El Rouayheb, and M. Langberg. An equivalence between network coding and index coding. IEEE Transactions on Information Theory, 61(5):2478–2487, 2015. [12] M. Gadouleau, A. Richard, and S. Riis. Fixed points of boolean networks, guessing graphs, and coding theory. SIAM Journal on Discrete Mathematics, 29(4):2312–2335, 2015. [13] P. Gopalan, C. Huang, H. Simitci, and S. Yekhanin. On the locality of codeword symbols. IEEE Transactions on Information Theory, 58(11):6925–6934, 2012. [14] H. Grötzsch. Zur theorie der diskreten gebilde, vii: Ein dreifarbensatz fr dreikreisfreie netze auf der kugel. Wiss. Z. Martin-Luther-U., Halle-Wittenberg, Math.-Nat. Reihe, 8:109120, 1959. [15] S. Khot and O. Regev. Vertex cover might be hard to approximate to within 2- ε. Journal of Computer and System Sciences, 74(3):335–349, 2008. [16] M. Langberg and A. Sprintson. On the hardness of approximating the network coding capacity. IEEE Transactions on Information Theory, 57(2):1008–1014, 2011. [17] A. Mazumdar. Storage capacity of repairable networks. IEEE Transactions on Information Theory, 61(11):5810– 5821, 2015. [18] C. Shannon. The zero error capacity of a noisy channel. IRE Transactions on Information Theory, 2(3):8–19, 1956. 17
7cs.IT
Genetic Algorithm with Optimal Recombination for the Asymmetric Travelling Salesman Problem arXiv:1706.06920v2 [cs.NE] 19 Dec 2017 Anton V. Eremeev, Yulia V. Kovalenko∗ December 20, 2017 Sobolev Institute of Mathematics, 4, Akad. Koptyug avenue, 630090, Novosibirsk, Russia. Email: eremeev@ofim.oscsbras.ru, [email protected] Abstract We propose a new genetic algorithm with optimal recombination for the asymmetric instances of travelling salesman problem. The algorithm incorporates several new features that contribute to its effectiveness: 1. Optimal recombination problem is solved within crossover operator. 2. A new mutation operator performs a random jump within 3-opt or 4-opt neighborhood. 3. Greedy constructive heuristic of W. Zhang and 3-opt local search heuristic are used to generate the initial population. A computational experiment on TSPLIB instances shows that the proposed algorithm yields competitive results to other well-known memetic algorithms for asymmetric travelling salesman problem. Keywords: Genetic Algorithm, Optimal Recombination, Local Search 1 Introduction Travelling Salesman Problem (TSP) is a well-known NP-hard combinatorial optimization problem [8]. Given a complete digraph G with the set of vertices V = {v1 , . . . , vn }, the set of arcs A = {(vi , vj ) : vi , vj ∈ V, i 6= j} and arc weights (lengths) cij ≥ 0 of each arc (vi , vj ) ∈ A, the TSP asks for a Hamiltonian circuit of minimum length. If cij 6= cji for at least one pair (vi , vj ) then the TSP is called the Asymmetric Travelling Salesman Problem (ATSP). Numerous metaheuristics and heuristics have been proposed for the TSP and the genetic algorithms (GAs) are among them (see e.g. [2, 3, 7, 16, 18]). The performance of GAs depends significantly upon the choice of the crossover operator, where the components of parent solutions are combined to build the offspring. A supplementary problem that emerges in some versions of crossover operator is called Optimal Recombination Problem (ORP). Given two feasible parent solutions, ORP consists in finding the best possible offspring in view of the basic principles of crossover [13]. ∗ This research is supported by the Russian Science Foundation grant 15-11-10009. 1 Experimental results [3, 16, 18] indicate that ORP may be used successfully in genetic algorithms. In this paper, we propose a new GA using the ORP with adjacency-based representation to solve the ATSP. Two simple crossover-based GAs for ATSP using ORPs were investigated in [7] but no problem-specific local search procedures or fine-tuning of parameters were used. In comparison to the GAs from [7], the GA proposed in this paper uses a 3-opt local search heuristic and a problem-specific heuristic of W. Zhang [19] to generate the initial population. In addition, this GA applies a new mutation operator, which performs a random jump within 3-opt or 4-opt neighborhood. The current GA is based on the steady state replacement [14], while the GAs in [7] were based on the elitist recombination (see e.g. [9]). The experimental evaluation on instances from TSPLIB library shows that the proposed GA yields results competitive to those obtained by some other well-known evolutionary algorithms for the ATSP. 2 Genetic Algorithm The genetic algorithm is a random search method that models a process of evolution of a population of individuals [14]. Each individual is a sample solution to the optimization problem being solved. The components of an individual are called genes. Individuals of a new population are built by means of reproduction operators (crossover and/or mutation). The crossover operator produces the offspring from two parent individuals by combining and exchanging their genes. The mutation adds small random changes to an individual. The formal scheme of the GA with steady state replacement is as follows: Steady State Genetic Algorithm Step 1. Construct the initial population and assign t := 1. Step 2. Repeat steps 2.1-2.4 until some stopping criterion is satisfied: 2.1. Choose two parent individuals p1 , p2 from the population. 2.2. Apply mutation to p1 and p2 and obtain individuals p′1 , p′2 . 2.3. Create an offspring p′ , applying a crossover to p′1 and p′2 . 2.4. Choose a least fit individual in population and replace it by p′ . 2.5. Set t := t + 1. Step 3. The result is the best found individual w.r.t. objective function. Our implementation of the GA is initiated by generating N initial solutions, and the population size N remains constant during the execution of the GA. Two individuals of the initial population are constructed by means of the problem-specific heuristic of W. Zhang [19]. The heuristic first solves the Assignment Problem, and then patches the cycles of the optimum assignment together to form a feasible tour. R. Karp [12] proposed two variants of the patching. In the first one, some cycle of maximum length is selected and the remaining cycles are patched into it. In the second one, cycles are patched one by one in a special sequence, starting with a shortest cycle. All other N − 2 individuals of the initial population are generated using the arbitrary insertion method [18], followed by a local search heuristic with a 3-opt neighborhood (see Subsection 2.2). Each parent on Step 2.1 is chosen by s-tournament selection: sample randomly s individuals from the current population and select a fittest among them. Operators of crossover and mutation are described in Subsections 2.1 and 2.3. 2 2.1 Recombination Operators Suppose that feasible solutions to the ATSP are encoded as vectors of adjacencies, where the immediate predecessor is indicated for each vertex. Then the optimal recombination problem with adjacency-based representation [6] consists in finding a shortest travelling salesman’s tour which coincides with two given feasible parent solutions in arcs belonging to both solutions and does not contain the arcs absent in both solutions. These constraints are equivalent to a requirement that the recombination should be respectful and gene transmitting as defined in [13]. The ORP with adjacency-based representation for the ATSP is shown to be NP-hard but it can be reduced to the TSP on graphs with bounded n vertex degrees [6]. The resulting TSP may be solved in O(n2 2 ) time by means of an adaptation of the algorithm proposed by D. Eppstein [5]. A detailed description of the reduction can be found in [6]. An experimental evaluation of the ORP with adjacencybased representation in a crossover-based GA was carried out in [7]. The experiments showed that the CPU cost of solving the ORPs in this GA is acceptable and decreases with iterations count, due to decreasing population diversity. In what follows, the optimized crossover operator, which solves the ORP with adjacency-based representation will be called Optimized Directed Edge Crossover (ODEC). This operator may be considered as a deterministic “direct descendant” of Directed Edge Crossover (DEC) [17]. Unlike DEC, Optimized Directed Edge Crossover guarantees genes transmission. An alternative way for solution encoding to the ATSP is the position-based representation, where a feasible solution is encoded as a sequence of the vertices of the TSP tour. The computational experiment performed in [7] indicates that the ORP for the adjacencybased representation has an advantage over the ORP for the position-based representation on ATSP instances from TSPLIB library. Therefore, in this paper we consider only the adjacency-based representation. Note that most of the known GAs for the TSP (see e.g. [2, 10, 16]) apply a local search on GA iterations. However an optimal recombination may be considered as a bestimproving move in a neighborhood defined by two parent solutions. So we use a local search only at the initialization stage. 2.2 Local Search Heuristic In general, k-opt neighborhood for TSP is defined as the set of tours that can be obtained from a given tour by replacing k arcs. Our Local Search Heuristic is a typical local search heuristic that explores a subset of 3-opt neighborhood. We try to improve the current tour by changing three of its arcs (see Figure 1). To this end, we consider all possible arcs of the current tour as candidates for arc (vi1 , vi2 ) to be deleted in the order of decreasing length. Observe that, in our search, the possibilities for choosing vi3 (arc (vi1 , vi3 ) is added) may be limited to those vertices that are closer to vi1 than vi2 . To use this property, for each vertex v we store a list of the remaining vertices in the order of increasing length from v. Considering candidates for vi3 , we start at the beginning of vi1 ’s list and proceed down the list until a vertex u with cvi1 ,u ≥ cvi1 ,vi2 is reached. Moreover, only the ⌈0.2n⌉ nearest vertices are stored in the sorted list of each vertex, which allows to reduce the running time and the memory usage as observed in [10]. Finally, among all vertices belonging to the closed cycle C created by (vi1 , vi3 ), we choose a vertex vi5 that would produce the most favorable 3-change. Local Search 3 Heuristic stops if no favorable 3-change is possible, otherwise it proceeds to the next step with a new tour obtained. Figure 1: 3-change and quad change. In order to reduce the running time of the presented local search heuristic, we use the well-known “donЎt look bits” and “first improving move” strategies presented in [10] for local search based on 3-opt neighborhood. 2.3 Mutation Operators The mutation is applied to each parent solution on Step 2.2 with probability pmut , which is a tunable parameter of the GA. We implement two mutation operators that perform a random jump within 3-opt or 4-opt neighborhood. Each time one of the operators is used for mutation with equal probability. The first mutation operator makes a 3-change (see Section 2.2). First of all, an arc (vi1 , vi2 ) is chosen at random among all arcs of the given tour. After that, an arc (vi1 , vi3 ) is chosen using the following idea from [11]. For each possible arc (vi1 , u), we calculate F (u) = cv,u + |C(u)| · caver , where v is the immediate predecessor of u in the given tour, |C(u)| is the length of the cycle created by u and caver is the average weight of arcs in graph G. Then an arc (vi1 , vi3 ) is chosen uniformly at random among the top 50% of arcs (vi1 , u) w.r.t. F (u) value. The reason for taking into account the value of |C(u)| when (vi1 , vi3 ) is being chosen is that the bigger the value of C(u) the more options for (vi4 , vi5 ) will become available subsequently. Finally, we choose the arc (vi6 , vi5 ) among the arcs of C(vi3 ) so that the most favorable 3-change is produced. The second mutation operator is based on 4-opt neighborhood and implements a quad change [11] (see Figure 1). Here two arcs (vi1 , vi2 ) and (vi7 , vi8 ) are selected randomly and removed, while the other two arcs for deletion are chosen so that the most favorable quad change is obtained. 3 Computational Experiments This section presents the results of computational experiments on the ATSP instances from TSPLIB library [15]. The GA was programmed in Java (NetBeans IDE 7.2.1) and tested on a computer with Intel Core 2 Duo CPU E7200 2.53 GHz processor, 2 Gb RAM. In the experiments, we set the population size N = 100, the tournament size s = 10 and the mutation probability pmut = 0.1. Our GA is restarted every time as soon as the current iteration number becomes twice the iteration number when the best incumbent was found, until the overall execution 4 time reached the limit. Moreover, if the greedy heuristic of W. Zhang generates only one subcycle, this indicates that the ATSP instance was solved to optimality, and the algorithm stops. The best solution found over all restarts was returned as the result. We have also tested an alternative approach, where the GA runs for the whole given period of time without restarts but it turned to be inferior to the GA with the restart rule. The first computational experiment is aimed at comparison of the performance of our GA based on ODEC (GAODEC ) with SAX/RAI memetic algorithm (MASAX/RAI ) from [2], which has one of the best results in the literature on metaheuristics for the ATSP. In order to put the considered algorithms into equal positions, GAODEC was given the CPU-time limit (denoted as T ) by a factor 3 less than the CPU resource used by MASAX/RAI in [2]. This scaling factor chosen on the basis a rough comparison of computers by means of performance table [4]. For a statistical comparison, on each instance we executed GAODEC 1000 times. In each execution GAODEC was given the same CPUtime limit indicated above. In [2], MASAX/RAI was run 20 times on each instance. Table 1 shows the obtained results, where Fopt represents the frequency of finding an optimum, ∆err is the average percentage deviation of the length of a resulting solution from the optimum, ∆init denotes the average percentage deviation of the length of the best initial solution from the optimum. As seen from Table 1, GAODEC achieved 100% success rate on 17 out of 26 instances. On each instance, GAODEC found optima in not less than 91% of runs. The statistical analysis of experimental data was carried out using a significance test of the null hypothesis from [1], Ch. 8, §2. Suppose that two algorithms are compared in terms of probability of “success”, where “success” corresponds to finding an optimal solution. Let P1 and P2 denote the probabilities of success for the considered algorithms. The null hypothesis is expressed by P1 = P2 . The test procedure is as follows. Under the null hypothesis, the estimate of common ˆ N1 +Pˆ2 N2 success rate is P̂ = P1 N , where Pˆ1 denotes the frequency of success in N1 runs for 1 +N2 the first algorithm and Pˆ2 is the frequency of success in N2 runs for the second algorithm. Then the difference Pˆ1 − Pˆ2 is expressed q in units of the standard deviation by calculating ˆ ˆ ˆ = P̂ (1−P̂ ) + P̂ (1−P̂ ) is the estimation of the standard the statistic A = |P1 −P2 | , where SD ˆ SD N1 N2 deviation. It is supposed that statistic A is normally distributed. To test the null hypothesis versus the alternative one at a confidence level α, we compare the computed A to the quantile of standard normal distribution zα/2 . If A is lager than zα/2 , the null hypothesis is rejected. Otherwise the null hypothesis is accepted. At α = 0.05 we have z0.025 = 1.96. The values of statistic A for algorithms GAODEC and MASAX/RAI are found and presented in the last column of Table 1 (‘∗’ indicates the statistical significance difference between GAODEC and MASAX/RAI at level α = 0.05). In 14 out of 26 instances, GAODEC finds an optimum more frequently than MASAX/RAI (in 12 cases among these, the difference between the frequencies of finding an optimum is statistically significant). Both algorithms demonstrate 100% frequency of obtaining an optimum on 10 problems. Note that the heuristic of W. Zhang is very efficient on series rbg and the optimal solutions to all rbg instances were found in the considered algorithms at the initialization stage. MASAX/RAI slightly outperforms GAODEC only on two instances ftv90 and ftv100, but the differences are not statistically significant. Moreover, the average quality of the resulting solutions for GAODEC is approximately in 5 Table 1: Computational Results for the ATSP Instances Instance ftv33 ftv35 ftv38 p43 ftv44 ftv47 ry48p ft53 ftv55 ftv64 ft70 ftv70 ftv90 ftv100 kro124p ftv110 ftv120 ftv130 ftv140 ftv150 ftv160 ftv170 rbg323 rbg358 rbg403 rbg443 Average ∆init 0.00 0.00 0.00 0.00 0.098 0.199 0.978 0.438 0.002 0.032 0.367 1.025 0.063 0.386 0.164 0.287 0.156 0.342 0.111 0.739 0.026 0.108 0.00 0.00 0.00 0.00 0.212 GAODEC Fopt 1 1 1∗ 1∗ 1∗ 1 0.997∗ 1 1 1 1∗ 1∗ 0.976 0.92 0.996∗ 0.972 0.912∗ 0.934 0.947∗ 0.982∗ 1∗ 1∗ 1 1 1 1 0.986 Genetic Algorithms GAER ∆err ∆init Fopt ∆err 0.00 0.00 1 0.00 0.00 0.00 1 0.00 0.00 0.131 1 0.00 0.00 0.00 1 0.00 0.00 0.167 0.874 0.078 0.00 0.338 1 0.00 0.0001 3.511 0.520 0.092 0.00 5.073 0.668 0.035 0.00 0.002 1 0.00 0.00 0.376 0.989 0.002 0.00 0.321 0.583 0.013 0.00 1.525 0.660 0.098 0.003 0.318 0.516 0.007 0.013 1.092 0.784 0.016 0.0001 0.288 0.322 0.033 0.003 0.305 0.854 0.025 0.008 2.463 0.430 0.506 0.008 1.841 0.361 0.068 0.004 0.601 0.463 0.065 0.002 1.358 0.532 0.068 0.00 0.958 0.491 0.099 0.00 0.334 0.222 0.141 0.00 0.00 1 0.00 0.00 0.00 1 0.00 0.00 0.00 1 0.00 0.00 0.00 1 0.00 0.0016 0.808 0.741 0.0518 M ASAX/RAI A 0 0 0 0 11.6 0 24.9 19.9 0 3.3 22.9 20.2 23.6 8.6 31.8 9.4 22.9 26.8 23.7 23.5 26.1 35.7 0 0 0 0 12.9 T, sec. 0.097 0.11 0.103 0.16 0.137 0.157 0.187 0.187 0.167 0.22 0.32 0.277 0.317 0.4 0.457 0.57 0.73 0.727 0.887 0.897 1.093 1.307 0.03 0.03 0.032 0.033 0.371 ∆init 12.83 0.14 0.13 0.05 7.01 2.70 5.42 18.20 3.61 3.81 1.88 3.33 3.67 3.24 6.46 4.7 8.31 3.12 2.23 2.3 1.71 1.38 0.00 0.00 0.00 0.00 3.701 Fopt 1 1 0.25 0.55 0.35 1 0.85 1 1 1 0.4 0.95 1 1 0.90 0.90 0.35 0.90 0.70 0.90 0.80 0.75 1 1 1 1 0.829 ∆err 0.00 0.00 0.10 0.01 0.44 0.00 0.03 0.00 0.00 0.00 0.03 0.01 0.00 0.00 0.01 0.02 0.14 0.01 0.08 0.01 0.02 0.05 0.00 0.00 0.00 0.00 0.0369 A 0 0 27.6 21.3 25.7 0 8.8 0 0 0 24.6 7.1 0.7 1.3 5.6 1.9 8.3 0.6 4.7 2.6 14.2 15.9 0 0 0 0 6.6 23 times better than the average quality for MASAX/RAI . The quality of initial solutions is better in our algorithm. (Note that we use the local search at the initialization stage, while MASAX/RAI applies a local search only on GA iterations.) Recently, Tinós at el. [16] proposed a GA with new crossover operator GAPX, which presents very competitive results in terms of frequencies of finding an optimum, but its CPU resource usage is significantly higher than that of GAODEC . On all of 16 TSPLIBinstances tested in [16] GA with GAPX demonstrated 100% success, while GAODEC displayed 99.96% success on average. However, the average CPU-time T of our GA was 0.22 sec. on these instances, and the overall CPU-time of GA with GAPX was 98.38 sec. on a similar computer. In the second experiment, we compare our steady state GA to the similar GA with the population management strategy known as elitist recombination [9] (GAER ) under the same CPU-time limit. The results are also listed in Table 1. The eighth column represents the values of statistic A for comparison of GAER against GAODEC on all ATSP instances. We estimate the average frequency of finding optimal solutions for GAER as approximately 60% of the average frequency for GAODEC (the difference between the frequencies is statistically significant), except for 10 of 26 instances where both algorithms have 100% success. Note that the GA with elitist recombination maintains the population diversity better. Due to this reason, the GA with elitist recombination outperformed the steady state GA in our preliminary experiments with no restarts, which were organized analogously to the experiments in [7]. The restarts performed in GAODEC allow to avoid localization of the search and restore the population diversity, leading to better results. We carried out the third experiment in order to compare the optimized crossover 6 ODEC to its randomized prototype DEC. This experiment clearly showed an advantage of ODEC over DEC. The modification of GAODEC , where operator DEC substitutes ODEC, on average gave only 45% frequency of obtaining an optimum within the same CPU time limit. Moreover, for the large-scale problems such as ftv120, ftv130, ftv140, ftv150 and ftv170 the GA with DEC found optimal solution no more than once out of 1000 runs. We also estimate that the average frequency of success of the GAs with optimal recombination reported in [7] is twice as small compared to such frequency for GAODEC , even though the GAs in [7] were given more CPU time. 4 Conclusions We proposed a steady-state GA with adjacency-based representation using an optimal recombination and a local search to solve the ATSP. An experimental evaluation on instances from TSPLIB library shows that the proposed GA yields results competitive to those of some other state-of-the-art genetic algorithms. The experiments also indicate that the proposed GA dominates a similar GA based on the population management strategy, known as elitist recombination. The restarts performed in the proposed GA allow to avoid localization of search and restore the population diversity, leading to better results when the steady-state population management is used. The experiments also show an advantage of the deterministic optimized crossover over its randomized prototype. References [1] Brown, B.W., Hollander, M.: Statistics: A Biomedical Introduction. John Wiley & Sons, Inc (1977) [2] Buriol, L.S., Franca, P.M., Moscato, P.: A new memetic algorithm for the asymmetric traveling salesman problem. Journal of Heuristics 10, 483–506 (2004) [3] Cook, W., Seymour, P.: Tour merging via branch-decomposition. INFORMS Journal on Computing 15(2), 233–248 (2003) [4] Dongarra, J.J.: Performance of various computers using standard linear equations software. Tech. Rep. CS-89-85, University of Manchester (2014), 110 p. [5] Eppstein, D.: The traveling salesman problem for cubic graphs. Journal of Graph Algorithms and Applications 11(1) (2007) [6] Eremeev, A.V., Kovalenko, J.V.: Optimal recombination in genetic algorithms for combinatorial optimization problems: Part II. Yugoslav Journal of Operations Research 24(2), 165–186 (2014) [7] Eremeev, A.V., Kovalenko, J.V.: Experimental evaluation of two approaches to optimal recombination for permutation problems. In: 16th European Conference, EvoCOP 2016, LNCS. pp. 138–153. Porto, Portugal (2016) 7 [8] Garey, M.R., Johnson, D.S.: Computers and Intractability. A Guide to the Theory of NP-completeness. W. H. Freeman and Company, San Francisco (1979) [9] Goldberg, D., Thierens, D.: Elitist recombination: An integrated selection recombination GA. In: First IEEE World Congress on Computational Intelligence,. vol. 1, pp. 508–512. IEEE Service Center, Piscataway, New Jersey (1994) [10] Johnson, D.S., McGeorch, L.A.: The traveling salesman problem: a case study. In: Aarts, E., Lenstra, J.K. (eds.) Local Search in Combinatorial Optimization, pp. 215–336. John Wiley & Sons Ltd. (1997) [11] Kanellakis, P.C., Papadimitriou, C.H.: Local search for the asymmetric traveling salesman problem. Oper. Res. 28, 1086–1099 (1980) [12] Karp, R.M.: A patching algorithm for the nonsymmetric traveling-salesman problem. SIAM Journal on Computing 8, 561–573 (1979) [13] Radcliffe, N.J.: The algebra of genetic algorithms. Annals of Mathematics and Artificial Intelligence 10(4), 339–384 (1994) [14] Reeves, C.R.: Genetic algorithms for the operations researcher. INFORMS Journal on Computing 9(3), 231–250 (1997) [15] Reinelt, G.: TSPLIB – a traveling salesman problem library. ORSA Journal on Computing 3(4), 376–384 (1991) [16] Tinós, R., Whitley, D., Ochoa, G.: Generalized asymmetric partition crossover (GAPX) for the asymmetric TSP. In: The 2014 Annual Conference on Genetic and Evolutionary Computation. pp. 501–508. ACM New York, NY (2014) [17] Whitley, D., Starkweather, T., Shaner, D.: The traveling salesman and sequence scheduling: Quality solutions using genetic edge recombination. In: Davis, L. (ed.) Handbook of Genetic Algorithms, pp. 350–372. Van Nostrand Reinhold, NY (1991) [18] Yagiura, M., Ibaraki, T.: The use of dynamic programming in genetic algorithms for permutation problems. Eur. Jour. Oper. Res. 92, 387–401 (1996) [19] Zhang, W.: Depth-first branch-and-bound versus local search: A case study. In: 17th National Conf. on Artificial Intelligence. pp. 930–вҐҮ935. Austin, TX (2000) 8
9cs.NE
Chained Successive Cancellation Decoding of the Extended Golay code Peter Trifonov arXiv:1801.06315v1 [cs.IT] 19 Jan 2018 Saint Petersburg Polytechnic University, Russia Email: [email protected] Abstract—The extended Golay code is shown to be representable as a chained polar subcode. This enables its decoding with the successive cancellation decoding algorithm and its stack generalization. The decoder can be further simplified by employing fast Hadamard transform. The complexity of the obtained algorithm is comparable with that of the Vardy algorithm. I. I NTRODUCTION The (24, 12, 8) extended Golay code is a quasi-perfect self-dual linear binary block code. It has found numerous applications in communication, storage and imaging systems [1], [2], [3], [4]. Rich algebraic structure of the Golay code admits very efficient decoding, see [5] and references therein. However, these algorithms are specific to the extended Golay code, and, in general, may not be used for decoding of other types of error correcting codes. Polar codes is a novel class of capacity-achieving error correcting codes, which have very efficient construction, encoding and decoding algorithms [6]. Furthermore, the list and sequential successive cancellation decoding algorithms [7], [8] were shown to be applicable for decoding of short extended BCH codes [9]. Polar codes were adopted for use in 5G wireless, so many future communication systems are likely to have an implementation of a decoder for polar codes. It is tempting to explore application of the decoding techniques developed for polar codes for other types of error correcting codes. This would enable communication systems to support different channel coding schemes with the same hardware. In this paper we show that the extended Golay code can be represented in the framework of chained polar subcodes [10], and suggest a low-complexity decoding algorithm based on this representation. The proposed algorithm can be considered as a generalization of sequential (stack) and block sequential decoding algorithms [8], [11], [12]. The paper is organized as follows. In section II we review polar codes, their generalizations and decoding algorithms. Section III introduces a representation of the extended Golay code as a chained polar subcode. This representation is used in Section IV to derive some new decoding algorithms. Simulation results are presented in Section V. II. BACKGROUND A. Dynamic frozen symbols (n = 2m , k) polar a set of vectors c0n−1 = u0n−1 Am ,  codeis⊗m 1 0 where Am = Bm is the polarizing matrix, ui = 1 1 0, i ∈ F , Bm is the bit reversal permutation matrix, and F ⊂ 0, . . . , 2m − 1 is the set of 2m − k frozen channel indices [6]. It is possible to show that Am together with a binary input memoryless channel W(y|c) give rise to synthetic bit subchannels n−1 1 X Y (i) n−1 W(yj |(u0n−1 Am )j ), Wm (y0 , ui−1 |u ) = i 0 2n−1 n−1 j=0 ui+1 and the capacities of these subchannels converge with m to 0 or 1 bits per channel use. The standard way to construct polar codes is to let F be the set of low-capacity subchannels. However, the minimum distance of classical polar codes is quite low. It was suggested in [9] to select u0n−1 in such way, so that the obtained vectors c0n−1 are codewords of some linear block code with check matrix H. This corresponds to dynamic freezing constraints X Vsi ,j uj , i ∈ F , (1) ui = j<i QHATm where V = is a (n−k)×n constraint matrix, and Q is an invertible matrix, such that last non-zero elements in rows of V are located in distinct columns, F is the set of indices of such columns, and si is the index of the row having the last non-zero entry in column i. Alternatively, the codewords of a polar subcode can be obtained as c0n−1 = xW Am , where W is a k × n precoding matrix, such that W V T = 0, and x is an information vector. Decoding of such codes can be implemented with a straightforward generalization of the successive cancellation decoding algorithm, which makes decisions ( (i) arg maxui ∈F2 Wm (y0n−1 , ûi−1 /F 0 |ui ), i ∈ (2) ûi = P i ∈ F. j<i Vsi ,j ûj , Extended primitive narrow-sense BCH codes were shown to have particularly well-structured sets of frozen symbol indices, and admit efficient list/sequential SC decoding [9]. Representation of linear codes via the dynamic freezing constraints can be considered as a result of application of the generalized Plotkin decomposition introduced in [9]. Theorem 1 ([9]). Any linear (2n, k, d) code C has a generator matrix given by    G1 0  ˜ 0 I  I G = k1 G2 G2  , (3) 0 Ik2 0 G3 G3 where Il is a l × l identity matrix, Gi , 1 ≤ i ≤ 3, are ki × n matrices, k = k1 + k2 , and I˜ is obtained by stacking a (k1 − k3 ) × k3 zero matrix and Ik3 , where k3 ≤ k1 . In this paper we essentially present a generalization of this decomposition. B. List successive cancellation decoding In general, classical polar codes, polar subcodes and other codes represented by (1) require list successive cancellation decoding in order to obtain near-ML performance. Let i n−1 W (i) )= m (u0 |y0 (n−1) n−1 n−1 Wm (u0 |y0 ) max n−i−1 un−1 i+1 ∈F2 be the probability of the most likely continuation of path ui0 in the code tree, without taking into account freezing constraints on symbols uj , j > i. It can be seen that for λ > 0 (2i) n−1 W λ (u2i ) 0 |y0 (i) = max W λ−1 (u2i+1 0,e u2i+1 ∈F2 n ⊕ 2 −1 u2i+1 ) 0,o |y0 (i) n−1 · W λ−1 (u2i+1 0,o |y n ), (4) 2 (2i+1) 2i+1 n−1 Wλ (u0 |y0 ) n (i) 2i+1 2 −1 ) = W λ−1 (u2i+1 0,e ⊕ u0,o |y0 (i) 2i+1 n−1 · W λ−1 (u0,o |y n ), 2 (5) (0) and W 0 (c|yj ) = W(c|yj ). Let us define modified loglikelihood ratios (i) (i) n−1 Sλ (ui−1 ) = log 0 , y0 n−1 W λ (ui−1 ) 0 .0|y0 (i) n−1 W λ (ui−1 ) 0 .1|y0 . It is possible to show that [8], [13] (2i) Sλ (u02i−1 , y0N −1 ) =a ⊞ b = sgn(a) sgn(b) min(|a|, |b|) (2i+1) Sλ N −1 (u2i ) =(−1)u2i a + b, 0 , y0 (i) 2i−1 Sλ−1 (u0,e N −1 2i−1 u0,o , y02 ), where a = b = ⊕ (i) 2i−1 N −1 Sλ−1 (u0,o , y N ), N = 2λ . Then the logarithm of 2 the probability of the most likely continuation of a path ui0 can be obtained as i n−1 R(ui0 |y0n−1 ) = log W (i) ) m (u0 |y0   n−1 (i) i−1 n−1 =R(ui−1 ) + τ Sm (u0 , y0 ), ui , 0 |y0 (6) where τ (S, u) = ( 0, sgn(S) = (−1)u −|S|, otherwise. One can assume that R(ǫ|y0n−1 ) = 0, where ǫ is an empty sequence. Observe that R(ui0 |y0n−1 ) is equal up to the sign to the approximate path metric introduced in [14]. The above derivation shows that this value is not just an approximation to the path metric used by the Tal-Vardy list decoder, but reflects the likelihood of the most probable continuation of a path in the code tree, without taking into account not-yet-processed freezing constraints. It can be also seen −E(u0n−1 Am , y0n−1 ), where E(c0n−1 , y0n−1 ) = − that n−1 X R(u0n−1 |y0n−1 ) = (0) τ (S0 (yi ), ci ) j=0 is the ellipsoidal weight or correlation discrepancy of vector c0n−1 with respect to the noisy vector y0n−1 . C. Chained polar subcodes Classical polar codes are limited to length 2m . In order to obtain codes of arbitrary length, it was suggested in [10] to combine polarizing matrices of different size. That is, the codewords of chained polar subcodes are given by c0n−1 = Ps−1 xW diag(Am0 , . . . , Ams−1 ), where n = i=0 2mi , and A is {z } | A the mixed polarizing transformation matrix. A generalization of the successive cancellation decoding algorithm and its derivatives to the case of chained polar subcodes is provided in [10]. Alternatively, the code can be described as a set of vectors c0n−1 = u0n−1 A, where u0n−1 V T = 0, and V is the constraint matrix, such that W V T = 0. In general, list or sequential decoding algorithm should be used for decoding of chained polar subcodes. These algorithms essentially operate by arranging the input symbols of polarizing transformations Ami in some order, called decoding schedule, and interleaving steps of conventional list/sequential successive cancellation for each Ami . The performance of such algorithm does depend on the ordering of symbols ui . It was shown in [10] that the best performance is achieved by the greedy schedule, which aims on processing of frozen symbols as early as possible. III. T HE EXTENDED G OLAY CODE (24, 12, 8) extended Golay code is a quasi-perfect self-dual binary linear block code [15]. One of many possible ways to describe it is given by the Turyn construction [16]. The codewords are obtained as c = (u + v, u + w, u + v + w), v, w ∈ C ′ , u ∈ C ′′ , where C ′ is the (8, 4, 4) extended Hamming code, and C ′′ is a code equivalent to C, such that C ′ ∩ C ′′ = {(0, 0, 0, 0, 0, 0, 0, 0), (1, 1, 1, 1, 1, 1, 1, 1)}. Note that both C ′ and C ′′ are instances of extended BCH codes with generator polynomials g ′ (x) = (x − α)(x − α2 )(x − α4 ) = x3 + x + 1 and g ′′ (x) = (x − α3 )(x − α6 )(x − α5 ) = x3 + x2 + 1, where α is a primitive element of F23 . Their generator and check matrices are given by 0 α0 1 1 1 0 G′ = H ′ =  1 0 1 0 α1 1 1 0 0 α2 0 1 1 0 α3 1 0 1 1 α4 0 1 0 1 α5 0 0 1 0 α6 0 0  0 1  1  1   1   1   0   0 G=H =  0   0   1   1   1 1           V = QHAT =           1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 4 5 6 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 and 0 1 2 3 0 α α α α α α α 1 1 0 1 1 0 0 0  1 0 1 0 1 1 0 0 G′′ = H ′′ = .   1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 The columns of the matrices are indexed with elements of F23 . Arranging these elements in the standard bit order (0, 1, α, α+ 1 = α3 , α2 , α2 + 1 = α6 , α2 + α = α4 , α2 + α + 1 = α5 ), and combining the matrices according to the Turyn construction, one obtains the generator and check matrix for the extended Golay code shown at the top of this page. In order to employ the successive cancellation algorithm and its derivatives for decoding of the extended Golay code, we define a mixed polarizing transformation A = diag(A4 , A3 ). Then, for a suitable matrix Q, one obtains the constraint matrix V shown at the top of this page. IV. D ECODING A. Chained decoding schedule Decoding of the extended Golay code in the above proposed chained representation can be implemented using two instances of the Tal-Vardy list decoder, which are configured for polarizing transformations A4 and A3 , respectively. Each instance is responsible for memory management, path cloning and computing path probabilities or LLRs. However, these instances need to be synchronized. The synchronization is 0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1                     0 0 0 0 0 0 0 0 0 0 0 0                     achieved by computing the global path score (6), where (i) the log-likelihood ratios Sm are computed by either of the corresponding Tal-Vardy decoder instances. According to the greedy procedure given the [10], one obtains the following sequence of symbol ui indices to be processed by the decoder: 0, 1, 2, 16, 3, 17, 4, 5, 18, 6, 7, 8, 9, 19, 20, 10, 21, 11, 12, 22, 13, 14, 15, 23. For example, the initial four steps of decoding according to this schedule correspond to frozen symbols u0 = u1 = u2 = u16 = 0. Hence, one obtains a single all-zero path with the score (0) (1) A = R(0000|y023) =τ (S4 (y015 ), 0) + τ (S4 (0, y015 ), 0) (2) (0) 23 + τ (S4 (00, y015 ), 0) + τ (S3 (y16 ), 0). Then one needs to consider two possible values of u3 , i.e. clone the path. This immediately enables one to process freezing constraint u17 = u3 , which follows from the equation T u23 = 0. Hence, one obtains 0 V (3) R(0000u3u17 |y023 ) =A + τ (S4 (000, y015 ), u3 ) (1) 23 + τ (S3 (y16 ), u17 ). The decoder operates in the same way until paths of length 24 are obtained. The result of decoding is given by the path with the highest score. The decoding complexity can be substantially reduced by employing the sequential algorithm described in [8]. B. Block decoding (24,12,8) Golay code C(c(i) , z0N −1 ) = N X (i) (−1)cj zi , c(i) ∈ C, j=0 where zi are the log-likelihood ratios, can be obtained via order-N fast Hadamard transform (FHT) with complexity N log2 N summations. Given a correlation metric, the corresponding ellipsoidal weight can be computed as   N −1 X 1 |zj | − C(c(i) , z0N −1 ) . E(c(i) , z0N −1 ) =  2 j=0 This implies that 23 2R(u70 , u19 16 |y0 ) = − 11 X 10−1 10−2 10−3 10−4 10−5 0 1 2 3 11 |zj |+C(u70 A3 , z07 )+C(u19 16 A2 , z8 ), (7) (0) (0) (0) where zi = S1 (y2i , y2i+1 ) = S0 (y2i ) ⊞ S0 (y2i+1 ), 0 ≤ i < 12, and u0 = u1 = u2 = u4 = u16 = 0, u3 = u17 , u5 = u18 . Observe that the first summand does not depend on u23 0 , and can be neglected. With this simplification, one 23 6 obtains R(u60 , u7 = 1, u18 16 , u19 = 1|y0 ) = −R(u0 , u7 = 18 23 0, u16 , u19 = 0|y0 ). Hence, the scores of 32 paths (u70 , u19 16 ) can be computed via order-8 and order-4 FHTs and 16 additional summations. We propose to sort these pathes in the descending order1 , and apply the below described second processing step until a stopping condition is satisfied. 7 19 23 For any path (u70 , u19 16 ) with score r = 2R(u0 , u16 |y0 ) one can compute u9 = u20 = u3 + u5 + u6 + u19 . Now one can (1) 16+2i+1 ), 0 ≤ i < 3. These can compute ze8+i = S1 (u19 16 A3 , y16+2i be considered as the LLRs for a codeword of the coset, given by the value of u20 , of (4, 3, 2) code . Hence, one can compute the corresponding correlation metrics using the order-4 FHT and obtain scores 23 ρ = 2R(u70 , u23 16 |y0 ) = r − 11 X i=8 |e zi | + C(u23 e811 ). 20 A3 , z that only 16 values need to be actually sorted. 4 Eb/N0, dB 5 6 7 8 Fig. 1. Performance of the proposed decoding algorithms Note that only vectors with C(u23 e811 ) ≥ 0 need to be 20 A3 , z considered, since u23 is not frozen. Let the vectors u23 20 be ordered in the descending order of C(u23 e811 ). Now one 20 A3 , z can compute u10 = u3 + u5 + u21 and u5 = u22 . Let us (1) 2i+1 further compute zei = S1 (u70 A4 , y2i ), 0 ≤ i < 7. The can be considered as the LLRs for a coset, given by u9 .u10 , u12 , of the (8, 4, 4) first order Reed-Muller code. Hence, one can use order-8 FHT to compute the correlation metrics, and finally select the codeword with the highest value of 23 2R(u23 0 |y0 ) = r − 11 X i=0 j=0 1 Observe sequential, L=1 sequential, L=2 sequential, L=4 sequential, L=8 sequential, L=16 Block ML FER The decoding complexity can be reduced by joint processing of some blocks of the input symbols of the polarizing transformation [12]. In order to exploit this approach, we observe that puncturing last 8 symbols transforms the extended Golay code into (16, 11, 4) extended Hamming code. It can be represented as a Plotkin concatenation of the (8, 4, 4) first-order ReedMuller code, and a single-parity check code. Observe also, that puncturing all codeword symbols for the extended Golay code except those with indices 16, . . . , 23 results in (8, 7, 2) single parity check code, which can be obtained via Plotkin concatenation of the (4, 3, 2) first-order Reed-Muller code and (4, 4, 1) trivial code. Rows 6,7 of matrix V provide linear relations between the codewords of (8, 4, 4) and (4, 3, 2) codes. The correlation metrics for the codewords of a first-order Reed-Muller code C of length N − 1 100 e07 ). |e zi | + C(u23 e811 ) + C(u15 8 A4 , z 20 A3 , z Observe that coefficients 2 and 1/2 in the above equations can be omitted. In order to avoid redundant calculations, one should keep 23 the highest value Rmax of R(u23 0 |y0 ) obtained so far, and 23 abort processing of vectors u20 as soon as one obtains the value of ρ < Rmax , and abort processing of (u70 , u19 16 ) as soon as one obtains r < Rmax . The best-case complexity of the above described algorithm corresponds to the case when the correct codeword 11 has the highest values of C(u70 A3 , z07 ) + C(u19 16 A2 , z8 ) and 23 11 C(u20 A3 , ze8 ), and exactly two FHTs of order 4 and 3 are computed. In this case the algorithm requires 111 summations and 45 comparisons. At high signal-to-noise ratios one can further reduce the best-case decoding complexity by constructing the harddecision vector for ze011 corresponding to a given path (u70 , u19 16 ), and computing the values of u22 . If the obtained vector 20 satisfies the constraints given by matrix V , one can skip computing FHTs in the second step of the algorithm. V. N UMERIC RESULTS Figure 1 illustrates the performance of the extended Golay code for the case of AWGN channel with BPSK modulation. We consider sequential decoding [8] using the schedule presented in Section IV-A, and the block algorithm introduced corresponding hardware, and avoid implementing dedicated circuitry for decoder the extended Golay code, reducing thus the overall implementation complexity. It remains an open problem to identify other types of error-correcting codes, which can be decoded in the same way. A similar representation of the extended Golay code as a punctured twisted polar code was independently derived in [18]. However, the authors considered only the straightforward implementation of the successive cancellation list decoder. (24,12,8) Golay code 350 L=1, Summations L=2, Summations L=4, Summations L=8, Summations L=16, Summations Block, Summations Block improved, Summations L=1, Comparisons L=2, Comparisons L=4, Comparisons L=8, Comparisons L=16, Comparisons Block, Comparisons Block improved, Comparisons Average number of operations 300 250 200 150 R EFERENCES 100 50 0 0 1 2 3 4 Eb/N0, dB 5 6 7 8 Fig. 2. Complexity of the proposed decoding algorithms in Section IV-B. It can be seen that sequential decoding with L = 16 provides maximum likelihood decoding. This is the expected result, since the proposed decoding schedule requires one to process four unfrozen symbols (u3 , u5 , u6 , u7 ), before one can process all freezing constraints which involve these symbols. Hence, one needs list size at least 16 in order to avoid killing the correct path at an early phase of decoding process. It can be seen that the proposed block algorithm also provides maximum likelihood decoding. Figure 2 illustrates the average number of arithmetic operations for the proposed decoding algorithms. It can be seen that their complexity quickly decreases with SNR. At high SNR it approaches the complexity of the most efficient decoding algorithm for the Golay code [5], which requires 121 operations. The improved block decoding algorithm, which employs hard decisions to avoid computing FHTs at the second step, provides approximately 20% complexity reduction. The maximal complexity of the block algorithm observed in our simulations was 1590 operations, which is close to the complexity of the FHT-based decoding algorithm suggested in [17]. VI. C ONCLUSIONS It was shown in this paper that the extended Golay code can be represented like a chained polar subcode. This enables one to decode it using the successive cancellation decoding algorithm and its list/sequential generalizations. With appropriate parameter selection, these algorithms can provide maximum likelihood decoding. The decoding complexity can be reduced by exploiting the fast Hadamard transform. Although the complexity of these algorithms is slightly higher than the complexity of the Vardy algorithm, which was designed specifically for the extended Golay code, the proposed approach enables one to decode this code using the same techniques as polar codes. Since polar codes were recently adopted for use in 5G, many communication systems are likely to have an implementation of a decoder for polar codes. The proposed approach enables one to reuse the [1] M. J. E. Golay, “Notes on digital coding,” Proceedings of IRE, vol. 37, p. 657, 1949. [2] M. Garcia-Rodriguez, Y. Yanez, M. Garcia-Hernandez, J. Salazar, A. Turo, and J. Chavez, “Application of golay codes to improve the dynamic range in ultrasonic Lamb waves air-coupled systems,” NDT & E International, vol. 43, no. 8, pp. 677 – 686, 2010. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S0963869510000903 [3] A. Hussain, M. M. Rais, and M. B. Malik, “Golay codes in ranging applications,” in Proceedings of the Eighth IASTED International Conference on Wireless and Optical Communications, ser. WOC ’08. Anaheim, CA, USA: ACTA Press, 2008, pp. 184–188. [Online]. Available: http://dl.acm.org/citation.cfm?id=1722902.1722938 [4] J. D. Key, “Some error-correcting codes and their applications,” in Applied Mathematical Modeling: A Multidisciplinary Approach. Chapman & Hall/CRC Press, 1999. [5] A. Vardy, “Even more efficient bounded-distance decoding of the hexacode, the Golay code, and the Leech lattice,” IEEE Transactions on Information Theory, vol. 41, no. 5, September 1995. [6] E. Arikan, “Channel polarization: A method for constructing capacityachieving codes for symmetric binary-input memoryless channels,” IEEE Transactions on Information Theory, vol. 55, no. 7, pp. 3051–3073, July 2009. [7] I. Tal and A. Vardy, “List decoding of polar codes,” IEEE Transactions On Information Theory, vol. 61, no. 5, pp. 2213–2226, May 2015. [8] V. Miloslavskaya and P. Trifonov, “Sequential decoding of polar codes,” IEEE Communications Letters, vol. 18, no. 7, pp. 1127–1130, 2014. [9] P. Trifonov and V. Miloslavskaya, “Polar subcodes,” IEEE Journal on Selected Areas in Communications, vol. 34, no. 2, pp. 254–266, February 2016. [10] P. Trifonov, “Chained polar subcodes,” in Proceedings of 11th International ITG Conference on Systems, Communications and Coding, 2017. [11] K. Niu and K. Chen, “Stack decoding of polar codes,” Electronics Letters, vol. 48, no. 12, pp. 695–697, June 2012. [12] G. Trofimiuk and P. Trifonov, “Block sequential decoding of polar codes,” in Proceedings of International Symposium on Wireless Communication Systems, 2015, pp. 326–330. [13] P. Trifonov, “Star polar subcodes,” in Proceedings of IEEE Wireless Communications and Networking Conference, 2017. [14] A. Balatsoukas-Stimming, M. B. Parizi, and A. Burg, “LLR-based successive cancellation list decoding of polar codes,” IEEE Transactions On Signal Processing, vol. 63, no. 19, pp. 5165–5179, October 2015. [15] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes. North-Holland publishing company, 1977. [16] E. F. Assmus, H. F. Mattson, and R. J. Turyn, “Research to develop the algebraic theory of codes,” Sylvania electronic systems, applied research laboratory, Tech. Rep., 1967. [17] Y. Beery and J. Snyders, “Optimal soft decision block decoders based on fast Hadamard transform,” IEEE Transactions on Information Theory, vol. 32, no. 3, May 1986. [18] V. Bioglio and I. Land, “Polar-code construction of Golay codes,” IEEE Communications Letters, 2018, accepted.
7cs.IT
Elements of Effective Deep Reinforcement Learning towards Tactical Driving Decision Making arXiv:1802.00332v1 [cs.AI] 1 Feb 2018 Jingchu Liu, Pengfei Hou, Lisen Mu, Yinan Yu, and Chang Huang Horizon Robotics, inc. {jingchu.liu, pengfei01.hou, lisen.mu, yinan.yu, chang.huang}@hobot.cc Abstract Tactical driving decision making is crucial for autonomous driving systems and has attracted considerable interest in recent years. In this paper, we propose several practical components that can speed up deep reinforcement learning algorithms towards tactical decision making tasks: 1) nonuniform action skipping as a more stable alternative to action-repetition frame skipping, 2) a counterbased penalty for lanes on which ego vehicle has less right-of-road, and 3) heuristic inference-time action masking for apparently undesirable actions. We evaluate the proposed components in a realistic driving simulator and compare them with several baselines. Results show that the proposed scheme provides superior performance in terms of safety, efficiency, and comfort. 1 Introduction Autonomous driving has attracted considerable interest in the past two decades and significant progress has been achieved. According to Douges [Donges, 1999], autonomous driving tasks can be roughly classified into three categories: navigation, guidance, and stabilization. Strategic navigation tasks are responsible for generating road-level routes. Tacticallevel guidance tasks are responsible for guiding ego vehicle along these routes in complex environments by generating tactical maneuver decisions. And operational-level stabilization tasks are responsible for translating tactical decisions into reference trajectories and then low-level control signals. Among these three classes of tasks, tactical-level decision making is especially important due to its central role and has been an active field of research. Early successes of decision making systems typically rely on human-designed rules to control the decision process, using methods such as heuristic rules, decision trees, finite state machines, or fuzzy-logic [Montemerlo et al., 2008; Urmson et al., 2008; Miller et al., 2008]. These methods are often tailored for specific environments and do not generalize robustly. More recently, the problem of tactical decision making has been cast into the Partially Observable Markov Decision Process (POMDP) framework and various approximate methods have been proposed to solve the theoretically intractable models for tactical decision making [Ulbrich and Maurer, 2013; Brechtel et al., 2014; Galceran et al., 2015]. One common problem faced with POMDP-based work is the strong dependency to a relatively simple environment model, usually with delicately hand-crafted (discrete) observation spaces, transition dynamics, and observation mechanisms. These strong assumptions limit the generality of these methods to more complex scenarios. In recent years, the success of deep learning has revived the interest in end-to-end driving agent which decides low-level control directly from image inputs, using supervised learning [Bojarski et al., 2017] or reinforcement learning (RL) [Sallab et al., 2017; Plessen, 2017]. But the black-box driving policies learned by these methods are susceptible to influence under drifted inputs. Although efforts have been made to identify a more robust and compact subset of prediction targets than control outputs (e.g. in [Chen et al., 2015]), most practical autonomous driving systems to date still only use deep learning as a restricted part of the whole system. Deep RL is a natural way to incorporate deep learning into traditional POMDP or RL-based decision making methods. The use of function approximators makes it possible to directly use high-dimensional raw observations. This alleviates the strong dependency to hand-crafted simple models in traditional POMDP and RL-based work. Along this line of research, [Isele et al., 2017] and [Mukadam et al., 2017] apply the deep Q-network (DQN) [Mnih et al., 2013] to learn tactical decision policies for intersection crossing and lane changing on freeway, respectively. Hierarchical RL is combined with Monte-Carlo tree search (MCTS) in [Paxton et al., 2017] to simultaneously learn a highlevel option policy for decision making and a low-level policy for option execution. [Shalev-Shwartz et al., 2016; Shalev-Shwartz et al., 2017] combine a high-level RL policy with a non-learnable low-level policy to balance between efficiency and safety. However, many commonly-used techniques for deep RL are originally proposed for low-level control tasks and can be less efficient and/or robust for high-level tactical decision making from our observation. Firstly for temporal abstraction, frame skipping with action repetition will cause unstable low-level behavior due to the discontinuity in high-level action semantics. Secondly for the multi-dimensional reward- ing systems, we find that the commonly used sparse global goal indicators and dense local goal metrics are in general redundant and harmful, and a constant value lane penalty is hard to induce favorable lane switching behavior in multi-lane scenarios. Thirdly, decision agents relying mere on a learned RL policy may accidentally issue disastrous action under the influence of observation noise. In this paper, we aim to tackle the above difficulties for deep RL. Our main contributions are a set of practical yet effective elements for deep RL agents towards tactical driving decision making tasks. We propose non-uniform action skipping as a more stable alternative to action repetition. A counter-based lane penalty is also proposed to encourage desired behavior for multi-lane scenarios. During inference, the learned RL agent can be further enhanced with heuristic rules that filter out obviously undesirable actions. These elements are meant to make as less modification to existing methods as possible for the sake of simplicity, and target the peculiarity of high-level tactical decision making for effectiveness. The proposed elements are equipped in a hierarchical autonomous driving system and the effectiveness is demonstrated in realistic driving scenarios presenting two-way traffic and signaled intersections. 2 Method We consider a hierarchical autonomous driving system that orchestrates learning-based and non-learning modules: the tactical decision making module is implemented as a deep RL agent for efficiency while the routing, planning, and control modules are realized with non-learning methods for safety and comfort. The routing module calculates local lane suggestions towards the global goal according to a road map. The decision module takes into consideration both the routing suggestions and other information such as the status of ego vehicle and road structure to make high-level maneuver directions. The planning module then translates those directions into the trajectories of vehicle poses. The control module finally implements the planning trajectories into low-level control signals. Note the planning module has certain built-in safety functions to avoid hazards such as collisions. From a agent-centric perspective, the tactical decision agent makes sequential decisions in the dynamic environment composed of all non-learning modules and the rest of the world. In time step t, information about ego vehicle and the surrounding environment is compiled into an observation ot and presented to the agent. The agent then selects a tactical decision action at = π(ot ) according to the decision policy π(·). Downstream modules will receive this decision and control the movement of ego vehicle accordingly. A rewarding module will then assess the movement in current time step to provide a scalar reward rt . And the system will evolve forward in time into the next time step t + 1. The goal is to learn a policy that maximizes the expected total discounted reward ( T ) X τ −t γ Rτ . (1) E {Gt } = E τ =t Note the world state is only partially observable to the decision agent due to imperfect sensing and unpredictable be- (a) Before crossing lane (b) After crossing lane. Figure 1: Illustration for the discontinuous action semantics of lane switching tasks: the meaning of “switching to right lane” changes after crossing the lane marking. havior of other agents. Therefore, we extend the observation vector ot into history by means of frame stacking. Other methods, e.g. recursive neural networks, can also be used to fill more information into the observation vector. 2.1 Action Skipping Action-repeated frame skipping [Mnih et al., 2013] is a commonly-used technique to speed up reinforcement learning algorithms. The benefits are multi-fold. For exploration, non-trivial high-level maneuvers can be more easily explored with random perturbation. Otherwise the difficulty of forming a series of low-level movements that correspond to a high-level maneuver can be exponential in the length of that series. Also, the effective horizon of the semi-MDP resulting from action repetition is proportionally shorter than the original MDP. And bootstrapped value estimation methods, such as temporal difference learning, will receive proportional speedup. Moreover, the reward signal can become more resilient to noises and delays thanks to the extended effective period of each action. However, action repetition can be less stable for high-level decision making tasks due to the discontinuity in action semantics. Consider driving on a multi-lane road shown in Figure 1: when ego vehicle is just about to cross the marking between the current lane (L0 ) and the lane immediately to the right (L1 ), the action switching to the right lane means switching from L0 to L1 . But after ego car has crossed the lane marking, the semantics of that same action is radically changed to switching from L1 to L2 , in which L2 is the lane further to the right of L1 . If the frame skipping period contains such moments of non-continuous action semantics, the resulting high-level direction is doomed to result in unfavorable lower-level behaviors, e.g. frequent overshot and correction for the above scenario. We propose to skip instead of repeat actions. Concretely, each agent action is now a meta action consisting of an actual decision followed by several null actions (No-Op). We denote this operation as action skipping. During skipping, the agent can continue to collect observations and rewards. The overall reward for the meta action is then calculated as the average of all rewards collected during the skipping period. Note to implement action skipping in the decision module, the lower-level modules need to continue operation under the null action. This is not a problem as long as the trajectory planning module plans over a horizon longer than the skipping period, which is relatively easy to implement. One drawback of action skipping is the decrease in decision frequency which will delay or prevent the agent’s reaction to critical events. To improve the situation, the actions can take on different skipping factors during inference. For instance in lane changing tasks, the skipping factor for lane keeping can be kept short to allow for swift maneuvers while the skipping factor for lane switching can be larger so that the agent can complete lane changing actions. When performing non-uniform action skipping, the agent may observe time phases that are skipped during training and cause domain drift in observations. As a solution, we uniformly randomly extend the skipping factor of the first agent step by a factor between zero and one so that the agent can observe all possible time phases during training. 2.2 Reward Function Tactical decision making needs to balance among efficiency, safety, and comfort. Therefore the scalar reward used for tactical decision making is usually composed of multiple components, most often through linear combination. Roughly speaking, these reward signals can be classified into sparse global goal indicators, sparse constraint violation alerts, and dense heuristic components. The reward components we use is shown in Table 1 and our choices are explained below. Global Goal Indicators Global goal indicators are very sparse signals that only take on non-zero values when a long-term goal if achieved or missed. For tactical decision making, the true long-term goal is reaching the destination given by the navigation module as fast as possible. Therefore the most common form of global goal indicators is a signal given at the end of each episode, positive if ego car reaches the destination and negative otherwise. In this way, the discounted total reward will be larger for episodes in which ego car reach the destination earlier. We argue that global goal indicators are not only unnecessary but also burdens to the tactical decision making agent. The preferences described by global goal indicators (i.e. what is wanted) can be implicitly expressed with some denser reciprocal constraint violation alerts (i.e. what is unwanted). This is possible because all behaviors that will stop ego vehicle from reaching the destination can be defined as violating constraints and harshly penalized. The use of dense per-step cost can also further devalue behaviors that will mislead ego vehicle into dead-end situations. As a result, the behavior that will help achieve a global goal will naturally result in low penalty. In comparison with sparse indicators, their denser counterparts will usually result in faster credit assignment during value estimation and is therefore more desirable. Moreover, global goal indicators emitted at the end of episodes will generally increase the absolute value of expected accumulated rewards in comparison with the indicator-free counterpart. In turn, the approximators used for value functions needs to have larger dynamic range, which mean more learning steps during training and larger variance during inference. For these reasons we do not use any global goal indicator components in our experiments. Constraint Violation Alerts Constraint violation alerts are sparse signals that penalize the agent for being in a risky situation or performing a risky action. The most common situation considered is collision with other road objects, e.g. other vehicles or pedestrian. Note reward signals that fall into this category need not to be sparse during constraint violations events. They are sparse in the sense that risky situation should be very rare under a properly cautious driving policy. We consider three types of risky situations in our experiments: 1) entering intersection during red light, 2) collision with other vehicles, and 3) treading onto biking and opposite lanes on which ego vehicle has less priority. The former two components will also termination the episode. Traffic light: The traffic light alert is triggered when ego vehicle enters an intersection when the corresponding connection road is covered by a red light. Note although we render longitudinal speed control to a rule-based planning module and it will automatically stop ego vehicle in most situations, there are still corner cases that may accidentally grant ego vehicle’s access into intersection during red lights. Therefore a traffic light alert should be in place to penalize these corner-case behaviors. Collision risk: The collision risk component is active when ego vehicle is about to crash into other vehicles. It is the sum of risk components contributed by each of the other vehicles in the region of interest. Each component is further defined as the product of an isotropic distance-based factor and a directional factor related to the heading direction of cars: X rc = rui · rdi , (2) i rui where is the isotropic factor by target i and rdi is the directional factor. The distance-based risk factor is Laplacian in the distance between the target car and ego car: rui (d) = e−d+d0 , (3) rui (d) where is the distance-based risk for target car i at distance d and d0 is a normalizing distance. The directional risk factor is the product of two narrow-band raised-cosine patterns, the center of which are aligned with the heading direction of ego car and the target car, respectively: rdi (θego , θtarget ) = rcos(θ − θego ) · rcos(θ − θtarget ), (4) where rcos(·) is the narrow-band raised cosine function, θego and θtarget are the heading angle of ego and target vehicle, and θ is the direction of the vector connecting ego car and target car. The overall effect of these two factors is high risk only when ego car and a target car is about to drive head-to-head Category Goal indicators Constraint violation Name N/A Collision risk Traffic light Dangerous lane Dense heuristics Speed Lane switching Step cost Description N/A Directional risk of crashing immediate into other cars. Entering road section invalidated by red light. Risk factor linear in the duration of staying on a undesired lane. The ego car velocity along lane center. Unit cost of switching to adjacent lanes. Unit per-step cost. Weight N/A −1.0 −1.0 Biking: −0.2 Opposite −0.4 0.1 −0.4 −0.1 Table 1: Description for reward components and their weights. into each other. Otherwise the risk is relatively low, e.g. when ego car and the target car is driving closely side-by-side. Another commonly-used measure for crashing risk is Time-to-Collision (TTC). TTC is roughly inversely proportional to the distance between ego and the target car. Therefore it is relatively aggressive in risk prediction and tend to exaggerate crashing risk. In contrast, the proposed risk formulation indicates risk only when it is about to happen and is thus more conservative. To foresee upcoming hazards, the agent can use common value estimation methods to predict future risk values. Dangerous lane: We use counter-based risk signals to reflect the ever-increasing empirical risk of staying on biking and opposite lanes. Specifically, the indicator for each lane maintains a counter (with a maximum value cap) that keeps track of the time steps that ego vehicle has spent on that lane. The risk value is then computed as a linear function of the corresponding counter value: R = (0.1x + 0.9) × (x > 1.0), (5) where R is the risk value and x is the counter value. The lane risk defined as such will be relatively small when ego vehicle just arrived on a dangerous lane and will gradually become intolerably large if ego vehicle remains there for a long time. In this way, temporally switching onto dangerous lanes, which is required for overtaking slower traffic on single lane roads, can be enabled. And staying on dangerous lane will be prohibited in the long run. Note since the reward component defined in this way becomes stateful, it is important to augment agent observations with history information so that it can roughly infer how long it has stayed on a particular lane. In contrast, it is much more difficult to design constantvalue risk signals that has the same enabling effect on overtake maneuvers: a small risk value may encourage ego vehicle to switch onto dangerous lanes when necessary, but it may easily fail on encouraging backward lane switching because the small difference in risk value can be easily overwhelmed by the variance in approximated value functions. The agent can only slowly learn the risk of dangerous lanes from sparse collision events. Meanwhile, a large risk value will in effect prohibit switching onto dangerous lanes, even when doing so is beneficial. Dense heuristic metrics Reward signals belonging to this category are usually used to hard-code designer’s heuristic preference for some states and actions. Unlike the former two reward categories, which are easier to design as they can reflect orthogonal aspects of desired and unwanted outcomes, dense heuristic metrics are harder to design because heuristic rules can easily conflict with each other or, even worse, fail to align with the global goals. For this reason, we aim to employ only a minimal set of dense heuristic components. We consider a component proportional to the speed of ego vehicle along the navigation route to encourage driving towards the goal as fast as possible. The speed limits are monitored by the planning module to avoid over-speeding. The second dense component we consider is a per-step penalty for lane changing actions to discourage unnecessary lateral maneuvers and improve passenger comfort. The final dense component applied is a trivial per-step cost to prefer short episodes. We do not employ any dense penalties related to local goals (e.g. local target lane or headway to other vehicles) as they can easily conflict with other heuristic metrics and the global goal. 2.3 Rule-based Action Masking In some scenarios, undesirable tactical actions can be straightforwardly identified. In such cases, we proposed to apply simple rules to filter out those actions during inference instead of only hoping the agent to learn to avoid those actions. The reason is that, on one hand, even if the agent can learn to avoid inferior actions, they can still be triggered due to the variance in observation and the learned model. On the other hand, those simple rules designed for straightforward situations are less prone to unexpected false positives and easier to debug if any happens. This is in contrast to conventional rule-based decision policies which is comprised of a complex set of rules intended to work under complex scenarios. 3 Implementation As shown in Figure 2a, the decision agent observes tilted RGB top-down views of ego vehicle’s immediate surrounding. In each time step, the latest two frames from the rendered 10Hz image stream are max-pooled pixel-wise into a single image frame to combat flickering. The frames from the latest three time steps are further stacked channel-wise to form a single observation. The reward components and linear combination weights defined in Section 2.2 are used to derive a scalar reward function. For comparison, some of the components may be removed or replaced for comparison. (a) (b) Figure 2: (a) Illustration of the tilted top-down view used for agent observation. (b) Simulation scenario with signaled intersection and two-way traffic. Red line indicates the navigation route. The agent is composed of a dueling deep Q-network (DQN) [Wang et al., 2015], with 3 convolutional layers followed by 2 dense layers and one linear output layer. The last dense layer is divided into an action-wise advantage channel and a baseline channel. The Q value for each action is the sum of its corresponding advantage plus the shared baseline. The three convolutional layers has 16, 16, and 64 kernels with size 8, 5, 3 and stride 4, 3, and 2, respectively. The first dense layer has 256 hidden units while the latter dense layer has 256 hidden units for each of the two channels. All convolutional layers apply 3 × 3 max pooling and all hidden layers apply ReLU activation. The discount factor used is 0.9 and double Q learning [van Hasselt et al., 2015] is applied to build up the temporal difference loss. We use a mini-batch of 8 samples and an ADAM optimizer with learning rate 1e−4 , β1 = 0.9, and β2 = 0.999 to train the learning network. The target network uses a synchronization rate of 1e−3 to track the learning network. The exploration factor is annealed linearly from 0.2 to 0.05 in 30K steps. The training process is handled asynchronously by a rate-controlled training thread: for each data point collected from the environment, this thread can perform 8 updates for the learning network. The training thread samples from a memory-mapped on-disk replay buffer of maximum size 300K. The data is divided into consecutive fragments of size 100 and about 30 fragments are cached in memory for random sampling at any time. Each fragment will be sampled for at most 200 times and a new fragment will be swapped in for replacement. 4 Experimental Results As shown in Fig.2b, we experiment with different agent configurations in simulated driving scenarios with two-way traffic and signaled intersections. The simulator is wrapped as an RL environment complying to the OpenAI Gym API [Brockman et al., 2016] and the frequency of agent-environment interaction is regularized to 2Hz in terms of simulation clock. Agents are trained and tested with episodic simulation. In each episode, a route is sampled randomly from the road map of 20 routes. Each route consists of two road segments connected by an intersection. A number of vehicles are scat- tered along this route with random starting points and cruising speed. Ego vehicle will then start from the beginning of the selected route. A global navigation module will constantly provide a reference lane (rendered with a red line in observed image) that leads to the route destination. An episode is terminated if ego vehicle encounters any of the following conditions: 1) reaching destination; 2) receiving a crashing risk value > 1.0; 3) stop moving for 40 seconds1 ; 4) entering intersection on unpermitted lanes. Each agent configuration is trained from scratch for 10 simulation runs. Each run terminates once the accumulated number of environment steps exceeds 250K. The trained agents are then evaluated without exploration against 100 pre-generated test episodes. The number of other vehicles present in each episode is 32 for both training and test. Test results are shown in Table 2 and organized into 4 sections. We select success rate, longitudinal speed, and lateral speed as the performance metrics to reflect safety, efficiency, and comfort. The agent needs to switch to the correct lane and avoid collisions to successfully finish each episode. Overtaking slower traffic is also required to achieve a high longitudinal speed. Moreover, the agent needs to avoid unnecessary lateral maneuvers in order to reduce lateral speed. The overall metric for each configuration is calculated as the median per-step metric of all 10 simulation runs. The first section presents the random and rule-based baselines. The simulation scenario is complex enough such that a random policy can only achieve a success rate of 8%. And the rule-based decision agent can improve the success rate metric to a more reasonable number of 79.0%. The longitudinal speed of rule-based of agent is higher than the random agent thanks to overtake maneuvers. And the lateral speed is reduced because a reasonable decision policy will avoid lane changing and stay on the current lane for most of the time. The second section compares different skipping configurations. The RL agent without any skipping operation (ID03) performs rather poor, achieving a success rate of only 29.5%. Action repetition operations (ID04) can help significantly improve the success rate to 83%. This demonstrates the importance of temporal abstraction to high-level tactical decision making tasks. The success rate of dynamic action skipping scheme (ID05) is surprisingly unsatisfactory even though its action space is a super-set to the action repetition scheme. One possible explanation may be that the gains from broadening the action space is over-weighed by the disadvantage of extending the effective horizon . As expected, action skipping (ID10) will result in smaller lateral speed than action repetition (ID04) thanks to the elimination of overshoot-correction jitters while roughly preserving the success rate. The third section compares alternatives rewarding schemes to the proposed one. In comparison to experiment ID10, experiment ID06 superimpose a ±1 global goal indicator to the proposed reward function and cause both success rate and longitudinal speed metrics to deteriorate. This corroborates our previous statement that global goal indicators are redundant under the presence of a complete set of constraint violation penalties. Experiment ID07 and ID08 replaces the pro1 This happens when ego vehicle drives into dead-end lanes. Section Baseline Skipping Reward Proposed ID 01 02 03 04 05 06 07 08 09 10 11 12 13 14 Skipping Reward N/A N/A None Repetition Dynamic Proposed Uniform Global goal 1.0 lane penalty 0.1 lane penalty Local goal N/A Proposed N/A Action mask 1 Action mask 2 Action mask 1 Action mask 2 N/A 2× / 6× skipping Uniform Non-Uniform Other Random Rule-based Success Rate 0.080 0.790 0.295 0.840 0.275 0.825 0.820 0.295 0.855 0.830 0.845 0.900 0.860 0.905 Lon. Speed 4.85 5.11 3.49 5.64 4.96 5.80 5.50 4.17 5.52 5.97 6.05 5.88 5.95 6.11 Lat. Speed 0.496 0.0822 0.00538 0.204 0.182 0.148 0.0893 0.0385 0.102 0.162 0.159 0.131 0.191 0.153 Table 2: Experimental results. posed counter-based penalty with a constant penalty. The resulting agent behavior is unfavorably sensitive to the penalty value: a larger value completely bans the access to dangerous lanes, resulting in lower longitudinal speed than experiment ID10; while a smaller value fails to reflect the risk of those lanes, resulting in a drastically reduced success rate. Experiment ID09 adds a dense penalty for deviating from the navigation lane. Although ego vehicle can achieve a higher success rate by sticking to the navigation lane, it can also miss the opportunity to temporarily deviate from that lane and overtake slower traffic. The result is significantly lower longitudinal speed. This exemplifies how dense local-goal related rewards can conflict from the global goal. The effectiveness of rule-based action masking and nonuniform action skipping is illustrated in the fourth table section. We experiment with two set of rules: rule #1 filters out lane switching behavior while ego vehicle is moving slowly on the navigation lane, while rule #2 also banns ego vehicle from treading onto the opposite lane or biking lane in addition. Note rule #2 is stricter than rule #1 but also requires more structural information about the environment. A tradeoff between safety and efficiency can be identified by comparing Experiment ID11 and ID12: the stricter rule #2 can provide more significant improvements on success rate than rule #1, at the price of reduced longitudinal speed. Finally, observe from the last two experiments, non-uniform action skipping can further increase the success rate of both masking rules by giving the ego car more lane-changing opportunities during inference. 5 Related Work Temporal abstraction is an effective means for speeding up RL algorithms. Although frame skipping with action repetition [Mnih et al., 2013] is a very simple form of temporal abstraction, it is extremely effective and has been shown to be key to state-of-art performance in many low-level control tasks [Braylan et al., 2000]. Due to the discontinuous semantics of tactical driving decisions, we propose to replace action repetition with the more stable action skipping method. Dynamic frame skipping [Lakshminarayanan et al., 2017] is also investigated in [Isele et al., 2017] for high-level decision learning, but it is not as effective as action skipping in our experiments. Other more sophisticated form of temporal abstractions have also been proposed for RL-based decision making under the option framework [Sutton et al., 1999], e.g. [Shalev-Shwartz et al., 2016]. But they are mostly tailored for specific scenarios and hard to generalize. An appropriate multi-dimensional rewarding system is indispensable for tactical decision making agents that are based on RL or POMDP. Many existing work applies global goal indicators, e.g. [Brechtel et al., 2014; Isele et al., 2017; Mukadam et al., 2017; Paxton et al., 2017]. However, we show that it is unnecessary to use global goal indicators in tactical decision making tasks. Constraint violation alerts in existing work are mostly one-shot or constant in time [Brechtel et al., 2014; Isele et al., 2017; Paxton et al., 2017; Li et al., 2017]. We propose to use counter-based risk signals to speed up learning in multi-lane scenarios. Dense localgoal penalties are also used in some previous work to regulate driving policy heuristically [Ulbrich and Maurer, 2013; Galceran et al., 2015; Paxton et al., 2017]. We show that such penalties can easily mislead the agent towards sub-optimal policies and should be avoided if possible. 6 Conclusion Deep reinforcement learning is a promising framework to tackle the tactical decision making tasks in autonomous driving systems. In this paper, we propose several practical ingredients for efficient deep reinforcement learning algorithms towards tactical decision making. We propose action skipping as a more stable alternative for the commonly used action repetition scheme and investigate a necessary set of reward components that will guide decision making agent to learn effectively in complex traffic environments. For more reliable inference, a heuristic rule-based action masker is combine with the learned agent to filters out apparently unsafe actions. The proposed ingredients is evaluated in a realistic driving simulator and results show that they outperform various baseline and alternative agent configurations. References [Bojarski et al., 2017] Mariusz Bojarski, Philip Yeres, Anna Choromanska, Krzysztof Choromanski, Bernhard Firner, Lawrence Jackel, and Urs Muller. Explaining how a deep neural network trained with end-to-end learning steers a car. arXiv:1704.07911 [cs], Apr 2017. arXiv: 1704.07911. [Braylan et al., 2000] Alex Braylan, Mark Hollenbeck, Elliot Meyerson, and Risto Miikkulainen. Frame skip is a powerful parameter for learning to play atari. Space, 1600:1800, 2000. [Brechtel et al., 2014] S. Brechtel, T. Gindele, and R. Dillmann. Probabilistic decision-making under uncertainty for autonomous driving using continuous POMDPs, pages 392–399. Oct 2014. [Brockman et al., 2016] Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016. [Chen et al., 2015] Chenyi Chen, Ari Seff, Alain Kornhauser, and Jianxiong Xiao. DeepDriving: Learning Affordance for Direct Perception in Autonomous Driving, pages 2722–2730. 2015. [Donges, 1999] Edmund Donges. A conceptual framework for active safety in road traffic. Vehicle System Dynamics, 32(2–3):113–128, Aug 1999. [Galceran et al., 2015] Enric Galceran, Alexander G. Cunningham, Ryan M. Eustice, and Edwin Olson. Multipolicy Decision-Making for Autonomous Driving via Changepoint-based Behavior Prediction. 2015. [Isele et al., 2017] David Isele, Akansel Cosgun, Kaushik Subramanian, and Kikuo Fujimura. Navigating intersections with autonomous vehicles using deep reinforcement learning. arXiv preprint arXiv:1705.01196, 2017. [Lakshminarayanan et al., 2017] Aravind S. Lakshminarayanan, Sahil Sharma, and Balaraman Ravindran. Dynamic Action Repetition for Deep Reinforcement Learning., pages 2133–2139. 2017. [Li et al., 2017] N. Li, D. W. Oyler, M. Zhang, Y. Yildiz, I. Kolmanovsky, and A. R. Girard. Game theoretic modeling of driver and vehicle interactions for verification and validation of autonomous vehicle control systems. IEEE Transactions on Control Systems Technology, PP(99):1– 16, 2017. [Miller et al., 2008] Isaac Miller, Mark Campbell, Dan Huttenlocher, Frank-Robert Kline, Aaron Nathan, Sergei Lupashin, Jason Catlin, Brian Schimpf, Pete Moran, Noah Zych, and et al. Team cornell’s skynet: Robust perception and planning in an urban environment. Journal of Field Robotics, 25(8):493–527, Aug 2008. [Mnih et al., 2013] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv:1312.5602 [cs], Dec 2013. arXiv: 1312.5602. [Montemerlo et al., 2008] Michael Montemerlo, Jan Becker, Suhrid Bhat, Hendrik Dahlkamp, Dmitri Dolgov, Scott Ettinger, Dirk Haehnel, Tim Hilden, Gabe Hoffmann, and Burkhard Huhnke. Junior: The stanford entry in the urban challenge. Journal of field Robotics, 25(9):569–597, 2008. [Mukadam et al., 2017] Mustafa Mukadam, Akansel Cosgun, Alireza Nakhaei, and Kikuo Fujimura. Tactical decision making for lane changing with deep reinforcement learning. 2017. [Paxton et al., 2017] Chris Paxton, Vasumathi Raman, Gregory D. Hager, and Marin Kobilarov. Combining neural networks and tree search for task and motion planning in challenging environments. arXiv:1703.07887 [cs], Mar 2017. arXiv: 1703.07887. [Plessen, 2017] Mogens Graf Plessen. Automating vehicles by deep reinforcement learning using task separation with hill climbing. arXiv:1711.10785 [cs], Nov 2017. arXiv: 1711.10785. [Sallab et al., 2017] Ahmad El Sallab, Mohammed Abdou, Etienne Perot, and Senthil Yogamani. Deep reinforcement learning framework for autonomous driving. Electronic Imaging, 2017(19):70–76, Jan 2017. arXiv: 1704.02532. [Shalev-Shwartz et al., 2016] Shai Shalev-Shwartz, Shaked Shammah, and Amnon Shashua. Safe, multi-agent, reinforcement learning for autonomous driving. arXiv:1610.03295 [cs, stat], Oct 2016. arXiv: 1610.03295. [Shalev-Shwartz et al., 2017] Shai Shalev-Shwartz, Shaked Shammah, and Amnon Shashua. On a formal model of safe and scalable self-driving cars. arXiv:1708.06374 [cs, stat], Aug 2017. arXiv: 1708.06374. [Sutton et al., 1999] Richard S. Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112(1):181–211, Aug 1999. [Ulbrich and Maurer, 2013] Simon Ulbrich and Markus Maurer. Probabilistic online POMDP decision making for lane changes in fully automated driving, pages 2063– 2067. IEEE, 2013. [Urmson et al., 2008] Chris Urmson, Joshua Anhalt, Drew Bagnell, Christopher Baker, Robert Bittner, M. N. Clark, John Dolan, Dave Duggins, Tugrul Galatali, and Chris Geyer. Autonomous driving in urban environments: Boss and the urban challenge. Journal of Field Robotics, 25(8):425–466, 2008. [van Hasselt et al., 2015] Hado van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double q-learning. arXiv:1509.06461 [cs], Sep 2015. arXiv: 1509.06461. [Wang et al., 2015] Ziyu Wang, Tom Schaul, Matteo Hessel, Hado van Hasselt, Marc Lanctot, and Nando de Freitas. Dueling network architectures for deep reinforcement learning. arXiv:1511.06581 [cs], Nov 2015. arXiv: 1511.06581.
2cs.AI
DYNAMIC CHARACTERIZATIONS OF QUASI-ISOMETRY, AND APPLICATIONS TO COHOMOLOGY arXiv:1604.07375v4 [math.GR] 18 Apr 2017 XIN LI A BSTRACT. We build a bridge between geometric group theory and topological dynamical systems by establishing a dictionary between coarse equivalence and continuous orbit equivalence. As an application, we give conceptual explanations for previous results of Shalom and Sauer on coarse invariance of homological and cohomological dimensions and Shalom’s property HFD . As another application, we show that group homology and cohomology in a class of coefficients, including all induced and co-induced modules, are coarse invariants. We deduce that being of type FPn (over arbitrary rings) is a coarse invariant, and that being a (Poincaré) duality group over a ring is a coarse invariant among all groups which have finite cohomological dimension over that ring. Our results also imply that every self coarse embedding of a Poincaré duality group over an arbitrary ring must be a coarse equivalence. 1. I NTRODUCTION The philosophy of geometric group theory is to study groups not merely as algebraic objects but from a geometric point of view. There are two ways of developing a geometric perspective, by viewing groups themselves as geometric objects (for instance with the help of their Cayley graphs, which leads to the notion of quasiisometry) or by studying groups by means of “nice” group actions on spaces which carry some topology or geometry. Once a geometric point of view is taken, an immediate question is: How much of the original algebraic structures is still visible from our new perspective? Or more precisely: Which algebraic invariants of groups are quasi-isometry invariants? Our goals in this paper are twofold. First, we want to connect the two geometric perspectives mentioned above by giving dynamic characterizations of quasi-isometry, or more generally, coarse equivalence. It turns out that for topological dynamical systems, the concept corresponding to coarse equivalence is given by (modified versions of) continuous orbit equivalence, as introduced in [26, 27]. The latter means that we can identify the orbit structure of our dynamical systems in a continuous way. The idea of developing dynamic characterizations of coarse equivalence goes back to Gromov’s notion of topological couplings and has been developed further in [43, 41]. Recently, independently from the author, a dynamic characterization of bilipschitz equivalence for finitely generated groups was obtained in [31], which is a special case of our result. Secondly, we want to study the behaviour of algebraic invariants of groups under coarse equivalence. More precisely, we consider invariants of (co)homological nature. Using our dynamic characterizations of coarse equivalence, we give conceptual explanations of the results in [43, 41] on coarse invariance of homological and cohomological dimensions and Shalom’s property HFD . Moreover, using a refined, more concrete version of our dynamic characterizations, we produce many new coarse invariants of (co)homological nature. We generalize the result in [19] that among groups G satisfying the finiteness condition Fn (i.e., there exist models for Eilenberg-MacLane spaces with finite n-skeleton), the cohomology groups H n (G, RG) are coarse invariants for all commutative rings R with unit. We show that for a class of coefficients (called res-invariant modules), including all induced and co-induced modules, group homology and cohomology are coarse invariants. In particular, H ∗ (G, RG) is always a coarse invariant. This answers a question in [33] (see [33, Questions after Theorem 2.7]). Our results imply that being of type FPn over R (i.e., the trivial RG-module R admits a projective resolution which is finitely generated up to level n) is a coarse invariant. This is a partial generalization of [43, Theorem 1.7]. A different approach is mentioned in [15, Theorem 9.61], and the case R = Z has been treated in [2]. As a consequence, we obtain that for an arbitrary commutative ring R with unit, the property of being a duality or Poincaré duality group over R is a coarse invariant among all groups which have finite cohomological dimension over R. A group G is called a duality group over R if there is a right RG-module C and an integer 2010 Mathematics Subject Classification. Primary 20F65, 20J06; Secondary 37B99. Research supported by EPSRC grant EP/M009718/1. 1 n ≥ 0 with natural isomorphisms H k (G, A) ∼ = Hn−k (G,C ⊗R A) for all k ∈ Z and all RG-modules A (see [4, § 9.2], [3], and [9, Chapter VIII, § 10]). G is called a Poincaré duality group over R if C ∼ = R as R-modules. C is called the dualizing module; note that we must have C ∼ = H n (R, RG) as right RG-mdules. Our result generalizes [19, Corollary 3], as we do not need the finiteness condition F∞ (i.e., Fn for all n) and can work over arbitrary rings. Examples of groups which are not duality groups over Z but over some other ring can be found in [13], and examples of (Poincaré) duality groups which are not of type F∞ appear in [13, 25]. Combined with Sauer’s result [41, Theorem 1.2 (ii)], we obtain that among amenable groups, being a (Poincaré) duality group over a divisible ring is a coarse invariant. This generalizes [41, Theorem 3.3.2]. We also prove a rigidity result for coarse embeddings into Poincaré duality groups. If a group G with hdR G < ∞ coarsely embeds into a Poincaré duality group H, then hdR G < cdR H. In particular, self coarse embeddings of Poincaré duality groups over an arbitrary ring must be coarse equivalences. Let us now formulate and explain our main results in more detail. At the same time, we fix some notations. Throughout this paper, all our groups are countable and discrete. First, we recall the notion of coarse maps (see [40, Definition 2.21]). Note that coarse embeddings in our sense are called uniform embeddings in [43, 41]. Definition 1.1. A map ϕ : G → H between groups G and H is map if ϕ −1 ({y}) is finite for  two  called a coarse −1 −1 : (s,t) ∈ S is finite. all y ∈ H, and for every S ⊆ G × G with st : (s,t) ∈ S finite, ϕ (s)ϕ (t)  −1 ϕ : G → H is called a coarse embedding if for every subset S ⊆ G × G, st : (s,t) ∈ S is finite if and only if ϕ (s)ϕ (t)−1 : (s,t) ∈ S is finite.  Two maps ϕ , φ : G → H are called close if ϕ (x)φ (x)−1 : x ∈ G is finite. We write ϕ ∼ φ in that case. A coarse map ϕ : G → H is called a coarse equivalence if it is coarsely invertible, i.e., there is a coarse map ψ : H → G such that ψ ◦ ϕ ∼ idG and ϕ ◦ ψ ∼ idH . We say that two groups G and H are coarsely equivalent if there is a coarse equivalence G → H. Clearly, coarse embeddings are coarse maps. Examples of coarse embeddings are subgroup embeddings and quasi-isometric embeddings. For finitely generated groups, coarse equivalences coincide with quasi-isometries (see [43]). Note that unlike in [43, 41], in our definition, we use st −1 and not s−1t (see Remark 2.1). Let us explain our dynamic characterizations of coarse embeddings and equivalences. Let G y X and H y Y be topological dynamical systems, where the groups act by homeomorphisms on locally compact Hausdorff spaces. A continuous orbit couple is a pair of continuous maps p : X → Y and q : Y → X which both preserve orbits in a continuous way, such that p and q are inverses up to orbits (i.e., q(p(x)) lies in the same G-orbit of x and similarly for p ◦ q). “Preserving orbits in a continuous way” is made precise by continuous maps a : G × X → H such that p(g.x) = a(g, x).p(x) for all g ∈ G and x ∈ X . If p and q are actual inverses (i.e., q ◦ p = idX and p ◦ q = idY ), then our dynamical systems are called continuously orbit equivalent. Our first main result establishes the following dictionary: The existence of a coarse embedding G → H corresponds to the existence of a continuous orbit couple for topologically free systems G y X and H y Y , where X is compact. The existence of a coarse equivalence G → H corresponds to the existence of a continuous orbit couple for topologically free systems G y X and H y Y , where both X and Y are compact, and we can find a bijective coarse equivalence G → H if and only if we can find a continuously orbit equivalence for G y X and H y Y . We refer to Theorem 2.17 for precise statements. It turns out that for compact X , the existence of a continuous orbit couple for G y X and H y Y is equivalent to saying that G y X and H y Y are Kakutani equivalent, i.e., there are clopen subspaces A ⊆ X and B ⊆ Y which are G- and H-full such that the partial actions G y A and H y B are continuously orbit equivalent (in the sense of [27]). This implies that the transformation groupoids of G y X and H y Y are Morita equivalent. Building on this observation, we show that the results in [43, 41] on coarse invariance of (co)homological dimension and Shalom’s property HFD are immediate consequences of Morita invariance of groupoid (co)homology. This gives a conceptual explanation for the results in [43, 41], and at the same time, our work isolates precise conditions on the dynamical systems which are needed to show coarse invariance. The dynamic characterizations we described so far are abstract as the dynamical systems are not specified. It is striking that even such abstract characterizations suffice to derive the results in [43, 41]. However, to show coarse invariance of group (co)homology in particular coefficients, we need more concrete versions of our dynamic characterizations. Inspired by [44], we first observe that in place of abstract dynamical systems, we may always take the canonical action G y β G of groups G on their Stone-Čech compactifications β G. The appearance of G y β G is not surprising because of its universal property. But now, our crucial observation is that we can go even further and consider the actions G y G of groups acting on themselves by left multiplication. By 2 doing so, it seems that we are losing all the information as any two actions G y G and H y H are continuously orbit equivalent as long as G and H have the same cardinality. The problem is that the spaces on which our groups act are no longer compact. However, we can replace compactness by asking for finiteness conditions on the maps a, which – as in the definition of continuous orbit couples – make precise that orbits are preserved in a continuous way: We require that for every g ∈ G, the map a(g, ·) should have finite image. It is this finiteness condition which singles out “controlled” orbit equivalences which behave well in (co)homology. The point is that every coarse equivalence G → H gives rise to a “controlled” orbit equivalence between G y G and H y H. This change of perspective, putting the emphasis on this finiteness condition, turns out to be crucial. These ideas lead to the following results: Let R be a commutative ring with unit and W an R-module. The set C(G,W ) of functions G → W carries a natural RG-module structure. An RG-submodule L ⊆ C(G,W ) is called res-invariant if for every f ∈ L and A ⊆ G, the restriction of f to A (viewed as a function on G by extending it by 0) still lies in L. Examples include C(G,W ), the submodule C f (G,W ) of f ∈ C(G,W ) taking only finitely many values, RG ⊗R W , and for W = R = R or C, c0 (G,W ) = { f : G → W : limx→∞ | f (x)| = 0}, ℓ p (G,W ) = { f : G → W : ∑x∈G | f (x)| p < ∞} (0 < p ≤ ∞), H s,p (G,W ) = { f : G → W : f · (1 + ℓ)s ∈ ℓ p (G,W )} (s ∈ R ∪ {∞}, 1 ≤ p < ∞), where G is finitely generated and ℓ is the word length on G, and H ∞,p (G,W ) = T s,p s∈R H (G,W ). We show that a coarse equivalence ϕ : G → H induces a one-to-one correspondence between res-invariant submodules of C(G,W ) and res-invariant submodules of C(H,W ), denoted by L 7→ ϕ∗ L, together with isomorphisms H∗ (ϕ ) : H∗ (G, L) ∼ = H∗ (H, ϕ∗ L) for all L. Similarly, ϕ induces a one-to-one correspondence between res-invariant submodules of C(H,W ) and res-invariant submodules of C(G,W ), say M 7→ ϕ ∗ M, together with isomorphisms H ∗ (ϕ ) : H ∗ (H, M) ∼ = H ∗ (G, ϕ ∗ M) for all M. In particular, we obtain Theorem (Corollary 4.41). Among all countable discrete groups G, the following (co)homology groups are coarse invariants: H∗ (G,C(G,W )), H∗ (G,C f (G,W )), H ∗ (G,C f (G,W )), H ∗ (G, RG ⊗R W ) for every commutative ring R with unit and every R-module W; H∗ (G, c0 (G, R)), H ∗ (G, c0 (G, R)), H̄∗ (G, c0 (G, R)), H̄ ∗ (G, c0 (G, R)); H∗ (G, ℓ p (G, R)), H ∗ (G, ℓ p (G, R)), H̄∗ (G, ℓ p (G, R)), H̄ ∗ (G, ℓ p (G, R)), for all 0 < p ≤ ∞; and for finitely generated groups G, H∗ (G, H s,p (G, R)), H ∗ (G, H s,p (G, R)), H̄∗ (G, H s,p (G, R)), H̄ ∗ (G, H s,p (G, R)), for all s ∈ R ∪ {∞}, 1 ≤ p ≤ ∞, where R = R or C. Some of these (co)homology groups can be identified with existing (co)homology theories: H ∗ (G, RG) is coarse cohomology [40, § 5.1], H∗ (G,C f (G, Z)) and H∗ (G, ℓ∞ (G, R)) coincide with uniformly finite homology [6, 8, 5], and for ℓ p coefficients, we obtain L p -cohomology [35, 19, 16]. Actually, we show that every coarse map ϕ : G → H induces a map H∗ (ϕ ) : H∗ (G, L) → H∗ (H, ϕ∗ L) such that H∗ (ϕ ) = H∗ (φ ) if ϕ ∼ φ and H∗ (ψ ◦ ϕ ) = H∗ (ψ ) ◦ H∗ (ϕ ). It is then evident that coarse equivalences induce isomorphisms as they are precisely those coarse maps which are invertible modulo ∼. A similar remark applies to cohomology. Thus, not only these (co)homology groups, but, by functoriality, the actions of the groups of coarse equivalences (modulo ∼) on these (co)homology groups are coarse invariants as well. We obtain analogous results for coarse embeddings in the topological setting, i.e., for topological res-invariant modules and reduced (co)homology. It turns out that coarse embeddings always induce isomorphisms in (co)homology and reduced (co)homology. The aforementioned results on coarse invariance of type FPn and being a (Poincaré) duality group are immediate consequences, as is our rigidity result for coarse embeddings into Poincaré duality groups. We also deduce that vanishing of ℓ2 -Betti numbers is a coarse invariant, as observed in [35, 34, 32], and generalized by Sauer and Schrödl to all unimodular locally compact second countable groups [42]. This is a good point to formulate an interesting and natural question, which we elaborate on in § 4.4: Question (Question 4.44). Are homological and cohomological dimension over a commutative ring R with unit always coarse invariants among all countable discrete groups with no R-torsion? We refer to § 4 for more details. § 3 and § 4 are independent from each other. Thus readers interested in this last set of results on coarse invariance of group (co)homology may go directly from § 2 to § 4. As far as our methods are concerned, we use groupoid techniques as in [43, 41, 34], but instead of working with abstract dynamical systems, we base our work on concrete dynamic characterizations of coarse equivalence. The difference between our work and [19] is that we do not work with descriptions of group (co)homology in terms of Eilenberg-MacLane spaces, as these descriptions require finiteness conditions (like Fn or F∞ ) on our groups and have to be modified whenever we change coefficients. Instead, since coarse embeddings automatically lead to “controlled” orbit equivalences satisfying the finiteness condition mentioned above, we can work directly with complexes coming from bar resolutions. 3 I thank Andreas Thom for informing me about [31], Roman Sauer for explaining certain parts of his work [41] to me, and for informing me about [42, 32], and Roman Sauer and Clara Löh for very helpful comments. 2. DYNAMICAL CHARACTERIZATIONS OF QUASI - ISOMETRY 2.1. Preliminaries. The central notions of coarse maps, embeddings and equivalences have been introduced in § 1. We remark that it is easy to see that a coarse embedding ϕ : G → H is coarsely invertible ifSand only if H can be covered by finitely many translates of ϕ (G), i.e., there is a finite set F ⊆ H such that H = h∈F hϕ (G). Remark 2.1. Note that unlike in [43], our definition of coarse maps is right-invariant, not left-invariant (i.e., we use st −1 instead of s−1 t). For finitely generated groups, this amounts to considering right-invariant word lengths and word metrics. We do so because in the following, we will consider left actions of groups, in particular the action of a group by left multiplication on itself. Of course, this is merely a matter of convention. The following concept, due to Gromov, builds a bridge between geometric group theory and topological dynamical systems. Definition 2.2. For two groups G and H, a (G, H) topological coupling consists of a locally compact space Ω with commuting free and proper left G- and right H-actions which admit clopen H- and G-fundamental domains X̄ and Ȳ . Our (G, H) topological coupling is called G-cocompact if Ȳ is compact, H-cocompact if X̄ is compact, and cocompact if it is both G- and H-cocompact. It is called topologically free (or free) if the combined action G × H y Ω is topologically free (or free). All our spaces are Hausdorff. Also, being only concerned with the topological setting, we simply write “coupling” (without prefix “topological”). We often write G y Ȳ ΩX̄ x H to keep track of all the relevant data. The following result goes back to ideas of Gromov and is proven in [43] and [41]. Theorem 2.3. Let G and H be countable discrete groups. (i) There exists a coarse embedding G → H if and only if there exists a H-cocompact (G, H) coupling. (ii) There exists a coarse equivalence G → H if and only if there exists a cocompact (G, H) coupling. (iii) There is a bijective coarse equivalence G → H if and only if there is a cocompact (G, H) coupling G y Ȳ ΩX̄ x H with X̄ = Ȳ . Proof. For (i), see [41, Theorem 2.2, (i) ⇔ (ii)]. For (ii), see [41, Theorem 2.2, (iii) ⇔ (iv)]. For (iii), see [43, Remark after Theorem 2.1.2].  Remark 2.4. The proofs in [41, 43] show that the underlying space Ω of the (G, H) couplings can be chosen to be second countable and totally disconnected in the above statements. Let us now isolate an idea from [31] which will be useful later on. Lemma 2.5. If there exists a (G, H) coupling G y Ω x H, then there exists a topologically free (G, H) coupling G y Ω′ x H. If G y Ω x H is G-cocompact, H-cocompact or cocompact, G y Ω′ x H may be chosen with the same property. If Ω is second countable and totally disconnected, we may choose Ω′ with the same property. Proof. The idea of the proof appears in the proof of [31, Theorem 3.2]. Let G × H y Z be a free action on the Cantor space Z. It is easy to see that Ω′ = Ω × Z with diagonal G- and H-actions is a (G, H) coupling which is topologically free (even free). As Z is compact and totally disconnected, our additional claims follow.  2.2. Topological couplings and continuous orbit couples. We explain the connection between topological couplings and continuous orbit couples. First of all, a topological dynamical system G y X consists of a group G acting on a locally compact space X via homeomorphisms. We write g.x for the action. Definition 2.6. Let G y X and H y Y be topological dynamical systems. A continuous map p : X → Y is called a continuous orbit map if there exists a continuous map a : G × X → H such that p(g.x) = a(g, x).p(x) for all g ∈ G and x ∈ X . A continuous orbit couple for G y X and H y Y consists of continuous orbit maps p : X → Y and q : Y → X such that there exist continuous maps g : X → G and h : Y → H such that q(p(x)) = g(x).x and p(q(y)) = h(y).y for all x ∈ X and y ∈ Y . 4 Definition 2.7. A (G, H) continuous orbit couple consists of topological dynamical systems G y X and H y Y and a continuous orbit couple for G y X and H y Y . If G y X and H y Y are topologically free, then the (G, H) continuous orbit couple is called topologically free. We call X the G-space and Y the H-space of our (G, H) continuous orbit couple. Remark 2.8. In this language, a continuous orbit equivalence for G y X and H y Y in the sense of [26] is the same as a continuous orbit couple for G y X and H y Y with g ≡ e and h ≡ e, i.e., p = q−1 . Definition 2.9. A (G, H) continuous orbit equivalence consists of topological dynamical systems G y X and H y Y and a continuous orbit equivalence for G y X and H y Y . Theorem 2.10. Let G and H be groups. There is a one-to-one correspondence between isomorphism classes of topologically free (G, H) couplings and isomorphism classes of topologically free (G, H) continuous orbit couples, with the following additional properties: (i) A (G, H) coupling G y Ȳ ΩX̄ x H corresponds to a (G, H) continuous orbit couple with G-space homeomorphic to X̄ and H-space homeomorphic to Ȳ . (ii) A (G, H) coupling G y Ȳ ΩX̄ x H with X̄ = Ȳ corresponds to a (G, H) continuous orbit equivalence. Here, the notions of isomorphisms are the obvious ones: Topological couplings G y Ȳ1 Ω1 X̄1 x H and G y ∼ Ȳ2 Ω2 X̄2 x H are isomorphic if there exists a G × H-equivariant homeomorphism Ω1 = Ω2 sending X̄1 to X̄2 and Ȳ1 to Ȳ2 . Continuous orbit couples (pi , qi ) for G y Xi and H y Yi , i = 1, 2, are isomorphic if there exist G- and H-equivariant homeomorphisms X1 ∼ = Y2 such that we obtain commutative diagrams = X2 and Y1 ∼ X1 p1 / Y1 ∼ = ∼ =  X2 p2 Y1 q1 / X1 ∼ = ∼ =   / Y2 Y2 q2  / X2 For the proof of Theorem 2.10, we now present explicit constructions of continuous orbit couples out of topological couplings and vice versa. The constructions are really the topological analogues of those in [17, § 3] (see also [43, 41]). In the following, we write gx (g ∈ G, x ∈ Ω) and xh (x ∈ Ω, h ∈ H) for the left G- and right H-actions in topological couplings, and g.x, h.y for the actions G y X , H y Y from continuous orbit couples. 2.2.1. From topological couplings to continuous orbit couples. Let G y Ȳ ΩX̄ x H be a (G, H) coupling. Set X := X̄ and Y := Ȳ . Define a map p : X → Y by requiring Gx ∩ Y = {p(x)} for all x ∈ X . The intersection Gx ∩Y , taken in Ω, consists of exactly one point because Y is a G-fundamental domain. By construction, there is a map γ : X → G such that p(x) = γ (x)x. For g ∈ G, γ takes the constant value g on X ∩ g−1Y . As X ∩ g−1Y is clopen, because X and Y are, γ is continuous. p is continuous as it is so on X ∩ g−1Y for all g ∈ G. We now define a G-action, denoted by G × X → X , (g, x) 7→ g.x, as follows: For every g ∈ G and x ∈ X , there exists a unique α (g, x) ∈ H such that gx ∈ X α (g, x). For fixed g ∈ G and h ∈ H, we have α (g, x) = h for all x ∈ X ∩ g−1 X h. As X ∩ g−1 X h is clopen because X is, α : G × X → H is continuous. Set g.x := gxα (g, x)−1 . It is easy to check that α satisfies the cocycle identity α (g1 g2 , x) = α (g1 , g2 .x)α (g2 , x). Using this, it is easy to see that G × X → X , (g, x) 7→ g.x defines a (left) G-action on X by homeomorphisms. Similarly, we define a continuous map q : Y → X by requiring X ∩ yH = {q(y)} for all y ∈ Y , and let η : Y → H be the continuous map satisfying q(y) = yη (y). To define an H-action on Y , let β (y, h) ∈ G be such that yh ∈ β (y, h)Y . Again, β : Y × H → G is continuous. Set h.y := β (y, h−1 )−1 yh−1 . It is easy to check that β satisfies β (y, h1 h2 ) = β (y, h1 )β (h−1 1 .xh2 ). Using this, it is again easy to see that H ×Y → Y, (h, y) 7→ h.y defines an H-action on Y by homeomorphisms. Let us check that (p, q) is a (G, H) continuous orbit couple. We need to identify Ggxα (g, x)−1 ∩ Y in order to determine p(g.x) = p(gxα (g, x)−1 ). We have Ggxα (g, x)−1 ∋ β (γ (x)x, α (g, x)−1 )−1 γ (x)xα (g, x)−1 ∈ Y, so p(g.x) = β (γ (x)x, α (g, x)−1 )−1 γ (x)xα (g, x)−1 = α (g, x).(γ (x)x) = α (g, x).p(x). Similarly, in order to identify q(h.y) = q(β (y, h−1 )−1 yh−1 ), we need to determine X ∩ β (y, h−1 )−1 yh−1 H. As X ∋ β (y, h−1 )−1 yη (y)α (β (y, h−1 )−1 , yη (y))−1 ∈ β (y, h−1 )−1 yh−1 H, we deduce q(y.h) = β (y, h−1 )−1 yη (y)α (β (y, h−1 )−1 , yη (y))−1 = β (y, h−1 )−1 .(yη (y)) = β (y, h−1 )−1 .q(y). Finally, qp(x) = q(γ (x)x) = γ (x)xα (γ (x), x)−1 = γ (x).x and pq(y) = p(yη (y)) = β (y, η (y))−1 yη (y) = η (y)−1 .y. 5 All in all, we see that p and q give rise to a continuous orbit couple for G y X and H y Y , with g(x) = γ (x) and h(y) = η (y)−1 . Note that our coupling does not need to be topologically free for this construction. However, it is clear that G y Ω x H is topologically free (i.e., G × H y Ω is topologically free) if and only if G y X and H y Y are topologically free. Remark 2.11. Our notation differs slightly from the one in [43] and [41]. Our α (g, x) is α (g−1 , x)−1 in [43, § 2.2, Equation (3)] and [41, § 2.2, Equation (2.2)]. This is closely related to Remark 2.1. Remark 2.12. The dynamical system G y X we constructed above can be canonically identified with G y Ω/H. Similarly, our system H y Y can be identified with G\Ω x H in a canonical way. 2.2.2. From continuous orbit couples to topological couplings. Let G y X and H y Y be topologically free systems on locally compact spaces X and Y . Assume that we are given a continuous orbit couple for G y X and H y Y , and let p, q, a, g and h be as in Definition 2.6, and let b : H × Y → G be a continuous map with q(h.y) = b(h, y).q(y) for all h ∈ H and y ∈ Y . Define commuting left G- and right H-actions on X × H by g(x, h) = (g.x, a(g, x)h), (x, h)h′ = (x, hh′ ). Furthermore, define commuting left G- and right H-actions on G ×Y by g′ (g, y) = (g′ g, y) and (g, y)h = (gb(h−1 , y)−1 , h−1 .y). A straightforward computation, using the cocycle identities ([26, Lemma 2.8]) for a and b, shows that Θ : X × H → G ×Y, (x, h) 7→ (g(x)−1 b(h−1 , p(x))−1 , h−1 .p(x)) is a G- and H-equivariant homeomorphism with inverse Θ−1 : G ×Y → X × H, (g, y) 7→ (g.q(y), a(g, q(y))h(y)). Thus, the G × H-space Ω = X × H and X̄ = X × {e}, Ȳ = Θ−1 ({e} ×Y ) yield the desired topologically free (G, H) coupling G y Ȳ ΩX̄ x H. Note that topological freeness of G y X and H y Y ensures that a and b satisfy the cocycle identities (as in [26, Lemma 2.8]), which are needed in the preceding computations. 2.2.3. One-to-one correspondence. Proof of Theorem 2.10. It is straightforward to check that the constructions described in § 2.2.1 and § 2.2.2 are inverse to each other up to isomorphism. If we start with a topologically free (G, H) coupling G y Ȳ ΩX̄ x H, construct a continuous orbit couple and then again a (G, H) coupling, we end up with a (G, H) coupling of the form G y Ỹ Ω̃X̃ x H where Ω̃ = X̄ × H ∼ = G × Ȳ , X̃ = X̄ × {e} and Ỹ ∼ = {e} × Ȳ . It is then obvious that Ω̃ = X̄ × H → Ω, (x, h) 7→ xh is an isomorphism of the couplings G y Ỹ Ω̃X̃ x H and G y Ȳ ΩX̄ x H. Conversely, if we start with a continuous orbit couple for topologically free systems G y X and H y Y , construct a (G, H) coupling and then again a (G, H) continuous orbit couple, we end up with a continuous orbit couple for G y X̃ and H y Ỹ where X̃ = X × {e} and Ỹ ∼ = X × {e} = {e} ×Y . The canonical isomorphisms X ∼ ∼ and Y = {e} × Y yield an isomorphism between the original (G, H) continuous orbit couple and the one we obtained at the end. Additional property (i) is clear from our constructions. For (ii), take X̄ = Ȳ in the construction of § 2.2.2. Then it is clear that our maps p and q become the identity map on X̄ = Ȳ , that γ becomes the constant function with value e ∈ G and η the constant function with value e ∈ H. Hence it is obvious that our construction yields a (G, H) continuous orbit equivalence (see also Remark 2.8).  Remark 2.13. The maps p, q constructed in § 2.2.1 are open. Thus the maps p, q appearing in a continuous orbit couple (Definition 2.6) are automatically open. This is also easy to see directly from the definition. 2.3. Continuous orbit couples and Kakutani equivalence. Definition 2.14. (Compare also [30, Definition 4.1].) Topological dynamical systems G y X and H y Y are Kakutani equivalent if there exist clopen subsets A ⊆ X and B ⊆ Y such that G.A = X , H.B = Y and (X ⋊ G)|A ∼ = (Y ⋊ H)|B as topological groupoids. Here (X ⋊ G)|A = s−1 (A) ∩ r−1 (A) and (Y ⋊ H)|B = s−1 (B) ∩ r−1 (B). Remark 2.15. (X ⋊ G)|A is (isomorphic to) the transformation groupoid attached to the partial action G y A which is obtained by restricting G y X to A. Similarly, (Y ⋊ H)|B is (isomorphic to) the transformation groupoid attached to the partial action H y B which is obtained by restricting H y Y to B. In view of this, two topologically free systems G y X and H y Y are Kakutani equivalent if and only if there exist clopen subsets A ⊆ X and B ⊆ Y with G.A = X , H.B = Y such that the partial actions G y A and H y B are continuously orbit equivalent in the sense of [27]. This follows from [27, Theorem 2.7]. The reader may find more about partial actions in [27, § 2] and the relevant references in [27]. 6 Theorem 2.16. Let G y X and H y Y be topologically free systems. There exists a continuous orbit couple for G y X and H y Y with p(X ) closed if and only if G y X and H y Y are Kakutani equivalent. Here p : X → Y is as in Definition 2.6. The assumption that p(X ) is closed always holds if X is compact. This will be the case of interest later on. Proof. By Remark 2.15, we have to show that there exists a continuous orbit couple for G y X and H y Y if and only if there exist clopen subspaces A ⊆ X and B ⊆ Y with X = G.A and Y = H.B such that the partial actions G y A and H y B are continuously orbit equivalent. For “⇒”, suppose we are given a continuous orbit couple for G y X and H y Y , and let p, q, a, b, g F and h be as in Definition 2.6 and § 2.2.2. For g ∈ G, let Ug = {x ∈ X : g(x) = g}. Then Ug is clopen, and X = g∈G Ug . For every g ∈ G, Vg := p(Ug ) is clopen, and p : Ug → Vg is a homeomorphism, whose inverse is given by S Vg → Ug , y 7→ g−1 .q(y). Set B := p(X ). By assumption, B is closed, hence clopen. We have B = g∈G Vg . As G is countable, this is a countable union. Hence by inductively choosing compact open subspaces Bg of F F Vg , we can arrange that B is the disjoint union B = g∈G Bg . Let Ag := Ug ∩ p−1 (Bg ) and A := g∈G Ag . As F F F every Ag is clopen, A = g∈G Ag is clopen in X = g∈G Ug . Set ϕ := p|A = g∈G p|Ag . By construction, ϕ is a F F homeomorphism with inverse ϕ −1 = g∈G (p|Ag )−1 = g∈G (g−1 .q)|Bg . We have ϕ (g.x) = p(g.x) = a(g, x).p(x) for all x ∈ A, g ∈ G with g.x ∈ A. Moreover, take y ∈ Bg1 and −1 −1 −1 h ∈ H with h.y ∈ Bg2 . Then ϕ −1 (h.y) = g−1 2 .q(h.y) = g2 b(h, y).q(y) = g2 b(h, y)g1 .ϕ (y). Define a map −1 ′ ′ −1 ′ b by setting b (h, y) = g2 b(h, y)g1 if y ∈ Bg1 ∩ h .Bg2 . Then b is continuous, and we have ϕ −1 (h.y) = b′ (h, y).ϕ −1 (y) for all y ∈ B, h ∈ H with h.y ∈ B. This shows that ϕ gives rise to a continuous orbit equivalence for G y A and H y B. To see that G.A = X , take for x′ ∈ X an x ∈ A such that p(x) = p(x′ ). Then g(x).x = q(p(x)) = q(p(x′ )) = g(x′ ).x′ , and therefore x′ ∈ G.x. To see H.B = Y , take y ∈ Y arbitrary. Then p(q(y)) = h(y).y shows that y = h(y)−1 .p(q(y)) ∈ H.B. This shows “⇒”. For “⇐”, suppose that G y X and H y Y are Kakutani equivalent, i.e., there are clopen subsets A ⊆ X and B ⊆ Y with X = G.A, Y = H.B and the partial actions G y A and H y B are continuously orbit equivalent via a homeomorphism ϕ : A ∼ = B. By definition of continuous orbit equivalence (see [27]), there exist continuous ′ ′ ϕ −1 (y) whenever this makes sense. maps a and b satisfying ϕ (g.x) = a′ (g, x).ϕ (x) and ϕ −1 (h.y) = b′ (h, y). F As X = G.A, we can find clopen subsets Xγ ⊆ γ .A, γ ∈ G, such that X = γ ∈G Xγ and Xe = A. Define p : X → Y by setting p(x) := ϕ (γ −1 .x) for x ∈ Xγ . p is continuous, and p(X ) = B is clopen. Similarly, there are clopen F subsets Yη ⊆ η .B such that Y = η ∈H Yη and Ye = B. We define q : Y → X by setting q(y) = ϕ −1 (η −1 .y) if y ∈ Yη . By construction, q is continuous. We have p(g.x) = ϕ (γ2−1 g.x) = ϕ (γ2−1 gγ1 .(γ1−1 .x)) = a′ (γ2−1 gγ1 , γ1−1 .x).ϕ (γ1−1 .x) = a′ (γ2−1 gγ1 , γ1−1 .x).p(x) for x ∈ Xγ1 and g ∈ G with g.x ∈ Xγ2 . Set a : G × X → H, a(g, x) = a′ (γ2−1 gγ1 , γ1−1 .x) for x ∈ Xγ1 ∩ g−1 .Xγ2 . Then a is continuous and ϕ (g.x) = a(g, x).ϕ (x) for all g ∈ G and x ∈ X . For y ∈ Yη1 and h ∈ H such that h.y ∈ Yη2 , we have q(h.y) = ϕ −1 (η2−1 h.y) = ϕ −1 (η2−1 hη1 (η1−1 .y)) = b′ (η2−1 hη1 , η1−1 .y).ϕ −1 (η1−1 .y) = b′ (η2−1 hη1 , η1−1 .y).q(y). Set b : H × Y → G, b(h, y) = b′ (η2−1 hη1 , η1−1 .y) for y ∈ Yη1 ∩ h−1 .Yη2 . Then b is continuous and ϕ −1 (h.y) = b(h, y).ϕ −1 (y) for all h ∈ H and y ∈ Y . Moreover, for x ∈ Xγ , q(p(x)) = q(ϕ (γ −1 .x)) = ϕ −1 (ϕ (γ −1 .x)) = γ −1 .x. Set g : X → G, g(x) = γ −1 if x ∈ Xγ . Then g is continuous and q(p(x)) = g(x).x for all x ∈ X . For y ∈ Yη ∩ η .ϕ (Xγ ), we have p(q(y)) = p(ϕ −1 (η −1 .y)) = ϕ (γ −1 .ϕ −1 (η −1 .y)) = ϕ (γ −1 b′ (η −1 , y).ϕ −1 (y) = a′ (γ −1 b′ (η −1 , y), ϕ −1 (y)).y. Set h : Y → H, h(y) := a′ (γ −1 b′ (η −1 , y), ϕ −1 (y)) if y ∈ Yη ∩ η .ϕ (Xγ ). Then h is continuous and p(q(y)) = h(y).y for all y ∈ Y. So p and q give a continuous orbit couple for G y X and H y Y . This shows “⇐”.  2.4. Dynamic characterizations of coarse embeddings, equivalences and bijections. Putting together Theorem 2.3, Lemma 2.5, Theorems 2.10 and 2.16, we obtain the following Theorem 2.17. Let G and H be countable discrete groups. • The following are equivalent: - There exists a coarse embedding G → H. - There exist Kakutani equivalent topologically free G y X and H y Y , with X compact. - There is a continuous orbit couple for topologically free G y X and H y Y , with X compact. 7 • The following are equivalent: - There is a coarse equivalence G → H. - There are Kakutani equivalent topologically free G y X and H y Y on compact spaces X , Y . - There is a continuous orbit couple for topologically free G y X and H y Y , with X , Y compact. • There is a bijective coarse equivalence G → H if and only if there exist continuously orbit equivalent topologically free systems G y X and H y Y on compact spaces X and Y . In all these statements, the spaces X and Y can be chosen to be totally disconnected and second countable. This is a generalization of [31, Theorem 3.2], where the authors independently prove the last item of our theorem in the special case of finitely generated groups. Remark 2.18. The last observation in Theorem 2.17 says that we can always choose our spaces X , Y to be totally disconnected. In that case, [10, Theorem 3.2] tells us that we can replace Kakutani equivalence in the theorem above by stable continuous orbit equivalence. Two topological dynamical systems G y X and H y Y are called stably continuously orbit equivalent if Z × G y Z × X and Z × H y Z × Y are continuously orbit equivalent. Here the integers Z act on themselves by translation. 2.5. Dynamic characterizations of coarse embeddings, equivalences and bijections in terms of actions on Stone-Čech compactifications. Inspired by [44], we characterize coarse embeddings, equivalences and bijections in terms of Kakutani equivalence (or stable continuous orbit equivalence) and continuous orbit equivalence of actions on Stone-Čech compactifications. Let G, H be two countable discrete groups. Let ϕ : G → H be a coarse embedding. Consider the Stone-Čech compactification β G of G. It is homeomorphic to the spectrum Spec (ℓ∞ (G)), and can be identified with the space of all ultrafilters on G. We will think of elements in β G as ultrafilters on G. Given any subset X ⊆ G, we obviously have the identification {F ∈ β G: X ∈ F } ∼ = β X , F 7→ F ∩ X := {F ∩ X : F ∈ F }. Now suppose that X ⊆ G is a subset such that ϕ |X is injective. Setting Y := ϕ (X ) ⊆ H, we obtain a bijection X∼ = Y, x 7→ ϕ (x), which we again denote by ϕ . Let us consider the topological dynamical systems G y β G and H y β H. We identify β X and β Y with clopen subsets of β G and β H, respectively, in the way explained above. ϕ induces a homeomorphism β ϕ : β X ∼ = β Y, F 7→ ϕ (F ). The dynamical systems G y β G and H y β H restrict to partial dynamical systems G y β X and H y β Y . Proposition 2.19. β ϕ induces a continuous orbit equivalence between G y β X and H y β Y , in the sense of [27, Definition 2.6]. Proof. For all g ∈ G, we need to find a continuous map a : {g} ×Ug−1 → H with β ϕ (g.F ) = a(g, F ).β ϕ (F ).  Here Ug−1 = β X ∩ g−1 .β X = {F ∈ β X : g.F ∈ β X } = F ∈ β G: X ∈ F , g−1 X ∈ F ∼ = β (X ∩ g−1 X ). For x ∈ X ∩ g−1 X , define the ultrafilter Fx by saying that Z ∈ Fx if and only if x ∈ Z. Define a map ã : {g} ×  Fx : x ∈ X ∩ g−1 X → H by setting ã(g, Fx ) := ϕ (gx)ϕ (x)−1 . Then (1) ã(g, Fx ).β ϕ (Fx ) = ϕ (gx)ϕ (x)−1 .β ϕ (Fx ) = ϕ (gx)ϕ (x)−1 .Fϕ (x) = Fϕ (gx) = β ϕ (Fgx ) = β ϕ (g.Fx ) −1 for all fix g ∈ G. Set S = {(gx, x): ϕ is a coarse embedding  x ∈ G}. As  g−1∈ G, x ∈ X ∩ g X . Let us  −1 −1 and st : (s,t) ∈ S = {g} is finite, ϕ (s)ϕ (t) : (s,t) ∈ S = ϕ (g, x)ϕ (x) : x ∈ G is finite. Hence im (ã) ⊆ ϕ (gx)ϕ (x)−1 : x ∈ G is finite, hence a compact subset of H. By universal property of β (X ∩ g−1 X ), there exists a continuous extension of ã to {g} × Ug−1 which we denote by a. We claim that β ϕ (g.F ) = a(g, F ).β ϕ (F ) for all F ∈ Ug−1 . Let xi ∈ X ∩ g−1 X be a net such that limi Fxi = F . Then a(g, Fxi ) = ϕ (gxi )ϕ (xi )−1 converges to a(g, F ) by construction. Hence (1) a(g, F ).β ϕ (F ) = lim a(g, Fxi ).β ϕ (Fxi ) = lim β ϕ (g.Fxi ) = β ϕ (lim g.Fxi ) = β ϕ (g.F ). i i i  The following observation will be used several times. Lemma 2.20. Let ϕ : G → H be a coarse embedding. Set Y := ϕ (G). For every y ∈ Y , choose xy ∈ G with ϕ (xy ) = y. Set X := {xy : y ∈ Y }. S Then ϕ restricts to a bijection X ∼ = Y , and there is finite subset F ⊆ G with G = g∈F gX . Proof. Clearly, the restriction of ϕ to X is a bijection onto Y . To prove that G can be covered by finitely many  translates of X , set S := (g, xϕ (g) ): g ∈ G . Then ϕ (s)ϕ (t)−1 : (s,t) ∈ S = {e}, where e is the identity in 8 H. Since ϕ is a coarse embedding, S subset F ⊆ G with G = g∈F gX . n o  gxϕ−1(g) : g ∈ G = st −1 : (s,t) ∈ S must be finite. Hence there is finite  We now obtain the following characterizations of coarse embeddings, equivalences and bijections. Corollary 2.21. Let G and H be countable discrete groups. (i) The following are equivalent: - There is a coarse embedding G → H. - There is an open, dense, H-invariant subspace Ỹ ⊆ β H such that G y β G and H y Ỹ are Kakutani equivalent. - There is an open, dense, H-invariant subspace Ỹ ⊆ β H such that there is a continuous orbit couple for G y β G and H y Ỹ . - There is an open, dense, H-invariant subspace Ỹ ⊆ β H such that G y β G and H y Ỹ are stably continuously orbit equivalent. (ii) There is a coarse equivalence G → H if and only if Ỹ = β H works in the statements in (i). (iii) There is a bijective coarse equivalence G → H if and only if G y β G and H y β H are continuously orbit equivalent. Proof. (i): Let ϕ : G → H be a coarse embedding. Let Y and X be as in Lemma 2.20. As the restriction of ϕ to X is a bijection onto Y , Proposition 2.19Syields that G y β X and H y β Y are continuously orbit equivalent. As there is finite subset F ⊆ G with G = g∈F gX , we have β G = G.β X . Let Ỹ := H.β Y . Then G y β G and H y Ỹ are Kakutani equivalent. Ỹ is H-invariant by construction, and it is easy to see that Ỹ is open and dense. Now (i) follows from Theorem 2.17, Theorem 2.16 and Remark 2.18. (ii): AScoarse embedding ϕ : G → H is coarsely invertible if and only if there is a finite subset F ⊆ H such that H = h∈F hϕ (G). This happens if and only if in the proof of (i), we get Ỹ = β H. (iii): If ϕ : G → H is a bijective coarse equivalence, then we can take X = G, Y = H in the above proof of (i) and obtain that G y β G and H y β H are continuously orbit equivalent. The reverse implication “⇐” in (ii) is proven in Theorem 2.17.  Remark 2.22. In combination with [44], Corollary 2.21 implies that nuclear Roe algebras have distinguished Cartan subalgebras, as explained in [28]. Remark 2.23. Corollary 2.21 shows that quasi-isometry rigidity can be interpreted as a special case of continuous orbit equivalence rigidity (in the sense of [26]), applied to actions on Stone-Čech compactifications. This points towards an interesting connection between these two types of rigidity phenomena and would be worth exploring further. 3. A PPLICATIONS TO ( CO ) HOMOLOGY I We now show how the results in [43, 41] on coarse invariance of (co)homological dimensions and property HFD follow from Morita invariance of groupoid (co)homology. Let us first define groupoid (co)homology. We do this in a concrete and elementary way which is good enough for our purposes. We refer to [11] for a more general and more conceptual approach, and for more information about groupoids. Let G be an étale locally compact groupoid with unit space X = G (0) , and R a commutative ring with unit. A G -sheaf of R-modules is a sheaf A of R-modules over X , i.e., we have a locally compact space A with an étale continuous surjection π : A ։ X whose fibres are R-modules, together with the structure of a right G -space on A . In particular, ever γ ∈ G induces an isomorphism of R-modules Ar(γ ) → As(γ ) , a 7→ a ∗ γ . To pass from right to left actions, we write γ .a := a ∗ γ −1 if π (a) = s(γ ). Let G (n) = {(γ1 , . . . , γn ) ∈ G n : s(γi ) = r(γi+1 ) for all 1 ≤ i ≤ n − 1}, and set r(γ1 , . . . , γn ) = r(γ1 ). We write ~γ for elements in G (n) . Given a G -sheaf of R-modules A with projection π : A ։ X , let Γc (G (n) , A ) be the R-module of continuous functions f : G (n) → A with compact support such that π ( f (~γ )) = r(~γ ). Now we dn+1 dn−1 d d d n 2 1 define a chain complex . . . −→ Γc (G (n) , A ) −→ Γc (G (n−1) , A ) −→ . . . −→ Γc (G , A ) −→ Γc (X , A ) → 0, (i) −1 with d1 ( f )(x) = ∑ γ ∈G γ . f (γ ) − ∑ γ ∈G f (γ ) for f ∈ Γc (G , A ), and for n ≥ 1: dn ( f ) = ∑ni=0 (−1)i dn ( f ) s(γ )=x r(γ )=x 9 for f ∈ Γc (G (n) , A ), where (0) dn ( f )(γ1 , . . . , γn−1 ) = γ0−1 . f (γ0 , γ1 , . . . , γn−1 ), ∑ γ0 ∈G s(γ0 )=r(γ1 ) (i) dn ( f )(γ1 , . . . , γn−1 ) = ∑ f (. . . , γi−1 , η , ξ , γi+1 , . . . ) for 1 ≤ i ≤ n − 1, η ,ξ ∈G ηξ =γi (n) dn ( f )(γ1 , . . . , γn−1 ) = ∑ f (γ1 , . . . , γn−1 , γn ). γn ∈G r(γn )=s(γn−1 ) We then define the n-th homology group Hn (G , A ) := ker (dn )/im (dn+1 ). In the case R = Z and where A is a constant sheaf with trivial G -action, we recover [30, Definition 3.1]. Let us also introduce cohomology. Let G , R and A be as above, and let Γ(G (n) , A ) be the R-module of d0 continuous functions f : G (n) → A with π ( f (~γ )) = r(~γ ). We define a cochain complex 0 → Γ(X , A ) −→ d1 d n−1 dn d n+1 Γ(G , A ) −→ . . . −→ Γ(G (n) , A ) −→ Γ(G (n+1) , A ) −→ . . . with d 0 ( f )(γ ) = γ . f (s(γ ))− f (r(γ )), and for n ≥ 1: i n d n ( f ) = ∑n+1 i=0 (−1) d(i) ( f ), where n d(0) ( f )(γ0 , . . . , γn ) = γ0 . f (γ1 , . . . , γn ); n d(i) ( f )(γ0 , . . . , γn ) = f (γ0 , . . . , γi−1 γi , . . . , γn ) for 1 ≤ i ≤ n; n d(n+1) ( f )(γ0 , . . . , γn ) = f (γ0 , . . . , γn−1 ). We set H n (G , A ) := ker (d n )/im (d n−1 ). Now let G y X be a topological dynamical system. For notational purposes, and to keep the conventions in the literature, let us pass to the right action X x G, x.g = g−1 .x, and consider the corresponding transformation groupoid X ⋊ G with source and range maps given by s(x, g) = x.g, r(x, g) = x. We note that the transformation groupoid G ⋉ X attached to the original action, as in [26, 27], is isomorphic to X ⋊ G via G ⋉ X → X ⋊ G, (g, x) 7→ (g.x, g). It is easy to see that a (X ⋊ G)-sheaf of R-modules is nothing else but a sheaf A of Rmodules over X , π : A ։ X , together with a left G-action on A via homeomorphisms (denoted by G × A → A , (g, a) 7→ g.a) such that π becomes G-equivariant, and Ax → Ag.x , a 7→ g.a is an isomorphism of R-modules. We call these G-sheaves of R-modules over X . 3.1. Isomorphisms in homology and cohomology. First of all, let us prove Theorem 3.1. Let G y X and H y Y be topologically free systems, where G and H are countable discrete groups. Suppose that G y X and H y Y are Kakutani equivalent. Then there is an equivalence of categories between G-sheaves of R-modules over X and H-sheaves of R-modules over Y , denoted by SX 7→ SY on the level of objects, such that H∗ (G, Γc (X , SX )) ∼ = H∗ (H, Γc (Y, SY )) and H ∗ (G, Γ(X , SX )) ∼ = H ∗ (H, Γ(Y, SY )). Here Γ stands for continuous sections and Γc for those with compact support. Proof. It is easy to see that H∗ (G, Γc (X , A )) ∼ = H ∗ (X ⋊ G, A ) for topo= H∗ (X ⋊ G, A ) and H ∗ (G, Γ(X , A )) ∼ logical dynamical systems G y X and G-sheaves A of R-modules over X . Now, by assumption, there are clopen subspaces A ⊆ X and B ⊆ Y with X = G.A, Y = H.B and an isomorphism of topological groupoids χ : (X ⋊ G)|A ∼ = (Y ⋊ H)|B. Let ιA : (X ⋊ G)|A ֒→ X ⋊ G and ιB : (Y ⋊ H)|B ֒→ Y ⋊ H be the canonical inclusions. As A is G-full and B is H-full, ιA and ιB induce equivalences of categories of sheaves. So we obtain an equivalence of categories between G-sheaves of R-modules over X and H-sheaves of R-modules over Y , denoted by SX 7→ SY on the level of objects, such that SY is uniquely determined by  χ ∗ (SY |B) = SX |A. Our theorem now follows from Morita invariance of groupoid (co)homology.  For every topological dynamical system G y X , we have sup n: Hn (G, Γc (X , A )) ≇ {0} ≤ hdR (G) and sup n: H n (G, Γ(X , A )) ≇ {0} ≤ cdR (G) by the definitions of homological and cohomological dimensions. Here the suprema are taken over all G-sheaves A of R-modules over X .  Definition 3.2. A (G, H) continuous orbit couple is called H∗,R G-full if sup n: Hn (G, Γc (X , A )) ≇ {0} = hdR (G) holds for its topological dynamical system G y X . It is called H ∗,R G-full if its topological dynamical  system G y X satisfies sup n: H n (G, Γ(X , A )) ≇ {0} = cdR (G). 10 The following is an immediate consequence of Theorem 3.1. Corollary 3.3. If there exists an H∗,R G-full topologically free (G, H) continuous orbit couple, then hdR (G) ≤ hdR (H). If there exists an H ∗,R G-full topologically free (G, H) continuous orbit couple, then cdR (G) ≤ cdR (H). Remark 3.4. Together with Theorem 2.17, Corollary 3.3 can be viewed as an explanation and generalization of the results in [43, 41] concerning coarse invariance of (co)homological dimension. In our terminology, the conditions from [43, 41] that the topological dynamical system G y X of a (G, H) continuous orbit couple admits a G-invariant probability measure and Q ⊆ R ensure that the (G, H) continuous orbit couple is H∗,R G-full and H ∗,R G-full (see [43, § 3.3] and [41, § 4]). Existence of a G-invariant probability measure is guaranteed if G is amenable and the G-space of our continuous orbit couple is compact. Moreover, again in our terminology, it is shown in [41, § 4] that a (G, H) continuous orbit couple with compact G-space is H∗,R G-full if hdR (G) < ∞ and H ∗,R G-full if cdR (G) < ∞. Once we know this, [43, Theorem 1.5] and [41, Theorem 1.2] are immediate consequences of Theorem 2.17 and Corollary 3.3. In § 4.4, we present an alternative approach to these results. 3.2. Isomorphisms in reduced cohomology. Let G be an étale locally compact groupoid and L = (µ , H , L) a (unitary) representation of G as in [39, Chapter II, Definition 1.6]. Here µ is a quasi-invariant measure on G (0) , H a Hilbert bundle over (G (0) , µ ), and L a representation of G , i.e., for each γ ∈ G , L(γ ) is a unitary Hs(γ ) ∼ = Hr(γ ) , and the conditions in [39, Chapter II, Definition 1.6] are satisfied (σ in [39, Chapter II, Definition 1.6] is the trivial cocycle in our case). Let D be the modular function attached to µ , as in [39, Chapter I, Definition 3.4]. In particular, we are interested in the case G = X ⋊ G of a transformation groupoid attached to a topological dynamical system G y X on a compact space X . A representation L of X ⋊ G gives rise – through its integrated form – to a *-representation of C(X ) ⋊ G, which in turn corresponds in a one-to-one way to a covariant representation (πL , σL ) of G y X (or rather of (C(X ), G)). Now let G = X ⋊ G be as above and L a representation of G . We define cohomology groups H n (G , L) and reduced cohomology groups H̄ n (G , L) with coefficients in L. Let us write L = (µ , H , L). Let G (n) = {(γ1 , . . . , γn ) ∈ G n : s(γi ) = r(γi+1 ) for all 1 ≤ i ≤ n − 1}, and set r(γ1 , . . . , γn ) = r(γ1 ). We will write ~γ for elements in G (n) . Let Γ(G (n) , H ) be the set of all Borel functions f : G (n) → H with f (~γ ) ∈ Hr(~γ ) such that R for every compact subset K ⊆ G (n) , G (0) ∑ ~γ ∈K k f (~γ )k2 d µ (x) < ∞, divided by the equivalence relation sayr(~γ )=x ing that f1 ∼ f2 if for every compact subset K ⊆ G (n) , R γ ) − f2 (~γ )k G (0) ∑ ~γ ∈K k f1 (~ r(~γ )=x 2 d µ (x) = 0. The topology on Γ(G (n) , H ) is given by the following notion of convergence: A net ( fi )i converges to an element f in R Γ(G (n) , H ) if for every compact subset K ⊆ G (0) , limi→∞ G (0) ∑ ~γ ∈K k f (~γ ) − fi (~γ )k2 d µ (x) = 0. We define r(~γ )=x d0 d1 1 a cochain complex 0 → Γ(G (0) , H ) −→ Γ(G (1) , H ) −→ . . . with d 0 ( f )(γ ) = D− 2 (γ )L(γ ) f (s(γ )) − f (r(γ )), i n and for n ≥ 1: d n = ∑n+1 i=0 (−1) d(i) , where 1 n d(0) ( f )(γ0 , . . . , γn ) = D− 2 (γ0 )L(γ0 ) f (γ1 , . . . , γn ); n d(i) ( f )(γ0 , . . . , γn ) = f (γ0 , . . . , γi−1 γi , . . . , γn ) for 1 ≤ i ≤ n; n ( f )(γ0 , . . . , γn ) = f (γ0 , . . . , γn−1 ). δ(n+1) It is easy to check that d n ◦d n−1 = 0 for all n ≥ 1. Thus im (d n−1 ) ⊆ ker (d n ). Since all the d n are continuous, we also have im (d n−1 ) ⊆ ker (d n ). We set H n (G , L) := ker (d n )/im (d n−1 ) and H̄ n (G , L) := ker (d n )/im (d n−1 ). Our goal is to prove the following Theorem 3.5. Suppose there is a continuous orbit couple for topological dynamical systems G y X and H y Y on compact spaces X and Y . Then there is a one-to-one correspondence between representations of X ⋊ G and Y ⋊ H, denoted by L ↔ M, with H ∗ (G, σL ) ∼ = H ∗ (H, σM ) and H̄ ∗ (G, σL ) ∼ = H̄ ∗ (H, σM ). For the definition of reduced cohomology H̄ ∗ , we refer to [21, Chapitre III]. Proof. Clearly, H ∗ (X ⋊ G, L) ∼ = H ∗ (G, σL ) and H̄ ∗ (X ⋊ G, L) ∼ = H̄ ∗ (G, σL ). Now, if there is a continuous orbit couple for topological dynamical systems G y X and H y Y on compact spaces X and Y , then by Theorem 2.16, G y X and H y Y are Kakutani equivalent. So there exist clopen subspaces A ⊆ X and B ⊆ Y with G.A = X , H.B = Y , together with an isomorphism of topological groupoids 11 χ : (X ⋊ G)|A ∼ = (Y ⋊ H)|B. As A is G-full and B is H-full, we get one-to-one correspondences L ↔ L|A and M ↔ M|B between representations of X ⋊ G and (X ⋊ G)|A, and between representations of Y ⋊ H and (Y ⋊ H)|B, respectively. Thus we obtain a one-to-one correspondence between representations of X ⋊ G and Y ⋊ H, denoted by L ↔ M, where M is uniquely determined by χ ∗ (M|B) = L|A. The theorem now follows from Morita invariance of groupoid (co)homology.  Remark 3.6. If the topological dynamical system G y X is on a second countable space X , then every *representation of Cc (X ⋊ G) on a Hilbert space is the integrated form of a representation of X ⋊ G. Actually, *-representations of Cc (X ⋊ G) and representations of X ⋊ G are in one-to-one correspondence (see [39, Chapter II, Theorem 1.21 and Corollary 1.23]). Thus we obtain a reformulation of Theorem 3.5: Suppose there is a continuous orbit couple for topological dynamical systems G y X and H y Y on second countable compact spaces X and Y . By Theorem 2.16, G y X and H y Y are Kakutani equivalent, so there exist clopen subspaces A ⊆ X and B ⊆ Y with G.A = X , H.B = Y , together with an isomorphism of topological groupoids χ : (X ⋊ G)|A ∼ = C∗ ((Y ⋊ H)|B) be the corresponding isomor= (Y ⋊ H)|B. Let Φ : C∗ ((X ⋊ G)|A) ∼ phism of groupoid C*-algebras. Then the one-to-one correspondence L ↔ M from Theorem 3.5 translates to a one-to-one correspondence (π , σ ) ↔ (ρ , τ ) between covariant representations of G y X and H y Y, where (ρ , τ ) is uniquely determined (up to unitary equivalence) by the requirement that ρ ⋊ τ |C∗ ((Y ⋊H)|B) ◦ Φ = π ⋊ σ |C∗ ((X⋊G)|A) . Here we view C∗ ((Y ⋊ H)|B) and C∗ ((X ⋊ G)|A) as full corners in C(Y ) ⋊ H and C(X ) ⋊ G. We write (ρ , τ ) = Ind Φ−1 (π , σ ) and (π , σ ) = Ind Φ (ρ , τ ). Corollary 3.7. Let G y X and H y Y be topological dynamical systems on second countable compact spaces X and Y , and assume that there is a continuous orbit couple for G y X and H y Y . Let (π , σ ) ↔ (ρ , τ ) be as in Remark 3.6. Then we have H ∗ (G, σ ) ∼ = H ∗ (H, τ ) and H̄ ∗ (G, σ ) ∼ = H̄ ∗ (H, τ ). Remark 3.8. Theorem 3.5 and Corollary 3.7 have natural analogues in homology, i.e., for H∗ and H̄∗ . 3.3. Coarse invariance of property HFD . As a consequence of Theorem 3.5, we discuss coarse invariance of Shalom’s property HFD from [43]. In this section (§ 3.3), we assume that our spaces are second countable. Let us start with the following Lemma 3.9. Let G y Ȳ ΩX̄ x H be a topological coupling, let α and β be as in § 2.2.1, let G y Ȳ , H y X̄ be the actions given by g.x = gxα (g, x)−1 , h.y = β (y, h−1 )−1 xh−1 , and let X̄ ⋊ G, Ȳ ⋊ H be the corresponding transformation groupoids. Then X̄ ⋊ G → (Ω ⋊ (G × H))|X̄, (x, g) 7→ (x, g, α (g−1 , x)−1 ) Ȳ ⋊ H → (Ω ⋊ (G × H))|Ȳ , (y, h) 7→ (y, β (y, h), h) are isomorphisms of topological groupoids. Proof. As r(x, g) = x = r(x, g, α (g−1 , x)−1 ), s(x, g) = x.g = g−1 .x = g−1 xα (g−1 , x)−1 = s(x, g, α (g−1 , x)−1 ) and (x, g, α (g−1 , x)−1 )(g−1 xα (g−1 , x)−1 , ḡ, α (ḡ−1 , g−1 xα (g−1 , x)−1 )−1 ) = (x, gḡ, α ((gḡ)−1 , x)−1 ), X̄ ⋊ G → (Ω ⋊ (G × H))|X̄, (x, g) 7→ (x, g, α (g−1 , x)−1 ) is a groupoid homomorphism. It is clearly continuous, and (Ω ⋊ (G × H))|X̄ → X̄ ⋊ G, (x, g, h) 7→ (x, g) is its continuous inverse. The proof of the second claim is analogous.  Given a topologically free (G, H) continuous orbit couple which corresponds to the (G, H) coupling G y x H with compact X and Y , the proof of Theorem 2.17 provides a concrete way to construct Kakutani equivalent dynamical systems G y X and H y Y together with clopen subspaces A ⊆ X and B ⊆ Y such that (X ⋊ G)|A ∼ = (Y ⋊ H)|B. We need the following Y ΩX Lemma 3.10. We can modify our (G, H) continuous orbit couple above, without changing its topological dynamical system G y X , so that the described process yields a topological coupling and subspaces A, B with A = B as subspaces of Ω. Proof. In the proof of Theorem 2.16, we had constructed A and B as disjoint unions A = g Ag and B = g Bg . Following the construction of the continuous orbit couple out of our topological coupling in § 2.2.1, we see that these subspaces Ag and Bg were related by gAg = Bg in Ω. Set Y ′ := (Y \ B) ⊔ A. Then X and Y ′ are still fundamental domains for the H- and G-actions on Ω. So we obtain a new topologically free (G, H) coupling G y Y ′ ΩX x H. The construction in § 2.2.1 yields a continuous orbit couple with new continuous orbit map p′ : X → Y ′ satisfying p′ (X ) = A. Hence our construction in the proof of Theorem 2.16 gives us the subspaces A ⊆ X and A ⊆ Y ′ implementing the Kakutani equivalence between G y X and H y Y ′ .  F F Let G y Y ΩX x H and G y X , H y Y be as above, with a clopen subspace A ⊆ X ∩ Y such that G.A = X , H.A = Y and (X ⋊ G)|A ∼ = (Y ⋊ H)|A. Let Φ : C∗ ((X ⋊ G)|A) ∼ = C∗ ((Y ⋊ H)|A) be the induced C*isomorphism. Lemma 3.9 yields an isomorphism of C*-algebras C(X ) ⋊ G ∼ = 1X (C0 (Ω) ⋊ (G × H))1X , and 12 1X is a full projection. Therefore, C(X ) ⋊ G is Morita equivalent to C0 (Ω) ⋊ (G × H), and a C(X ) ⋊ G − C0 (Ω) ⋊ (G × H)-imprimitivity bimodule is given by X = 1X (C0 (Ω) ⋊ (G × H)) (with respect to the identification C(X ) ⋊ G ∼ = 1X (C0 (Ω) ⋊ (G × H))1X provided by Lemma 3.9). We obtain (up to unitary equivalence) bijections between representations of C(X ) ⋊ G and representations of C0 (Ω) ⋊ (G × H) and also between covariant representations of G y X and G × H y Ω. We denote both of them by Ind X . Also, let Y be the C(Y ) ⋊ H −C0 (Ω) ⋊ (G × H)-imprimitivity bimodule given by 1Y (C0 (Ω) ⋊ (G × H)) with respect to the identification C(Y ) ⋊ H ∼ = 1Y (C0 (Ω) ⋊ (G × H))1Y provided by Lemma 3.9. We define Ind Y similarly as Ind X . Now we have two ways to go from covariant representations of G y X to covariant representations of H y Y : Ind Φ−1 introduced in Remark 3.6, and Ind −1 Y Ind X . It turns out that they coincide. −1 Proposition 3.11. In the situation described above, Ind Y Ind X (π , σ ) is unitarily equivalent to Ind Φ−1 (π , σ ) for every covariant representation (π , σ ) of G y X . ′ ′ X ∗ Proof. Let Ind Φ−1 (π , σ ) = (ρ , τ ), and let Ind −1 Y Ind X (π , σ ) = (ρ , τ ). Let i : C ((X ⋊ G)|A) ֒→ C(X ) ⋊ G and iY : C∗ ((Y ⋊ H)|A) ֒→ C(Y ) ⋊ H be the canonical embeddings. Also, let iX : C(X ) ⋊ G ֒→ C0 (Ω) ⋊ (G × H) and iY : C(Y ) ⋊ H ֒→ C0 (Ω) ⋊ (G × H) be the embeddings obtained with the help of Lemma 3.9. Then (ρ , τ ) is uniquely determined by (π ⋊ σ ) ◦ iX ◦ Φ−1 ∼u (ρ ⋊ τ ) ◦ iY . We want to show that ρ ′ ⋊ τ ′ has the same property. (ρ ′ , τ ′ ) is uniquely determined by the existence of a representation Π of C0 (Ω) ⋊ (G × H) with Π ◦ iX ∼u π ⋊ σ and Π ◦ iY ∼u ρ ′ ⋊ τ ′ . Hence (ρ ′ ⋊ τ ′ ) ◦ iY ∼u Π ◦ iY ◦ iY . On the groupoid level, iY ◦ iY is given by Y ⋊ H|B → Y ⋊ H → Ω ⋊ (G × H), (y, h) 7→ (y, β (y, h), h), where β is defined in § 2.2.1. At the same time, iX ◦ iX ◦ Φ−1 on the groupoid level is given by (Y ⋊ H)|B → (X ⋊ G)|A → X ⋊ G → Ω ⋊ (G × H) (y, h) 7→ (y, b(h−1 , y)−1 ) 7→ (y, b(h−1 , y)−1 , α (b(h−1 , y), y)−1 ), where b comes from the groupoid isomorphism (X ⋊ G)|A ∼ = (Y ⋊ H)|A (see Remark 2.15 and [27, Definition 2.6]) and α is defined in § 2.2.1. We have α (b(h−1 , y), y) = h−1 by [26, Lemma 2.10] (or rather its analogue for partial actions). Hence iY ◦ iY = iX ◦ iX ◦ Φ−1 , so that (ρ ′ ⋊ τ ′ ) ◦ iY ∼u Π ◦ iY ◦ iY = Π ◦ iX ◦ iX ◦ Φ−1 ∼u (π ⋊ σ ) ◦ iX ◦ Φ−1 . Our claim follows.  Let G y Y ΩX x H and G y X , H y Y be as above. Let A ⊆ X ∩Y be a clopen subspace with G.A = X , H.A = Y and (X ⋊ G)|A ∼ = (Y ⋊ H)|A. Let Φ : C∗ ((X ⋊ G)|A) ∼ = C∗ ((Y ⋊ H)|A) be the induced C*-isomorphism. Let Π = X G (Π , Π ) be a covariant representation of G y X on the Hilbert space H . Let σ be a unitary representation of G on Hσ . It is clear that (1 ⊗ ΠX , σ ⊗ ΠG ) is a covariant representation of G y X on Hσ ⊗ H . Let Ind Φ−1 (σ , Π) be the unitary representation of H which is part of the covariant representation Ind Φ−1 (1 ⊗ ΠX , σ ⊗ ΠG ). Moreover, let τ be a unitary representation of H on Hτ . Let Θ = (ΘY , ΘH ) = Ind Φ−1 (ΠX , ΠG ). Denote by Ind Φ (Θ, τ ) the unitary representation of G which is part of the covariant representation Ind Φ (ΘY ⊗ 1, ΘH ⊗ τ ). Lemma 3.12. (1 ⊗ ΠX ⊗ 1, σ ⊗ Ind Φ (Θ, τ )) = Ind Φ (1 ⊗ ΘY ⊗ 1, Ind Φ−1 (σ , Π) ⊗ τ ). Proof. We have to show that (1 ⊗ ΠX ⊗ 1) ⋊ (σ ⊗ Ind Φ (Θ, τ ))|C∗ ((X⋊G)|A) = (1 ⊗ ΘY ⊗ 1) ⋊ (Ind Φ−1 (σ , Π) ⊗ τ )|C∗ ((Y ⋊H)|B) ◦ Φ. Fix g ∈ G and h ∈ H. Let f be the characteristic function of a compact subset of (X × {g}) ∩ (X ⋊ G)|A whose image under χ lies in (Y × {h}) ∩ (Y ⋊ H)|B. It suffices to consider such f as they span a dense subset in C∗ ((X ⋊ G)|A). We have (1 ⊗ ΘY ⊗ 1) ⋊ (Ind Φ−1 (σ , Π) ⊗ τ )(Φ( f )) = ((1 ⊗ ΘY ) ⋊ Ind Φ−1 (σ , Π))(Φ( f )) ⊗ τ (h) = ((1 ⊗ ΠX ) ⋊ (σ ⊗ ΠG )( f )) ⊗ τ (h) = σ (g) ⊗ Π( f ) ⊗ τ (h) = σ (g) ⊗ (Θ(Φ( f )) ⊗ τ (h)) = σ (g) ⊗ ((ΠX ⊗ 1) ⋊ Ind Φ (Θ, τ )( f )) = (1 ⊗ ΠX ⊗ 1) ⋊ (σ ⊗ Ind Φ (Θ, τ ))( f ).  Let Λ be a representation of C(X ) ⋊ G, and set Λ̃ := Ind X Λ. Let  HΛ̃,c := η ∈ HΛ̃ : η = Λ̃(1K )η for some compact K ⊆ Ω , and let L be the complex vector space of linear maps HΛ̃,c → C which are bounded whenever restricted to a subspace of the form Λ̃(1K )HΛ̃ , with K ⊆ Ω compact. Moreover, let ΛG be the unitary representation of G on HΛ induced by Λ, and denote by Λ̃G and Λ̃H the unitary representations of G and H on HΛ̃ induced by Λ̃. As HΛ̃,c is obviously invariant under the G- and H-actions, we obtain by restriction G- and H-actions on HΛ̃,c . Finally, by dualizing, we obtain G- and H-actions on L . 13 Lemma 3.13. There is a G-equivariant linear isomorphism HΛ ∼ = L H. Proof. Up to unitary equivalence, we have HΛ = Λ̃(1X̄ )HΛ̃ , and ΛG is given by the composite  Λ̃ G ֒→ C(X ) ⋊ G ∼ = 1X̄ C0 (Ω) ⋊ (G × H)1X̄ −→ L Λ̃(1X̄ )HΛ̃ , where the first map is given by G ֒→ C(X ) ⋊ G, g 7→ ug . We define L : HΛ → L by setting L(ξ )(η ) = ∑h∈H Λ̃H (h)ξ , η . Here h·, ·i is the inner product in HΛ̃ , and our convention is that it is linear in the second component. Note that in the definition of L(ξ )(η ), the sum is always finite since η lies in HΛ̃,c . It is clear that L is linear. Moreover, we have L(ξ )(Λ̃H (h′ )η ) = ∑ Λ̃H (h)ξ , Λ̃H (h′ )η = ∑ Λ̃H ((h′ )−1 h)ξ , η = L(ξ )(η ). h h L H, Therefore, the image of L lies in and we obtain a linear map HΛ → L H . We claim that the inverse is given by R : L H → HΛ∗ ∼ = HΛ , where the first map is given by restriction, l 7→ l|Λ̃(1X̄ )HΛ̃ , and the second map is the canonical isomorphism, identifying ζ ∈ HΛ with the element hζ , ·i ∈ HΛ∗ . Note that l|Λ̃(1X̄ )H is bounded Λ̃ because of our definition of HΛ̃,c . Let us show that R is the inverse of L. For l ∈ L H , we have L(R(l))(η ) = ∑ Λ̃H (h)R(l), η = ∑ R(l), Λ̃H (h−1 )η = ∑ l(Λ̃(1X̄ )Λ̃H (h−1 )η ) h H H h −1 h = ∑ l(Λ̃ (h)Λ̃(1X̄ )Λ̃ (h )η ) = ∑ l(Λ̃(1X̄ h η ) = l(η ). h h For ξ ∈ HΛ = Λ̃(1X̄ )HΛ̃ , we have R(L(ξ )) = ξ since L(ξ )(Λ̃(1X̄ )η ) = ∑ Λ̃H (h)ξ , Λ̃(1X̄ )η = ∑ Λ̃H (h)Λ̃(1X̄ h )ξ , η = hξ , η i h h because Λ̃(1X̄ h )ξ = ξ if h = e and Λ̃(1X̄ h )ξ = 0 if h 6= e. Finally, let us show that L is G-equivariant: L(ΛG (g)ξ )(η ) = ∑ Λ̃H (h)(ΛG (g)ξ ), η = ∑ ∑ Λ̃H (h)Λ̃(1g X̄ j−1 ∩X̄ )Λ̃G (g)Λ̃H ( j)ξ , η h h j −1 = ∑ Λ̃ (h)Λ̃ ( j) Λ̃(1g X̄ j−1 ∩X̄ )Λ̃H ( j)Λ̃G (g)ξ , η H H h, j = ∑ Λ̃H (h)Λ̃(1g X̄ ∩X̄ j )Λ̃G (g)ξ , η = ∑ Λ̃H (h)Λ̃(1g X̄ )Λ̃G (g)ξ , η h h, j = ∑ Λ̃ (g)Λ̃ (h)Λ̃(1X̄ )ξ , η = ∑ Λ̃H (h)ξ , Λ̃G (g)−1 η = L(ξ )(Λ̃G (g)−1 η ). G H  h h  Corollary 3.14. We have ΛG -invariant vectors = HΛG ∼ = L G×H . Theorem 3.15. There exists a one-to-one correspondence between (Ind Φ−1 (σ , Π) ⊗ τ )-invariant vectors and (σ ⊗ Ind Φ (Θ, τ ))-invariant vectors. Proof. Obviously, (1 ⊗ ΠX ⊗ 1, σ ⊗ Ind Φ (Θ, τ )) is a covariant representation of G y X . Let Λ := (1 ⊗ Π ⊗ 1) ⋊ (σ ⊗ Ind Φ (Θ, τ )). Set Λ̃ := Ind X Λ, and define L as in Lemma 3.13. Then Corollary 3.14 yields a one-to-one correspondence between (σ ⊗ Ind Φ (Θ, τ ))-invariant vectors and L G×H . Let Ind Φ−1 Λ be the representation of C(Y ) ⋊ H corresponding to Ind Φ−1 (1 ⊗ ΠX ⊗ 1, σ ⊗ Ind Φ (Θ, τ )). By Proposition 3.11, Ind Y Ind Φ−1 Λ ∼u Λ̃. Hence, together with Lemma 3.12, Corollary 3.14 yields a one-to-one correspondence between (Ind Φ−1 (σ , Π) ⊗ τ )-invariant vectors and L G×H . 1-1 1-1 Thus {(Ind Φ−1 (σ , Π) ⊗ τ )-invariant vectors} ←→ L G×H ←→ {(σ ⊗ Ind Φ (Θ, τ ))-invariant vectors}.  Corollary 3.16. Ind Φ−1 (σ , Π) ⊗ τ has an invariant vector if and only if σ ⊗ Ind Φ (Θ, τ ) has an invariant vector. We now come to Shalom’s property HFD . Recall that a group G has HFD if for every unitary representation σ of G, H̄ 1 (G, σ ) ≇ {0} implies that σ contains a finite dimensional subrepresentation. Definition 3.17. A (G, H) continuous orbit couple is called H̄ 1 G-faithful if its G- and H-spaces are second countable compact, and its topological dynamical system G y X has the property that for every unitary representation σ of G with H̄ 1 (G, σ ) ≇ {0}, there exists a covariant representation (ΠX , ΠG ) of G y X such that H̄ 1 (G, σ ⊗ ΠG ) ≇ {0}. Theorem 3.18. Let G, H be countable discrete groups. Suppose there exists an H̄ 1 G-faithful topologically free (G, H) continuous orbit couple. If H has property HFD , then G has property HFD . 14 For the proof, let us recall the following observation which is explained in [43, § 3.1]: Lemma 3.19. A unitary representation σ of a countable discrete group G contains a finite dimensional subrepresentation if and only if there is a unitary representation σ ′ of G such that σ ⊗ σ ′ has an invariant vector. Proof of Theorem 3.18. By Lemma 3.10, we may assume that our H̄ 1 G-faithful topologically free (G, H) continuous orbit couple corresponds to a topologically free (G, H) coupling G y Y ΩX x H with second countable compact spaces X and Y , which leads to topological dynamical systems G y X and H y Y together with a clopen subspace A ⊆ X ∩Y with G.A = X , H.A = Y and (X ⋊ G)|A ∼ = (Y ⋊ H)|A. Now let σ be a unitary representation of G with H̄ 1 (G, σ ) ≇ {0}. By H̄ 1 G-faithfulness, there exists a covariant representation (ΠX , ΠG ) of G y X with H̄ 1 (G, σ ⊗ ΠG ) ≇ {0}. By Corollary 3.7, H̄ 1 (H, Ind Φ−1 (σ , Π)) ∼ = H̄ 1 (G, σ ⊗ ΠG ), so that 1 H̄ (H, Ind Φ−1 (σ , Π)) ≇ {0}. As H has property HFD , Ind Φ−1 (σ , Π) must have a finite dimensional subrepresentation. Thus Lemma 3.19 implies that there is a unitary representation τ of H such that Ind Φ−1 (σ , Π)⊗ τ has an invariant vector. By Corollary 3.16, σ ⊗ Ind Φ (Θ, τ ) must have an invariant vector. Again by Lemma 3.19,  this implies that σ has a finite dimensional subrepresentation. Hence G has property HFD . Remark 3.20. A (G, H) continuous orbit couple with second countable compact G- and H-spaces is H̄ 1 Gfaithful if its topological dynamical system G y X admits a G-invariant probability measure. To see this, let µ be such a measure. Let (ΠX , ΠG ) be the canonical covariant representation of G y X on L2 (µ ). Then ΠG contains the trivial representation, so that σ ⊗ ΠG contains σ . This shows H̄ 1 G-faithfulness. In particular, this is the case when G is amenable. Therefore, Theorem 2.17 and Theorem 3.18 imply [43, Theorem 4.3.3]. The case of amenable groups is not the only situation where invariant probability measures exist. It follows easily from [12] and Theorem 2.17 that for residually finite groups G and H with coarsely equivalent box spaces, there exists a (G, H) continuous orbit couple with second countable compact G- and H-spaces such that its topological dynamical system G y X admits a G-invariant probability measure. A similar statement applies to sofic groups with coarsely equivalent spaces of graphs (see [1]). 4. A PPLICATIONS TO ( CO ) HOMOLOGY II We now turn to coarse invariants of (co)homological nature. 4.1. Coarse maps and res-invariant modules. Let G be a group, R a commutative ring with unit and W an R-module. Let C(G,W ) be the set of functions from G to W . The G-action on itself by left multiplication induces a canonical left RG-module structure on C(G,W ). Explicitly, given g ∈ G and f ∈ C(G,W ), g. f is the element in C(G,W ) given by (g. f )(x) = f (g−1 x) for all x ∈ G. We are interested in the following class of RG-submodules of C(G,W ). Given a subset A of G, let 1A be its indicator function, i.e., 1A ∈ C(G, R) is given by 1A (x) = 1 if x ∈ A and 1A (x) = 0 if x ∈ / A. Here 1 is the unit of R. Given f ∈ C(G,W ) and A ⊆ G, we form the pointwise product 1A · f ∈ C(G,W ). This is nothing else but the restriction of f to A, extended by 0 outside of A to give a function G → W . Definition 4.1. An RG-submodule L ⊆ C(G,W ) is called res-invariant if 1A · f lies in L for all f ∈ L and A ⊆ G. Examples 4.2. For arbitrary R and W , C(G,W ), C f (G,W ) = { f ∈ C(G,W ): f takes finitely many values} and RG ⊗R W ∼ = { f ∈ C(G,W ): supp( f ) is finite} are res-invariant. If R = R or R = C, W = R, then c0 (G,W ) = { f ∈ C(G,W ): limx→∞ | f (x)| = 0} is res-invariant, and for all 0 < p ≤ ∞, ℓ p (G,W ) = { f ∈ C(G,W ): ∑x∈G | f (x)| p < ∞} is res-invariant. Let G be a finitely generated discrete group and ℓ the right-invariant word length coming from a finite symmetric set of generators. Let R = R or R = C and W = R. As in [22], we define for s ∈ R and 1 ≤ p ≤ ∞ T the Sobolev space H s,p (G,W ) := { f : G → W : f · (1 + ℓ)s ∈ ℓ p (G,W )}, and H ∞,p (G,W ) := s∈R H s,p (G,W ). All these Sobolev spaces are res-invariant. In the last examples (ℓ p , c0 and H s,p ), we can also replace W by any normed space over R. We are also interested in the following topological setting: Let R be a topological field and W an R-module. Definition 4.3. A topological res-invariant RG-submodule L of C(G,W ) is a res-invariant RG-submodule of C(G,W ) together with the structure of a topological R-vector space on L such that (2) (3) for every A ⊆ G, L → L, f 7→ 1A · f is continuous, for every g ∈ G, L → L, f 7→ g. f is continuous. 15 When we consider topological res-invariant modules, R will always be a topological field, though we might not mention this explicitly. For instance, in 4.2, ℓ p (G,W ) and c0 (G,W ) are topological res-invariant modules. Also, H s,p (G,W ) becomes a topological res-invariant module with respect to the topology induced by the norm k f ks,p = k f · (1 + ℓ)s kℓ p (G,W ) for s ∈ R, and with respect to the projective limit topology for s = ∞. In the following, we explain how coarse maps interact with res-invariant modules. Recall that all our groups are countable and discrete, and that a map ϕ : G→ H between groups G and H is a coarse  map if for every y ∈ H, ϕ −1 ({y}) is finite, and for all S ⊆ G × G, ϕ (s)ϕ (t)−1 : (s,t) ∈ S must be finite if st −1 : (s,t) ∈ S is finite (Definition 1.1).  Remark 4.4. Let ϕ: G → H be a coarse map. Given g ∈ G, let S = (g−1 x, x) ∈ G × G: x ∈ G . Then  −1 st : (s,t) ∈ S = g−1 Fis finite, so that ϕ (g−1 x)ϕ (x)−1 : x ∈ G is finite. In other words, we can find a finite decomposition G = i∈I Xi, where I is a finite index set, and a finite subset {hi : i ∈ I} ⊆ H such that ϕ (g−1 x) = h−1 i ϕ (x) for all x ∈ Xi and i ∈ I.  Recall that two maps ϕ , φ : G → H are close (written ϕ ∼ φ ) if ϕ (x)φ (x)−1 : x ∈ G is finite (Definition 1.1). Remark 4.5. If ϕ , φ : G → H are close, then there is a finite decomposition G = i∈I Xi , where I is a finite index set, and a finite subset {hi : i ∈ I} ⊆ H such that we have φ (x) = hi ϕ (x) for all x ∈ Xi and i ∈ I. F Let R and W be as above, and ϕ : G → H a coarse map. Given f ∈ C(G,W ), define ϕ∗ ( f ) ∈ C(H,W ) by setting ϕ∗ ( f )(y) = ∑ x∈G f (x). Moreover, given f ∈ C(H,W ), define ϕ ∗ ( f ) = f ◦ ϕ ∈ C(G,W ). ϕ (x)=y Definition 4.6. Given a res-invariant RG-submodule L of C(G,W ), let ϕ∗ L be the smallest res-invariant RHsubmodule of C(H,W ) containing {ϕ∗ ( f ): f ∈ L}. Given a res-invariant RH-submodule M of C(G,W ), let ϕ ∗ M be the smallest res-invariant RG-submodule of C(H,W ) containing {ϕ ∗ ( f ): f ∈ M}. Lemma 4.7. We have ϕ∗ L = h{h.ϕ∗ ( f ): h ∈ H, f ∈ L}iR (4) ϕ ∗ M = h{1A · ϕ ∗ ( f ): f ∈ M, A ⊆ G}iR . (5) Proof. We obviously have “⊇” in (4). To show “⊆”, it suffices to show that the right-hand side is res-invariant as it is obviously an RH-submodule. Given B ⊆ H, we have for all h ∈ H and f ∈ L that    1B · (h.ϕ∗ ( f )) = h. (1h−1 B · ϕ∗ ( f )) = h. ϕ∗ 1ϕ −1 (h−1 B) · f , which lies in the right-hand side as L is res-invariant. For (5), we again have “⊇” by construction. As the right-hand side is res-invariant, it suffices to show that it is an F RG-submodule in order to prove “⊆”. Given g ∈ G, by Remark 4.4 we can find a finite decomposition G = i∈I Xi and a finite subset {hi : i ∈ I} ⊆ H such that ϕ (g−1 x) = h−1 i ϕ (x) for all x ∈ Xi and i ∈ I. Then, for all A ⊆ G, g. (1A · ϕ ∗ ( f )) = 1gA · (g.ϕ ∗ ( f )) = ∑i∈I 1Xi · 1gA · (g.ϕ ∗ ( f )) = ∑i∈I 1Xi · 1gA · (ϕ ∗ (hi . f )) lies in the right-hand side of (5) as M is an RH-submodule.  Note that in general, ϕ∗ L is not equal to {ϕ∗ ( f ): f ∈ L}, and ϕ ∗ M is not equal to {ϕ ∗ ( f ): f ∈ M}. Lemma 4.8. (i) If ϕ , φ : G → H are coarse maps with ϕ ∼ φ , then ϕ∗ L = φ∗ L and ϕ ∗ M = φ ∗ M for all L, M. (ii) ψ∗ ϕ∗ L = (ψ ◦ ϕ )∗ L and ϕ ∗ ψ ∗ N = (ψ ◦ ϕ )∗ N for all L, N and coarse maps ϕ : G → H, ψ : H → K. Proof. (i) Let us show ϕ∗ L = φ∗ L. By Remark 4.5, there is a finite decomposition G = subset {hi : i ∈ I} ⊆ H such that φ (x) = hi ϕ (x) for all x ∈ Xi and i ∈ I. Then F i∈I Xi and a finite φ∗ ( f ) = ∑ φ∗ (1Xi · f ) = ∑ hi .ϕ∗ (1Xi · f ) ∈ ϕ∗ L i∈I i∈I for all f ∈ L. Hence φ∗ L ⊆ ϕ∗ L. By symmetry, we have φ∗ L = ϕ∗ L. Let us show ϕ ∗ M = φ ∗ M. Let I, {Xi : i ∈ I} and {hi : i ∈ I} be as above. We have that ϕ ∗ ( f ) = ∑ 1Xi · ϕ ∗ ( f ) = ∑ 1Xi · φ ∗ (hi . f ) ∈ φ ∗ M i∈I for all f ∈ M. Hence ϕ ∗M ⊆ φ ∗ M. i∈I By symmetry, we have ϕ ∗ M = φ ∗ M. (ii) Let us show ψ∗ ϕ∗ L = (ψ ◦ ϕ )∗ L. Obviously, “⊇” holds as ψ∗ ϕ∗ L ∋ ψ∗ (ϕ∗ ( f )) = (ψ ◦ ϕ )∗ ( f ) for all f ∈ L. Let us show “⊆”. By (4), it suffices to show that ψ∗ (h.ϕ∗ ( f )) ∈ (ψ ◦ φ )∗ L for all h ∈ H and f ∈ L. 16 By Remark 4.4, we can find a finite decomposition H = ψ (h−1 y) = ki−1 ψ (y) for all y ∈ Yi and i ∈ I. Then F i∈I Yi and a finite subset {ki : i ∈ I} ⊆ K such that    ψ∗ (h.ϕ∗ ( f )) = ∑ ψ∗ (1Yi · (h.ϕ∗ ( f ))) = ∑ ki .ψ∗ 1h−1Yi · (ϕ∗ ( f )) = ∑ ki .(ψ ◦ ϕ )∗ 1ϕ −1 (h−1Yi ) · f i∈I i∈I i∈I lies in (ψ ◦ ϕ )∗ L for all f ∈ L as L is res-invariant. This shows “⊆”. Let us show ϕ ∗ ψ ∗ N = (ψ ◦ ϕ )∗ N. “⊇” holds as ϕ ∗ ψ ∗ N ∋ ϕ ∗ (ψ ∗ ( f )) for all f ∈ N. Let us prove “⊆”. By (5), it suffices to prove that ϕ ∗ (1B · ψ ∗ ( f )) ∈ (ψ ◦ ϕ )∗ N for all B ⊆ H and f ∈ N. We have ϕ ∗ (1B · ψ ∗ ( f )) = 1ϕ −1 (B) · ϕ ∗ (ψ ∗ ( f )) = 1ϕ −1 (B) · (ψ ◦ ϕ )∗ ( f ), which lies in (ψ ◦ ϕ )∗ N as the latter is res-invariant. This shows “⊆”.  groups G and H 4.2. Coarse embeddings and res-invariant modules. Recall that a map ϕ : G → H between  −1  is a coarse embedding if for every S ⊆ G × G, st : (s,t) ∈ S is finite if and only if ϕ (s)ϕ (t)−1 : (s,t) ∈ S is finite (Definition 1.1). Lemma 4.9. Let ϕ : G → H be a coarse embedding, and let Y := ϕ (G). Then we can find X ⊆ G such that F X → Y, x 7→ ϕ (x), is a bijection. In addition, we can find a finite decomposition G = Ii=1 Xi , g(i) ∈ G for 1 ≤ i ≤ I and h(i) ∈ H for 1 ≤ i ≤ I, such that Xi = g(i)−1 X (i) for some X (i) ⊆ X , with g(1) = e (identity in G), h(1) = e (identity in H), X1 = X (1) = X , and ϕ (x) = h(i)ϕ (g(i)x) for all x ∈ Xi and 1 ≤ i ≤ I. Proof. By Lemma 2.20, we can find X such that the restriction of ϕ to X is bijective onto its image and that there S are finitely many g(i) ∈ G, 1 ≤ i ≤ I, such that G = Ii=1 g(i)−1 X , where we can certainly arrange g(1) = e. Now  F define recursively X1 := X and X (i) = X \ g(i) g(1)−1 X1 ∪ . . . ∪ g(i − 1)−1 Xi−1 . Then G = Ii=1 g(i)−1 X (i). Using Remark 4.4, we can further decompose each X (i) to guarantee that there exist h(i) ∈ H for 1 ≤ i ≤ I such  that ϕ (x) = h(i)ϕ (g(i)x) for all x ∈ g(i)−1 X (i) and 1 ≤ i ≤ I. Setting Xi := g(i)−1 X (i), we are done. Lemma 4.10. Let ϕ : G → H be a coarse embedding, and fix h ∈ H. There exists a finite subset F ⊆ G such that for all x, x̃ ∈ G with ϕ (x̃) = h−1 ϕ (x), we must have x̃ ∈ Fx.    Proof. Let S = (s,t) ∈ G: ϕ (s) = h−1 ϕ (t) . Then ϕ (s)ϕ (t)−1 : (s,t) ∈ S = h−1 is finite, so that F =   st −1 : (s,t) ∈ S is finite since ϕ is a coarse embedding. Let ϕ : G → H be a coarse embedding, and set Y := ϕ (G). Lemma 2.20 yields a subset X ⊆ G such that the S ∼ restriction of ϕ to X is a bijection ϕ̃ : X = Y, x 7→ ϕ (x). It is clear that H = h∈H hY . Enumerate H, say H = {h1 , h2 , . . .}, where h1 = e is the identity. Define recursively Y1 := Y and Y j := Y \ h−1 j (h1Y1 ∪ . . . ∪ h j−1Y j−1 ). F By construction, we have a decomposition as a disjoint union H = ∞j=1 h jY j . Clearly, for all h ∈ H, hY ∩ h jY j = for all but finitely many j. (6) Definition 4.11. Define ω : H → G by setting ω (y) = ϕ̃ −1 (h−1 j y) for y ∈ h jY j . By construction, (ϕ ◦ ω )(y) = h−1 j y for y ∈ h jY j .  Take F as in Lemma 4.10 for h = e. (ω ◦ ϕ )(x) ∈ Fx for all x ∈ G, so (ω ◦ ϕ )(x)x−1 : x ∈ G is finite, i.e., (7) ω ◦ ϕ ∼ idG . (8) In general, pre-images under ω can be infinite, so that for an arbitrary f ∈ C(H,W ), ω∗ ( f ) may not be defined. However, we can define ω∗ ( f ) for f ∈ ϕ∗ L, where L ⊆ C(G,W ) is a res-invariant RG-submodule. We need some preparation. The following is an immediate consequence of (4) and (6): Lemma 4.12. We have ϕ∗ L = L∞ j=1 1h j Y j · (ϕ∗ L) as R-modules. Let F be as in Lemma 4.10 for h = e. For every x ∈ G, define Fx ⊆ F by {x̃ ∈ G: ϕ (x̃) = ϕ (x)} = Fx x. For every F subset Fi ⊆ F, define Xi = {x ∈ G: Fx = Fi }. Then G = Fi ⊆F Xi , and by construction, we have the following  Lemma 4.13. ϕ ∗ (ϕ∗ ( f )) = ∑Fi ⊆F 1Xi · ∑g∈Fi g−1 . f . Similarly, let F beas in Lemma 4.10 for some fixed h ∈ H. Let X ⊆ G be as above. For all x ∈ X , define Fx ⊆F F by setting x̃ ∈ G: ϕ (x̃) = h−1 ϕ (x) = Fx x. For a subset Fi ⊆ F, let Xi = {x ∈ X : Fx = Fi }. We have X = Fi ⊆F Xi and, by construction,  Lemma 4.14. 1Y · (h.ϕ∗ ( f )) = ϕ∗ ∑Fi ⊆F 1Xi · ∑g∈Fi g−1 . f . 17 Now we are ready for the following Lemma 4.15. Let L ⊆ C(G,W ) be an res-invariant RG-submodule. Then ϕ∗ L → L, f 7→ ω∗ ( f ) is well-defined, where ω∗ ( f )(x) = ∑ y∈H f (y). ω (y)=x Proof. By Lemma 4.12, it suffices to show that for every j and f ∈ 1h j Y j · ϕ∗ L, ω∗ ( f ) lies in L. For such f , we −1 know that ω∗ ( f ) = 1X · ϕ ∗ (h−1 j . f ). As f lies in 1h j Y j · ϕ∗ L, h j . f lies in 1Y j · ϕ∗ L ⊆ 1Y · ϕ∗ L. Hence it suffices to show that 1X · ϕ ∗ (ϕ∗ L) ⊆ L. By (4), it is enough to show that ϕ ∗ (h.ϕ∗ ( f )) ∈ L for all f ∈ L. This follows immediately from Lemma 4.13 and Lemma 4.14.  Definition 4.16. For ϕ and L as above, set ϕ ∗−1 L := { f ∈ C(H,W ): ϕ ∗ (h. f ) ∈ L for all h ∈ H}. We collect a few properties of ϕ ∗−1 L: Lemma 4.17. a) ϕ ∗−1 L is an res-invariant RH-submodule of C(H,W ). b) For f ∈ C(H,W ), f ∈ ϕ ∗−1 L if and only if for all h ∈ H, 1hY · f ∈ ϕ ∗−1 L. c) ϕ ∗−1 L is the biggest res-invariant RH-submodule M of C(G,W ) such that ϕ ∗ ( f ) ∈ L for all f ∈ M. d) Let ω be as in Definition 4.11. Then ω ∗ ( f ) ∈ ϕ ∗−1 L for all f ∈ L. e) ϕ ∗ ϕ ∗−1 L = L. Proof. a) ϕ ∗−1 L is H-invariant by definition. To see that ϕ ∗−1 L is res-invariant, take B ⊆ H and f ∈ ϕ ∗−1 L. Then, for all h ∈ H, ϕ ∗ (h.(1B · f )) = ϕ ∗ (1hB · (h. f )) = 1ϕ −1 (hB) ϕ ∗ (h. f ) ∈ L, so 1B · f ∈ ϕ ∗−1 L. b) follows from ϕ ∗ (h. f ) = ϕ ∗ (1Y · (h. f )) = ϕ ∗ (h.(1h−1 Y · f )) for all f ∈ C(H,W ). c) If M is an res-invariant RH-submodule of C(H,W ), then f ∈ M implies h. f ∈ M for all h ∈ H, and hence, by b), we conclude that f ∈ ϕ ∗−1 L. d) By b), it suffices to prove 1hY · ω ∗ ( f ) ∈ ϕ ∗−1 L for all h ∈ H. By (6), it suffices to prove 1h j Y j · ω ∗ ( f ) ∈ −1 ϕ ∗−1 L for all j. For all y ∈ h jY j , 1h j Y j · ω ∗ ( f )(y) = f (ω (y)) = f (ϕ̃ −1 (h−1 j y)) = ϕ∗ (1X · f )(h j y), hence 1h j Y j · ω ∗ ( f ) = h j .ϕ∗ (1X · f ). Let h ∈ H be arbitrary. Lemma 4.14 and Lemma 4.13 imply that ϕ ∗ (hh j .ϕ∗ (1X · f )) lies in L. Hence ω ∗ ( f ) lies in ϕ ∗−1 L. e) We have ϕ ∗ ( f ) ⊆ L for all f ∈ ϕ ∗−1 L by construction (see also c)). Hence ϕ ∗ ϕ ∗−1 L ⊆ L by minimality of ϕ ∗ ϕ ∗−1 L. To show L ⊆ ϕ ∗ ϕ ∗−1 L, it suffices to show that 1X · L ⊆ ϕ ∗ ϕ ∗−1 L as L = ∑ j g(i)−1 .(1X · L) by Lemma 4.9. Let f ∈ 1X · L. Then ω ∗ ( f ) ∈ ϕ ∗−1 L by d), and 1X · ϕ ∗ (ω ∗ ( f )) ∈ ϕ ∗ ϕ ∗−1 L. But we have 1X · ϕ ∗ (ω ∗ ( f )) = 1X · (ω ◦ ϕ )∗ ( f ) = 1X · f = f as ω ◦ ϕ = id on X .  Lemma 4.18. If ϕ , φ : G → H are coarse embeddings with ϕ ∼ φ , then ϕ ∗−1 L = φ ∗−1 L. If ϕ : G → H, ψ : H → K are coarse embeddings, then ψ ∗−1 ϕ ∗−1 L = (ψ ◦ ϕ )∗−1 L. Proof. By Remark 4.5, we have for f ∈ C(H,W ): ϕ ∗ ( f ) = ∑i 1Xi · φ ∗ (hi . f ). Hence φ ∗−1 L ⊆ ϕ ∗−1 L. By symmetry, φ ∗−1 L = ϕ ∗−1 L. If f ∈ ψ ∗−1 ϕ ∗−1 L, then ψ ∗ ( f ) ∈ ϕ ∗−1 L, and thus (ψ ◦ ϕ )∗ ( f ) = ϕ ∗ (ψ ∗ ( f )) ∈ L. Lemma 4.17 c) implies f ∈ (ψ ◦ ϕ )∗−1 L. To show (ψ ◦ ϕ )∗−1 L ⊆ ψ ∗−1 ϕ ∗−1 L, take f ∈ (ψ ◦ ϕ )∗−1 L. To show f ∈ ψ ∗−1 ϕ ∗−1 L, it suffices to show for all k ∈ K and h ∈ H that ϕ ∗ (h.ψ ∗ (k. f )) ∈ L. By Remark 4.4, we have ψ (h−1 y) = ∗ ∗ ∗ ∗ k−1 j ψ (y) for all y ∈ Y j and j ∈ J, for suitable J, Y j and k j , so that ϕ (h.ψ (k. f )) = ϕ ∑ j 1Y j · ψ (k j k. f ) = ∗ ∗−1  ∑ j 1ϕ −1 (Y j ) (ψ ◦ ϕ ) (k j k. f ), which lies in L as f lies in (ψ ◦ ϕ ) L. Our next goal is to define a suitable topology on ϕ∗ L in case L is a topological res-invariant RG-submodule of C(G,W ) and ϕ is a coarse embedding. We start with some preparations. Lemma 4.19. Let Ỹ ⊂ Y and X̃ = X ∩ ϕ −1 (Ỹ ). Then 1X̃ · L → 1Ỹ · (ϕ∗ L), f 7→ ϕ∗ ( f ) is bijective. Proof. Injectivity holds as we can recover f from ϕ∗ ( f ) using ϕ ∗ (ϕ∗ ( f ))(x̃) = ϕ∗ ( f )(ϕ (x̃)) = ∑ f (x) = f (x̃) x∈G ϕ (x)=ϕ (x̃) for f ∈ 1X̃ · L and x̃ ∈ X̃. For surjectivity, (4) implies that it suffices to show that for all h ∈ H and f ∈ L,  1Ỹ · (h.ϕ∗ ( f )) lies in the image of our map. This follows immediately from Lemma 4.14.  For j ∈ Z, j ≥ 1, set X j := X ∩ ϕ −1 (Y j ). Obviously, for all j ≥ 1, we have 1h j Y j · (ϕ∗ L) = h j . 1Y j · (ϕ∗ L) . Thus 1X j · L → 1h j Y j · (ϕ∗ L), f 7→ h j .ϕ∗ ( f ) is an isomorphism. For J ∈ Z, J ≥ 1, define ΦJ : J M J 1X j · L → ϕ∗ L, ( f j ) j 7→ ∑ h j .ϕ∗ ( f j ). j=1 j=1 18 Definition 4.20. Let L be a topological res-invariant RG-submodule of C(G,W ). Let τ be the finest topology on ϕ∗ L such that for all J ∈ Z, J ≥ 1, ΦJ is continuous. Here 1X j · L is given the subspace topology from L, and LJ j=1 1X j · L is given the product topology. The proof of the following lemma is straightforward. Lemma 4.21. τ is the finest topology on ϕ∗ L satisfying the following properties: (T1 ) (ϕ∗ L, τ ) is a topological res-invariant RH-submodule of C(H,W ). (T2 ) L → (ϕ∗ L, τ ), f 7→ ϕ∗ ( f ) is continuous. Lemma 4.22. Let ω be as in Definition 4.11. Then ω∗ : ϕ∗ L → L is continuous. Proof. By definition of the topology of ϕ∗ L, it suffices to show that for every j, 1X j · L → 1h j Y j · (ϕ∗ L), f 7→ ω∗ (h j .ϕ∗ ( f )) is continuous. But it is easy to see that for f ∈ 1X j · L, ω∗ (h j .ϕ∗ ( f )) = ϕ ∗ (ϕ∗ ( f )). Continuity now follows from Lemma 4.13.  Now let us define a suitable topology on ϕ ∗ M in case M is a topological res-invariant RH-submodule of C(H,W ) and ϕ is a coarse embedding. Again, some preparations are necessary. Let ϕ : G → H be a coarse embedding and M a res-invariant RH-submodule of C(H,W ). Lemma 4.23. Let X̃ ⊆ G be such that the restriction of ϕ to X̃ is injective. Let Ỹ := ϕ (X̃). Then 1Ỹ · M → 1X̃ · (ϕ ∗ M), f 7→ 1X̃ · ϕ ∗ ( f ) is a bijection. Proof. For every f ∈ 1Ỹ · M and y ∈ H, we have ϕ∗ (1X̃ · ϕ ∗ ( f ))(y) = ∑ x∈X̃ ϕ (x)=y ϕ ∗ ( f )(x) = ∑ ( f )(ϕ (x)) = f (y). x∈X̃ ϕ (x)=y Hence ϕ∗ (1X̃ · ϕ ∗ ( f )) = f , and our map is injective. To show surjectivity, it suffices by (5) to show that for every f ∈ M and A ⊆ G, 1X̃ · (1A · ϕ ∗ ( f )) lies in the image of our map. This follows from 1X̃ · (1A · ϕ ∗ ( f )) =  1A∩X̃ · ϕ ∗ ( f ) = 1X̃ · ϕ ∗ (1ϕ (A∩X̃) · f ). Now let Y = ϕ (G). Lemma 2.20 gives us X ⊆ G such that ϕ |X is a bijection X ∼ = Y, x 7→ ϕ (x). By Lemma 4.9, F we can find a finite decomposition G = Ii=1 Xi and finite subsets {g(i): 1 ≤ i ≤ I} ⊆ G, {h(i): i ≤ i ≤ I} ⊆ H such that Xi = g(i)−1 X (i) for some X (i) ⊆ X and ϕ (x) = h(i)ϕ (g(i)x) for all x ∈ Xi and 1 ≤ i ≤ I. Let Yi := ϕ (Xi ) L L and Φ : Ii=1 1Yi · M → ϕ ∗ M, ( fi )i 7→ ∑Ii=1 1Xi · ϕ ∗ ( fi ). As we obviously have ϕ ∗ M = Ii=1 1Xi · (ϕ ∗ M), Φ is surjective. And by Lemma 4.23, Φ is injective. Thus Φ is an isomorphism of R-modules. Definition 4.24. Let M be a topological res-invariant RH-submodule of C(H,W ). Define the topology τ on L ϕ ∗ M so that Φ becomes a homeomorphism. Here 1Yi ·M is given the subspace topology from M, and Ii=1 1Yi ·M is given the product topology. The following lemma is straightforward to prove. Lemma 4.25. τ is the finest topology on ϕ ∗ M satisfying the following properties: (T1 ) (ϕ ∗ M, τ ) is a topological res-invariant RG-submodule of C(G,W ). (T2 ) M → (ϕ ∗ M, τ ), f 7→ ϕ ∗ ( f ) is continuous. Now we define a suitable topology on ϕ ∗−1 L for a topological res-invariant RG-submodule L of C(G,W ) and a coarse embedding ϕ . Lemma 4.17 b) implies that ϕ ∗−1 L = ∏ j 1h j Y j · (ϕ ∗−1 L). The following is easy to verify: Lemma 4.26. For every j, Φ( j) : 1X j · L → 1h j Y j · (ϕ ∗−1 L), f 7→ h j .ϕ∗ ( f ) is a bijection whose inverse is given by 1h j Y j · (ϕ ∗−1 L) → 1X j · L, f 7→ 1X j · ϕ ∗ (h−1 j . f ). Definition 4.27. Let L be a topological res-invariant RG-submodule of C(G,W ). Define the topology τ on ϕ ∗−1 L so that ∏ j Φ( j) : ∏ j 1X j · L → ∏ j 1h j Y j · (ϕ ∗−1 L) = ϕ ∗−1 L becomes a homeomorphism. Here 1X j · L is given the subspace topology coming from L, and ∏ j 1X j · L is given the product topology. The following is straightforward to prove: Lemma 4.28. τ is the coarsest topology on ϕ ∗−1 L satisfying the following properties: (T−1 ) (ϕ ∗−1 L, τ ) is a topological res-invariant RH-submodule of C(H,W ). (T−2 ) (ϕ ∗−1 L, τ ) → L, f 7→ ϕ ∗ ( f ) is continuous. Lemma 4.29. Let L, ϕ , ω and ϕ ∗−1 L be as above. Then ω ∗ : L → ϕ ∗−1 L is continuous. 19 ∗ ∗ −1 ∗ Proof. It suffices to show continuity of L → 1X j · L, f 7→ 1X j · ϕ ∗ (h−1 j .ω ( f )) for all j. 1X j · ϕ (h j .ω ( f )) =     ∗ = 1X j · ϕ ∗ ϕ∗ (1X j · f ) = 1X j · f , which clearly depends continuously on f .  1X j · ϕ ∗ h−1 j . 1h j Y j · ω ( f ) Lemma 4.30. Let L, ϕ and ϕ ∗−1 L be as above. We have ϕ ∗ ϕ ∗−1 L = L as topological res-invariant modules. Proof. Let τ be the topology of L and τ̃ the topology of ϕ ∗ ϕ ∗−1 L. As ϕ ∗ : ϕ ∗−1 L → (L, τ ) is continuous by (T−2 ), we must have τ ⊆ τ̃ by Lemma 4.25. To prove τ̃ ⊆ τ , we show that id : (L, τ ) → (ϕ ∗ ϕ ∗−1 L, τ̃ ) is continuous. By construction of τ̃ it suffices to show that L → 1Yi · ϕ ∗−1 L, f 7→ ϕ∗ (1Xi · f ) is continuous for all i. By construction of the topology on ϕ ∗−1 L, it is enough to show that L → L, f 7→ 1X j · ϕ ∗ (h−1 j .(ϕ∗ (1Xi · f ))) is continuous. This now follows from Lemma 4.14 and Lemma 4.13.  We have the following topological analogue of Lemma 4.8, which is straightforward to prove. Lemma 4.31. (i) If ϕ , φ : G → H are coarse embeddings with ϕ ∼ φ , then ϕ∗ L = φ∗ L, ϕ ∗ M = φ ∗ M and ϕ ∗−1 L = φ ∗−1 L as topological res-invariant modules, for all topological res-invariant RG-submodules L of C(G,W ) and all topological res-invariant RH-submodules M of C(H,W ). (ii) If ϕ : G → H and ψ : H → K are coarse embeddings, then ψ∗ ϕ∗ L = (ψ ◦ ϕ )∗ L, ϕ ∗ ψ ∗ N = (ψ ◦ ϕ )∗ N and ψ ∗−1 ϕ ∗−1 L = (ψ ◦ ϕ )∗−1 L as topological res-invariant modules, for all topological res-invariant RGsubmodules L of C(G,W ) and all topological res-invariant RK-submodules N of C(K,W ). 4.3. Coarse maps and (co)homology. Let us explain how coarse maps induce maps in group (co)homology. We first need to write group (co)homology in terms of groupoids. Let G be a group, R a commutative ring with unit, L an RG-module. We write g. f for the action of g ∈ G on f ∈ L. We recall the chain and cochain complexes coming from the bar resolution (see [9, Chapter III, § 1]): Let ∂3 ∂2 ∂1 C2 (L) −→ C1 (L) −→ C0 (L) with C0 (L) = L and Cn (L) = C f (Gn , L) ∼ (C∗ (L), ∂∗ ) be the chain complex . . . −→ = (i) R[Gn ] ⊗R L, where C f stands for maps with finite support, and ∂n = ∑ni=0 (−1)i ∂n , where (0) ∂n ( f )(g1 , . . . , gn−1 ) = ∑ g−1 0 . f (g0 , g1 , . . . , gn−1 ), ∑ f (g1 , . . . , gi−1 , g, ḡ, gi+1 , . . . , gn−1 ) for 1 ≤ i ≤ n − 1, ∑ f (g1 , . . . , gn−1 , gn ). g0 ∈G (i) ∂n ( f )(g1 , . . . , gn−1 ) = g,ḡ∈G gḡ=gi (n) ∂n ( f )(g1 , . . . , gn−1 ) = gn ∈G ∂0 ∂1 ∂2 Let (C∗ (L), ∂ ∗ ) be the cochain complex C0 (L) −→ C1 (L) −→ C2 (L) −→ . . . where C0 (L) = L, Cn (L) = i n C(Gn , L) for n ≥ 1, and ∂ n = ∑n+1 i=0 (−1) ∂(i) , with: n ∂(0) ( f )(g0 , . . . , gn ) = g0 . f (g1 , . . . , gn ), n ( f )(g0 , . . . , gn ) = f (g0 , . . . , gi−1 gi , . . . , gn ) for 1 ≤ i ≤ n, δ(i) n δ(n+1) ( f )(g0 , . . . , gn ) = f (g0 , . . . , gn−1 ). Now let W be an R-module and L ⊆ C(G,W ) be an RG-submodule. Consider the transformation groupoid G := G ⋊ G attached to the left multiplication action of G on G. By definition, G = {(x, g): x ∈ G, g ∈ G}, and the range and source maps are given by r(x, g) = x, s(x, g) = g−1 x, whereas the multiplication is given by (0) = G, and for n ≥ 1, set (x, g1 )(g−1 1 x, g2 ) = (x, g1 g2 ). Define σ : G → G, (x, g) 7→ g. Let G G (n) := {(γ1 , . . . , γn ) ∈ G n : s(γi ) = r(γi+1 ) for all 1 ≤ i ≤ n − 1} , and define, for n ≥ 1, σ : G (n) → Gn as the restriction of σ n : G n → Gn to G (n) .  Note that G (n) = ((x1 , g1 ), . . . , (xn , gn )) ∈ G n : g−1 i xi = xi+1 ) for all 1 ≤ i ≤ n − 1 , so that we have a bijection (9) G (n) ∼ = G × Gn , ((x1 , g1 ), . . . , (xn , gn )) 7→ (x1 , g1 , . . . , gn ). −1 This is because for 2 ≤ i ≤ n, xi is determined by the equation xi = g−1 i−1 · · · g1 x1 . We will often use this identification of G (n) with G × Gn without explicitly mentioning it. 20 Now, given f ∈ C(G (n) ,W ) and ~g ∈ Gn , we view f |σ −1 (~g) as the map in C(G,W ) given by x 7→ f (x,~g). Set n o supp( f ) := ~g ∈ Gn : f |σ −1 (~g) 6= 0 . Let us define a chain complex (D∗ (L), d∗ ) as follows: For n = 0, 1, 2, . . . , set o n Dn (L) := f ∈ C(G (n) ,W ): supp( f ) is finite, f |σ −1 (~g) ∈ L for all ~g ∈ Gn . (i) (i) (i) Moreover, for all n ≥ 1, define maps dn : Dn (L) → Dn−1 (L) by setting dn = ∑ni=0 (−1)i dn with dn = (δn )∗ , (0) (1) where δ1 = s, δ1 = r, and for n ≥ 2, (0) δn (γ1 , . . . , γn ) = (γ2 , . . . , γn ), (i) δn (γ1 , . . . , γn ) = (γ1 , . . . , γi γi+1 , . . . , γn ) for 1 ≤ i ≤ n − 1, (n) δn (γ1 , . . . , γn ) = (γ1 , . . . , γn−1 ). (i) Here, we use the same notation as in § 4.1, i.e., (δn )∗ ( f )(~η ) = ∑ ~γ ∈G (n) (i) δn (~γ )=~η f (~γ ). Let us define a cochain complex (D∗ (L), d ∗ ) by setting, for all n = 0, 1, 2, . . . , n o Dn (L) := f ∈ C(G (n) ,W ): f |σ −1 (~g) ∈ L for all ~g ∈ Gn . i n n n ∗ Moreover, for all n, define maps d n : Dn (L) → Dn+1 (L) by setting d n = ∑n+1 i=0 (−1) d(i) , with d(i) = (δ(i) ) (as in n )∗ ( f ) = f ◦ δ n ), where δ 0 = s, δ 0 = r, and for all n ≥ 1, § 4.1, (δ(i) (i) (0) (1) n δ(0) (γ0 , . . . , γn ) = (γ1 , . . . , γn ), n (γ0 , . . . , γn ) = (γ0 , . . . , γi−1 γi , . . . , γn ) for 1 ≤ i ≤ n, δ(i) n δ(n+1) ( f )(γ0 , . . . , γn ) = (γ0 , . . . , γn−1 ). We are also interested in the topological setting, where we assume that R is a topological field, L ⊆ C(G,W ) a RG-submodule together with the structure of a topological R-vector space such that the G-action G y L is by homeomorphisms. Equip the above chain and cochain complexes C∗ (L) and C∗ (L) with the topologies of pointwise convergence. We also equip D∗ (L) and D∗ (L) with the topologies of pointwise convergence, i.e., fi ∈ C(G (n) ,W ) converges to f ∈ C(G (n) ,W ) if and only if limi fi |σ −1 (~g) = f |σ −1 (~g) in L for all ~g ∈ Gn . The following is now immediate: Lemma 4.32. (i) We have isomorphisms χ∗ of chain complexes and χ ∗ of cochain complexes given by χn : Cn (L) → Dn (L), χn ( f )(x,~g) = f (~g)(x) and χ n : Cn (L) → Dn (L), χ n ( f )(x,~g) = f (~g)(x). (ii) In the topological setting, χ∗ and χ ∗ from (i) are topological isomorphisms. By definition of group (co)homology, we have Hn (G, L) = Hn (C∗ (L)) and H n (G, L) = H n (C∗ (L)). By definition of reduced group (co)homology, we have H̄n (G, L) = H̄n (C∗ (L)) and H̄ n (G, L) = H̄ n (C∗ (L)) in the topological setting (recall that H̄n (C∗ (L)) = ker (∂n )/im (∂n+1 ) and H̄ n (C∗ (L)) = ker (∂ n )/im (∂ n−1 )). Hence we obtain Corollary 4.33. (i) χ∗ and χ ∗ from Lemma 4.32 induce isomorphisms Hn (χ∗ ) : Hn (G, L) ∼ = Hn (D∗ (L)) and n (D∗ (L)) for all n. H n (χ ∗ ) : H n (G, L) ∼ H = (ii) In the topological setting, χ∗ and χ ∗ from Lemma 4.32 induce isomorphisms H̄n (χ∗ ) : H̄n (G, L) ∼ = H̄n (D∗ (L)) and H̄ n (χ ∗ ) : H̄ n (G, L) ∼ = H̄ n (D∗ (L)) for all n. In this groupoid picture of group (co)homology, let us now explain how coarse maps induce chain and cochain maps. Let ϕ : G → H be a coarse map. Let G = G ⋊ G and H = H ⋊ H. Define ϕ 1 : G → H , (x, g) 7→ (ϕ (x), ϕ (x)ϕ (g−1 x)−1 ). It is easy to see that ϕ 1 is a groupoid homomorphism. This means that if γ1 and γ2 are composable, then so are ϕ 1 (γ1 ) and ϕ 1 (γ2 ), and we have ϕ 1 (γ1 γ2 ) = ϕ 1 (γ1 )ϕ 1 (γ2 ). For all n ≥ 1, define ϕ n : G (n) → H (n) , (γ1 , . . . , γn ) 7→ (ϕ 1 (γ1 ), . . . , ϕ 1 (γn )). Moreover, if ϕ : G → H is a coarse embedding, let ω : H → G be as above, and define ω 1 : H → G , (y, h) 7→ (ω (y), ω (y)ω (h−1 y)−1 ), and for all n ≥ 1, define ω n : H (n) → G (n) , (η1 , . . . , ηn ) 7→ (ω 1 (η1 ), . . . , ω 1 (ηn )). Now let L be a res-invariant RG-submodule of C(G,W ). For f ∈ Dn (L), consider (ϕ n )∗ ( f )(~η ) = ∑ ~γ ∈G (n) f (~γ ). In case ϕ is a coarse embedding and ω is ϕ n (~γ )=~η as above, set for f ∈ Dn (ϕ∗ L) (ω n )∗ ( f )(~γ ) = ∑ ~η ∈H (n) f (~η ). ω n (~η )=~γ 21 Lemma 4.34. (i) Let ϕ : G → H be a coarse map. For all n, Dn (ϕ ) : Dn (L) → Dn (ϕ∗ L), f 7→ (ϕ n )∗ ( f ) is well-defined and gives rise to a chain map D∗ (ϕ ) : D∗ (L) → D∗ (ϕ∗ L). If ψ : H → K is another coarse map, then we have D∗ (ψ ◦ ϕ ) = D∗ (ψ ) ◦ D∗ (ϕ ). (10) If L is a topological res-invariant RG-submodule of C(G,W ) and ϕ is a coarse embedding, then for all n, Dn (ϕ ) is continuous. (ii) If ϕ is a coarse embedding, then Dn (ω ) : Dn (ϕ∗ L) → Dn (L), f 7→ (ω n )∗ ( f ) is well-defined and gives rise to a chain map D∗ (ω ) : D∗ (ϕ∗ L) → D∗ (L). If L is a topological res-invariant module, then Dn (ω ) is continuous for all n. Note that for (10) to make sense, we implicitly use Lemma 4.8 (ii). Proof. (i) To show that Dn (ϕ ) is well-defined, we have to show that (ϕ n )∗ ( f ) ∈ Dn (ϕ∗ L) for all f ∈ Dn (L). It suffices to treat the case that supp( f ) = {~g} for a single ~g = (g1 , . . . , gn ) ∈ Gn , as a general element in Dn (L) is a finite sum of such f . Let us first show that (ϕ n )∗ ( f ) has finite support. As ϕ is a coarse map,  −1 (11) F := ϕ (x)ϕ (g−1 i x) : x ∈ G, 1 ≤ i ≤ n is finite. Clearly, supp ((ϕ n )∗ ( f )) ⊆ F n . To show that for every ~h = (h1 , . . . , hn ) ∈ H n , (ϕ n )∗ ( f )|σ −1 (~h) lies in ϕ∗ L, define  −1 −1 −1 −1 A := x ∈ G: ϕ (g−1 = hi for all 1 ≤ i ≤ n . i−1 · · · g1 x)ϕ (gi · · · g1 x) Then ϕ n (x,~g) ∈ σ −1 (~h) if and only if x ∈ A. Hence (ϕ n )∗ ( f )(y,~h) = ∑ f (x,~g) = x∈A ϕ n (x,~g)=(y,~h) ∑ x∈A ϕ (x)=y    f (x,~g) = ϕ∗ 1A · f |σ −1 (~g) (y), so that (12)    (ϕ n )∗ ( f )|σ −1 (~h) = ϕ∗ 1A · f |σ −1 (~g) . As f |σ −1 (~g) lies in L, L is res-invariant and ϕ∗ ( f˜) ∈ ϕ∗ L for all f˜ ∈ L, this shows that (ϕ n )∗ ( f )|σ −1 (~h) ∈ ϕ∗ L. Hence Dn (ϕ ) is well-defined for all n. (Dn (ϕ ))n is a chain map because ϕ n is a groupoid homomorphism for all n. (10) holds because we have (ψ n )∗ ◦ (ϕ n )∗ = ((ψ ◦ ϕ )n )∗ for all n. (12) shows continuity of Dn (ϕ ) for all n as the right-hand side depends continuously on f . This is because L satisfies (2) and the topology on ϕ∗ L satisfies (T2 ). n o (ii) To show that Dn (ω ) is well-defined, take f ∈ Dn (ϕ∗ L). We may assume supp( f ) = ~h for ~h = −1 −1 (h̄1 , . . . , h̄n ) and f |σ −1 (~h) ∈ 1hY · (ϕ∗ L). By (6), hY ∪ h̄−1 1 hY ∪ . . . ∪ h̄n · · · h̄1 hY ⊆ −1 ω (h̄−1 i · · · h̄1 y) ϕ̃ −1 (h−1 j y) SJ j=1 h jY j for some J. for some 1 ≤ j ≤ J. Now consider S = = Thus, for all y ∈ hY and 1 ≤ i ≤ n, n o  −1  (h̄i−1 · · · h̄1−1 y, h̄i−1 · · · h̄1−1 y): y ∈ hY, 1 ≤ i ≤ n . ϕ (ω (s))ϕ (ω (t))−1 : (s,t) ∈ S ⊆ h−1 h : 1 ≤ j, k ≤ J is k j  −1 n finite, so that F := ω (s)ω (t) : (s,t) ∈ S is finite as ϕ is a coarse embedding. Hence supp((ω )∗ ( f )) ⊆ F n .  A similar formula as (12) shows that (ω n )∗ is well-defined, and continuous in the topological setting. Now let M be a res-invariant RH-submodule of C(H,W ). For f ∈ Dn (M), consider (ϕ n )∗ ( f ) = f ◦ ϕ n . If ϕ is a coarse embedding, L an res-invariant RG-submodule of C(G,W ), set for f ∈ Dn (L): (ω n )∗ ( f ) = f ◦ ω n . Lemma 4.35. (i) Let ϕ be a coarse map. For all n, Dn (ϕ ) : Dn (M) → Dn (ϕ ∗ M), f 7→ (ϕ n )∗ ( f ) is well-defined and gives rise to a cochain map D∗ (ϕ ) : D∗ (M) → D∗ (ϕ ∗ M). If ψ : H → K is another coarse map, we have (13) D∗ (ψ ◦ ϕ ) = D∗ (ϕ ) ◦ D∗ (ψ ). If M is a topological res-invariant RH-submodule of C(H,W ) and ϕ is a coarse embedding, then Dn (ϕ ) is continuous for all n. (ii) If ϕ is a coarse embedding, then Dn (ω ) : Dn (L) → Dn (ϕ ∗−1 L), f 7→ (ω n )∗ ( f ) is well-defined and gives rise to a cochain map D∗ (ω ) : D∗ (L) → D∗ (ϕ ∗−1 L). If L is a topological res-invariant module, then Dn (ω ) is continuous for all n. For (13) to make sense, we implicitly use (ii) in Lemma 4.8. 22 Proof. (i) To show that Dn (ϕ ) is well-defined, we have to show that for all f ∈ Dn (M), (ϕ n )∗ ( f ) ∈ Dn (ϕ ∗ M), −1 i.e., (ϕ n )∗ ( f )|σ −1 (~g) ∈ ϕ ∗ M for all ~g = (g1 , . . . , gn ) ∈ Gn . F = ϕ (x)ϕ (g−1 i x) : x ∈ G, 1 ≤ i ≤ n is finite by (11). We also know that ϕ n (x,~g) ∈ σ −1 (F n ) for all x ∈ G. For ~h = (h1 , . . . , hn ) ∈ F n , let  −1 −1 −1 −1 A~h := x ∈ G: ϕ (g−1 = hi for all 1 ≤ i ≤ n . i−1 · · · g1 x)ϕ (gi · · · g1 x) Then G = F ~h∈F n A~h , and for x ∈ A~h , we have ϕ n (x,~g) = (ϕ (x),~h). Hence   (ϕ n )∗ ( f )|σ −1 (~g) (x) = f (ϕ n (x,~g)) = ∑ 1A~h (x) · f |σ −1 (~h) (ϕ (x)), ~h∈F n and thus (ϕ n )∗ ( f )|σ −1 (~g) = (14) ∑ ~h∈F n   1A~h · ϕ ∗ f |σ −1 (~h) . As f |σ −1 (~h) ∈ M, ϕ ∗ ( f˜) ∈ ϕ ∗ M for all f˜ ∈ M and ϕ ∗ M is res-invariant, this shows that (ϕ n )∗ ( f )|σ −1 (~g) ∈ ϕ ∗ M. Hence Dn (ϕ ) is well-defined for all n. (Dn (ϕ ))n is a cochain map because ϕ n is a groupoid homomorphism for all n. (13) holds because we have (ϕ n )∗ ◦ (ψ n )∗ = ((ψ ◦ ϕ )n )∗ for all n. (14) shows that Dn (ϕ ) is continuous for all n as the right-hand side depends continuously on f because the topology on ϕ ∗ M satisfies (T1 ) and (T2 ). (ii) Given f ∈ Dn (L) and ~h = (h̄1 , . . . , h̄n ) ∈ H n , we show (ω n )∗ ( f )|σ −1 (~h) ∈ ϕ ∗−1 L. By Lemma 4.17 b), it   suffices to show 1hY · (ω n )∗ ( f )|σ −1 (~h) ∈ ϕ ∗−1 L for all h ∈ H. As we saw in the proof of Lemma 4.34 (ii),  −1 −1 −1 −1 n ~ −1 n F = ω (h̄−1 i−1 · · · h̄1 y)ω (h̄i · · · h̄1 y) : y ∈ hY, 1 ≤ i ≤ n is finite. Thus ω (y, h) ∈ σ (F ) for all y ∈ hY . −1 −1 −1 −1 = gi for all For ~g ∈ F n , let B~g = y ∈ hY : ω (h̄−1 i−1 · · · h̄1 y)ω (h̄i · · · h̄ 1 y)  1 ≤ i ≤ n . We then have hY = F n ~ g), so that 1hY · (ω n )∗ ( f )|σ −1 (~h) = ∑~g∈F n 1B~g · ω ∗ ( f |σ −1 (~g) ), which ~g∈F n B~g , and for y ∈ B~g , ω (y, h) = (ω (y),~ lies in ϕ ∗−1 L by Lemma 4.17 d). This formula also shows continuity in the topological setting.  Our next goal is to show that coarse maps which are close induce the same chain and cochain maps up to homotopy. Let ϕ , φ : G → H be two coarse embeddings with ϕ ∼ φ . Let L be a res-invariant RG-submodule of C(G,W ) and M a res-invariant RH-submodule of C(H,W ). Let G = G ⋊ G and H = H ⋊ H. Define (h) θ : G → H , x 7→ (ϕ (x), ϕ (x)φ (x)−1 ). For n ≥ 0 and 1 ≤ h ≤ n + 1, let κn : G (n) → H (n+1) be given by (1) κ0 = θ , and for n ≥ 1, (h) κn (γ1 , . . . , γn ) = (ϕ 1 (γ1 ), . . . , ϕ 1 (γh−1 ), θ (r(γh )), φ 1 (γh ), . . . , φ 1 (γn )) for 1 ≤ h ≤ n, (n+1) κn (γ1 , . . . , γn ) = (φ 1 (γ1 ), . . . , φ 1 (γn ), θ (s(γn ))). n : G (n−1) → H (n) be given by κ 1 = θ , and for n ≥ 2, Moreover, for n ≥ 1 and 1 ≤ h ≤ n, let κ(h) (1) n (γ1 , . . . , γn−1 ) = (ϕ 1 (γ1 ), . . . , ϕ 1 (γh−1 ), θ (r(γh )), φ 1 (γh ), . . . , φ 1 (γn−1 )) for 1 ≤ h ≤ n − 1, κ(h) n (γ1 , . . . , γn−1 ) = (φ 1 (γ1 ), . . . , φ 1 (γn−1 ), θ (s(γn−1 ))). κ(n) (h) (h) Lemma 4.36. (i) kn = (κn )∗ : Dn (L) → Dn+1 (ϕ∗ L) = Dn+1 (φ∗ L) is well-defined for all n and h. kn := h+1 k(h) gives a chain homotopy D (ϕ ) ∼ D (φ ). ∑n+1 n ∗ h ∗ h=1 (−1) n n n ∗ n ∗ (ii) k(h) = (κ(h) ) : D (M) → Dn−1 (ϕ M) = Dn−1 (φ ∗ M) is well-defined for all n, h. kn := ∑nh=1 (−1)h+1 k(h) ∗ ∗ gives a cochain homotopy D (ϕ ) ∼h D (φ ). (h) (h) Proof. (i) Let us show that kn is well-defined, i.e., (κn )∗ ( f ) ∈ Dn+1 (ϕ∗ L) for all f ∈ Dn (L). We may assume supp( f ) = {~g} for a single ~g = (g1 , . . . , gn ) ∈ Gn , as a general element in Dn (L) is a finite sum of such f . We (h) first show that supp((κn )∗ ( f )) is finite. By (11) and because ϕ ∼ φ , we know that    −1 −1 −1 −1 F := ϕ (x)ϕ (g−1 i x) : x ∈ G, 1 ≤ i ≤ n ∪ ϕ (x)φ (x) : x ∈ G ∪ φ (x)φ (gi x) : x ∈ G, 1 ≤ i ≤ n (h) (h) is finite. As κn (x,~g) lies in σ −1 (F n+1 ) for all x ∈ G, we conclude that supp((κn )∗ ( f )) is contained in F n+1 , (h) which is finite. Let us show that for every ~h = (h1 , . . . , hn+1 ) ∈ H n+1 , (κn )∗ ( f )|σ −1 (~h) lies in ϕ∗ M. Define  −1 −1 −1 −1 = hi for all 1 ≤ i ≤ h − 1, A := x ∈ G : ϕ (g−1 i−1 · · · g1 x)ϕ (gi · · · g1 x) −1 −1 −1 −1 = hh , ϕ (g−1 h−1 · · · g1 x)φ (gh−1 · · · g1 x) −1 −1 −1 −1 φ (g−1 = hi+1 for all h ≤ i ≤ n . i−1 · · · g1 x)φ (gi · · · g1 x) 23    (h) (h) Then κn (x,~g) ∈ σ −1 (~h) if and only if x ∈ A. Hence (κn )∗ ( f )|σ −1 (~h) = ϕ∗ 1A · f |σ −1 (~g) . As f |σ −1 (~g) (h) (h) lies in L, L is res-invariant, and ϕ∗ ( f˜) ∈ ϕ∗ L for all f˜ ∈ L, we see that (κn )∗ ( f )|σ −1 (~h) ∈ ϕ∗ L. Hence kn is well-defined for all n and h. A straightforward computation shows that kn indeed gives us the desired chain homotopy. n is well-defined, i.e., (κ n )∗ ( f )| ∗ (ii) Let us show that k(h) g = (g1 , . . . , gn−1 ) ∈ Gn−1 and σ −1 (~g) ∈ ϕ M for all ~ (h) f ∈ Dn (M). As in the proof of (i), note that  −1 F := ϕ (x)ϕ (g−1 i x) : x ∈ G, 1 ≤ i ≤ n − 1  ∪ ϕ (x)φ (x)−1 : x ∈ G  −1 ∪ φ (x)φ (g−1 i x) : x ∈ G, 1 ≤ i ≤ n − 1 n (x,~ is finite, and that κ(h) g) ∈ σ −1 (F n ). For ~h = (h1 , . . . , hn ) ∈ F n , set  −1 −1 −1 −1 A~h := x ∈ G : ϕ (g−1 = hi for all 1 ≤ i ≤ h − 1, i−1 · · · g1 x)ϕ (gi · · · g1 x) −1 −1 −1 −1 ϕ (g−1 = hh , h−1 · · · g1 x)φ (gh−1 · · · g1 x) −1 −1 −1 −1 φ (g−1 = hi+1 for all h ≤ i ≤ n − 1 . i−1 · · · g1 x)φ (gi · · · g1 x) Then G = F ~h∈F n A~h , n (x,~ g) = (ϕ (x),~h). Hence and for x ∈ A~h , κ(h) n ∗ n ) ( f )|σ −1 (~g) (x) = f (κ(h) (x,~g)) = (κ(h) ∑ ~h∈F n   1A~h (x) · f |σ −1 (~h) (ϕ (x))    n )∗ ( f )| ∗ f| . Since f |σ −1 (~h) ∈ M, ϕ ∗ ( f˜) ∈ ϕ ∗ M for all f˜ ∈ M and and thus (κ(h) −1 ~ σ −1 (~g) = ∑~h∈F n 1A~h · ϕ σ (h) n )∗ ( f )| ∗ n ϕ ∗ M is res-invariant, this shows that (κ(h) σ −1 (~g) ∈ ϕ M. Hence k(h) is well-defined. It is straightforward n to check that k indeed gives us the desired cochain homotopy.  Now let ϕ : G → H be a coarse embedding, ω : H → G as above and L an res-invariant RG-submodule of (h) C(G,W ). Define ϑ : H → H , y 7→ (y, y(ϕ ◦ ω )(y)−1 ). For n ≥ 0 and 1 ≤ h ≤ n + 1, let λn : H (n) → H (n+1) (1) be given by λ0 = ϑ , and for n ≥ 1, (h) λn (η1 , . . . , ηn ) = (η1 , . . . , ηh−1 , ϑ (r(ηh )), (ϕ ◦ ω )1 (ηh ), . . . , (ϕ ◦ ω )1 (ηn )) for 1 ≤ h ≤ n, (n+1) λn (η1 , . . . , ηn ) = (η1 , . . . , ηn , ϑ (s(ηn ))). n : H (n−1) → H (n) be given by λ 1 = ϑ , and for n ≥ 2, Moreover, for n ≥ 1 and 1 ≤ h ≤ n, let λ(h) (1) n λ(h) (η1 , . . . , ηn−1 ) = (η1 , . . . , ηh−1 , ϑ (r(ηh )), (ϕ ◦ ω )1 (ηh ), . . . , (ϕ ◦ ω )1 (ηn−1 )) for 1 ≤ h ≤ n − 1, n (η1 , . . . , ηn−1 ) = (η1 , . . . , ηn−1 , ϑ (s(ηn−1 ))). λ(n) (h) (h) Lemma 4.37. (i) We have D∗ (ω ◦ ϕ ) ∼h id. ln = (λn )∗ : Dn (ϕ∗ L) → Dn (ϕ∗ L) is well-defined for all n and h+1 l (h) gives a chain homotopy D (ϕ ◦ ω ) ∼ id. h. ln := ∑n+1 n h ∗ h=1 (−1) n = (λ n ) : Dn (ϕ ∗−1 L) → D (ϕ ∗−1 L) is well-defined for all n and h. (ii) We have D∗ (ω ◦ ϕ ) ∼h id. l(h) n (h) ∗ n gives a chain homotopy D∗ (ϕ ◦ ω ) ∼ id. l n := ∑nh=1 (−1)h+1 l(h) h (h) Proof. (i) D∗ (ω ◦ ϕ ) ∼h id follows from Lemma 4.36 (i) and (8). That ln is well-defined can be proven as Lemma 4.34 (ii). It is straightforward to check that ln gives the desired chain homotopy. n is well-defined can be proven as (ii) D∗ (ω ◦ ϕ ) ∼h id follows from Lemma 4.36 (ii) and (8). That l(h) Lemma 4.35 (ii). It is straightforward to check that l n gives the desired cochain homotopy.  Combining Corollary 4.33 and Lemmas 4.34, 4.35, 4.36 and 4.37, we obtain Theorem 4.38. Let ϕ : G → H be a coarse map, L a res-invariant RG-submodule of C(G,W ) and M a resinvariant RH-submodule of C(G,W ). (i) D∗ (ϕ ) induces homomorphisms H∗ (ϕ ) : H∗ (G, L) → H∗ (H, ϕ∗ L). If ϕ is a coarse embedding, H∗ (ϕ ) is an isomorphism with inverse H∗ (ω ). If in addition L is a topological res-invariant module, D∗ (ϕ ) also induces topological isomorphisms H̄∗ (ϕ ) : H̄∗ (G, L) ∼ = H̄∗ (H, ϕ∗ L). If φ : G → H is a coarse map with ϕ ∼ φ , then H∗ (ϕ ) = H∗ (φ ), and H̄∗ (ϕ ) = H̄∗ (φ ) in the topological case. If ψ : H → K is another coarse map, then H∗ (ψ ◦ ϕ ) = H∗ (ψ ) ◦ H∗ (ϕ ), and H̄∗ (ψ ◦ ϕ ) = H̄∗ (ψ ) ◦ H̄∗ (ϕ ) in the topological case. 24 (ii) D∗ (ϕ ) induces homomorphisms H ∗ (ϕ ) : H ∗ (H, M) → H ∗ (G, ϕ ∗ M). If ϕ a coarse embedding, then : H ∗ (H, ϕ ∗−1 L) → H ∗ (G, L) is an isomorphism with inverse H ∗ (ω ). If in addition L and M are topological res-invariant modules, then D∗ (ϕ ) also induces continuous homomorphisms H̄ ∗ (ϕ ) : H̄ ∗ (H, M) → H̄ ∗ (G, ϕ ∗ M) and topological isomorphisms H̄ ∗ (ϕ ) : H̄ ∗ (H, ϕ ∗−1 L) → H̄ ∗ (G, L). If φ : G → H is a coarse map with ϕ ∼ φ , then H ∗ (ϕ ) = H ∗ (φ ), and H̄ ∗ (ϕ ) = H̄ ∗ (φ ) in the topological case. If ψ : H → K is another coarse map, then H ∗ (ψ ◦ ϕ ) = H ∗ (ϕ ) ◦ H ∗ (ψ ), and H̄ ∗ (ψ ◦ ϕ ) = H̄ ∗ (ϕ ) ◦ H̄ ∗ (ψ ) in the topological case. H ∗ (ϕ ) In particular, for coarse equivalences, i.e., coarse embeddings which are invertible modulo ∼, we get Corollary 4.39. If ϕ : G → H is a coarse equivalence, then we obtain isomorphisms ∼ H∗ (H, ϕ∗ L), H ∗ (ϕ ) : H ∗ (H, M) ∼ H∗ (ϕ ) : H∗ (G, L) = = H ∗ (G, ϕ ∗ M), and, in the topological case, H̄∗ (ϕ ) : H̄∗ (G, L) ∼ = H̄∗ (H, ϕ∗ L), H̄ ∗ (ϕ ) : H̄ ∗ (H, M) ∼ = H̄ ∗ (G, ϕ ∗ M). Remark 4.40. Our constructions are functorial in W : Let L1 ⊆ C(G,W1 ) and L2 ⊆ C(G,W2 ) be res-invariant RG-submodules, and assume that an R-linear map ω : W1 → W2 induces an RG-linear map λ : L1 → L2 . Then we also obtain an induced map ϕ∗ λ : ϕ∗ L1 → ϕ∗ L2 , and we get commutative diagrams D∗ (L1 ) D∗ ( ϕ ) / D∗ (ϕ∗ L1 ) D∗ ( λ )  D∗ (L2 ) H∗ (G, L1 ) D∗ (ϕ∗ λ ) / H∗ (H, ϕ∗ L1 ) H∗ (λ )   / D∗ (ϕ∗ L2 ) H∗ (G, L2 ) D∗ ( ϕ ) H∗ (ϕ ) H∗ (ϕ∗ λ ) H∗ (ϕ )  / H∗ (H, ϕ∗ L2 ) A similar statement applies to reduced homology in the topological setting, and to (reduced) cohomology. 4.4. Consequences. Let us apply our results to the Examples in 4.2. Corollary 4.41 (i) (c) below generalizes the result in [19] that H n (G, RG) is a coarse invariant for groups with property Fn . The reader may also consult [40, Example 5.21]. Corollary 4.41 (ii) (1) was known in special cases. For instance, in [16], group cohomology with ℓ p coefficients has been identified with nonreduced L p -cohomology, and in [38, 7, 29], reduced group cohomology in degree 1 (i.e., H̄ 1 ) with ℓ p coefficients has been identified with L p -cohomology, as studied in [20, 35]. Since L p -cohomology is known to be a coarse invariant, this gives the special case of (ii) (1) where p ∈ [1, ∞[ and our groups are finitely generated. Also, the case p = ∞ in (ii) (1) was known since H∗ (G, ℓ∞ G) can be identified with uniformly finite homology (see [5, 8]). Corollary 4.41. Let G and H be countable discrete groups and ϕ : G → H a coarse equivalence. (i) For every commutative ring R with unit and every R-module W , ϕ induces isomorphisms (a) H∗ (G,C(G,W )) ∼ = H∗ (H,C(H,W )), (b) H∗ (G,C f (G,W )) ∼ = H∗ (H,C f (H,W )) and H ∗ (G,C f (G,W )) ∼ = H ∗ (H,C f (H,W )), (c) H ∗ (H, RH ⊗R W ) ∼ = H ∗ (G, RG ⊗R W ). (ii) Let R = R or R = C and W = R. (1) For all 0 < p ≤ ∞, ϕ induces isomorphisms H∗ (G, ℓ p (G,W )) ∼ = H∗ (H, ℓ p (H,W )), H ∗ (H, ℓ p (H,W )) ∼ = H ∗ (G, ℓ p (G,W )), H̄∗ (G, ℓ p (G,W )) ∼ = H̄∗ (H, ℓ p (H,W )), H̄ ∗ (H, ℓ p (H,W )) ∼ = H̄ ∗ (G, ℓ p (G,W )), (2) ϕ induces isomorphisms H∗ (G, c0 (G,W )) ∼ = H∗ (H, c0 (H,W )), H ∗ (H, c0 (H,W )) ∼ = H ∗ (G, c0 (G,W )), H̄∗ (G, c0 (G,W )) ∼ = H̄∗ (H, c0 (H,W )), H̄ ∗ (H, c0 (H,W )) ∼ = H̄ ∗ (G, c0 (G,W )). (3) Let G and H be a finitely generated discrete groups. Then, for all s ∈ R ∪ {∞} and 1 ≤ p ≤ ∞, ϕ induces isomorphisms H∗ (G, H s,p (G,W )) ∼ = H∗ (H, H s,p (H,W )), H ∗ (H, H s,p (H,W )) ∼ = H ∗ (G, H s,p (G,W )), H̄∗ (G, H s,p (G,W )) ∼ = H̄∗ (H, H s,p (H,W )), H̄ ∗ (H, H s,p (H,W )) ∼ = H̄ ∗ (G, H s,p (G,W )). Proof. The point is that L(G) = C(G,W ), C f (G,W ), RG ⊗R W , ℓ p (G,W ), c0 (G,W ) or H s,p (G,W ) have the property that for every coarse equivalence ϕ : G → H, we have ϕ∗ L(G) = L(H) (and also topologically in the topological setting). Our claim now follows from Corollary 4.39.  25 As an immediate consequence, we obtain a new proof of the result in [41] that homological and cohomological dimensions over R are preserved by coarse embeddings as long as these dimensions are finite. Corollary 4.42. Let R be a commutative ring with unit. Let G and H be countable discrete groups, and assume that there is a coarse embedding ϕ : G → H. If G has finite homological dimension over R, i.e., hdR G < ∞, then hdR G ≤ hdR H. If G has finite cohomological dimension over R, i.e., cdR G < ∞, then cdR G ≤ cdR H. Proof. Assume that hdR G = n < ∞. Let W be an RG-module such that Hn (G,W ) ≇ {0}. Define W ֒→ C(G,W ), w 7→ fw , where fw (x) = x−1 .w. It is easy to see that this is an embedding of RG-modules when we view W as an R-module to construct C(G,W ) (i.e., we define the RG-module structure by setting (g. f )(x) = f (g−1 .x) for f ∈ C(G,W )). The long exact sequence in homology gives us 0 → Hn (G,W ) → Hn (G,C(G,W )) → . . . because the (n+ 1)-th group homology of G vanishes for all coefficients by assumption. Hence Hn (G,C(G,W )) ≇ {0}. By Theorem 4.38 (i), we have Hn (H, ϕ∗C(G,W )) ∼ = Hn (G,C(G,W )) ≇ {0}. Thus hdR H ≥ n. Now assume cdR G = n < ∞. By [9, Proposition (2.3)], we know that H n (G, RG ⊗R W ) ≇ {0} for some R-module W . By Theorem 4.38 (ii), H n (H, ϕ ∗−1 (RG ⊗R W )) ∼ = H n (G, RG ⊗R W ) ≇ {0}. Thus cdR H ≥ n.  We also obtain a new proof for the following result, first proven in [41]: Corollary 4.43. Let R, G and H be as above. Assume that ϕ : G → H is a coarse embedding. If G is amenable and Q ⊆ R, then hdR G ≤ hdR H and cdR G ≤ cdR H. Proof. As explained in [41, § 4], it was observed in [43] that our assumptions on G and R imply the existence of an RG-linear split C f (G, R) → R for the canonical homomorphism R → C f (G, R) embedding R as constant functions. Hence, given an arbitrary RG-module V , we obtain by tensoring with V over R that the canonical homomorphism V → C f (G,V ) splits. Note that G acts on C f (G,V ) diagonally, so that C f (G,V ) is not a res-invariant module in our sense. But C f (G,V ) ∼ = C f (G,Vtriv ), where Vtriv is the R-module V viewed as a RGmodule with trivial G-action. Hence hdR G = supn n: Hn (G,C f (G,W )) ≇ {0} for some R-module W . As Hn (H, ϕ∗C f (G,W )) ∼ = Hn (G,W ) by Theorem 4.38 (i), we conclude that hdR G ≤ hdR H. The proof for cdR is analogous.  At this point, the following interesting question arises naturally: Question 4.44. Let R be a commutative ring with unit, G and H countable discrete groups with no R-torsion. If G and H are coarsely equivalent, do we always have hdR G = hdR H and cdR G = cdR H? Having no R-torsion means that orders of finite subgroups must be invertible in R, and this is certainly a hypothesis we have to include. For instance, [36, Theorem 1.4] implies that the answer to Question 4.44 is affirmative if our groups lie in the class HF . This class HF has been introduced by Kropholler in [24] and is defined as the smallest class of groups containing all finite groups and every group G which acts cellularly on a finite dimensional contractible CW-complex with all isotropy subgroups already in HF . All countable elementary amenable groups and all countable linear groups lie in HF , and it is closed under subgroups, extensions, and countable direct unions. Corollary 4.45 (to Theorem 1.4 in [37]). If G and H are in HF , then the answer to Question 4.44 is affirmative. Proof. [37, Theorem 1.4] implies that  (15) cdR G = sup cdR G′ : G′ coarsely embeds into G and cdR G′ < ∞ . Similarly for H. Now Corollary 4.42 implies cdR G = cdR H. Equality for hdR follows because for countable groups, cdR is infinite if and only if hdR is infinite by [4, Theorem 4.6].  Remark 4.46. The proof of Corollary 4.45 shows that Question 4.44 has an affirmative answer among all groups satisfying (15). In particular, for groups satisfying [37, Conjecture 1.6], Question 4.44 has an affirmative answer. While counterexamples to [37, Conjecture 1.6] are presented in [18], these examples still satisfy (15), as becomes clear in [18]. Hence also for them, Question 4.44 has an affirmative answer. Let us now show that being of type FPn over a ring R is a coarse invariant. An alternative approach, based on [23], has been sketched in [15, Theorem 9.61]. The case R = Z is treated in [2]. Recall that for a commutative ring R with unit, a group G is of type FPn over R if the trivial RG-module R has a projective resolution . . . → P1 → P0 → R → 0 where Pi is finitely generated for all 0 ≤ i ≤ n. Corollary 4.47. Let G and H be two countable discrete groups. Assume that G and H are coarsely equivalent. Then G is a of type FPn over R if and only if H is of type FPn over R. 26 Proof. By [4, Proposition 2.3], G is of type FPn over R if and only if G is finitely generated and Hk (G, ∏I RG) ∼ = {0} for all 1 ≤ k ≤ n, where I is an index set with |I| = max(ℵ0 , |R|). The map ∏I RG → C(G, ∏I R), ( fi )i 7→ f , where ( f (x))i = fi (x), identifies ∏I RG with the RG-submodule L(G) of C(G, ∏I R) consisting of those functions f with the property that for every i ∈ I, ( f (x))i = 0 for all but finitely many x ∈ G. Clearly, L(G) is res-invariant. Denote the analogous res-invariant RH-submodule of C(H, ∏I R) by L(H). It is easy to see that given a coarse equivalence ϕ : G → H, we have ϕ∗ L(G) = L(H). Hence, by Theorem 4.38 (i), we have  Hk (G, ∏I RG) ∼ = Hk (H, ∏I RH). = Hk (H, L(H)) ∼ = Hk (G, L(G)) ∼ As another consequence, we generalize the result in [19] that for groups of type F∞ , being a (Poincaré) duality group over Z is a coarse invariant. We obtain an improvement since we can work over arbitrary rings R and do not need the F∞ assumption. We only need our groups to have finite cohomological dimension over R. Recall that a group G is called a duality group over R if there is a right RG-module C and an integer n ≥ 0 with natural isomorphisms H k (G, A) ∼ = Hn−k (G,C ⊗R A) for all k ∈ Z and all RG-modules A (see [4, § 9.2], [3], and [9, Chapter VIII, § 10]). G is called a Poincaré duality group over R if C ∼ = R as R-modules. The class of duality groups is closed under extensions and under taking graphs of groups, with certain hypotheses (see [4, 14]). Examples of groups which are not duality groups over Z but over some other ring can be found in [13], and examples of (Poincaré) duality groups which are not of type F∞ appear in [13, 25]. The second part of the following corollary generalizes [43, Theorem 3.3.2]. Corollary 4.48. Let R be a commutative ring with unit. Let G and H be countable discrete groups with finite cohomological dimension over R. If G and H are coarsely equivalent, then G is a (Poincaré) duality group over R if and only if H is a (Poincaré) duality group over R. If G and H are amenable and Q ⊆ R, then G is a (Poincaré) duality group over R if and only if H is a (Poincaré) duality group over R. Proof. By [3, Theorem 5.5.1 and Remark 5.5.2], we know that a group G is a duality group if and only if it has finite cohomological dimension, there is n such that H k (G, A) ∼ = {0} for all k 6= n and all induced RGmodules A, and G is of type FPn over R. The second property is a coarse invariant by Corollary 4.41 (i) (c). The third property is a coarse invariant by Corollary 4.47. Hence being a duality group is a coarse invariant. Being a Poincaré duality group means being a duality group and having dualizing module isomorphic to R. By Corollary 4.41 (i) (c), the dualizing module is a coarse invariant. Thus being a Poincaré duality group is also a coarse invariant. The second part follows from the first part of the corollary and Corollary 4.43.  If Question 4.44 has an affirmative answer, then we can replace the assumption of finite cohomological dimension by having no R-torsion in the first part of Corollary 4.48. As another consequence, we obtain the following rigidity result for coarse embeddings into Poincaré duality groups. The proof follows the one of [4, Proposition 9.22]. Corollary 4.49. Let G and H be countable discrete groups. Let H be a Poincaré duality group over a commutative ring R with unit. Assume that there is a coarse embedding ϕ : G → H which is not a coarse equivalence. If hdR G < ∞, then hdR G < cdR H. If, in addition, G is of type FP∞ (i.e, FPn for all n), then cdR G < cdR H. In particular, every self coarse embedding of a Poincaré duality group over R must be a coarse equivalence. Proof. Let n = cdR H. Let D = H n (R, RH). As H is a Poincaré duality group over R, D ∼ = R as R-modules, and the RH-module structure of D is given by a group homomorphism H → R∗ , h 7→ uh . We know that hdR G ≤ cdR G ≤ n by [4, Theorem 4.6] and Corollary 4.42. Now let L be a res-invariant RG-submodule of C(G,W ). H Then, by Theorem 4.38 (i), Hn (G, L) ∼ = H 0 (H, Hom R (D, ϕ∗ L)) ∼ = (Hom R (D, ϕ∗ L)) , where we = Hn (H, ϕ∗ L) ∼ used that H is a Poincaré duality group over R. Clearly, Hom R (D, ϕ∗ L) ∼ = ϕ∗ L as R-modules, and the H-action of Hom R (D, ϕ∗ L) becomes h• f = uh · (h. f ) for f ∈ ϕ∗ L. Now take f ∈ (ϕ∗ L)H . If f 6= 0, then f (y) 6= 0 for some y ∈ H, and it follows from h• f = f for all h ∈ H that f (y) 6= 0 for all y ∈ H. This, however, contradicts Lemma 4.12 as H cannot be contained in a finite union of h jY j s if ϕ is not a coarse equivalence. Hence Hn (G, L) ∼ = (ϕ∗ L)H ∼ = {0}. This implies hdR G < n (compare also the proof of Corollary 4.42). The rest follows from [4, Theorem 4.6 (c)] and that Poincaré duality groups are of type FP∞ .  Question 4.50. In Corollary 4.49, do we always get cdR G < cdR H, even without the FP∞ assumption? In other words, is the analogue of the main theorem in [45] true for coarse embeddings? We present one more application: Vanishing of ℓ2 -Betti numbers is a coarse invariant. This was shown in [35] for groups of type F∞ , for more general groups in [34] (as explained in [42]), and for all countable discrete groups in [32, Corollary 6.3]. Recently, Sauer and Schrödl were even able to cover all unimodular locally 27 compact second countable groups [42]. As vanishing of the n-th ℓ2 -Betti number is equivalent to H̄ n (G, ℓ2 G) ∼ = {0} by [36, Proposition 3.8], Corollary 4.41 (ii) (1) gives another approach to the aforementioned result. Corollary 4.51. Let G and H be countable discrete groups which are coarsely equivalent. Then, for all n, the n-th ℓ2 -Betti number of G vanishes if and only if the n-th ℓ2 -Betti number of H vanishes. R EFERENCES [1] V. A LEKSEEV and M. F INN -S ELL , Sofic boundaries of groups and coarse geometry of sofic approximations, preprint, arXiv:1608.02242v2. [2] J.M. A LONSO, Finiteness conditions on groups and quasi-isometries, J. Pure Appl. Algebra 95 (1994), 121–129. [3] R. B IERI, On groups of finite cohomological dimension and duality groups over a ring, J. Pure Appl. Algebra 6 (1975), 83–110. [4] R. B IERI, Homological dimension of discrete groups, Queen Mary College Mathematics Notes, Mathematics Department, Queen Mary College, London, 1976. [5] M. B LANK and F. D IANA, Uniformly finite homology and amenable groups, Algebr. Geom. Topol. 15 (2015), 467–492. [6] J. B LOCK and S. W EINBERGER, Aperiodic tilings, positive scalar curvature and amenability of spaces, J. Amer. Math. Soc. 5 (1992), 907–918. [7] M. B OURDON, F. Martin and A. VALETTE , Vanishing and non-vanishing for the first L p -cohomology of groups, Comment. Math. Helv. 80 (2005), 377–389. [8] J. B RODZKI, G.A. N IBLO and N. W RIGHT , Pairings, duality, amenability and bounded cohomology, J. Eur. Math. Soc. 14 (2012), 1513–1518. [9] K.S. B ROWN, Cohomology of groups, Graduate Texts in Mathematics 87, Springer, 1982. [10] T.M. C ARLSEN, E. RUIZ and A. S IMS, Equivalence and stable isomorphism of groupoids, and diagonal-preserving stable isomorphisms of graph C∗ -algebras and Leavitt path algebras, Proc. Amer. Math. Soc. 145 (2017), 1581–1592. [11] M. C RAINIC and I. M OERDIJK, A homology theory for étale groupoids, J. reine angew. Math. 521 (2000), 25–46. [12] C. DAS, From the geometry of box spaces to the geometry and measured couplings of groups, to appear in J. Topol. Anal., arXiv:1512.08828v2. [13] M. DAVIS, Poincaré duality groups, Surveys on surgery theory, Vol. 1, 167–193, Ann. of Math. Stud., 145, Princeton Univ. Press, Princeton, NJ, 2000. [14] F. D EMBEGIOTI and O. TALELLI, On some examples of duality groups, Arch. Math. (Basel) 90 (2008), 304–310. [15] C. D RUTU and M. K APOVICH, Lectures on geometric group theory, to be published in the AMS series “Colloquium Publications”, available at https://www.math.ucdavis.edu/~ kapovich/papers.html, retrieved on 18 January 2017. [16] G. E LEK, Coarse cohomology and l p -cohomology, K-Theory 13 (1998), 1–22. [17] A. F URMAN, Orbit equivalence rigidity, Ann. of Math. (2) 150 (1999), 1083–1108. [18] G. G ANDINI, Cohomological invariants and the classifying space for proper actions, Groups Geom. Dyn. 6 (2012), 659–675. [19] S.M. G ERSTEN, Quasi-isometry invariance of cohomological dimension, C.R. Acad. Sci. Paris Sér. I Math. 316 (1993), 411–416. [20] M. G ROMOV, Asymptotic invariants of infinite groups, Geometric group theory, Vol. 2 (Sussex, 1991), 1–295, London Math. Soc. Lecture Note Ser., 182, Cambridge Univ. Press, Cambridge, 1993. [21] A. G UICHARDET , Cohomologie des groupes topologiques et des algèbre de Lie, Textes Mathématiques, 2. CEDIC, Paris, 1980. [22] P. J OLISSAINT , Rapidly decreasing functions in reduced C*-algebras of groups, Trans. Amer. Math. Soc. 317 (1990), 167–196. [23] M. K APOVICH and B. K LEINER, Coarse Alexander duality and duality groups, J. Differential Geom. 69 (2005), 279–352. [24] P.H. K ROPHOLLER, On groups of type (FP)∞ , J. Pure Appl. Algebra 90 (1993), 55–67. [25] I.J. L EARY, Uncountably many groups of type FP, preprint, arXiv:1512.06609v3. [26] X. L I, Continuous orbit equivalence rigidity, to appear in Ergod. Th. Dyn. Sys., arXiv:1503.01704. [27] X. L I, Partial transformation groupoids attached to graphs and semigroups, to appear in Int. Math. Res. Not., arXiv:1603.09165. [28] X. L I and J. R ENAULT , Cartan subalgebras in C*-algebras. Existence and uniqueness, preprint, arXiv:1703.10505. [29] F. M ARTIN and A. VALETTE , On the first L p -cohomology of discrete groups, Groups Geom. Dyn. 1 (2007), 81–100. [30] H. M ATUI, Homology and topological full groups of étale groupoids on totally disconnected spaces, Proc. Lond. Math. Soc. 104 (2012), 27–56. [31] K. M EDYNETS, R. S AUER and A. T HOM, Cantor systems and quasi-isometry of groups, preprint, arXiv:1508.07578. [32] M. M IMURA, N. O ZAWA, H. S AKO and Y. S UZUKI, Group approximation in Cayley topology and coarse geometry, III: Geometric property (T), Algebr. Geom. Topol. 15 (2015), 1067–1091. [33] L. M OSHER, M. S AGEEV and K. W HYTE , Quasi-actions on trees II: Finite depth Bass-Serre trees, Mem. Amer. Math. Soc. 214 (2011). [34] S.-I. O GUNI, l 2 -invariants of discrete groups under coarse equivalence and l 2 -invariants of cocompact étale groupoids, preprint. [35] P. PANSU, Cohomologie Lp: invariance sous quasiisométries, preprint, available at https://www.math.u-psud.fr/~ pansu/liste-prepub.html [36] H.D. P ETERSEN, L2 -Betti Numbers of Locally Compact Groups, preprint, arXiv:1104.3294v3. [37] N. P ETROSYAN, Jumps in cohomology and free group actions, J. Pure Appl. Algebra 210 (2007), 695–703. [38] M.J. P ULS, Group cohomology and L p -cohomology of finitely generated groups, Canad. Math. Bull. 46 (2003), 268–276. [39] J. R ENAULT , A Groupoid Approach to C*-Algebras, Lecture Notes in Math. 793, Springer, Berlin Heidelberg New York, 1980. [40] J. ROE , Lectures on coarse geometry, University Lecture Series, 31, American Mathematical Society, Providence, RI, 2003. [41] R. S AUER, Homological invariants and quasi-isometry, Geom. Funct. Anal. 16 (2006), 476–515. [42] R. S AUER and M. S CHR ÖDL , Quasi-isometry invariance of vanishing of l 2 -Betti numbers of locally compact groups, preprint, arXiv:1702.01685v2. [43] Y. S HALOM, Harmonic analysis, cohomology, and the large-scale geometry of amenable groups, Acta Math. 192 (2004), 119– 185. [44] J. S PAKULA and R. W ILLETT , On rigidity of Roe algebras, Adv. Math. 249 (2013), 289–310. 28 [45] R. S TREBEL , A remark on subgroups of infinite index in Poincaré duality groups, Comment. Math. Helv. 52 (1977), 317–324. X IN L I , S CHOOL OF M ATHEMATICAL S CIENCES , Q UEEN M ARY U NIVERSITY OF L ONDON , M ILE E ND ROAD , L ONDON E1 4NS, U NITED K INGDOM E-mail address: [email protected] 29
4math.GR
arXiv:1709.01535v1 [cs.DS] 5 Sep 2017 Just Take the Average! An Embarrassingly Simple 2n-Time Algorithm for SVP (and CVP) Divesh Aggarwal Centre for Quantum Technologies [email protected] Noah Stephens-Davidowitz∗ New York University [email protected] Abstract n+o(n) We show a 2 -time (and space) algorithm for the Shortest Vector Problem on lattices (SVP) that works by repeatedly running an embarrassingly simple “pair and average” sievinglike procedure on a list of lattice vectors. This matches the running time (and space) of the current fastest known algorithm, due to Aggarwal, Dadush, Regev, and Stephens-Davidowitz (ADRS, in STOC, 2015), with a far simpler algorithm. Our algorithm is in fact a modification of the ADRS algorithm, with a certain careful rejection sampling step removed. The correctness of our algorithm follows from a more general “meta-theorem,” showing that such rejection sampling steps are unnecessary for a certain class of algorithms and use cases. In particular, this also applies to the related 2n+o(n) -time algorithm for the Closest Vector Problem (CVP), due to Aggarwal, Dadush, and Stephens-Davidowitz (ADS, in FOCS, 2015), yielding a similar embarrassingly simple algorithm for γ-approximate CVP for any γ = 1 + 2−o(n/ log n) . (We can also remove the rejection sampling procedure from the 2n+o(n) -time ADS algorithm for exact CVP, but the resulting algorithm is still quite complicated.) 1 Introduction A lattice L ⊂ Rn is the set of all integer linear combinations of some linearly independent basis vectors b1 , . . . , bn ∈ Rn , L := n nX i=1 o zi bi : zi ∈ Z . The two most important computational problems on lattices are the Shortest Vector Problem (SVP) and the Closest Vector Problem (CVP). Given a basis b1 , . . . , bn for a lattice L ⊂ Rn , SVP asks us to find a shortest non-zero vector in L, and CVP asks us to find a closest lattice vector to some target vector t ∈ Rn . (Throughout this paper, we define distance in terms of the Euclidean, or ℓ2 , norm.) CVP seems to be the harder of the two problems, as there is an efficient reduction from CVP to SVP that preserves the dimension n [GMSS99], but both problems are known to be NPhard [vEB81, Ajt98]. They are even known to be hard to approximate for certain approximation factors [Mic01, DKRS03, Kho05, HR12]. ∗ Supported by the National Science Foundation (NSF) under Grant No. CCF-1320188, and the Defense Advanced Research Projects Agency (DARPA) and Army Research Office (ARO) under Contract No. W911NF-15-C-0236. 1 Algorithms for solving these problems, both exactly and over a wide range of approximation factors, have found innumerable applications since the founding work by Lenstra, Lenstra, and Lovász in 1982 [LLL82]. (E.g., [LLL82, Len83, Sha84, Kan87, dB89].) More recently, following the celebrated work of Ajtai [Ajt04] and Regev [Reg09], a long series of works has resulted in many cryptographic constructions whose security is based on the assumed worst-case hardness of approximating these (or closely related) problems. (See [Pei16] for a survey of such constructions.) And, some of these constructions are now nearing widespread deployment. (See, e.g., [NIS16, ADPS16, BCD+ 16].) Nearly all of the fastest known algorithms for lattice problems—either approximate or exact— work via a reduction to either exact SVP or exact CVP (typically in a lower dimension). Even the fastest known polynomial-time algorithms (which solve lattice problems only up to large approximation factors) work by solving exact SVP on low-dimensional sublattices [Sch87, GN08, MW16]. Therefore, algorithms for exact lattice problems are of particular importance, both theoretically and practically (and both for direct applications and to aid in the selection of parameters for cryptography). Indeed, much work has gone into improving the running time of these algorithms (e.g., [Kan87, AKS01, AKS02, PS09, MV10, MV13]), culminating in 2n+o(n) -time algorithms for both problems based on the technique of discrete Gaussian sampling, from joint work with Dadush and Regev [ADRS15] and follow-up work with Dadush [ADS15]. In order to explain our contribution, we first give a high-level description of the SVP algorithm from [ADRS15]. (The presentation below does not represent the way that we typically view the [ADRS15] algorithm.) 1.1 Sieving by averages One can think of the SVP algorithm from [ADRS15] as a rather strange variant of randomized sieving. Recall that the celebrated randomized sieving technique due to Ajtai, Kumar, and Sivakumar [AKS01] starts out with a list of 2O(n) not-too-long random vectors X 1 , . . . , X M sampled from some efficiently samplable distribution. The sieving algorithm then repeatedly (1) searches for pairs of vectors (X i , X j ) that happen to be remarkably close together; and then (2) replaces the old list of vectors with the differences of these pairs X i − X j . The [ADRS15] algorithm similarly starts with a randomly chosen collection of 2n+o(n) nottoo-long vectors X 1 , . . . , X M and repeatedly (1) selects pairs of vectors according to some rule; and (2) replaces the old list of vectors with some new vectors generated from these pairs. However, instead of taking the differences X i −X j of pairs (X i , X j ), the [ADRS15] algorithm takes averages, (X i + X j )/2. Notice that the average (X i + X j )/2 of two lattice vectors X i , X j ∈ L will not generally be in the lattice. In fact, this average will be in the lattice if and only if the two vectors are equivalent mod 2L, i.e., X i ≡ X j mod 2L. Therefore, at a minimum, the [ADRS15] algorithm should select pairs that lie in the same coset mod 2L. (Notice that there are 2n possible cosets.) I.e., the simplest possible version of “sieving by averages” just repeats Procedure 1 many times (starting with a list of 2n+o(n) vectors, which is sufficient to guarantee that we can pair nearly every vector with a different unique vector in the same coset). The [ADRS15] algorithm is more complicated than this, but it still only uses the cosets of the vectors mod 2L when it decides which vectors to pair. It might seem like a rather big sacrifice to only look at a vector’s coset, essentially ignoring all geometric information. For example, the [ADRS15] algorithm (and our variant) is likely to miss many opportunities to pair two vectors whose average is very short. But, in exchange for 2 Pair and Average (X 1 , . . . , X M ) Input : List of vectors X i ∈ L − t Output : List of vectors Y i ∈ L − t for each unpaired vector X i do if there exists an unpaired vector X j with X j ≡ X i mod 2L then add (X i + X j )/2 to the output end end Procedure 1: The basic “pair and average” procedure, which computes the averages (X i + X j )/2 of disjoint pairs (X i , X j ) satisfying X i ≡ X j mod 2L. this sacrifice, we get very strong control over the distribution of the vectors at each step. In particular, before applying Procedure 1, the [ADRS15] algorithm uses a careful rejection sampling procedure over the cosets to guarantee that at each step of the algorithm, the vectors are distributed as independent samples from a distribution that we understand very well (the discrete Gaussian, which we describe in Section 1.3). I.e., at each step, the algorithm randomly throws away many of the vectors in each coset according to some rule that depends only on the list of cosets, and it only runs Procedure 1 on the remaining vectors, as shown in Procedure 2. This rejection sampling procedure is so selective that, though the algorithm starts out with 2n+o(n) vectors, it typically finishes with only about 2n/2 vectors. Reject-and-Average Sieve (ℓ; X 1 , . . . , X M ) Input : Number of steps ℓ, list of vectors X i ∈ L − t Output : List of vectors Y i ∈ L − t for i = 1, . . . , ℓ do for j = 1, . . . , M do set cj to be the coset of X j mod 2L end {j1 , . . . , jm } ← f (c1 , . . . , cM ) (X 1 , . . . , X M ′ ) ← Pair and Average(X j1 , . . . , X jm ) M ← M′ end output (X 1 , . . . , X M ). Procedure 2: The “reject and average” sieving procedure, which repeatedly applies some rejection sampling procedure f according to the cosets of the X i mod 2L and then applies Procedure 1 (Pair and Average) to the “accepted” vectors. Here, f is some (possibly randomized) function that maps a list of cosets (c1 , . . . , cM ) mod 2L to a set of “accepted” indices {j1 , . . . , jm } ⊆ {1, . . . , M }. This does seem quite wasteful (since the algorithm typically throws away the vast majority of its input vectors) and a bit naive (since the algorithm ignores, e.g., the lengths of the vectors). But, because we get such good control over the output distribution, the result is still the fastest known 3 algorithm for SVP.1 (The [ADS15] algorithm for CVP relies on the same core idea, plus a rather complicated recursive procedure that converts an approximate CVP algorithm with certain special properties into an exact CVP algorithm.) 1.2 Our contribution Our main contribution is to show that the rejection sampling procedure used in the [ADRS15] algorithm is unnecessary! Indeed, informally, we show that “any collection of vectors that can be found via such a procedure (when the input vectors are sampled independently from an appropriate distribution) can also be found without it.” (We make this precise in Theorem 3.4.) In particular, the SVP algorithm in [ADRS15] can be replaced by an extremely simple algorithm, which starts with a list of 2n+o(n) vectors sampled from the right distribution and then just runs Procedure 1 repeatedly. (Equivalently, it runs Procedure 2 with f taken to be the trivial function that always outputs all indices, {1, . . . , M }.) Theorem 1.1 (SVP, informal). There is a 2n+o(n) -time (and space) algorithm for SVP that starts with 2n+o(n) vectors sampled from the same distribution as the [ADRS15] algorithm and then simply applies Procedure 1 repeatedly, ℓ = O(log n) times. The situation for CVP is, alas, more complicated because Procedure 2 is not the most difficult part of the exact CVP algorithm from [ADS15]. Indeed, while this algorithm does run Procedure 2 and we do show that we can remove the rejection sampling procedure, the resulting algorithm retains the complicated recursive structure of the original [ADS15] algorithm. However, [ADS15] also shows a much simpler non-recursive version of their algorithm that solves CVP up to an extremely good approximation factor. If we are willing to settle for such an algorithm, then we get the same result for CVP. Theorem 1.2 (CVP, informal). There is a 2n+o(n) -time (and space) algorithm that approximates CVP up to an approximation factor γ for any γ = 1 + 2−o(n/ log n) that starts with 2n+o(n) vectors from the same distribution as the [ADS15] algorithm and then simply applies Procedure 1 repeatedly, ℓ = o(n/ log n) times. In practice, such a tiny approximation factor is almost always good enough for applications. 1.3 Proof techniques To describe the technical ideas behind our result, we now define the discrete Gaussian distribution, which plays a fundamental role in the algorithms in [ADRS15, ADS15] and a big part in our analysis. For any vector x ∈ Rn and parameter s > 0, we define its Gaussian mass as ρs (x) := exp(−πkxk2 /s2 ) , and we extend this definition to a shift of a lattice L ⊂ Rn with shift vector t ∈ Rn in the natural way, X ρs (L − t) := ρs (y − t) . y∈L 1 There are various “heuristic” sieving algorithms for SVP that run significantly faster (e.g., in time (3/2)n/2 [BDGL16]) but do not have formal proofs of correctness. One of the reasons that these algorithms lack proofs is because we do not understand their output distributions. 4 The discrete Gaussian distribution DL−t,s is the probability distribution over L − t induced by this measure, given by ρs (y − t) Pr [X = y − t] := X∼DL−t,s ρs (L − t) for any y ∈ L. For very large parameters s > 0, we can sample from the discrete Gaussian DL−t,s efficiently [GPV08, BLP+ 13]. (Notice that DL−t,s tends to concentrate on shorter vectors as the parameter s > 0 gets smaller. In particular, [ADRS15] showed that about 1.38n independent samples from the discrete Gaussian DL,s with an appropriately chosen parameter s will contain a shortest non-zero lattice vector with high probability. See Proposition A.7.) So, in [ADRS15, ADS15], we use Procedure 2 with a carefully chosen rejection sampling procedure f in order to convert many independent samples from DL−t,s with a relatively large parameter s to some smaller number of independent samples from DL−t,s/2ℓ/2 . This rejection sampling is certainly necessary if we wish to use Procedure 1 to sample from the discrete Gaussian distribution. Our new observation is that, even when we do not do this rejection sampling, the output of Procedure 1 still has a nice distribution. In particular, if we fix the coset mod 2L of a pair of discrete Gaussian vectors (X i , X j ) with parameter √ s > 0, then their average will be distributed as a mixture of discrete Gaussians with parameter s/ 2 over the cosets of 2L. I.e., while the probability of their average landing in any particular coset will not in general be proportional to the Gaussian mass of the coset, the distribution inside each coset will be exactly Gaussian. (See Lemma 3.1.) This observation is sufficient to prove that no matter what rejection sampling procedure f we use in Procedure 2, if the input consists of independent samples from DL−t,s , the output will always be distributed as some mixture of samples from D2L+c−t,s/2ℓ/2 over the cosets c ∈ L/(2L). I.e., while the output distribution might distribute weight amongst the cosets differently, if we condition on a fixed number of vectors landing in each coset, the output will always be distributed as independent discrete Gaussian vectors with parameter s/2ℓ/2 . It follows immediately that “rejection sampling cannot help us.” In particular, the probability that the output of Procedure 2 will contain a particular vector (say a shortest non-zero vector) with any rejection sampling procedure f will never be greater than the probability that we would see that vector without rejection sampling (i.e., when f is the trivial function that outputs {1, . . . , M }).2 See Corollary 3.3 and Theorem 3.4 for more detail. 1.4 An open problem—towards a 2n/2 -time algorithm Our result shows that all known applications of the 2n+o(n) -time discrete Gaussian sampling algorithms in [ADRS15, ADS15] work just as well if we remove the rejection sampling procedure from these algorithms. This in particular includes the SVP application mentioned in Theorem 1.1 and the approximate CVP application mentioned in Theorem 1.2. (More generally, we can remove the rejection sampling procedure from any application that simply relies on finding a set of vectors with a certain property in the output distribution, such as a shortest non-zero vector, all shortest non-zero vectors, a vector that is close to a shortest lattice vector in L − t, etc.) 2 Notice that this property is far from obvious without the observation that the output distribution is always a mixture of Gaussians over the cosets. For example, if we modified Procedure 2 so that f acted on the X i themselves, rather than just their cosets mod 2L, then this property would no longer hold. 5 However, [ADRS15] also presents a 2n/2+o(n) -time algorithm that samples from DL−t,s as long √ as the parameter s > 0 is not too small. (In particular, we need s ≥ 2η1/2 (L), where η1/2 (L) is the smoothing parameter of the lattice. See [ADRS15] or [Ste17] for the details.) This algorithm is similar to the 2n+o(n) -time algorithms in that it starts with independent discrete Gaussian vectors with some high parameter, and it gradually lowers the parameter using a rejection sampling procedure together with a procedure that takes the averages of pairs of vectors that lie in the same coset modulo some sublattice. But, it fails for smaller parameters specifically because the rejection sampling procedure that it uses must throw out too many vectors in this case. (In [Ste17], we use a different rejection sampling procedure that never throws away too many vectors, but we do not √ n/2+o(n) know how to implement it in 2 time for small parameters s < 2η1/2 (L).) If we could find a suitable variant of this algorithm that works for small parameters, we would be able to solve SVP in 2n/2+o(n) time. So, we are naturally very interested in understanding what happens when we simply remove the rejection sampling procedure from this algorithm. And, the fact that this works out so nicely for the 2n+o(n) -time algorithm works seems quite auspicious! Unfortunately, we are unable to say very much at all about the resulting distribution in the 2n/2+o(n) -time case.3 So, we leave the study of this distribution as an open problem. Organization In Section 2, we review a few basic facts necessary to prove our main “meta-theorem,” Theorem 3.4, which shows that “rejection sampling is unnecessary.” In Section 3, we finish this proof. In particular, this implies Theorem 1.1 and 1.2. For completeness, in the appendix, we prove these theorems more directly and show the resulting algorithms in full detail. Acknowledgments We thank Oded Regev and Daniel Dadush for many helpful discussions. 2 Preliminaries We write N := {0, 1, . . .} for the natural numbers (including zero). We make little to no distinction between a random variable and its distribution. For x = (x1 , . . . , xn ) ∈ Rn , we write kxk := (x21 +· · ·+x2n )1/2 for the Euclidean norm of x. For any set S, we write S ∗ := {(x1 , . . . , xM ) : xi ∈ S} for the set lists over S of finite length. (The order of elements in a list M ∈ S ∗ will never concern us. We could therefore instead use multisets.) 2.1 Lattices A lattice L ⊂ Rn is the set of integer linear combinations L := {a1 b1 + · · · + an bn : ai ∈ Z} 3 After one step of “pairing and averaging,” we know exactly the distribution that we get, and it is a weighted combination of Gaussians over the cosets of a certain sublattice! This seems quite auspicious. Unfortunately, the particular sublattice is not the same sublattice that we use to pair the vectors in the next step, and we therefore are unable to say much at all about what happens even after two steps. 6 of some linearly independent basis vectors B := (b1 , . . . , bn ). We sometimes write L(B) for the lattice spanned by B. We write L/(2L) for the set of cosets of L over 2L. E.g., if b1 , . . . , bn is a basis for L, then each coset c ∈ L/(2L) corresponds to a unique vector a1 b1 + · · · + an bn with ai ∈ {0, 1}, and this correspondence is a bijection. Notice that the cosets in L/(2L) have a group structure under addition that is isomorphic to Zn2 . 2.2 The discrete Gaussian For a parameter s > 0 and vector x ∈ Rn , we write ρs (x) := exp(−πkxk2 /s2 ) for the Gaussian mass of x with parameter s > 0. Up to scaling, the Gaussian mass is the unique function on Rn that is invariant under rotations and a product function. In particular, it satisfies the following nice rotation identity, ρs (x)ρs (y) = ρ√2s (x + y)ρ√2s (x − y) (1) for any parameter s > 0 and vectors x, y ∈ Rn . This identity is fundamental to the results of [ADRS15, ADS15]. (See [RS17, Ste17] for a more detailed description of this connection and some additional results.) We extend the Gaussian mass to a shift t ∈ Rn of a lattice L ⊂ Rn in the natural way, ρs (L − t) := X y∈L ρs (y − t) , and we call this the Gaussian mass of L − t with parameter s. We will need the following identity from [ADS15]. (See [RS17, Ste17] for a much more general identity.) Lemma 2.1. For any lattice L ⊂ Rn , shift t, and parameter s > 0, we have X c∈L/(2L) ρs (2L + c − t)2 = ρs/√2 (L)ρs/√2 (L − t) . Proof. We have X c∈L/(2L) ρs (2L + c − t)2 = = X X c∈L/(2L) y 1 ,y 2 ∈L X X c∈L/(2L) y 1 ,y 2 ∈L = X X c∈L/(2L) w,y1 ∈L = ρs/√2 (L − t) ρs (2y 1 + c − t)ρs (2y 2 + c − t) ρs/√2 (y 1 + y 2 + c − t)ρs/√2 (y 1 − y 2 ) ρs/√2 (2y 1 − w + c − t)ρs/√2 (w) X ρs/√2 (w) w∈L = ρs/√2 (L − t)ρs/√2 (L) , as needed. 7 2.3 Dominating distributions Intuitively, we say that some random list M ∈ S ∗ dominates another random list M′ ∈ S ∗ if for every fixed list S ∈ S ∗ , “M is at least as likely to contain S as a subsequence as M′ is.” Definition 2.2 (Dominating distribution). For some finite set S (which we identify with {1, . . . , N } ′ )∈ without loss of generality) and two random lists M := (X1 , . . . , XM ) ∈ S ∗ and M′ := (X1′ , . . . , XM ′ ∗ ′ ′ S (where M and M might themselves be random variables), we say that M dominates M if for any (k1 , . . . , kN ) ∈ NN , Pr[|{j : Xj = i}| ≥ ki , ∀i] ≥ Pr[|{j : Xj′ = i}| ≥ ki , ∀i] . We note the following basic facts about dominant distributions, which show that domination yields a partial order over random variables on S ∗ , and that this partial order behaves nicely under taking sublists. Fact 2.3. For any finite set S and random variable M ∈ S ∗ that dominates some other random variable M′ ∈ S ∗ , 1. M dominates itself; 2. if M′ dominates some random variable M′′ ∈ S ∗ , then M also dominates M′′ ; and 3. for any function f : S ∗ → S ∗ that maps a list of elements to a sublist, M dominates f (M′ ). 3 No need for rejection! We now show our main observation: if X 1 ∈ L − t and X 2 ∈ L − t are sampled from the discrete Gaussian over a fixed coset 2L + c − t for some c ∈ L/(2L), then their average (X 1 + X 2 )/2 is distributed as a mixture √ of Gaussians over the cosets 2L + d − t for d ∈ L/(2L) with parameter lowered by a factor of 2. Lemma 3.1. For any lattice L ⊂ Rn , shift t ∈ Rn , parameter s > 0, coset c ∈ L/(2L), s > 0, and y ∈ L, we have Pr X 1 ,X 2 ∼D2L+c−t,s [(X 1 + X 2 )/2 = y − t] = ρs/√2 (y − t) · ρs/√2 (2L + c + y) ρs (2L + c − t)2 In particular, for any d ∈ L/(2L) and y ∈ 2L + d, Pr X 1 ,X 2 ∼D2L+c−t,s [(X 1 + X 2 )/2 = y − t | (X 1 + X 2 )/2 ∈ 2L + d − t] = . ρs/√2 (y − t) ρs/√2 (2L + d − t) Proof. We have ρs (2L + c − t)2 · = X x∈2L+c Pr X 1 ,X 2 ∼D2L+c−t,s [(X 1 + X 2 )/2 = y − t] ρs (x − t)ρs (2y − x − t) = ρs/√2 (y − t) X x∈2L+c ρs/√2 (x − y) = ρs/√2 (y − t)ρs/√2 (2L + c + y) , 8 (Eq. (1)) . as needed. The “in particular” then follows from the fact that ρs/√2 (2L + c + y) = ρs/√2 (2L + c + d) is constant for y ∈ 2L + d for some fixed d ∈ L/(2L). Lemma 3.1 motivates the following definition, which captures a key property of the distribution described in Lemma 3.1. Definition 3.2. For a lattice L ⊂ Rn , shift t ∈ Rn , and parameter s > 0 we say that the random list (X 1 , . . . , X M ) ∈ (L − t)∗ is a mixture of independent Gaussians over L − t with parameter s if the “distributions within the cosets of 2L” are independent Gaussians with parameter s. I.e., for any list of cosets (c1 , . . . , cM ) ∈ ((L − t)/(2L))∗ mod 2L, if we condition on X i ∈ 2L + ci for all i, then the X i are independent with X i ∼ D2L+ci ,s . We call (2L + X 1 , . . . , 2L + X M ) the coset distribution of the X i . We say that a mixture of independent Gaussians M over L − t with parameter s > 0 dominates another, M′ , if the coset distribution of M dominates the coset distribution of M′ (as in Definition 2.2). In other words, mixtures of independent Gaussians are exactly the distributions obtained by first sampling (c1 , . . . , cM ) ∈ ((L − t)/(2L))∗ from some arbitrary coset distributions and then sampling X i ∼ DL+ci ,s independently for each i. We now list some basic facts that follow from what we have done so far. Corollary 3.3 (Properties of mixtures of Gaussians and Procedure 1). For any lattice L ⊂ Rn , shift t ∈ Rn , and parameter s > 0, 1. a mixture of independent Gaussians over L − t with parameter s is uniquely characterized by its coset distribution; 2. if we apply Procedure 1 to a mixture of independent Gaussians over L√− t with parameter s, the result will be a mixture of Gaussians over L − t with parameter s/ 2; 3. Procedure 1 preserves domination—i.e., if we apply Procedure 1 to two mixtures M, M′ of Gaussians over L − t with parameter s and M dominates M′ , then the output of Procedure 1 on input M will dominate that of M′ ; and 4. if X 1 , X 2 are a mixture of independent Gaussians over L − t with parameter s with coset distribution given by X 1 ≡ X 2 mod 2L and Pr[2L + X 1 + t = c] = P ρs (2L + c − t)2 2 d∈L/(2L) ρs (2L + d − t) for any c ∈ L/(2L), then their average (X 1 + X 2 )/2 is distributed exactly as DL−t,s/√2 . Proof. Item 1 follows immediately from the definition of a mixture of Gaussians. Items 2 and 3 are immediate consequences of Lemma 3.1. For Item 4, we apply Lemma 3.1 to see that for any y ∈ L, Pr[(X 1 + X 2 )/2 = y − t] = P =P ρs/√2 (y − t) d∈L/(2L) ρs (2L ρs/√2 (y + d − t)2 − t) 2 d∈L/(2L) ρs (2L + d − t) 9 X ρs/√2 (2L + c + y) c∈L/(2L) · ρs/√2 (L) . The result then follows from Lemma 2.1. (Indeed, summing the left-hand side and the right-hand side over all y ∈ L gives a proof of Lemma 2.1.) In [ADRS15, ADS15], we performed a careful rejection sampling procedure f in Procedure 2 so that, at each step of the algorithm, the output was distributed exactly as DL−t,s/2i/2 (up to some small statistical distance). In particular, we applied the rejection sampling procedure guaranteed by Theorem A.3 to obtain independent vectors distributed as in Item 4, which yield independent Gaussians with a lower parameter when combined as in Procedure 1. But, Corollary 3.3 makes this unnecessary. Indeed, Corollary 3.3 shows that “any collection of vectors that can be found with any rejection sampling procedure can be found without it.” The following meta-theorem makes this formal. Theorem 3.4. For any (possibly randomized) rejection function f mapping lists of cosets modulo 2L to a subset of indices (as in Procedure 2), let A be the algorithm defined in Procedure 2. Let A′ be the same algorithm with f replaced by the trivial function that just outputs all indices (i.e., A′ just repeatedly runs Procedure 1 with no rejection). Then, for any lattice L ⊂ Rn , shift vector t ∈ Rn , parameter s > 0, if A and A′ are each called on input ℓ ≥ 1 and a list of M ≥ 2 independent samples from DL−t,s , the resulting output distributions will be mixtures of independent Gaussians over L − t with parameter s/2ℓ/2 . Furthermore, the distribution corresponding to A′ will dominate the distribution corresponding to A. In particular, for any finite set S ⊂ L − t, Pr X 1 ,...,X M ∼DL−t,s [S ⊆ A(ℓ, X 1 , . . . , X M )] ≤ Pr X 1 ,...,X M ∼DL−t,s [S ⊆ A′ (ℓ, X 1 , . . . , X M )] . Proof. Notice that, since f only acts on the cosets of the X i , f “preserves mixtures of independent Gaussians.” I.e., if (X 1 , . . . , X M ′ ) is some mixture of independent Gaussians over L − t with parameter s′ > 0 and (j1 , . . . , jm ) ← f (2L + X 1 , . . . , 2L + X M ′ ), then (X j1 , . . . , X jm ) is also a mixture of independent Gaussians over L − t with parameter s′ . (Notice that this would not be true if f acted on vectors, rather than cosets.) Similarly, by Item 2, Procedure 1 maps √ mixtures of ′ ′ independent Gaussians over L − t with parameter s to mixtures with parameter s / 2. It follows that for both A and A′ , after the ith step of the algorithm, the list of vectors is a mixture of Gaussians over L − t with parameter s/2i/2 . And, the same holds after the application of f in algorithm A. Therefore, the only question is the coset distributions. By Fact 2.3, we see that (X 1 , . . . , X M ) dominates (X j1 , . . . , X jm ). Therefore, by Item 3, the distribution of vectors corresponding to A′ dominates the distribution of A after the first step. If we assume for induction that, after the (i − 1)st step, the distribution of vectors corresponding to A′ dominates the distribution corresponding to A, then the exact same argument together with another application of Fact 2.3 shows that the same holds after step i. The result follows. Theorem 3.4, together with the corresponding algorithms in [ADRS15, ADS15], immediately implies Theorems 1.1 and 1.2. For completeness, we give more direct proofs of these theorems in the appendix, more-or-less recreating the corresponding proofs in [ADRS15, ADS15]. References [ADPS16] Erdem Alkim, Léo Ducas, Thomas Pöppelmann, and Peter Schwabe. Post-quantum key exchange — A new hope. In USENIX Security Symposium, 2016. 10 [ADRS15] Divesh Aggarwal, Daniel Dadush, Oded Regev, and Noah Stephens-Davidowitz. Solving the Shortest Vector Problem in 2n time via discrete Gaussian sampling. In STOC, 2015. [ADS15] Divesh Aggarwal, Daniel Dadush, and Noah Stephens-Davidowitz. Solving the Closest Vector Problem in 2n time— The discrete Gaussian strikes again! In FOCS, 2015. [Ajt98] Miklós Ajtai. The Shortest Vector Problem in L2 is NP-hard for randomized reductions. In STOC, 1998. [Ajt04] Miklós Ajtai. Generating hard instances of lattice problems. In Complexity of computations and proofs, volume 13 of Quad. Mat., pages 1–32. Dept. Math., Seconda Univ. Napoli, Caserta, 2004. Preliminary version in STOC’96. [AKS01] Miklós Ajtai, Ravi Kumar, and D. Sivakumar. A sieve algorithm for the shortest lattice vector problem. In STOC, pages 601–610, 2001. [AKS02] Miklós Ajtai, Ravi Kumar, and D. Sivakumar. Sampling short lattice vectors and the closest lattice vector problem. In CCC, pages 41–45, 2002. [Bab86] L. Babai. On Lovász’ lattice reduction and the nearest lattice point problem. Combinatorica, 6(1):1–13, 1986. [Ban93] Wojciech Banaszczyk. New bounds in some transference theorems in the geometry of numbers. Mathematische Annalen, 296(4):625–635, 1993. [BCD+ 16] Joppe W. Bos, Craig Costello, Léo Ducas, Ilya Mironov, Michael Naehrig, Valeria Nikolaenko, Ananth Raghunathan, and Douglas Stebila. Frodo: Take off the ring! Practical, quantum-secure key exchange from LWE. In CCS, 2016. [BDGL16] Anja Becker, Léo Ducas, Nicolas Gama, and Thijs Laarhoven. New directions in nearest neighbor searching with applications to lattice sieving. In SODA, 2016. [BLP+ 13] Zvika Brakerski, Adeline Langlois, Chris Peikert, Oded Regev, and Damien Stehlé. Classical hardness of learning with errors. In STOC, pages 575–584, 2013. [dB89] R. de Buda. Some optimal codes have structure. Selected Areas in Communications, IEEE Journal on, 7(6):893–899, Aug 1989. [DKRS03] Irit Dinur, Guy Kindler, Ran Raz, and Shmuel Safra. Approximating CVP to within almost-polynomial factors is NP-hard. Combinatorica, 23(2):205–243, 2003. [GMSS99] O. Goldreich, D. Micciancio, S. Safra, and J.-P. Seifert. Approximating shortest lattice vectors is not harder than approximating closest lattice vectors. Information Processing Letters, 71(2):55 – 61, 1999. [GN08] Nicolas Gama and Phong Q. Nguyen. Finding short lattice vectors within Mordell’s inequality. In STOC, 2008. [GPV08] Craig Gentry, Chris Peikert, and Vinod Vaikuntanathan. Trapdoors for hard lattices and new cryptographic constructions. In STOC, pages 197–206, 2008. 11 [HR12] Ishay Haviv and Oded Regev. Tensor-based hardness of the Shortest Vector Problem to within almost polynomial factors. Theory of Computing, 8(23):513–531, 2012. Preliminary version in STOC’07. [Kan87] Ravi Kannan. Minkowski’s convex body theorem and integer programming. Math. Oper. Res., 12(3):415–440, 1987. [Kho05] Subhash Khot. Hardness of approximating the Shortest Vector Problem in lattices. Journal of the ACM, 52(5):789–808, September 2005. Preliminary version in FOCS’04. [Kle00] Philip Klein. Finding the closest lattice vector when it’s unusually close. In SODA, 2000. [Len83] H. W. Lenstra, Jr. Integer programming with a fixed number of variables. Math. Oper. Res., 8(4):538–548, 1983. [LLL82] A. K. Lenstra, H. W. Lenstra, Jr., and L. Lovász. Factoring polynomials with rational coefficients. Math. Ann., 261(4):515–534, 1982. [Mic01] Daniele Micciancio. The Shortest Vector Problem is NP-hard to approximate to within some constant. SIAM Journal on Computing, 30(6):2008–2035, March 2001. Preliminary version in FOCS 1998. [MV10] Daniele Micciancio and Panagiotis Voulgaris. Faster exponential time algorithms for the Shortest Vector Problem. In SODA, 2010. [MV13] Daniele Micciancio and Panagiotis Voulgaris. A deterministic single exponential time algorithm for most lattice problems based on Voronoi cell computations. SIAM Journal on Computing, 42(3):1364–1391, 2013. [MW16] Daniele Micciancio and Michael Walter. Practical, predictable lattice basis reduction. In Eurocrypt, 2016. [NIS16] NIST post-quantum standardization call for proposals. http://csrc.nist.gov/groups/ST/post-quantum-crypto/cfp-announce-dec2016.html, 2016. Accessed: 2017-04-02. [Pei16] Chris Peikert. A decade of lattice cryptography. Foundations and Trends in Theoretical Computer Science, 10(4):283–424, 2016. [PS09] Xavier Pujol and Damien Stehlé. Solving the Shortest Lattice Vector Problem in time 22.465n . IACR Cryptology ePrint Archive, 2009:605, 2009. [Reg09] Oded Regev. On lattices, learning with errors, random linear codes, and cryptography. Journal of the ACM, 56(6):Art. 34, 40, 2009. [RS17] Oded Regev and Noah Stephens-Davidowitz. An inequality for Gaussians on lattices. SIDMA, 2017. [Sch87] C.P. Schnorr. A hierarchy of polynomial time lattice basis reduction algorithms. Theoretical Computer Science, 53(23):201 – 224, 1987. 12 [Sha84] Adi Shamir. A polynomial-time algorithm for breaking the basic Merkle-Hellman cryptosystem. IEEE Trans. Inform. Theory, 30(5):699–704, 1984. [Ste17] Noah Stephens-Davidowitz. On the Gaussian Measure Over Lattices. PhD thesis, New York University, 2017. [vEB81] Peter van Emde Boas. Another NP-complete problem and the complexity of computing short vectors in a lattice. Technical report, University of Amsterdam, Department of Mathematics, Netherlands, 1981. Technical Report 8104. A Additional preliminaries We will need some additional preliminaries. We write λ1 (L) := min kyk y∈L\{0} for the length of the shortest non-zero vector in the lattice. And, for a target vector t ∈ Rn , we write dist(t, L) := min ky − tk y∈L for the distance from t to the lattice. Notice that this is the same as the length of the shortest vector in L − t. A.1 Some known algorithms We will need the famous result of Lenstra, Lenstra, and Lovász [LLL82]. Theorem A.1 ([LLL82]). There is an efficient algorithm that take as input a lattice L ⊂ Rn and outputs λ̃ > 0 with λ1 (L) ≤ d˜ ≤ 2n/2 λ1 (L) . We will also need the following celebrated result due to Babai [Bab86]. Theorem A.2 ([Bab86]). There is an efficient algorithm that takes as input a lattice L ⊂ Rn and a target t ∈ Rn and outputs d˜ > 0 with dist(t, L) ≤ d˜ ≤ 2n/2 dist(t, L) . A.2 The distribution of disjoint pairs Recall that Procedure 1 takes the Ti elements from the ith coset and converts them into ⌊Ti /2⌋ disjoint pairs. Therefore, for a list M := (X1 , . . . , XM ) ∈ S ∗ over some finite set S, we write ⌊M/2⌋ for the random variable obtained as in Procedure 1. I.e., up to ordering (which does not concern ′ ) ∈ (S × S)∗ is defined by us), ⌊M/2⌋ := (X1′ , . . . , XM ′ |{j : Xj′ = (s, s)}| = ⌊|{j : Xj = s}|/2⌋ for each s ∈ S. 13 P Theorem A.3 ([ADRS15, Theorem 3.3]). For any probabilities, p1 , . . . , pN ∈ [0, 1] with pi = 2 1, integer M , and κ ≥ Ω(log M ) (the confidence parameter) with M ≥ 10κ /pmax , let M = (X1 , . . . , XM ) ∈ {1, . . . , N }M be the distribution obtained by sampling each Xj independently from the distribution that assigns to element i probability pi . Then, there exists a rejection sampling proce′ )∈ dure that, up to statistical distance exp(−Ω(κ)), maps M to the distribution M′ := (X1′ , . . . , XM ′ M obtained by sampling each pair Xj independently from the distribution that {(1, 1), . . . , (N, N )} assigns to the pair (i, i) probability p2i /pcol , where  pcol M := M · 32κpmax ′ pmax := max pi , and pcol := P  , p2i . P Corollary A.4. For any probabilities, p1 , . . . , pN ∈ [0, 1] with pi = 1, integer M , and κ ≥ 2 Ω(log M ) (the confidence parameter) with M ≥ 10κ /pmax , let M := (X1 , . . . , XM ) ∈ {1, . . . , N }M be the distribution obtained by sampling each Xj independently from the distribution that assigns to ′ ) ∈ {(1, 1), . . . , (N, N )}M ′ be the distribution element i probability pi , and let M′ := (X1′ , . . . , XM ′ obtained by sampling each pair Xj′ independently from the distribution that assigns to the pair (i, i) probability p2i /pcol , where   pcol ′ , M := M · 32κpmax pmax := max pi , and pcol := A.3 P p2i . Then, M dominates M′ . Additional facts about the discrete Gaussian We will also need some additional facts about the discrete Gaussian. Lemma A.5 ([Ban93]). For any lattice L ⊂ Rn , parameter s ≥ 1, and shift t ∈ Rn , ρs (L − t) ≤ sn ρ(L). The following theorem shows that, if the parameter s is appropriately small, then DL−t,s + t √ will be an approximate closest vector to t, with approximation factor roughly 1 + ns/ dist(t, L). (This is a basic consequence of Banaszczyk’s celebrated theorem [Ban93].) Proposition A.6 ([Ste17, Corollary 1.3.11], see alsop[ADS15, Corollary 2.8]). For any lattice L ⊂ Rn , parameter s > 0, shift t ∈ Rn , and radius r > n/(2π) · s, with r > dist(t, L) and r 2 > dist(t, L)2 + ns2 · log(2π dist(t, L)2 /(ns2 )) , π we have Pr X∼DL−t,s where y := [kXk > r] < (2e)n/2+1 exp(−πy 2 /2) , p r 2 − dist(t, L)2 /s. √ The next theorem shows that exponentially many samples from DL,s with s ≈ λ1 (L)/ n is sufficient to find a shortest non-zero lattice vector. 14 Proposition A.7 ([ADRS15, Proposition 4.3]). For any lattice L ⊂ Rn , and parameter s := we have q 20.198 πe/n · λ1 (L) , Pr [kXk = λ1 (L)] ≥ 1.38−n−o(n) . X∼DL,s The next corollary follows immediately from Proposition A.7 and Lemma A.5. Corollary A.8. For any lattice L ⊂ Rn , and parameter q 20.198 πe/n · λ1 (L) ≤ s ≤ 1.01 · we have q 20.198 πe/n · λ1 (L) , Pr [kXk = λ1 (L)] ≥ 1.4−n−o(n) . X∼DL,s We will also need the following result from [ADS15], which is an immediate consequence of the main identity in [RS17]. (See also [Ste17].) Lemma A.9 ([ADS15, Corollary 3.3]). For any lattice L ⊂ Rn , shift t ∈ Rn , and parameter s > 0, we have max ρs (2L + c − t)2 ≤ ρs/√2 (L) max ρs/√2 (2L + c − t) . c∈L c∈L/(2L) From this, we derive the following rather technical-looking inequality, which is implicit in [ADS15]. (This inequality comes up naturally in the proof of Corollary B.2. We separate it out here to make that proof cleaner.) Corollary A.10. For any lattice L ⊂ Rn , shift t ∈ Rn , parameter s > 0, and integer ℓ ≥ 0, we have ℓ−1 Y i=0 ρs/2(i+1)/2 (L − t)ρs/2(i+1)/2 (L) ρs/2i/2 (L − t) · maxc∈L/(2L) ρs/2i/2 (2L + c − t) ≥ ρs/2ℓ/2 (L − t) maxc∈L/(2L) ρs (2L + c − t) . maxc∈L/(2L) ρs/2ℓ/2 (2L + c − t) ρs (L − t) · Proof. From Lemma A.9, we see that for all i, ρs/2(i+1)/2 (L) maxc∈L/(2L) ρs/2i/2 (2L + c − t) ≥ maxc∈L/(2L) ρs/2i/2 (2L + c − t) maxc∈L/(2L) ρs/2(i+1)/2 (2L + c − t) . Therefore, the product in the statement of the corollary is at least ℓ−1 Y i=0 ρs/2(i+1)/2 (L − t) · maxc∈L/(2L) ρs/2i/2 (2L + c − t) ρs/2i/2 (L − t) · maxc∈L/(2L) ρs/2(i+1)/2 (2L + c − t) = ρs/2ℓ/2 (L − t) maxc∈L/(2L) ρs (2L + c − t) , maxc∈L/(2L) ρs/2ℓ/2 (2L + c − t) ρs (L − t) · where we have used the fact that this is a telescoping product. 15 B Running Procedure 1 on Gaussian input Theorem B.1. For any lattice L ⊂ Rn , shift t ∈ Rn , parameter s > 0, integer M , and confidence parameter κ ≥ Ω(log M ), if X 1 , . . . , X M are sampled independently from DL−t,s with M ≥ 10κ2 · ρs (L − t) , maxc∈L/(2L) ρs (2L + c − t) then the output √ of Procedure 1 applied to the X i will be a mixture of independent Gaussians with parameter s/ 2 that dominates the distribution of & ρs/√2 (L − t) · ρs/√2 (L) M · M ′ := 32κ ρs (L − t) · maxd∈L/(2L) ρs (2L + d − t) ' independent samples from DL−t,s/√2 , up to statistical distance exp(−Ω(κ)). Proof. By Item 2 of Corollary 3.3, the resulting √ distribution will in fact be a mixture of independent Gaussians over L − t with parameter s/ 2. Notice that, if M is the coset distribution of (X 1 , . . . , X M ), then Procedure 1 first maps the X i into the mixture of independent Gaussians over L − t with parameter s and coset distribution ⌊M/2⌋ and then takes the averages of the corresponding pairs of these vectors. We wish to apply Corollary A.4 over the coset distribution, with the probabilities pi := p2L+c taken to be the weights of the cosets in the original distribution discrete Gaussian, p2L+c := Notice that, by Lemma 2.1, ρs (2L + c − t) . ρs (L − t)  pcol M = M· 32κpmax ′  , which is exactly what is needed to apply Corollary A.4. By the corollary, up to statistical distance exp(−Ω(κ)) this distribution dominates the mixture of independent Gaussians over L − t with parameter s whose coset distribution is given by c2k−1 = c2k for 1 ≤ k ≤ M ′ , with the oddindexed cosets c2k−1 sampled independently from the distribution that assigns to coset c ∈ L/(2L) probability pi ρs (2L + c − t)2 =P . 2 pcol d∈L/(2L) ρs (2L + d − t) Notice that this “squared” distribution” (so-called because the cosets are given weight proportional to their square) is simply M ′ independent copies of the distribution from Item 4 of Corollary 3.3. So, if we run Procedure 1 on this “squared” distribution, the output will be exactly M ′ independent samples from DL−t,s/√2 . Finally, by Fact 2.3, we see that, since the actual pairs dominate these “squared” pairs (up to statistical distance exp(−Ω(κ))), the output must dominate M ′ independent samples from DL−t,s/√2 . 16 Corollary B.2. For any lattice L ⊂ Rn , shift t ∈ Rn , parameter s > 0, integer M ≥ 2, and confidence parameter κ ≥ Ω(log M ), if X 1 , . . . , X M are sampled independently from DL−t,s with M ≥ (10κ)2ℓ · ρs (L − t) , maxc∈L/(2L) ρs (2L + c − t) and we apply Procedure 1 repeatedly to the X i a total of ℓ ≥ 1 times, the result will be a mixture of independent Gaussians with parameter s/2ℓ/2 that dominates the distribution of & ℓ−1 Y ρs/2(i+1)/2 (L − t)ρs/2(i+1)/2 (L) M ′ M := · (32κ)ℓ i=0 ρs/2i/2 (L − t) · maxc∈L/(2L) ρs/2i/2 (2L + c − t) ' independent samples from DL−t,s/2ℓ/2 , up to statistical distance ℓ exp(−Ω(κ)). Proof. By Item 2 of Corollary 3.3, the output will in fact be a mixture of independent Gaussians over L − t with parameter s/2ℓ/2 . The only question is what the coset distribution is. To show that the coset distribution is as claimed, the idea is to simply apply Theorem B.1 ℓ times. In particular, we prove the result via induction on ℓ. When ℓ = 1, this is exactly Theorem B.1. For ℓ > 1, we assume the statement is true for ℓ − 1. In particular, before applying Procedure 1 the ℓth time, we have a mixture of independent Gaussians with parameter s/2ℓ/2 that dominates & ℓ−2 Y ρs/2(i+1)/2 (L − t)ρs/2(i+1)/2 (L) M c := M · (32κ)ℓ i=0 ρs/2i/2 (L − t) · maxc∈L/(2L) ρs/2i/2 (2L + c − t) ≥ 10κ2 · ' ℓ−2 Y ρs/2(i+1)/2 (L − t)ρs/2(i+1)/2 (L) ρs (L − t) · maxc∈L/(2L) ρs (L + c − t) i=0 ρs/2i/2 (L − t) · maxc∈L/(2L) ρs/2i/2 (2L + c − t) independent Gaussians up to statistical distance (ℓ − 1) exp(−Ω(κ)). c samples dominates By Fact 2.3, it suffices to prove that the output of Procedure 1 on these M ′ M independent samples from DL−t,s/2ℓ/2 up to statistical distance exp(−Ω(κ)). Indeed, this is exactly what Theorem B.1 says, provided that c ≥ 10κ2 · M ρs/2(ℓ−1)/2 (L − t) maxc∈L/(2L) ρs/2(ℓ−1)/2 (2L + c − t) . And, this inequality follows immediately from Corollary A.10 together with the assumed lower c. bound on M C The initial distribution The following theorem was proven by Ajtai, Kumar, and Sivakumar [AKS01], building on work of Schnorr [Sch87]. Theorem C.1 ([Sch87, AKS01]). There is an algorithm that takes as input a lattice L ⊂ Rn and u ≥ 2 and outputs an un/y -reduced basis of L in time exp(O(u)) · poly(n), where we say that a basis B = (b1 , . . . , bn ) of a lattice L is γ-reduced for some γ ≥ 1 if 1. kb1 k ≤ γ · λ1 (L); and 17 2. π{b1 }⊥ (b2 ), . . . , π{b1 }⊥ (bn ) is a γ-reduced basis of π{b1 }⊥ (L). This next theorem is originally due to [GPV08], based on analysis of an algorithm originally studied by Klein [Kle00]. We present a slightly stronger version due to [BLP+ 13] for convenience. that Theorem C.2 ([BLP+ 13, Lemma 2.3]). There is a probabilistic polynomial-time algorithm √ e takes as input a basis B for a lattice L ⊂ Rn with n ≥ 2, a shift t ∈ Rn , and ŝ > C log n · kBk e e and outputs a vector that is distributed exactly as DL−t,ŝ , where kBk := maxkbi k. Proposition C.3 ([ADS15, Proposition 4.5]). There is an algorithm that takes as input a lattice L ⊂ Rn , shift t ∈ Rn , r > 0, and parameter u ≥ 2, such that if √ r ≥ un/u (1 + nun/u ) · dist(t, L) , then the output of the algorithm is y ∈ L and a basis B′ of a (possibly trivial) sublattice L′ ⊆ L such that all vectors from L − t of length at most r/un/u − dist(t, L) are also contained in L′ − y − t, e ′ k ≤ r. The algorithm runs in time poly(n) · 2O(u) . and kB Proof. On input a lattice L ⊂ Rn , t ∈ Rn , and r > 0, the algorithm behaves as follows. First, it calls the procedure from Theorem C.1 to compute a un/u -HKZ basis B = (b1 , . . . , bn ) of L. Let e ,...,e ek≤r (b bn ) be the corresponding Gram-Schmidt vectors. Let k ≥ 0 be maximal such that kb 1 i ′ for 1 ≤ i ≤ k, and let B = (b1 , . . . , bk ). Let πk = π{b1 ,...,bk }⊥ and M = πk (L). The algorithm then calls the procedure from Theorem C.1 again with the same s and input πk (t) and M, receiving √ P as output x = ni=k+1 ai πk (bi ) where ai ∈ Z, a nun/u -approximate closest vector to πk (t) in M. Pn Finally, the algorithm returns y = − i=k+1 ai bi and B′ = (b1 , . . . , bk ). f′ k ≤ r. It remains to prove that L′ − y − t The running time is clear, as is the fact that kB contains all sufficiently short vectors in L − t. If k = n, then L′ = L and y is irrelevant, so we may n/u > r/un/u . In e assume that k < n. Note that, since B is a un/u -HKZ basis, λ1 (M) ≥ kb k+1 k/u √ √ particular, λ1 (M) > (1 + n · un/u ) · dist(t, L) ≥ (1 + n · un/u ) · dist(πk (t), M). So, there is a unique closest vector to πk (t) in M, and by triangle inequality, the next closest vector is at distance √ greater than n · un/u dist(πk (t), M). Therefore, the call to the subprocedure from Theorem C.1 will output the exact closest vector x ∈ M to πk (t). Let w ∈ L \ (L′ − y) so that πk (w) 6= πk (−y) = x. We need to show that w − t is relatively long. Since B is a sn/s -HKZ basis, it follows that kπk (w) − xk ≥ λ1 (M) > r/un/u . Applying triangle inequality, we have kw − tk ≥ kπk (w) − πk (t)k ≥ kπk (w) − xk − kx − πk (t)k > r/un/u − dist(t, L) , as needed. Corollary C.4 ([ADS15, Corollary 4.6]). There is an algorithm that takes as input a lattice L ⊂ Rn with n ≥ 2, shift t ∈ Rn , M ∈ N (the desired number of output vectors), and parameters u ≥ 2 and ŝ > 0 and outputs y ∈ L, a (possibly trivial) sublattice L′ ⊆ L, and M vectors from L′ − y − t such that if p ŝ ≥ 10 n log n · u2n/u · dist(t, L) , then the output vectors are distributed as M independent samples from DL′ −y−t,ŝ , and L′ − y − t √ contains all vectors in L − t of length at most ŝ/(10un/u log n). The algorithm runs in time poly(n) · 2O(u) + poly(n) · M . (And, if t = 0, then y = 0.) 18 Proof. The algorithm first calls the procedure from Proposition C.3 with input L, t, and √ 10ŝ r := √ ≥ un/u (1 + nun/u ) · dist(t, L) , log n receiving as output y ∈ L and a basis B′ of a sublattice L′ ⊂ L. It then runs the algorithm from Theorem C.2 M times with input L′ , y + t, and ŝ and outputs the resulting vectors, y, and L′ . The running time is clear. By Proposition C.3, L′ − y − t contains all vectors of length at most √ √ e ′ k ≤ r ≤ C ŝ/ log n. So, it follows from r/un/u − dist(t, L) ≥ ŝ/(10un/u log n) in L − t, and kB Theorem C.2 that the output has the correct distribution. D Finishing the proof SVP (L) Input : A lattice L ⊂ Rn Output : A vector y ∈ L with kyk = λ1 (L) b with λ1 (L) ≤ λ b ≤ 2n/2 λ1 (L). Use the procedure from Thereom A.1 to compute λ for i = 1, . . . , 200n do Set L′ ⊆ L and X 1 , . . . , X M ∈ L to be the output of Corollary C.4 on input L, t := 0, u, b and si := 1.01−i · λ. for j = 1, . . . , ℓ do (X 1 , . . . , X M ′ ) ← Pair and Average(X 1 , . . . , X M ) M ← M′ end Y i ← arg minX j 6=0 kX j k. end Output arg min kY i k. Procedure 3: The final 2n+o(n) -time SVP algorithm. Here M = 2n+Θ(log ℓ = Θ(log n). 2 n) , u = Θ(n), and Theorem D.1 (SVP algorithm). For any lattice L ⊂ Rn , the output of Procedure 3 on input L will be a shortest non-zero vector in L except with probability at most exp(−Ω(n)). Proof. The running time is clear. Let κ = Θ(n). Let i such that si /2ℓ/2 satisfies the inequality in Corollary A.8. By Corollary C.4, the (X 1 , . . . , X M ) corresponding to this i will be distributed exactly as DL′ ,si where L′ ⊆ L contains all vectors of length at most λ1 (L). So, λ1 (L′ ) = λ1 (L), and it suffices to argue that we will find a shortest vector in L′ . By Corollary B.2, the output distribution (X1 , . . . , XM ) will be a mixture of independent Gaussians over L′ with parameter si /2ℓ/2 that dominates the distribution of  ρsi /2(j+1)/2 (L′ )2 ℓ−1 Y  M  M′ =   (32κ)ℓ · (L′ ) · ρsi /2(j+2)/2 (L′ )  ρ   j=0 si /2j/2 19 independent samples from DL′ ,si /2ℓ/2 up to statistical distance exp(−Ω(κ)), where we have applied Lemma A.5 to show that the coset with maximal mass is the central coset. Noting that this product is telescoping, we have & ' ρsi /√2 (L′ ) ρsi /2ℓ/2 (L′ ) M M = · · ≥ 2n/2 , (32κ)ℓ ρsi (L′ ) ρsi /2(ℓ+1)/2 (L′ ) ′ where we √ have applied Lemma A.5. The result then follows from Corollary A.8, together with the fact that 2 > 1.4. CVP (L, t) Input : A lattice L ⊂ Rn and target t ∈ Rn 2 Output : A vector y ∈ L with ky − tk ≤ (1 + 2−n/ log n ) · dist(t, L) Use the procedure from Thereom A.2 to compute dˆ with dist(L, t) ≤ dˆ ≤ 2n/2 dist(t, L). for i = 1, . . . , n do Set L′ ⊆ L, y ∈ L, and X1 , . . . , XM ∈ L′ − y − t to be the output of Corollary C.4 on ˆ input L, t, u, and si := 20n2 · 2−i · d. for j = 1, . . . , ℓ do (X 1 , . . . , X M ′ ) ← Pair and Average(X 1 , . . . , X M ) M ← M′ end Y i ← arg minX j kX j k. end Output t + arg min kY i k. Procedure 4: The final 2n+o(n) -time SVP algorithm. Here M = 2n+Θ(n/ log n) , u = Θ(n), and ℓ = Θ(n/ log2 n). Theorem D.2 (CVP algorithm). For any lattice L ⊂ Rn and t ∈ Rn , the output of Procedure 4 on input L and t will a vector y ∈ L with ky − tk ≤ (1 + exp(−Ω(n/ log2 n))) · dist(t, L), except with probability at most exp(−Ω(n)).4 Proof. The running time is clear. Let κ = Θ(n). Let i such that p p 10 n log n · u2n/u · dist(t, L) ≤ si ≤ 20 n log n · u2n/u · dist(t, L) . By Corollary C.4, the (X 1 , . . . , X M ) corresponding to this i will be distributed exactly as DL′ −y−t,si where L′ − y − t ⊆ L − t contains all vectors of length at most dist(t, L). So, it suffices to argue 2 that we will find a (1 + 2−n/ log n )-approximate shortest vector in L′ − y − t. By Corollary B.2, the output distribution (X1 , . . . , XM ) will be a mixture of independent Gaussians over L′ − y − t with parameter si /2ℓ/2 that dominates the distribution of  4  ℓ−1 Y ρsi /2(j+1)/2 (L′ − y − t)ρsi /2(j+1)/2 (L) M ≥1 M′ =  ·  (32κ)ℓ (L′ − y − t) · maxc∈L′ /(2L′ ) ρsi /2j/2 (2L′ + c − y − t)  ρ   j=0 si /2j/2 It is immediate from the proof that this result can be extended to work for any approximation factor γ with γ > 1 + exp(−o(n/ log n)), by taking ℓ = o(n/ log n) and M = 2n+o(n) to be slightly larger. 20 independent samples from DL′ −y−t,si /2ℓ/2 up to statistical distance exp(−Ω(κ)), where we have applied Corollary A.10. Notice that si /2ℓ/2 < exp(−Ω(n/ log2 n)) dist(t, L). The result then follows from Proposition A.6, which says that, except with probability exp(−Ω(n)) a sample from DL′ −y−t,si /2ℓ/2 will be a (1 + exp(−Ω(n/ log2 n)))-approximate shortest vector in L′ − y − t. 21
8cs.DS
Inferring Generative Model Structure with Static Analysis Paroma Varma, Bryan He, Payal Bajaj, Imon Banerjee, Nishith Khandwala, Daniel L. Rubin, Christopher Ré arXiv:1709.02477v1 [cs.LG] 7 Sep 2017 Stanford University {paroma,bryanhe,pabajaj,imonb,nishith,rubin}@stanford.edu, [email protected] Abstract Obtaining enough labeled data to robustly train complex discriminative models is a major bottleneck in the machine learning pipeline. A popular solution is combining multiple sources of weak supervision using generative models. The structure of these models affects training label quality, but is difficult to learn without any ground truth labels. We instead rely on these weak supervision sources having some structure by virtue of being encoded programmatically. We present Coral, a paradigm that infers generative model structure by statically analyzing the code for these heuristics, thus reducing the data required to learn structure significantly. We prove that Coral’s sample complexity scales quasilinearly with the number of heuristics and number of relations found, improving over the standard sample complexity, which is exponential in n for identifying nth degree relations. Experimentally, Coral matches or outperforms traditional structure learning approaches by up to 3.81 F1 points. Using Coral to model dependencies instead of assuming independence results in better performance than a fully supervised model by 3.07 accuracy points when heuristics are used to label radiology data without ground truth labels. 1 Introduction Deep neural networks and other complex discriminative models rely on a large amount of labeled training data for their success. For many real-world applications, obtaining this magnitude of labeled data is one of the most expensive and time consuming aspects of the machine learning pipeline. Recently, generative models have been used to create training labels from various weak supervision sources, such as heuristics or knowledge bases, by modeling the true class label as a latent variable. After the necessary parameters for the generative models are learned using unlabeled data, the distribution over the true labels can be inferred. Properly specifying the structure of these generative models is essential in estimating the accuracy of the supervision sources. While traditional structure learning approaches have focused on the supervised case [35, 29, 48], previous works related to weak supervision assume that the structure is user-specified [1, 44, 38, 34]. Recently, Bach et al. [2] showed that it is possible to learn the structure of these models with a sample complexity that scales sublinearly with the number of possible binary dependencies. However, the sample complexity scales exponentially for higher degree dependencies, limiting its ability to learn complex dependency structures. Moreover, the time required to learn the dependencies also grows exponentially with the degree of dependencies, hindering the development of user-defined heuristics. This poses a problem in many domains, where high degree dependencies are common among heuristics that operate over a shared set of inputs. These inputs are interpretable characteristics extracted from the data. For example, various approaches in computer vision use bounding box and segmentation attributes [24, 36, 23], like location and size, to weakly supervise more complex image-based learning tasks [13, 45, 6, 32, 8]. Another example comes from the medical imaging domain, where attributes include characteristics such as the area, intensity and perimeter of a tumor, as shown in Figure 1. Note that these attributes and the heuristics written over them are encoded programmatically. There typically is a relatively small set of interpretable characteristics, so the heuristics often share these attributes. This results in high order dependency structures among these sources, which are crucial to model in the generative model that learns accuracies for these sources. 1 To efficiently learn higher order dependencies, we present Coral, a paradigm that statically analyzes the source code of the weak supervision sources to infer, rather than learn, the complex relations among heuristics. Coral’s sample complexity scales quasilinearly with the number of relevant dependencies. Moreover, the time to identify these relations is constant in the degree of dependencies, since it only requires looking at the source code for each heuristic. Specifically, Coral analyzes the code used to generate the weak supervision heuristics and its inputs to find which heuristics share the same inputs. This information is used to generate a dependency structure for the heuristics, and a generative model learns the proper weights for this structure to assign probabilistic labels to training data. We experimentally validate the performance of Coral across various domains and show that it outperforms traditional structure learning under various conditions while being significantly more computationally efficient. We show how modeling dependencies leads to an improvement of 3.81 F1 points compared to standard structure learning approaches. Additionally, we show that Coral can assign labels to data that has no ground truth labels, and this augmented training set results in improving the discriminative model performance by 3.07 points. For a complex relation-based image classification task, 6 heuristic functions written using only object label and location as primitives are able to train a model that comes within 0.74 points of the F1 score achieved by a fully-supervised model trained on the rich, hand-labeled attribute and relation information in the Visual Genome database [26]. 2 The Coral Paradigm The Coral paradigm takes as input a set of domain-specific primitives and a set of programmatic user-defined heuristic functions that operate over the primitives. We formally define these abstractions in Section 2.1. Coral runs static analysis on the source code that creates the primitives and the heuristic functions to identify which sets of heuristics are related by virtue of sharing primitives (Section 2.2). Once Coral identifies these dependencies, it uses a factor graph to model the relationship between the heuristics, primitives and the true class label. We describe the conditions under which Coral can learn the structure of the generative model with significantly less data than traditional approaches in Section 2.3 and show how this affects generative model accuracy via simulations. Finally, we discuss how Coral learns the accuracies of each heuristic and outputs probabilistic labels for the training data (Section 2.4). Figure 1: Running example for Coral paradigm. Users apply standard algorithms to segment tumors from the X-ray and extract the domain-specific primitives from the image and segmentation. They write heuristic functions over the primitives that output a noisy label for each image. The generative model takes these as inputs and provides probabilistic training labels for the discriminative model. 2.1 Coral Abstractions Domain-Specific Primitives Domain-specific primitives (DSPs) in Coral are the simplest elements that heuristic functions take as input and operate over. DSPs in Coral have semantic meaning, making them interpretable for users. This is akin to the concept of language primitives in programming languages, where they are the smallest unit of processing with meaning. The motivation for making the DSPs domain-specific instead of a general construct for the various data modalities is to allow users to take advantage of existing work in their field, which extracts meaningful characteristics from the raw data. 2 Figure 1 shows an example of a pipeline for bone tumor classification as malignant or benign, inspired by one of our real experiments. First, an automated segmentation algorithm is used to generate a binary mask for the tumor [46, 25, 31, 41]. Then, we extract three DSPs from the segmentation: area(p1 ), perimeter(p2 ) and total intensity(p3 ) of the segmented area. More complex characteristics such as texture, shape and edge features can also be used [18, 4, 27] (see Appendix). We now define a formal construct for programmatically encoding DSPs. Users generate DSPs in Coral through a primitive specifier function, such as create_primitives in Figure 2(a). Specifically, this function takes as input a single unlabeled data point (and necessary intermediate representations such as the segmentation) and returns an instance of PrimitiveSet, which maps primitive names to primitive values, like integers (we refer to a specific instance of this class as P). Note that P.ratio is composed of two other primitives, while the rest are generated independently from the image and segmentation. Figure 2: (a) The create_primitives function that generates primitives. (b) Part of the AST for the create_primitives function. (c) The composition structure that results from traversing the AST. Heuristic Functions In Coral, heuristic functions (HFs) can be viewed as a mapping from a subset of the DSPs to a noisy label for the training data, as shown in Figure 1. In our experience with user-defined HFs, we note that they are mostly nested if-then statements where each statement checks whether the value of a single primitive or a combination of them are above or below a user-set threshold (see Appendix). As shown in Figure 3(a), they take as input fields of the object P and return a label based on the value of the input primitives. While our running example focuses on a single data point for DSP generation and HF construction, both procedures are applied to the entire training set to assign a set of noisy labels from each HF to each data point. 2.2 Static Dependency Analysis Since the number of DSPs in some domains are relatively small, multiple HFs can operate over the same DSPs, as shown with λ2 and λ3 in Figure 1 and Figure 3(a). HFs that share at least one primitive are trivially related to each other. Prior work learns these dependencies using the labels HFs assign to data points and its probability of success scales with the amount of data available [2]. However, it can only learn dependencies among pairs of HFs efficiently, since the data required grows exponentially with the degree of the HF relation. This in turn limits the complexity of the dependency structure this method can accurately learn and model. Heuristic Function Inputs Coral takes advantage of the fact that users write HFs over a known, finite set of primitives. It infers dependencies that exist among HFs by simply looking at the source code of how the DSPs and HFs are constructed. This process requires no data to successfully learn the dependencies, making it more computationally efficient than standard approaches. In order to determine whether any set of HFs share at least one DSP, Coral looks at the input for each HF. Since the HFs only take as input the DSP they operate over, simply grouping HFs by the primitives they share is an efficient approach for recognizing these dependencies. As shown in our running example, this would result in Coral not recognizing any dependencies among the HFs since the input for all three HFs are different (Figure 3(a)). This, however, would be incorrect, since the primitive P.ratio is composed of P.perimeter and P.intensity, which makes λ2 and λ3 related. Therefore, along with looking at the primitives that each HF takes as input, it is also essential to model how these primitives are composed. 3 Primitive Compositions We use our running example in Figure 2 to explain how Coral gathers information about DSP compositions. Coral builds an abstract syntax tree (AST) to represent computation the create_primitives function performs. An AST represents operations involving the primitives as a tree, as shown in Figure 2(b). To find primitive compositions from the AST, Coral first finds the expressions in the AST that add primitives to P (denoted in the AST as P.name). Then, for each assignment expression, Coral traverses the subtree rooted at the assignment expression and adds all other encountered primitives as a dependency for P.name. If no primitives are encountered in the subtree, the primitive is registered as being independent of the rest. The composition structure that results from traversing the AST is shown in Figure 2(c), where P.area, P.intensity, and P.perimeter are independent while P.ratio is a composition. Heuristic Function Dependency Structure With knowledge of how the DSPs are composed, we return to our original method of looking at the inputs of the HFs. As before, we identify that λ1 and λ2 use P.area and P.perimeter, respectively. However, we now know that λ3 uses P.ratio, which is a composition of P.intensity and P.perimeter. This implies that λ3 will be related to any HF that takes either P.intensity, P.perimeter, or both as inputs. We proceed to build a relational structure among the HFs and DSPs. As shown in Figure 3(b), this structure shows which independent DSPs each HF operates over. This relational structure implicitly encodes dependency information about the HFs — if an edge points from one primitive to n HFs, those n HFs are in an n-way relation by virtue of sharing that primitive. This dependency information can more formally be encoded in a factor graph shown in Figure 3(c) and discussed in the next section. Note that we chose a particular programmatic setup for creating DSPs and HFs to explain how static analysis can infer dependencies; however, this process can be modified to work with other setups that encode DSPs and HFs as well. Figure 3: (a) shows the encoded HFs. (b) shows the HF dependency structure where DSP nodes have an edge going to the HFs that use them as inputs (explicitly or implicitly). (c) shows the factor graph Coral uses to model the relationship between HFs, DSPs, and latent class label Y. 2.3 Creating the Generative Model We now describe the generative model used to predict the true class labels. The Coral model uses a factor graph (Figure 3(c)) to model the relationship between the primitives (p), heuristic functions (λ), and latent class label (Y ∈ {−1, 1}). We show that by incorporating information about how primitives are shared across HFs from static analysis, this factor graph infers all dependencies between the heuristics that are guaranteed to be present. In the next section, we describe how Coral recovers additional dependencies between the heuristics by studying empirical relationships between the primitives. Modeling Heuristic Function Dependencies With dependencies inferred via static analysis, our goal is to learn the accuracies for each HF and assign labels to training data accordingly. The factor graph thus consists of two types of factors: accuracy factors φAcc and HF factors from static analysis φHF . 4 The accuracy factors specify the accuracy of each heuristic function λi and are defined as φAcc i (Y, λi ) = Y λi , i = 1, . . . , n where n is the total number of heuristic functions. The static analysis factors ensure that the heuristics are correctly evaluated based on the HF dependencies found in the previous section. They ensure that a probability of zero is given to any configuration where an HF does not have the correct value given the primitives it depends on. The static analysis factors are defined as ( 0 if λi is valid given p1 , . . . , pm φHF , i = 1, . . . , n i (λi , p1 , . . . , pm ) = −∞ otherwise Since these factors are obtained directly from static analysis, they can be recovered with no data. However, we note that static analysis is not sufficient to capture all dependencies required in the factor graph to accurately model the process of generating training labels. Specifically, static analysis can (i) pick up spurious dependencies among HFs that are not truly dependent on each other, or (ii) miss key dependencies among HFs that exist due to dependencies among the DSPs in the HFs. (i) can occur if some λA takes as input DSPs pi , pj and λB takes as input DSPs pi , pk , but pi always has the same value. Although static analysis would pick up that λA and λB share a primitive and should have a dependency, this may not be true if pj and pk are independent. (ii) can occur if two HFs depend on different primitives, but these primitives happen to always have the same value. In this case, it is impossible for static analysis to infer the dependency between the HFs if the primitives have different names and are generated independently, as described in Section 2.2. A more realistic example comes from our running example, where we would expect the area and perimeter of the tumor to be related. To account for both cases, it is necessary to capture the possible dependencies that occur among the DSPs to ensure that the dependencies from static analysis do not misspecify the factor graph. We introduce a factor to account for additional dependencies among the primitives, φDSP . There are many possible choices for this dependency factor, but one simple choice is to model pairwise similarity between the primitives. This allows the dependency factor to be represented as X Sim φDSP (p1 , . . . , pm ) = φSim ij (pi , pj ), where φij (pi , pj ) = I[pi = pj ]. i<j Finally, with three types of factors, the probability distribution specified by the factor graph is   n n m X m X X X Sim Sim  P (y, λ1 , . . . , λn , p1 , . . . , pm ) = exp  θiAcc φAcc + φHF + θij φij i i i=1 i=1 i=1 j=i+1 Sim where θAcc and θij are weights that specify the strength of factors φAcc and φSim ij . Inferring Dependencies without Data The HF factors capture all dependencies among the heuristic functions that are not represented by the φDSP factor. The dependencies represented by the φDSP factor are precisely the dependencies that cannot be inferred via static analysis due to the fact that this factor depends solely on the content of the primitives. It is therefore impossible to determine what this factor is without data. While assuming that we have the true φDSP seems like strong condition, we find that in real-world experiments, including the φDSP factor rarely leads to improvements over the case when we only include the φAcc and φHF factors. In some of our experiments (see Section 3), we use bounding box location, size and object labels as domain-specific primitives for image and video querying tasks. Since these primitives are not correlated, modeling the primitive dependency does not lead to any improvement over just modeling HF dependencies from static analysis. Moreover, in other experiments in which modeling the relation among primitives helps, we observe relatively small benefits (up to 1.1 points) above what modeling HF dependencies provides (up to 3.47 points). Therefore, without any data, it is possible to model the most important dependencies among HFs that lead to significant gains over the case where no dependencies are modeled. 5 2.4 Generating Probabilistic Training Labels Sim Given the probability distribution of the factor graph, our goal is to learn the proper weights θiAcc and θij . Coral adopts structure learning approaches described in recent work [35, 2] that learns dependency structures in the weak supervision setting and maximizes the `1 -regularized marginal pseudolikelihood of each primitive to learn the weights of the relevant factors. To learn the weights of the generative model, we use contrastive divergence [20] as a maximum likelihood estimation routine and maximize the marginal likelihood of the observed primitives. Gibbs sampling is used to estimate the intractable gradients, which are then used in stochastic gradient descent. Because the HFs are typically deterministic functions of the primitives (represented as the −∞ value of the correctness factors for invalid heuristic values), standard Gibbs sampling will not be able to mix properly. As a result, we modify the Gibbs sampler to simultaneously sample one primitive along with all heuristics that depend on it. Despite the fact that the true class label is latent, this process still converges to the correct parameter values [34]. Additionally, the amount of data necessary to learn the parameters scales quasilinearly with the number of parameters. In our case, the number of parameters is just the number of heuristics n and number of relevant primitive similarity dependencies s. We now formally state the conditions for this result, which match those of Ratner et al. [34], and provide the sample complexity of our method. First, we assume that there exists some feasible parameter set Θ ⊂ Rn that is known to contain the parameter θ∗ = (θAcc , θSim ) that models the true distribution π ∗ of the data: ∃θ∗ ∈ Θ s.t. ∀π ∗ (p1 , . . . , pm , Y ) = µθ (p1 , . . . , pm , Y ). (1) Next, we must be able to accurately learn θ∗ if we are provided with labeled samples of the true distribution. Specifically, there must be an asymptotically unbiased estimator θ̂ that takes some set of labeled data T independently sampled from π ∗ such that for some c > 0,   −1 Cov θ̂(T )  (2c|T |) I. (2) Finally, we must have enough sufficiently accurate heuristics so that we have a reasonable estimate of Y. For any two feasible models θ1 , θ2 ∈ Θ, h i c E(p1 ,...,pm ,Y )∼µθ1 Var(p01 ,...,p0m ,Y 0 )∼µθ2 (Y 0 | p1 = p01 , . . . , pm = p0m ) ≤ (3) n+s Proposition 1. Suppose that we run stochastic gradient descent to produce estimates of the weights θ̂ = (θ̂Acc , θ̂Sim ) in a setup satisfying conditions (1), (2), and (3). Then, for any fixed error  > 0, if the number of hunlabeled data points N is at least Ω [(n + s) log(n + s)], then our expected parameter error is bounded by i E kθ̂ − θ∗ k2 ≤ 2 . The proof follows from the sample complexity of Ratner et al. [34] and appears in the appendix. Sim With the weights θ̂iAcc and θ̂ij maximizing the marginal likelihood of the observed primitives, we have a fully specified factor graph and complete generative model, which can be used to predict the latent class label. For each data point, we have the domain-specific primitives, from which the heuristic functions can compute noisy labels. Through the accuracy factors, we then estimate a distribution for the latent class label and use these noisy labels to train a discriminative model. In Figure 4, we present a simulation to empirically compare our sample complexity with that of structure learning [2]. In our simulation, we have n HFs, each with an accuracy of 75%, and explore settings with where there exists one binary, 3-ary and 4-ary dependency among the HFs. The dependent HFs share exactly one primitive, and the primitives themselves are independent (s = 0). As N increases, both methods improve in performance due to improved estimates of the heuristic accuracies and dependencies. In the case with a binary dependency, structure learning recovers the necessary dependency with few samples, and has similar performance to Coral. In contrast, in the second and third settings with high-order dependencies, structure learning struggles to recover the relevant dependency, and consistently performs worse than Coral even as more training data is provided. 6 Generative Accuracy (%) 1.0 Coral (n=6) Structure (n=6) Binary Dependencies Coral (n=8) Structure (n=8) 3­ary Dependencies 1.0 Coral (n=10) Structure (n=10) 4­ary Dependencies 1.0 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0 250 500 0.7 0 250 Unlabeled Data (N) 500 0.7 0 250 500 Figure 4: Simulation comparing the generative model accuracy with structure learning and Coral. 3 Experimental Results We seek to experimentally validate the following claims about our approach. Our first claim is that HF dependencies inferred via static analysis (HF Dep) improve significantly over a model that does not take dependencies into account. Second, we compare to a structure learning approach for weak supervision [2] and show how we outperform it over a variety of domains. Finally, we show that in case there are primitive dependencies, Coral can learn and model those as well (HF+DSP Dep). Our classification tasks range from specialized medical domains to natural images and video, and we include details of the DSPs and HFs in the Appendix. We compare our approach to generative models that learn the accuracies of different heuristics, specifically one that assumes the heuristics are independent (Indep), and Bach et al. [2] that learns the inter-heuristic dependencies (Learn Dep). We also compare to majority vote (MV) and the fully supervised (FS) case, and measure the performance of the discriminative model trained with labels generated using the above methods. Visual Genome and ActivityNet Classification We explore how to extract complex relations in images and videos given object labels and their bounding boxes. We used subsets of two datasets, Visual Genome [26] and ActivityNet [11], and defined our task as finding images of “a person biking down a road” and finding basketball videos, respectively. For both tasks, a small set of DSPs were shared heavily among HFs, and modeling the dependencies observed by static analysis led to a significant improvement over the independent case. Since these dependencies involved groups of 3 or more heuristics, Coral improved significantly, by up to 3.81 F1 points, over structure learning as well, which was unable to model these dependencies due to the lack of enough data. Moreover, modeling primitive dependencies did not help since the primitives were indeed independent (Table 1). We report our results for these tasks in terms of the F1 score, harmonic mean of the precision and recall. Visual Genome ActivityNet HF Dep HF+DSP Dep 75 75 70 70 65 65 60 60 55 55 Bone Tumor FS Accuracy (%) Learn Dep Accuracy (%) Indep 55 50 45 40 35 F1 Score F1 Score MV 55 50 45 40 35 Mammogram Figure 5: Discriminative model performance comparing HF Dep (HF dependencies from static analysis) and HF+DSP Dep (HF and DSP dependencies) to other methods. Numbers in Appendix. Bone Tumor Classification We used a set of 802 labeled bone tumor X-ray images along with their radiologist-drawn segmentations. We defined our task to differentiate between aggressive and non-aggressive tumors, generated HFs that were a combination of hand-tuned rules and decision-tree generated rules (tuned on a small subset of the dataset). The discriminative model utilized a set of 400 hand-tuned features (note 7 Table 1: Heuristic Function (HF) and Domain-Specific Primitive (DSP) statistics. Discriminative model improvement with HF+DSP Dep over other methods. *improvements shown in terms of F1 score, rest in terms of accuracy. ActivityNet model is LR using VGGNet embeddings as features. Statistics Application Improvement Over Model # DSPs # HFs # Shared DSPs Visual Genome ActivityNet 7 5 5 4 2 2 Bone Tumor Mammogram 17 6 7 6 0 0 MV Indep Learn Dep FS GoogLeNet VGGNet+LR 7.49* 6.23* 2.90* 3.81* 2.90* 3.81* -0.74* -1.87* LR GoogLeNet 5.17 4.62 3.57 1.11 3.06 0 3.07 -0.64 that there is no overlap between these features and the DSPs) that encoded various shape, texture, edge and intensity-based characteristics. Although there were no explicitly shared primitives in this dataset, the generative model was still able to model the training labels more accurately with knowledge of how many primitives the heuristics operated over, thus improving over the independent case significantly. Moreover, a small dataset size hindered structure learning, which gave a minimal boost over the independent case (Table 1). When we used heuristics in Coral to label an additional 800 images that had no ground truth labels, we beat the previous FS score by 3.07 points (Figure 5, Table 1). Mammogram Tumor Classification We used the DDSM-CBIS [39] dataset, which consists of 1800 scanned film mammograms and associated segmentations for the tumors in the form of binary masks. We defined our task to identify a tumor as malignant or benign. Each heuristic only operated over one primitive, resulting in no dependencies that static analysis could identify. In this case, structure learning performed better than Coral when we only used static analysis to infer dependencies (Figure 5). However, including primitive dependencies allowed us to match structure learning, resulting in a 1.11 point improvement over the independent case (Table 1). 4 Related Work As the need for labeled training data grows, a common alternative is to utilize weak supervision sources such as distant supervision [12, 30], multi-instance learning [37, 21], and heuristics [10, 42]. Specifically for images, weak supervision using object detection and segmentation or visual databases is a popular technique as well (detailed discussion in Appendix). Estimating the accuracies of these sources without access to ground truth labels is a classic problem [15]. Methods such as crowdsourcing, boosting, co-training, and learning from noisy labels are some of the popular approaches that can combine various sources of weak supervision to assign noisy labels to data (detailed discussion in Appendix). However, Coral does not require any labeled data to model the dependencies among the domain-specific primitives and heuristics, which can be interpreted as workers, classifiers or views for the above methods. Recently, generative models have also been used to combine various sources of weak supervision [1, 44, 38]. One specific example, data programming [34], proposes using multiple sources of weak supervision for text data in order to describe a generative model and subsequently learns the accuracies of these source. Coral also focuses on multiple programmatically encoded heuristics that can weakly label data and learns their accuracies to assign labels to training data. However, Coral adds an additional layer of domain-specific primitives in its generative model, which allows it to generalize beyond text-based heuristics. It also infers the dependencies among the heuristics and the primitives, rather than requiring users to specify them. Other previous work also assume that this structure in generative models is user-specified [1, 44, 38]. Recently, Bach et al. [2] showed that it is possible to learn the dependency structure among sources of weak supervision with a sample complexity that scales sublinearly with the number of possible pairwise dependencies. Coral instead identifies the dependencies among the heuristic functions by inspecting the content of the programmable functions, therefore relying on significantly less data to learn the generative model structure. Moreover, Coral can also pick up higher-order dependencies, for which structured learning needs large amounts of data to detect. 8 5 Conclusion and Future Work In this paper, we introduced Coral, a paradigm that models the dependency structure of weak supervision heuristics and systematically combines their outputs to assign probabilistic labels to training data. We described how Coral takes advantage of the programmatic nature of these heuristics in order to infer dependencies among them via static analysis and requires a sample complexity that is quasilinear in the number of heuristics and relations found. We showed how Coral leads to significant improvements in discriminative model accuracy over traditional structure learning approaches across various domains. Coral scratches the surface of the possible ways weak supervision can borrow from the field of programming languages, especially as they are applied to large magnitudes of data and need to be encoded programmatically. We look at a natural extension of treating the process of encoding heuristics as writing functions and hope to further explore the interactions between systematic training set creation and concepts from the programming language field. Acknowledgments We thank Shoumik Palkar, Stephen Bach, and Sen Wu for their helpful conversations and feedback. We are grateful to Darvin Yi for his assistance with the DDSM dataset based experiments and associated deep learning models. We acknowledge the use of the bone tumor dataset annotated by Drs. Christopher Beaulieu and Bao Do and carefully collected over his career by the late Henry H. Jones, M.D. (aka “Bones Jones”). This material is based on research sponsored by Defense Advanced Research Projects Agency (DARPA) under agreement number FA8750-17-2-0095. We gratefully acknowledge the support of the DARPA SIMPLEX program under No. N66001-15-C-4043, DARPA FA8750-12-2-0335 and FA8750-13-2-0039, DOE 108845, the National Science Foundation (NSF) Graduate Research Fellowship under No. DGE-114747, Joseph W. and Hon Mai Goodman Stanford Graduate Fellowship, the Moore Foundation, National Institute of Health (NIH) U54EB020405, the Office of Naval Research (ONR) under awards No. N000141210041 and No. N000141310129, the Moore Foundation, the Okawa Research Grant, American Family Insurance, Accenture, Toshiba, and Intel. This research was supported in part by affiliate members and other supporters of the Stanford DAWN project: Intel, Microsoft, Teradata, and VMware. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA or the U.S. Government. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of DARPA, AFRL, NSF, NIH, ONR, or the U.S. government. 9 References [1] E. Alfonseca, K. Filippova, J.-Y. Delort, and G. Garrido. Pattern learning for relation extraction with a hierarchical topic model. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Short Papers-Volume 2, pages 54–59. Association for Computational Linguistics, 2012. [2] S. H. Bach, B. He, A. Ratner, and C. Ré. Learning the structure of generative models without labeled data. In ICML, 2017. [3] A. Balsubramani and Y. Freund. Scalable semi-supervised aggregation of classifiers. In Advances in Neural Information Processing Systems, pages 1351–1359, 2015. [4] I. Banerjee, L. Hahn, G. Sonn, R. Fan, and D. L. Rubin. Computerized multiparametric mr image analysis for prostate cancer aggressiveness-assessment. arXiv preprint arXiv:1612.00408, 2016. [5] A. S. Barb, C.-R. Shyu, and Y. P. Sethi. Knowledge representation and sharing using visual semantic modeling for diagnostic medical image databases. IEEE Transactions on Information Technology in Biomedicine, 9(4): 538–553, 2005. [6] M. Blaschko, A. Vedaldi, and A. Zisserman. Simultaneous object detection and ranking with weak supervision. In Advances in neural information processing systems, pages 235–243, 2010. [7] A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-training. In Proceedings of the eleventh annual conference on Computational learning theory, pages 92–100. ACM, 1998. [8] S. Branson, P. Perona, and S. Belongie. Strong supervision from weak annotation: Interactive training of deformable part models. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 1832–1839. IEEE, 2011. [9] R. A. Brooks, R. Creiner, and T. O. Binford. The acronym model-based vision system. In Proceedings of the 6th international joint conference on Artificial intelligence-Volume 1, pages 105–113. Morgan Kaufmann Publishers Inc., 1979. [10] R. Bunescu and R. Mooney. Learning to extract relations from the web using minimal supervision. In ACL, 2007. [11] F. Caba Heilbron, V. Escorcia, B. Ghanem, and J. Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 961–970, 2015. [12] M. Craven, J. Kumlien, et al. Constructing biological knowledge bases by extracting information from text sources. In ISMB, pages 77–86, 1999. [13] J. Dai, K. He, and J. Sun. Boxsup: Exploiting bounding boxes to supervise convolutional networks for semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1635–1643, 2015. [14] N. Dalvi, A. Dasgupta, R. Kumar, and V. Rastogi. Aggregating crowdsourced binary ratings. In Proceedings of the 22nd international conference on World Wide Web, pages 285–294. ACM, 2013. [15] A. P. Dawid and A. M. Skene. Maximum likelihood estimation of observer error-rates using the EM algorithm. Applied statistics, pages 20–28, 1979. [16] M. A. Fischler and R. A. Elschlager. The representation and matching of pictorial structures. IEEE Transactions on computers, 100(1):67–92, 1973. [17] A. Fukui, D. H. Park, D. Yang, A. Rohrbach, T. Darrell, and M. Rohrbach. Multimodal compact bilinear pooling for visual question answering and visual grounding. arXiv preprint arXiv:1606.01847, 2016. [18] R. M. Haralick, K. Shanmugam, et al. Textural features for image classification. IEEE Transactions on systems, man, and cybernetics, 3(6):610–621, 1973. [19] M. A. Hearst. Automatic acquisition of hyponyms from large text corpora. In Proceedings of the 14th conference on Computational linguistics-Volume 2, pages 539–545. Association for Computational Linguistics, 1992. [20] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8): 1771–1800, 2002. [21] R. Hoffmann, C. Zhang, X. Ling, L. Zettlemoyer, and D. S. Weld. Knowledge-based weak supervision for information extraction of overlapping relations. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies-Volume 1, pages 541–550. Association for Computational Linguistics, 2011. 10 [22] M. Joglekar, H. Garcia-Molina, and A. Parameswaran. Comprehensive and reliable crowd assessment algorithms. In Data Engineering (ICDE), 2015 IEEE 31st International Conference on, pages 195–206. IEEE, 2015. [23] D. Kang, J. Emmons, F. Abuzaid, P. Bailis, and M. Zaharia. Optimizing deep cnn-based queries over video streams at scale. CoRR, abs/1703.02529, 2017. URL http://arxiv.org/abs/1703.02529. [24] A. Karpathy and L. Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3128–3137, 2015. [25] M. R. Kaus, S. K. Warfield, A. Nabavi, P. M. Black, F. A. Jolesz, and R. Kikinis. Automated segmentation of mr images of brain tumors 1. Radiology, 218(2):586–591, 2001. [26] R. Krishna, Y. Zhu, O. Groth, J. Johnson, K. Hata, J. Kravitz, S. Chen, Y. Kalantidis, L.-J. Li, D. A. Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. arXiv preprint arXiv:1602.07332, 2016. [27] C. Kurtz, A. Depeursinge, S. Napel, C. F. Beaulieu, and D. L. Rubin. On combining image-based and ontological semantic dissimilarities for medical image retrieval applications. Medical image analysis, 18(7):1082–1100, 2014. [28] C. Lu, R. Krishna, M. Bernstein, and L. Fei-Fei. Visual relationship detection with language priors. In European Conference on Computer Vision, pages 852–869. Springer, 2016. [29] N. Meinshausen and P. Bühlmann. High-dimensional graphs and variable selection with the lasso. The annals of statistics, pages 1436–1462, 2006. [30] M. Mintz, S. Bills, R. Snow, and D. Jurafsky. Distant supervision for relation extraction without labeled data. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP: Volume 2-Volume 2, pages 1003–1011. Association for Computational Linguistics, 2009. [31] A. Oliver, J. Freixenet, J. Marti, E. Pérez, J. Pont, E. R. Denton, and R. Zwiggelaar. A review of automatic mass detection and segmentation in mammographic images. Medical image analysis, 14(2):87–110, 2010. [32] M. Oquab, L. Bottou, I. Laptev, and J. Sivic. Is object localization for free? - Weakly-supervised learning with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 685–694, 2015. [33] D. S. Raicu, E. Varutbangkul, J. D. Furst, and S. G. Armato III. Modelling semantics from image data: opportunities from lidc. International Journal of Biomedical Engineering and Technology, 3(1-2):83–113, 2009. [34] A. J. Ratner, C. M. De Sa, S. Wu, D. Selsam, and C. Ré. Data programming: Creating large training sets, quickly. In Advances in Neural Information Processing Systems, pages 3567–3575, 2016. [35] P. Ravikumar, M. J. Wainwright, J. D. Lafferty, et al. High-dimensional ising model selection using l1-regularized logistic regression. The Annals of Statistics, 38(3):1287–1319, 2010. [36] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 779–788, 2016. [37] S. Riedel, L. Yao, and A. McCallum. Modeling relations and their mentions without labeled text. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 148–163. Springer, 2010. [38] B. Roth and D. Klakow. Combining generative and discriminative model scores for distant supervision. In EMNLP, pages 24–29, 2013. [39] R. Sawyer-Lee, F. Gimenez, A. Hoogi, and D. Rubin. Curated breast imaging subset of ddsm, 2016. [40] R. E. Schapire and Y. Freund. Boosting: Foundations and algorithms. MIT press, 2012. [41] N. Sharma, L. M. Aggarwal, et al. Automated medical image segmentation techniques. Journal of medical physics, 35(1):3, 2010. [42] J. Shin, S. Wu, F. Wang, C. De Sa, C. Zhang, and C. Ré. Incremental knowledge base construction using DeepDive. Proceedings of the VLDB Endowment, 8(11):1310–1321, 2015. [43] R. Stewart and S. Ermon. Label-free supervision of neural networks with physics and domain knowledge. In AAAI, 2017. [44] S. Takamatsu, I. Sato, and H. Nakagawa. Reducing wrong labels in distant supervision for relation extraction. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Long Papers-Volume 1, pages 721–729. Association for Computational Linguistics, 2012. 11 [45] W. Xia, C. Domokos, J. Dong, L.-F. Cheong, and S. Yan. Semantic segmentation without annotating segments. In Proceedings of the IEEE International Conference on Computer Vision, pages 2176–2183, 2013. [46] D. Yi, M. Zhou, Z. Chen, and O. Gevaert. 3-d convolutional neural networks for glioblastoma segmentation. arXiv preprint arXiv:1611.04534, 2016. [47] Y. Zhang, X. Chen, D. Zhou, and M. I. Jordan. Spectral methods meet em: A provably optimal algorithm for crowdsourcing. Journal of Machine Learning Research, 17(102):1–44, 2016. [48] P. Zhao and B. Yu. On model selection consistency of lasso. Journal of Machine learning research, 7(Nov): 2541–2563, 2006. 12 A Extended Related Works We provide additional details here of how writing heuristics over primitives is a popular technique, making Coral widely applicable to existing methods as well. We then discuss methods that are related to Coral in combining various sources of weak supervision to generate noisy labels for the data at hand. Weak Supervision over Primitives A popular approach for creating training sets is to provide weak or distant supervision to label data based on information from a knowledge base [12, 30], crowdsourcing [15], heuristic patterns [10, 19], user input [42], a set of user-defined labeling functions [34], or hand-engineered constraints [43]. Our inspiration for Coral came from observing various weak supervision and image description techniques developed in the field of computer vision. Early work looked at describing images in terms of a set of primitives to find instances of described objects in images [16, 9]. More recently, learned characteristics such as bounding boxes from object detection and areas from image segmentation have been used in order to weakly supervise more complex image-based learning tasks [13, 45, 6, 32, 8]. Moreover, the recent development of a ‘knowledge base’ for images, Visual Genome [26], has provided access to a image database with rich, crowdsourced attribute and relational information. This data in turn powers other methods that rely on the information in Visual Genome to supervise other tasks [28, 17]. This trend of using the possibly noisy information about the data at hand in order to weakly supervise models that look for complex relationships is one of the main motivations for Coral, which is a domain-agnostic method that can combine various sources of weak supervision while modeling the relationship among the sources as well as the primitives they operate over. A similar methodology of using interpretable characteristics of images for classification tasks exists in the medical field as well [5, 33]. Other techniques such as content-based image retrieval (CBIR) rely on low-level, quantitative features of images, such as tumor texture, obtained from image analysis technique to query similar images in a database of radiology images. However, there remains a gap between these content-based primitives and semantic, interpretable primitives that humans use in order to describe these images [27]. Coral could combine the two sources of supervision in order to build a system that uses the two methodologies in an optimal manner, while also helping discover correlations among the semantic and quantitative primitives. Generative Models to Generate Training Labels Crowdsourcing is another area where the estimating worker accuracy without hand-labeled data is a well-studied problem [14, 22, 47]. Boosting is also a related method that combines the output of multiple weak classifiers to create a stronger classifier [40], and recent work has further looked at leveraging unlabeled data [3]. Co-training is another process that uses a small labeled dataset and a large amount of unlabeled data by selecting two conditionally independent views of the data [7]. B Additional Experimental Results We present the results from Section 3 in a table format here. We also provide a list of the domain-specific primitives and heuristic functions used in each of our experiments, with a short description of what they mean. Table 2: Numbers for Figure 5(*ed have F1 scores, rest are accuracy). MV: majority vote; Indep: assume heuristics independent; Learn: model learned dependencies; HF-Dep: model heuristic dependencies from static analysis; HF+DSP Dep: also model primitive dependencies; FS: fully supervised Application MV Indep Learn Dep HF Dep HF+DSP Dep FS Visual Genome* ActivityNet* 42.02 46.44 46.61 48.86 46.61 48.86 49.51 52.67 49.51 52.67 50.25 54.54 Bone Tumor Mammogram 65.72 63.8 67.32 67.31 67.83 68.42 70.79 67.31 70.89 68.42 67.82 69.06 13 C Proof of Proposition 1 Proposition 1. Suppose that we run stochastic gradient descent to produce estimates of the weights θ̂ = (θ̂Acc , θ̂Sim ) in a setup satisfying conditions (1), (2), and (3). Then, for any fixed error  > 0, if the number of unlabeled data h i points N is at least Ω [(n + s) log(n + s)], then our expected parameter error is bounded by E kθ̂ − θ∗ k2 ≤ 2 . Proof. The proof of proposition 1 closely follows Theorem 2 of Ratner et al. [34]. First, notice that all of the necessary conditions of this theorem are satisfied. The number of weights to be learned in this theorem is M . In our setting, M = n + s. Notice that if we have at least Ω [(n + s) log(n + s)] unlabeled data points, then we satisfy the conditions of the theorem. As a result, the bound on the expected parameter error directly follows. 14 Primitives Table 3: Domain-specific Primitives for Mammogram Tumor Classification Type Description area diameter eccentricity perimeter max_intensity mean_intensity float float float float float float area of the tumor diameter of the tumor eccentricity of the image perimeter of the tumor maximum intensity of the tumor mean intensity of the tumor Primitives Table 4: Domain-specific Primitives for Image Querying Type Description person person.position person.area road car bike bike.position bike.area bool (float,float) float bool bool bool (float,float) float Primitives image contains a person/man/woman coordinates of the person area of bounsing box of person image contains a road/street image contains car/bus/truck image contains a bike/bicycle/cycle coordinates of the bike area of bounding box of bike Table 5: Domain-specific Primitives for Video Classification Type Description person ball (person.top,person.bottom) (ball.top,ball.bottom) ball.color vertical_distance bool bool (float,float) (float,float) (float, float, float) float 15 image contains a person image contains sports ball top and bottom coordinates of the person top and bottom coordinates of the ball R,G,B colors of the ball cumulative absolute difference in ball.top values over frames Primitives Table 6: Domain-specific Primitives for Bone Tumor Classification Type Description daube_hist_164 daube_hist_224 daube_hist_201 window_std window_median scale_median lesion_density edge_sharpness equiv_diameter area perimeter area_perimeter_ratio shape_solidity laplacian_entropy sobel_entropy glcm_contrast glcm_homogeneity histogram_egde mean_diff_in_out Name float float float float float float float float float float float float float float float float float float float Daubechies features Daubechies features Daubechies features quantify edge sharpness along the lesion contour quantify edge sharpness along the lesion contour describe the morphology of the lesion describe the morphology of the lesion describe the morphology of the lesion ratio of area and perimeter Laplacian energy features Sobel energy features capture occurrence of gray level pattern within the lesion capture occurrence of gray level pattern within the lesion quantify edge sharpness along the lesion contour Table 7: Heuristic Functions for Mammogram Tumor Classification Heuristic Function Description hf_area 1 if area>=100000; -1 if area<=30000 hf_diameter 1 if diameter>=400; -1 diameter<=200 1 if eccentricity<=0.4; -1 eccentricity>=0.6 1 if perimeter>=4000; -1 perimeter<=2500 1 if max_intensity>=70000; -1 max_intensity<=50000 1 if mean_intensity>=45000; -1 mean_intensity<=30000 hf_eccentricity hf_perimeter hf_max_intensity hf_mean_intensity 16 if if if if if Large tumor area indicates malignant tumors High diameter indicates malignant tumors Low eccentricity indicates malignant tumors High perimeter indicates malignant tumors High maximum intensity indicates malignant tumors High mean intensity indicates malignant tumors Name Table 8: Heuristic Functions for Image Querying Heuristic Function Description hf_street 1 if person and road; -1 if person and !road; 0 otherwise hf_vehicles 1 if person and car; -1 if person and !car; 0 otherwise hf_positions -1 if !bike or !person; 1 if (person.position-bike.position)<=1; 0 otherwise 0 if !bike or !person; -1 if (person.areabike.area)>=1000; 1 otherwise -1 if !bike or !person; 1 if num_persons=num_bikes; -1 if num_persons=num_bikes; 0 otherwise hf_size hf_number Indicates if a street is present when person is present, doesn’t assign a label when person is not present Indicates if a car is present when person is present, doesn’t assign a label when person is not present Indicates if person and bike are close in the image Indicates if the difference in area of the bike and person is less than a threshold Indicates if number of persons and bikes are equal Name Table 9: Heuristic Functions for Video Classification Heuristic Function Description hf_person_ball 1 if person and ball; -1 otherwise hf_distance -1 if person.top-ball.bottom>=2; 1 if person.top-ball.bottom<=1; 0 otherwise 1 if ball and ball.colorbasketball.color <= 80; -1 otherwise 1 if vertical_distance >=15; -1 otherwise hf_ball_color hf_temporal Name hf_daube hf_edge hf_lesion hf_shape hf_sobel_laplacian hf_glcm hf_first_order Indicates if person and sports ball were present in any frame of the video Indicates if the distance between person and sports ball is less than a threshold Indicates if the color of the ball is similar to the color of a basketball Indicates if sufficient vertical distance was covered by the ball over frames Table 10: Heuristic Functions for Bone Tumor Classification Heuristic Function 1 if histogram_164 < 0.195545 and histogram_224 < -0.469812; -1 if histogram_164 < 0.195545 and histogram_201 < 0.396779; 1 if histogram_164 < 0.195545; -1 otherwise -1 if window_std < -0.0402606; -1 if window_median < -0.544591; -1 if scale_median < -0.512551; 1 otherwise -1 if lesion_density < 0; 1 if lesion_density > 1 and edge_sharpness < 0; 1 if lesion_density > 5 and edge_sharpness > -1; 0 otherwise -1 if equiv_diameter < -0.3; -1 if equiv_diameter > 0 and area_perimeter_ratio < 0.5 and shape_solidity < 0.1; 1 if equiv_diameter > 0 and area_perimeter_ratio < 0.5 and shape_solidity > 0.75; 1 if equiv_diameter > 0 and area_perimeter_ratio > 1; 0 otherwise -1 if laplacian_entropy < 0.2; 1 if laplacian_entropy > 0.4 and sobel_entropy < -0.75; 1 if laplacian_entropy > 0.4 and sobel_entropy > -0; 0 otherwise -1 if gclm_contrast < 0.15 and gclm_homogeneity < 0; 1 if gclm_contrast < 0.15 and gclm_homogeneity > 0.5; -1 if gclm_contrast > 0.25; 0 otherwise -1 if histogram_egde < 0.5; 1 if histogram_egde > -0.3 and mean_diff_in_out < -0.75; 1 if histogram_egde > -0.3 and mean_diff_in_out > -0.5; 0 otherwise We omit the descriptions of heuristic functions for bone tumor classification due to their complexity. 17
2cs.AI
On using Tra er Driver for External Dynami Pro ess Observation ⋆ (extended abstra t) arXiv:cs/0701106v1 [cs.PL] 17 Jan 2007 Pierre Deransart Inria Ro quen ourt, BP 105, 78153 Le Chesnay Cedex, Fran e Pierre.Deransartinria.fr Abstra t One is interested here in the observation of dynami pro esses starting from the tra es whi h they leave or those that one makes them produ e. It is onsidered here that it should be possible to make several observations simultaneously, using a large variety of independently developed analyzers. For this purpose, we introdu e the original notion of full tra e to apture the idea that a pro ess an be instrumented in su h a way that it may broad ast all information whi h ould ever be requested by any kind of observer. Ea h analyzer an then nd in the full tra e the data elements whi h it needs. This approa h uses what has been alled a "tra er driver" whi h ompletes the tra er and drives it to answer the requests of the analyzers. A tra er driver allows to restri t the ow of information and makes this approa h tra table. On the other side, the potential size of a full tra e seems to make the idea of full tra e unrealisti . In this work we explore the onsequen es of this notion in term of potential e ien y, by analyzing the respe tive workloads between the (full) tra er and many dierent analyzers, all being likely run in true parallel environments. To illustrate this study, we use the example of the observation of the resolution of onstraints systems (proof-tree, sear h-tree and propagation) using so- phisti ated visualization tools, as developed in the proje t OADymPPaC (20012004). The pro esses approa h 1 onsidered here are omputer programs, but we believe the an be extended to many other kinds of pro esses. Introdu tion One is interested here in the observation of dynami pro esses starting from the tra es whi h they leave or those that one makes them produ e. It is onsidered here that it should be possible to make several observations simultaneously, using a large variety of independently developed analyzers. When one wants to observe a pro ess, the pra ti e is to instrument it for ea h type of observation whi h one wants to make on it. One thus implements a ⋆ This work has been partly supported by OADymPPaC [1℄, a Fren h RNTL proje t. new "ad ho " tra er for ea h analyzer, or one adapts and one. Su h a work approa h whi h ompletes an existing an be largely avoided if one adopts from the start a general onsists to instrument it su h that it produ es what we all a "full tra e". This unique tra e will be useful then for all the later observations whi h one an plan to make. Ea h analyzer an then nd in the full tra e the data elements whi h it needs. This approa h uses what was driver" whi h alled a "tra er ompletes the tra er and drives it to answer the requests of the analyzers. This approa h is parti ularly tempting in pra ti e as the full tra e never needs to be ompletely expressed (the ex hanges of information remain limited) and the work of the tra er implementation and of its driver is made on e for all. The evaluation in terms of feasibility and performan e remains however problemati . In fa t, this approa h allows to redu e the size of the tra e emitted to a useful bare minimum and thus to speed up the whole pro ess. In it allows to onsider very large full tra es. This has also a the size of the tra e. Beyond a ompensation, ost whi h grows with ertain size, the produ tion ost of the tra e is likely to be ome prohibitory. It is pre isely the question in whi h one is interested here. Until where an one go in this approa h on a pra ti al level without slowing down a pro ess ex essively and how? To get a more pre ise idea, one must take into a ount not only the time of tra e produ tion, but also how the tra e will be used. In [2℄ and [3℄ the notion of tra er driver is presented and experimented is the ontext of nite domain onstraint resolution [4℄. But the question of the nature of the tra e whose emission is ontrolled by the tra er driver is not dire tly ta k- led. In this work we explore the onsequen es of this notion in term of potential e ien y, by analyzing the respe tive workloads between the (full) tra er and many dierent analyzers, all being likely run in a true parallel environment. In this work, we introdu e the notion of full tra e to pro ess whi h apture the idea that a an be instrumented in su h a way that it may broad ast all information ould ever be requested by any kind of observer. We then analyze the nature of the work of the tra er and the driver, and the distribution of the fun tions between the tra er and its driver on the one hand, and the analyzers on the other hand. This allows us to better estimate how powerful, useful and e ient the on ept of full tra e ar hite ture of all involved an be, provided it is a ompanied by the right omponents. To illustrate this study, one will take the example of the observation of the resolution of onstraints systems (proof-tree, sear h-tree and propagation) us- ing sophisti ated tools for visualization, a ording to the method developed in the proje ts DiSCiPl (1997-2000) [5℄ then OADymPPaC (2001-2004) [1℄. This eld is of parti ular interest be ause the tra es in lude the representations of ompli ated and potentially bulky obje ts, and the omputations (evolution of the domain of the variables) are at the same time logi al and sto hasti . The onstraints systems, be ause of the to true omplex systems. omplexity of their resolution, are very lose In this extended abstra t we present su essively the on epts of full tra e and its in remental  ompressed version, then the question of their semanti s. We analyze nally the problem of the distribution of work between a driven tra er and external analyzers whi h work only with the useful tra e ow whi h is provided to them by their requests. 2 Full Tra e We introdu e here the pro ess on ept of full tra e. By denition the full tra e of a ontains all one may like to know about it during its exe ution (this in ludes likely a des ription of the pro ess itself ) . A pro ess is at a given moment t by a state St . hara terized It does not enter in the framework of this arti le to dene what is exa tly su h a state. It will be supposed only that it an be des ribed by a nite set of parameters for its value at moment A t. The pn for the nth parameter, and pn,t on ept of "moment" will be spe ied hereafter. urrent state will be denoted by the list of the values of its parameters. It is also assumed that the transformation of a state into another is made by "steps" hara terized by an a tion a. The set of a tions performed at moment t is labelled at . So dened, the on ept of full tra e seems not to have any appli ation. In pra ti e, there are only approximations; but the important thing here, is to admit that, whatever is the level of details with whi h one wishes to observe a pro ess, there is always a threshold whi h makes it possible to dene su h a tra e. One an onsider that in the ase of a program, it a ts of a more or less thorough instrumentation whi h produ es a tra e, in other words a program augmented with a tra er. Denition 1 (Virtual Full Tra e). sequen e of tra e events of the form . An virtual full tra e is an unbounded et : (t, at , St+1 ) omprising the following elements:  et : unique identier of the event.  t: hrono. Time of the tra e. It only varies by unit values and is always in reasing. To distinguish from the time of the observed pro esses or of the analyzers whi h may not be monotonous ompared to the hrono.  St = p1,t ..., pn,t : parameters at hrono t. In a tra e event the parameters are alled attributes and St the full urrent state. The parameters may St is the last urs. The parameters (or attributes) des ribe obje ts or a tions performed to rea h the new state. observed state before the event et orrespond to the new rea hed state o St+1 .  at : a tion an identier of the set of a state St to the state tions hara terizing the step from the St+1 . Any tra e ee tively produ ed by a pro ess an be regarded as a partial full tra e. In pra ti e, one "sees" only partial tra es whi h start after the moment 0 where the pro ess observed is in a presumably initial state S0 . We will limit ourselves in this summary to only a single example of tra e: the tra e of the proof-trees in Prolog systems based on standard Prolog [6℄. This tra e is far from being a full tra e (many useful information, even easily available at any moment are not represented there). Here is an extra t: 1 2 3 3 4 4 5 .... 1 2 3 3 3 3 3 Call: Call: Call: Exit: Call: Exit: Call: '$ all$'(ben h(2)) ben h(2) 2>0 2>0 _182 is 2-1 1 is 2-1 ben h(1) This is a Byrd's tra e [7℄, adopted in the majority of the Prolog systems. The moment "0" event orresponds to the laun hing of the resolution of a goal. Ea h tra e orresponds to a stage in its resolution. An event ontains the following information: two attributes whi h are indi ation of depths (the rst, the depth in the sear h-tree and the se ond in the proof-tree), a "port" whi h orresponds to the a tion whi h made it possible to rea h this stage. Thus the port orresponds to a goals to solve, and total of 5 in the all all to the indi ated subgoal and the installation of the sub- exit to the su ess of the subgoal. There are other ports (a ase of GNU-Prolog) not detailed here. The rst " all" denes the laun hing of the rst goals (if there is only one of them). If the resolution terminates, the tra e is nite, unbounded otherwise. The last attribute gives the subgoal to solve. This tra e does not hrono omprise identiers nor hrono; the orresponds to the sequential order of emission of the tra e events and the resulting hrono plays the role of an identier. It is interesting to note that the obje tive of su h a tra e is to display all the steps of evolution of a proof-tree until obtaining all the possible proofs (the port fail orresponds to a failure and redo to a nondeterministi goal where a new resolution will be tried), and to some extend to des ribe also the sear h-tree. However, the (partial) proof-tree is never expli itly des ribed (not more than the sear h-tree). This tra e thus does not provide the parameters of interest dire tly (the partial proof-tree). This brings us to the following observation. The parameters of the full state are not given expli itly in this tra e, but only some attributes (port and goal) whi h possibly make it possible to nd it. We will re onsider this point later. These attributes thus give only an in remental information whi h makes it possible to obtain the new proof-tree after a resolution step. We will say that the tra e is "in remental". This leads us to dene the following parti ular tra es whi h we dene here without more details. Denition 2 (Dis ontinuous, Ee tive, In remental Full Tra e). A tra e is dis ontinuous if it is a (full) tra e whi h ontains su events whose variation of the . essive hrono may be higher than a unit. There are "holes" in it, either be ause the emission is dis ontinuous, or be ause the observing proess "listens" only o asionally to it. Noti e that the dis ontinuity on erns only the tra e emission and not its extra tion; in other words moment 0 orresponds to the a tivation of the tra er. A tra e is ee tive if it is a (full) tra starting from the knowledge of (St , At ) e of the form one an dedu e et : (t, At ) and (at , St+1 ). At su h that, denotes a set of attributes. The ee tive tra e is the tra e emitted by a tra er, that whi h is a tually visible. The virtual full tra e is a parti ular where the attributes parti ular At are the a tion label at ase of ee tive tra e and the parameters St . Another ase is the full in remental tra e. A tra e is in remental if the attributes are su h that only the urrent state are noted. It has the form et : (t, Deltat +) hanges ae t- Deltat + ontains the des ription of the a tions whi h modify the values of the parameters ing the where of the moment t. To remain a full tra e, this tra e must satisfy the following dition: starting from the knowledge of (St , Deltat +) one an dedu e on- (at , St+1 ). In this extended summary, when the distin tion is not absolutely ne essary, one will not distinguish between virtual and ee tive tra es, and one will speak indierently about parameters or attributes. Pra ti ally all the tra es are in remental (thus it uses attributes), as the pre eding example illustrates it well, be ause the emission of a full state in ea h tra e event would be obviously prohibitive. In fa t the size whi h would take the events would be mu h too high and the tra e would be extremely redundant. The ondition imposes simply that one an retrieve the full tra e starting from the transmitted attributes and from the pre eding full state. In pra ti e the observed pro esses will produ e partial tra es only. In this ase the retrieval of the full state is impossible. If one wants to nd a full tra e, or at least a more omplete one, it will be ne essary "to ask" the tra er to provide at least one full state. If the observing pro ess needs to take into a that an be su ient to enable it to maintain a ount only a partial state, onsistent partial state. On the other hand if it needs, at a given moment, to know a full state, or at least a more full omplete state, it will have to ask the tra er to provide him at least a urrent state or a part of it. Pra ti ally all the tra es are dis ontinuous, even if often ea h part of them (ne essarily nite) an be regarded as a nite single tra e. This also raises the problem of the knowledge of the initial state S0 in whi h the observed pro ess was at the moment of the initial tra e event ( hrono equals to 0) and thus of the ommuni ation to the analyzers of the full initial state S0 , before any event of tra e. These two reasons justify that one is interested in the manner of obtaining su h a state. The urrent value of a parameter may exist just as it is in the pro ess and requires only a small omputation to extra t it. On the other hand it may not exist and should require a partial re-exe ution of the pro ess (this is used in the analyzers of the CHIP environment of Cosyte apa ity [5℄ or CLPGUI [1℄). This obliges to stop the exe ution of the observed pro ess (at least when that is possible), and to give the ability to the observing pro ess to stop and resume the observed pro ess. This leads to the idea sket hed in the introdu tion of syn hronization primitives between pro esses, a kind "image freezing" whi h makes it possible to omplete the information at any moment, a need. This also results in the need for a fun tion "a ess to the ording to the urrent state". It is important to note that with an ee tive or in remental tra e, keeping a full urrent state is then in harge of the observing pro ess and not of the observed pro ess. This assumes however that the observed pro ess least re overy points in whi h full ontains at urrent state will be maintained and a essible, so as to allow the observing pro ess to resume the tra e and to be able to restart from a full urrent state. It is important to note that with a full ee tive tra e, dierent from the full virtual tra e, to keep a full pro ess will be an additional urrent state in the observing harge of this pro ess itself, be ause the tra er of the observed pro ess then does not have any more obligation to al ulate the requested parameters expli itly (only the requested attributes are This supposes however that the observed pro ess points in whi h a full omputed). ontains at least re overy urrent state will be preserved and a essible. This may allow the observing pro ess to resume the tra e and to be able to restart from a full urrent state. This aspe t is not treated here. 3 Observational Semanti s One is interested in this se tion in the semanti s of the full tra e, alled here "observational semanti s". The tra e does not explain anything. It is only a olle tion of fa ts. The question arises however to understand the tra e. For that one needs two levels of semanti s. The rst level orresponds to the des ription of the a tions and ob- je ts appearing in the parameters and attributes of the tra es, i.e. a semanti s of the observed data. The se ond level orresponds to a kind of tra e explanation, i.e. a semanti s des ribing how the values of the parameters at the moment are derived from the values of the parameters of the moment a tions whi h a at t−1 t and how the are sele ted. Clearly this means that one has a model of the pro ess urately des ribes the evolution of the tra e between two events. The form of this semanti s is the subje t of another work in progress. To read a tra e, one needs only the rst level of semanti s. Only the relations between the parameters in the same state or attributes in the emitted tra e events must be known. In the example of the Prolog tra e, the properties of the obje t "proof-tree" must be known to understand the relation between the depth of the tree and the tree itself. The semanti s of the tra e (full and/or in remental) thus ontains the des ription of the relations between the parameters whi h relates the semanti s and the produ ed attributes. But to understand the tra e omprehensively, it is ne essary to go further in the knowledge of the pro ess itself. What we all here "observational semanti s" (OS) is the semanti s of the tra er (the rst semanti s, although being part of the OS, an be seen like a semanti s of the tra e). It uses the semanti s of the obje ts and a tions of the full tra e and an be seen as an abstra t semanti s in the sense of Cousot [8℄. It l ∈ dom(Σ) ∧ choice-point(Σ(l)) N ← l, S ← Σ(l) ba k to Fig. 1. A rule of the abstra t model of Prolog Proof-Tree displayed in [13℄ is a kind of natural semanti s [9℄ whi h an be expressed by a nite set of rules of the form a : Condition(S) → S ′ = a(S) su h that any event of tra e et : (t, at , St+1 ) an be obtained starting from the state St and the a tion at by appli ation of the rule a of the OS. The (set of ) a tions a performed at hrono t is denoted at . This semanti s an take the form of a stru tural operational semanti s [10℄ or of an evolving algebra [11℄ and being more or less rened, "big-step" or "small-step" [12℄. It is in fa t very tempting to have a omplete semanti s for the tra er in order to allow a lear implementation of it. Coming ba k to the example of Prolog, a tra er augmented with the tra e of onstraints resolution (proof-tree, sear h-tree, labeling-tree and propagation), alled Codeine, has been implemented in this manner on GNU-Prolog [13℄. An abstra t model has been dened [14℄, whi h has been then implemented on several solvers [1℄. This made it possible to meet two prin ipal obje tives: portability of the analyzers whose input data are based on the full tra e, and robustness of the tra ers whose implementation is guided and improved by a good methodologi al approa h [15℄ based on a pre-spe ied rigorous semanti s. It is useful however to note that a would be a omplete semanti s of the tra e, whi h omplete formalization of the observed pro ess, is almost impossible in pra ti e, be ause of the degree of renement that would imply. For example, an attribute in luded in many tra es is the CPU time onsumed by the pro ess sin e the "beginning" of the tra e emission. To formalize its variations, in fa t issued from the host system, would amount introdu ing into the observational semanti s a model of the system in whi h the pro ess is exe uted. Finally an OS should not be onfused with a whi h would make it possible to re all the the sole initial state and its rules. The omplete operational semanti s ourse of the pro ess starting from urrent full state is not su ient to know whi h rule may apply. For example, the model developed for nite domain onstraints resolution des ribed in [13℄ as at least one rule ontains a set of operational rules su h an be applied at ea h state, but whose always pre ise enough to de ide how it onditions are not an be applied. So is the ba k to rule, depi ted in the Figure 1. It ontains a the new ondition l ∈ dom(Σ) whi h must be satised, meaning that urrent node belongs to the sear h-tree, but nothing says whi h node must be sele ted. The sole knowledge of the full urrent state (whi h in ludes the urrent sear h-tree) is not su ient. The knowledge of the urrent tra e event is ne essary to know whi h is this new node and thus to know how this rule is in fa t instantiated. 4 Tra er Driver and Evaluation The idea to use a tra er driver was proposed by M. Du assé and J. Noyé sin e the origin of Prolog [16℄ in the ontext of logi programming, then regularly de- veloped and tested in various environments [17℄. The originality of this approa h onsists in proposing that the full tra e should not be ommuni ated in its in- tegrity to an analyzer, but that this one re eives only the part of the tra e whi h relates to it. Instead of broad asting "urbi et orbi" a full tra e that any analyzer would have the task to lter, ltering is performed at the sour e level, i.e. by the observed pro ess whi h behaves then like a server of tra es. The analyzer is a lient whi h restri ts himself to indi ate to the observed pro ess the tra e whi h it needs indeed. The pro esses then brings to information: the omplete separation of the observed and observing onsider an ar hite ture server/ lient with ex hanges of lient indi ates to the server the tra e it needs and the server provides him only what it requires. The ltering of the tra e is no longer arried out by the analyzer, but by the observed pro ess. It is the task of the tra er driver to perform all requested ltering and to dispat h the tra es requested by the lients. This ar hite ture as well as the ex hanges between the pro esses have been des ribed in parti ular in [1℄ and [2℄. We will not go more into the details in this extended abstra t. In addition, only the aspe ts related to the possibilities of modulating the tra es emitted a be ording to the needs of the analyzers will onsidered; the possibility previously mentioned to syn hronize the pro esses will not be onsidered here. This approa h allows to redu e the size of the tra e emitted to a useful bare minimum and thus to speed up the whole pro ess. In to onsider very large full tra es. This has also a of the tra e. Beyond a ompensation, it allows ost whi h grows with the size ertain size, the produ tion ost of the tra e is likely to be ome prohibitory. It is pre isely the question in whi h one is interested. Until where an one go into this approa h on a pra ti al level without slowing down a pro ess ex essively and how? To get a more pre ise idea, one must take into a ount not only the time of tra e produ tion, but also how the tra e will be used. One ould think at rst sight that the fa t, for the observed pro ess, to have to produ e a full tra e makes this approa h unrealisti . The server is indeed slowed down by the simple fa t of having to ompute a great number of parameters whi h will perhaps never be used. This approa h would be thus very penalizing for the pro ess instrumented with an expensive tra er whenever only a weak portion of the full tra e would be used. On another side, and pre isely in this ase, a onsiderable e onomy is realized be ause of ltering at the sour e, and the transmission of a limited tra e whose osts of oding and diusion are then extremely redu ed. The idea is that in pra ti e the fa t of emitting only one small part of the tra e, ltered at the sour e, ompensates for the over ost of work mainly related to the updates of all the parameters of the full tra e in the analyzed pro ess. On the other hand, if many analyzers are a tivated simultaneously and use at a given moment a tra e equivalent to a full tra e, the problem to produ e or not the full tra e does not arise any more (it must in any ase be produ ed), and the question about the interest of using a tra er driver is worth to be posed. We show that even in this ase the driver an save time. Additionally another type of e onomy must be onsidered whi h is omple- mentary to the previous one: the use of an in remental tra e as an ee tive tra e instead of the virtual full tra e. In this ase there is no loss of information (the equivalent of the full tra e is still transmitted), but there is a redu tion of the amount of data transmitted (a kind of data ompression is used in order to limit the size of the emitted data ow). In this later ase the tra er performs a kind of  ompression and the analyzer a kind of de ompression and both task must be taken into a ount in the analysis of the workloads. It will be shown that the performan es of the tra er and the analyzers an be inuen ed more by this kind of load rather than by the size of the full tra e. In order to be more pre ise, it is ne essary to analyze the repartition of work within the various pro esses. The times to take into a ount for a detailed performan es analysis are times on erning the pro ess itself, its tra er and its pilot on the one hand, and times on erning one analyzer on the other hand (one must suppose here that, if there are several analyzers, they are running with true parallelism): Pro ess Tra er and Driver --------------- ------------------------------------| | | | T_prog + T_ ore + T_ ond + T_extra t + T_en ode-and- om Analyser -----------------------------------------| | T_filter + T_de ode + T_rebuild + T_exe From the side of the pro ess, tra er and driver:  Tprog : time devoted to the exe ution of the not instrumented program (or instrumented but with dea tivated tra er).  Tcore: additional exe ution time of the pro ess on e instrumented to produ e the full tra e and with a tivated tra er. It is a time devoted to the onstru - tion of the elements ne essary to a likely later extra tion of the parameters of the urrent state. This time is largely inuen ed by the size of the full tra e. At this stage all approa h, one omputations must be performed be ause, in the presented onsiders that it must be possible to produ e the full state at any moment (in urrent ase in parti ular of dis ontinuous tra e). This time is related to the form of the full tra e only and does not depend on what will be emitted. If all the parameters of the full tra e are already part of the pro ess, this time is just null.  Tcond : time of he king of the onditions dening the tra es to be emitted for ea h analyzer (ltering). This time is null if there is no ltering (emission of the full tra e).  Textract : omputing time of the parameters requested during or after ltering.  Tencode−and−com : time for formatting the tra e (en oding), possible ompression and emission. Time spe i Textract and to the driver Tencode−and−com Tcond . orresponds to Other times, namely, Tcore , an be regarded as times related to the tra er. It should be noti ed here that, in this approa h, the driver a ts only on the hoi e of the parameters and the attributes to be tra e, i.e. on the ontained in the ee tive ommuni ated information. It does not have the possibility of inuen ing the form of the attributes, for example the degree of  ompression of the information. In fa t, this  ompression is oded here in the form of the attributes. The nature of the attributes (in remental information or not) is part of the tra er and it annot be modied or adapted through the tra er driver. On the other side any additional ompression algorithm used to redu e the size of the information ow belongs to the stage of en oding. Generalizing this idea, one ould also onsider the possibility to put into the tra e more abstra t attributes, adapted to some more spe i a redu ed size. The use, su h that the whole tra e has orresponding attribute omputation time would thus be related to the extra tion stage. This generalization is not studied here. From the side of the analyzer:  Tf ilter : time of ltering by an analyzer. This time is null if ltering is per- formed at the sour e (the tra e events sent to a parti ular analyzer an indeed be tagged at the sour e). In fa t by pre aution but mainly be ause of la k of implemented tra er driver, many external analyzers will lter again the tra e. However it is not ne essary to  Tdecode: ir umvent, as the time of well. It must be not be onsider this ase here. time of de oding of the re eived tra e. This time is impossible to oding and ompared with the ompletely eliminated. If used, it is be ause it is Tencode−and−com as Tencode−and−com. It an- ommuni ation encode part of ompression/de ompression algorithms are onsidered that, even if both times are umulated, one will save a substantial amount of time over the transmission.  Trebuild : time of rebuilding the full tra e starting from the ee tive tra e ( omputation of the urrent parameters starting from the emitted attributes). This time must be tributes. It is ompared with Textract , equilibrates most favorably with the  Texec : the omputation time of the at- onsidered that su h a time, even if umulated with Textract , ost of tra e emission. exe ution time of the proper fun tions of the analyzer. With very sophisti ated analyzers (as those used for data analysis for example), this time an be ome so important that it makes negligible the one orresponding to the tra e produ tion. Example: Codeine, des ribed in [13℄, implements the generation of a full tra e for the analysis of onstraints resolution, as an extension of GNU-Prolog. The urrent state St ontains (among other attributes): proof-tree, sear h-tree, straints state and variables with their domains. For a the full tra e see [1℄ ( alled in this proje t "generi not generate a full tra e (as full as it on- omplete des ription of tra e"). Even if Codeine does ould be possible), the Codeine tra e is onsiderably ri her than the simple Byrd's tra e of GNU-Prolog whi h is stri tly ontained. Only an in remental tra e is generated, and only the proof-tree and the onstraints and variables states urrent state of the pro ess (the an be rebuilt later starting just from the ost of extra tion is redu ed to the proper data management realized by the tra er). To obtain the ost of the urrent sear h- tree the pro ess would have to be re-exe uted partially, therefore it would be ne essary to freeze its nently a urrent exe ution. The ost of management of a perma- essible sear h-tree at any moment would be of its size. On the other hand an analyzer learly intra table be ause an, using the produ ed in remental tra e, maintain all these obje ts permanently (obtaining useful for it). Codeine also St or those parameters ontains a tra er driver su h that the denitions of the tra es to be emitted (spe i ation of the emitted tra e) are stored in a data le whi h must be provided before the pro ess starts. Times are distributed as follows: From the side of the pro ess, tra er and driver:  Tprog : exe part of  Tcore: ution time of GNU-Prolog with "swit hes" of the tra er (a small Tcore of negligible duration in general). time of onstru tion of the parameters of the full Codeine tra e ( ol- le ting of all data useful to extra t the full tra e); a kind of GNU-Prolog plug-in.  Tcond : time of ltering the full tra e to sele  Textract : omputing time of the attributes t all the requested tra es. orresponding to the parameters requested during ltering.  Tencode−and−com : omputing time of the attributes orresponding to the re- quested parameters, en oding (XML format or Prolog term) of the emitted tra e, and emission time of the in remental tra e. From the side of the analyzers: experiments in the framework of the OADymPPaC proje t with sophisti ated analyzers (intensive visualization of graphs, visual data analyses) revealed the following  Tf ilter and Tdecode : osts. both times are intri ate in a synta ti (XML) of the full tra e. Re-ltering, a part of whi h But the driven tra er approa h analysis module ould have been avoided. ould not be taken into a ount in the analyzers built during this proje t.  Trebuild : time of onstru tion of the parameters of the full tra e (variables domains, a tive onstraints set, sear h-tree ...). This time grows (non esti- mated fa tor) a ording to the size of the data, sometimes related to the size of the tra e, with a onsiderable slow down of the analyzer during the read- ing of the tra e . The low speed of an analyzer may ause, in the ase of analysis of the tra e on the y, a strong slow down of the observed pro ess.  Texec : time of onstru tion of the obje ts to be visualized (graphs, data tables). These times an grow exponentially a The e ien y of the used algorithms is ording to the size of the data. ru ial here. This an also ause a slow down of the pro ess, and pleads in favor of a preliminary treatment of information before transmission (for example, sele tion of distinguished nodes to put in the tra e to redu e the size of a drawn graphs, or to olle t groups of variables as a unique attribute to redu e the number of lines in a matrix). It was been shown experimentally in [3℄ that the behavior of the Codeine tra er with the full tra e above ompares favorably with the behavior of GNU- Prolog with the Byrd's tra e only. Furthermore, the ltering realized by the tra er driver does not prejudi es the performan es. We give here a theoreti al justi ation to this result, showing that this approa h, already justied experimentally, an also be justied theoreti ally. In [2℄ L. Langevine observes that ltering the tra es all together is more ee tive than to lter them one after the other. This omes from the fa t that running several automata together may be more e ient than running one only. Indeed the essen e of ltering relates to simplied sele t rst the tra e events ner additional ltering will be thus of events mu h more redu ed. One a tra e whose language to onditions whose role is to ontaining the ports requested by an analyzer. A arried out thereafter but on a number an admit that this rst ltering relates to orresponds to a regular language. It is then possible onsider that ea h lter is itself a regular expression whose re ognition on the full tra e Filtering an be done using a non deterministi nite-state automaton. orresponds then to the re ognition task by a union of as many nite- state automata than there are a tive analyzers requesting a tra e. However the resulting automaton, on e optimized, an be mu h more e ient than the most e ient of the automata asso iated with a single analyzer (the union of the automata an be more e ient in terms of omputation steps than only one of them [18℄). As these operations of ltering are extremely frequent, be ause they apply to all the tra e events, the speed up an be onsiderable. We are now in position to analyze the respe tive workloads. First observe that respe tive times of both sides may be onsidered as u- mulative or not, depending whether the respe tive pro ess are run sequentially or with true parallelism. In the later essors (a situation whi h an be ase, if all pro ess are run on dierent pro- onsidered with su h an approa h), only the slowest pro ess must be taken into a ount to evaluate the exe ution time of the whole system.  Tprog and Tcore These times on one side, Texec on the other side. orrespond to times spe i to the tra er and the analyzers (the slowest analyzer has the main inuen e on the exe ution time). These times Tcore Tf ilter are in ompressible and  Tcond on one side and depends only on the size of the virtual tra e. on the other side. At least one of these times must be null, and, if the ltering is at the sour e, the performan e an be improved. In any whatever is the size of the full tra e,  Textract on one side and These times Trebuild ases this time appears negligible, ompared with the other times. on the other side. orrespond respe tively to the omputation of the attributes from the parameters and re ipro ally. If one an redu e the extra tion time thanks to the ltering ( onsidering the low number of sele ted tra e events and attributes, and the fa t that the most of the parameters work is already in luded in Tcore ), the time of rebuilding omputation an be very im- portant and will probably be signi antly greater than the extra tion time.  Tencodea ndc om on one side and These times Tdecode on the other side. an be important, but the interest lies in the fa t that the prots realized on the ompensates the ommuni ation time (redu ed emitted volume) largely oding/de oding times. To summarize, the tra er and the slowest analyzer are the main fa tors inuen ing the whole performan e and they sides an in rease the workload of both onsiderably. However the use of a tra er driver and of te hniques of tra e ompression make it possible to ompensate partially, but sometimes in very ee tive manner, the over- osts related to the use of a full tra e. 5 Con lusion We introdu ed the on ept of full tra e in order to take into a possibilities of analysis of a dynami ount the multiple pro ess. The analyzed pro ess is instru- mented with, in addition to its tra er, a tra e driver, and the analyzers have the possibility of addressing orders to the driver. An ar hite ture then lient/server is onsidered to des ribe the intera tions between the pro esses analyzers and the analyzed pro ess. This enabled us to ta kle the problem of the evaluation of this approa h in terms of e ien y. We tried to appre iate how the introdu tion of a tra er driver the global e ien y of the analysis of a dynami ould improve pro ess using several analyzers observing the pro ess in a simultaneous way. We initially observed that a full tra e ould be parti ularly expensive to produ e, but that part of this ould be transferred, without loss of apa ity of analysis (the full tra e retrieved by the analyzers), on the analyzers. The most unfavorable of e ien y ost an be ase in term orresponds to the situation where the equivalent of a full tra e must be built, extra ted and emitted. In this ase, the full tra e is in fa t a union of all the redu ed tra es requested by several analyzers. We showed that, even in this ase, a ltering realized by a tra er driver was able to bring an important bene e. Our observations, during the proje ts DiSCiPl [5℄ and OADymPPaC [1℄, using very sophisti ated analyzers as powerful tools for visualizations as well ([19℄ [20℄), also showed that the limits of performan e analyzers that tra er, even with a full tra e. This study opens nally on a series of questions: ame often more of the  How deep is it possible to implement a very broad full tra e? ourse the limits of the approa h are obvious: the Of on ept of full tra e is meaningful only with regards to a family of possible analyses, well known and sele ted in advan e. Nothing guarantees a priori that an additional instrumentation of the observed pro ess will never be ne essary. But beyond this aspe t, the interesting question relates to the feasibility of the implementation of a very ne grained full tra e. On one side indeed, one will be able to ompensate for ertain produ tion osts of su h large tra e, by emit- ting an ee tive tra e of limited size; but on the other side, the analyzers (whose use an be temporary or ex eptional) will be loaded with most of time of development/re-building of the full tra e (ne essary, even if it uses only a part of it) and will o asionally slow down the observed pro ess.  Whi h intera tion language to use and whi h dialogue between the driver and the analyzers? This question has been little ta kled here and mainly remains out of the s ope of this arti le. The tenden y however is with the use of a language like XML. It is the way hosen by the OADymPPaC proje t, and the possibility of redu ing the ow of tra e to its bare minimum en ourages this. Nevertheless our experiments showed that the data ommuni ation needed to be optimized by ompression with spe i tra e ombining usual methods of ompression like using in remental at- tributes, but also by introdu ing more abstra t attributes in the tra e. This leads to the idea that the dialogue between the involved pro esses, limited here to the hoi e of the tra e events and the attributes in the tra e, and apa ities of syn hronization, must be extended su h that it allows also to  inuen e the design of the attributes themselves. Finally a ru ial question related to the omprehension of the tra e. to understand a tra e, or how to des ribe its semanti s ? How If the semanti s of the tra e (and of the tra er), or at least a large part of it, is given a priori (be ause one has a model for the observed pro ess), then the omprehension of the tra e as well as the implementation of the tra er are largely fa ilitated. In the opposite or arti ial ase - and it is the ase for many natural omplex pro esses - one has only vast tra es to study. Even in the elds of programming languages where semanti s seems better ontrolled a priori, one tries to analyze a program behavior by trying to understand its tra es. Thus one sees stinging the usefulness of general te hniques based on data mining [21℄ or on Web mining [22℄ for su h purposes. However one must re ognize that any full tra e will probably always in lude portions es aping any kind of des ription based on formal semanti s. Referen es 1. Deransart, P., & al: Outils d'Analyse Dynamique Pour la Programmation par Contraintes (OADymPPaC). Te hni al report, Inria Ro quen ourt and É ole des Mines de Nantes and Insa de Rennes and Université d'Orléans and Cosyte and ILOG (2004) Projet RNTL. http:// ontraintes.inria.fr/OADymPPaC . 2. Langevine, L., Du assé, M.: A Tra er Driver for Hybrid Exe ution Analyses. In Press, A., ed.: Pro eedings of the 6th Automated Debugging Symposium. (2005) 3. Langevine, L., Du assé, M.: A Tra er Driver for Versatile Dynami Analyses of Constraint Logi Programs. In Serebrenik, A., Muñoz-Hernandez, S., eds.: Pro eedings of the 15th Workshop on Logi -based Methods in Programming Environments (WLPE'05), a pre- onferen e workshop of ICLP'05, Sitges, Spain (2005) Computer Resear h Repository s.SE/0508105. 4. Langevine, L., Du assé, M.: A Tra er Driver for CLP: Debugging, Monitoring and Visualization of an Exe ution from a Single Tra er. In Demoen, B., Lifs hitz, V., eds.: Pro . of the 20th Int. Conf. on Logi Programming, (ICLP'04). Number 3132 in LNCS, Saint-Malo, Fran e (2004) 462463 5. Deransart, P., Hermenegildo, M., Maªuszy«ski, J., eds.: Analysis and Visualisation Tools for Constraint Programming. Number 1870 in LNCS. Springer Verlag (2000) 6. GNU-Prolog: A CLP(FD) System Based on Standard Prolog (ISO) developed by D. Diaz (2003) http://gprolog.sour eforge.net/ Distributed under the GNU li ense. 7. Byrd, L.: Understanding the ontrol ow of Prolog programs. Logi Programming Workshop (1980) 8. Cousot, P.: Abstra t Interpretation. Te hnique et S ien e Informatiques 19 (1994) 19 9. Kahn, G.: Natural Semanti s. In Brandenburg, F.J., Vidal-Naquet, G., Wirsing, M., eds.: Pro eedings of STACS, Springer (1987) also INRIA, RR 416, Natural Semanti s on the Computer. 10. Plotkin, G.: A Stru tural Approa h to Operational Semanti s. TR DAIMI FN 19, Computer S ien e Department, Aarhus University, Aarhus, Denmark (1981) 11. Gurevit h, Y.: Evolving algebras, a tutorial introdu tion. Bulletin of the European Asso iation for Theoreti al Computer S ien e 43 (1991) 264284 12. Lu as, S.: Observational Semanti s and Dynami Analysis of Computational Proess. RR 00/02, E ole Polyte hnique, Laboratoire d'Informatique, LIX, Palaiseau (Fran e) (2000) 13. Langevine, L., Du assé, M., Deransart, P.: A Propagation Tra er for GNU-Prolog: from Formal Denition to E ient Implementation. In Palamidessi, C., ed.: Proeedings of the 19th International Conferen e on Logi Programming, ICLP'03, Mumbai, India (2003) 14. Langevine, L., Deransart, P., Du assé, M.: A Generi Tra e S hema for the Portability of CP(FD) Debugging Tools. In Apt, K., Fages, F., Rossi, F., P., S., Van za, J., eds.: Re ent Advan es in Constraints. Number 3010 in Le ture Notes in Arti ial Intelligen e. Springer Verlag (2004) Sele ted papers of the Joint ERCIM/CoLogNET International Workshop on Constraint Solving and Constraint Logi Programming. 15. Du assé, M., Langevine, L., Deransart, P.: Rigorous design of tra ers: an experiment for onstraint logi programming. In Ronsse, M., Boss here, K.D., eds.: Pro eedings of the 5th International Workshop on Automated and Algorithmi Debugging, AADEBUG'03, Ghent, Belgium (2003) Computer Resear h Repository s.SE/0310042. 16. Du assé, M., Noyé, J.: Logi Programming Environments: Dynami Program Analysis and Debugging. The Journal of Logi Programming 19/20 (1994) 351384 17. Du assé, M.: Tra e S hemata for (Multi-language) Dynami Analysis. In Choi, J.D., Ryder, B., Zeller, A., eds.: Dagstuhl Seminar 03491, "Understanding Program Dynami s", Saint-Malo, Fran e, Dagstuhl, Germany (2003) 18. Hop roft, J.E., Ullman, J.D., eds.: Introdu tion to Automata Theory, Languages, and Computation. Computer S ien e. Addison-Wesley (1979) 19. Baudel, T., & al: Visual CP, Referen e Manual (2004) Manufa tured and distributed by Ilog, http://www2.ilog. om/preview/Dis overy/ . 20. Ghoniem, M., Jussien, N., Fekete, J.D.: VISEXP: Visualizing Constraint Solver Dynami s Using Explanations. In Barr, V., Markov, Z., eds.: Pro . of the 17th Int. of the Florida Arti ial Intelligen e Resear h So iety Conferen e (FLAIRS'04), AAAI Press (2004) 21. Denmat, T., Du assé, M., Ridoux, O.: Data Mining and Cross-Che king of Exe ution Tra es. A reinterpretation of Jones, Harrold and Satsko test Information Visualization. RI 1743, IRISA, Rennes (Fran e) (2005) 22. Zaidman, A., Calders, T., Demeyer, S., Paredaens, J.: Applying Webmining Te hniques to Exe ution Tra es to Support the Program Comprehension Pro ess. In So iety, I.C., ed.: Pro eedings of the 9th European Conferen e on Software Maintenan e and Rengineering (CSMR 2005), Man hester, UK (2005) 134142
6cs.PL
manuscript No. (will be inserted by the editor) Competitive Fragmentation Modeling of ESI-MS/MS spectra for putative metabolite identification arXiv:1312.0264v3 [cs.CE] 9 Jun 2014 Felicity Allen · Russ Greiner · David Wishart Abstract Electrospray tandem mass spectrometry (ESI-MS/MS) is commonly used in high throughput metabolomics. One of the key obstacles to the effective use of this technology is the difficulty in interpreting measured spectra to accurately and efficiently identify metabolites. Traditional methods for automated metabolite identification compare the target MS or MS/MS spectrum to the spectra in a reference database, ranking candidates based on the closeness of the match. However the limited coverage of available databases has led to an interest in computational methods for predicting reference MS/MS spectra from chemical structures. This work proposes a probabilistic generative model for the MS/MS fragmentation process, which we call Competitive Fragmentation Modeling (CFM), and a machine learning approach for learning parameters for this model from MS/MS data. We show that CFM can be used in both a MS/MS spectrum prediction task (ie, predicting the mass spectrum from a chemical structure), and in a putative metabolite identification task (ranking possible structures for a target MS/MS spectrum). In the MS/MS spectrum prediction task, CFM shows significantly improved performance when compared to a full enumeration of all peaks corresponding to substructures of the molecule. In the metabolite identification task, CFM obtains substantially better rankings for the correct candidate than existing methods (MetFrag and FingerID) on tripeptide and metabolite data, when querying PubChem or KEGG for candidate structures of similar mass. Keywords Tandem Mass Spectrometry · MS/MS · Metabolite Identification · Machine Learning 1 Introduction Liquid chromatography combined with Electrospray Ionisation Mass Spectrometry (ESI-MS) is one of the most frequently used approaches for conducting metabolomics experiments (Dunn and Ellis 2005; Tautenhahn et al 2012; Kind and Fiehn 2010; Wishart 2011). Collision-induced dissociation (CID) is usually employed within this procedure, intentionally fragmenting molecules into smaller parts to examine their structure. This is called MS/MS or tandem mass spectrometry. A significant bottleneck in such experiments is the interpretation of the resulting spectra to identify metabolites. Widely used methods for putative metabolite identification (Sumner et al 2007), using mass spectrometry, compare a collected MS or MS/MS spectrum for an unknown compound against a database containing reference MS or MS/MS spectra (Stein and Scott 1994; Scheubert et al 2013; Tautenhahn et al 2012). Unfortunately, current reference databases are still fairly limited, especially in the case of ESI-MS/MS. At the time of writing, the public Human Metabolome Database (Wishart et al 2013) contains ESI-MS/MS data for around 800 compounds, which represents only a small fraction of the 40,468 known human metabolites it lists. The publicly available Metlin database (Smith et al 2005) provides ESI-MS/MS spectra for 11,209 of the 75,000 endogenous and 2 Felicity Allen et al. exogenous metabolites it contains, although more than half of those spectra are for enumerated tripeptides. The public repository MassBank (Horai et al 2010) contains a more diverse dataset of 31,000 spectra collected on a variety of different instruments, including ESI-MS/MS spectra for approximately 2000 unique compounds. However, set against the more than 19 million chemical structures in the Pubchem Compound database (Bolton et al 2008), an estimated 200,000 plant metabolites (Fiehn 2002), or even the 32,801 manually annotated entries in the database of Chemical Entities of Biological Interest (ChEBI) (Hastings et al 2013), we see that MS/MS coverage still falls far short of the vast number of known metabolites and molecules of interest. Consequently, there is substantial interest in finding alternative means for identifying metabolites for which no reference spectra are available (Scheubert et al 2013). For these cases, one approach to metabolite identification involves first predicting the MS or MS/MS spectrum for each candidate compound from its chemical structure (Heinonen et al 2008; Wolf et al 2010; Lindsay et al 1980; Gasteiger et al 1992). The interpreter then uses these predicted spectra in place of reference spectra, and labels the target spectrum as the metabolite whose predicted spectrum is the closest match, according to some similarity criteria. A wide range of similarity criteria have been proposed, from weighted counts of the number of matching peaks (Stein and Scott 1994), to more complex probability based measures (Mylonas et al 2009; Oberacher et al 2009). The upshot of this predictive approach is that only a list of candidate molecules is needed, rather than a complete database of reference spectra. However, the restriction to a list of candidate molecules means that this approach still falls short of de novo identification of ’unknown unknowns’ (Wishart et al 2009), -i.e. we cannot identify molecules not in the list. The concept of computer-based MS prediction has been around since the Dendral project in the 1960’s, when investigators attempted to predict Electron Ionization (EI) mass spectra using early machine learning methods (Lindsay et al 1980). More recent approaches to this problem have generally taken one of two forms: rule-based or combinatorial. Commercial packages, such as Mass Frontier (Thermo Scientific, www.thermoscientific.com), and MS Fragmenter (ACD Labs, www.acdlabs.com), are rule-based, using thousands of manually curated rules to predict fragmentations. Primarily developed for EI fragmentation, these packages have been extended for use with ESI. This current work does not compare against these methods empirically, however in at least one study they have been found to have been out-performed by MetFrag (Wolf et al 2010), to which we do compare. MOLGEN-MS (Kerber et al 2006) also applies rule-based fragmentations in combination with an isotope-dependent matching criteria to rank candidate molecules for a given EI spectrum. Another knowledge-based approach, called MASSIMO, combines chemical knowledge with data; using logistic regression to predict fragmentation probabilities for a particular class of EI fragmentations (Gasteiger et al 1992). The other class of algorithms applies a combinatorial fragmentation procedure, enumerating all possible fragments of the original structure by systematically breaking bonds (Hill and MortishireSmith 2005; Heinonen et al 2008; Wolf et al 2010). First proposed by Hill and Mortishire-Smith (2005), this method has been incorporated into the freely available programs FiD (Heinonen et al 2008) and MetFrag (Wolf et al 2010). Both identify the given spectrum with the metabolite that has the most closely matching peaks via such a combinatorial fragmentation. These programs also employ several heuristics in their scoring protocols to emphasise the importance of more probable fragmentations. FiD uses an approximate measure of the dissociation energy of the broken bond, combined with a measure of the energy of the product ion. MetFrag incorporates a similar measure of bond energy combined with a bonus if the neutral loss formed is one of a common subset. An alternative method, FingerID (Heinonen et al 2012), takes advantage of the increasing number of available MS/MS spectra, by applying machine learning methods to this task. This program uses support vector machines (SVMs) to predict a chemical fingerprint directly from an MS/MS spectrum, and then searches for the metabolite that most closely matches that predicted fingerprint. For a more extensive review of existing computational methods in MS-based metabolite identification, see Hufsky et al (2014). The main problem with the current combinatorial methods is that, while they have very good recall, explaining most if not all peaks in each spectrum, they also have poor precision, predicting many more peaks than are actually observed. MetFrag and FiD attempt to address this problem by CFM Modeling of ESI-MS/MS for putative Metabolite ID 3 adding the heuristics described above. In our work, we investigate an alternative machine learning approach that aims to improve the precision of such combinatorial methods. We propose a method for learning a generative model of the CID fragmentation process from data. This model estimates the likelihood of any given fragmentation event occurring, thereby predicting those peaks that are most likely to be observed. We hypothesise that increasing the precision of the predicted spectrum in this way will improve our system’s ability to accurately identify metabolites. In a similar spirit, Kangas et al (2012) proposed a machine learning approach for obtaining bond dissociation energies for lipids. Their method uses a different model and training paradigm which, to the authors’ knowledge, has not yet been applied to general classes of metabolites. Section 2 provides details of our proposed model and the training method. Section 3 then reports the experimental results. We will assume the reader knows the foundations of ESI MS/MS; for an introduction to this process, see de Hoffman and Stroobant (2007). 2 Methods This section presents our model for the ESI-MS/MS CID fragmentation process, which we call Competitive Fragmentation Modeling (CFM), and a method for deriving parameters for this model from existing MS/MS data. Section 2.1 describes the simplest form of this method; Single Energy Competitive Fragmentation Modeling (SE-CFM). Section 2.2 then presents an extension of this method, Combined Energy Competitive Fragmentation Modeling (CE-CFM), which aims to make better use of CID MS/MS spectra measured at different energy levels for the same compound. Windows executables and cross-platform source code and the trained models are freely available at http://sourceforge.net/projects/cfm-id/. A web server interface is also provided at http:// cfmid.wishartlab.com. This provides access to the SE-CFM model trained on the Metlin Metabolite data as used in Section 3 , along with examples of predicted spectra. 2.1 Single Energy CFM (SE-CFM) In Single Energy CFM (SE-CFM), we model ESI-MS/MS fragmentation as a stochastic, homogeneous, Markov process (Cappé et al 2005) involving state transitions between charged fragments, as depicted in Figure 1(a). More formally, the process is described by a fixed length sequence of discrete, random fragment states F0 , F1 , . . . , Fd , where each Fi takes a value from the state space F := {f1 , f2 , . . . , f|F | }, the set of all possible fragments; this state space will be further described in Section 2.1.1. A transition model defines the probabilities that each fragment leads to another at one step in the process; see Section 2.1.2. An observation model maps the penultimate node Fd to a peak P , which takes on a value in R that represents the m/z value of the peak to which the final fragment will contribute; see Section 2.1.4. SE-CFM is a latent variable model in which the only observed variables are the initial molecule F0 and the output peak P ; the fragments themselves are never directly observed. Each output P adds only a small contribution to a single peak in the mass spectrum. In order to predict a complete mass spectrum, we can run the model forward multiple times to compute the marginal distribution of P . 2.1.1 Fragment State Space We make the following assumptions about the CID fragmentation process. Further details for the motivations of each are provided below, but these generally involve a trade-off between accurately modeling the process and keeping the model computationally tractable. 1. All input molecules have a single positive charge and exist in their most common isotopic form. 4 Felicity Allen et al. Fig. 1 (a) Single Energy Competitive Fragmentation Model (SE-CFM): a stochastic, Markov process of state transitions between charged fragments. (b) Combined Energy Competitive Fragmentation Model (CE-CFM): an extension of SE-CFM that combines information from multiple collision energy spectra into one model. 2. In a collision, each molecule will break into two fragments. 3. No mass or charge is lost. One of the two fragments must have a single positive charge and the other must be neutral. Combined, the two must contain all the components of the original charged molecule, i.e. all the atoms and electrons. 4. No further sigma bonds can be removed or added during a break, except those connecting hydrogens –i.e. the edges in the molecular graph must remain the same. 5. Rearrangement of pi bonds is allowed and hydrogen atoms may move anywhere in the two resulting fragments, on the condition that both fragments satisfy all valence rules, and standard bond limitations are met –e.g. no bond orders higher than triple. 6. The even electron rule is always satisfied –i.e. no radicals. Assumption 1 is reasonable as we assume that the first phase of MS/MS successfully restricts the mass range of interest to include only the [M+H]+ precursor ion containing the most abundant isotopes. Since this ion has only a single positive charge, we can safely assume that no multiplycharged ions will be formed in the subsequent MS2 phase. Ensuring that valid [M+H]+ precursor ions are selected in MS1 is beyond the scope of this work; see Katajamaa and Oresic (2007) for a summary of MS1 data processing methods. Assumptions 2, 4 and 6 do not necessarily hold in real-world spectra (Galezowska et al 2013; Levsen et al 2007). However including them substantially reduces the branching factor of the fragment enumeration, making the computations feasible. Since these assumptions do appear to hold in the vast majority of cases, we expect that including them should have minimal negative impact on the experimental results. Note that most 3-way fragmentations can be modeled by two sequential, 2-way fragmentations, so including Assumption 2 should not impact our ability to model most fragmentation events. Assumption 5 allows for McLafferty Rearrangement and other known fragmentation mechanisms (McLafferty and Turecek 1993). CFM Modeling of ESI-MS/MS for putative Metabolite ID 5 Fig. 2 An abstract example of a fragmentation graph, showing a directed acyclic graph of all possible ways in which a particular charged molecule may break to produce smaller charged fragments. Our method for enumerating fragments is similar in principle to the combinatorial approach used in MetFrag and FiD (Wolf et al 2010; Heinonen et al 2008), with some additional checks to enforce the above assumptions. We systematically break all non-ring bonds in the molecule (excluding those connecting to hydrogens) and all pairs of bonds within each ring. We do this one break at a time, enumerating a subset of fragments with all possible masses that may form after each break, allowing for hydrogen rearrangements. This subset is found by determining the number of additional electrons that can be allocated to either side of the break using integer linear programming to enforce bond constraints –e.g. breaking the middle bond in CCC[CH4+] (SMILES format) gives possible fragments C=[CH3+] (mass=29.04Da, loss CC) and C[CH4+] (mass=31.05Da, loss C=C), whereas it is not possible to break the triple bond in C#[CH2+] because there is nowhere for the electrons from the bond to go. The fragmentation procedure is applied recursively on all the produced fragments, to a maximum depth. The result is a directed acyclic graph (DAG) containing all possible charged fragments that may be generated from that molecule. An abstract example of such a fragmentation graph is provided in Figure 2. Note that for each break, one of the two produced fragments will have no charge. Since it is not possible for a mass spectrometer to detect neutral molecules, we do not explicitly include the neutral fragments in the resulting graph, nor do we recur on their possible breaks. However neutral loss information may be included on the edges of the graph, indicating how a particular charged fragment was determined. This representation of the fragmentation possibilities as a DAG is similar to that proposed by Böcker and Rasche (2008) with the exception that their nodes contain molecular formulae rather than structures for the ions. 2.1.2 Transition Model Our parametrized transition model assigns a conditional probability to each fragment given the previous fragment in the sequence F0 ,F1 ,. . . ,Fd . Recall that Ft denotes the random fragment state at time t, whereas fi denotes the ith fragment in the space of all fragments. In the case where fi has fj as a possible child fragment in a fragmentation graph, our model assigns a positive probability to the transition from Ft = fi to Ft+1 = fj . Furthermore, self-transitions are always allowed, i.e. the probability of transitioning from Ft = fi to Ft+1 = fi is always positive (for the same fi ). We assign 0 probability to all other transitions, i.e. those that are not self-transitions, and that do not exist within any fragmentation graph. Although the set of possible charged fragments F is large, the subset of child fragments originating from any particular fragment is relatively small. For example, the requirement that a feasible child fragment must contain a subset of the atoms in the parent fragment rules out many possibilities. Consequently most transitions will be assigned a probability of 0. Note that the assigned probabilities of all transitions originating at a particular fragment, including the self-transition, must sum to one. 6 Felicity Allen et al. Fig. 3 Two similar breaks, both resulting in an H2 O neutral loss. The right case should be assigned a higher probability, as in the left case, the NH3 is also likely to break away, reducing the probability of the H2 O loss. We now discuss how we parametrize our transition model. A natural parametrization would be to use a transition matrix containing a separate parameter for every possible fragmentation fi → fj . Unfortunately, we lack sufficient data to learn parameters for every individual fragmentation in this manner. Instead, we look for methods that can generalize by exploiting the tendency of similar molecules to break in similar ways. 2.1.3 Break Tendency We introduce the notion of break tendency, which we represent by a value θ ∈ R for each possible fragmentation fi → fj that models how likely a particular break is to occur. Those fragmentations that are more likely to occur are assigned a higher break tendency value, and those that are less likely are given lower values. We then employ a softmax function to map the break tendencies for all breaks involving a particular parent fragment to probabilities, as defined in Equation 1 below. This has the effect of capturing the competition that occurs between different possible breaks within the same molecule. For example, consider the two fragmentations in Figure 3. Here, although both fragmentations involve an H2 O neutral loss, in the left-hand case, the H2 O loss must compete with the loss of an ammonia group, whereas in the right hand case, it does not. Hence our model might assign an equal break tendency to both cases, but this would still result in a lower probability of fragmentation in the former case, due to the competing ammonia. We model the probability of a particular break fi → fj occurring as a function of its break tendency value θi,j and that of all other competing breaks from the same parent, as follows:  exp θi,j  P    1 + exp θi,k    k  1 ρ(fi , fj ) = P   1 + exp θi,k    k    0 : fi 6= fj and fi → fj is possible : f i = fj (1) : fi → fj is not possible where the sums iterate over all k for which fi → fk is possible. Since the break tendency is a relative measure, it makes sense to tie it to some reference point. For the purposes of this model, we have assigned the break tendency for a self-transition (i.e. no break occuring) to θi,i = 0, which gives exp θi,i = 1 as shown in (1). Incorporating Chemical Features We need to compute θi,j for i 6= j. To do this we first define a binary feature vector Φi,j to describe the characteristics of a given break fi → fj . Such features might include the presence of a particular atom adjacent to the broken bond, or the formation of a specific neutral loss molecule –e.g. see Section 3.2. We then use these features to assign a break tendency value using a linear function parameterized by a vector of weights w ∈ Rn –i.e. θi,j := wT Φi,j . This can then be substituted into (1) to generate the probability of transition fi → fj . The first feature of Φi,j is a bias term, set to 1 for all breaks. Note that the vector w constitutes the parameters of the CFM model that we will be learning. CFM Modeling of ESI-MS/MS for putative Metabolite ID 7 2.1.4 Observation Model We model the conditional probability of P using a narrow Gaussian distribution centred around the mass1 of Fd , i.e. P |Fd ∼ N (mass(Fd ), σ 2 ). The value for σ can be set according to the mass accuracy of the mass spectrometer used. So, we define this observation function to be the following (  2 ) 1 1 m − mass(Fd ) g(m, Fd ; σ) = √ exp − . (2) 2 σ σ 2π Our investigation (see supplementary data) of the mass error of the precursor ions in the Metlin metabolite data used in Section 3 found that the distribution of mass errors had a mean offset of approximately 1 ppm, and a narrower shape than a Gaussian distribution. However, in order to model a more general mass error, not specific to a particular instrument or set of empirical data, we think the Gaussian distribution is a reasonable approach. 2.1.5 Selecting Parameter Values Our system estimates the values for the parameters w of the proposed model by applying a training procedure to a set of molecules X = {x1 , x2 , . . . , x|X | }, for which we have both the chemical structure and a measured MS/MS spectrum. For the purposes of this work, we assume we have a measured low, medium and high energy CID MS/MS spectrum for each molecule, which we denote S(x) =( sL (x), sM (x), sH (x))∀x ∈ X . Each spectrum is further defined to be a set of peaks, where each peak is a pair (m, h), composed of a mass m ∈ R and a height (or intensity) h ∈ [0, 100] ⊂ R. Note that each spectrum is normalized, such that the peak heights sum to 100. For this single energy version of the model, we derive parameters for a completely separate model for each of the three energy levels, using data from that level only. Note that if we had data for only one energy level, we could use this method to train a model using just that energy. However Section 2.2 will extend this model to combine the three energy spectra for use in a single model. Until then, we will use s(x) to denote whichever of sL (x), sM (x) or sH (x) we are currently considering. Maximum Likelihood We use a Maximum Likelihood approach for parameter estimation. The likelihood of the data X , given the parameters w, and incorporating the previously defined transition function ρ and observation function g, is given by L(w, X ) = Y Y  X ρ(x, F1 ; w) x∈X (m,h)∈s(x) F1 ∈C 0 (x) X ρ(F1 , F2 ; w) . . . F2 ∈C 0 (F1 ) X ρ(Fd−1 , Fd ; w) g(m, Fd ; σ) h Fd ∈C 0 (Fd−1 ) (3) where C(fi ) denotes the children of fi in all fragmentation graphs containing it, and C 0 (fi ) = {fi } ∪ C(fi ). However we are unable to maximize this function in closed form. Instead we use the iterative Expectation Maximization (Dempster et al 1977) technique. Expectation Maximization (EM) In the E-step, the expected log likelihood expression is given by Q(wt , wt−1 | X ) = =  Ewt−1 log L(wt , X ) X X  . . . Pr F1 . . . Fd | X ; wt−1 log L(wt , X ), F1 (4) (5) Fd 1 Although mass spectrometry measures mass over charge, we assume charge is always 1 (see Assumption 1 in Section 2.1.1) and hence can just use the mass here. 8 Felicity Allen et al. where wt denotes the values for w on the t-th iteration. Substituting (1) and (2) into the above and re-arranging in terms of all possible fragment pairs gives X Q(wt , wt−1 | X ) = νwt−1 (fi , fj , X ) log ρ(fi , fj ; wt ) + K (6) (fi ,fj )∈F ×F where νwt−1 (fi , fj , X ) = d X 0 d ηw t−1 (fi , fj , X ), d0 =1 d ηw t−1 (fi , fj , X ) X = h Pr Fd−1=fi , Fd=fj | F0=x, P =m; wt−1  {(m,h)∈s(x):x∈X } and K = X Pr(Fd | X ; wt−1 ) log Pr(P = m | Fd ). Fd In the M-Step, we look for the wt that maximizes the above expression of Q. Noting that K is independent of wt and denoting the lth component of w as wl ,   X X l ∂Q = νwt−1 (fi , fj , X ) I[fi6=fj ]Φli,j − Φi,k ρ(fi , fk ; w) (7) ∂wl (fi ,fj )∈F ×F k∈C(fi ) where Φli,k denotes the lth component of the feature vector Φi,k and I[.] is the indicator function. This does not permit a simple closed-form solution for w. However Q(wt , wt−1 | X ) is concave in wt , so settings for wt can be found using gradient ascent. Values for the joint probabilities in d the ηw t−1 terms can be computed efficiently using the junction tree algorithm (Koller and Friedman 2009). We also add an `2 regularizer on the values of w to Q (excluding the bias term). This has the effect of discouraging overfitting by encouraging the parameters to remain close to zero. 2.2 Combined Energy CFM MS/MS spectra are often collected at multiple collision energies for the same molecule. Increasing the collision energy usually causes more fragmentation events to occur. This means that fragments appearing in the medium and high energy spectra are almost always descendants of those that appear in the low and medium energy spectra, respectively. So the existence of a peak in the medium energy spectrum may help to differentiate between explanations for a related peak in the low or high energy spectra. For this reason, we also assessed an additional model, Combined Energy CFM (CE-CFM), which extends the SE-CFM concept by combining information from multiple energies as shown in Fig. 1 (b). PLOW, PMED and PHIGH each represent a peak from the low, medium and high energy spectrum respectively. The fragment states, transition rules and the observation model are all the same here as for SE-CFM. The main difference now is that the homogeneity assumption is relaxed so that separate transition likelihoods can be learned for each energy block –i.e., F0 to FdL , FdL to FdM and FdM to FdH , where dL , dM and dH denote the fragmentation depths of the low, medium and high energy spectra respectively. This results in separate parameter values for each energy, denoted respectively as wL , wM and wH . The complete parameter set for this model thus becomes w = wL ∪ wM ∪ wH . We can again use a Maximum Likelihood approach to parameter estimation based on the EM algorithm. This approach deviates from the SE-CFM method only as follows: – For each energy level, (7) is computed separately, restricting the νwt−1 terms to relevant parts of the model –e.g. d0 would sum from dL +1 to dM when computing the gradients for wM , and from dM +1 to dH when computing gradients for wH . CFM Modeling of ESI-MS/MS for putative Metabolite ID 9 d – The computation of the ηw terms combines evidence from the full set of three spectra S(x). t−1 In SE-CFM, we apply one spectrum at a time, effectively sampling from a distribution over the peaks from each observed spectra. In this extended model we cannot do this because we do not have a full joint distribution over the peaks, but rather we only have marginal distributions corresponding to each spectrum. The standard inference algorithms –e.g. the junction tree algorithm, do not allow us to deal with observations that are marginal distributions rather than single values. Instead we use the Iterative Proportional Fitting Procedure (IPFP) (Deming and Stephan 1940), with minor modifications to better handle cases where the spectra are inconsistent (not simultaneously achievable under any joint distribution). These modifications reassign the target spectra to be the average of those encountered when the algorithm oscillates in such circumstances. 3 Experimental Results In this section we present results using the above described SE-CFM (d=2) and CE-CFM (dL =2, dM =4, dH =6) methods, on a spectrum prediction task, and then in a metabolite identification task. 3.1 Data We used the Metlin database (Smith et al 2005), separated into two sets (see description below) each containing positive mode, ESI-MS/MS spectra from a 6510 Q-TOF (Agilent Technologies) mass spectrometer, measured at three different collision energies: 10V, 20V and 40V, which we assign to be low, medium and high energy respectively. Each set was randomly divided into 10 groups for use within a 10-fold cross validation framework. 1. Tripeptides: The Metlin database contains data for over 4000 enumerated tripeptides. We randomly selected 2000 of these molecules, then omitted 15 that had four or more rings due to computational resource concerns, leaving 1985 remaining in the set. Fragmentation patterns in peptides are reasonably well understood (Papayannopoulos 1995; Paizs and Suhai 2005), leading to effective algorithms for identifying peptides from their ESI MS/MS data –e.g. (Perkins et al 1999; Eng et al 1994; Ma et al 2003). However, we think that the size of this dataset, and the fact that it contains so many similar yet different molecules, make it an interesting test case for our algorithms. 2. Metlin Metabolites: We use a set of 1491 non-peptide metabolites from the Metlin database. These are a more diverse set covering a much wider range of molecules. An initial set of 1500 were selected randomly. Nine were then excluded because they were so much larger than the other molecules (over 1000 Da), such that their fragmentation graphs could not be computed in a reasonable amount of time. We also used an additional small validation set, selected because they were measured on a similar mass spectrometer, an Agilent 6520 Q-TOF, but in a different laboratory. These were taken from the MassBank database (Horai et al 2010). All testing with this set used a model trained for the first cross-fold set of the Metlin metabolite data (∼ 90% of the data). 3. MassBank Metabolites: This set contains 192 metabolites taken from the Washington State University submission to the MassBank database. All molecules from this submission were included that had MS2 spectra with collision energies 10V, 20V and 40V, in order to provide a good match with the Metlin data. Files containing test molecule lists and assigned cross validation groups are provided as supplementary data. 10 Felicity Allen et al. Fig. 4 Two example fragmentations. a) A non-ring break for which the ion and neutral loss root atoms are labeled. The 1H indicates the movement of a hydrogen to the ion side (marked with a +) from the neutral loss side. b) A ring break for a single aromatic ring of size 6, in which the distance between the broken bonds is 3. 3.2 Chemical Features The chemical features used in these experiments were as follows. Note that the terms ion root atom and neutral loss (NL) root atom refer to the atoms connected to the broken bond(s) on the ion and neutral loss sides respectively –cf., Fig. 4. – Break Atom Pair : Indicators for the pair of ion and neutral loss root atoms, each from {C,N,O,P,S, other}, included separately for those in a non-ring break vs those in a ring break –e.g. Fig. 4a): would be non-ring C-C. (72 features) – Ion and NL Root Paths Indicators for all paths of length 2 and 3 starting at the respective root atoms and stepping away from the break. Each is an ordered double or triple from {C,N,O,P,S,other}, taken separately for rings and non-rings. Two more features indicate no paths of length 2 and 3 respectively –e.g. Fig. 4a): the ion root paths are C-O, C-N and C-N-C. (2020 features). – Gasteiger Charges: Indicators for the quantised pair of Gasteiger charges (Gasteiger and Marsili 1980) for the ion and NL root atoms in the original unbroken molecule. (288 features) – Hydrogen Movement: Indicator for how many hydrogens switched sides of the break and in which direction –i.e. ion to NL (-) or NL to ion(+) {0,±1,±2,±3,±4,other}. (10 features) – Ring Features: Properties of a broken ring. Aromatic or not? Multiple ring system? Size {3,4,5,6, other}? Distance between the broken bonds {1,2,3,4+}? –e.g. Fig. 4b) is a break of a single aromatic ring of size 6 at distance 3. (12 features). Of these 2402 features, few take non-zero values for any given break. Many are never encountered in our data set, in which case their corresponding parameters are set immediately to 0. We also append Quadratic Features, containing all 2,881,200 pair-wise combinations of the above features, excluding the additional bias term. Again, most are never encountered, so their parameters are set to 0. 3.3 Spectrum Prediction For each cross validation fold, and the MassBank validation set, a model (trained as above), was used to predict a low, medium and high energy spectra for each molecule in the test set. The model is run forward and the resulting marginal distributions for the peak variables are a mixture of Gaussian distributions. We take the means and weights of these Gaussians as our peak mass and intensity values. Since all fragments in the fragmentation graph of a molecule have non-zero probabilities in the marginal distribution, it is necessary to place a cut-off on the intensity values to select only the most likely peaks. Here, we use a post-processing step that removes peaks with low probability, keeping as many of the highest peaks as required to form at least 80% of the total CFM Modeling of ESI-MS/MS for putative Metabolite ID 11 intensity sum. We also set limits on the number of selected peaks to be at least 5 and at most 30. This ensures that more peaks are included than just the precursor ion, and also prevents spectra occurring that have large numbers of very small peaks. These values were selected arbitrarily, but post-analysis suggests that they are reasonable (see supplementary data). When matching peaks we use a mass tolerance set to the larger of 10 ppm and 0.01 Da (depending on the peak mass), and set the observation parameter σ to be one third of this value. No additional processing was done for the experimental spectra. Metrics We consider a peak in the predicted MS/MS spectrum sP to match a peak in the measured MS/MS spectrum sM if their masses are within the mass tolerance above. We use the following metrics: 1. Weighted Recall: The percentage of the total peak Pintensity in the measured P spectrum with a matching peak in the predicted spectrum: 100 × h · I[(m, h) ∈ sP ] ÷ h. (m,h)∈sM (m,h)∈sM 2. Weighted Precision: The percentage of the total peakPintensity in the predicted P spectrum with a matching peak in the measured spectrum: 100 × h · I[(m, h) ∈ sM ] ÷ h. (m,h)∈sP (m,h)∈sP 3. Recall: The percentage of peaks in the measured spectrum that have a matching peak in the predicted spectrum: 100 × |sP ∩ sM | ÷ |sM |. 4. Precision: The percentage of peaks in the predicted spectrum that have a matching peak in the measured spectrum: 100 × |sP ∩ sM | ÷ |sP |. 5. Jaccard Score: |sP ∩ sM | ÷ |sP ∪ sM |. The intensity weighted metrics were included because the unweighted precision and recall values can be misleading in the presence of low-level noise –e.g. when there are many small peaks in the measured spectrum. The weighted metrics place a greater importance on matching higher intensity peaks, and therefore give a better indication of how much of a spectrum has been matched. However, these weighted metrics can also be susceptible to an over-emphasis of just one or two peaks, and in particular of the peak corresponding to the precursor ion. Consequently, we think it is informative to consider both weighted and non-weighted metrics for recall and precision. Models for Comparison : The pre-existing methods, –e.g. MetFrag, FingerID – do not output a predicted spectrum, but skip directly to metabolite identification. So, instead we compare against: – Full Enumeration: This model considers the predicted spectrum to be one that enumerates all possible fragments in the molecule’s fragmentation tree with uniform intensity values. – Heuristic (tripeptides only): This model enumerates known peptide fragmentations as described by (Papayannopoulos 1995), including bn , yn , bn −H2 O, yn −H2 O, bn −N H3 , yn −N H3 and immonium ions. Results : The results are presented in Figure 5. For all three data sets, SE-CFM and CE-CFM obtain several orders of magnitude better precision and Jaccard scores than the full enumerations of possible peaks. There is a corresponding loss of recall. However, if we take into account the intensity of the measured peaks, by considering the weighted recall scores, we see that our methods perform well on the more important, higher intensity peaks. More than 75% of the total peak intensity in the tripeptide spectra, and approximately 60% of the total peak intensity in the metabolite spectra, were predicted. The results presented in Figure 5 show scores averaged across the three energy levels for each molecule. If we consider the results for the energy levels separately (see supplementary data), we find that the low and medium energy results are much better for all methods we assessed. For example, in the case of the low energy spectra, the weighted recall scores for SE-CFM are 78%, 73% and 81% for the tripeptide, Metlin metabolite and MassBank metabolite data sets respectively, as compared to 73%, 29% and 37% respectively for the high energy spectra. The poorer high energy spectra 12 Felicity Allen et al. Fig. 5 Spectrum prediction results for tripeptides (left), metabolites from Metlin (middle) and metabolites from MassBank (right). The x-axes show the five metrics: Weighted Recall (WR), Weighted Precision (WP), Recall (R), Precision (P) and Jaccard (J), averaged across the three energy levels for each test molecule. Bars display mean scores ± standard error. In each plot, note that the y-axis for Jaccard (on right) is different from the others (on left). results may be due to increased noise and a lower predictability of events at the higher collision energies. Another possible explanation is that the even-electron rule and other assumptions listed in Section 2.1.1 may be less reliable when there is more energy in the system. Or perhaps it is simply a factor of the number of peaks per energy level, given that the median numbers of peaks in the measured and predicted spectra respectively were 5 and 6 in the low, 9 and 16 in the medium and 12 and 30 in the high energy spectra. In the case of the tripeptide data, our methods achieve higher recall scores and similar rates of precision to that of the heuristic model of known fragmentation mechanisms, resulting in improved Jaccard scores. Since peptide fragmentation mechanisms are fairly well understood, this result is not intended to suggest that our method should be used in place of current peptide fragmentation programs, but rather to demonstrate that SE-CFM and CE-CFM are able to extract fragmentation patterns from data to a similar extent to human experts, given a sufficiently large and consistent data set. Like our methods, the heuristic models also perform better for the lower energy levels, with a weighted recall score of 66% for the low energy, as compared to only 24% for the high energy. Unsurprisingly, being a smaller and more diverse data set, the Metlin metabolite results are poorer than those of the tripeptides. However the weighted recall for both our methods is still above 60% and the precision and Jaccard scores are much higher than for the full enumeration, suggesting that the CFM model is still able to capture some of the common fragmentation trends. The weighted recall and precision results for the MassBank metabolites are fairly comparable to those of the Metlin metabolites. There is a small loss in the non-weighted recall, however this is probably due to a higher incidence of low-level noise in the MassBank data. This results in a small loss in the average Jaccard score. However these results demonstrate that the fragmentation trends learned still apply to a significant degree on data collected at a different time in a different laboratory. Since this is the first method, to the authors’ knowledge, capable of predicting intensity values as well as m/z values, we also investigated the accuracy of CFM’s predicted intensity values. We found that the Pearson correlation coefficients for matched pairs of predicted and measured peaks, were 0.7, 0.6 and 0.45 for the low, medium and high spectra respectively (SE-CFM and CE-CFM CFM Modeling of ESI-MS/MS for putative Metabolite ID 13 results were not significantly different). This indicates a positive, though imperfect correlation. Full results and scatter plots are contained in the supplementary data. Running on a 2.2GHz Intel Core i7 processor, the median run-time for the spectrum predictions for each molecule in the Metlin metabolite data set was 5 seconds. Larger molecules with more ring systems generally take longer as they have so many more fragmentation possibilities in the initial enumeration. For molecules with no rings, the median run-time was 2 seconds, whereas for molecules with 3 or more rings, the median run-time was 9 seconds. The longest run-time in the Metlin metabolite set was for Troleandomycin (Metlin ID 41012), which has a molecular weight over 800 Da and contains three ring systems, one of which is size 14. It took just under 5 minutes. 3.4 Metabolite Identification Here we apply our CFM MS/MS spectrum predictions to a metabolite identification task. For each molecule, we produce two candidate sets via queries to two public databases of chemical entities: 1. We query the PubChem compound database (Bolton et al 2008) for all molecules within 5 ppm of the known molecule mass. This simulates the case where little is known about the candidate compound, but the parent ion mass is known with high accuracy. 2. We query KEGG (Kyoto Encyclopedia of Genes and Genomes) (Kanehisa et al 2006) for all the molecules within 0.5 Da of the known molecular mass. This simulates the case where the molecule is thought to be a naturally occurring metabolite, but there is more uncertainty in the target mass range. To conduct this assessment, duplicate candidates were filtered out –i.e. those with the same chemical structure, including those that only differ in their stereochemistry. Charged molecules and ionic compounds were also removed since the program assumes single fragment, neutral candidates (to which it will add a proton). After filtering, the median number of candidates returned from PubChem was 911 for the tripeptides and 1025 for the metabolites. Note that 9 tripeptides and 57 of the Metlin metabolites were excluded from this testing because no matching entry was found in PubChem for these molecules. The KEGG queries were only carried out for the metabolite data. The median number of candidates returned was 22, however no matching entry was found in KEGG for 833 of the Metlin metabolites and 111 of the MassBank metabolites. Whenever a matching entry could be found, we ranked the candidates according to how well their predicted low, medium and high spectra matched the measured spectra of the test molecule. The ranking score we used was the Jaccard score described in Section 3.3. We compared the ranking performance of our SE-CFM and CE-CFM methods against those of MetFrag (Wolf et al 2010) and FingerID (Heinonen et al 2012). We used the same candidate lists for all programs. For candidate molecules with equal scores, we had each program break ties in a uniformly random manner. This was in contrast to the original MetFrag code, which used the most pessimistic ranking; we did not use that approach as it seemed unnecessarily pessimistic. We set the mass tolerances used by MetFrag when matching peaks to the same as those used in our method (maximum of 0.01Da and 10ppm). MetFrag and FingerID only accept one spectrum, so to input the three spectra we first merged them as described by (Wolf et al 2010): we took the union of all peaks, and then merge together any peaks within 10 ppm or 0.01 Da of one another, retaining the average mass and the maximum intensity of the two. In FingerID we used the linear High Resolution Mass Kernel including both peaks and neutral losses, and trained using the same cross-fold sets as for our own method. Overall, we attempted to assess CFM, MetFrag and FingerID as fairly as possible, using identical constraints, identical databases and near-identical data input. The results are shown in Figure 6. As seen in this figure, our CFM method achieved substantially better rankings than both the existing methods on all three data sets, for both the PubChem and KEGG queries. When querying against KEGG, our methods found the correct metabolite as the top-scoring candidate in over 70% of cases for both metabolite sets and almost always (> 95%) ranked the correct candidate in the top 5. In comparison, MetFrag ranked the correct metabolite first in approximately 50% of cases 14 Felicity Allen et al. Fig. 6 Ranking results for metabolite identification, comparing both CFM variants with MetFrag and FingerID for tripeptides (left), metabolites from Metlin (middle) and validation metabolites from MassBank (right), querying against PubChem within 5 ppm (circles) and KEGG within 0.5 Da (triangles). Note that our methods out-perform both MetFrag and FingerID on all metrics, regardless of the database used. for both metabolite sets, and in the top 5 in 89%. FingerID ranked the correct metabolite first in less than 15% of cases. For PubChem, our methods performed well on the tripeptide data, identifying the correct metabolite as the top-scoring candidate in more than 50% of cases and ranking the correct candidate in the top 10 for more than 98% of cases. This is again convincingly better than both MetFrag and FingerId, which rank the correct candidate first in less than 35% and 2% of cases respectively. For the metabolite data, CE-CFM and SE-CFM were able to identify the correct metabolite in only 12% and 10% of cases respectively, however given that this is from a list of approximately one thousand candidates, this performance is still not bad. Once again, it is substantially better than MetFrag and FingerID, which correctly identified less than 6% and 1% of cases respectively. Our methods rank the correct candidate in the top 10 in more than 40% of cases on both data sets, as compared to MetFrag’s performance of 31% on the Metlin metabolites and 21% on the MassBank metabolites. Additionally, the top-ranked compound was found to have the correct molecular formula in more than 88% of cases for SE-CFM and 90% of cases for CE-CFM, suggesting that both methods mainly fail to distinguish between isomers. While the performance of all three methods (CFM, MetFrag and FingerID) is not particularly impressive for the PubChem data sets (i.e. <12% correct) we would argue that the PubChem database is generally a poor database choice for anyone wishing to do MS/MS metabolomic studies. With only 1% of its molecules having a biological or natural product origin, one is already dealing with a rather significant challenge of how to eliminate a 100:1 excess of false positives. So we would regard the results from the PubChem assessment as a ”worst-case” scenario and the results from the KEGG assessment as a more typical metabolomics scenario. The results for CE-CFM showed minimal difference when compared to those of SE-CFM, casting doubt on whether the additional complexity of CE-CFM is justified. However we think this idea is still interesting as a means for integrating information across energy levels and may yet prove more useful in future work. The running time of the metabolite identifications is mainly dependent on the number of candidate molecules and the time taken to predict the spectra for each. For example, taking 1000 candidates (as in the PubChem tests) at the median spectrum prediction run-time of 5 seconds CFM Modeling of ESI-MS/MS for putative Metabolite ID 15 (see Section 3.3), the identification would be expected to take in the order of 1.5 hours. Taking only 22 candidates (as in the KEGG tests), this reduces to 2 minutes. It would be trivial to parallelize the computation by distributing candidates across processors. When repeatedly querying against the same database, it may also be expedient to precompute the predicted spectra to reduce the identification run-time. For example, our web server interface http://cfmid.wishartlab.com provides access to precomputed spectra for all 40,000 compounds in HMDB and over 10,000 compounds in KEGG. We encourage readers to make use of this web server, as well as our executables and source code, made available at http://sourceforge.net/projects/cfm-id/. 4 Conclusion We have proposed a model for the ESI-MS/MS fragmentation process and a method for training this model from data. The performance has been benchmarked in cross validation testing on a large molecule set, and further validated using an additional dataset from another laboratory. Head-tohead comparisons using multiple data sets under multiple conditions show that the CFM method significantly outperforms existing state-of-the-art methods, and has attained a level that could be useful to experimentalists performing metabolomics studies. References Böcker S, Rasche F (2008) Towards de novo identification of metabolites by analyzing tandem mass spectra. Bioinformatics 24(16):i49–i55 Bolton E, Wang Y, Thiessen P, Bryant S (2008) PubChem: Integrated Platform of Small Molecules and Biological Activities. In: Chapeter 12 in Annual Reports in Computational Chemistry, vol 4, American Chemical Society, Washington DC Cappé O, Moulines E, Ryden T (2005) Inference in Hidden Markov Models. Springer Deming S, Stephan W (1940) On a Least Squares Adjustment of a Sampled Frequency Table When the Expected Marginal Totals are Known. Annals of Mathematical Statistics 11(4):427–444 Dempster AP, Laird NM, Rubin DB (1977) Maximum Likelihood from Incomplete Data via the EM Algorithm. Journal of the Royal Statistical Society Series B (Methodological) 39(1):1–38 Dunn WB, Ellis DI (2005) Metabolomics: Current analytical platforms and methodologies. Trends in Anal Chem 24(4):285–294 Eng JK, McCormack AL, Yates JR (1994) An Approach to Correlate Tandem Mass Spectral Data of Peptides with Amino Acid Sequences in a Protein Database. J Am Soc Mass Spectrom 5(11) Fiehn O (2002) Metabolomics–the link between genotypes and phenotypes. Plant molecular biology 48(1-2):155–71 Galezowska A, Harrison MW, Herniman JM, Skylaris CK, Langley GJ (2013) A predictive science approach to aid understanding of electrospray ionisation tandem mass spectrometric fragmentation pathways of small molecules using density functional calculations. Rapid communications in mass spectrometry : RCM 27(9):964– 970 Gasteiger J, Marsili M (1980) Iterative partial equalization of orbital electronegativity: a rapid access to atomic charges. Tetrahedron 36(22):3219–3228 Gasteiger J, Haneback W, Schulz KP (1992) Prediction of Mass Spectra from Structural Information. J Chem Inf Comput Sci 32:264–271 Hastings J, de Matos P, Dekker A, et al (2013) The ChEBI reference database and ontology for biologically relevant chemistry: enhancements for 2013. Nucleic acids research 41(Database issue):D456–63 Heinonen M, Rantanen A, Mielikainen T, et al (2008) FiD: a software for ab initio structural identification of product ions from tandem mass spectrometric data. Rapid Comms in Mass Spec 22:3043–3052 Heinonen M, Shen H, Zamboni N, Rousu J (2012) Metabolite identification and molecular fingerprint prediction through machine learning. Bioinformatics 28(18):2333–41 Hill AW, Mortishire-Smith RJ (2005) Automated assignment of high-resolution collisionally activated dissociation mass spectra using a systematic bond disconnection approach. Rapid Communications in Mass Spectrometry 19(21):3111–3118 de Hoffman E, Stroobant V (2007) Mass spectrometry: principles and applications, 3rd edn. Wiley Horai H, Arita M, Kanaya S, et al (2010) MassBank: a public repository for sharing mass spectral data for life sciences. J of mass spec 45(7):703–14 Hufsky F, Scheubert K, Böcker S (2014) Computational mass spectrometry for small-molecule fragmentation. Trends in Analytical Chemistry 53:41–48 Kanehisa M, Goto S, Hattori M, et al (2006) From genomics to chemical genomics: new developments in KEGG. Nucleic acids research 34:D354–7 16 Felicity Allen et al. Kangas LJ, Metz TO, Isaac G, Schrom BT, Ginovska-Pangovska B, Wang L, Tan L, Lewis RR, Miller JH (2012) In silico identification software (ISIS): a machine learning approach to tandem mass spectral identification of lipids. Bioinformatics 28(13):1705–13 Katajamaa M, Oresic M (2007) Data processing for mass spectrometry-based metabolomics. Journal of chromatography A 1158(1-2):318–28 Kerber A, Meringer M, Rücker C (2006) CASE via MS: Ranking structure candidates by mass spectra. Croatica chemica acta 79(3):449–464 Kind T, Fiehn O (2010) Advances in structure elucidation of small molecules using mass spectrometry. Bioanalytical reviews 2(1-4):23–60 Koller D, Friedman N (2009) Probabilistic Graphical Models: Principles and Techniques. The MIT Press Levsen K, Schiebel HM, Terlouw Jk, et al(2007) Even-electron ions: a systematic study of the neutral species lost in the dissociation of quasi-molecular ions. Journal of mass spectrometry : JMS 42:1024–1044 Lindsay RK, Buchanan BG, Feigenbaum EA, Lederberg J (1980) Applications of Artificial Intelligence for Organic Chemistry: The DENDRAL Project. McGraw-Hill Book Company Ma B, Zhang K, Hendrie C, Liang C, et al (2003) PEAKS: powerful software for peptide de novo sequencing by tandem mass spectrometry. Rapid communications in mass spectrometry 17(20):2337–42 McLafferty FW, Turecek F (1993) Interpretation of Mass Spectra, 4th edn. University Science Books Mylonas R, Mauron Y, Masselot A, et al(2009) X-Rank: a robust algorithm for small molecule identification using tandem mass spectrometry. Analytical chemistry 81(18):7604–10 Oberacher H, Pavlic M, Libiseller K, et al (2009) On the inter-instrument and the inter-laboratory transferability of a tandem mass spectral reference library: 2. Optimization and characterization of the search algorithm. Journal of mass spectrometry : JMS 44(4):494–502 Paizs B, Suhai S (2005) Fragmentation pathways of protonated peptides. Mass spectrometry reviews 24(4):508–48 Papayannopoulos I (1995) The interpretation of collision-induced dissociation tandem mass spectra of peptides. Mass Spectrometry Reviews 14(April):49–73 Perkins DN, Pappin DJC, Creasy DM, Cottrell JS (1999) Probability-based protein identification by searching sequence databases using mass spectrometry data. Electrophoresis 20:3551–3567 Scheubert K, Hufsky F, Böcker S (2013) Computational mass spectrometry for small molecules. Journal of cheminformatics 5(1):12 Smith Ca, O’Maille G, Want EJ, et al (2005) METLIN: a metabolite mass spectral database. Therapeutic drug monitoring 27(6):747–51 Stein SE, Scott DR (1994) Optimization and testing of mass spectral library search algorithms for compound identification. Journal of the American Society for Mass Spectrometry 5(9):859–866 Sumner LW, Amberg A, Barrett D, et al (2007) Proposed minimum reporting standards for chemical analysis. Metabolomics 3:211–221 Tautenhahn R, Cho K, Uritboonthai W, et al (2012) An accelerated workflow for untargeted metabolomics using the METLIN database. Nature biotechnology 30(9):826–8 Wishart (2011) Advances in Metabolite Identification. Bioanalysis 3(15):1769–1782 Wishart DS, Knox C, Guo AC, et al (2009) HMDB: a knowledgebase for the human metabolome. Nucleic acids research 37:D603–10 Wishart DS, Jewison T, Guo AC, et al (2013) HMDB 3.0: The Human Metabolome Database in 2013. Nucleic acids research 41:D801–D807 Wolf S, Schmidt S, Müller-Hannemann M, Neumann S (2010) In silico fragmentation for computer assisted identification of metabolite mass spectra. BMC bioinformatics 11:148
5cs.CE
L EARNING TO M IX n-S TEP R ETURNS : G ENERALIZING λ-R ETURNS FOR D EEP R EINFORCEMENT L EARNING arXiv:1705.07445v2 [cs.LG] 5 Nov 2017 Sahil Sharma, Girish Raguvir J∗, Srivatsan Ramesh∗, Balaraman Ravindran Indian Institute of Technology, Madras Chennai, 600036, India [email protected] {girishraguvir,sriramesh4}@gmail.com [email protected] A BSTRACT Reinforcement Learning (RL) can model complex behavior policies for goaldirected sequential decision making tasks. A hallmark of RL algorithms is Temporal Difference (TD) learning: value function for the current state is moved towards a bootstrapped target that is estimated using the next state’s value function. λ-returns define the target of the RL agent as a weighted combination of rewards estimated by using multiple many-step look-aheads. Although mathematically tractable, the use of exponentially decaying weighting of n-step returns based targets in λ-returns is a rather ad-hoc design choice. Our major contribution is that we propose a generalization of λ-returns called Confidence-based Autodidactic Returns (CAR), wherein the RL agent learns the weighting of the n-step returns in an end-to-end manner. In contrast to λ-returns wherein the RL agent is restricted to use an exponentially decaying weighting scheme, CAR allows the agent to learn to decide how much it wants to weigh the n-step returns based targets. Our experiments, in addition to showing the efficacy of CAR, also empirically demonstrate that using sophisticated weighted mixtures of multi-step returns (like CAR and λ-returns) considerably outperforms the use of n-step returns. We perform our experiments on the Asynchronous Advantage Actor Critic (A3C) algorithm in the Atari 2600 domain. 1 I NTRODUCTION Reinforcement Learning (RL) (Sutton & Barto, 1998) is often used to solve goal-directed sequential decision making tasks wherein conventional Machine Learning methods such as supervised learning are not suitable. Goal-directed sequential decision making tasks are modeled as Markov Decision Process (MDP) (Puterman, 2014). Traditionally, tabular methods were extensively used for solving MDPs wherein value function or policy estimates were maintained for every state. Such methods become infeasible when the underlying state space of the problem is exponentially large or continuous. Traditional RL methods have also used linear function approximators in conjunction with hand-crafted state spaces for learning policies and value functions. This need for hand-crafted task-specific features has limited the applicability of RL, traditionally. Recent advances in representation learning in the form of deep neural networks provide us with an effective way to achieve generalization (Bengio et al., 2009; LeCun et al., 2015). Deep neural networks can learn hierarchically compositional representations that enable RL algorithms to generalize over large state spaces. The use of deep neural networks in conjunction with RL objectives has shown remarkable results such as learning to solve the Atari 2600 tasks from raw pixels (Bellemare et al., 2013; Mnih et al., 2015; 2016; Sharma et al., 2017; Jaderberg et al., 2017), learning to solve complex simulated physics tasks (Todorov et al., 2012; Schulman et al., 2015a; Lillicrap et al., 2015) and showing super-human performance on the ancient board game of Go (Silver et al., 2016; 2017). Building accurate and powerful (in terms of generalization capabilities) ∗ These authors contributed equally 1 state and action value function (Sutton & Barto, 1998) estimators is important for successful RL solutions. This is because many practical RL solutions (Q-Learning (Watkins & Dayan, 1992), SARSA (Rummery & Niranjan, 1994) and Actor-Critic Methods (Konda & Tsitsiklis, 2000)) use Temporal Difference (TD) Learning (Sutton, 1988). In TD learning, a n-step return is used as an estimate of the value function by means of bootstrapping from the nth state’s value function estimate. On the other hand, in Monte Carlo learning, the cumulative reward obtained in the entire trajectory following a particular state is used as an estimate for the value function of that state. The ability to build better estimates of the value functions directly results in better policy estimates as well as faster learning. λ-returns (LR) (Sutton & Barto, 1998) are very effective in this regard. They are effective for faster propagation of delayed rewards and also result in more reliable learning. LR provide a trade-off between using complete trajectories (Monte Carlo) and bootstrapping from n-step returns (TD learning). They model the TD target using a mixture of n-step returns, wherein the weights of successively longer returns are exponentially decayed. With the advent of deep RL, the use of multi-step returns has gained a lot of popularity (Mnih et al., 2016). However, it is to be noted that the use of exponentially decaying weighting for various n-step returns seems to be an ad-hoc design choice made by LR. In this paper, we start off by extensively benchmarking λ-returns (our experiments only use truncated λ-returns due to the nature of the DRL algorithm (A3C) that we work with and we then propose a generalization called the Confidence-based Autodidactic Returns (CAR), In CAR, the DRL agent learns in an end-to-end manner, the weights to assign to the various n-step return based targets. Also in CAR, it’s important to note that the weights assigned to various n-step returns change based on the different states from which bootstrapping is done. In this sense, CAR weights are dynamic and using them represents a significant level of sophistication as compared to the usage of λ-returns. In summary, our contributions are: 1. To alleviate the need for some ad-hoc choice of weights as in the case of λ-returns, we propose a generalization called Autodidactic Returns and further present a novel derivative of it called Confidence-based Autodidactic Returns (CAR) in the DRL setting. 2. We empirically demonstrate that using sophisticated mixtures of multi-step return methods like λ-returns and Confidence-based Autodidactic Returns leads to considerable improvement in the performance of a DRL agent. 3. We analyze how the weights learned by CAR are different from that of λ-returns, what the weights signify and how they result in better estimates for the value function. 2 BACKGROUND In this section, we present some basic concepts required to understand our work. 2.1 P RELIMINARIES An MDP (Puterman, 2014) is defined as the tuple hS, A, r, P, γi, where S is the set of states in the MDP, A is the set of actions, r : S × A 7→ PR is the reward function, P : S × A × S 7→ [0, 1] is the transition probability function such that s0 p(s, a, s0 ) = 1, p(s, a, s0 ) ≥ 0, and γ ∈ [0, 1) is the discount factor. We consider a standard RL setting wherein the sequential decision-making task is modeled as an MDP and the agent interacts with an environment E over a number of discrete time steps. At a time step t, the agent receives a state st and selects an action at from the set of available actions A. Given a state, the agent could decide to pick its P action stochastically. Its policy π is in general a mapping defined by: π : S × A 7→ [0, 1] such that a∈A π(s, a) = 1, π(s, a) ≥ 0 ∀s ∈ S, ∀aP ∈ A. At any point in the MDP, the goal of the agent is to maximize the return, defined as: ∞ Gt = k=0 γ k rt+k which is the cumulative discounted future reward. The state value function of a policy π, V π (s) is defined as the expected return obtained by starting in state s and picking actions according to π. 2.2 ACTOR C RITIC A LGORITHMS Actor Critic algorithms (Konda & Tsitsiklis, 2000) are a class of approaches that directly parameterize the policy (using an actor) πθa (a|s) and the value function (using a critic) Vθc (s). They update the 2 policy parameters using Policy Gradient Theorem (Sutton et al., 1999; Silver et al., 2014) based objective functions. The value function estimates are used as baseline to reduce the variance in policy gradient estimates. 2.3 A SYNCHRONOUS A DVANTAGE ACTOR C RITIC Asynchronous Advantage Actor Critic(A3C) (Mnih et al. (2016)) introduced the first class of actor-critic algorithms which worked on high-dimensional complex visual input space. The key insight in this work is that by executing multiple actor learners on different threads in a CPU, the RL agent can explore different parts of the state space simultaneously. This ensures that the updates made to the parameters of the agent are uncorrelated. The actor can improve its policy by following an unbiased low-variance sample estimate of the gradient of its objective function with respect to its parameters, given by: ∇θa log πθa (at |st )(Gt − V (st )) In practice, Gt is often replaced with a biased lower variance estimate based on multi-step returns. In the A3C algorithm n-step returns are used as an estimate for the target Gt , where n ≤ m and m is a hyper-parameter (which controls the level of rolling out of the policies). A3C estimates Gt as: n X Gt ≈ V̂ (st ) = γ i−1 rt+i + γ n V (st+n ) i=1 and hence the objective function for the actor becomes: L(θa ) = log πθa (at |st )δt where δt = t+j−1 P γ i−t ri + γ j V (st+1 ) − V (st ) is the j-step returns based TD error. i=t The critic in A3C models the value function V (s) and improves its parameters based on sample estimates of the gradient of its loss function, given as: ∇θc (V̂ (st ) − Vθc (st ))2 . 2.4 W EIGHTED R ETURNS Weighted average of n-step return estimates for different n’s can be used for arriving at TD-targets as long as the sum of weights assigned to the various n-step returns is 1 (Sutton & Barto (1998)). h  P In other words, given a weight vector w = w(1) , w(2) , · · · , w(h) , such that w(i) =1, and n-step i=1 (1) (2) (h) returns for n ∈ {1, 2, · · · , h}: Gt , Gt , · · · , Gt , we define a weighted return as Gw t = h X (n) w(n) Gt (1) n=1 (n) Note that the n-step return Gt is defined as: n X (n) Gt = γ i−1 rt+i + γ n V (st+n ) (2) i=1 2.5 λ-R ETURNS λ A special case of Gw t is Gt (known as λ-returns) which is defined as: Gλt = (1 − λ) h−1 X (n) λn−1 Gt (h) + λh−1 Gt (3) n=1 What we have defined here are a form of truncated λ-returns for TD-learning. These are the only kind that we experiment with, in our paper. We use truncated λ-returns because the A3C algorithm is designed in a way which makes it suitable for extension under truncated λ-returns. We leave the problem of generalizing our work to the full λ-returns as well as eligibility-traces (λ-returns are the forward view of eligibility traces) to future work. 3 3 3.1 λ-R ETURNS AND B EYOND : AUTODIDACTIC R ETURNS AUTODIDACTIC R ETURNS Autodidactic returns are a form of weighted returns wherein the weight vector is also learned alongside the value function which is being approximated. It is this generalization which makes the returns autodidactic. Since the autodidactic returns we propose are constructed using weight vectors that are state dependent (the weights change with the state the agent encounters in the MDP), we denote the weight vector as w(st ). The autodidactic returns can be used for learning better approximations for the value functions using the TD(0) learning rule based update equation:   w(s ) Vt (st ) ← Vt (st ) + α Gt t − Vt (st ) (4) In contrast with autodidactic returns, λ-returns assign weights to the various n-steps returns which are constants given a particular λ. We reiterate that the weights assigned by λ-returns don’t change during the learning process. Therefore, the autodidactic returns are a generalization and assign weights to returns which are dynamic by construction. The autodidactic weights are learned by the agent, using the reward signal it receives while interacting with the environment. 3.2 C ONFIDENCE - BASED AUTODIDACTIC R ETURNS All the n-step returns for state st are estimates for V (st ) bootstrapped using the value function of corresponding nth future state (V (st+n )). But all those value functions  are estimates themselves. (n) Hence, one natural way for the RL agent to weigh an n-step return Gt would be to compute this weight using some notion of confidence that the agent has in the value function estimate, V (st+n ), using which the n-step return was estimated. The agent can weigh the n-returns based on how confident it is about bootstrapping from V (st+n ) in order to obtain a good estimate for V (st ). We denote this confidence on V (st+n ) as c(st+n ). Given these confidences, the weight vector w(st ) can computed as:   w(st ) = w(st )(1) , w(st )(2) , · · · , w(st )(m) where w(st )(i) is given by: ec(st+i ) w(st )(i) = Pj=m (5) c(st+j ) j=1 e The idea of weighing the returns based on a notion of confidence has been explored earlier (White & White, 2016; Thomas et al., 2015). In these works, learning or adapting the lambda parameter based on a notion of confidence/certainty under the bias-variance trade-off has been attempted, but the reason why only a few successful methods have emerged from that body of work is due to the difficult of quantifying, measuring and optimizing this certainty metric. In this work, we propose a simple and robust way to model this and we also address the question of what it means for a particular state to have a high value of confidence and how this leads to better estimates of the value function. 3.3 U SING λ- RETURNS IN A3C λ-returns have been well studied in literature (Peng & Williams, 1996; Sutton & Barto, 1998; Seijen & Sutton, 2014) and have been used in DRL setting as well (Schulman et al., 2015b; Gruslys et al., 2017). We propose a straightforward way to incorporate (truncated) λ-returns into the A3C framework. We call this combination as LRA3C. The critic in A3C uses n-step return for arriving at good estimates for the value function. However, note that the TD-target can in general be based on any n-step return (or a mixture thereof). The A3C algorithm in specific is well suited for using weighted returns such as λ-returns since the algorithm already uses n-step return for bootstrapping. Using eqs. (1) to (3) makes it very easy to incorporate weighted returns into the A3C framework. The respective sample estimates for the gradients of the actor and the critic become: ∇θa log πθa (at |st )(Gλt − V (st )) ∇θc (Gλt − Vθc (st ))2 4 Figure 1: CARA3C network - Confidence-based weight vector calculation for state s1 . 3.4 U SING AUTODIDACTIC R ETURNS IN A3C We propose to use autodidactic returns in place of normal n-step returns in the A3C framework. We call this combination as CARA3C. In a generic DRL setup, a forward pass is done through the network to obtain the value function of the current state. The parameters of the network are progressively updated based on the gradient of the loss function and the value function estimation (in general) becomes better. For predicting the confidence values, a distinct neural network is created which shares all but the last layer with the value function estimation network. So, every forward pass of the network on state st now outputs the value function V (st ) and the confidence the network has in its value function prediction, c(st ). Figure 1 shows the CARA3C network unrolled over time and it visually demonstrates how the confidence values are calculated using the network. Next, using eqs. (1) to (5) the weighted average of n-step returns is calculated and used as a target for improving V (st ). Algorithm 1, in Appendix F , presents the detailed pseudo-code for training a CARA3C agent. The policy improvement is carried out by following sample estimates of the loss function’s gradient, given by: ∇θa log πθa (at |st )δt , where δt is now defined in terms of the TD error term obtained by using autodidactic returns as the TD-target. Overall, the sample estimates for the gradient of the actor and the critic loss functions are: w(st ) ∇θa log πθa (at |st )(Gt w(st ) ∇θc (Gt 3.5 − V (st )) − Vθc (st ))2 AVOIDING PITFALLS IN TD LEARNING OF C RITIC The LSTM-A3C neural networks for representing the policy and the value function share all but the last output layer. In specific, the LSTM (Hochreiter & Schmidhuber, 1997) controller which aggregates the observations temporally is shared by the policy and the value networks. As stated in the previous sub-section, we extend the A3C network to predict the confidence values by creating 5 a new output layer which takes as input the LSTM output vector (LSTM outputs are the pre-final layer). Figure 1 contains a demonstration of how w(s1 ) is computed. Since all the three outputs w(s ) (policy, value function, confidence on value function) share all but the last layer, Gt t depends on the parameters of the network which are used for value function prediction. Hence, the autodidactic returns also influence the gradients of the LSTM controller parameters. However, it was observed that when the TD target, Gw t , is allowed to move towards the value function prediction V (st ), it makes the learning unstable. This happens because the L2 loss between the TD-target and the value function prediction can now be minimized by moving the TD-target towards erroneous value function predictions V (st ) instead of the other way round. To avoid this instability we ensure that gradients do not flow back from the confidence values computation’s last layer to the LSTM layer’s outputs. In effect, the gradient of the critic loss with respect to the parameters utilized for the computation of the autodidactic return can no longer influence the gradients of the LSTM parameters (or any of the previous convolutional layers). To summarize, during back-propagation of gradients in the A3C network, the parameters specific to the computation of the autodidactic return do not contribute to the gradient which flows back into the LSTM layer. This ensures that the parameters of the confidence network are learned while treating the LSTM outputs as fixed feature vectors. This entire scheme of not allowing gradients to flow back from the confidence value computation to the LSTM outputs has been demonstrated in Figure 1. The forward arrows depict the parts of the network which are involved in forward propagation whereas the backward arrows depict the path taken by the back-propagation of gradients. 4 E XPERIMENTAL S ETUP AND R ESULTS We performed general game-play experiments with CARA3C and LRA3C on 22 tasks in the Atari domain. All the networks were trained for 100 million time steps. The hyper-parameters for each of the methods were tuned on a subset of four tasks: Seaquest, Space Invaders, Gopher and Breakout. The same hyper-parameters were used for the rest of the tasks. The baseline scores were taken from Sharma et al. (2017). All our experiments were repeated thrice with different random seeds to ensure that our results were robust to random initialization. The same three random seeds were used across experiments and all results reported are the average of results obtained by using these three random seeds. Since the A3C scores were taken from Sharma et al. (2017), we followed the same training and testing regime as well. Appendix A contains experimental details about the training and testing regimes. Appendix G documents the procedure we used for picking important hyper-parameters for our methods. Figure 2: Training curves for raw scores obtained by CARA3C and LRA3C. 4.1 G ENERAL GAMEPLAY PERFORMANCE Table 1: Mean and median of A3C normalized scores across all games. Algorithm A3C LRA3C CARA3C Normalized Scores Mean Median 1.00 1.63 4.53 1.00 1.05 1.15 Evolution of the average performance of our methods with training progress has been shown in Figure 2. An expanded version of the graph for all the tasks can be found in Appendix C. Table 1 6 Figure 3: Percentage improvement achieved by CARA3C and LRA3C over A3C. shows the mean and median of the A3C normalized scores of CARA3C and LRA3C. If the scores obtained by one of the methods   and A3C in a task are p and q respectively, then the A3C normalized score is calculated as: pq . As we can see, both CARA3C and LRA3C improve over A3C with CARA3C doing the best: on an average, it achieves over 4× the scores obtained by A3C. The raw scores obtained by our methods against A3C baseline scores can be found in Table 2 (in Appendix B). Figure 3 shows the percentage improvement achieved by sophisticated mixture of n-step return methods (CARA3C and LRA3C) over A3C. If the scores obtained by one of the methods and A3C  in  a task are p and q respectively, then the percentage improvement is calculated as: p−q × 100 . As q we can see, CARA3C achieves a staggering 67× performance in the task Kangaroo. 4.2 A NALYSIS OF D IFFERENCE IN W EIGHTS A SSIGNED BY CARA3C AND LRA3C Figure 4: Difference in weights given by CARA3C and LRA3C to each of the n-step returns (where n ≤ 20) during an episode. (i) Figure 4 demonstrates the difference in weights assigned by CARA3C and LRA3C (i.e wCARA3C − (i) wLRA3C ) to various n-step returns over the duration of an episode by fully trained DRL agents. The four games shown here are games where CARA3C achieves large improvements in performance over LRA3C. It can be seen that for all the four tasks, the difference in weights evolve in a dynamic fashion as the episode goes on. The motivation behind this analysis is to understand how different the weights used by CARA3C are as compared to LRA3C and as it can be seen, it’s very different. The agent is clearly able to weighs it’s returns in a way that is very different from LRA3C and this, in fact, seems to give it the edge over both LRA3C and A3C in many games. These results once again 7 reiterates the motivation for using dynamic Autodidactic Returns. An expanded version of the graphs for all the tasks can be found in Appendix D. 4.3 S IGNIFICANCE OF THE C ONFIDENCE VALUES Figure 5: Relation between the confidence assigned to a state and the percent change in their value estimate. Percentage change in value estimates were obtained by calculating the value estimate of a state just before and after a batch gradient update step. In Figure 5 each bin (x, y) denotes the average confidence value assigned by the network to the states that were encountered during the training time between y million and y + 1 million steps and whose value estimates were changed by a value between x and x + 1 percent, where 0 ≤ x < 100 and 0 ≤ y < 100. In all the graphs we can see that during the initial stages of the training(lower rows of the graph), the confidence assigned to the states is approximately equal irrespective of the change is value estimate. As training progresses the network learns to assign relatively higher confidence values to the states whose value function changes by a small amount than the ones whose value function changes more. So, the confidence value can be interpreted as a value that quantifies the certainty the network has on the value estimate of that state. Thus, weighing the n-step returns based on the confidence values will enable the network to bootstrap the target value better. The confidence value depends on the certainty or the change in value estimate and it is not the other way round, i.e., having high confidence value doesn’t make the value estimate of that state to change less. This is true because the confidence value can not influence the value estimate of a state as the gradients obtained from the confidence values are not back propagated beyond the dense layer of confidence output. 4.4 A NALYSIS OF E VOLUTION OF C ONFIDENCE VALUES D URING A N E PISODE Figure 6: Evolution of confidence over an episode along with game frames for certain states with high confidence values. Figure 6 shows the confidence values assigned to states over the duration of an episode by a fully trained CARA3C DRL agent for two games where CARA3C achieves large improvements over LRA3C and A3C: Kangaroo and Beam Rider. For both the games it’s clear that the confidence values change dynamically in response to 8 the states encountered. Here, it’s important to note that the apparent periodicity observed in the graphs is not because of the nature of the confidences learnt but is instead due to the periodic nature of the games themselves. From the game frames shown one can observe that the frames with high confidence are highly recurring key states of the game. In case of Beam Rider, the high confidence states correspond to the initial frames of every wave wherein a new horde of enemies (often similar to the previous wave) come in after completion of the penultimate wave in the game. In the case of Kangaroo, apart from many other aspects to the game, there is piece of fruit which keeps falling down periodically along the left end of the screen (can be seen in the game’s frames). Jumping up at the appropriate time and punching the fruit gives you 200 points. By observing game-play, we found that the policy learnt by the CARA3C agent identifies exactly this facet of the game to achieve such large improvements in the score. Once again, these series of states encompassing this transition of the fruit towards the bottom of the screen form a set of highly recurring states, Especially states where the piece of fruit is "jumping-distance" away the kangaroo and hence are closer to the reward are found to form the peaks. These observations reiterate the results obtained in Section 4.3 as the highly recurring nature of these states (during training over multiple episodes) would enable the network to estimate these value functions better. The better estimates of these value functions are then suitably used to obtain better estimates for other states by bootstrapping with greater attention to the high confidence states. We believe that this ability to derive from a few key states by means of an attention mechanism provided by the confidence values enables CARA3C to obtain better estimates of the value function. An expanded version of the graphs for all the tasks can be found in Appendix E. 4.5 A NALYSIS OF THE L EARNED VALUE F UNCTION Figure 7: Comparison of value function estimates of CARA3C, LRA3C and A3C. In this paper, we propose two methods for learning value functions in a more sophisticated manner than using n-step returns. Hence, it is important to analyze the value functions learned by our methods and understand whether our methods are indeed able to learn better value functions than baseline methods or not. For this sub-section we trained a few A3C agents to serve as baselines. To verify our claims about better learning of value functions, we conducted the following experiment. We took trained CARA3C, LRA3C and A3C agents and computed the L2 loss between the value function PT −t V (st ) predicted by a methods and the actual discounted sum of returns ( k=0 γ k rt+k ). We averaged this quantity over 10 episodes and plotted it as a function of time steps within an episode. Figure 7 demonstrates that our novel method CARA3C learns a much better estimate of the Value function V (st ) than LRA3C and A3C. The only exception to this is the game of Kangaroo. The reason that A3C and LRA3C critics manage to estimate the value function well in Kangaroo is because the policy is no better than random and in fact their agents often score just around 0 (which is easy to estimate). 5 C ONCLUSION AND F UTURE W ORK We propose a straightforward way to incorporate λ-returns into the A3C algorithm and carry out a large-scale benchmarking of the resulting algorithm LRA3C. We go on to propose a natural generalization of λ-returns called Confidence-based Autodidactic returns (CAR). In CAR, the agent learns to assign weights dynamically to the various n-step returns from which it can bootstrap. Our experiments demonstrate the efficacy of sophisticated mixture of multi-steps returns with at least one of CARA3C or LRA3C out-performing A3C in 18 out of 22 tasks. In 9 of the tasks CARA3C performs the best whereas in 9 of them LRA3C is the best. CAR gives the agent the freedom to learn and decide how much it wants to weigh each of its n-step returns. The concept of Autodidactic Returns is about the generic idea of giving the DRL agent the ability to model confidence in its own predictions. We demonstrate that this can lead to better 9 TD-targets, in turn leading to improved performances. We have proposed only one way of modeling the autodidactic weights wherein we use the confidence values that are predicted alongside the value function estimates. There are multiple other ways in which these n-step return weights can be modeled. We believe these ways of modeling weighted returns can lead to even better generalization in terms how the agent perceives it’s TD-target. Modeling and bootstrapping off TD-targets is fundamental to RL. We believe that our proposed idea of CAR can be combined with any DRL algorithm (Mnih et al., 2015; Jaderberg et al., 2017; Sharma et al., 2017) wherein the TD-target is modeled in terms of n-step returns. 10 R EFERENCES Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. J. Artif. Intell. Res.(JAIR), 47:253–279, 2013. Yoshua Bengio et al. Learning deep architectures for ai. Foundations and trends R in Machine Learning, 2(1):1–127, 2009. Audrunas Gruslys, Mohammad Gheshlaghi Azar, Marc G Bellemare, and Remi Munos. The reactor: A sample-efficient actor-critic architecture. arXiv preprint arXiv:1704.04651, 2017. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. To appear in 5th International Conference on Learning Representations, 2017. Vijay R Konda and John N Tsitsiklis. Actor-critic algorithms. In Advances in neural information processing systems, pp. 1008–1014, 2000. Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, February 2015. Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, 2016. Jing Peng and Ronald J Williams. Incremental multi-step q-learning. Machine learning, 22(1): 283–290, 1996. Martin L Puterman. Markov decision processes: discrete stochastic dynamic programming. John Wiley & Sons, 2014. Gavin A Rummery and Mahesan Niranjan. On-line Q-learning using connectionist systems. University of Cambridge, Department of Engineering, 1994. John Schulman, Sergey Levine, Philipp Moritz, Michael I Jordan, and Pieter Abbeel. Trust region policy optimization. CoRR, abs/1502.05477, 2015a. John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. High-dimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015b. Harm Seijen and Rich Sutton. True online td (lambda). In International Conference on Machine Learning, pp. 692–700, 2014. Sahil Sharma, Aravind S. Lakshminarayanan, and Balaraman Ravindran. Learning to repeat: Fine grained action repetition for deep reinforcement learning. To appear in 5th International Conference on Learning Representations, 2017. 11 David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin A. Riedmiller. Deterministic policy gradient algorithms. In Proceedings of the 31th International Conference on Machine Learning, ICML 2014, Beijing, China, 21-26 June 2014, pp. 387–395, 2014. URL http://jmlr.org/proceedings/papers/v32/silver14.html. David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354–359, 2017. Richard S Sutton. Learning to predict by the methods of temporal differences. Machine learning, 3 (1):9–44, 1988. Richard S. Sutton and Andrew G. Barto. Introduction to reinforcement learning. MIT Press, 1998. Richard S Sutton, David A McAllester, Satinder P Singh, Yishay Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, pp. 1057– 1063, 1999. Philip S Thomas, Scott Niekum, Georgios Theocharous, and George Konidaris. Policy evaluation using the ω-return. 2015. Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033. IEEE, 2012. Christopher J. C. H. Watkins and Peter Dayan. Technical note: Q-learning. Mach. Learn., 8(3-4): 279–292, May 1992. Martha White and Adam White. A greedy approach to adapting the trace parameter for temporal difference learning. In Proceedings of the 2016 International Conference on Autonomous Agents & Multiagent Systems, pp. 557–565. International Foundation for Autonomous Agents and Multiagent Systems, 2016. 12 A PPENDIX A: E XPERIMENTAL D ETAILS Since the baseline scores used in this work are from Sharma et al. (2017), we use the same training and evaluation regime as well. O N HYPER - PARAMETERS We used the LSTM-variant of A3C [Mnih et al. (2016)] algorithm for the CARA3C and LRA3C experiments. The async-rmsprop algorithm [Mnih et al. (2016)] was used for updating parameters with the same hyper-parameters as in Mnih et al. (2016). The initial learning rate used was 10−3 and it was linearly annealed to 0 over 100 million time steps, which was the length of the training period. The n used in n-step returns was 20. Entropy regularization was used to encourage exploration, similar to Mnih et al. (2016). The β for entropy regularization was found to be 0.01 after hyper-parameter tuning, both for CARA3C and LRA3C, separately. The β was tuned in the set {0.01, 0.02}. The optimal initial learning rate was found to be 10−3 for both CARA3C and LRA3C separately. The learning rate was tuned over the set {7 × 10−4 , 10−3 , 3 × 10−3 }. The discounting factor for rewards was retained at 0.99 since it seems to work well for a large number of methods (Mnih et al., 2016; Sharma et al., 2017; Jaderberg et al., 2017). The most important hyper-parameter in the LRA3C method is the λ for the λ-returns. This was tuned extensively over the set {0.05, 0.15, 0.5, 0.85, 0.9, 0.95, 0.99}. The best four performing models have been reported in Figure 11b. The best performing models had λ = 0.9. All the models were trained for 100 million time steps. This is in keeping with the training regime in Sharma et al. (2017) to ensure fair comparisons to the baseline scores. Evaluation was done after every 1 million steps of training and followed the strategy described in Sharma et al. (2017) to ensure fair comparison with the baseline scores. This evaluation was done after each 1 million time steps of training for 100 episodes , with each episode’s length capped at 20000 steps, to arrive at an average score. The evolution of this average game-play performance with training progress has been demonstrated for a few tasks in Figure 2. An expanded version of the figure for all the tasks can be found in Appendix C. Table 2 in Appendix B contains the raw scores obtained by CARA3C, LRA3C and A3C agents on 22 Atari 2600 tasks. The evaluation was done using the latest agent obtained after training for 100 million steps, to be consistent with the evaluation regime presented in Sharma et al. (2017) and Mnih et al. (2016). A RCHITECTURE DETAILS We used a low level architecture similar to Mnih et al. (2016); Sharma et al. (2017) which in turn uses the same low level architecture as Mnih et al. (2015). Figure 1 contains a visual depiction of the network used for CARA3C. The common parts of the CARA3C and LRA3C networks are described below. The first three layers of both the methods are convolutional layers with same filter sizes, strides, padding and number of filters as Mnih et al. (2015; 2016); Sharma et al. (2017). These convolutional layers are followed by two fully connected (FC) layers and an LSTM layer. A policy and a value function are derived from the LSTM outputs using two different output heads. The number of neurons in each of the FC layers and the LSTM layers is 256. These design choices have been taken from Sharma et al. (2017) to ensure fair comparisons to the baseline A3C model and apply to both the CARA3C and LRA3C methods. Similar to Mnih et al. (2016) the Actor and Critic share all but the final layer. In the case of CARA3C, Each of the three functions: policy, value function and the confidence value are realized with a different final output layer, with the confidence and value function outputs having no non-linearity and one output-neuron and with the policy and having a softmax-non linearity of size equal to size of the action space of the task. This non-linearity is used to model the multinomial distribution. 13 A PPENDIX B: TABLE OF R AW S CORES Table 2: Game Playing Experiments on Atari 2600 Name CARA3C LRA3C A3C Amidar Assault Asterix Bank Heist Beam Rider Bowling Breakout Centipede Demon Attack Freeway Frostbite Gopher James Bond Kangaroo Koolaid Name this game Phoenix Sea quest Space Invaders Star Gunner Tutankhamun Wizard of Wor 973.73 2670.74 16048.00 1378.60 5076.10 40.94 678.06 3553.82 17065.22 4.9 310.00 9468.07 421.50 1777.33 66.67 11354.37 10407.83 4056.4 2703.83 24550.33 245.86 5529.00 954.79 2293.74 19139.00 1382.97 2099.71 26.90 733.87 3226.94 69373.42 19.97 289.27 9626.53 118.33 16.67 663.67 11515.33 6084.73 13257.73 3609.65 44942.33 271.46 2205.67 1028.34 1857.61 2364.00 1731.40 2189.96 16.88 555.05 3293.33 26742.75 17.68 306.8 9360.60 285.5 26.00 1136 12100.80 5384.1 2799.60 1268.75 39835.00 252.82 3230.00 All the evaluations were done using the agent obtained after training for 100 million steps, to be consistent with the evaluation paradigm presented in Sharma et al. (2017) and Mnih et al. (2016). Both CARA3C and LRA3C scores are obtained by averaging across 3 random seeds. The scores for A3C column were taken from Table 4 of Sharma et al. (2017). 14 A PPENDIX C: T RAINING G RAPHS The evaluation strategy described in Appendix A was executed to generate training curves for all the 22 Atari tasks. This appendix contains all those training curves. These curves demonstrate how the performance of the CARA3C and LRA3C agents evolves with time. Figure 8: Training curves for CARA3C and LRA3C 15 A PPENDIX D: D IFFERENCE IN W EIGHTS A SSIGNED BY CARA3C AND LRA3C This appendix presents the expanded version of the results shown in Section 4.2. These plots show the vast differences in weights assigned by CARA3C and LRA3C to various n-step returns over the duration of a single episode. Figure 9: Difference in weights given by CARA3C and LRA3C to each of the n-step returns (where n ≤ 20) during an episode. 16 A PPENDIX E: E VOLUTION OF C ONFIDENCE VALUES D URING A N E PISODE This appendix presents the expanded version of the results shown in Section 4.4. The aim is to show the how the confidence values dynamically change over the duration of an episode and show the presence of explicit peaks and troughs in many games. Here, it’s important to note that the apparent periodicity observed in some graphs is not because of the nature of the confidences learnt but is instead due to the periodic nature of the games themselves. Figure 10: Evolution of confidence values over an episode. 17 A PPENDIX F: A LGORITHM FOR TRAINING CARA3C The algorithm corresponding to CARA3C, our main novel contribution has been presented in Algorithm 2. A similar algorithm can be constructed for LRA3C easily. Algorithm 1 CARA3C 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: // Assume global shared parameter vectors θ. // Assume global step counter (shared) T = 0 K ← Maximum value of n in n-step returns Tmax ← Total number of training steps for CARA3C π ← Policy of the agent Initialize local thread’s step counter t ← 1 Let θ0 be the local thread’s parameters repeat tinit = t dθ ← 0 dw ← 0 Synchronize local thread parameters θ0 = θ confidences ←[ ] Obtain state st states ← [ ] repeat states.append(st ) Sample at ∼ π(at |st ; θ0 ) Execute action at to obtain reward rt and obtain next state st+1 confidences.append(c(st+1 ; θ0 )) t←t+1 T ←T +1 until st is terminal or t == tinit + K if st is terminal then R← 0 else R ← V (st ; θ0 ) C ← get_weights_matrix(confidences) Gij ← the i-step return used for bootstraping estimate for states[j] for i ∈ {t − 1, · · · , tinit } do j ← i − tinit 0 R ←R for k ∈ {K − 1, · · · , j} do 0 0 R ← ri + γR 0 Gkj ← Ckj .R // Assuming 0-based indexing R ← V (si ; θ0 ) // K × K matrix for i ∈ {t − 1, . . . tinit } do j ← i − tinit PK−1 TD-target ← j=0 Gij    Gradients for θ based on π: dθ0 ← dθ0 + ∇θ log(π(ai |si ; θ0 ) TD-target − V (si )  2 Gradients for θ based on V : dθ0 ← dθ0 + ∇θ TD-target − V (si ; θ0 ) 45: Perform asynchronous update of θ using dθ0 46: until T > Tmax 18 Algorithm 2 Creates a 2D weights matrix with the confidence numbers 2: 4: 6: 8: function GET _ WEIGHTS _ MATRIX(C) w ← softmax(C) W ← 1 ⊗ wT // W is a K × K weight matrix with Wi = wT . ⊗ is outer product. for wi,j ∈ W do if i > j then wi,j ← 0 for wi ∈ W do wi wi = sum(w i) return W A PPENDIX G: C HOICE OF I MPORTANT HYPER - PARAMETERS FOR OUR METHODS (b) Tuning the λ for LR (a) Tuning architecture for CAR Figure 11: Tuning the important hyper-parameters for our methods Perhaps the most important hyper-parameter in CARA3C is the network which calculates the confidence values. Since gradients do not flow back from confidence computation to the LSTM controller, this becomes an important design choice. We experimented extensively with different types of confidence computation networks including shallow ones, deep ones, wide ones and narrow ones. We found a "zero hidden layer" network on top of the LSTM controller (much like one which computes the value function) works the best (Figure 11a). Similarly, the most important hyper-parameter in λ-returns is the λ from eq. (3). While we experimented with a large number and range of values for λ the best performing ones have been reported in Figure 11b. 19
2cs.AI
Kullback-Leibler Divergence for the Normal-Gamma Distribution Joram Soch1,3,• & Carsten Allefeld1,2 1 2 arXiv:1611.01437v1 [math.ST] 4 Nov 2016 3 Bernstein Center for Computational Neuroscience, Berlin, Germany Berlin Center for Advanced Neuroimaging, Berlin, Germany Department of Psychology, Humboldt-Universität zu Berlin, Germany • Corresponding author: [email protected]. Abstract We derive the Kullback-Leibler divergence for the normal-gamma distribution and show that it is identical to the Bayesian complexity penalty for the univariate general linear model with conjugate priors. Based on this finding, we provide two applications of the KL divergence, one in simulated and one in empirical data. Contents 1 Introduction 1 2 Theory 2.1 Multivariate normal KL divergence 2.2 Univariate gamma KL divergence . 2.3 Normal-gamma KL divergence . . . 2.4 The Bayesian model evidence . . . 2.5 The general linear model . . . . . . . . . . . 2 2 2 3 4 5 3 Application 3.1 Polynomial basis functions . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Neuroimaging model selection . . . . . . . . . . . . . . . . . . . . . . . . 6 6 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Conclusion 10 5 References 10 0 1 Introduction Let x be a k × 1 random vector and y > 0 be a random variable. Then, x and y are said to follow a normal-gamma distribution (NG distribution), if their joint probability density function is given by p(x, y) = N(x; µ, (yΛ)−1 ) · Gam(y; a, b) (1) where N(x; µ, Σ) denotes a multivariate normal density with mean µ and covariance Σ and Gam(x; a, b) denotes a gamma density with shape a and rate b. In full, the density function is given by (Koch, 2007, p. 55) s i ba h y |yΛ| T (x − µ) Λ(x − µ) · y a−1 exp[−by] . (2) p(x, y) = exp − (2π)k 2 Γ(a) The Kullback-Leibler divergence (KL divergence) is a non-symmetric distance measure for two probability distributions P and Q and is defined as KL[P ||Q] = X i∈Ω P (i) ln P (i) . Q(i) (3) For continuous probability distribtions P and Q with probability density functions p(x) and q(x) on the same domain X, it is given by (Bishop, 2006, p. 55) Z p(x) dx . (4) KL[P ||Q] = p(x) ln q(x) X The KL divergence becomes important in information theory and statistical inference. Here, we derive the KL divergence for two NG distributions with vector-valued x and real-positive y and provide two examples of its application. 1 2 2.1 Theory Multivariate normal KL divergence First, consider two multivariate normal distributions over the k × 1 vector x specified by p(x) = N(x; µ1 , Σ1 ) q(x) = N(x; µ2 , Σ2 ) According to equation (4), the KL divergence of P from Q is defined as Z N(x; µ1 , Σ1 ) dx . KL[P ||Q] = N(x; µ1 , Σ1 ) ln N(x; µ2 , Σ2 ) Rk Using the multivariate normal density function   1 1 T −1 N(x; µ, Σ) = p exp − (x − µ) Σ (x − µ) , 2 (2π)n |Σ| it evaluates to (Duchi, 2014)   1 |Σ1 | T −1 −1 (µ2 − µ1 ) Σ2 (µ2 − µ1 ) + tr(Σ2 Σ1 ) − ln −k . KL[P ||Q] = 2 |Σ2 | 2.2 (5) (6) (7) (8) Univariate gamma KL divergence Next, consider two univariate gamma distributions over the real-positive y specified by p(y) = Gam(y; a1 , b1 ) q(y) = Gam(y; a2 , b2 ) According to equation (4), the KL divergence of P from Q is defined as Z ∞ Gam(y; a1 , b1 ) dy . KL[P ||Q] = Gam(y; a1 , b1 ) ln Gam(y; a2 , b2 ) 0 (9) (10) Using the univariate gamma density function Gam(y; a, b) = ba a−1 y exp[−by] for y > 0 , Γ(a) (11) it evaluates to (Penny, 2001) KL[P ||Q] = a2 ln b1 Γ(a1 ) a1 − ln + (a1 − a2 ) ψ(a1 ) − (b1 − b2 ) b2 Γ(a2 ) b1 where ψ(x) is the digamma function. 2 (12) 2.3 Normal-gamma KL divergence Now, consider two normal-gamma distributions over x and y specified by p(x, y) = N(x; µ1 , (yΛ1 )−1 ) Gam(y; a1 , b1 ) q(x, y) = N(x; µ2 , (yΛ2 )−1 ) Gam(y; a2 , b2 ) According to equation (4), the KL divergence of P from Q is defined as Z ∞Z p(x, y) p(x, y) ln KL[P ||Q] = dx dy . q(x, y) 0 Rk Using the law of conditional probability, it can be evaluated as follows: Z ∞ (13) (14) Z p(x|y)p(y) p(x|y)p(y) ln dx dy q(x|y)q(y) 0 Rk Z Z ∞ p(x|y) p(y) p(x|y) ln = dx dy q(x|y) 0 Rk Z ∞ Z p(y) + p(y) ln p(x|y) dx dy q(y) Rk 0 = hKL[p(x|y)||q(x|y)]ip(y) + KL[p(y)||q(y)] KL[P ||Q] = (15) In other words, the KL divergence for two normal-gamma distributions over x and y is equal to the sum of a multivariate normal KL divergence regarding x conditional on y, expected over y, and a univariate gamma KL divergence regarding y. Together with equation (8), the first term becomes hKL[p(x|y)||q(x|y)]ip(y)     |(yΛ1 )−1 | 1 T −1 (µ2 − µ1 ) (yΛ2 )(µ2 − µ1 ) + tr (yΛ2 )(yΛ1 ) −k − ln = 2 |(yΛ2 )−1 | p(y)   y 1 1 |Λ2 | k = (µ2 − µ1 )T Λ2 (µ2 − µ1 ) + tr(Λ2 Λ−1 ln − . 1 )− 2 2 2 |Λ1 | 2 p(y) (16) Using the relation y ∼ Gam(a, b) ⇒ hyi = a/b, we have hKL[p(x|y)||q(x|y)]ip(y) = 1 1 |Λ2 | k 1 a1 (µ2 − µ1 )T Λ2 (µ2 − µ1 ) + tr(Λ2 Λ−1 ln − . 1 )− 2 b1 2 2 |Λ1 | 2 (17) Thus, from (17) and (12), the KL divergence in (15) becomes  1 1 a1  1 |Λ2 | k (µ2 − µ1 )T Λ2 (µ2 − µ1 ) + tr(Λ2 Λ−1 ln − 1 )− 2 b1 2 2 |Λ1 | 2 b1 a1 Γ(a1 ) + a2 ln − ln + (a1 − a2 ) ψ(a1 ) − (b1 − b2 ) . b2 Γ(a2 ) b1 KL[P ||Q] = 3 (18) 2.4 The Bayesian model evidence Consider Bayesian inference on data y using model m with parameters θ. In this case, Bayes’ theorem is a statement about the posterior density: p(θ|y, m) = p(y|θ, m) p(θ|m) . p(y|m) (19) The denominator p(y|m) acts as a normalization constant on the posterior density p(θ|y, m) and according to the law of marginal probability is given by Z p(y|m) = p(y|θ, m) p(θ|m) dθ . (20) This is the probability of the data given only the model, regardless of any particular parameter values. It is also called “marginal likelihood” or “model evidence” and can act as a model quality criterion in Bayesian inference, because parameters are integrated out of the likelihood. For computational reasons, only the logarithmized or log model evidence (LME) L(m) = ln p(y|m) is of interest in most cases. By rearranging equation (19), the model evidence can be represented as p(y|m) = p(y|θ, m) p(θ|m) . p(θ|y, m) (21) Logarithmizing both sides of the equation and taking the expectation with respect to the posterior density over model parameters θ gives the LME Z Z p(θ|y, m) dθ . (22) L(m) = p(θ|y, m) ln p(y|θ, m) dθ − p(θ|y, m) ln p(θ|m) Using this reformulation, the LME as a model quality measure can be naturally decomposed into an accuracy term, the posterior expected likelihood, and a complexity term, the KL divergence between the posterior and the prior distribution: L(m) = Acc(m) − Com(m) Acc(m) = hlog p(y|θ, m)ip(θ|y,m) (23) Com(m) = KL [p(θ|y, m)||p(θ|m)] Intuitively, the accuracy acts increasing and the complexity acts decreasing on the log model evidence. This reflects the capability of the LME to select models that achieve the best balance between accuracy and complexity, i.e. models that explain the observations sufficiently well (high accuracy) without employing too many principles (low complexity). The fact that the complexity term is a KL divergence between posterior and prior means that models with prior assumptions that are close to the posterior evidence receive a low complexity penalty, because one is not surprised very much when accepting such a model which renders the Bayesian complexity a measure of surprise. 4 2.5 The general linear model Consider multiple linear regression using the univariate general linear model (GLM) y = Xβ + ε, ε ∼ N (0, σ 2 V ) (24) where y is an n × 1 vector of measured data, X is an n × p matrix called the design matrix, β is a p × 1 vector of weight parameters called regression coefficients and ε is an n × 1 vector of errors or noise. These residuals are assumed to follow a multivariate normal distribution whose covariance matrix is the product of a variance factor σ 2 and an n × n correlation matrix V . Usually, X and V are known while β and τ are unknown parameters to be inferred via model estimation. For mathematical convenience, we rewrite σ 2 = 1/τ and V = P −1 so that equation (24) implies the following likelihood function: p(y|β, τ ) = N(y; Xβ, (τ P )−1 ) . (25) The conjugate prior relative to this likelihood function is a normal-gamma distribution on the model parameters β and τ (Koch, 2007, ch. 2.6.3): p(β|τ ) = N(β; µ0 , (τ Λ0 )−1 ) p(τ ) = Gam(τ ; a0 , b0 ) (26) Due to the conjugacy of (26) to (25), the posterior is also a normal-gamma distribution p(β|τ, y) = N(β; µn , (τ Λn )−1 ) p(τ |y) = Gam(τ ; an , bn ) (27) where the posterior parameters in (27) are given by (Koch, 2007, ch. 4.3.2) T µn = Λ−1 n (X P y + Λ0 µ0 ) Λn = X T P X + Λ 0 n an = a0 + 2 1 T bn = b0 + (y P y + µT0 Λ0 µ0 − µTn Λn µn ) 2 From (23), the complexity for the model defined by (25) and (26) is given by Com(m) = KL [p(β, τ |y)||p(β, τ )] . (28) (29) In other words, the complexity penalty for a general linear model with normal-gamma priors (GLM-NG) is identical to a KL divergence between two NG distributions and using (18) can be written in terms of the prior and posterior parameters as  1 1 an  1 |Λ0 | p (µn − µ0 )T Λ0 (µn − µ0 ) + tr(Λ0 Λ−1 ln − n )− 2 bn 2 2 |Λn | 2 Γ(an ) an bn + a0 ln − ln + (an − a0 ) ψ(an ) − (bn − b0 ) . b0 Γ(a0 ) bn Com(m) = 5 (30) 3 3.1 Application Polynomial basis functions Consider a linear model with polynomial basis functions (Bishop, 2006, p. 5) given by y= p X ci xi + ε with − 1 ≤ x ≤ +1 . (31) i=0 Essentially, this model assumes that y is an additive mixture of polynomial terms xi weighted with the coefficients ci with i = 1, . . . , p where the natural number p is called the model order. This means that p = 0 corresponds to a constant value (plus noise ε); p = 1 corresponds to a linear function; p = 2 corresponds to a quadratic pattern; p = 3 corresponds to a 3rd degree polynomial etc. Given that x is an n × 1 vector of real numbers between −1 and +1, this model can be rewritten as a GLM given in equation (24) with     c0 x01 x11 · · · xp1  c1   x0 x1 · · · xp  2 2    2 (32) X =  .. .. . . ..  and β =  ..  . . . . . . cp x0n x1n · · · xpn Based on this reformulation, we simulate polynomial data. We perform N = 100 simulations with n = 100 data points in each simulation. We generate simulated data based on a true model order ptrue = 5 and analyze these data using a set of models ranging from pmin = 0 to pmax = 20. The predictor x is equally spaced between −1 and +1 and design matrices Xp are created according to equation (32). In each simulation, six regression coefficients βtrue are drawn independently from the standard normal distribution N(0, 1). Then, Gaussian noise ε is sampled from the multivariate normal distribution N(0, σε2 In ) with a residual variance of σε2 = 1. Finally, simulated data is generated as as y = X5 βtrue + ε. Then, for each p ∈ {0, . . . , 20}, Bayesian model estimation is performed using the design matrix Xp , a correlation matrix V = In and the prior distributions (26) with the prior parameters µ0 = 0p , Λ0 = Ip invoking a standard multivariate normal distribution and a0 = 1, b0 = 1 invoking a relatively flat gamma prior. Posterior parameters are calculated using equation (28) and give rise to the model complexity via (30) as well as model accuracy and the log model evidence via (23). Average LMEs, accuracies and complexities are shown in Figure 1. One can see that the true model order is correctly identified by the maximal log model evidence. This is achieved by an increasing complexity penalty which outweighs the saturating accuracy gain for models with p > 5. This demonstrates that the KL divergence for the NG distribution can be used to select polynomial basis functions when basis sets cannot be separated based on model accuracy alone. 6 Log Model Evidence −150 L(m) −155 −160 −165 −170 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 14 15 16 17 18 19 20 14 15 16 17 18 19 20 p Model Accuracy −140 Acc(m) −145 −150 −155 −160 −165 0 1 2 3 4 5 6 7 8 9 10 11 12 13 p Model Complexity 10 Com(m) 9 8 7 6 5 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 p Figure 1. Bayesian model selection for polynomial basis functions. All displays have model order on the x-axis and average model quality measures (across simulations) on the y-axis. Intuitively, the model accuracy (middle panel) increases with model order, but saturates at around −140 with no major increase after p = 5. Moreover, the model complexity (lower panel) – which is the KL divergence between prior and posterior distribution – also grows with model order, but switches to a linear increase at around p = 5 reaching a value of 10 at p = 20. Together, this has the consequence that the log model evidence (upper panel) is maximal for p = 5 (black cross) where exact values are: Acc(m) = −140.77, Com(m) = 8.34, L(m) = −149.11. 7 3.2 Neuroimaging model selection In neuroimaging, especially functional magnetic resonance imaging (fMRI), GLMs as given by equation (24) are applied to time series of neural data y (Friston et al., 1995). The design matrix X is specified by the temporal occurrence of experimental conditions and the covariance structure V is estimated from residual auto-correlations. Model estimation and statistical inference are performed “voxel-wise”, i.e. separately for each measurement location in the brain, usually referred to as the “mass-univariate GLM”. Here, we analyze data from a study on orientation pop-out processing (Bogler et al., 2013). During the experimental paradigm, the screen showed a 3 × 7 array of homogeneous bars oriented either 0°, 45°, 90° or 135° relative to the vertical axis. This background stimulation changed every second and was interrupted by trials in which one target bar on the left and one target bar on the right were independently rotated either 0°, 30°, 60° or 90° relative to the rest of the stimulus display. Those trials of orientation contrast (OC) lasted 4 seconds and were alternated with inter-trial intervals of 7, 10 or 13 seconds. Each combination of OC on the left side and OC on the right side was presented three times resulting in 48 trials in each of the 5 sessions lasting 672 seconds. After fMRI data preprocessing (slice-timing, realignment, normalization, smoothing), two different models of hemodynamic activation were applied to the fMRI data. The first model (GLM I) considers the experiment a factorial design with two factors (left vs. right OC) having four levels (0°, 30°, 60°, 90°). This results in 4 × 4 = 16 possible combinations or experimental conditions modelled by 16 onset regressors convolved with the canonical hemodynamic response function (HRF). The second model (GLM II) puts all trials from all conditions into one HRF-convolved regressor and encodes orientation contrast using a parametric modulator (PM) that is given as PM = deg/90° with deg = (0°, 30°, 60°, 90°), resulting in PM = (0, 1/3, 2/3, 1), such that the parametric modulator is proportional to orientation contrast. There was one PM for each factor of the design, i.e. one PM for left OC and one PM for right OC. Note that both models encode the same information and that every signal that can be identified using GLM II can also be characterized using GLM I, but not vice versa, because the first model allows for a greater flexibility of activation patterns across experimental conditions than the second. For these two models, we performed Bayesian model estimation. To overcome the challenge of having to specify prior distributions on the model parameters, we apply crossvalidation across fMRI sessions. This gives rise to a cross-validated log model evidence (cvLME) as well as cross-validated accuracies and complexities for each model in each subject. We then performed a paired t-test to find voxels where GLM II has a significantly higher cvLME than GLM I. Due to the specific assumptions in GLM II and the higher flexibility of GLM I, we assumed that these differences might be primarily based on a complexity advantage of GLM II over GLM I. We focus on visual area 4 (V4) that is known to be sensitive to orientation contrast. Within left V4, specified by a mask from a separate localizer paradigm (Bogler et al., 2013), we identified the peak voxel ([x y z] = [−15, −73, −5] mm) defined by the maximal t-value (t = 3.95) and extracted log model evidence as well as model accuracy and model complexity from this voxel for each subject. Differences in LME, accuracy and complexity are shown in Figure 2. Again, the model complexity enables a model selection that would not be possible based on the model accuracy alone. 8 Log Model Evidence L(m2) − L(m1) 10 5 0 −5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 avg subject Model Accuracy Acc(m2) − Acc(m1) 4 2 0 −2 −4 −6 −8 −10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 avg subject Model Complexity Com(m2) − Com(m1) 0 −2 −4 −6 −8 −10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 avg subject Figure 2. Bayesian model selection for orientation pop-out processing. All displays have subject on the x-axis and difference in model qualities (m1 = GLM I, m2 = GLM II) on the y-axis. Interestingly, there is a slight disadvantage for GLM II regarding only the model accuracy (middle panel), its mean difference across subjects being smaller than zero. However, model complexity (lower panel) – measured as the KL divergence between prior and posterior distribution – is consistently higher for GLM I. Together, this has the consequence that the log model evidence (upper panel) most often favors GLM II. Average values are: ∆Acc = −1.78, ∆Com = −6.02, ∆L = 4.24. 9 4 Conclusion We have derived the Kullback-Leibler divergence of two normal-gamma distributions using earlier results on the KL divergence for multivariate normal and univariate gamma distributions. Moreover, we have shown that the KL divergence for the NG distribution occurs as the complexity term in the univariate general linear model when using conjugate priors. Analysis of simulated and empirical data demonstrates that the complexity penalty has the desired theoretical features, namely to quantify the relative informational content of two generative models and to detect model differences that cannot be detected by just relying on model accuracy, e.g. given by the maximum log-likelihood (as in information criteria like AIC or BIC) or the posterior log-likelihood (as in the Bayesian log model evidence). 5 References [1] Bishop CM (2006): Pattern Recognition and Machine Learning. 1st Edition, Springer, New York. [2] Bogler C, Bode S, Haynes JD (2013): “Orientation pop-out processing in human visual cortex”. NeuroImage, vol. 81, pp. 73-80. [3] Duchi J (2014): “Derivations for Linear Algebra and Optimization”. University of California, Berkeley; URL: http://www.eecs.berkeley.edu/∼jduchi/projects/general notes.pdf. [4] Friston KJ, Holmes AP, Worsley KJ, Poline JP, Frith CD, Frackowiak RSJ (1995): “Statistical parametric maps in functional imaging: A general linear approach”. Human Brain Mapping, vol. 2, iss. 4, pp. 189-210. [5] Koch KR (2007): Introduction to Bayesian Statistics. 2nd Edition, Springer, Berlin/ Heidelberg, 2007. [6] Penny WD (2001): “KL-Divergences of Normal, Gamma, Dirichlet and Wishart densities”. University College, London; URL: www.fil.ion.ucl.ac.uk/∼wpenny/ publications/densities.ps. 10
10math.ST
Color and Shape Content Based Image Classification using RBF Network and PSO Technique: A Survey Abhishek Pandey Prof. Anjna Jayant Deen Dr. Rajeev Pandey Dept. of CSE UIT-RGPV Bhopal, India Dept. of CSE UIT-RGPV Bhopal , India [email protected] Dept. of CSE UIT-RGPV Bhopal , India [email protected] [email protected] collections of images are becoming available to the public, from photocollection to web pages or even video databases. Sincevisual media requires large amounts of memory andcomputing power for processing and storage, there is aneed to efficiently index and retrieve visual informationfrom image database [21]. The idea of RBFderives from the theory of function approximation. We have already seen how MultiLayer Perception (MLP) networkswith a hidden layer of sigmoid units can learn to approximate functions. RBF Networks take a slightly different approach [11, 17]. Their main features are: They are two-layer feedforward networks. The hidden nodes implement a set of radial basis functions (e.g. Gaussian functions). The output nodes implement linear summation functions as in an MLP. The network training is divided into two stages: first the weights from the input tohidden layer are determined, and then the weights from the hidden to output layer [16]. The Image classification using SVM classifier,RBF classifier and POS optimization technique based on content of image are providing comparatively result. Efficient indexing and Extraction of large number of color images, classification plays an important and challenging role. The main aim of this research work is devoted to finding suitable representation for images and classification generally requires comparison of images depending on the certain useful features [5]. Abstract The improvement of the accuracy of image query retrieval used image classification technique. Image classification is well known technique of supervised learning. The improved method of image classification increases the working efficiency of image query retrieval. For the improvements of classification technique we used RBF neural network function for better prediction of feature used in image retrieval.Colour content is represented by pixel values in image classification using radial base function(RBF) technique. This approach provides better result compare to SVM technique in image representation.Image is represented by matrix though RBF using pixel values of colour intensity of image. Firstly we using RGB colour model. In this colour model we use red, green and blue colour intensity values in matrix.SVM with partical swarm optimization for image classification is implemented in content of images which provide better Results based on the proposed approach are found encouraging in terms of color image classification accuracy. Keywords: RBF network, PSO technique, classification. image Introduction classifying Image classification is defined as the task of the number of images into (semantic) categories based on the available supervised data. The main objective of digital image classification procedure is to categorize the pixels in an image into land over cover classes. The output is thematic image with a limited number of feature classes as opposed to a continuous image with varying shades of gray or varying colors representing a continuous range of spectral reflectance [20]. RBF function is a neural network approach. It is based on function values which is measure by origin. The distance show colour intensity of image. Image features are colour, texture, shape and size. Large Literature Survey (1) Xiao-Qing Shang, Guo-Xiang Song, Biao Hou in China in 2003. They carried out work on “content based texture image classification.” A new method for content based texture image classification is proposed using support vector machine of the image, which combines the characteristics of Brushlet and Wavelet transform. 1 based on probabilistic based recursive model is proposed to classify flower images. (2) P. J.Gri ffi Ths, J. S. Marsland and W.Eccleston in Leverpoolin 2003.They discussed work on “A Study of Noise in PWM Neural Networks”. This paper shows the effect of introducing noise to the weight set and at the input to the neuron. The MLP investigated is tolerant to noise added at the input to the neuron and therefore could be implemented using the PWM neural network with the RC time constant set close to the PWM period. (7) Giuseppe Amato, Fabrizio Falchi and Claudio Gennaro in Pisa, Italy in 2011.They carried out work on“Geometric consistency checks for kNN based image classification relying on local features.” In this paper In this paper we propose a technique that allows one to use access methods for similarity searching, such as those exploiting metric space properties, in order to performKNN classification with geometric consistency checks. (3) Keiji Yanai in Japan in 2003.They work out on “Generic Image Classification Using Visual Knowledge on the Web.” In this paper, They describe a generic image classification system with an automatic knowledge acquisition mechanism from the World Wide Web. (8) Wang Xing Yuan, Chen Zhi feng and Yunjiao Jiao in China in 2011.They carried out work on “An effective method for colour image retrieval based on texture.” They proposed thatan effective colour image retrieval method based on texture, which uses the colour occurrence matrix to extract the texture feature and measure the similarity of two colour images. (4) Luca Piras and Giorgio Jiacinto in University of Cagliari in Italy in 2010. They proposed work on “Unbalanced learning in content-based image classification and retrieval.”In this paper we propose a technique aimed at artificially increasing the number of examples in the training set in order to improve the learning capabilities, reducing the unbalance between the semantic class of interest, and all other images. The proposed approach is tailored to classification and relevance feedback techniques based on the Nearest-Neighbor paradigm. A number of new points in the feature space are created based on the available training patterns; so that they better represent the distribution of the semantic class of interest. (9) Yu Zeng , Jixian Zhang , J.L. Van Genderen , Guangliang Wang Chinese Academy of Surveying and Mapping, Beijing , P.R.China in 2012. They research on“SVM-based Multi-textural Image Classification and Its Uncertainty Analysis.”This paper presents a supervised image classification method which ismultiple and multi-scale texture features and support vector machines (SVM). (10)Masato Yonekawa and Hiroaki Kurokawa in the School of Computer Science, Tokyo University of Technology, Tokyo Japan in 2012.They proposed on “The Content-Based Image Retrieval using the Pulse Coupled Neural Network.” In this paper they proposed a learning method to define the parameters in the PCNN for image matching. The learning method improves the performance of image matching using thePCNN. On the other hand, recently, a lot of researches on the Content-Based Image Retrieval (CBIR) have been studied. (5) Saurabh Agrawal, Nishchal K Verma, Prateek Tamrakar, Pradip Sircar in Indian Institute ofTechnology Kanpur, India at 2011.They work on “Content Based Color Image Classification using SVM.”They implement classification of image using SVM classifier in the colour content of image. They use optimal hyper planes technique thorough support vector machine.In this paper, they use color image classification on features extracted from histograms of color components. The benefit of using color image histograms are better efficiency, and insensitivity to small changes in camera view-point i.e. translation and rotation. (11) Methaq Gaata ,Sattar Sadkhn, Saad Hasson Montpellier, France in 2012.They work on“Reference Quality Metric Based on Neural Network for Subjective Image WatermarkingEvaluation.”In this work the goal of IQA research is to design computational models which have ability to provide an automatic and efficient way to predict visual quality in a way that is consistent with subjective human evaluation. (6) Siu-Yeung Cho inthe University of Nottingham Ningbo China in 2011.They research on“Content Based Structural Recognition for Flower Image Classification.” In this paper, a study was made on a development of content based image retrieval system to characterize flower images efficiently. In this system, a method of structural pattern recognition (12) R. Venkata Ramana Chary, D. Rajya Lakshmi and K.V.N. Sunitha Tiruvannamalai, TN., India In December, 2012 carried out work on “Image 2 Searching Based on Image Mean Distance Method.” They discussed that when the size of database is increasing image similarity finding .It is big task for the researchers to give the efficient solutions. Content-Based Image Retrieval (CBIR) systems are used in order to retrieve image from image dataset. In our proposed method, we are utilizing clustering method for retrieve the images. (18) Marko Tkalcic , AnteOdic, Andrej Kosir and Jurij Tasic member of IEEE in feb 2013.They carried out work on “ Affective Labeling in a Content-Based Recommender System for Images.”In this paper we present a methodology for the implicit acquisition of affective labels for images.It is based on an cotent detection technique that takes as input the video sequences of users facial expressions. It extracts Gabor low level features from the video frames and employs a k nearest neighbor’s machine learning technique to generate affective labels in the valencearousal-dominance space. (13) Mihir Jain,Rachid Benmokhtar,Patrick GrosINRIA Rennes in 2012.They carried out work on “Hamming Embedding Similarity-based Image Classification.” They propose a novel image classification frame- work based on patch matching. More precisely, we adapt the Hamming Embedding technique, first introduced for image search to improve the bag-of-words representation. We propose a mapping method to cast the scores output by the Hamming technique into a proper similarity space. (19) Serdar Arslan, Adnan Yazici, Ahmet Sacan,Ismail H,Toroslu Esra Acar in USA in 2013.They proposed work on “Comparison of feature based and image registration based retrieval of image data using multidimensional data access methods” They proposed that multidimensional scaling can achieve comparable accuracy while speeding up the query times significantly by allowing the use of spatial access methods. (14) Amel Znaidia, Aymen Shabou, Adrian Popescu, Hervé le Borgne , Céline Hudelot in france in 2012.They carried out work on “Multimodal Feature Generation Framework for Semantic Image”. Classification unified framework which mixes textual and visual information in a seamless manner. Comparison between RBF network and other classification technique: (1)The classification techniques are not providing better optimal result. Some techniques are traditional. Radial basis function network technique is artificial neural network technique. It is provide optical classification which is based on supervised learning and training data set. (15)Feilong Cao,Bo liu and Dong Sun Park in china in 2012. They research on “Image classification based on effective extreme learning machine.” In this work, a new image classification method is proposed based on extreme k means (EKM) and effective extreme learning machine. The proposed processes has image decomposition with curve let transform, reduces dimensiolity with discriminative locality alignment (DLA). (2) As a SVM classifier SVM suffering two problems: (i) How to choose optimal feature sub set input. (ii) How to set best kernel parameters. (16)Yan leng, Xinyan Xu and Guanghui Qi in china in 2013. They carried out work on “Combining active learning and semi supervised learning to construct SVM classifier.” In this work active semi supervised SVM algorithm perform much better than the pure SVM algorithm These problems influence the performance and accuracy of support vector machine. Now the presampling of feature reduced the feature selection process of support vector machine for image classification. (17) Ming Hui Cheng,Kao Shing Hwang Jyh Horng Jeng and Nai Wei lin Taiwan in 2013. They work on “classification based video super resolution using artificial neural networks.” In this study, they proposed to enhance low resolution to high resolution frames. The proposed method consists of four main steps classification motion trace volume collection temporal adjustment and ANN prediction classifier is designed based on the edge properties of a pixel in the frame to identify the spatial information. (3) For the improvements of classification technique we used RBF neural network function for better prediction of feature used in image retrieval. Our proposed method optimized the feature selection process and finally sends data to multiclass classifier for classification of data. 3 [3] Keiji Yanai . Generic Image Classification Using Visual Knowledge on the Web. ACM.Publication on Berkeley California, USA, November 2003. Conclusion [4] Luca Piras and Giorgio Giacinto. Unbalanced learning in content-based image classification and retrieval. IEEE, in University of Cagliari in Italy, 2010. After survey of papers we find that Image is classified through its content like colour, texture, shape and size. In this paper, feature extraction of image is based on colour, shape and size content. Feature extraction of image is optimal. Optimal Feature of image is classified by RBF classifier. Classification of image is using RBF neural network. Radial basis network (RBF) is a artificial neural network technique. It is provide supervised classification of image features. The Gaussian distributionfunction is used in hidden unit of RBF network. Classifications of optimal feature of image are implemented by RBF algorithm.In Radial basis function, feature value is represented in matrix form. In this technique distance of pixel is measured optically with origin. This technique provides better performance and accuracy of image compare to KNN and SVM classification approach.For the improvement of support vector machine classifier we used RBF neural network and POS optimization technique. Our empirical result shows better efficiency instead of support vector machine classifier.This approach provides better result of colour feature of image classification. [5] Saurabh Agrawal, Nishchal K Verma, Prateek Tamrakar and Pradip Sircar .Content Based Color Image Classification using SVM. IEEE, Eight international conferences on information technology: new generations, 2011. [6] Siu-Yeung Cho. Content Based Structural Recognition for Flower Image Classification. IEEE, University of Nottingham Ningbo China .Conference on industrial electronics application (ICIEA),2011. [7] Giuseppe Amato, Fabrizio Falchi and Claudio Gennaro . Geometric consistency checks for KNN based image classification relying on local features. Pisa,Italy, ACM, 2011. [8] Wang Xing Yuan, Chen Zhi Feng and Yunjiao Jiao. An effective method for colour image retrieval based on texture.Elsevier B.V. Publication, China ,2011. [9]Yu Zeng , Jixian Zhang , J.L. Van Genderen , Guangliang Wang. SVM-based Multi-textural Image Classification and Its Uncertainty Analysis. Chinese Academy of Surveying and Mapping, Beijing , P.R.China .International Conference on industrial control and electronics engineering, 2012. [10] Masato Yonekawa and Hiroaki Kurokawa .The ContentBased Image Retrieval using the Pulse Coupled Neural Network.WCCI2012 IEEE World congress on Computational intelligence, Brisbane. School of Computer Science, Tokyo University of Technology, Tokyo,2012. Future scope of work [11] Methaq Gaata, Sattar Sadkhn, Saad Hasson Montpellier. Reference Quality Metric Based on Neural Network for Subjective Image Watermarking Evaluation.IEEE, , France 2012. Radial basis function network have a hidden processing unit where apply different type of training algorithm. It increases image quality through modification of algorithm. Timing of classification can also improve compare to other classification technique. RBF network can be applied to other type of classification technique of image processing. The Accuracy of classification of image play vital role in medical field. RBF network and POS optimization technique usingtrained feature so this technique can be more enhancement are possible in the future. [12] R. Venkata Ramana Chary, D. Rajya Lakshmi and K.V.N. Sunitha Tiruvannamalai, Image Searching Based on Image Mean Distance Method. TN. IEEE, India December, 2012 . [13] Mihir Jain,Rachid Benmokhtar,Patrick .Hamming Embedding Similarity-based Image Classification. ACM.INRIA Rennes china 2012. [14] Amel Znaidia, Aymen Shabou, Adrian Popescu, Hervé le Borgne , Céline Hudelot. Multimodal Feature Generation Framework for Semantic Image. ACM, Hong cong,China,June 2012. References: [15] Feilong Cao,Bo liu and Dong Sun Park. Image classification based on effective extreme learning machine.science vs sience direct, published by Elsevier B.V. 2012. [1] Xiao-Qing Shang, Guo-Xiang Song, Biao Hou. Content based texture image classification. IEEE,Proceedings of the Second international conference on machine learning and cybernetics, Xian, november2003. [16] Yan Leng, Xinyan Xu and Guanghui Qi. Combining active learning and semi supervised learning to construct SVM classifier. Science vs science direct,Elsivier B.V. China,2013. [2] P. J.Gri, J. S. Marsland and W. Eccleston. A Study of Noise in PWM Neural Networks. IEEE. Department of electrical engineering, 2003. [17]Ming Hui Cheng,Kao Shing Hwang Jyh Horng Jeng and Nai wei lin . Classification based video super resolution using artificial neural networks. Elsivier B.V. Taiwan , 2013. 4 [18] Marko Tkalcic , AnteOdic, Andrej Kosir and Jurij Tasic. Affective Labeling in a Content-Based Recommender System for Images. IEEE,Transction on Multimedia vol no15, feb 2013. [19] Serdar Arslan,Aadnan Yazici, Ahmet Sacan,Ismail H,Toroslu Esra Acar. Comparison of feature based and image registration based retrieval of image data using multidimensional data access methods. Sci. vs Sience direct,Elsivier B.V., USA,2013. [20] Vivek Jain, Neha Sahu. Improved Content based Texture Image Classification using Cascade RBF.International Journal of Software and Web Sciences (IJSWS), june- august2013. [21]Adrian G. Bose. Introduction of Radial basis function(RBF) network. OSEE. 5
9cs.NE